summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-book.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2010-01-02 15:07:16 -0800
committerStefan O'Rear <stefanor@cox.net>2010-01-02 15:08:50 -0800
commit99aba816a68f0f3c80f0d2e74dac8e3829eaccd5 (patch)
tree31c43ed9c7015c0582f623ceb59a34203d987034 /crawl-ref/source/spl-book.cc
parent74a7f0850963676d0ee82a427653562980694a78 (diff)
downloadcrawl-ref-99aba816a68f0f3c80f0d2e74dac8e3829eaccd5.tar.gz
crawl-ref-99aba816a68f0f3c80f0d2e74dac8e3829eaccd5.zip
Axe shield leakage [Mantis 300]
Diffstat (limited to 'crawl-ref/source/spl-book.cc')
-rw-r--r--crawl-ref/source/spl-book.cc22
1 files changed, 1 insertions, 21 deletions
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index 2c6618962d..29e3c69d1f 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -1866,33 +1866,13 @@ int count_staff_spells(const item_def &item, bool need_id)
return (nspel);
}
-// Returns a measure of the rod spell power disrupted by a worn shield.
-int rod_shield_leakage()
-{
- const item_def *shield = you.shield();
- int leakage = 100;
-
- if (shield)
- {
- const int shield_type = shield->sub_type;
- leakage = shield_type == ARM_BUCKLER? 125 :
- shield_type == ARM_SHIELD ? 150 :
- 200;
- // Adjust for shields skill.
- leakage -= ((leakage - 100) * 5 / 10) * you.skills[SK_SHIELDS] / 27;
- }
- return (leakage);
-}
-
int staff_spell( int staff )
{
item_def& istaff(you.inv[staff]);
// Spell staves are mostly for the benefit of non-spellcasters, so we're
// not going to involve INT or Spellcasting skills for power. -- bwr
int powc = (5 + you.skills[SK_EVOCATIONS]
- + roll_dice( 2, you.skills[SK_EVOCATIONS] ))
- * 100
- / rod_shield_leakage();
+ + roll_dice( 2, you.skills[SK_EVOCATIONS] ));
if (!item_is_rod(istaff))
{