[Beta][P2] Fix Grip Claw

This commit is contained in:
MokaStitcher 2024-10-08 14:14:15 +02:00
parent f5fa478eb8
commit c369a211ee

View File

@ -3084,11 +3084,12 @@ export abstract class HeldItemTransferModifier extends PokemonHeldItemModifier {
* Steals an item from a set of target Pokemon. * Steals an item from a set of target Pokemon.
* This prioritizes high-tier held items when selecting the item to steal. * This prioritizes high-tier held items when selecting the item to steal.
* @param pokemon The {@linkcode Pokemon} holding this item * @param pokemon The {@linkcode Pokemon} holding this item
* @param target The {@linkcode Pokemon} to steal from (optional)
* @param _args N/A * @param _args N/A
* @returns `true` if an item was stolen; false otherwise. * @returns `true` if an item was stolen; false otherwise.
*/ */
override apply(pokemon: Pokemon, ..._args: unknown[]): boolean { override apply(pokemon: Pokemon, target?:Pokemon, ..._args: unknown[]): boolean {
const opponents = this.getTargets(pokemon); const opponents = this.getTargets(pokemon, target);
if (!opponents.length) { if (!opponents.length) {
return false; return false;