From 196415dd325aa0fbe4c309f29d86a07a3988cb4a Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 3 Jan 2010 22:52:08 +1000 Subject: New (ranged) weapon brand: evasion. This replaces "protection" on all ranged weapons, and will only generate on those. This commit also fixes shopping values for the new needle brands. --- crawl-ref/source/monster.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/monster.cc') diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 1171a3c2c3..4f41076b68 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -788,6 +788,8 @@ void monsters::equip_weapon(item_def &item, int near, bool msg) const int brand = get_weapon_brand(item); if (brand == SPWPN_PROTECTION) ac += 5; + if (brand == SPWPN_EVASION) + ev += 5; if (msg) { @@ -915,6 +917,8 @@ void monsters::unequip_weapon(item_def &item, int near, bool msg) const int brand = get_weapon_brand(item); if (brand == SPWPN_PROTECTION) ac -= 5; + if (brand == SPWPN_EVASION) + ev -= 5; if (msg && brand != SPWPN_NORMAL) { @@ -1299,9 +1303,10 @@ static int _ego_damage_bonus(item_def &item) switch (get_weapon_brand(item)) { case SPWPN_NORMAL: return 0; - case SPWPN_PROTECTION: return 1; + case SPWPN_VORPAL: // deliberate + case SPWPN_PROTECTION: // fall through + case SPWPN_EVASION: return 1; default: return 2; - case SPWPN_VORPAL: return 1; } } -- cgit v1.2.3-54-g00ecf