diff --git a/src/data/move.ts b/src/data/move.ts index 1e2c5e7485b..dc6d2d18e5c 100755 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -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 failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune(); 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 cancelled = new Utils.BooleanHolder(false); user.scene.getField(true).map(p=>applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled)); @@ -6493,7 +6525,10 @@ export function initMoves() { .attr(AbilityGiveAttr), new StatusMove(Moves.AFTER_YOU, Type.NORMAL, -1, 15, -1, 0, 5) .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) .soundBased() .partial(), diff --git a/src/overrides.ts b/src/overrides.ts index 8f5d4978be3..eeb3f8c7cd1 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -28,7 +28,7 @@ import { modifierTypes } from "./modifier/modifier-type"; // a specific seed (default: a random string of 24 characters) export const SEED_OVERRIDE: string = ""; 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_BIOME_OVERRIDE: Biome = Biome.TOWN; 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 STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE; export const GENDER_OVERRIDE: Gender = null; -export const MOVESET_OVERRIDE: Array = []; +export const MOVESET_OVERRIDE: Array = [Moves.AFTER_YOU, Moves.HEADBUTT, Moves.FOCUS_PUNCH,Moves.ACCELEROCK]; export const SHINY_OVERRIDE: boolean = false; export const VARIANT_OVERRIDE: Variant = 0; @@ -75,13 +75,13 @@ export const VARIANT_OVERRIDE: Variant = 0; * OPPONENT / ENEMY OVERRIDES */ -export const OPP_SPECIES_OVERRIDE: Species | integer = 0; -export const OPP_LEVEL_OVERRIDE: number = 0; +export const OPP_SPECIES_OVERRIDE: Species | integer = 2; +export const OPP_LEVEL_OVERRIDE: number = 5; export const OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE; export const OPP_PASSIVE_ABILITY_OVERRIDE = Abilities.NONE; export const OPP_STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE; export const OPP_GENDER_OVERRIDE: Gender = null; -export const OPP_MOVESET_OVERRIDE: Array = []; +export const OPP_MOVESET_OVERRIDE: Array = [Moves.SPLASH,Moves.SPLASH,Moves.SPLASH,Moves.SPLASH]; export const OPP_SHINY_OVERRIDE: boolean = false; export const OPP_VARIANT_OVERRIDE: Variant = 0;