summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-11 20:56:55 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-11 20:56:55 +0000
commite9e1be789c12cdbaaaeb048251dae0dc22a320ba (patch)
treef62f547aba1d78f1bcbf4b6d09b5c9a1bbc2913b /crawl-ref/source/spl-cast.cc
parent4c51cdab684e245dd8f050171294dcbc5c471bfe (diff)
downloadcrawl-ref-e9e1be789c12cdbaaaeb048251dae0dc22a320ba.tar.gz
crawl-ref-e9e1be789c12cdbaaaeb048251dae0dc22a320ba.zip
Give Lugonu Banishment and Corruption. I've left the old Bend Space in, because
there needs to be an invocation that can train Invocations, and Banishment is too costly to use for everyday training. Corruption is still a first-cut, needs more work and playtesting: - Terrain modification is one-time only. Creeping modification requires too much savegame magic. - The monsters gated in during the corruption effect are occasionally hostile, but mostly neutral. Neutrals will attack hostile monsters and also pets, but will leave other neutrals and the player alone (in general). A neutral that wants to go somewhere, but finds the player in the way will still take a swing at the player. - Beams are still not fixed to handle neutrals correctly (so neutrals do not target and shoot right yet), will fix soon. Breaks save compatibility. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1990 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 25526ceb58..f05b6712b1 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -229,7 +229,7 @@ int list_spells()
}
}
-static int apply_vehumet_wizardry_boost(spell_type spell, int chance)
+static int apply_spellcasting_success_boosts(spell_type spell, int chance)
{
int wizardry = player_mag_abil(false);
int fail_reduce = 100;
@@ -254,6 +254,10 @@ static int apply_vehumet_wizardry_boost(spell_type spell, int chance)
wiz_factor += (100 - wiz_factor) / 3;
}
+ // Draconians get a boost to dragon-form.
+ if (spell == SPELL_DRAGON_FORM && player_genus(GENPC_DRACONIAN))
+ fail_reduce = fail_reduce * 70 / 100;
+
// Hard cap on fail rate reduction.
if (fail_reduce < 50)
fail_reduce = 50;
@@ -444,7 +448,7 @@ int spell_fail(spell_type spell)
}
// Apply the effects of Vehumet prayer and items of wizardry.
- chance2 = apply_vehumet_wizardry_boost(spell, chance2);
+ chance2 = apply_spellcasting_success_boosts(spell, chance2);
if (chance2 > 100)
chance2 = 100;