<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.lostsouls.org/w/skins/common/feed.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Man special attack - Revision history</title>
		<link>http://wiki.lostsouls.org/w/index.php?title=Man_special_attack&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.8.2</generator>
		<lastBuildDate>Sun, 03 May 2026 11:41:46 GMT</lastBuildDate>
		<item>
			<title>Laine at 21:03, 11 June 2007</title>
			<link>http://wiki.lostsouls.org/w/index.php?title=Man_special_attack&amp;diff=3977&amp;oldid=prev</link>
			<description>&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;
 /def/descriptor/special_attack.c&lt;br /&gt;
 /lib/descriptors/special_attack.h&lt;br /&gt;
 /std/autonomon.c&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Special attack descriptors are used by the /std/autonomon special attack&lt;br /&gt;
mechanism; they describe a simplistic special combat maneuver that the&lt;br /&gt;
character can perform.  This document explains the significance of each&lt;br /&gt;
of the fields in the descriptor; for information on how to specify the&lt;br /&gt;
descriptor and so on, see the general information in 'man descriptors'.&lt;br /&gt;
&lt;br /&gt;
Fields below which can be given as closures receive either standard&lt;br /&gt;
arguments or damage arguments.  Standard arguments are 1) the opponent,&lt;br /&gt;
2) the special attack descriptor, and 3) the character.  Damage arguments&lt;br /&gt;
are 1) the opponent, 2) the resolved limb target in use, which will be&lt;br /&gt;
either integer limb target, possibly -1 (Null) for the entire body, or an&lt;br /&gt;
array of integer limb targets, 3) the special attack descriptor, and&lt;br /&gt;
4) the character.  All closures are expected to return a value that could&lt;br /&gt;
be specified as a static value for the field.&lt;br /&gt;
&lt;br /&gt;
===Public Fields===&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Name: A descriptive name for the special attack, used when&lt;br /&gt;
it's necessary to address the special attack by name.  Presently, this is&lt;br /&gt;
mainly relevant to things like 'show attacks', 'perform &amp;lt;special attack&amp;gt;',&lt;br /&gt;
and 'stop/start attacking with &amp;lt;special attack&amp;gt;', and is mainly used on&lt;br /&gt;
special attacks defined at the race level.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Actuation: An actuation, as defined in /lib/combat.h and&lt;br /&gt;
/def/actuation, or an array of actuations.  If supplied, these will be&lt;br /&gt;
used for automatically determining the conditions necessary for the special&lt;br /&gt;
attack to take place and constructing a message for it.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Vector: An attack vector, as defined in /lib/combat.h and&lt;br /&gt;
/def/vector.  If supplied, this will be used as part of determining the&lt;br /&gt;
message for the special attack and whether it can be defended against.&lt;br /&gt;
If not supplied, the default vector for the damage type or damage combo&lt;br /&gt;
lappropriate to Special_Attack_Type will be used.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Skill: A single skill, an array of skills, or a mapping of&lt;br /&gt;
skill to int/float weights.  If supplied, this specifies the main skills&lt;br /&gt;
which are used to determine whether the attack hits its target.  If not&lt;br /&gt;
supplied, the attack always hits and cannot be defended against.  This&lt;br /&gt;
should always be supplied!&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Speak: Text which the autonomon must speak in order for the&lt;br /&gt;
special attack to take place.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Language: The language in which the Special_Attack_Speak&lt;br /&gt;
text must be spoken.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Power: Used to specify the power level of the special attack&lt;br /&gt;
in an abstract fashion.  See /lib/descriptors/special_attack.h for the list&lt;br /&gt;
of possible values for this field.  ALWAYS USE THE MACROS!  When this&lt;br /&gt;
field is specified, damage and other effects will be apportioned based on&lt;br /&gt;
the power level of the attack, adjusted according to the autonomon's&lt;br /&gt;
special attack damage rating if a Special_Attack_Skill was specified,&lt;br /&gt;
and so on.  NOTE: All damage amounts (whether from Special_Attack_Power,&lt;br /&gt;
Special_Attack_Damage, or Special_Attack_Modifier) are apportioned into&lt;br /&gt;
special effects (pain, stunning, slowing, etc.) according to the tendency&lt;br /&gt;
of the attack's damage types to cause each; for example, photonic damage&lt;br /&gt;
tends to cause blinding, while sonic damage tends to cause stunning.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Damage: A randomizable amount of damage caused by the&lt;br /&gt;
special attack.  This damage, along with any damage calculated for the&lt;br /&gt;
the attack based on Special_Attack_Power, will be subject to normal&lt;br /&gt;
attack-damage randomization, meaning it will vary between 10% and 100%&lt;br /&gt;
of its capacity.  May be a closure, which receives damage arguments.  It&lt;br /&gt;
is preferable to avoid using this field and rely on Special_Attack_Power.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Modifier: A constant amount of damage caused by the special&lt;br /&gt;
attack.  Will not be subject to normal attack-damage randomization.  May&lt;br /&gt;
be a closure, which receives damage arguments.  It is preferable to avoid&lt;br /&gt;
using this field and rely on Special_Attack_Power.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Type: The damage type caused by special attack.  Defaults&lt;br /&gt;
to ({ &amp;quot;magical&amp;quot; }).  Basic values may be string or array; may also be a&lt;br /&gt;
closure, which receives damage arguments.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Target: The limb or limbs targeted by the special attack.&lt;br /&gt;
Defaults to Special_Attack_Target_Hit_Limb; it is almost always appropriate&lt;br /&gt;
to avoid using this field and rely on the default.  The meaning of&lt;br /&gt;
different possible values are:&lt;br /&gt;
&lt;br /&gt;
    -1: Divide damage proportionally among all the target's limbs.&lt;br /&gt;
    -2: Hit one of the target's non-amputated limbs using random selection&lt;br /&gt;
        weighted by relative limb size.  This may also be given as the&lt;br /&gt;
        macro Special_Attack_Target_Hit_Limb.&lt;br /&gt;
    other integer: Assumed to be a limb type from limbs.h.  Targets the&lt;br /&gt;
        first non-amputated limb of the specified type, or the entire body&lt;br /&gt;
        if none are available.  Special_Attack_Flag_Limb_Target_Preset,&lt;br /&gt;
        below, causes this to be interpreted as a limb index instead.&lt;br /&gt;
    string: Interpreted as a limb name.  Targets the first non-amputated&lt;br /&gt;
        limb with the specified name, or the entire body if none is&lt;br /&gt;
        available.&lt;br /&gt;
    int array: Interpreted as an array of limb types.  Each element will&lt;br /&gt;
        result in a lookup of the first non-amputated limb of the given&lt;br /&gt;
        type, and damage will be divided proportionally among those limbs&lt;br /&gt;
        present.  If none of the limb types in the array are available,&lt;br /&gt;
        the entire body will be targeted.&lt;br /&gt;
    string array: As int array, but interpreting the elements as limb names&lt;br /&gt;
        rather than limb types.&lt;br /&gt;
    closure: Will be called with standard arguments, and is expected to&lt;br /&gt;
        return one of the values above.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Chance: The percentage chance that the special attack will&lt;br /&gt;
