Unify "You are rooted" message

This commit is contained in:
Pasi Kallinen
2015-04-22 08:35:14 +03:00
parent 0bef94cfde
commit 2783157f95
3 changed files with 18 additions and 14 deletions

View File

@@ -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;
}