fix #H2645 - invulnerability during prayer is vulernable to stinking cloud
From a bug report, stinking cloud
harms hero even when u.uninvulnerable is set during successful prayer.
This makes the cloud harmless during prayer as he suggested.
It also makes being inside a stinking cloud become a major trouble
that prayer can fix. (With magical breathing such a cloud is harmless and
with poison resistance it is just a nuisance; it won't be considered to be
trouble in such cases.) The fix is to clear away the cloud, or to teleport
the hero if he's inside multiple overlapping clouds or in one that is
marked as permanent (which I think isn't currently possible).
This commit is contained in:
20
src/pray.c
20
src/pray.c
@@ -69,12 +69,13 @@ static int p_type; /* (-1)-3: (-1)=really naughty, 3=really good */
|
||||
* order to have the values be meaningful.
|
||||
*/
|
||||
|
||||
#define TROUBLE_STONED 13
|
||||
#define TROUBLE_SLIMED 12
|
||||
#define TROUBLE_STRANGLED 11
|
||||
#define TROUBLE_LAVA 10
|
||||
#define TROUBLE_SICK 9
|
||||
#define TROUBLE_STARVING 8
|
||||
#define TROUBLE_STONED 14
|
||||
#define TROUBLE_SLIMED 13
|
||||
#define TROUBLE_STRANGLED 12
|
||||
#define TROUBLE_LAVA 11
|
||||
#define TROUBLE_SICK 10
|
||||
#define TROUBLE_STARVING 9
|
||||
#define TROUBLE_REGION 8 /* stinking cloud */
|
||||
#define TROUBLE_HIT 7
|
||||
#define TROUBLE_LYCANTHROPE 6
|
||||
#define TROUBLE_COLLAPSING 5
|
||||
@@ -168,6 +169,7 @@ in_trouble()
|
||||
if(u.utrap && u.utraptype == TT_LAVA) return(TROUBLE_LAVA);
|
||||
if(Sick) return(TROUBLE_SICK);
|
||||
if(u.uhs >= WEAK) return(TROUBLE_STARVING);
|
||||
if (region_danger()) return TROUBLE_REGION;
|
||||
if (critically_low_hp(FALSE)) return TROUBLE_HIT;
|
||||
if(u.ulycn >= LOW_PM) return(TROUBLE_LYCANTHROPE);
|
||||
if(near_capacity() >= EXT_ENCUMBER && AMAX(A_STR)-ABASE(A_STR) > 3)
|
||||
@@ -200,7 +202,7 @@ in_trouble()
|
||||
/*
|
||||
* minor troubles
|
||||
*/
|
||||
if(Punished || (u.utrap && u.utraptype == TT_BURIEDBALL))
|
||||
if (Punished || (u.utrap && u.utraptype == TT_BURIEDBALL))
|
||||
return(TROUBLE_PUNISHED);
|
||||
if (Cursed_obj(uarmg, GAUNTLETS_OF_FUMBLING) ||
|
||||
Cursed_obj(uarmf, FUMBLE_BOOTS))
|
||||
@@ -336,6 +338,10 @@ register int trouble;
|
||||
You_feel("better.");
|
||||
make_sick(0L, (char *) 0, FALSE, SICK_ALL);
|
||||
break;
|
||||
case TROUBLE_REGION:
|
||||
/* stinking cloud, with hero vulnerable to HP loss */
|
||||
region_safety();
|
||||
break;
|
||||
case TROUBLE_HIT:
|
||||
/* "fix all troubles" will keep trying if hero has
|
||||
5 or less hit points, so make sure they're always
|
||||
|
||||
Reference in New Issue
Block a user