mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-09 18:02:18 +02:00
Complete after you implementation (no localization)
This commit is contained in:
parent
38f533276f
commit
857a3b83f0
@ -4981,12 +4981,44 @@ export class VariableTargetAttr extends MoveAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class AfterYouAttr extends MoveEffectAttr {
|
||||||
|
private afterYouText:string;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows the target of this move to act right after the user.
|
||||||
|
* @param user {@linkcode Pokemon} that is using the move.
|
||||||
|
* @param target {@linkcode Pokemon} that will move right after this move is used.
|
||||||
|
* @param move {@linkcode Move} {@linkcode Moves.AFTER_YOU}
|
||||||
|
* @param {any[]} args N/A
|
||||||
|
* @returns true
|
||||||
|
*/
|
||||||
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
user.scene.queueMessage(getPokemonMessage(target," took the kind offer!"));
|
||||||
|
|
||||||
|
/* Will find next acting phase of the targeted pokémon,
|
||||||
|
delete it and queue it next on successful delete. */
|
||||||
|
|
||||||
|
const nextAttackPhase:MovePhase = target.scene.findPhase((phase:MovePhase) => phase.pokemon === target) as MovePhase;
|
||||||
|
if (target.scene.tryRemovePhase((phase:MovePhase) => phase.pokemon === target)) {
|
||||||
|
target.scene.unshiftPhase(new MovePhase(target.scene, target, [...nextAttackPhase.targets], nextAttackPhase.move));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user.scene.arena.getTag(ArenaTagType.GRAVITY);
|
const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user.scene.arena.getTag(ArenaTagType.GRAVITY);
|
||||||
|
|
||||||
const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune();
|
const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune();
|
||||||
|
|
||||||
const failOnMaxCondition: MoveConditionFunc = (user, target, move) => !target.isMax();
|
const failOnMaxCondition: MoveConditionFunc = (user, target, move) => !target.isMax();
|
||||||
|
|
||||||
|
const failIfSingleBattle: MoveConditionFunc = (user, target, move) => user.scene.currentBattle.double;
|
||||||
|
|
||||||
const failIfDampCondition: MoveConditionFunc = (user, target, move) => {
|
const failIfDampCondition: MoveConditionFunc = (user, target, move) => {
|
||||||
const cancelled = new Utils.BooleanHolder(false);
|
const cancelled = new Utils.BooleanHolder(false);
|
||||||
user.scene.getField(true).map(p=>applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled));
|
user.scene.getField(true).map(p=>applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled));
|
||||||
@ -6493,7 +6525,10 @@ export function initMoves() {
|
|||||||
.attr(AbilityGiveAttr),
|
.attr(AbilityGiveAttr),
|
||||||
new StatusMove(Moves.AFTER_YOU, Type.NORMAL, -1, 15, -1, 0, 5)
|
new StatusMove(Moves.AFTER_YOU, Type.NORMAL, -1, 15, -1, 0, 5)
|
||||||
.ignoresProtect()
|
.ignoresProtect()
|
||||||
.unimplemented(),
|
.target(MoveTarget.NEAR_OTHER)
|
||||||
|
.condition(failIfSingleBattle)
|
||||||
|
.condition((user, target, move) => !target.turnData.acted)
|
||||||
|
.attr(AfterYouAttr),
|
||||||
new AttackMove(Moves.ROUND, Type.NORMAL, MoveCategory.SPECIAL, 60, 100, 15, -1, 0, 5)
|
new AttackMove(Moves.ROUND, Type.NORMAL, MoveCategory.SPECIAL, 60, 100, 15, -1, 0, 5)
|
||||||
.soundBased()
|
.soundBased()
|
||||||
.partial(),
|
.partial(),
|
||||||
|
@ -28,7 +28,7 @@ import { modifierTypes } from "./modifier/modifier-type";
|
|||||||
// a specific seed (default: a random string of 24 characters)
|
// a specific seed (default: a random string of 24 characters)
|
||||||
export const SEED_OVERRIDE: string = "";
|
export const SEED_OVERRIDE: string = "";
|
||||||
export const WEATHER_OVERRIDE: WeatherType = WeatherType.NONE;
|
export const WEATHER_OVERRIDE: WeatherType = WeatherType.NONE;
|
||||||
export const DOUBLE_BATTLE_OVERRIDE: boolean = false;
|
export const DOUBLE_BATTLE_OVERRIDE: boolean = true;
|
||||||
export const STARTING_WAVE_OVERRIDE: integer = 0;
|
export const STARTING_WAVE_OVERRIDE: integer = 0;
|
||||||
export const STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN;
|
export const STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN;
|
||||||
export const ARENA_TINT_OVERRIDE: TimeOfDay = null;
|
export const ARENA_TINT_OVERRIDE: TimeOfDay = null;
|
||||||
@ -67,7 +67,7 @@ export const ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
|||||||
export const PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
export const PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
export const STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
|
export const STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
|
||||||
export const GENDER_OVERRIDE: Gender = null;
|
export const GENDER_OVERRIDE: Gender = null;
|
||||||
export const MOVESET_OVERRIDE: Array<Moves> = [];
|
export const MOVESET_OVERRIDE: Array<Moves> = [Moves.AFTER_YOU, Moves.HEADBUTT, Moves.FOCUS_PUNCH,Moves.ACCELEROCK];
|
||||||
export const SHINY_OVERRIDE: boolean = false;
|
export const SHINY_OVERRIDE: boolean = false;
|
||||||
export const VARIANT_OVERRIDE: Variant = 0;
|
export const VARIANT_OVERRIDE: Variant = 0;
|
||||||
|
|
||||||
@ -75,13 +75,13 @@ export const VARIANT_OVERRIDE: Variant = 0;
|
|||||||
* OPPONENT / ENEMY OVERRIDES
|
* OPPONENT / ENEMY OVERRIDES
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const OPP_SPECIES_OVERRIDE: Species | integer = 0;
|
export const OPP_SPECIES_OVERRIDE: Species | integer = 2;
|
||||||
export const OPP_LEVEL_OVERRIDE: number = 0;
|
export const OPP_LEVEL_OVERRIDE: number = 5;
|
||||||
export const OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
export const OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
export const OPP_PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
|
export const OPP_PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
|
||||||
export const OPP_STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
|
export const OPP_STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
|
||||||
export const OPP_GENDER_OVERRIDE: Gender = null;
|
export const OPP_GENDER_OVERRIDE: Gender = null;
|
||||||
export const OPP_MOVESET_OVERRIDE: Array<Moves> = [];
|
export const OPP_MOVESET_OVERRIDE: Array<Moves> = [Moves.SPLASH,Moves.SPLASH,Moves.SPLASH,Moves.SPLASH];
|
||||||
export const OPP_SHINY_OVERRIDE: boolean = false;
|
export const OPP_SHINY_OVERRIDE: boolean = false;
|
||||||
export const OPP_VARIANT_OVERRIDE: Variant = 0;
|
export const OPP_VARIANT_OVERRIDE: Variant = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user