Skip to content

Commit

Permalink
Plant damage, Land Mine, minor fixes and improvements
Browse files Browse the repository at this point in the history
- Fixed up the damage code in regards of damage against plants (bugreport:9380)
  * Rewrote DAMAGE_DIV_FIX so that it rounds damage down when number of hits is negative (damage split on hits)
  * Created a function battle_apply_div_fix that does not only call DAMAGE_DIV_FIX but also makes sure that damage can only become 0 when the custom config setting skill_min_damage is not set for the current skill type
  * skill_min_damage is now 0 by default (official: all types can fail against plants as long as skills have negative number of hits), if set, all skills will deal as much damage as hits
  * Restructured and renamed function now known as "is_infinite_defense" that will work for all 3 damage types and returns if damage is infinite for the current situation, it will now also properly consider all "MD_IGNORE" modes
  * Fixed the order of processing of all 3 skill types in regards of plant damage: first all calculations are done, then plant damage is applied and then DAMAGE_DIV_FIX is applied
  * Sonic Blow and Rapid Shower are now skills with negative number of hits (i.e. they can't hit plants officially)
  * Traps can no longer ignore plant mode (only way to damage plant more is via status changes)
  * Final Strike is now able to hit plants (deals 1 HP damage)
  * When left-hand-wielding, you will now always deal 2 damage to plants per attack, regardless of whether double attack triggers or you don't even have a weapon in the right hand
  * There will no longer be backhand damage to plants (Katar)
- Land Mine is now a single target skill, the trap still triggers in a 3x3 area, but will only hit the first target that touches it (issue:99)
- Changed the "Don't return reflect damage" flag from 0x1000 to 0x1000000 as apparently the other flag was already used; updated function description so it's easier to see
- Improved SC_SIGHTBLASTER structure slightly
- Typo fixes and description improvements
  • Loading branch information
Playtester committed Nov 7, 2014
1 parent c10c05a commit 04a1173
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 106 deletions.
2 changes: 1 addition & 1 deletion conf/battle/misc.conf
Expand Up @@ -93,7 +93,7 @@ duel_only_on_same_map: no
// If a unit stops walking and is on a cell with more than stack limit
// characters on it, it will walk to the closest free cell.
// Custom - This variation will make every full cell to be considered a wall.
// NOTE: For this setting to take effect you have to use a server compiled
// NOTE: For the custom setting to take effect you have to use a server compiled
// with Cell Stack Limit support (see src/map/map.h)
official_cell_stack_limit: 1
custom_cell_stack_limit: 1
Expand Down
12 changes: 8 additions & 4 deletions conf/battle/skill.conf
Expand Up @@ -89,10 +89,14 @@ clear_skills_on_warp: 15
//See db/skill_unit_db.txt for more info.
defunit_not_enemy: no

// Do skills do at least 'hits' damage when they don't miss/are blocked?
//(for example, will firebolts always do "number of bolts" damage versus plants?)
//Values (add as appropriate): 1 for weapon-based attacks, 2 for magic attacks, 4 for misc attacks.
skill_min_damage: 6
// Should skills always do at least 'hits' damage when they don't miss/are blocked?
// Many skills will have their damage multiplied by their number of hits (see skill_db), these will always deal 1 HP
// damage per hit, even against plants. But some skills are actually a single hit that is just displayed as multiple
// hits. For these skills, damage gets divided by number of hits and rounded down. That means that plants won't take
// any damage from them. Examples: Sonic Blow, Lord of Vermillion
// With this setting, you can change the official behavior and make these skills deal at least 1 HP damage per hit.
// Values: 1 for weapon-based attacks, 2 for magic attacks, 4 for misc attacks.
skill_min_damage: 0

// The delay rate of monk's combo (Note 2)
combo_delay_rate: 100
Expand Down
2 changes: 1 addition & 1 deletion db/pre-re/skill_cast_db.txt
Expand Up @@ -5,7 +5,7 @@
//
// CastingTime: time to cast this skill, in milliseconds
// AfterCastActDelay: "normal" delay, character cannot use skills, in milliseconds
// AfterCastWalkDleay: amount of time before character can move again, in milliseconds
// AfterCastWalkDelay: amount of time before character can move again, in milliseconds
// Duration1/Duration2: usually the durations used by the skill, at special cases it is used to hold special data
// Cool Down: amount of time until character can re-use this skill, in milliseconds
//
Expand Down
6 changes: 3 additions & 3 deletions db/pre-re/skill_db.txt
Expand Up @@ -214,7 +214,7 @@
//****
// Hunter
115,3,6,2,0,0x1,0,5,1,no,0,0x80,0,misc,6:7:8:9:10,0x3000, HT_SKIDTRAP,Skid Trap
116,3,6,2,2,0x42,1,5,1,no,0,0x80,0,misc,0,0x3800, HT_LANDMINE,Land Mine
116,3,6,2,2,0x42,0,5,1,no,0,0x80,0,misc,0,0x3800, HT_LANDMINE,Land Mine
117,3,6,2,0,0x1,0,5,1,no,0,0x80,0,misc,0,0x3000, HT_ANKLESNARE,Ankle Snare
118,3,6,2,0,0x2,1,5,1,no,0,0x80,0,misc,0,0x3000, HT_SHOCKWAVE,Shockwave Trap
119,3,6,2,0,0x3,2,5,1,no,0,0x80,0,misc,0,0x3000, HT_SANDMAN,Sandman
Expand All @@ -237,7 +237,7 @@
133,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,0x0, AS_LEFT,Lefthand Mastery
134,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0,0x0, AS_KATAR,Katar Mastery
135,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0,0x60, AS_CLOAKING,Cloaking
136,1,8,1,-1,0,0,10,8,no,0,0,0,weapon,0,0x0, AS_SONICBLOW,Sonic Blow
136,1,8,1,-1,0,0,10,-8,no,0,0,0,weapon,0,0x0, AS_SONICBLOW,Sonic Blow
137,3:4:5:6:7,6,1,-1,0x2,1,5,1,no,0,0,0,weapon,0,0x4, AS_GRIMTOOTH,Grimtooth
138,1,6,16,5,0x1,0,10,1,no,0,0x400,0,weapon,0,0x0, AS_ENCHANTPOISON,Enchant Poison
139,0,6,4,0,0,0,10,1,no,0,0,0,weapon,0,0x0, AS_POISONREACT,Poison React
Expand Down Expand Up @@ -733,7 +733,7 @@
512,-9,6,1,-1,0,0,10,1,yes,0,0,0,weapon,0,0x0, GS_TRACKING,Tracking
513,-9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,0x0, GS_DISARM,Disarm
514,-9,6,1,-1,0x20,0,5,1,no,0,0,0,weapon,0,0x100, GS_PIERCINGSHOT,Piercing Shot
515,-9,8,1,-1,0,0,10,5,no,0,0,0,weapon,0,0x100, GS_RAPIDSHOWER,Rapid Shower
515,-9,8,1,-1,0,0,10,-5,no,0,0,0,weapon,0,0x100, GS_RAPIDSHOWER,Rapid Shower
516,0,8,4,-1,0x2,3,10,1,no,0,0,0,weapon,0,0x0, GS_DESPERADO,Desperado
517,0,6,4,-1,0x1,0,10,1,no,0,0,0,weapon,0,0x0, GS_GATLINGFEVER,Gatling Fever
518,2,6,1,-1,0,0,10,1,no,0,0,0,weapon,5,0x0, GS_DUST,Dust
Expand Down
2 changes: 1 addition & 1 deletion db/re/skill_cast_db.txt
Expand Up @@ -5,7 +5,7 @@
//
// CastingTime: time to cast this skill, in milliseconds
// AfterCastActDelay: "normal" delay, character cannot use skills, in milliseconds
// AfterCastWalkDleay: amount of time before character can move again, in milliseconds
// AfterCastWalkDelay: amount of time before character can move again, in milliseconds
// Duration1/Duration2: usually the durations used by the skill, at special cases it is used to hold special data
// Cool Down: amount of time until character can re-use this skill, in milliseconds
// Fixed Casting Time: the skills fixed casting time (when 0, uses 20% of cast time and less than 0 means no fixed cast time)
Expand Down
6 changes: 3 additions & 3 deletions db/re/skill_db.txt
Expand Up @@ -214,7 +214,7 @@
//****
// Hunter
115,3,6,2,0,0x1,0,5,1,no,0,0x80,0,misc,6:7:8:9:10,0x3000, HT_SKIDTRAP,Skid Trap
116,3,6,2,2,0x42,1,5,1,no,0,0x80,0,misc,0,0x3800, HT_LANDMINE,Land Mine
116,3,6,2,2,0x42,0,5,1,no,0,0x80,0,misc,0,0x3800, HT_LANDMINE,Land Mine
117,3,6,2,0,0x1,0,5,1,no,0,0x80,0,misc,0,0x3000, HT_ANKLESNARE,Ankle Snare
118,3,6,2,0,0x2,1,5,1,no,0,0x80,0,misc,0,0x3000, HT_SHOCKWAVE,Shockwave Trap
119,3,6,2,0,0x3,2,5,1,no,0,0x80,0,misc,0,0x3000, HT_SANDMAN,Sandman
Expand All @@ -237,7 +237,7 @@
133,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,0x0, AS_LEFT,Lefthand Mastery
134,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0,0x0, AS_KATAR,Katar Mastery
135,0,6,4,0,0x1,0,10,1,no,0,0,0,weapon,0,0x60, AS_CLOAKING,Cloaking
136,1,8,1,-1,0,0,10,8,no,0,0,0,weapon,0,0x0, AS_SONICBLOW,Sonic Blow
136,1,8,1,-1,0,0,10,-8,no,0,0,0,weapon,0,0x0, AS_SONICBLOW,Sonic Blow
137,3:4:5:6:7,6,1,-1,0x2,1,5,1,no,0,0,0,weapon,0,0x4, AS_GRIMTOOTH,Grimtooth
138,1,6,16,5,0x1,0,10,1,no,0,0x400,0,weapon,0,0x0, AS_ENCHANTPOISON,Enchant Poison
139,0,6,4,0,0,0,10,1,no,0,0,0,weapon,0,0x0, AS_POISONREACT,Poison React
Expand Down Expand Up @@ -733,7 +733,7 @@
512,-9,6,1,-1,0,0,10,1,yes,0,0,0,weapon,0,0x0, GS_TRACKING,Tracking
513,-9,6,1,-1,0,0,5,1,no,0,0,0,weapon,0,0x0, GS_DISARM,Disarm
514,-9,6,1,-1,0x20,0,5,1,no,0,0,0,weapon,0,0x100, GS_PIERCINGSHOT,Piercing Shot
515,-9,8,1,-1,0,0,10,5,no,0,0,0,weapon,0,0x100, GS_RAPIDSHOWER,Rapid Shower
515,-9,8,1,-1,0,0,10,-5,no,0,0,0,weapon,0,0x100, GS_RAPIDSHOWER,Rapid Shower
516,0,8,4,-1,0x2,3,10,1,no,0,0,0,weapon,0,0x0, GS_DESPERADO,Desperado
517,0,6,4,-1,0x1,0,10,1,no,0,0,0,weapon,0,0x0, GS_GATLINGFEVER,Gatling Fever
518,2,6,1,-1,0,0,10,1,no,0,0,0,weapon,5,0x0, GS_DUST,Dust
Expand Down
150 changes: 73 additions & 77 deletions src/map/battle.c
Expand Up @@ -2024,8 +2024,9 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
* Original coder Skoltex
* Initial refactoring by Baalberith
* Refined and optimized by helvetica
* flag - see e_battle_flag
*/
static bool target_has_infinite_defense(struct block_list *target, int skill_id)
static bool is_infinite_defense(struct block_list *target, int flag)
{
struct status_data *tstatus = status_get_status_data(target);

Expand All @@ -2035,11 +2036,17 @@ static bool target_has_infinite_defense(struct block_list *target, int skill_id)
if (su && su->group && (su->group->skill_id == WM_REVERBERATION || su->group->skill_id == WM_POEMOFNETHERWORLD))
return true;
}
return (tstatus->mode&MD_PLANT && skill_id != RA_CLUSTERBOMB
#ifdef RENEWAL
&& skill_id != HT_FREEZINGTRAP && skill_id != HT_CLAYMORETRAP
#endif
);

if(tstatus->mode&MD_IGNOREMELEE && (flag&(BF_WEAPON|BF_SHORT)) == (BF_WEAPON|BF_SHORT) )
return true;
if(tstatus->mode&MD_IGNOREMAGIC && flag&(BF_MAGIC) )
return true;
if(tstatus->mode&MD_IGNORERANGED && (flag&(BF_WEAPON|BF_LONG)) == (BF_WEAPON|BF_LONG) )
return true;
if(tstatus->mode&MD_IGNOREMISC && flag&(BF_MISC) )
return true;

return (tstatus->mode&MD_PLANT);
}

