[Bug][Ability] Fix shell armor not blocking crits (#5737)

Fix shell armor not blocking crits
This commit is contained in:
Sirz Benjie 2025-05-01 14:20:03 -05:00 committed by GitHub
parent a81cac547b
commit ff7860413a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3408,8 +3408,12 @@ export class BlockCritAbAttr extends AbAttr {
super(false);
}
override apply(pokemon: Pokemon, passive: boolean, simulated: boolean, cancelled: BooleanHolder, args: any[]): void {
(args[0] as BooleanHolder).value = true;
/**
* Apply the block crit ability by setting the value in the provided boolean holder to false
* @param args - [0] is a boolean holder representing whether the attack can crit
*/
override apply(_pokemon: Pokemon, _passive: boolean, _simulated: boolean, _cancelled: BooleanHolder, args: [BooleanHolder, ...any]): void {
(args[0]).value = false;
}
}