Resistances

All your MAngband related technical questions answered. Problems compiling or running the game/server? No problem! Ask here.
Post Reply
TheHairyOne
Vorpal Bunny
Posts: 23
Joined: Thu 21.04.2016, 19:28

Resistances

Post by TheHairyOne » Mon 02.05.2016, 03:07

Found this while trying to track down where resistances are handled:

/* Resist the damage */
if (p_ptr->resist_acid) dam = (dam + 2) / 3;
if (p_ptr->oppose_acid) dam = (dam + 2) / 3;

It looks as if resist_acid and oppose_acid do the exact same thing. Why two different flags for this? Is the oppose the spell resistance?

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: Resistances

Post by PowerWyrm » Mon 02.05.2016, 11:26

"resist" is the permanent resist from objects. "oppose" is the temporary resist from spells.

TheHairyOne
Vorpal Bunny
Posts: 23
Joined: Thu 21.04.2016, 19:28

Re: Resistances

Post by TheHairyOne » Mon 02.05.2016, 12:59

Is there code to handle each damage type or is there a generic code block that handles all resists....and where are these things checked? I need to find the code for resistances as well as the resist display that pops up when you "C" to view your character.

Post Reply