diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-27 21:22:48 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-27 21:22:48 +0000 |
commit | 801416661a97b3e20be96985a4e9e2b14fef418d (patch) | |
tree | 6c9fde65539d915d170c58ac6c55394f35b31932 /crawl-ref/source | |
parent | de06a424018160dce324b9c70fbd4e119a140b06 (diff) | |
download | crawl-ref-801416661a97b3e20be96985a4e9e2b14fef418d.tar.gz crawl-ref-801416661a97b3e20be96985a4e9e2b14fef418d.zip |
Fixed 1622128: venom launchers shouldn't poison in melee.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@712 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/fight.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 801cd3e3d9..0b5238313d 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2761,7 +2761,13 @@ void monster_attack(int monster_attacking) itdam = ghost.values[ GVAL_BRAND ]; } else - itdam = mitm[attacker->inv[hand_used]].special; + { + const item_def& mons_weapon = mitm[attacker->inv[hand_used]]; + if ( is_range_weapon(mons_weapon) ) + itdam = SPWPN_NORMAL; + else + itdam = mons_weapon.special; + } specdam = 0; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 90aaa62a3d..b857172017 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -618,7 +618,10 @@ int player_damage_brand( void ) const int wpn = you.equip[ EQ_WEAPON ]; if (wpn != -1) - ret = get_weapon_brand( you.inv[wpn] ); + { + if ( !is_range_weapon(you.inv[wpn]) ) + ret = get_weapon_brand( you.inv[wpn] ); + } else if (you.confusing_touch) ret = SPWPN_CONFUSE; else if (you.mutation[MUT_DRAIN_LIFE]) |