mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
Add TSDocs
This commit is contained in:
parent
bedd5f3492
commit
727db35c7a
@ -254,11 +254,25 @@ export class ConfusedTag extends BattlerTag {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tag applied to the {@linkcode Move.DESTINY_BOND} user.
|
||||||
|
* See {@linkcode apply}
|
||||||
|
*/
|
||||||
export class DestinyBondTag extends BattlerTag {
|
export class DestinyBondTag extends BattlerTag {
|
||||||
constructor(sourceMove: Moves, sourceId: integer) {
|
constructor(sourceMove: Moves, sourceId: integer) {
|
||||||
super(BattlerTagType.DESTINY_BOND, BattlerTagLapseType.PRE_MOVE, 1, sourceMove, sourceId);
|
super(BattlerTagType.DESTINY_BOND, BattlerTagLapseType.PRE_MOVE, 1, sourceMove, sourceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destiny bond tag.
|
||||||
|
* Lapses either before the user's move and does nothing
|
||||||
|
* or after receiving damage. If the damage received from foe
|
||||||
|
* is fatal, it takes down the foe as well.
|
||||||
|
*
|
||||||
|
* @param {Pokemon} pokemon Pokemon that is attacking the Destiny Bond user.
|
||||||
|
* @param {BattlerTagLapseType} lapseType CUSTOM or PRE_MOVE
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||||
if (lapseType !== BattlerTagLapseType.CUSTOM) {
|
if (lapseType !== BattlerTagLapseType.CUSTOM) {
|
||||||
return super.lapse(pokemon, lapseType);
|
return super.lapse(pokemon, lapseType);
|
||||||
|
@ -4255,9 +4255,17 @@ export class DestinyBondAttr extends MoveEffectAttr {
|
|||||||
super(true, MoveEffectTrigger.PRE_APPLY);
|
super(true, MoveEffectTrigger.PRE_APPLY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies {@linkcode BattlerTagType.DESTINY_BOND} to the user.
|
||||||
|
* @param {Pokemon} user User that is having the tag applied to.
|
||||||
|
* @param {Pokemon} target N/A
|
||||||
|
* @param {Move} move {@linkcode Move.DESTINY_BOND}
|
||||||
|
* @param {any[]} args N/A
|
||||||
|
* @returns true
|
||||||
|
*/
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
user.scene.queueMessage(`${getPokemonMessage(user, ' is trying\nto take its foe down with it!')}`);
|
user.scene.queueMessage(`${getPokemonMessage(user, ' is trying\nto take its foe down with it!')}`);
|
||||||
target.addTag(BattlerTagType.DESTINY_BOND, undefined, move.id, user.id);
|
user.addTag(BattlerTagType.DESTINY_BOND, undefined, move.id, user.id);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user