mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 22:02:18 +02:00
Add tsdoc comments
This commit is contained in:
parent
60ac0a1ab8
commit
7ff81c3638
@ -988,6 +988,12 @@ export class MoveTypeChangeAttr extends PreAttackAbAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class for abilities that boost the damage of moves
|
||||||
|
* For abilities that boost the base power of moves, see VariableMovePowerAbAttr
|
||||||
|
* @param damageMultiplier the amount to multiply the damage by
|
||||||
|
* @param condition the condition for this ability to be applied
|
||||||
|
*/
|
||||||
export class DamageBoostAbAttr extends PreAttackAbAttr {
|
export class DamageBoostAbAttr extends PreAttackAbAttr {
|
||||||
private damageMultiplier: number;
|
private damageMultiplier: number;
|
||||||
private condition: PokemonAttackCondition;
|
private condition: PokemonAttackCondition;
|
||||||
@ -998,9 +1004,18 @@ export class DamageBoostAbAttr extends PreAttackAbAttr {
|
|||||||
this.condition = condition;
|
this.condition = condition;
|
||||||
}
|
}
|
||||||
|
|
||||||
applyPreAttack(pokemon: Pokemon, passive: boolean, target: Pokemon, move: PokemonMove, args: any[]): boolean {
|
/**
|
||||||
if (this.condition(pokemon, target, move.getMove())) {
|
*
|
||||||
(args[0] as Utils.NumberHolder).value *= this.damageMultiplier;
|
* @param pokemon the attacker pokemon
|
||||||
|
* @param passive N/A
|
||||||
|
* @param defender the target pokemon
|
||||||
|
* @param move the move used by the attacker pokemon
|
||||||
|
* @param args Utils.NumberHolder as damage
|
||||||
|
* @returns true if the function succeeds
|
||||||
|
*/
|
||||||
|
applyPreAttack(pokemon: Pokemon, passive: boolean, defender: Pokemon, move: PokemonMove, args: any[]): boolean {
|
||||||
|
if (this.condition(pokemon, defender, move.getMove())) {
|
||||||
|
(args[0] as Utils.NumberHolder).value *= this.damageMultiplier;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user