Attacking with a weapon
Combat · Hit rolls · Damage to a monster · Character timers
In brief
A character attacks by using the item in one of its two hands. A melee weapon strikes the nearest monster ahead, but only from the first two slots of the party; a thrown weapon or a launcher sends an object flying instead. The result appears on the character's portrait, and the hand then rests: it can be used again 54 ticks after the attack, or 27 under Haste. A tick lasts about 55 ms; see the game clock.
Using a weapon
When the player uses the item in a character's hand (slot 0 or 1):1
- An invisible character
(
SPELL_EFFECT_INVISIBILITY) becomes visible. - The item's kind, given by its
item type, decides the attack: a
melee weapon (
ITEM_KIND_MELEE) strikes, while a thrown weapon (ITEM_KIND_THROWN) or a launcher (ITEM_KIND_LAUNCHER) launches a flying object, which flies and lands as described in throwing and launching items. Only a melee blow can deal damage at this step. - A melee blow is possible only for the first two characters of the party,
on the nearest monster ahead; the others get CAN'T REACH, see
formation. A monster turned to stone crumbles at
once ("The monster crumbles to dust!") and counts as killed by the party.
Otherwise the hit roll decides, and
a hit deals damage as weapon damage
(
MONSTER_DAMAGE_WEAPON), also as magic damage (MONSTER_DAMAGE_MAGIC) for a conjured weapon, with no saving throw (SCRIPT_SAVING_THROW_NONE). - When the blow deals damage, an item that drains hit points
(
ITEM_RUNTIME_DRAINS_HIT_POINTS) gives the character as many hit points as it dealt, even above the maximum, and an item that vanishes after a hit (ITEM_RUNTIME_VANISHES_AFTER_HIT) leaves the hand. The monster then loses the full damage, with experience for the party if it dies. - The hand is marked as used and the result is shown on the portrait. The hand then rests, as described below.
When the hand is ready again
Two character timers follow each use of a
hand. The first clears the result from the portrait after 18 ticks. The
second then frees the hand 36 ticks later, or 9 ticks later when the
character is hasted
(SPELL_EFFECT_HASTE). After a CAN'T
REACH, NO AMMO or BASH result, the first timer frees the hand itself. A
spell cast from the spell book makes the book unusable for 72 ticks.
Sources
Locations refer to the game executable reference; comparative sources are listed in the technical references. The timer durations are listed with their sources under character timers.