mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
Update ability.ts
This commit is contained in:
parent
d0b3a10357
commit
8f576b3298
@ -2277,10 +2277,21 @@ export class PostTurnFormChangeAbAttr extends PostTurnAbAttr {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Grabs the last failed Pokeball used
|
||||
* @extends PostTurnAbAttr
|
||||
* @see {@linkcode applyPostTurn} */
|
||||
export class FetchBallAbAttr extends PostTurnAbAttr {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
/**
|
||||
* Adds the last used Pokeball back into the player's inventory
|
||||
* @param pokemon {@linkcode Pokemon} with this ability
|
||||
* @param passive N/A
|
||||
* @param args N/A
|
||||
* @returns true if player has used a pokeball and this pokemon is owned by the player
|
||||
*/
|
||||
applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||
let lastUsed = pokemon.scene.currentBattle.lastUsedPokeball;
|
||||
if(lastUsed != null && pokemon.isPlayer) {
|
||||
|
Loading…
Reference in New Issue
Block a user