Implement AngelScript support for effect chance changes.
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:
@@ -170,6 +170,23 @@ public:
|
||||
void PreventSelfSwitch(const CreatureLib::Battling::SwitchTurnChoice* choice, bool* outResult) override {
|
||||
throw NotImplementedException(); // TODO
|
||||
}
|
||||
|
||||
void ModifyEffectChance(const CreatureLib::Battling::ExecutingAttack* attack,
|
||||
CreatureLib::Battling::Creature* target, float* chance) override {
|
||||
CALL_HOOK(ModifyEffectChance, {
|
||||
ctx->SetArgObject(0, (void*)attack);
|
||||
ctx->SetArgObject(1, (void*)target);
|
||||
ctx->SetArgAddress(2, chance);
|
||||
})
|
||||
}
|
||||
void ModifyIncomingEffectChance(const CreatureLib::Battling::ExecutingAttack* attack,
|
||||
CreatureLib::Battling::Creature* target, float* chance) override {
|
||||
CALL_HOOK(ModifyIncomingEffectChance, {
|
||||
ctx->SetArgObject(0, (void*)attack);
|
||||
ctx->SetArgObject(1, (void*)target);
|
||||
ctx->SetArgAddress(2, chance);
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
#undef CALL_HOOK
|
||||
|
||||
Reference in New Issue
Block a user