summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-28 14:58:06 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-28 14:58:06 +0000
commitc1752a109ffb7604ba6b3bbc3de8818b2f139435 (patch)
tree901d1414cc9d0c7ceab45e82786ea04db20b254c /crawl-ref
parente7d8d22f478e852fed18f3cb2d783c7a4c7ceb3b (diff)
downloadcrawl-ref-c1752a109ffb7604ba6b3bbc3de8818b2f139435.tar.gz
crawl-ref-c1752a109ffb7604ba6b3bbc3de8818b2f139435.zip
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
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/abl-show.cc46
-rw-r--r--crawl-ref/source/beam.cc7
-rw-r--r--crawl-ref/source/dat/descript/spells.txt2
-rw-r--r--crawl-ref/source/religion.cc4
-rw-r--r--crawl-ref/source/spl-cast.cc10
5 files changed, 38 insertions, 31 deletions
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;