diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-15 12:15:52 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-15 12:15:52 +0000 |
commit | d3c9ed21e760065a2faad5b371efdccf5fdace78 (patch) | |
tree | 6fa6a8fdd9516b3ab5c655d3490561033aa580a6 /crawl-ref/source/spells1.cc | |
parent | 4d8f70826f5165f0098e427e8ccc35cf4d164693 (diff) | |
download | crawl-ref-d3c9ed21e760065a2faad5b371efdccf5fdace78.tar.gz crawl-ref-d3c9ed21e760065a2faad5b371efdccf5fdace78.zip |
Drop Control Teleport and Controlled Blink by one spell level each.
[1750729] Controlled Blink (the spell) now decays to semi-controlled blink on
levels that block teleport control and is less likely to be blocked by the
Abyss.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1873 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r-- | crawl-ref/source/spells1.cc | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index d850fe9692..85107a9165 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -47,20 +47,33 @@ #include "stuff.h" #include "view.h" -int blink(void) +static bool abyss_blocks_teleport(bool cblink) { - struct dist beam; + // Lugonu worshippers get their perks. + if (you.religion == GOD_LUGONU) + return (false); + + // Controlled Blink (the spell) works quite reliably in the Abyss. + return (cblink? one_chance_in(3) : !one_chance_in(3)); +} + +int blink(int pow, bool high_level_controlled_blink) +{ + dist beam; // yes, there is a logic to this ordering {dlb}: if (scan_randarts(RAP_PREVENT_TELEPORTATION)) mpr("You feel a weird sense of stasis."); - else if (you.level_type == LEVEL_ABYSS && !one_chance_in(3)) + else if (you.level_type == LEVEL_ABYSS + && abyss_blocks_teleport(high_level_controlled_blink)) mpr("The power of the Abyss keeps you in your place!"); else if (you.duration[DUR_CONF]) random_blink(false); else if (!allow_control_teleport(true)) { mpr("A powerful magic interferes with your control of the blink."); + if (high_level_controlled_blink) + return (cast_semi_controlled_blink(pow)); random_blink(false); } else |