Fix "falsex" type hint for Sheer Cold

This commit is contained in:
innerthunder 2024-10-10 21:10:43 -07:00
parent 3f63c147a3
commit 34318898c5

View File

@ -4556,19 +4556,20 @@ export class WaterSuperEffectTypeMultiplierAttr extends VariableMoveTypeMultipli
export class IceNoEffectTypeAttr extends VariableMoveTypeMultiplierAttr { export class IceNoEffectTypeAttr extends VariableMoveTypeMultiplierAttr {
/** /**
* Checks to see if the Target is Ice-Type or not. If so, the move will have no effect. * 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 user n/a
* @param {Pokemon} target Pokemon that is being checked whether Ice-Type or not. * @param target The {@linkcode Pokemon} targeted by the move
* @param {Move} move N/A * @param move n/a
* @param {any[]} args Sets to false if the target is Ice-Type, so it should do no damage/no effect. * @param args `[0]` a {@linkcode Utils.NumberHolder | NumberHolder} containing a type effectiveness multiplier
* @returns {boolean} Returns true if move is successful, false if Ice-Type. * @returns `true` if this Ice-type immunity applies; `false` otherwise
*/ */
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const multiplier = args[0] as Utils.NumberHolder;
if (target.isOfType(Type.ICE)) { if (target.isOfType(Type.ICE)) {
(args[0] as Utils.BooleanHolder).value = false; multiplier.value = 0;
return false;
}
return true; return true;
} }
return false;
}
} }
export class FlyingTypeMultiplierAttr extends VariableMoveTypeMultiplierAttr { export class FlyingTypeMultiplierAttr extends VariableMoveTypeMultiplierAttr {