<?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_armour</id>
		<title>Man armour - 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_armour"/>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_armour&amp;action=history"/>
		<updated>2026-05-03T11:44:03Z</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_armour&amp;diff=4006&amp;oldid=prev</id>
		<title>Laine at 22:52, 11 June 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_armour&amp;diff=4006&amp;oldid=prev"/>
				<updated>2007-06-11T22:52:33Z</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;==Description==&lt;br /&gt;
&lt;br /&gt;
The following functions are unique to armour.  Armour also includes all&lt;br /&gt;
functions inherited in /std/item, such as set_name(), set_names(),&lt;br /&gt;
set_mass(), set_volume(), set_value(), and so on.&lt;br /&gt;
&lt;br /&gt;
'''set_armour_class(int class)'''&lt;br /&gt;
Sets the armour class of the object to 'class'.  This determines how much&lt;br /&gt;
damage the armour will absorb from a given blow; a random number between&lt;br /&gt;
0 and the armour class is subtracted from the damage.&lt;br /&gt;
&lt;br /&gt;
'''set_armour_type(string type)'''&lt;br /&gt;
Sets the type of armour to 'type'.  This affects what body areas the&lt;br /&gt;
armour covers and whether it is an &amp;quot;overarmour&amp;quot; type.  The types you can&lt;br /&gt;
use are discussed in /doc/build/armour.types.  The data for the is&lt;br /&gt;
contained in /lib/armour_types.h&lt;br /&gt;
&lt;br /&gt;
'''set_material(string mat, int mod)'''&lt;br /&gt;
Sets up default characteristics (armour class and type modifiers) for&lt;br /&gt;
the armour according to its material and construction type.  Construction&lt;br /&gt;
types are: leather, hide, studded, ringmail, brigandine, ringmail, scalemail,&lt;br /&gt;
chainmail, bandedmail, splintmail, platemail, and plate.  These may be used&lt;br /&gt;
alone, or materials may be specified for some, such as brass, bronze, iron,&lt;br /&gt;
steel, mithril, and adamantium.  So one might do set_material(&amp;quot;leather&amp;quot;),&lt;br /&gt;
set_material(&amp;quot;steel chainmail&amp;quot;), set_material(&amp;quot;mithril plate&amp;quot;), and so on.&lt;br /&gt;
The second argument is a modifier that can be used to adjust for quality&lt;br /&gt;
or enchantment, set_material(&amp;quot;mithril chainmail&amp;quot;, 3); gives you the base&lt;br /&gt;
AC of mithril chainmail +3.&lt;br /&gt;
Appropriate properties are automatically added to the armour.  The data on&lt;br /&gt;
materials is contained in /lib/armour_types.h&lt;br /&gt;
&lt;br /&gt;
'''set_limb(int *limbs)'''&lt;br /&gt;
Sets the limbs which the armour binds to.  For example, set_limb(({ Chest }))&lt;br /&gt;
would cause the armour to cover the chest, set_limb(({ Head, Chest })) would&lt;br /&gt;
cause it to cover the head and chest, and set_limb(({({RHand}), ({LHand})}))&lt;br /&gt;
would cause it to cover either the right hand or the left hand, optionally.&lt;br /&gt;
Normal armour only absorbs damage done to the area it covers; overarmour&lt;br /&gt;
absorbs damage irrespective of location (the limbs bound are only for the&lt;br /&gt;
purpose of limiting how much overarmour may be worn).  Normally one does not&lt;br /&gt;
need to use set_limb(), as set_armour_type() determines which limbs are&lt;br /&gt;
covered.  Note that one must #include &amp;lt;limbs.h&amp;gt; in order to use the Chest&lt;br /&gt;
Head, LHand, RHand, etc. macros.&lt;br /&gt;
&lt;br /&gt;
'''set_overarmour(status flag)'''&lt;br /&gt;
Sets whether the piece of armour is &amp;quot;overarmour&amp;quot;.  Rings, cloaks, robes, and&lt;br /&gt;
so on are overarmour.  These absorb damage done to any location on the&lt;br /&gt;
wearer.  Non-overarmour only absorbs damage done to the locations it covers.&lt;br /&gt;
Normally one does not need to use this function, as set_type() determines&lt;br /&gt;
which limbs are covered.&lt;br /&gt;
&lt;br /&gt;
'''set_type_modifiers(mapping mod)'''&lt;br /&gt;
Sets up armour class modifiers which the armour receives based on different&lt;br /&gt;
attack types.  For instance, set_type_modifiers(([ &amp;quot;stabbing&amp;quot; : -3,&lt;br /&gt;
&amp;quot;magical&amp;quot; : 5, &amp;quot;heat&amp;quot; : 2 ])) would give the armour -3 to its AC vs.&lt;br /&gt;
stabbing attacks, +5 to its AC vs. magical attacks, and +2 to its AC&lt;br /&gt;
vs. heat attacks.  One may also use set_type_modifier(string type, int mod)&lt;br /&gt;
to set up individual type modifiers.&lt;br /&gt;
&lt;br /&gt;
'''set_granted_resistances(mapping res)'''&lt;br /&gt;
Sets up a set of resistances which the armour conveys when worn.  An example&lt;br /&gt;
would be set_granted_resistances(([ &amp;quot;slashing&amp;quot; : 50, &amp;quot;magical&amp;quot; : 100,&lt;br /&gt;
&amp;quot;cold&amp;quot; : -50 ])).  When the armour is worn, it will give the wearer 50%&lt;br /&gt;
resistance to slashing attacks, 100% resistance (immunity) to magical&lt;br /&gt;
attacks, and 50% vulnerability to cold attacks.  One may also use the&lt;br /&gt;
function set_granted_resistance(string type, int res) to set up individual&lt;br /&gt;
resistances.&lt;br /&gt;
&lt;br /&gt;
'''set_wear_func(object obj)'''&lt;br /&gt;
If this is called, when a living attempts to wear the armour, the function&lt;br /&gt;
wear_func(object who) will be called in obj.  It is passed the person&lt;br /&gt;
attempting to wear the armour as an argument.  If it returns 1, they will&lt;br /&gt;
be allowed to wear it; if it returns 0, they will not.&lt;br /&gt;
&lt;br /&gt;
'''set_remove_func(object obj)'''&lt;br /&gt;
If this is called, when a living attempts to remove the armour, the function&lt;br /&gt;
remove_func(object who) will be called in obj.  It is passed the person&lt;br /&gt;
attempting to remove the armour as an argument.  If it returns 1, they will&lt;br /&gt;
be allowed to remove it; if it returns 0, they will not.&lt;br /&gt;
&lt;br /&gt;
'''set_absorb_func(object obj)'''&lt;br /&gt;
If this is called, when the armour absorbs damage, the function&lt;br /&gt;
absorb_func(int damage, object attacker, string *type, int full_damage,&lt;br /&gt;
status messages, object weapon, object user, int limb) will be called in&lt;br /&gt;
obj.  Damage&lt;br /&gt;
is the damage being absorbed, attacker is the person doing the damage, *type&lt;br /&gt;
is the damage type being done, full_damage is the base damage before any&lt;br /&gt;
armour modifiers, messages is whether or not any messages should be&lt;br /&gt;
displayed (to avoid multiple messages when doing damage to many limbs),&lt;br /&gt;
weapon is the object being used to do the damage, user is its wearer,&lt;br /&gt;
and limb is the limb index being struck.&lt;br /&gt;
The integer number returned from absorb_func() is added to the amount of&lt;br /&gt;
damage that would normally be absorbed by the armour.&lt;br /&gt;
&lt;br /&gt;
'''set_size_optimum(int opt)'''&lt;br /&gt;
Sets the optimum size for wearing the armour to 'opt'.  See the following&lt;br /&gt;
function for the usefulness of this.&lt;br /&gt;
&lt;br /&gt;
'''set_size_tolerance(int toler)'''&lt;br /&gt;
Sets the size tolerance of the armour to 'toler'.  In order to wear the&lt;br /&gt;
armour, a creature must be within 'toler' size points of the size optimum.&lt;br /&gt;
So with set_size_optimum(40) and set_size_tolerance(10), creatures from&lt;br /&gt;
size 30 to size 50 could wear the armour.  With set_size_optimum(30) and&lt;br /&gt;
set_size_tolerance(2), sizes 28 to 32 could wear it.&lt;br /&gt;
&lt;br /&gt;
'''set_race(string race, int mod)'''&lt;br /&gt;
Defines the race for which the armour was designed; sets up the armour's&lt;br /&gt;
size_optimum and size_tolerance settings as appropriate to that race.  The&lt;br /&gt;
'mod' argument need not be specified; if it is, it acts as a percentage&lt;br /&gt;
modifier to the size tolerance; i.e. if set_race(&amp;quot;human&amp;quot;) defines a size&lt;br /&gt;
optimum of 32 and a size tolerance of 8, then set_race(&amp;quot;human&amp;quot;, 50) will&lt;br /&gt;
change the size tolerance to 12 and set_race(&amp;quot;human&amp;quot;, -50) will change it&lt;br /&gt;
to 4.  If a race for which no size ranges are defined is specified, then&lt;br /&gt;
nothing will be done.&lt;br /&gt;
&lt;br /&gt;
'''set_ablative(status flag)'''&lt;br /&gt;
If this is set to 1, then the armour will be damaged when it intercepts&lt;br /&gt;
damage that would have been done to the player.  Once it has reached its&lt;br /&gt;
damage-absorption capacity it will fall apart.  If this is not set then&lt;br /&gt;
the armour lasts indefinitely.&lt;br /&gt;
&lt;br /&gt;
'''set_absorb(int level)'''&lt;br /&gt;
Sets the number of damage points which may be absorbed by ablative armour&lt;br /&gt;
before falling apart.  This is essentially a shorthand function combining&lt;br /&gt;
set_max_absorption(level) and set_absorption(level).&lt;br /&gt;
&lt;br /&gt;
'''set_max_absorption(int level)&lt;br /&gt;
'''Sets the maximum number of damage points which may be absorbed by the armour.&lt;br /&gt;
&lt;br /&gt;
'''set_absorption(int level)'''&lt;br /&gt;
Sets the current number of damage points which the armour may absorb before&lt;br /&gt;
falling apart.&lt;br /&gt;
&lt;br /&gt;
'''set_armour_degradation(int perc)'''&lt;br /&gt;
Sets the percentage by which ablative armour will degrade as it takes damage.&lt;br /&gt;
If this is set to 100, then when the armour is about to fall apart it will&lt;br /&gt;
offer no protection.  If 50, then it will only degrade to half its normal AC.&lt;br /&gt;
If -25, then the armour will gain protective capacity as it takes damage.&lt;br /&gt;
How much of this percentage applies depends on what percentage of the armour's&lt;br /&gt;
absorption capacity has been depleted.  This percentage modifier is applied&lt;br /&gt;
after any type modifiers the armour possesses.&lt;/div&gt;</summary>
		<author><name>Laine</name></author>	</entry>

	</feed>