If the Weapon Value is null, then no attack is performed.
The sequences of an attack are:
- The Hit Probability is calculated and limited to [0; 30].
- If a random number ∈ [0; 31] is <= to the Hit Probability, then the Attacker hits the Target (there's always 1/32 chance to miss).
Initial Weapon Damage:
The Weapon Damage is calculated by adding two random numbers ∈ [0; Weapon Value]:
- Weapon Damage = Random (0, Weapon Value) + Random (0, Weapon Value)
If the Weapon Type is Sword or Dagger and a random number ∈ [0; 255] is < to the Hit Probability (maximum probability of 15/128), then if the Target Armor Value is:
- null, then a random number ∈ [0; 10] is added to the Weapon Damage (Message #1).
- > to 0, then the Target Armor Value will be avoided (null for this Attack) (Message #2).
If the Break Probability is verified, then the Weapon breaks (Message #5 and #6):
- The Weapon Value is set to 0 for a Sword, 2 for a Dagger.
- The Weapon is set to Not Poisoned.
- The Weapon Skill is kept.
The Weapon Damage is reduced by the Target Armor Value:
- Weapon Damage -= Target Armor Value
Weapon Poisoning (if the Weapon is Poisoned):
- If the Weapon Damage isn't null, then the Weapon Damage is increased by a random number ∈ [0; 8].
- If the Weapon is Temporary Poisoned, there's a probability of 1/3 that the Weapon Poisoned is unset.
The Weapon Damage is limited to [0, 31]. If the Weapon Damage is > to 0, then the Attacker has hurt the Target by the amount of the Weapon Damage, else the Target has absorbed all the damage.
The verbs associated to the amount of damage are: