<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.lostsouls.org/w/skins/common/feed.css"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_caust</id>
		<title>Man caust - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_caust"/>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_caust&amp;action=history"/>
		<updated>2026-05-10T10:52:10Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.8.2</generator>

	<entry>
		<id>http://wiki.lostsouls.org/w/index.php?title=Man_caust&amp;diff=3957&amp;oldid=prev</id>
		<title>Laine at 19:26, 11 June 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_caust&amp;diff=3957&amp;oldid=prev"/>
				<updated>2007-06-11T19:26:00Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Files==&lt;br /&gt;
&lt;br /&gt;
 /mod/character/caust.c&lt;br /&gt;
 /def/descriptor/caust.c&lt;br /&gt;
 /lib/descriptors/caust.h&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Caust descriptors are used by the caust system for livings.  You will want&lt;br /&gt;
to be familiar with the general properties of descriptors, as described in&lt;br /&gt;
'man descriptors'.  'man add_caust' describes the most common interface to&lt;br /&gt;
the caust system.&lt;br /&gt;
&lt;br /&gt;
===Public Fields===&lt;br /&gt;
&lt;br /&gt;
Caust_Damage: The amount of damage to do to the body when the caust is&lt;br /&gt;
active, as determined by the Caust_Interval setting.  Negative amounts will&lt;br /&gt;
ignore armour.&lt;br /&gt;
&lt;br /&gt;
Caust_Type: The damage type, such as ({ &amp;quot;fire&amp;quot; }) or ({ &amp;quot;slashing&amp;quot;,&lt;br /&gt;
&amp;quot;crushing&amp;quot; }).  Supplying array damage types, even for a single type, is&lt;br /&gt;
recommended.  Defaults to ({ &amp;quot;poison&amp;quot; }).&lt;br /&gt;
&lt;br /&gt;
Caust_Duration: The number of heartbeats the caust normally lasts for.&lt;br /&gt;
Defaults to 20.&lt;br /&gt;
&lt;br /&gt;
Caust_Interval: The caust is only active every Caust_Interval heartbeats.  &lt;br /&gt;
Defaults to 1.&lt;br /&gt;
&lt;br /&gt;
Caust_Aggressor: The object initiating the combat, if any.  (As with&lt;br /&gt;
do_damage().)&lt;br /&gt;
&lt;br /&gt;
Caust_Source: The object actually doing the damage, if any.  (As with&lt;br /&gt;
do_damage().)&lt;br /&gt;
&lt;br /&gt;
Caust_Endurance: &amp;quot;Damage&amp;quot; to the subject's endurance.  Negative amounts&lt;br /&gt;
will restore endurance.&lt;br /&gt;
&lt;br /&gt;
Caust_Spell_Points: &amp;quot;Damage&amp;quot; to the subject's spell points.  Negative&lt;br /&gt;
amounts will restore spell points.&lt;br /&gt;
&lt;br /&gt;
Caust_Stun: Stunning to inflict along with damage.&lt;br /&gt;
&lt;br /&gt;
Caust_Blind: Blinding to inflict along with damage.&lt;br /&gt;
&lt;br /&gt;
Caust_Deafen: Deafening to inflict along with damage.&lt;br /&gt;
&lt;br /&gt;
Caust_Agonize: Pain to inflict along with damage.&lt;br /&gt;
&lt;br /&gt;
Caust_Target: Defines the limb targeting for the caust.  Works similiarly&lt;br /&gt;
to the same argument in set_spell() unless Caust_Flag_Target_Preset is set.&lt;br /&gt;
Defaults to Chest.  Examples of how target settings are used:&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Target_Hit_Limb (same as numeric value -2)&lt;br /&gt;
        hit a randomly selected limb on each instance, determined with&lt;br /&gt;
        the function get_limb_hit() if an aggressor is supplied, or with&lt;br /&gt;
        query_random_present_limb() if not&lt;br /&gt;
&lt;br /&gt;
    Null (same as numeric value -1)&lt;br /&gt;
        hit the entire body, dividing damage among limbs&lt;br /&gt;
        proportionally to their sizes&lt;br /&gt;
&lt;br /&gt;
    Limb_Type_Head&lt;br /&gt;
        hit a head type limb&lt;br /&gt;
&lt;br /&gt;
    ({ Limb_Type_Left_Hand, Limb_Type_Left_Arm })&lt;br /&gt;
        hit a left hand type limb and a left arm type limb, dividing damage&lt;br /&gt;
        proportionally to their sizes&lt;br /&gt;