/*========================
Expand Down Expand Up @@ -3035,9 +3042,29 @@ struct Damage battle_calc_skill_base_damage(struct Damage wd, struct block_list
}

//For quick div adjustment.
#define DAMAGE_DIV_FIX(dmg, div) { if (div > 1) (dmg)*=div; else if (div < 0) (div)*=-1; }
#define DAMAGE_DIV_FIX(dmg, div) { if (div < 0) { (div)*=-1; (dmg)/=div; } (dmg)*=div; }
#define DAMAGE_DIV_FIX2(dmg, div) { if (div > 1) (dmg)*=div; }
#define DAMAGE_DIV_FIX_RENEWAL(wd, div) { DAMAGE_DIV_FIX2(wd.statusAtk, div); DAMAGE_DIV_FIX2(wd.weaponAtk, div); DAMAGE_DIV_FIX2(wd.equipAtk, div); DAMAGE_DIV_FIX2(wd.masteryAtk, div); }
/*=================================================
* Applies DAMAGE_DIV_FIX and checks for min damage
*-------------------------------------------------
* Credits:
* Original coder Playtester
*/

This comment has been minimized.

Copy link
@cydh

cydh Nov 8, 2014

Contributor

later, if u make a new documentation, please follow the guide

This comment has been minimized.

