This code snippet adds support for elemental items in the SMAUG codebase. This mainly effects weapons and armors. When a fighter uses a non-elemental weapon, his attacks are influenced by his opponent's resistance/susceptibility/immunity just to the weapon's type: slash, pierce, etc. If the weapon is elemental, the attacks are then also influenced by his opponent's res/susc/immunity to the element. For example, a fire elemental sword will do no damage to an enemy who is immune to fire, even if the enemy is susceptible to swords. Thus an elemental weapon can be stronger than a non- elemental weapon against appropriate foes, but it is a very specialized tool, and in most cases is actually weaker, since enemies tend to have more resistances than susceptibility.
Elemental armor is more likely to be damaged and scrapped by attacks from weapons of the opposite element, and less likely to be damaged and scrapped by attacks from weapons of the same element.
Additionally, fire elemental items can be instantly destroyed by the "frost breath" spell, and cold elemental items can be instantly destroyed by the "fire breath" spell. This depends upon the victim's saving spell vs. breath. Fire items, cold items, and acid items are immune to destruction from fire breath, frost breath, and acid breath, respectively.
DOWNLOAD THE ELEMENTAL ITEMS SNIPPET