[P3] Fix "falsex" type hint for Sheer Cold against ice types (#4638)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
f0cc1fc88b
commit
7645d5042d
|
@ -4556,18 +4556,19 @@ export class WaterSuperEffectTypeMultiplierAttr extends VariableMoveTypeMultipli
|
|||
export class IceNoEffectTypeAttr extends VariableMoveTypeMultiplierAttr {
|
||||
/**
|
||||
* Checks to see if the Target is Ice-Type or not. If so, the move will have no effect.
|
||||
* @param {Pokemon} user N/A
|
||||
* @param {Pokemon} target Pokemon that is being checked whether Ice-Type or not.
|
||||
* @param {Move} move N/A
|
||||
* @param {any[]} args Sets to false if the target is Ice-Type, so it should do no damage/no effect.
|
||||
* @returns {boolean} Returns true if move is successful, false if Ice-Type.
|
||||
* @param user n/a
|
||||
* @param target The {@linkcode Pokemon} targeted by the move
|
||||
* @param move n/a
|
||||
* @param args `[0]` a {@linkcode Utils.NumberHolder | NumberHolder} containing a type effectiveness multiplier
|
||||
* @returns `true` if this Ice-type immunity applies; `false` otherwise
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
const multiplier = args[0] as Utils.NumberHolder;
|
||||
if (target.isOfType(Type.ICE)) {
|
||||
(args[0] as Utils.BooleanHolder).value = false;
|
||||
return false;
|
||||
multiplier.value = 0;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue