Factor out a new is_moat function.
The fact that Juiblex's swamp is MOAT but not moat is weird and should probably be looked at at some point.
This commit is contained in:
@@ -4017,7 +4017,7 @@ short exploding_wand_typ;
|
||||
case ZT_COLD:
|
||||
if (is_pool(x,y) || is_lava(x,y)) {
|
||||
boolean lava = is_lava(x,y);
|
||||
const char *moat = waterbody_name(x, y);
|
||||
boolean moat = is_moat(x,y);
|
||||
|
||||
if (lev->typ == WATER) {
|
||||
/* For now, don't let WATER freeze. */
|
||||
@@ -4041,8 +4041,9 @@ short exploding_wand_typ;
|
||||
if (see_it) {
|
||||
if(lava)
|
||||
Norep("The lava cools and solidifies.");
|
||||
else if(strcmp(moat, "moat") == 0)
|
||||
Norep("The %s is bridged with ice!", moat);
|
||||
else if(moat)
|
||||
Norep("The %s is bridged with ice!",
|
||||
waterbody_name(x,y));
|
||||
else
|
||||
Norep("The water freezes.");
|
||||
newsym(x,y);
|
||||
|
||||
Reference in New Issue
Block a user