summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-18 22:22:59 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-18 22:22:59 +0000
commita0946957cc584681cae95fa525b0a965893b1404 (patch)
tree9a3c6273fc77164d0c605566c3bd5ad9d8464586 /crawl-ref/source
parent48e04ad11d08017601106277ecd345fc2f53d7d4 (diff)
downloadcrawl-ref-a0946957cc584681cae95fa525b0a965893b1404.tar.gz
crawl-ref-a0946957cc584681cae95fa525b0a965893b1404.zip
Fix invisible monsters being described to "burst forth from the water"
if there's no water nearby. (BR 1994574) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5965 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/abl-show.cc46
-rw-r--r--crawl-ref/source/describe.cc3
-rw-r--r--crawl-ref/source/mon-util.cc5
3 files changed, 30 insertions, 24 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 12e09d2be3..478685394d 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -1682,13 +1682,13 @@ static bool _do_ability(const ability_def& abil)
break;
case ABIL_ELYVILON_DESTROY_WEAPONS:
- if ( !ely_destroy_weapons() )
- return false;
+ if (!ely_destroy_weapons())
+ return (false);
break;
case ABIL_ELYVILON_LESSER_HEALING:
if (!cast_healing( 3 + (you.skills[SK_INVOCATIONS] / 6) ))
- return false;
+ return (false);
exercise( SK_INVOCATIONS, 1 );
break;
@@ -1700,7 +1700,7 @@ static bool _do_ability(const ability_def& abil)
case ABIL_ELYVILON_HEALING:
if (!cast_healing( 10 + (you.skills[SK_INVOCATIONS] / 3) ))
- return false;
+ return (false);
exercise( SK_INVOCATIONS, 3 + random2(5) );
break;
@@ -1714,7 +1714,7 @@ static bool _do_ability(const ability_def& abil)
case ABIL_ELYVILON_GREATER_HEALING:
if (!cast_healing( 20 + you.skills[SK_INVOCATIONS] * 2 ))
- return false;
+ return (false);
exercise( SK_INVOCATIONS, 6 + random2(10) );
break;
@@ -1723,7 +1723,7 @@ static bool _do_ability(const ability_def& abil)
if ( you.level_type != LEVEL_ABYSS )
{
mpr("You aren't in the Abyss!");
- return false; // don't incur costs
+ return (false); // Don't incur costs.
}
banished(DNGN_EXIT_ABYSS);
exercise(SK_INVOCATIONS, 8 + random2(10));
@@ -1762,12 +1762,12 @@ static bool _do_ability(const ability_def& abil)
if (you.level_type == LEVEL_ABYSS)
{
mpr("You're already here.");
- return false;
+ return (false);
}
else if (you.level_type == LEVEL_PANDEMONIUM)
{
mpr("That doesn't work from Pandemonium.");
- return false;
+ return (false);
}
// Move permanent hp/mp loss from leaving to entering the Abyss. (jpeg)
@@ -1779,56 +1779,58 @@ static bool _do_ability(const ability_def& abil)
if (you.hp_max < 1)
you.hp_max = 1;
- // Deflate HP
+ // Deflate HP.
set_hp( 1 + random2(you.hp), false );
- // Lose 1d2 permanent MP
+ // Lose 1d2 permanent MP.
rot_mp(coinflip() ? 2 : 1);
- // Deflate MP
+ // Deflate MP.
if (you.magic_points)
set_mp(random2(you.magic_points), false);
bool note_status = notes_are_active();
- activate_notes(false); // this banishment shouldn't be noted
+ activate_notes(false); // This banishment shouldn't be noted.
banished(DNGN_ENTER_ABYSS);
activate_notes(note_status);
break;
}
case ABIL_NEMELEX_DRAW_ONE:
- if ( !choose_deck_and_draw() )
- return false;
+ if (!choose_deck_and_draw())
+ return (false);
exercise(SK_EVOCATIONS, 1 + random2(2));
break;
case ABIL_NEMELEX_PEEK_TWO:
- if ( !deck_peek() )
- return false;
+ if (!deck_peek())
+ return (false);
exercise(SK_EVOCATIONS, 2 + random2(2));
break;
case ABIL_NEMELEX_TRIPLE_DRAW:
- if ( !deck_triple_draw() )
- return false;
+ if (!deck_triple_draw())
+ return (false);
exercise(SK_EVOCATIONS, 3 + random2(3));
break;
case ABIL_NEMELEX_MARK_FOUR:
- if ( !deck_mark() )
- return false;
+ if (!deck_mark())
+ return (false);
exercise(SK_EVOCATIONS, 4 + random2(4));
break;
case ABIL_NEMELEX_STACK_FIVE:
- if ( !deck_stack() )
- return false;
+ if (!deck_stack())
+ return (false);
exercise(SK_EVOCATIONS, 5 + random2(5));
break;
case ABIL_BEOGH_SMITING:
if (your_spells( SPELL_SMITING, (2 + skill_bump(SK_INVOCATIONS)) * 6,
false ) == SPRET_ABORT)
+ {
return (false);
+ }
exercise( SK_INVOCATIONS, (coinflip()? 3 : 2) );
break;
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index f686a3e04b..b59539e48d 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2941,7 +2941,8 @@ void describe_god( god_type which_god, bool give_title )
buf << "You can call upon " << god_name(which_god)
<< " to burn books in your surroundings.";
const int spacesleft = 79 - buf.str().length();
- const std::string cost = "(Food)";
+ const std::string cost = "(" + make_cost_description(
+ ABIL_TROG_BURN_BOOKS) + ")";
buf << std::setw(spacesleft) << cost;
cprintf("%s" EOL, buf.str().c_str());
}
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index cae6179118..57e71996b2 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -5296,8 +5296,10 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet)
}
if (you.pos() == this->pos())
+ {
mprf(MSGCH_ERROR, "%s is on the same square as you!",
name(DESC_CAP_A).c_str());
+ }
if (you.can_see(this))
{
@@ -5331,7 +5333,8 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet)
}
}
}
- else if (mons_near(this) && monster_habitable_grid(this, DNGN_FLOOR))
+ else if (mons_near(this)
+ && grid_compatible(grd[this->x][this->y], DNGN_DEEP_WATER))
{
mpr("Something invisible bursts forth from the water.");
interrupt_activity( AI_FORCE_INTERRUPT );