summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/attack.cc
diff options
context:
space:
mode:
authorShayne Halvorson <N78291@gmail.com>2014-05-10 17:12:49 -0500
committerreaverb <reaverb.Crawl@gmail.com>2014-05-14 22:11:08 -0400
commite31251231736f9371999ccadea973b450281b6e3 (patch)
tree9c1a34578a7e7496c46391280afb13f5a0c3e551 /crawl-ref/source/attack.cc
parent3632d78e45e7f7fa2ed87037cc7960c4d4389a32 (diff)
downloadcrawl-ref-e31251231736f9371999ccadea973b450281b6e3.tar.gz
crawl-ref-e31251231736f9371999ccadea973b450281b6e3.zip
Replace corrosion with a temporary effect.
If your equipment would have been corroded under the old system, you now get a temporary (but stacking) -5 AC and -3 weapon damage. Corrosion against armour-wearing monsters instead halves their AC. Committer's notes: Fixed whitespace and fit to Trunk Added Corrosion entry to hiscores.cc The original patch showed the slaying malus on the weapon, which may be preferable to a status light. gammafunk noted that ouch.cc iterates over equipment when deciding when to corrode, this might make less sense under the new system. -reaverb
Diffstat (limited to 'crawl-ref/source/attack.cc')
-rw-r--r--crawl-ref/source/attack.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/attack.cc b/crawl-ref/source/attack.cc
index 01ee0c7b8f..2f54ecddc4 100644
--- a/crawl-ref/source/attack.cc
+++ b/crawl-ref/source/attack.cc
@@ -1344,6 +1344,9 @@ int attack::player_apply_slaying_bonuses(int damage, bool aux)
if (weapon->base_type == OBJ_RODS)
damage_plus = weapon->special;
+
+ if (you.duration[DUR_CORROSION])
+ damage_plus -= 3 * you.props["corrosion_amount"].get_int();
}
damage_plus += slaying_bonus(PWPN_DAMAGE,
!weapon && wpn_skill == SK_THROWING