&lt;br /&gt;
    ({ Limb_Type_Foot, Limb_Type_Leg })&lt;br /&gt;
        hit a foot type limb and a leg type limb, dividing damage&lt;br /&gt;
        proportionally to their sizes&lt;br /&gt;
&lt;br /&gt;
    &amp;quot;left tentacle&amp;quot;&lt;br /&gt;
        hit a limb named &amp;quot;left tentacle&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In each case, when looking for a limb, the system will first look for a&lt;br /&gt;
limb that is either functional or disabled, and if one is not found, will&lt;br /&gt;
look for a limb that is amputated.  If a valid limb is still not found,&lt;br /&gt;
the damage will be applied to the full body (i.e. as if -1 had been&lt;br /&gt;
specified).&lt;br /&gt;
&lt;br /&gt;
Caust_Degenerative: Causes the damage to decrease by the value given for&lt;br /&gt;
this field each time the caust is active, until it hits zero or the&lt;br /&gt;
duration expires, whichever comes first.  A negative value will cause the&lt;br /&gt;
damage to increase rather than degenerate.&lt;br /&gt;
&lt;br /&gt;
Caust_Message_Chance: Determines whether the subject will receive the&lt;br /&gt;
Caust_Maintain_Message when the caust is active.  If a closure, will be&lt;br /&gt;
called with 1) the subject and 2) the caust descriptor as arguments; if&lt;br /&gt;
the return value is true, the message will be displayed.  If an integer,&lt;br /&gt;
is interpreted in !random(n) fashion; for example, a Caust_Message_Chance&lt;br /&gt;
of 8 means the messages has a 1 in 8 chance of happening each time the&lt;br /&gt;
caust is active.&lt;br /&gt;
&lt;br /&gt;
Caust_Maintain_Message: The message sent to the subject on every instance&lt;br /&gt;
that the Caust_Message_Chance succeeds.  Can be a string, in which case&lt;br /&gt;
only the subject will receive the message.  Can also be an array, which&lt;br /&gt;
will be passed to message() and so displayed to all present; 0 will be&lt;br /&gt;
replaced with the body, as usual, and &amp;quot;%l&amp;quot; will be replaced with the limb&lt;br /&gt;
or limbs struck.  Defaults to ({ 0, ({ &amp;quot;look&amp;quot;, 0, &amp;quot;feel&amp;quot; }), &amp;quot;sick&amp;quot; }).&lt;br /&gt;
Set to 0 for no message.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
    Caust_Maintain_Message : ({({ 's', 0, &amp;quot;%l&amp;quot; }), &amp;quot;burns fiercely&amp;quot; })&lt;br /&gt;
        will translate to something like:&lt;br /&gt;
    The orc guard's right leg burns fiercely.&lt;br /&gt;
&lt;br /&gt;
Caust_Start_Message: The message sent when the caust is first applied.&lt;br /&gt;
Uses exactly the same rules as Caust_Maintain_Message.  Defaults to&lt;br /&gt;
&amp;quot;You have been poisoned!&amp;quot;.  Set to 0 for no message.&lt;br /&gt;
&lt;br /&gt;
Caust_End_Message: The message sent when the caust expires or is removed.&lt;br /&gt;
Uses the same rules as Caust_Maintain_Message.  Defaults to &amp;quot;You are no&lt;br /&gt;
longer poisoned.&amp;quot;.  Set to 0 for no message.&lt;br /&gt;
&lt;br /&gt;
Caust_Merge_Message: The message sent when the caust is merged with another&lt;br /&gt;
similar caust.  Uses the same rules as Caust_Maintain_Message.  Default is&lt;br /&gt;
no message.&lt;br /&gt;
&lt;br /&gt;
Caust_Flags: Flags associated with the caust.  These are:&lt;br /&gt;
&lt;br /&gt;
    Caust_Flag_Armour_Effective: If this flag is present, armour counts&lt;br /&gt;
    against the caust.  Otherwise, armour is ignored.&lt;br /&gt;
&lt;br /&gt;
    Caust_Flag_Cumulative: Prevents the system from attempting to merge&lt;br /&gt;
    your caust with other, similar ones.  If this is not set to true, the&lt;br /&gt;
    system will try to combine sufficiently similar causts into a single&lt;br /&gt;
    definition, adding their durations and so forth.  Often this should&lt;br /&gt;
    be exactly what you want to happen.&lt;br /&gt;
&lt;br /&gt;
    Caust_Flag_Treatable: If this flag is present, damage inflicted by the&lt;br /&gt;
    caust makes the limbs affected eligible to be treated by first aid.&lt;br /&gt;
    Otherwise, the damage is not considered treatable.&lt;br /&gt;
