<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fmax_endurance</id>
	<title>Manual:DIL Manual/max endurance - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fmax_endurance"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/max_endurance&amp;action=history"/>
	<updated>2026-11-23T22:29:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/max_endurance&amp;diff=2891&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/max_endurance&amp;diff=2891&amp;oldid=prev"/>
		<updated>2026-11-14T23:11:22Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= max_endurance =&lt;br /&gt;
'''Field''' (integer, read-only; units: characters).&lt;br /&gt;
&lt;br /&gt;
 ch.max_endurance : integer&lt;br /&gt;
&lt;br /&gt;
The most endurance the character can have. The server works it out each time it is read: Constitution &amp;amp;times; 2 + 150. For a mortal player that is then scaled by age against the player's [[Manual:DIL Manual/lifespan|lifespan]]: it peaks at 130% a sixth of the way through the lifespan, falls to 20% at its end and to 0 beyond it. Immortals always get the full amount.&lt;br /&gt;
&lt;br /&gt;
The current endurance is the [[Manual:DIL Manual/endurance|endurance]] field; nothing stops a script from setting it above this maximum, so cap it yourself.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Read-only: vmc refuses an assignment (&amp;quot;Illegal lvalue&amp;quot;). Change Constitution (or the age) to change it.&lt;br /&gt;
* On an object, a room or null the field fails.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin rest_up(ch : unitptr, amount : integer);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if ((ch.type != UNIT_ST_PC) and (ch.type != UNIT_ST_NPC))&lt;br /&gt;
      return;&lt;br /&gt;
   ch.endurance := ch.endurance + amount;&lt;br /&gt;
   if (ch.endurance &amp;gt; ch.max_endurance)&lt;br /&gt;
      ch.endurance := ch.max_endurance;&lt;br /&gt;
   return;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Gives a character some endurance without going over the maximum, as in basis.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/endurance|endurance]]&lt;br /&gt;
* [[Manual:DIL Manual/max hp|max_hp]]&lt;br /&gt;
* [[Manual:DIL Manual/max mana|max_mana]]&lt;br /&gt;
* [[Manual:DIL Manual/lifespan|lifespan]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>