Support for specific PkmnLib functions in Scripts, added ModifyCriticalStage function.

This commit is contained in:
2020-02-20 13:28:31 +01:00
parent 83a49eee6c
commit 19cfcc9e32
7 changed files with 106 additions and 18 deletions

View File

@@ -0,0 +1,13 @@
#include "PkmnScript.hpp"
#define PKMN_HOOK(hookName, source, ...) \
{ \
auto aggregator = source->GetScriptIterator(); \
while (aggregator.HasNext()) { \
auto next = aggregator.GetNext(); \
if (next == nullptr) \
continue; \
auto castNext = dynamic_cast<PkmnLib::Battling::PkmnScript*>(next); \
castNext->hookName(__VA_ARGS__); \
} \
}