Calling rehumanize directly when u.mh > 0 doesn't consider Unchanging
(perhaps it should?). But, it's probably better to call losehp anyway.
Also, part of a buglist item: .5PD didn't affect rust trap damage on iron golem
prevent boulder option from accepting a symbol that matches a monster symbol
traveling while standing on a trap would sometime step in the wrong direction
avoid traveling into water/lava, using usual running rules
+unchanging iron golem would still rehumanize in a rust trap
Platform- and/or Interface-Specific Fixes
case RUST_TRAP:
seetrap(trap);
if (u.umonnum == PM_IRON_GOLEM) {
+ int dam = u.mhmax;
+
pline("%s you!", A_gush_of_water_hits);
You("are covered with rust!");
- rehumanize();
+ if (Half_physical_damage) dam = (dam+1) / 2;
+ losehp(dam, "rusting away", KILLED_BY);
break;
} else if (u.umonnum == PM_GREMLIN && rn2(3)) {
pline("%s you!", A_gush_of_water_hits);