Copy link
@Playtester

Playtester Nov 8, 2014

Author Member

Link?
Just used the format used in other functions near it.

This comment has been minimized.

Copy link
@cydh
static struct Damage battle_apply_div_fix(struct Damage d)
{
if(d.damage) {
DAMAGE_DIV_FIX(d.damage, d.div_);
//Min damage
if((battle_config.skill_min_damage&d.flag) && d.damage < d.div_)
d.damage = d.div_;
} else if (d.div_ < 0) {
d.div_ *= -1;
}

return d;
}

/*=======================================
* Check for and calculate multi attacks
*---------------------------------------
Expand Down Expand Up @@ -3235,7 +3262,7 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s
skillratio += 30*skill_lv;
break;
case AS_SONICBLOW:
skillratio += -50+5*skill_lv;
skillratio += 300+40*skill_lv;
break;
case TF_SPRINKLESAND:
skillratio += 30;
Expand Down Expand Up @@ -3431,7 +3458,7 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s
skillratio += 20*skill_lv;
break;
case GS_RAPIDSHOWER:
skillratio += 10*skill_lv;
skillratio += 400+50*skill_lv;
break;
case GS_DESPERADO:
skillratio += 50*(skill_lv-1);
Expand Down Expand Up @@ -4492,6 +4519,7 @@ struct Damage battle_calc_attack_post_defense(struct Damage wd, struct block_lis
*/
struct Damage battle_calc_attack_plant(struct Damage wd, struct block_list *src,struct block_list *target, uint16 skill_id, uint16 skill_lv)
{
struct map_session_data *sd = BL_CAST(BL_PC, src);
struct status_data *tstatus = status_get_status_data(target);
bool attack_hits = is_attack_hitting(wd, src, target, skill_id, skill_lv, false);
int right_element = battle_get_weapon_element(wd, src, target, skill_id, skill_lv, EQI_HAND_R, false);
Expand All @@ -4500,11 +4528,14 @@ struct Damage battle_calc_attack_plant(struct Damage wd, struct block_list *src,

//Plants receive 1 damage when hit
if( attack_hits || wd.damage > 0 )
wd.damage = wd.div_; // In some cases, right hand no need to have a weapon to increase damage
if( is_attack_left_handed(src, skill_id) && (attack_hits || wd.damage2 > 0) )
wd.damage2 = wd.div_;
if (is_attack_right_handed(src, skill_id) && is_attack_left_handed(src, skill_id)) // force left hand to 1 damage while dual wielding [helvetica]
wd.damage2 = 1;
wd.damage = 1; //In some cases, right hand no need to have a weapon to deal a damage
if( is_attack_left_handed(src, skill_id) && (attack_hits || wd.damage2 > 0) ) {
if(sd->status.weapon == W_KATAR)
wd.damage2 = 0; //No backhand damage against plants
else {
wd.damage2 = 1; //Deal 1 HP damage as long as there is a weapon in the left hand
}
}

if( attack_hits && class_ == MOBID_EMPERIUM ) {
if(target && map_flag_gvg2(target->m) && !battle_can_hit_gvg_target(src,target,skill_id,(skill_id)?BF_SKILL:0)) {
Expand All @@ -4521,8 +4552,15 @@ struct Damage battle_calc_attack_plant(struct Damage wd, struct block_list *src,
return wd;
}

//if( !(battle_config.skill_min_damage&1) )
//Do not return if you are supposed to deal greater damage to plants than 1. [Skotlex]
//For plants we don't continue with the weapon attack code, so we have to apply DAMAGE_DIV_FIX here
wd = battle_apply_div_fix(wd);

//If there is left hand damage, total damage can never exceed 2, even on multiple hits
if(wd.damage > 1 && wd.damage2 > 0) {
wd.damage = 1;
wd.damage2 = 1;
}

return wd;
}

Expand Down Expand Up @@ -4948,7 +4986,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
// check if we're landing a hit
if(!is_attack_hitting(wd, src, target, skill_id, skill_lv, true))
wd.dmg_lv = ATK_FLEE;
else if(!target_has_infinite_defense(target, skill_id)) { //no need for math against plants
else if(!is_infinite_defense(target, wd.flag)) { //no need for math against plants
int ratio, i = 0;

wd = battle_calc_skill_base_damage(wd, src, target, skill_id, skill_lv); // base skill damage
Expand Down Expand Up @@ -5010,18 +5048,6 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl

wd = battle_calc_attack_post_defense(wd, src, target, skill_id, skill_lv);
}
} 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
Expand Down Expand Up @@ -5185,12 +5211,13 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
// perform multihit calculations
DAMAGE_DIV_FIX_RENEWAL(wd, wd.div_);
#endif
DAMAGE_DIV_FIX(wd.damage, wd.div_);

// only do 1 dmg to plant, no need to calculate rest
if(target_has_infinite_defense(target, skill_id))
if(is_infinite_defense(target, wd.flag))
return battle_calc_attack_plant(wd, src, target, skill_id, skill_lv);

//Apply DAMAGE_DIV_FIX and check for min damage
wd = battle_apply_div_fix(wd);

wd = battle_calc_attack_left_right_hands(wd, src, target, skill_id, skill_lv);

switch (skill_id) {
Expand Down Expand Up @@ -5308,13 +5335,9 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list

//Skill Range Criteria
ad.flag |= battle_range_type(src, target, skill_id, skill_lv);
flag.infdef=(tstatus->mode&MD_PLANT?1:0);
if( target->type == BL_SKILL) {
TBL_SKILL *su = (TBL_SKILL*)target;

if( su && su->group && (su->group->skill_id == WM_REVERBERATION || su->group->skill_id == WM_POEMOFNETHERWORLD) )
flag.infdef = 1;
}
//Infinite defense (plant mode)
flag.infdef = is_infinite_defense(target, ad.flag)?1:0;

switch(skill_id)
{
Expand All @@ -5329,10 +5352,6 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
break;
}

if(!flag.infdef && (
(tstatus->mode&MD_IGNOREMAGIC && ad.flag&(BF_MAGIC) ) //magic
)) flag.infdef = 1;

if (!flag.infdef) //No need to do the math for plants
{
unsigned int skillratio = 100; //Skill dmg modifiers.
Expand Down Expand Up @@ -5950,14 +5969,12 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
}

#ifndef RENEWAL
ad.damage += battle_calc_cardfix(BF_MAGIC, src, target, nk, s_ele, 0, ad.damage, 0, ad.flag);
ad.damage += battle_calc_cardfix(BF_MAGIC, src, target, nk, s_ele, 0, ad.damage, 0, ad.flag);
#endif
}

DAMAGE_DIV_FIX(ad.damage, ad.div_);
} //Hint: Against plants damage will still be 1 at this point

if (flag.infdef && ad.damage)
ad.damage = ad.damage>0?1:-1;
//Apply DAMAGE_DIV_FIX and check for min damage
ad = battle_apply_div_fix(ad);

switch(skill_id) { // These skills will do a GVG fix later
#ifdef RENEWAL
Expand Down Expand Up @@ -6258,8 +6275,6 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
ShowError("0 enemies targeted by %d:%s, divide per 0 avoided!\n", skill_id, skill_get_name(skill_id));
}

DAMAGE_DIV_FIX(md.damage, md.div_);

if (!(nk&NK_IGNORE_FLEE))
{
struct status_change *sc = status_get_sc(target);
Expand Down Expand Up @@ -6309,34 +6324,18 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
if (sd && (i = pc_skillatk_bonus(sd, skill_id)))
md.damage += (int64)md.damage*i/100;

if(!(nk&NK_NO_ELEFIX))
md.damage=battle_attr_fix(src, target, md.damage, s_ele, tstatus->def_ele, tstatus->ele_lv);

//Plant damage
if(md.damage < 0)
md.damage = 0;
else if(md.damage && tstatus->mode&MD_PLANT) {
switch(skill_id){
case NJ_ISSEN: // Final Strike will MISS on "plant"-type mobs [helvetica]
md.damage = 0;
md.dmg_lv = ATK_FLEE;
break;
case HT_LANDMINE:
case MA_LANDMINE:
case HT_BLASTMINE:
case HT_CLAYMORETRAP:
case RA_CLUSTERBOMB:
#ifdef RENEWAL
break;
#endif
default:
md.damage = 1;
}
} else if( target->type == BL_SKILL ) {
TBL_SKILL *su = (TBL_SKILL*)target;

if( su && su->group && (su->group->skill_id == WM_REVERBERATION || su->group->skill_id == WM_POEMOFNETHERWORLD) )
md.damage = 1;
else if(md.damage && is_infinite_defense(target, md.flag)) {
md.damage = 1;
}

if(!(nk&NK_NO_ELEFIX))
md.damage=battle_attr_fix(src, target, md.damage, s_ele, tstatus->def_ele, tstatus->ele_lv);
//Apply DAMAGE_DIV_FIX and check for min damage
md = battle_apply_div_fix(md);

md.damage=battle_calc_damage(src,target,&md,md.damage,skill_id,skill_lv);
if( map_flag_gvg2(target->m) )
Expand Down Expand Up @@ -6370,9 +6369,6 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
md.damage += (int64)md.damage * skill_damage / 100;
#endif

if(tstatus->mode&MD_IGNOREMISC && md.flag&(BF_MISC) ) //misc @TODO optimize me
md.damage = md.damage2 = 1;

battle_do_reflect(BF_MISC,&md, src, target, skill_id, skill_lv); //WIP [lighta]

return md;
Expand Down

0 comments on commit 04a1173

Please sign in to comment.