Unify "You are rooted" message
This commit is contained in:
@@ -782,6 +782,7 @@ E boolean FDECL(bad_rock, (struct permonst *,XCHAR_P,XCHAR_P));
|
||||
E int FDECL(cant_squeeze_thru, (struct monst *));
|
||||
E boolean FDECL(invocation_pos, (XCHAR_P,XCHAR_P));
|
||||
E boolean FDECL(test_move, (int, int, int, int, int));
|
||||
E boolean NDECL(u_rooted);
|
||||
E void NDECL(domove);
|
||||
E boolean NDECL(overexertion);
|
||||
E void NDECL(invocation_message);
|
||||
|
||||
8
src/do.c
8
src/do.c
@@ -840,13 +840,7 @@ dodown()
|
||||
(u.ux == sstairs.sx && u.uy == sstairs.sy && !sstairs.up)),
|
||||
ladder_down = (u.ux == xdnladder && u.uy == ydnladder);
|
||||
|
||||
if(!youmonst.data->mmove) {
|
||||
You("are rooted %s.",
|
||||
Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) ?
|
||||
"in place" : "to the ground");
|
||||
nomul(0);
|
||||
return 1;
|
||||
}
|
||||
if (u_rooted()) return 1;
|
||||
|
||||
if (stucksteed(TRUE)) {
|
||||
return 0;
|
||||
|
||||
23
src/hack.c
23
src/hack.c
@@ -1111,6 +1111,19 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
boolean
|
||||
u_rooted()
|
||||
{
|
||||
if(!youmonst.data->mmove) {
|
||||
You("are rooted %s.",
|
||||
Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) ?
|
||||
"in place" : "to the ground");
|
||||
nomul(0);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
domove()
|
||||
{
|
||||
@@ -1414,13 +1427,9 @@ domove()
|
||||
nomul(0);
|
||||
return;
|
||||
}
|
||||
if(!youmonst.data->mmove) {
|
||||
You("are rooted %s.",
|
||||
Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) ?
|
||||
"in place" : "to the ground");
|
||||
nomul(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (u_rooted()) return;
|
||||
|
||||
if(u.utrap) {
|
||||
if (!trapmove(x, y, trap)) return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user