Fixes for Struggle.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
0f440a8a63
commit
097cda34c0
|
@ -20,25 +20,25 @@ bool PkmnLib::Battling::MiscLibrary::CanFlee(CreatureLib::Battling::FleeTurnChoi
|
||||||
return CreatureLib::Battling::MiscLibrary::CanFlee(switchChoice);
|
return CreatureLib::Battling::MiscLibrary::CanFlee(switchChoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CreatureLib::Battling::LearnedAttack* _replacementAttack = nullptr;
|
static CreatureLib::Battling::LearnedAttack* replacementAttack = nullptr;
|
||||||
static PkmnLib::Library::MoveData* _replacementMove = nullptr;
|
static PkmnLib::Library::MoveData* replacementMove = nullptr;
|
||||||
|
|
||||||
static CreatureLib::Library::AttackData* GetReplacementAttackData() {
|
static PkmnLib::Library::MoveData* GetReplacementAttackData() {
|
||||||
if (_replacementMove == nullptr) {
|
if (replacementMove == nullptr) {
|
||||||
_replacementMove =
|
replacementMove =
|
||||||
new PkmnLib::Library::MoveData("struggle"_cnc, 0, PkmnLib::Library::MoveCategory::Physical, 50, 255, 255,
|
new PkmnLib::Library::MoveData("struggle"_cnc, 0, PkmnLib::Library::MoveCategory::Physical, 50, 255, 1,
|
||||||
CreatureLib::Library::AttackTarget::Any, 0,
|
CreatureLib::Library::AttackTarget::Any, 0,
|
||||||
new CreatureLib::Library::SecondaryEffect(-1, "struggle"_cnc, {}), {});
|
new CreatureLib::Library::SecondaryEffect(-1, "struggle"_cnc, {}), {});
|
||||||
}
|
}
|
||||||
return _replacementMove;
|
return replacementMove;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CreatureLib::Battling::LearnedAttack* GetReplacementAttack() {
|
static CreatureLib::Battling::LearnedAttack* GetReplacementAttack() {
|
||||||
if (_replacementAttack == nullptr) {
|
if (replacementAttack == nullptr) {
|
||||||
_replacementAttack = new CreatureLib::Battling::LearnedAttack(
|
replacementAttack = new PkmnLib::Battling::LearnedMove(GetReplacementAttackData(),
|
||||||
GetReplacementAttackData(), CreatureLib::Battling::AttackLearnMethod::Unknown);
|
CreatureLib::Battling::AttackLearnMethod::Unknown);
|
||||||
}
|
}
|
||||||
return _replacementAttack;
|
return replacementAttack;
|
||||||
}
|
}
|
||||||
|
|
||||||
CreatureLib::Battling::BaseTurnChoice*
|
CreatureLib::Battling::BaseTurnChoice*
|
||||||
|
|
Loading…
Reference in New Issue