mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-29 19:52:27 +02:00
changes to input variables and documentation
This commit is contained in:
parent
97b7e9d9bf
commit
96a4fdbb77
@ -2835,10 +2835,10 @@ export class StuffCheeksTag extends MoveRestrictionBattlerTag {
|
||||
// Stuff Cheeks
|
||||
private moveId: Moves = Moves.STUFF_CHEEKS;
|
||||
/**
|
||||
* This Tag only lasts the turn the {@linkcode MoveUnselectableTag} was added.
|
||||
* This Tag only lasts the turn the {@linkcode StuffCheeksTag} was added.
|
||||
* @param move {@linkcode Moves} that is selected
|
||||
*/
|
||||
constructor(move: Moves) {
|
||||
constructor() {
|
||||
super(BattlerTagType.STUFF_CHEEKS, BattlerTagLapseType.TURN_END, 0, Moves.STUFF_CHEEKS);
|
||||
}
|
||||
|
||||
@ -3201,7 +3201,7 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: number, source
|
||||
case BattlerTagType.PSYCHO_SHIFT:
|
||||
return new PsychoShiftTag();
|
||||
case BattlerTagType.STUFF_CHEEKS:
|
||||
return new StuffCheeksTag(sourceMove);
|
||||
return new StuffCheeksTag();
|
||||
case BattlerTagType.NONE:
|
||||
default:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
||||
|
@ -7772,7 +7772,7 @@ export class StuffCheeksCondition extends MoveSelectCondition {
|
||||
* @returns true if the user is holding a berry, otherwise false
|
||||
*/
|
||||
private selectableCondition(user: Pokemon): boolean {
|
||||
return user?.getHeldItems()?.filter(m => m instanceof BerryModifier, user.isPlayer())?.length > 0;
|
||||
return user.getHeldItems().filter(m => m instanceof BerryModifier, user.isPlayer()).length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -7791,7 +7791,7 @@ export class StuffCheeksCondition extends MoveSelectCondition {
|
||||
}
|
||||
}
|
||||
|
||||
const hasBerryCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => user.scene.findModifiers(m => m instanceof BerryModifier, user.isPlayer()).length > 0;
|
||||
const hasBerryCondition: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => user.getHeldItems().filter(m => m instanceof BerryModifier, user.isPlayer()).length > 0;
|
||||
|
||||
export class MoveCondition {
|
||||
protected func: MoveConditionFunc;
|
||||
|
@ -149,7 +149,7 @@ export class CommandPhase extends FieldPhase {
|
||||
const move = playerPokemon.getMoveset()[cursor]!; //TODO: is this bang correct?
|
||||
this.scene.ui.setMode(Mode.MESSAGE);
|
||||
|
||||
// Decides between a Disabled, not selectable, Not Implemented, or No PP translation message
|
||||
// Decides between a Disabled, Not Implemented, or No PP translation message
|
||||
const errorMessage =
|
||||
playerPokemon.isMoveRestricted(move.moveId, playerPokemon)
|
||||
? playerPokemon.getRestrictingTag(move.moveId, playerPokemon)!.selectionDeniedText(playerPokemon, move.moveId)
|
||||
|
Loading…
Reference in New Issue
Block a user