From b2785dc1f36e4f1dae161a3207ac25e083ba68b1 Mon Sep 17 00:00:00 2001 From: haranp Date: Fri, 13 Jul 2007 08:30:23 +0000 Subject: Cleaned up magic mapping: the test regarding whether you can magic map is done inside magic_mapping(), which now returns a bool success value. Functionally: this means that the randart magic mapping power can no longer map the Abyss or labyrinths, ditto Map card. We can change this part back if we want. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1851 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-cast.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/spl-cast.cc') diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index ab2d4d648f..9f62c54a46 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1242,16 +1242,17 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) break; case SPELL_MAGIC_MAPPING: - if ( (you.level_type == LEVEL_LABYRINTH && you.species != SP_MINOTAUR) - || you.level_type == LEVEL_ABYSS) - mpr("You feel momentarily disoriented."); - else if (you.level_type == LEVEL_PANDEMONIUM) + if (you.level_type == LEVEL_PANDEMONIUM) + { mpr("Your Earth magic cannot map Pandemonium."); + } else { - mpr( "You feel aware of your surroundings." ); powc = stepdown_value( powc, 10, 10, 40, 45 ); - magic_mapping( 5 + powc, 50 + random2avg( powc * 2, 2 ) ); + if ( magic_mapping( 5 + powc, 50 + random2avg( powc * 2, 2 ) ) ) + mpr( "You feel aware of your surroundings." ); + else + mpr("You feel momentarily disoriented."); } break; -- cgit v1.2.3-54-g00ecf