Fix TK_POWER Attack Bonus (#5838)

* Fixes (#5836)
* Multiplier value based on party members count doesn't include the party leader.
Thanks to @Tydus1 and @Indigo000!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
Sandro Junior 2021-04-11 08:35:04 -03:00 committed by GitHub
parent 96163623b9
commit 5130b9f6e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3633,6 +3633,8 @@ static void battle_calc_skill_base_damage(struct Damage* wd, struct block_list *
#endif
if(sd->status.party_id && (skill=pc_checkskill(sd,TK_POWER)) > 0) {
if( (i = party_foreachsamemap(party_sub_count, sd, 0)) > 1 ) { // exclude the player himself [Inkfish]
// Reduce count by one (self) [Tydus1]
i -= 1;
ATK_ADDRATE(wd->damage, wd->damage2, 2*skill*i);
RE_ALLATK_ADDRATE(wd, 2*skill*i);
}