mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 08:16:04 +00:00
[Refactor] Remove unused parameters in move flag functions (#4516)
Also fix tsdocs for these functions
This commit is contained in:
parent
5a20416fd4
commit
e9ee2c1179
140
src/data/move.ts
140
src/data/move.ts
@ -398,220 +398,202 @@ export default class Move implements Localizable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.MAKES_CONTACT} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.MAKES_CONTACT} flag for the calling Move
|
||||||
* @param makesContact The value (boolean) to set the flag to
|
* @param setFlag Default `true`, set to `false` if the move doesn't make contact
|
||||||
|
* @see {@linkcode Abilities.STATIC}
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
makesContact(makesContact: boolean = true): this {
|
makesContact(setFlag: boolean = true): this {
|
||||||
this.setFlag(MoveFlags.MAKES_CONTACT, makesContact);
|
this.setFlag(MoveFlags.MAKES_CONTACT, setFlag);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.IGNORE_PROTECT} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.IGNORE_PROTECT} flag for the calling Move
|
||||||
* @param ignoresProtect The value (boolean) to set the flag to
|
* @see {@linkcode Moves.CURSE}
|
||||||
* example: @see {@linkcode Moves.CURSE}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
ignoresProtect(ignoresProtect: boolean = true): this {
|
ignoresProtect(): this {
|
||||||
this.setFlag(MoveFlags.IGNORE_PROTECT, ignoresProtect);
|
this.setFlag(MoveFlags.IGNORE_PROTECT, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.IGNORE_VIRTUAL} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.IGNORE_VIRTUAL} flag for the calling Move
|
||||||
* @param ignoresVirtual The value (boolean) to set the flag to
|
* @see {@linkcode Moves.NATURE_POWER}
|
||||||
* example: @see {@linkcode Moves.NATURE_POWER}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
ignoresVirtual(ignoresVirtual: boolean = true): this {
|
ignoresVirtual(): this {
|
||||||
this.setFlag(MoveFlags.IGNORE_VIRTUAL, ignoresVirtual);
|
this.setFlag(MoveFlags.IGNORE_VIRTUAL, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.SOUND_BASED} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.SOUND_BASED} flag for the calling Move
|
||||||
* @param soundBased The value (boolean) to set the flag to
|
* @see {@linkcode Moves.UPROAR}
|
||||||
* example: @see {@linkcode Moves.UPROAR}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
soundBased(soundBased: boolean = true): this {
|
soundBased(): this {
|
||||||
this.setFlag(MoveFlags.SOUND_BASED, soundBased);
|
this.setFlag(MoveFlags.SOUND_BASED, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.HIDE_USER} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.HIDE_USER} flag for the calling Move
|
||||||
* @param hidesUser The value (boolean) to set the flag to
|
* @see {@linkcode Moves.TELEPORT}
|
||||||
* example: @see {@linkcode Moves.TELEPORT}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
hidesUser(hidesUser: boolean = true): this {
|
hidesUser(): this {
|
||||||
this.setFlag(MoveFlags.HIDE_USER, hidesUser);
|
this.setFlag(MoveFlags.HIDE_USER, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.HIDE_TARGET} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.HIDE_TARGET} flag for the calling Move
|
||||||
* @param hidesTarget The value (boolean) to set the flag to
|
* @see {@linkcode Moves.WHIRLWIND}
|
||||||
* example: @see {@linkcode Moves.WHIRLWIND}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
hidesTarget(hidesTarget: boolean = true): this {
|
hidesTarget(): this {
|
||||||
this.setFlag(MoveFlags.HIDE_TARGET, hidesTarget);
|
this.setFlag(MoveFlags.HIDE_TARGET, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.BITING_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.BITING_MOVE} flag for the calling Move
|
||||||
* @param bitingMove The value (boolean) to set the flag to
|
* @see {@linkcode Moves.BITE}
|
||||||
* example: @see {@linkcode Moves.BITE}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
bitingMove(bitingMove: boolean = true): this {
|
bitingMove(): this {
|
||||||
this.setFlag(MoveFlags.BITING_MOVE, bitingMove);
|
this.setFlag(MoveFlags.BITING_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.PULSE_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.PULSE_MOVE} flag for the calling Move
|
||||||
* @param pulseMove The value (boolean) to set the flag to
|
* @see {@linkcode Moves.WATER_PULSE}
|
||||||
* example: @see {@linkcode Moves.WATER_PULSE}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
pulseMove(pulseMove: boolean = true): this {
|
pulseMove(): this {
|
||||||
this.setFlag(MoveFlags.PULSE_MOVE, pulseMove);
|
this.setFlag(MoveFlags.PULSE_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.PUNCHING_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.PUNCHING_MOVE} flag for the calling Move
|
||||||
* @param punchingMove The value (boolean) to set the flag to
|
* @see {@linkcode Moves.DRAIN_PUNCH}
|
||||||
* example: @see {@linkcode Moves.DRAIN_PUNCH}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
punchingMove(punchingMove: boolean = true): this {
|
punchingMove(): this {
|
||||||
this.setFlag(MoveFlags.PUNCHING_MOVE, punchingMove);
|
this.setFlag(MoveFlags.PUNCHING_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.SLICING_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.SLICING_MOVE} flag for the calling Move
|
||||||
* @param slicingMove The value (boolean) to set the flag to
|
* @see {@linkcode Moves.X_SCISSOR}
|
||||||
* example: @see {@linkcode Moves.X_SCISSOR}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
slicingMove(slicingMove: boolean = true): this {
|
slicingMove(): this {
|
||||||
this.setFlag(MoveFlags.SLICING_MOVE, slicingMove);
|
this.setFlag(MoveFlags.SLICING_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.RECKLESS_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.RECKLESS_MOVE} flag for the calling Move
|
||||||
* @see {@linkcode Abilities.RECKLESS}
|
* @see {@linkcode Abilities.RECKLESS}
|
||||||
* @param recklessMove The value to set the flag to
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
recklessMove(recklessMove: boolean = true): this {
|
recklessMove(): this {
|
||||||
this.setFlag(MoveFlags.RECKLESS_MOVE, recklessMove);
|
this.setFlag(MoveFlags.RECKLESS_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.BALLBOMB_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.BALLBOMB_MOVE} flag for the calling Move
|
||||||
* @param ballBombMove The value (boolean) to set the flag to
|
* @see {@linkcode Moves.ELECTRO_BALL}
|
||||||
* example: @see {@linkcode Moves.ELECTRO_BALL}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
ballBombMove(ballBombMove: boolean = true): this {
|
ballBombMove(): this {
|
||||||
this.setFlag(MoveFlags.BALLBOMB_MOVE, ballBombMove);
|
this.setFlag(MoveFlags.BALLBOMB_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.POWDER_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.POWDER_MOVE} flag for the calling Move
|
||||||
* @param powderMove The value (boolean) to set the flag to
|
* @see {@linkcode Moves.STUN_SPORE}
|
||||||
* example: @see {@linkcode Moves.STUN_SPORE}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
powderMove(powderMove: boolean = true): this {
|
powderMove(): this {
|
||||||
this.setFlag(MoveFlags.POWDER_MOVE, powderMove);
|
this.setFlag(MoveFlags.POWDER_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.DANCE_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.DANCE_MOVE} flag for the calling Move
|
||||||
* @param danceMove The value (boolean) to set the flag to
|
* @see {@linkcode Moves.PETAL_DANCE}
|
||||||
* example: @see {@linkcode Moves.PETAL_DANCE}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
danceMove(danceMove: boolean = true): this {
|
danceMove(): this {
|
||||||
this.setFlag(MoveFlags.DANCE_MOVE, danceMove);
|
this.setFlag(MoveFlags.DANCE_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.WIND_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.WIND_MOVE} flag for the calling Move
|
||||||
* @param windMove The value (boolean) to set the flag to
|
* @see {@linkcode Moves.HURRICANE}
|
||||||
* example: @see {@linkcode Moves.HURRICANE}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
windMove(windMove: boolean = true): this {
|
windMove(): this {
|
||||||
this.setFlag(MoveFlags.WIND_MOVE, windMove);
|
this.setFlag(MoveFlags.WIND_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.TRIAGE_MOVE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.TRIAGE_MOVE} flag for the calling Move
|
||||||
* @param triageMove The value (boolean) to set the flag to
|
* @see {@linkcode Moves.ABSORB}
|
||||||
* example: @see {@linkcode Moves.ABSORB}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
triageMove(triageMove: boolean = true): this {
|
triageMove(): this {
|
||||||
this.setFlag(MoveFlags.TRIAGE_MOVE, triageMove);
|
this.setFlag(MoveFlags.TRIAGE_MOVE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.IGNORE_ABILITIES} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.IGNORE_ABILITIES} flag for the calling Move
|
||||||
* @param ignoresAbilities sThe value (boolean) to set the flag to
|
* @see {@linkcode Moves.SUNSTEEL_STRIKE}
|
||||||
* example: @see {@linkcode Moves.SUNSTEEL_STRIKE}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
ignoresAbilities(ignoresAbilities: boolean = true): this {
|
ignoresAbilities(): this {
|
||||||
this.setFlag(MoveFlags.IGNORE_ABILITIES, ignoresAbilities);
|
this.setFlag(MoveFlags.IGNORE_ABILITIES, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.CHECK_ALL_HITS} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.CHECK_ALL_HITS} flag for the calling Move
|
||||||
* @param checkAllHits The value (boolean) to set the flag to
|
* @see {@linkcode Moves.TRIPLE_AXEL}
|
||||||
* example: @see {@linkcode Moves.TRIPLE_AXEL}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
checkAllHits(checkAllHits: boolean = true): this {
|
checkAllHits(): this {
|
||||||
this.setFlag(MoveFlags.CHECK_ALL_HITS, checkAllHits);
|
this.setFlag(MoveFlags.CHECK_ALL_HITS, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.IGNORE_SUBSTITUTE} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.IGNORE_SUBSTITUTE} flag for the calling Move
|
||||||
* @param ignoresSubstitute The value (boolean) to set the flag to
|
* @see {@linkcode Moves.WHIRLWIND}
|
||||||
* example: @see {@linkcode Moves.WHIRLWIND}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
ignoresSubstitute(ignoresSubstitute: boolean = true): this {
|
ignoresSubstitute(): this {
|
||||||
this.setFlag(MoveFlags.IGNORE_SUBSTITUTE, ignoresSubstitute);
|
this.setFlag(MoveFlags.IGNORE_SUBSTITUTE, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the {@linkcode MoveFlags.REDIRECT_COUNTER} flag for the calling Move
|
* Sets the {@linkcode MoveFlags.REDIRECT_COUNTER} flag for the calling Move
|
||||||
* @param redirectCounter The value (boolean) to set the flag to
|
* @see {@linkcode Moves.METAL_BURST}
|
||||||
* example: @see {@linkcode Moves.METAL_BURST}
|
|
||||||
* @returns The {@linkcode Move} that called this function
|
* @returns The {@linkcode Move} that called this function
|
||||||
*/
|
*/
|
||||||
redirectCounter(redirectCounter: boolean = true): this {
|
redirectCounter(): this {
|
||||||
this.setFlag(MoveFlags.REDIRECT_COUNTER, redirectCounter);
|
this.setFlag(MoveFlags.REDIRECT_COUNTER, true);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7268,7 +7250,7 @@ export function initMoves() {
|
|||||||
new StatusMove(Moves.CURSE, Type.GHOST, -1, 10, -1, 0, 2)
|
new StatusMove(Moves.CURSE, Type.GHOST, -1, 10, -1, 0, 2)
|
||||||
.attr(CurseAttr)
|
.attr(CurseAttr)
|
||||||
.ignoresSubstitute()
|
.ignoresSubstitute()
|
||||||
.ignoresProtect(true)
|
.ignoresProtect()
|
||||||
.target(MoveTarget.CURSE),
|
.target(MoveTarget.CURSE),
|
||||||
new AttackMove(Moves.FLAIL, Type.NORMAL, MoveCategory.PHYSICAL, -1, 100, 15, -1, 0, 2)
|
new AttackMove(Moves.FLAIL, Type.NORMAL, MoveCategory.PHYSICAL, -1, 100, 15, -1, 0, 2)
|
||||||
.attr(LowHpPowerAttr),
|
.attr(LowHpPowerAttr),
|
||||||
|
Loading…
Reference in New Issue
Block a user