summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-ench.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/mon-ench.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/mon-ench.cc')
-rw-r--r--crawl-ref/source/mon-ench.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-ench.cc b/crawl-ref/source/mon-ench.cc
index 89d9cfe21b..1ce13eb94b 100644
--- a/crawl-ref/source/mon-ench.cc
+++ b/crawl-ref/source/mon-ench.cc
@@ -1018,6 +1018,11 @@ void monster::remove_enchantment_effect(const mon_enchant &me, bool quiet)
simple_monster_message(this, " is no longer being sapped.");
break;
+ case ENCH_CORROSION:
+ if (!quiet)
+ simple_monster_message(this, " is no longer covered in acid.");
+ break;
+
default:
break;
}
@@ -1128,7 +1133,7 @@ void monster::timeout_enchantments(int levels)
case ENCH_FLAYED: case ENCH_BARBS:
case ENCH_AGILE: case ENCH_FROZEN: case ENCH_EPHEMERAL_INFUSION:
case ENCH_BLACK_MARK: case ENCH_SAP_MAGIC: case ENCH_BRIBED:
- case ENCH_PERMA_BRIBED:
+ case ENCH_PERMA_BRIBED: case ENCH_CORROSION:
lose_ench_levels(i->second, levels);
break;
@@ -1336,6 +1341,7 @@ void monster::apply_enchantment(const mon_enchant &me)
case ENCH_EPHEMERAL_INFUSION:
case ENCH_SAP_MAGIC:
case ENCH_PERMA_BRIBED:
+ case ENCH_CORROSION:
// case ENCH_ROLLING:
decay_enchantment(en);
break;
@@ -2222,7 +2228,7 @@ static const char *enchant_names[] =
"poison_vuln", "icemail", "agile",
"frozen", "ephemeral_infusion", "black_mark", "grand_avatar",
"sap magic", "shroud", "phantom_mirror", "bribed", "permabribed",
- "buggy",
+ "corrosion", "buggy",
};
static const char *_mons_enchantment_name(enchant_type ench)
@@ -2379,6 +2385,7 @@ int mon_enchant::calc_duration(const monster* mons,
cturn = 300 / _mod_speed(25, mons->speed);
break;
case ENCH_SLOW:
+ case ENCH_CORROSION:
cturn = 250 / (1 + modded_speed(mons, 10));
break;
case ENCH_FEAR: