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

@@ -2138,16 +2138,16 @@ domove_core(void)
has_mgivenname(mtmp) ? SUPPRESS_SADDLE : 0, FALSE));
/* check for displacing it into pools and traps */
switch (minliquid(mtmp) ? 2 : mintrap(mtmp)) {
case 0:
switch (minliquid(mtmp) ? Trap_Killed_Mon : mintrap(mtmp)) {
case Trap_Effect_Finished:
break;
case 1: /* trapped */
case 3: /* changed levels */
case Trap_Caught_Mon: /* trapped */
case Trap_Moved_Mon: /* changed levels */
/* there's already been a trap message, reinforce it */
abuse_dog(mtmp);
adjalign(-3);
break;
case 2:
case Trap_Killed_Mon:
/* drowned or died...
* you killed your pet by direct action, so get experience
* and possibly penalties;