From 36ca3bca05e19a0ee58d6c4cef9f25d6d7f4def9 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Mon, 18 Oct 2021 11:16:29 +0200 Subject: [PATCH] Fixed monster attack calculations (#6319) Fixes #6273 Thanks to @Zeloss, @zyudimosha, @sonniez, @Everade and @limitro --- src/map/battle.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/map/battle.cpp b/src/map/battle.cpp index 8ce6b80df8..c259753f22 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -6105,13 +6105,17 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl #endif } -#ifndef RENEWAL - if(tsd) { // Card Fix for target (tsd), 2 is not added to the "left" flag meaning "target cards only" +#ifdef RENEWAL + // In renewal only do it for non player attacks + if( tsd && !sd ){ +#else + if( tsd ){ +#endif + // Card Fix for target (tsd), 2 is not added to the "left" flag meaning "target cards only" wd.damage += battle_calc_cardfix(BF_WEAPON, src, target, nk, right_element, left_element, wd.damage, 0, wd.flag); if(is_attack_left_handed(src, skill_id)) wd.damage2 += battle_calc_cardfix(BF_WEAPON, src, target, nk, right_element, left_element, wd.damage2, 1, wd.flag); } -#endif // only do 1 dmg to plant, no need to calculate rest if(infdef){