mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-28 12:32:44 +02:00
Revert predicate stuff for now
going in separate PR
This commit is contained in:
parent
8c62ea2ab0
commit
565e18fcb2
@ -19,12 +19,7 @@ import {
|
|||||||
type Constructor,
|
type Constructor,
|
||||||
} from "#app/utils/common";
|
} from "#app/utils/common";
|
||||||
import { deepMergeSpriteData } from "#app/utils/data";
|
import { deepMergeSpriteData } from "#app/utils/data";
|
||||||
import type {
|
import type { Modifier, ModifierPredicate, TurnHeldItemTransferModifier } from "./modifier/modifier";
|
||||||
Modifier,
|
|
||||||
ModifierIdentityPredicate,
|
|
||||||
ModifierPredicate,
|
|
||||||
TurnHeldItemTransferModifier,
|
|
||||||
} from "./modifier/modifier";
|
|
||||||
import {
|
import {
|
||||||
ConsumableModifier,
|
ConsumableModifier,
|
||||||
ConsumablePokemonModifier,
|
ConsumablePokemonModifier,
|
||||||
@ -3411,11 +3406,6 @@ export default class BattleScene extends SceneBase {
|
|||||||
return (isPlayer ? this.modifiers : this.enemyModifiers).filter(modifierFilter);
|
return (isPlayer ? this.modifiers : this.enemyModifiers).filter(modifierFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
findModifier<T extends PersistentModifier>(
|
|
||||||
modifierFilter: ModifierIdentityPredicate<T>,
|
|
||||||
player?: boolean,
|
|
||||||
): T | undefined;
|
|
||||||
findModifier(modifierFilter: ModifierPredicate, player?: boolean): PersistentModifier | undefined;
|
|
||||||
/**
|
/**
|
||||||
* Find the first modifier that pass the `modifierFilter` function
|
* Find the first modifier that pass the `modifierFilter` function
|
||||||
* @param modifierFilter The function used to filter a target's modifiers
|
* @param modifierFilter The function used to filter a target's modifiers
|
||||||
|
@ -56,7 +56,6 @@ import {
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
|
||||||
export type ModifierPredicate = (modifier: Modifier) => boolean;
|
export type ModifierPredicate = (modifier: Modifier) => boolean;
|
||||||
export type ModifierIdentityPredicate<T extends Modifier> = (modifier: Modifier) => modifier is T;
|
|
||||||
|
|
||||||
const iconOverflowIndex = 24;
|
const iconOverflowIndex = 24;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user