Implements ScriptSource changes, Updates OnEndTurn.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
309439918c
commit
2ae73b816b
|
@ -31,8 +31,8 @@ namespace PkmnLib::Battling {
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ScriptCount() const override { return CreatureLib::Battling::Battle::ScriptCount() + 1; }
|
size_t ScriptCount() const override { return CreatureLib::Battling::Battle::ScriptCount() + 1; }
|
||||||
void GetActiveScripts(ArbUt::List<CreatureLib::Battling::ScriptWrapper>& scripts) override {
|
void GetOwnScripts(ArbUt::List<CreatureLib::Battling::ScriptWrapper>& scripts) override {
|
||||||
CreatureLib::Battling::Battle::GetActiveScripts(scripts);
|
CreatureLib::Battling::Battle::GetOwnScripts(scripts);
|
||||||
scripts.Append(CreatureLib::Battling::ScriptWrapper(
|
scripts.Append(CreatureLib::Battling::ScriptWrapper(
|
||||||
CreatureLib::Battling::ScriptWrapper::FromScript(&_weatherScript)));
|
CreatureLib::Battling::ScriptWrapper::FromScript(&_weatherScript)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,9 +293,7 @@ void AngelScriptScript::PreventOpponentSwitch(const CreatureLib::Battling::Switc
|
||||||
ctx->SetArgAddress(1, outResult);
|
ctx->SetArgAddress(1, outResult);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
void AngelScriptScript::OnEndTurn(CreatureLib::Battling::Creature* creature) {
|
void AngelScriptScript::OnEndTurn() { CALL_HOOK(OnEndTurn, {}) }
|
||||||
CALL_HOOK(OnEndTurn, { ctx->SetArgObject(0, (void*)creature); })
|
|
||||||
}
|
|
||||||
void AngelScriptScript::ModifyNumberOfHits(CreatureLib::Battling::AttackTurnChoice* choice,
|
void AngelScriptScript::ModifyNumberOfHits(CreatureLib::Battling::AttackTurnChoice* choice,
|
||||||
u8* numberOfHits){CALL_HOOK(ModifyNumberOfHits,
|
u8* numberOfHits){CALL_HOOK(ModifyNumberOfHits,
|
||||||
{
|
{
|
||||||
|
|
|
@ -114,7 +114,7 @@ public:
|
||||||
void PreventRunAway(const CreatureLib::Battling::FleeTurnChoice* choice, bool* result) override;
|
void PreventRunAway(const CreatureLib::Battling::FleeTurnChoice* choice, bool* result) override;
|
||||||
void PreventOpponentRunAway(const CreatureLib::Battling::FleeTurnChoice* choice, bool* result) override;
|
void PreventOpponentRunAway(const CreatureLib::Battling::FleeTurnChoice* choice, bool* result) override;
|
||||||
void PreventOpponentSwitch(const CreatureLib::Battling::SwitchTurnChoice* choice, bool* outResult) override;
|
void PreventOpponentSwitch(const CreatureLib::Battling::SwitchTurnChoice* choice, bool* outResult) override;
|
||||||
void OnEndTurn(CreatureLib::Battling::Creature* creature) override;
|
void OnEndTurn() override;
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
// PkmnLib methods//
|
// PkmnLib methods//
|
||||||
|
|
|
@ -144,7 +144,7 @@ public:
|
||||||
SCRIPT_HOOK_FUNCTION(PreventOpponentRunAway, "void PreventOpponentRunAway(FleeTurnChoice@ choice, bool& result)");
|
SCRIPT_HOOK_FUNCTION(PreventOpponentRunAway, "void PreventOpponentRunAway(FleeTurnChoice@ choice, bool& result)");
|
||||||
SCRIPT_HOOK_FUNCTION(PreventOpponentSwitch, "void PreventOpponentSwitch(SwitchTurnChoice@ choice, bool& result)");
|
SCRIPT_HOOK_FUNCTION(PreventOpponentSwitch, "void PreventOpponentSwitch(SwitchTurnChoice@ choice, bool& result)");
|
||||||
|
|
||||||
SCRIPT_HOOK_FUNCTION(OnEndTurn, "void OnEndTurn(Pokemon@ pokemon)");
|
SCRIPT_HOOK_FUNCTION(OnEndTurn, "void OnEndTurn()");
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef SCRIPT_HOOK_FUNCTION
|
#undef SCRIPT_HOOK_FUNCTION
|
||||||
|
|
|
@ -45,7 +45,7 @@ shared abstract class PkmnScript {
|
||||||
void PreventRunAway(FleeTurnChoice@ choice, bool& result){};
|
void PreventRunAway(FleeTurnChoice@ choice, bool& result){};
|
||||||
void PreventOpponentRunAway(FleeTurnChoice@ choice, bool& result){};
|
void PreventOpponentRunAway(FleeTurnChoice@ choice, bool& result){};
|
||||||
void PreventOpponentSwitch(SwitchTurnChoice@ choice, bool& result){};
|
void PreventOpponentSwitch(SwitchTurnChoice@ choice, bool& result){};
|
||||||
void OnEndTurn(Pokemon@ pokemon){};
|
void OnEndTurn(){};
|
||||||
|
|
||||||
// PkmnLib methods
|
// PkmnLib methods
|
||||||
void ModifyCriticalStage(ExecutingMove@ attack, Pokemon@ target, uint8 hit, uint8& critStage){};
|
void ModifyCriticalStage(ExecutingMove@ attack, Pokemon@ target, uint8 hit, uint8& critStage){};
|
||||||
|
|
Loading…
Reference in New Issue