Short note about armour class modifiers

For builders to discuss and ask building questions.
Post Reply
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Short note about armour class modifiers

Post by Dalvyn » Thu Apr 03, 2008 4:21 pm

The AC system was changed a few months ago, and I don't remember if I ever posted about it.

(As a side note, we are actually considering ways to move the builders web page to an easily editable format - like a Wiki - and to update them with all the new information.)

The flag APPLY_AC is now obsolete, and should not be used anymore. It is replaced with the following four flags :

Code: Select all

APPLY_AC_ARMOUR
APPLY_AC_NATURAL
APPLY_AC_DEFLECTION
APPLY_AC_SHIELD
Their precise effects can be a bit difficult to understand ...

A first rule to keep in mind is that only the best modifier is taken into consideration. So, if you have a ring with APPLY_AC_DEFLECTION 2 and a cape with APPLY_AC_DEFLECTION 3, only the cape will matter, and the total bonus will be +3 (not +5).

APPLY_AC_NATURAL, APPLY_AC_DEFLECTION, and APPLY_AC_SHIELD all work in the same way. No matter what items they are placed on, they work "globally"; that is, they affect all locations (the locations are cited when you type "defense" online).

APPLY_AC_ARMOUR is a bit trickier. If this modifier is placed on an object that is ITEM_TYPE_ARMOUR and LAYER_ARMOR, then the modifier only applies to this object. That is, if you have leggings with APPLY_AC_ARMOUR 2, this +2 modifier will only apply for the "legs" location. Magical shields too should use APPLY_AC_ARMOUR, even if their modifier is actually considered a "shield" contribution to the AC.

If the APPLY_AC_ARMOUR flag is placed on an object which is NOT of ITEM_TYPE_ARMOUR though, this modifier applies to all locations.

Typically, here's how you should use those flags:
APPLY_AC_ARMOUR - on ITEM_TYPE_ARMOUR for magical pieces of armour (including shields) that are +x
APPLY_AC_ARMOUR - on items such as magical bracelets of defense (make sure that they are NOT ITEM_TYPE_ARMOUR)
APPLY_AC_NATURAL - generally on amulets
APPLY_AC_DEFLECTION - on rings and capes generally
APPLY_AC_SHIELD - on items that simulate a shield defense (e.g., defending weapons, or a ring of shielding).
Image
Post Reply