<?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%2Fthirst</id>
	<title>Manual:DIL Manual/thirst - 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%2Fthirst"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/thirst&amp;action=history"/>
	<updated>2026-11-23T21:15:13Z</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/thirst&amp;diff=2926&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/thirst&amp;diff=2926&amp;oldid=prev"/>
		<updated>2026-11-14T23:13:09Z</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;= thirst =&lt;br /&gt;
'''Field''' (integer, read/write; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.thirst : integer&lt;br /&gt;
&lt;br /&gt;
How well watered the player is. Higher is better: 24 is not thirsty at all, below 0 the player is thirsty. The &amp;lt;code&amp;gt;stomach@update&amp;lt;/code&amp;gt; program lowers it every mud hour, and update.zon's &amp;lt;code&amp;gt;gain_cond&amp;lt;/code&amp;gt; keeps it between -96 and 24 and tells the player: &amp;quot;thirsty&amp;quot; from 3 down, then &amp;quot;very thirsty&amp;quot;, &amp;quot;dehydrated&amp;quot; and &amp;quot;dying of thirst&amp;quot;. Drinking raises it.&lt;br /&gt;
&lt;br /&gt;
A value of 48 or more is never changed by &amp;lt;code&amp;gt;gain_cond&amp;lt;/code&amp;gt;: the player doesn't get thirsty.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Players only. On an NPC, an object, a room or null the field fails.&lt;br /&gt;
* Stored as an 8-bit signed number: values outside -128 to 127 wrap around. Keep to -96 to 24, or 48 for &amp;quot;never thirsty&amp;quot;.&lt;br /&gt;
* A program that assigns it should clamp it to 24 itself.&lt;br /&gt;
* While full or thirst is below 0, a player regains hit points, mana and endurance more slowly, and when they are low enough, loses them (vmelimits.cpp).&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer quench(u : unitptr, amount : integer);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (u.type != UNIT_ST_PC)&lt;br /&gt;
      return (FALSE);&lt;br /&gt;
   if (u.thirst &amp;gt; 20)&lt;br /&gt;
   {&lt;br /&gt;
      act(&amp;quot;You are not thirsty.&amp;quot;, A_ALWAYS, u, null, null, TO_CHAR);&lt;br /&gt;
      return (FALSE);&lt;br /&gt;
   }&lt;br /&gt;
   u.thirst := u.thirst + amount;&lt;br /&gt;
   if (u.thirst &amp;gt; 24)&lt;br /&gt;
      u.thirst := 24;&lt;br /&gt;
   return (TRUE);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Lets a player drink unless they are not thirsty, as the drinks in basis.zon do.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/full|full]]&lt;br /&gt;
* [[Manual:DIL Manual/drunk|drunk]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>