Opened 8 years ago

Last modified 6 years ago

#726 confirmed change

Rationalize damage/effects simultaneously applied

Reported by: anonymous Owned by: magnate
Milestone: v4 Keywords: combat interesting
Cc:

Description

In the current code, there's no consistent rule when damage and effects are simultaneously applied to a character. Sometimes the effects are applied before the damage, sometimes they are applied after the damage. This leads to funny messages ("You die. You resist the effects!") and other incorrect behaviors.

There's a particular case that's especially critical: the applied effect reduces CON or XP (traps, nexus, nether, chaos...). In this case, applying the effect before the damage is much more dangerous than when applying the damage first since you apply damage to already reduced HP.

There are two ways to fix this: always apply the effect first (very dangerous for the character), or only apply the effect if the character survived the damage.

Change History (13)

comment:1 Changed 8 years ago by takkaria

  • Milestone changed from Triage to 3.2.0
  • Resolution set to fixed
  • Status changed from new to closed

This is related to Eddie's "adders add" thing.

comment:2 Changed 7 years ago by magnate

  • Keywords player added
  • Milestone changed from 3.2.0 to 3.1.0

Is this really fixed?

comment:3 Changed 7 years ago by takkaria

  • Milestone changed from 3.1.0 to Future
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 Changed 7 years ago by magnate

  • Status changed from reopened to confirmed

Still extant as of 3.2rc1 - we should definitely apply all effects after applying damage - much more efficient if the player dies ...

comment:5 Changed 7 years ago by magnate

  • Type changed from bug to change

comment:6 Changed 7 years ago by magnate

  • Keywords player,interesting added; player removed

comment:7 Changed 6 years ago by magnate

  • Keywords player interesting added; player,interesting removed
  • Milestone changed from Future to 3.3.0
  • Owner set to magnate
  • Status changed from confirmed to assigned

This actually forms part of my ranged refactor (#803), though I will need to check for melee blows as well.

comment:8 Changed 6 years ago by magnate

  • Keywords combat added; player removed
  • Summary changed from Rationalize damage/effects simultaneously applied to a character to Rationalize damage/effects simultaneously applied

We also need to do this for monsters. From Oook:

The Balance drake screams in pain.
The Balance drake dies.
The Balance drake flees in terror!

Though I think this may be a regression.

comment:9 Changed 6 years ago by magnate

  • Milestone changed from 3.3.0 to Future
  • Status changed from assigned to confirmed

Punting in accordance with new milestone policy (that any other milestone is only set once someone is actually working on the ticket).

comment:10 Changed 6 years ago by magnate

  • Milestone changed from Future to 3.3.0

http://angband.oook.cz/forum/showthread.php?t=4582. Fear and confusion seem to be the only issues.

comment:11 Changed 6 years ago by magnate

Fear and confusion may be the only issues for monsters, but stat_dec also prints messages after "You die."

comment:12 Changed 6 years ago by magnate

  • Milestone changed from 3.3.0 to 3.4.0

Postponing to 3.4: Gabe said something very sensible on Oook about needing a new message handler to ensure that this is solved permanently.

comment:13 Changed 6 years ago by magnate

  • Milestone changed from 3.4.0 to 4.0

Initial assignment to v4 per http://trac.rephial.org/roadmap

Note: See TracTickets for help on using tickets.