Make trap return values more consistent

Instead of returning monster's mtrapped-state, return specific
trap return values.
Add one extra trap return value, for when a monster was
moved by the trap.
This commit is contained in:
Pasi Kallinen
2022-02-24 16:23:56 +02:00
parent 547f6e9244
commit 9716f22851
6 changed files with 49 additions and 38 deletions

View File

@@ -922,7 +922,9 @@ mhurtle_step(genericptr_t arg, int x, int y)
if (is_waterwall(x, y))
return FALSE;
res = mintrap(mon);
if (res == Trap_Killed_Mon || res == Trap_Caught_Mon)
if (res == Trap_Killed_Mon
|| res == Trap_Caught_Mon
|| res == Trap_Moved_Mon)
return FALSE;
return TRUE;
}