Half_physical_damage 2

Another batch of missing Half_physical_damage checks
from the list provided by <Someone>:
- Scrolls of fire (!confused)
- Broken wands
- Splattered burning oil from thrown potion
- Dipping a lit lamp into a potion of oil
- Scrolls of fire (confused, didn't bother with non-confused)
- Being caught in a fireball

Adds a macro Maybe_Half_Phys to assist.
This commit is contained in:
nethack.allison
2003-10-21 16:47:59 +00:00
parent 6c63831645
commit 47e1a6873a
5 changed files with 28 additions and 10 deletions

View File

@@ -146,6 +146,13 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
/* special mhpmax value when loading bones monster to flag as extinct or genocided */
#define DEFUNCT_MONSTER (-100)
/* macro form of adjustments of physical damage based on Half_physical_damage.
* Can be used on-the-fly with the 1st parameter to losehp() if you don't
* need to retain the dmg value beyond that call scope.
* Take care to ensure it doesn't get used more than once in other instances.
*/
#define Maybe_Half_Phys(dmg) ((Half_physical_damage) ? (((dmg) + 1) / 2) : (dmg))
/* flags for special ggetobj status returns */
#define ALL_FINISHED 0x01 /* called routine already finished the job */