Fixes for Struggle.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-22 16:35:04 +02:00
parent 0f440a8a63
commit 097cda34c0
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 11 additions and 11 deletions

View File

@ -20,25 +20,25 @@ bool PkmnLib::Battling::MiscLibrary::CanFlee(CreatureLib::Battling::FleeTurnChoi
return CreatureLib::Battling::MiscLibrary::CanFlee(switchChoice);
}
static CreatureLib::Battling::LearnedAttack* _replacementAttack = nullptr;
static PkmnLib::Library::MoveData* _replacementMove = nullptr;
static CreatureLib::Battling::LearnedAttack* replacementAttack = nullptr;
static PkmnLib::Library::MoveData* replacementMove = nullptr;
static CreatureLib::Library::AttackData* GetReplacementAttackData() {
if (_replacementMove == nullptr) {
_replacementMove =
new PkmnLib::Library::MoveData("struggle"_cnc, 0, PkmnLib::Library::MoveCategory::Physical, 50, 255, 255,
static PkmnLib::Library::MoveData* GetReplacementAttackData() {
if (replacementMove == nullptr) {
replacementMove =
new PkmnLib::Library::MoveData("struggle"_cnc, 0, PkmnLib::Library::MoveCategory::Physical, 50, 255, 1,
CreatureLib::Library::AttackTarget::Any, 0,
new CreatureLib::Library::SecondaryEffect(-1, "struggle"_cnc, {}), {});
}
return _replacementMove;
return replacementMove;
}
static CreatureLib::Battling::LearnedAttack* GetReplacementAttack() {
if (_replacementAttack == nullptr) {
_replacementAttack = new CreatureLib::Battling::LearnedAttack(
GetReplacementAttackData(), CreatureLib::Battling::AttackLearnMethod::Unknown);
if (replacementAttack == nullptr) {
replacementAttack = new PkmnLib::Battling::LearnedMove(GetReplacementAttackData(),
CreatureLib::Battling::AttackLearnMethod::Unknown);
}
return _replacementAttack;
return replacementAttack;
}
CreatureLib::Battling::BaseTurnChoice*