&lt;br /&gt;
    Caust_Flag_Target_Preset: If True, the target setting is interpreted&lt;br /&gt;
    to already contain limb indices, and so is not processed by looking&lt;br /&gt;
    up limb types.  This is how you can apply a caust to a limb that has&lt;br /&gt;
    already been selected by other means.  Examples of how target settings&lt;br /&gt;
    will be interpreted if Caust_Flag_Target_Preset is on:&lt;br /&gt;
        0                 : hit limb index 0&lt;br /&gt;
        1                 : hit limb index 1&lt;br /&gt;
        ({ 5, 6 })        : hit limb indices 5 and 6, dividing damage among&lt;br /&gt;
            limbs proportionally to their sizes&lt;br /&gt;
&lt;br /&gt;
===Internal Fields===&lt;br /&gt;
&lt;br /&gt;
Caust_Counter: This is the counter used for causts with Caust_Intervals&lt;br /&gt;
higher than 1.  Do not interfere with this field.&lt;br /&gt;
&lt;br /&gt;
Caust_Initiator: This is the string object name of the object which&lt;br /&gt;
applied the caust to the subject.  Use Caust_Query(dxr, Caust_Initiator)&lt;br /&gt;
to access it.  Do not set this field.&lt;br /&gt;
&lt;br /&gt;
Caust_Tag: The tag for the descriptor system.&lt;br /&gt;
&lt;br /&gt;
===Caust Behavior in Conjunction with Severed Limbs===&lt;br /&gt;
&lt;br /&gt;
A caust will check to see if limbs it is targeting have been amputated.&lt;br /&gt;
This causes two behaviors.  First, any limbs that have been amputated will&lt;br /&gt;
not be described in messages; as a corollary, if all limbs targeted have&lt;br /&gt;
been amputated, no messages will be sent, including end messages.  Second,&lt;br /&gt;
if all limbs targeted have been amputated, the caust will terminate (or&lt;br /&gt;
will not begin at all, if this is the case when add_caust() is first&lt;br /&gt;
called).  As indicated by the first item, this termination will be silent.&lt;br /&gt;
This is considered desirable behavior because if, for example, your arm is&lt;br /&gt;
on fire, receiving a message that indicates your arm has been amputated is&lt;br /&gt;
sufficient reason to stop worrying about your arm being on fire, and it&lt;br /&gt;
would not be particularly useful to also receive a message about the fire&lt;br /&gt;
going out.&lt;br /&gt;
&lt;br /&gt;
Neither of the above concerns apply to causts applied to an entire body&lt;br /&gt;
(target of -1), since individual limbs are not mentioned in messages for&lt;br /&gt;
those (&amp;quot;%l&amp;quot; elements are replaced with the word &amp;quot;body&amp;quot;), and at least&lt;br /&gt;
one limb will always remain.&lt;br /&gt;
&lt;br /&gt;
Even when limbs have been severed, damage continues to behave as if&lt;br /&gt;
divided between the entire target list.  This is so that damage behavior&lt;br /&gt;
remains predictable, rather than a situation arising where much more&lt;br /&gt;
damage than you had intended is done to a single remaining limb out of&lt;br /&gt;
a target list.  This applies to full-body damage in the same way as to&lt;br /&gt;
that with specific limb targets.&lt;br /&gt;
&lt;br /&gt;
===Complete List of Conditions Resulting in Caust Termination===&lt;br /&gt;
&lt;br /&gt;
* The living creature already has the maximum number of causts applied.  (Caust is never applied.)&lt;br /&gt;
* The aggressor is prevented from initiating aggression against the target.  (Caust is never applied.)&lt;br /&gt;
* The damage setting is zero.  (Caust is never applied.)&lt;br /&gt;
* The number of heartbeats specified in the duration has elapsed.&lt;br /&gt;
* The damage setting has been reduced to nothing by degeneration.&lt;br /&gt;
* All limbs targeted by the caust have been amputated.  (Caust terminates or never starts.)&lt;br /&gt;
* The caust is removed by remove_caust() or remove_causts().  Various events, notably including incarnos death, remove all causts.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
[[man descriptors|descriptors(mechanisms)]], [[man add caust|add_caust(lfun)]], [[man remove caust|remove_caust(lfun)]], [[man remove causts|remove_causts(lfun)]]&lt;/div&gt;</summary>
		<author><name>Laine</name></author>	</entry>

	</feed>