Adds OnFaintingOpponent script hook to Angelscript.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b0f9daef60
commit
67df06ef04
|
@ -365,3 +365,11 @@ void AngelScriptScript::OnIncomingHit(const CreatureLib::Battling::ExecutingAtta
|
|||
ctx->SetArgByte(2, hitNumber);
|
||||
})
|
||||
}
|
||||
void AngelScriptScript::OnFaintingOpponent(const CreatureLib::Battling::ExecutingAttack* attack,
|
||||
CreatureLib::Battling::Creature* target, u8 hitNumber) {
|
||||
CALL_HOOK(OnFaintingOpponent, {
|
||||
ctx->SetArgObject(0, (void*)attack);
|
||||
ctx->SetArgObject(1, (void*)target);
|
||||
ctx->SetArgByte(2, hitNumber);
|
||||
})
|
||||
}
|
||||
|
|
|
@ -84,6 +84,8 @@ public:
|
|||
|
||||
void OnIncomingHit(const CreatureLib::Battling::ExecutingAttack* attack,
|
||||
CreatureLib::Battling::Creature* target, uint8_t hitNumber) override;
|
||||
void OnFaintingOpponent(const CreatureLib::Battling::ExecutingAttack* attack,
|
||||
CreatureLib::Battling::Creature* target, u8 hitNumber) override;
|
||||
void OnSecondaryEffect(const CreatureLib::Battling::ExecutingAttack* attack,
|
||||
CreatureLib::Battling::Creature* target, uint8_t hitNumber) override;
|
||||
|
||||
|
|
|
@ -116,6 +116,8 @@ public:
|
|||
PreventSecondaryEffects,
|
||||
"void PreventSecondaryEffects(ExecutingMove@ attack, Pokemon@ target, uint8 hit, bool& outResult)");
|
||||
SCRIPT_HOOK_FUNCTION(OnIncomingHit, "void OnIncomingHit(ExecutingMove@ attack, Pokemon@ target, uint8 hit)");
|
||||
SCRIPT_HOOK_FUNCTION(OnFaintingOpponent,
|
||||
"void OnFaintingOpponent(ExecutingMove@ attack, Pokemon@ target, uint8 hit)");
|
||||
SCRIPT_HOOK_FUNCTION(OnSecondaryEffect,
|
||||
"void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit)");
|
||||
SCRIPT_HOOK_FUNCTION(OnAfterHits, "void OnAfterHits(ExecutingMove@ attack, Pokemon@ target)");
|
||||
|
|
|
@ -28,6 +28,7 @@ shared abstract class PkmnScript {
|
|||
void ChangeEffectiveness(ExecutingMove@ attack, Pokemon@ target, uint8 hit, float& effectiveness){};
|
||||
void BlockCritical(ExecutingMove@ attack, Pokemon@ target, uint8 hit, bool& blockCritical){};
|
||||
void OnIncomingHit(ExecutingMove@ attack, Pokemon@ target, uint8 hit){};
|
||||
void OnFaintingOpponent(ExecutingMove@ attack, Pokemon@ target, uint8 hit){};
|
||||
void PreventSecondaryEffects(ExecutingMove@ attack, Pokemon@ target, uint8 hit, bool& outResult){};
|
||||
void OnSecondaryEffect(ExecutingMove@ attack, Pokemon@ target, uint8 hit){};
|
||||
void OnAfterHits(ExecutingMove@ attack, Pokemon@ target){};
|
||||
|
|
Loading…
Reference in New Issue