mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 05:42: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 {
|
export class FetchBallAbAttr extends PostTurnAbAttr {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
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 {
|
applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||||
let lastUsed = pokemon.scene.currentBattle.lastUsedPokeball;
|
let lastUsed = pokemon.scene.currentBattle.lastUsedPokeball;
|
||||||
if(lastUsed != null && pokemon.isPlayer) {
|
if(lastUsed != null && pokemon.isPlayer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user