be in the character's usable attack list in a given combat round.  Must be&lt;br /&gt;
a non-negative integer.  See /lib/descriptors/special_attack.h for various&lt;br /&gt;
sample value macros for this, such as Special_Attack_Chance_Occasional&lt;br /&gt;
and Special_Attack_Chance_Somewhat_Frequent; it is strongly preferable to use&lt;br /&gt;
one of these macros if one appropriate to your application is available,&lt;br /&gt;
but using a literal integer value is acceptable if none of the macros do&lt;br /&gt;
what you need.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Message: The message associated with the special attack.&lt;br /&gt;
It is usually appropriate to avoid using this field and rely on the message&lt;br /&gt;
that will be automatically generated by the _Vector, _Actuation, and _Type&lt;br /&gt;
fields.  Should be specified as a message array (as per 'man message'), in&lt;br /&gt;
which any occurrence of the exact and entire string &amp;quot;%e&amp;quot; will be replaced&lt;br /&gt;
with the opponent and &amp;quot;%l&amp;quot; will be replaced with the string name of the&lt;br /&gt;
limb or limbs targeted.  A degenerate form specified only using a string is&lt;br /&gt;
supported for compatibility purposes, but is deprecated for use in new&lt;br /&gt;
code.  May be a closure, which will be called with damage arguments.&lt;br /&gt;
to override, the actuation, vector, and damage type information will be&lt;br /&gt;
used to automatically construct a message.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Stun: A randomizable amount of stunning that can be&lt;br /&gt;
inflicted by the special attack.  The actual amount of stun calculated from&lt;br /&gt;
this setting, if specified, will be 10% to 100% of the value given.  Is&lt;br /&gt;
handled as a stun specification to do_damage() and is subject to the rules&lt;br /&gt;
applicable per that function (notably, that the secondary effects are&lt;br /&gt;
aborted if the main damage portion of the attack has no effect).  May be&lt;br /&gt;
a closure, which will be called with damage arguments.  It is usually&lt;br /&gt;
appropriate to avoid using this field and rely on stunning calculated from&lt;br /&gt;
the _Power field's interaction with the _Type field.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Blind: A randomizable amount of blinding that can be&lt;br /&gt;
inflicted by the special attack.  The actual amount of blinding calculated&lt;br /&gt;
from this setting, if specified, will be 10% to 100% of the value given.&lt;br /&gt;
Is handled as a blinding specification to do_damage() and is subject to the&lt;br /&gt;
rules applicable per that function.  May be a closure, which will be called&lt;br /&gt;
with damage arguments.  It is usually appropriate to avoid using this field&lt;br /&gt;
and rely on blinding calculated from the _Power field's interaction with&lt;br /&gt;
the _Type field.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Deafen: A randomizable amount of deafening that can be&lt;br /&gt;
inflicted by the special attack.  The actual amount of deafening calculated&lt;br /&gt;
from this setting, if specified, will be 10% to 100% of the value given.&lt;br /&gt;
Is handled as a deafening specification to do_damage() and is subject to&lt;br /&gt;
the rules applicable per that function.  May be a closure, which will be&lt;br /&gt;
called with damage arguments.  It is usually appropriate to avoid using&lt;br /&gt;
this field and rely on deafening calculated from the _Power field's&lt;br /&gt;
interaction with the _Type field.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Numb: A randomizable amount of numbing that can be inflicted&lt;br /&gt;
by the special attack.  The actual amount of numbing calculated from this&lt;br /&gt;
setting, if specified, will be 10% to 100% of the value given.  Is handled&lt;br /&gt;
as a numbing specification to do_damage() and is subject to the rules&lt;br /&gt;
applicable per that function.  May be a closure, which will be called with&lt;br /&gt;
damage arguments.  It is usually appropriate to avoid using this field and&lt;br /&gt;
rely on numbing calculated from the _Power field's interaction with the&lt;br /&gt;
_Type field.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Slow: A randomizable amount of slowing that can be inflicted&lt;br /&gt;
by the special attack.  The actual amount of slowing calculated from this&lt;br /&gt;
setting, if specified, will be 10% to 100% of the value given.  Is handled&lt;br /&gt;
as a slowing specification to do_damage() and is subject to the rules&lt;br /&gt;
applicable per that function.  May be a closure, which will be called with&lt;br /&gt;
damage arguments.  It is usually appropriate to avoid using this field and&lt;br /&gt;
rely on slowing calculated from the _Power field's interaction with the&lt;br /&gt;
_Type field.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Poison: A randomizable amount of poisoning that can be&lt;br /&gt;
inflicted by the special attack.  The actual amount of poisoning calculated&lt;br /&gt;
from this setting, if specified, will be 10% to 100% of the value given.&lt;br /&gt;
Is handled as a poisoning specification to do_damage() and is subject to&lt;br /&gt;
the rules applicable per that function.  May be a closure, which will be&lt;br /&gt;
called with damage arguments.  It is usually appropriate to avoid using&lt;br /&gt;
this field and rely on poisoning calculated from the _Power field's&lt;br /&gt;
interaction with the _Type field.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Caust: A caust specification (c.f. 'man caust') associated&lt;br /&gt;
with the special attack.  If present, when the special attack occurs, the&lt;br /&gt;
caust descriptor will be copied with deep_copy() and modified as follows:&lt;br /&gt;
1) the Caust_Damage will be set to half the damage calculated for the&lt;br /&gt;
special attack (from Special_Attack_Damage and Special_Attack_Modifier),&lt;br /&gt;
2) the Caust_Type will be set the same as the Special_Attack_Type, 3) the&lt;br /&gt;
Caust_Aggressor will be set to the character, and 3) the Caust_Target will&lt;br /&gt;
be set to the limbs being hit by the special attack, with the flag&lt;br /&gt;
Caust_Flag_Target_Preset turned on unless the entire body is being&lt;br /&gt;
targeted.  The modified copy of the caust descriptor will then be added&lt;br /&gt;
to the opponent.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Condition: A condition descriptor which will be evaluated&lt;br /&gt;
on the character performing the special attack, or a closure which, if&lt;br /&gt;
specified, will be called with standard arguments.  If the condition&lt;br /&gt;
descriptor evaluation or closure returns False, the special attack will&lt;br /&gt;
not be used at that time.  Generally, common condition macros from&lt;br /&gt;
/lib/conditions.h are used for this setting.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_From: A field specifying where the special attack comes&lt;br /&gt;
from, used by the code that automatically constructs special attack&lt;br /&gt;
messages based on _Actuation, _Vector, _Type, and so on.  Can be anything&lt;br /&gt;
that would be valid as an element of a message array, such as this_object()&lt;br /&gt;
in a character for a special attack originating from the character in&lt;br /&gt;
general, &amp;quot;nowhere&amp;quot; for a special attack coming from nowhere, or&lt;br /&gt;
({ 'r', 0, &amp;quot;eyes&amp;quot; }) for a special attack coming from a character's eyes&lt;br /&gt;
(please note: test your special attack and use ({ 's', 0, &amp;quot;eyes&amp;quot; }) if&lt;br /&gt;
 needed to make the character's name show up).  If an appropriate object&lt;br /&gt;
or limb can be found in the specification, the Attack_Weapon field of&lt;br /&gt;
attack descriptors generated by the special attack will be set accordingly.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Appearance: A descriptive field usable to override the&lt;br /&gt;
appearance of the special attack calculated based on _Vector and _Type.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Energy_Costs: An array of specifications for energy cost&lt;br /&gt;
descriptors defining the energy costs to use the special attack.  The&lt;br /&gt;
default is as if ({({ Energy_Spiritual, 10 })}) were given.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Placeholder: A presently unused field.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Strike: A field accepting an int or float value affecting&lt;br /&gt;
the accuracy of the special attack.  See /lib/descriptors/special_attack.h&lt;br /&gt;
for a list of sample values for this field.  It is preferable to use one&lt;br /&gt;
of these if any appropriate to your application is available, but it is&lt;br /&gt;
acceptable to specify a literal value if none of the macros does what you&lt;br /&gt;
want.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Activity: The cost in activity points to perform the special&lt;br /&gt;
attack.  Defaults to 15 if the attack is being defined from an autonomon&lt;br /&gt;
object, 0 otherwise.  Must be a positive integer.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Size: A field accepting an int value specifying the size of&lt;br /&gt;
the special attack.  It is more often than not appropriate to avoid using&lt;br /&gt;
this field and rely on the default value for the vector used.  See&lt;br /&gt;
/lib/descriptors/special_attack.h for a list of sample values for this&lt;br /&gt;
field; it is preferable to use one of these if any appropriate to your&lt;br /&gt;
application is available, but it is acceptable to specify a literal value&lt;br /&gt;
if none of the macros does what you want.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Speech: The speech command (designated using one of the&lt;br /&gt;
Speech_Command_X macros from the speech descriptor) using which the&lt;br /&gt;
Special_Attack_Speak text is spoken; defaults to Speech_Command_Say.&lt;br /&gt;
&lt;br /&gt;
Special_Attack_Flags: Specifies flag values from among these:&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Appearance_Plurality: When using the _Appearance&lt;br /&gt;
    field, specifies that your given _Appearance is plural.  Specifying&lt;br /&gt;
    this flag then allows grammar related to the appearance of the special&lt;br /&gt;
    attack to be constructed correctly.  Will cause attack descriptors&lt;br /&gt;
    generated by the special attack to have Attack_Flag_Pluralize_Vector&lt;br /&gt;
    turned on.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Bypass_Armour: Causes the special attack to ignore&lt;br /&gt;
    armour and related defenses.  Will cause attack descriptors generated&lt;br /&gt;
    by the special attack to have Attack_Flag_Bypass_Armour turned on.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Untreatable: Causes wounds from the special attack&lt;br /&gt;
    to not flag affected limbs as treatable.  Will cause attack descriptors&lt;br /&gt;
    generated by the special attack to have Attack_Flag_Untreatable turned&lt;br /&gt;
    on.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Inflict_Mental_Disorder: Causes the special attack,&lt;br /&gt;
    if successful, to cause a randomly selected mental disorder to the&lt;br /&gt;
    target.  Will cause attack descriptors generated by the special attack&lt;br /&gt;
    to have Attack_Flag_Inflict_Mental_Disorder turned on.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Accidental: Causes the special attack to be treated&lt;br /&gt;
    as accidental.  Will cause attack descriptors generated by the special&lt;br /&gt;
    attack to have Attack_Flag_Accidental turned on.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Definite_Article: Causes the appearance of the&lt;br /&gt;
    special attack to be described using the definite article rather than&lt;br /&gt;
    the indefinite (&amp;quot;the&amp;quot; rather than &amp;quot;a&amp;quot; or &amp;quot;an&amp;quot;) if an article is used.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_From_Separate: In the case where the _Actuation&lt;br /&gt;
    in use is a direct manipulation of the vector (e.g. Vector_Spit,&lt;br /&gt;
    Vector_Release; anything with set_actuation_vector_manipulating(True)),&lt;br /&gt;
    the default behavior in the presence of a _From field is to have the&lt;br /&gt;
    _From as the subject of the actuation, i.e. the _From is doing the&lt;br /&gt;
    spitting or releasing or what-have-you.  This flag suppresses this&lt;br /&gt;
    behavior, causing the character to still be performing the vector,&lt;br /&gt;
    described as being from the _From field.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Pluralize_Vector: Causes the appearance of the&lt;br /&gt;
    special attack to be calculated using the plural case of the vector,&lt;br /&gt;
    e.g. &amp;quot;beams&amp;quot; rather than &amp;quot;beam&amp;quot;, &amp;quot;arcs&amp;quot; rather than &amp;quot;arc&amp;quot;.  Will cause&lt;br /&gt;
    attack descriptors generated by the special attack to have&lt;br /&gt;
    Attack_Flag_Pluralize_Vector turned on.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Limb_Target_Preset: Causes an integer _Target&lt;br /&gt;
    value to be interpreted as an already-determined limb index on the&lt;br /&gt;
    target, rather than a limb type to be found.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Disjoint_Limb_Selection: Causes the special attack&lt;br /&gt;
    to be able to hit non-adjacent limbs when striking multiple limbs on a&lt;br /&gt;
    target.  Will cause attack descriptors generated by the special attack&lt;br /&gt;
    to have Attack_Flag_Disjoint_Limb_Selection turned on.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Combine_Message: If specified, the _Message field&lt;br /&gt;
    is combined with the message content generated automatically rather&lt;br /&gt;
    than replacing it.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Message_Elide_From: If specified, the _From field&lt;br /&gt;
    does not affect generated messages, meaning it is only used to find&lt;br /&gt;
    the Attack_Weapon value to use.&lt;br /&gt;
&lt;br /&gt;
    Special_Attack_Flag_Suppress_Result_Description: If specified, causes&lt;br /&gt;
    the special attack to not have an attack result description (&amp;quot;connects&lt;br /&gt;
    solidly&amp;quot;, &amp;quot;barely connects&amp;quot; and so on) in its message content.  Will&lt;br /&gt;
    cause attack descriptors generated by the special attack to have&lt;br /&gt;
    Attack_Flag_Suppress_Result_Description turned on.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
[[man descriptors|descriptors(mechanisms)]], [[man add special attack|add_special_attack(lfun)]],&lt;br /&gt;
[[man set special attacks|set_special_attacks(lfun)]], [[man query special attacks|query_special_attacks(lfun)]],&lt;br /&gt;
[[man remove special attack|remove_special_attack(lfun)]], [[man message|message(lfun)]], [[man caust|caust(descriptors)]], [[man damage types|damage_types(build)]]&lt;/div&gt;</description>
			<pubDate>Mon, 11 Jun 2007 21:03:03 GMT</pubDate>			<dc:creator>Laine</dc:creator>			<comments>http://wiki.lostsouls.org/Talk:Man_special_attack</comments>		</item>
	</channel>
</rss>