From c1752a109ffb7604ba6b3bbc3de8818b2f139435 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 28 Apr 2008 14:58:06 +0000 Subject: Change banishment in two ways: * the Banishment spell doesn't work on the player anymore * Lugonu's Exit Abyss has no permanent hp/mp cost, but Enter Abyss has Instead, Exit Abyss now costs 1 (normal) MP and some more food. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4744 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/abl-show.cc | 46 ++++++++++++++++---------------- crawl-ref/source/beam.cc | 7 ++++- crawl-ref/source/dat/descript/spells.txt | 2 +- crawl-ref/source/religion.cc | 4 +-- crawl-ref/source/spl-cast.cc | 10 ++++--- 5 files changed, 38 insertions(+), 31 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index d4f61dc218..aafc185d92 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -287,14 +287,14 @@ static const ability_def Ability_List[] = ABFLAG_CONF_OK }, // Lugonu - { ABIL_LUGONU_ABYSS_EXIT, "Depart the Abyss", 0, 0, 100, 10, ABFLAG_PAIN }, + { ABIL_LUGONU_ABYSS_EXIT, "Depart the Abyss", 1, 0, 150, 10, ABFLAG_NONE }, { ABIL_LUGONU_BEND_SPACE, "Bend Space", 1, 0, 50, 0, ABFLAG_PAIN }, { ABIL_LUGONU_BANISH, "Banish", 4, 0, 200, generic_cost::range(3, 4), ABFLAG_NONE }, { ABIL_LUGONU_CORRUPT, "Corrupt", 7, 5, 500, generic_cost::range(10, 14), ABFLAG_NONE }, { ABIL_LUGONU_ABYSS_ENTER, "Enter the Abyss", - 9, 0, 500, generic_cost::fixed(35), ABFLAG_NONE }, + 9, 0, 500, generic_cost::fixed(35), ABFLAG_PAIN }, // Nemelex { ABIL_NEMELEX_DRAW_ONE, "Draw One", 2, 0, 0, 0, ABFLAG_NONE }, @@ -1677,7 +1677,6 @@ static bool _do_ability(const ability_def& abil) break; case ABIL_LUGONU_ABYSS_EXIT: - { if ( you.level_type != LEVEL_ABYSS ) { mpr("You aren't in the Abyss!"); @@ -1685,25 +1684,7 @@ static bool _do_ability(const ability_def& abil) } banished(DNGN_EXIT_ABYSS); exercise(SK_INVOCATIONS, 8 + random2(10)); - - const int maxloss = std::max(2, div_rand_round(you.hp_max, 30)); - // Lose permanent HP - you.hp_max -= random_range(1, maxloss); - - // Paranoia. - if (you.hp_max < 1) - you.hp_max = 1; - - // Deflate HP - set_hp( 1 + random2(you.hp), false ); - - // Lose 1d2 permanent MP - rot_mp(coinflip() ? 2 : 1); - // Deflate MP - if (you.magic_points) - set_mp(random2(you.magic_points), false); break; - } case ABIL_LUGONU_BEND_SPACE: _lugonu_bends_space(); @@ -1711,7 +1692,7 @@ static bool _do_ability(const ability_def& abil) break; case ABIL_LUGONU_BANISH: - if ( !spell_direction(spd, beam, DIR_NONE, TARG_ENEMY) ) + if (!spell_direction(spd, beam, DIR_NONE, TARG_ENEMY)) return (false); if (beam.target_x == you.x_pos && beam.target_y == you.y_pos) { @@ -1729,6 +1710,7 @@ static bool _do_ability(const ability_def& abil) break; case ABIL_LUGONU_ABYSS_ENTER: + { if (you.level_type == LEVEL_ABYSS) { mpr("You're already here."); @@ -1740,11 +1722,29 @@ static bool _do_ability(const ability_def& abil) return false; } + // Move permanent hp/mp loss from leaving to entering the Abyss. (jpeg) + const int maxloss = std::max(2, div_rand_round(you.hp_max, 30)); + // Lose permanent HP + you.hp_max -= random_range(1, maxloss); + + // Paranoia. + if (you.hp_max < 1) + you.hp_max = 1; + + // Deflate HP + set_hp( 1 + random2(you.hp), false ); + + // Lose 1d2 permanent MP + rot_mp(coinflip() ? 2 : 1); + // Deflate MP + if (you.magic_points) + set_mp(random2(you.magic_points), false); + activate_notes(false); // this banishment shouldn't be noted banished(DNGN_ENTER_ABYSS); activate_notes(true); break; - + } case ABIL_NEMELEX_DRAW_ONE: if ( !choose_deck_and_draw() ) return false; diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 69db2e76e9..6244ecea12 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3263,7 +3263,7 @@ static int _affect_player( bolt &beam, item_def *item ) && beam.flavour != BEAM_HEALING && beam.flavour != BEAM_POLYMORPH && beam.flavour != BEAM_DISPEL_UNDEAD - && ((beam.flavour != BEAM_TELEPORT && beam.flavour != BEAM_BANISH) + && (beam.flavour != BEAM_TELEPORT && beam.flavour != BEAM_BANISH || !beam.aimed_at_feet) && you_resist_magic( beam.ench_power )) { @@ -3389,6 +3389,11 @@ static int _affect_player( bolt &beam, item_def *item ) break; // enslavement - confusion? case BEAM_BANISH: + if (YOU_KILL(beam.thrower)) + { + mpr("This spell isn't strong enough to banish yourself."); + break; + } if (you.level_type == LEVEL_ABYSS) { mpr("You feel trapped."); diff --git a/crawl-ref/source/dat/descript/spells.txt b/crawl-ref/source/dat/descript/spells.txt index f9fe44c354..cc39726a80 100644 --- a/crawl-ref/source/dat/descript/spells.txt +++ b/crawl-ref/source/dat/descript/spells.txt @@ -41,7 +41,7 @@ This spell zaps at random a nearby creature with a powerful electrical current. %%%% Banishment -This spell banishes one creature to the Abyss. Those wishing to visit that unpleasant place in person may always banish themselves. +This spell banishes one creature to the Abyss. This magic cannot be used to relocate the caster. %%%% Bend diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 189989a48b..88b37366ab 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -270,11 +270,11 @@ const char* god_gain_power_messages[NUM_GODS][MAX_GOD_ABILITIES] = "call upon Elyvilon to restore your abilities", "call upon Elyvilon for incredible healing" }, // Lugonu - { "depart the Abyss - at a permanent cost", + { "depart the Abyss", "bend space around yourself", "banish your foes", "corrupt the fabric of space", - "gate yourself to the Abyss" }, + "gate yourself to the Abyss - for a price" }, // Beogh { "Beogh supports the use of orcish gear.", "smite your foes", diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index b0de9c70ef..039a13cfd8 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -828,11 +828,8 @@ static void _spellcasting_side_effects(spell_type spell, bool idonly = false) did_god_conduct( DID_SPELL_NONUTILITY, 10 + spell_difficulty(spell) ); // Self-banishment gets a special exemption - you're there to spread light - if (_spell_is_unholy(spell) - && (spell != SPELL_BANISHMENT || !you.banished)) - { + if (_spell_is_unholy(spell) && !you.banished) did_god_conduct( DID_UNHOLY, 10 + spell_difficulty(spell) ); - } // Linley says: Condensation Shield needs some disadvantages to keep // it from being a no-brainer... this isn't much, but its a start -- bwr @@ -1529,6 +1526,11 @@ spret_type your_spells( spell_type spell, int powc, bool allow_fail ) break; case SPELL_BANISHMENT: + if (beam.target_x == you.x_pos && beam.target_y == you.y_pos) + { + mpr("You cannot banish yourself!"); + break; + } zapping(ZAP_BANISHMENT, powc, beam); break; -- cgit v1.2.3-54-g00ecf