Looks like there's also a pre-existing BW exploit that it removes any prior casting before you apply the effects
Code: Select all
RemoveEffectsFromSpell(oTarget, SPELL_MAGE_ARMOR);
Oddly, this code looks backwards to me. I can't imagine we ran with it for years and never noted Scale got X4 the bonus of Padded, but it sure looks like ACValue 4 (default) applies a nACBonus of 4, while ACValue 1 (Padded) only grants a +1.
Code: Select all
switch (GetItemACValue(oChestItem))
{
case 3: nACBonus = 1; // ARMOR_AC_PADDED is equipped
break;
case 2: nACBonus = 2; // ARMOR_AC_LEATHER is equipped
break;
case 1: nACBonus = 3; // ARMOR_AC_STUDDED_LEATHER or ARMOR_AC_HIDE is equipped
break;
default: nACBonus = 4; // ARMOR_AC_CHAIN_SHIRT or ARMOR_AC_SCALE is equipped
break;
eAC = EffectACIncrease(nACBonus, AC_ARMOUR_ENCHANTMENT_BONUS);
}