summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/attack.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-04-19 21:48:03 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-04-27 17:02:33 -0600
commit0ae9f4fba60e8a6eed6359e8e3aaa045f5e74ebb (patch)
treec3ea65e73a812f3217421f52bcdcf71f4ba662c3 /crawl-ref/source/attack.cc
parenta2702ba0a56228743ba069c151e94c06601aabb6 (diff)
downloadcrawl-ref-0ae9f4fba60e8a6eed6359e8e3aaa045f5e74ebb.tar.gz
crawl-ref-0ae9f4fba60e8a6eed6359e8e3aaa045f5e74ebb.zip
Let stabbing with blowgun attacks extend effect duration (elliptic).
Poisoned needles deal more poison damage; curare has its effect amplified; duration-based needles have their durations extended (except frenzy, possibly for now). The needle of paralysis hits the stone giant in a vulnerable spot!!!! This code might have some side effects based on the dur paramater of enchant_monster_with_flavour being meaningful for the duration-base needle enchantment types; if so, that'll need fixing.
Diffstat (limited to 'crawl-ref/source/attack.cc')
-rw-r--r--crawl-ref/source/attack.cc26
1 files changed, 5 insertions, 21 deletions
diff --git a/crawl-ref/source/attack.cc b/crawl-ref/source/attack.cc
index 2324e9120e..f720842ae4 100644
--- a/crawl-ref/source/attack.cc
+++ b/crawl-ref/source/attack.cc
@@ -1935,27 +1935,11 @@ int attack::modify_blood_amount(const int damage, const int dam_type)
int attack::player_stab_weapon_bonus(int damage)
{
int stab_skill = you.skill(wpn_skill, 50) + you.skill(SK_STEALTH, 50);
- int modified_wpn_skill = wpn_skill;
+ const int tier = player_stab_tier();
- if (player_equip_unrand(UNRAND_BOOTS_ASSASSIN)
- && (!weapon || is_melee_weapon(*weapon)))
+ switch (tier)
{
- modified_wpn_skill = SK_SHORT_BLADES;
- }
- else if (weapon && weapon->base_type == OBJ_WEAPONS
- && (weapon->sub_type == WPN_CLUB
- || weapon->sub_type == WPN_SPEAR
- || weapon->sub_type == WPN_TRIDENT
- || weapon->sub_type == WPN_DEMON_TRIDENT
- || weapon->sub_type == WPN_TRISHULA)
- || !weapon && you.species == SP_FELID)
- {
- modified_wpn_skill = SK_LONG_BLADES;
- }
-
- switch (modified_wpn_skill)
- {
- case SK_SHORT_BLADES:
+ case 2:
{
int bonus = (you.dex() * (stab_skill + 100)) / 500;
@@ -1967,9 +1951,9 @@ int attack::player_stab_weapon_bonus(int damage)
damage += bonus;
}
// fall through
- case SK_LONG_BLADES:
+ case 1:
damage *= 10 + div_rand_round(stab_skill, 100 *
- (stab_bonus + (modified_wpn_skill == SK_SHORT_BLADES ? 0 : 2)));
+ (stab_bonus + (tier == 2 ? 0 : 2)));
damage /= 10;
// fall through
default: