Attack styles

The attack styles are the different ways in which a player or NPC may attack another player, another NPC, or a piece of that can be attacked. The five styles are stab, slash, crush, magic, and ranged. Equipment gives players attack bonuses towards and defence bonuses against each of the attack styles.

The bonuses
The following are detailed descriptions of the attack bonuses:
 * Stab: Stab is used primarily by daggers, swords and spears, and is used as a secondary attack by longswords, maces, halberds and scimitars. It is most effective against enemies wearing chainmail armour and leather armour.


 * Slash: Weapons that use slash as a primary attack style are longswords, scimitars, two-handed swords, battleaxes, and halberds; swords and daggers also use slash as a secondary attack style. Slash is best used against opponents wearing cloth- or leather-based armour, or opponents with no armour at all.


 * Crush: Crush is the primary attack style when wielding maces, warhammers, and maul-class weapons, and is used secondarily by two-handed swords and battleaxes. It is also the only attack style that can be used when fighting unarmed. Crush works best against platemail.


 * Magic: The magic attack style can only be used when casting offensive spells, and is the only style that can be selected while doing so. The maximum hit of any magic spell is determined by the spell itself, and the accuracy of the spell is determined by the caster's magic attack bonus.


 * Ranged: Increases the odds that a ranged attack will deal damage. (Does not affect maximum hit.)

Formula
The formula for probability of landing an attack is currently unknown. The following formula gives only an estimate of the actual probability of hitting, with results above 1 rounded down. The constant A is unknown, but is most likely below 1.

$$A \cdot \frac {\text{Attack Bonus} \cdot \text{Current Attack Level}}{\text{Defence Bonus} \cdot \text{Current Defence Level}}$$