fix #H4296 - grease no checked for passive damage

Hitting a rust monster with a greased weapon would rust the weapon
instead of removing the grease.  Likewise for monsters with passive
acid or corrosion damage.  passive_obj() was ignoring grease.
This commit is contained in:
PatR
2016-04-09 18:51:28 -07:00
parent 43c7a4b312
commit 65b9429b60
2 changed files with 5 additions and 3 deletions

View File

@@ -201,6 +201,8 @@ tweak Baalzebub's lair and clean up the map display for it
symbol set definitions didn't recognize S_darkroom and S_vibrating_square
wizard mode enlightenment was reporting "very fast innately" (which is not
possible) for very fast hero who was innately fast
when attacking a monster with a rust or corrosion or acid passive
counter-attack, grease wasn't protecting the attacker's weapon
post-3.6.0: fix "object lost" panic during pickup caused by sortloot revamp
post-3.6.0: more sortloot revisions

View File

@@ -2550,17 +2550,17 @@ struct attack *mattk; /* null means we find one internally */
break;
case AD_ACID:
if (!rn2(6)) {
(void) erode_obj(obj, NULL, ERODE_CORRODE, EF_NONE);
(void) erode_obj(obj, NULL, ERODE_CORRODE, EF_GREASE);
}
break;
case AD_RUST:
if (!mon->mcan) {
(void) erode_obj(obj, NULL, ERODE_RUST, EF_NONE);
(void) erode_obj(obj, (char *) 0, ERODE_RUST, EF_GREASE);
}
break;
case AD_CORR:
if (!mon->mcan) {
(void) erode_obj(obj, NULL, ERODE_CORRODE, EF_NONE);
(void) erode_obj(obj, (char *) 0, ERODE_CORRODE, EF_GREASE);
}
break;
case AD_ENCH: