From 18c6bc0d238485021dc6f0f02023c6c12b976e5c Mon Sep 17 00:00:00 2001 From: Cahyadi Ramadhan Togihon Date: Sat, 5 Oct 2013 20:56:50 +0700 Subject: [PATCH] Fixed Cart Terminator damage, "when the skill 'misses', a small damaged hit is still guaranteed from Weaponry Research" (bugreport:8112) --- src/map/battle.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/map/battle.c b/src/map/battle.c index 217551af01..ae61947803 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4443,7 +4443,18 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl } else if(wd.div_ < 0) //Since the attack missed... wd.div_ *= -1; - + + //WS_CARTTERMINATION never be missed because of flee, deals damage from BS_WEAPONRESEARCH [Cydh] + //NOTE: Idk the official behavior, if this damage can be reflected/adjusted or not + if (sd && skill_id == WS_CARTTERMINATION && wd.dmg_lv == ATK_FLEE && pc_checkskill(sd,BS_WEAPONRESEARCH)) { + wd.dmg_lv = ATK_DEF; + if(target_has_infinite_defense(target, skill_id)) + return battle_calc_attack_plant(wd, src, target, skill_id, skill_lv); + wd.damage = pc_checkskill(sd,BS_WEAPONRESEARCH) * 2; + wd.damage2 = 0; + return wd; + } + #ifdef RENEWAL if(!sd) // monsters only have a single ATK for element, in pre-renewal we also apply element to entire ATK on players [helvetica] #endif