From d9f61e7803a61698e5e703c23e88306a60ca7340 Mon Sep 17 00:00:00 2001 From: Yashim Wong Date: Fri, 13 Mar 2020 21:25:01 +0800 Subject: [PATCH] Fixes Rogue Backstab Double Hit (#4703) * Fixes #4702. * Skill no longer ignores the target's flee. * Skill now deals 2 hit when using dagger instead of doubling the damage. Thanks to @yashimwong! --- db/re/skill_db.yml | 4 ---- src/map/battle.cpp | 10 ++++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/db/re/skill_db.yml b/db/re/skill_db.yml index 1ae176c88d..9a217836cb 100644 --- a/db/re/skill_db.yml +++ b/db/re/skill_db.yml @@ -6304,10 +6304,6 @@ Body: MaxLevel: 10 Type: Weapon TargetType: Attack - DamageFlags: - IgnoreFlee: true - Flags: - AllowWhenHidden: true Range: -1 Hit: Single HitCount: 1 diff --git a/src/map/battle.cpp b/src/map/battle.cpp index 97dc0b8024..48931501fe 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -3654,10 +3654,6 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list * skillratio += (200 + 40 * skill_lv) / 2; else skillratio += 200 + 40 * skill_lv; -#ifdef RENEWAL - if (sd && sd->status.weapon == W_DAGGER) - skillratio *= 2; -#endif break; case RG_RAID: #ifdef RENEWAL @@ -5358,6 +5354,12 @@ static struct Damage initialize_weapon_data(struct block_list *src, struct block wd.flag |= battle_range_type(src, target, skill_id, skill_lv); switch(skill_id) { +#ifdef RENEWAL + case RG_BACKSTAP: + if (sd && sd->status.weapon == W_DAGGER) + wd.div_ = 2; + break; +#endif case MH_SONIC_CRAW:{ TBL_HOM *hd = BL_CAST(BL_HOM,src); wd.div_ = hd->homunculus.spiritball;