Removed OnStatusMove hook.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -58,10 +58,6 @@ void StopBeforeAttack(ExecutingMove@ attack, bool& result) override{
|
||||
AS_CLASS(
|
||||
ChangeAttackTypeScript,
|
||||
R"(void ChangeAttackType(ExecutingMove@ attack, Pokemon@ target, uint8 hit, uint8& outType) override{outType = 1; };)"),
|
||||
AS_CLASS(
|
||||
OnStatusMoveScript,
|
||||
"int value = 0; void OnStatusMove(ExecutingMove@ attack, Pokemon@ target, uint8 hit) override { value++; } "
|
||||
"int GetValue() { return value; }"),
|
||||
AS_CLASS(
|
||||
PreventSecondaryEffectsScript,
|
||||
R"(void PreventSecondaryEffects(ExecutingMove@ attack, Pokemon@ target, uint8 hit, bool& result) override{ result = !result; })"),
|
||||
@@ -277,22 +273,6 @@ TEST_CASE("Invoke ChangeAttackType script function") {
|
||||
delete script;
|
||||
}
|
||||
|
||||
TEST_CASE("Invoke OnStatusMove script function") {
|
||||
auto mainLib = TestLibrary::GetLibrary();
|
||||
auto script = GetScript(mainLib, "OnStatusMoveScript"_cnc);
|
||||
|
||||
script->OnStatusMove(nullptr, nullptr, 0);
|
||||
|
||||
auto ctxPool = script->GetContextPool();
|
||||
auto ctx = ctxPool->RequestContext();
|
||||
script->PrepareMethod("GetValue"_cnc, ctx);
|
||||
REQUIRE(ctx->Execute() == asEXECUTION_FINISHED);
|
||||
REQUIRE(ctx->GetReturnDWord() == 1);
|
||||
ctxPool->ReturnContextToPool(ctx);
|
||||
|
||||
delete script;
|
||||
}
|
||||
|
||||
TEST_CASE("Invoke PreventSecondaryEffects script function") {
|
||||
auto mainLib = TestLibrary::GetLibrary();
|
||||
auto script = GetScript(mainLib, "PreventSecondaryEffectsScript"_cnc);
|
||||
|
||||
Reference in New Issue
Block a user