Page 1 of 1

Resistances

Posted: Mon 02.05.2016, 03:07
by TheHairyOne
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?

Re: Resistances

Posted: Mon 02.05.2016, 11:26
by PowerWyrm
"resist" is the permanent resist from objects. "oppose" is the temporary resist from spells.

Re: Resistances

Posted: Mon 02.05.2016, 12:59
by TheHairyOne
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.