Moving a monster with telekinesis hurles it through the air

... and at the end of the flight, it can't avoid a trap, if it
lands on one.
This commit is contained in:
Pasi Kallinen
2022-02-24 19:27:56 +02:00
parent 9ae2ec1f98
commit 0c20bf116c
3 changed files with 9 additions and 3 deletions

View File

@@ -921,7 +921,7 @@ mhurtle_step(genericptr_t arg, int x, int y)
set_apparxy(mon);
if (is_waterwall(x, y))
return FALSE;
res = mintrap(mon, NO_TRAP_FLAGS); /* TODO: TEMPFLIGHT? */
res = mintrap(mon, HURTLING);
if (res == Trap_Killed_Mon
|| res == Trap_Caught_Mon
|| res == Trap_Moved_Mon)
@@ -1039,7 +1039,10 @@ mhurtle(struct monst *mon, int dx, int dy, int range)
cc.x = mon->mx + (dx * range);
cc.y = mon->my + (dy * range);
(void) walk_path(&mc, &cc, mhurtle_step, (genericptr_t) mon);
(void) minliquid(mon);
if (!DEADMONSTER(mon) && t_at(mon->mx, mon->my))
mintrap(mon, FORCEBUNGLE);
else
(void) minliquid(mon);
return;
}