[Bug Fix] - Monk AA Spirit of Master Wu (#1775)

* Monk AA Spirit of Master Wu sends message even if it grants 0 extra attacks.

* fomatting + put if statement in wrong place.. oops.

* Need to push something to set up my Tortoise Github Auth

* test

* test

* test

* test

* test

* requested changes

* Update special_attacks.cpp

Co-authored-by: Kinglykrab <89047260+Kinglykrab@users.noreply.github.com>
This commit is contained in:
splose 2021-11-21 10:15:36 -05:00 committed by GitHub
parent 03847fb1ac
commit 0a34809bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -403,10 +403,16 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk)
}
wuchance /= 4;
}
// They didn't add a string ID for this.
std::string msg = StringFormat("The spirit of Master Wu fills you! You gain %d additional attack(s).", extra);
// live uses 400 here -- not sure if it's the best for all clients though
SendColoredText(400, msg);
if (extra) {
SendColoredText(
400,
fmt::format(
"The spirit of Master Wu fills you! You gain {} additional attack{}.",
extra,
extra != 1 ? "s" : ""
)
);
}
auto classic = RuleB(Combat, ClassicMasterWu);
while (extra) {
MonkSpecialAttack(GetTarget(), (classic ? MonkSPA[zone->random.Int(0, 4)] : ca_atk->m_skill));