Fixes monster Sharp Shooting damage formula (#5822)

* Fixes #5769.
* Adjusts the formula for Sharp Shooting if a monster uses the skill.
Thanks to @mrjnumber1 and @Lemongrass3110!
This commit is contained in:
Aleos 2021-04-11 01:16:28 -04:00 committed by GitHub
parent f77cb8a37b
commit 96163623b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -4117,6 +4117,14 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
#endif
break;
case SN_SHARPSHOOTING:
if (src->type == BL_MOB) { // TODO: Did these formulas change in the renewal balancing?
if (wd->miscflag & 1) // Splash damage bonus
skillratio += -100 + 140 * skill_lv;
else
skillratio += 100 + 50 * skill_lv;
break;
}
// Fall through
case MA_SHARPSHOOTING:
#ifdef RENEWAL
skillratio += 50 + 200 * skill_lv;

View File

@ -4933,6 +4933,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
break;
case SN_SHARPSHOOTING:
flag |= 1; // Flag for specific mob damage formula
case MA_SHARPSHOOTING:
case NJ_KAMAITACHI:
case NPC_DARKPIERCING:
@ -4947,6 +4948,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
if (!(map_foreachindir(skill_attack_area, src->m, src->x, src->y, bl->x, bl->y,
skill_get_splash(skill_id, skill_lv), skill_get_maxcount(skill_id, skill_lv), 0, splash_target(src),
skill_get_type(skill_id), src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY))) {
if (skill_id == SN_SHARPSHOOTING)
flag &= ~1; // Only targets in the splash area are affected
//These skills hit at least the target if the AoE doesn't hit
skill_attack(skill_get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag);
}