Adds new script hook to prevent incoming critical hits
This commit is contained in:
@@ -8,6 +8,12 @@
|
||||
|
||||
bool PkmnLib::Battling::MiscLibrary::IsCritical(CreatureLib::Battling::ExecutingAttack* attack,
|
||||
CreatureLib::Battling::Creature* target, uint8_t hit) const {
|
||||
bool preventCrit = false;
|
||||
PKMN_HOOK(PreventIncomingCritical, target, attack, target, hit, &preventCrit);
|
||||
if (preventCrit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t critStage = 0;
|
||||
PKMN_HOOK(ModifyCriticalStage, attack, attack, target, hit, &critStage);
|
||||
Ensure(target->GetBattle().HasValue());
|
||||
|
||||
Reference in New Issue
Block a user