fix(rules): Up Close and Deadly deed requires a firearm attack (Ultimate Combat)
This commit is contained in:
@@ -3096,13 +3096,21 @@ class CombatEngine:
|
||||
) -> int:
|
||||
"""Consume the Up Close and Deadly deed on the first attack resolved.
|
||||
|
||||
The deed applies +1d6 to a ranged attack within 30 ft; the flag is
|
||||
reset after the first attack in all cases (the benefit is lost if the
|
||||
attack is out of range or not ranged).
|
||||
The deed applies +1d6 to a FIREARM attack that hits a target within
|
||||
30 ft (Ultimate Combat "Deeds - Up Close and Deadly": "makes a
|
||||
successful attack with a firearm against a target within 30 feet");
|
||||
the flag is reset after the first attack in all cases (the benefit is
|
||||
lost if the attack misses, is not a firearm, is out of range or is
|
||||
not ranged at all).
|
||||
"""
|
||||
if not attacker.deed_up_close_and_deadly:
|
||||
return damage
|
||||
if hit and self._is_ranged_attack(weapon) and dist_ft <= _UP_CLOSE_RANGE_FT:
|
||||
if (
|
||||
hit
|
||||
and weapon.firearm
|
||||
and self._is_ranged_attack(weapon)
|
||||
and dist_ft <= _UP_CLOSE_RANGE_FT
|
||||
):
|
||||
bonus = self._rng.roll_die(6)
|
||||
damage += bonus
|
||||
target.hp -= bonus
|
||||
|
||||
Reference in New Issue
Block a user