Make applyPostApplyEffects work

This commit is contained in:
Sirz Benjie 2025-02-09 00:42:38 -06:00
parent 64025954d6
commit d6cbd9f4e7
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -498,8 +498,8 @@ export class MoveEffectPhase extends PokemonPhase {
* @param lastHit - `true` if this is the last hit in a multi-hit attack * @param lastHit - `true` if this is the last hit in a multi-hit attack
* @returns a function intended to be passed into a `then()` call. * @returns a function intended to be passed into a `then()` call.
*/ */
protected applyPostApplyEffects(user: Pokemon, target: Pokemon, firstHit: boolean, lastHit: boolean): () => void { protected applyPostApplyEffects(user: Pokemon, target: Pokemon, firstHit: boolean, lastHit: boolean): void {
return () => applyFilteredMoveAttrs((attr: MoveAttr) => applyFilteredMoveAttrs((attr: MoveAttr) =>
attr instanceof MoveEffectAttr attr instanceof MoveEffectAttr
&& attr.trigger === MoveEffectTrigger.POST_APPLY && attr.trigger === MoveEffectTrigger.POST_APPLY
&& !attr.selfTarget && !attr.selfTarget