summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2010-01-03 22:52:08 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2010-01-03 23:54:25 +1000
commit196415dd325aa0fbe4c309f29d86a07a3988cb4a (patch)
tree7803b54e9c4b1358471630b50cd63f27e42b37f8 /crawl-ref/source/monster.cc
parenta0c81e59f0325e542ecf2feaa21b29cd3ffc0bc1 (diff)
downloadcrawl-ref-196415dd325aa0fbe4c309f29d86a07a3988cb4a.tar.gz
crawl-ref-196415dd325aa0fbe4c309f29d86a07a3988cb4a.zip
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.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc9
1 files changed, 7 insertions, 2 deletions
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;
}
}