mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-11 19:02:16 +02:00
Implemented Snipe Shot and Stalwart/Propeller Tail
This commit is contained in:
parent
ea5e535f9f
commit
78abf92a82
@ -2321,6 +2321,8 @@ export class RedirectTypeMoveAbAttr extends RedirectMoveAbAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class BlockRedirectAbAttr extends AbAttr { }
|
||||||
|
|
||||||
export class ReduceStatusEffectDurationAbAttr extends AbAttr {
|
export class ReduceStatusEffectDurationAbAttr extends AbAttr {
|
||||||
private statusEffect: StatusEffect;
|
private statusEffect: StatusEffect;
|
||||||
|
|
||||||
@ -3407,7 +3409,7 @@ export function initAbilities() {
|
|||||||
new Ability(Abilities.COTTON_DOWN, 8)
|
new Ability(Abilities.COTTON_DOWN, 8)
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new Ability(Abilities.PROPELLER_TAIL, 8)
|
new Ability(Abilities.PROPELLER_TAIL, 8)
|
||||||
.unimplemented(),
|
.attr(BlockRedirectAbAttr),
|
||||||
new Ability(Abilities.MIRROR_ARMOR, 8)
|
new Ability(Abilities.MIRROR_ARMOR, 8)
|
||||||
.ignorable()
|
.ignorable()
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
@ -3417,7 +3419,7 @@ export function initAbilities() {
|
|||||||
.attr(NoFusionAbilityAbAttr)
|
.attr(NoFusionAbilityAbAttr)
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new Ability(Abilities.STALWART, 8)
|
new Ability(Abilities.STALWART, 8)
|
||||||
.unimplemented(),
|
.attr(BlockRedirectAbAttr),
|
||||||
new Ability(Abilities.STEAM_ENGINE, 8)
|
new Ability(Abilities.STEAM_ENGINE, 8)
|
||||||
.attr(PostDefendStatChangeAbAttr, (target, user, move) => (move.type === Type.FIRE || move.type === Type.WATER) && move.category !== MoveCategory.STATUS, BattleStat.SPD, 6),
|
.attr(PostDefendStatChangeAbAttr, (target, user, move) => (move.type === Type.FIRE || move.type === Type.WATER) && move.category !== MoveCategory.STATUS, BattleStat.SPD, 6),
|
||||||
new Ability(Abilities.PUNK_ROCK, 8)
|
new Ability(Abilities.PUNK_ROCK, 8)
|
||||||
|
@ -2598,6 +2598,9 @@ const crashDamageFunc = (user: Pokemon, move: Move) => {
|
|||||||
|
|
||||||
export class TypelessAttr extends MoveAttr { }
|
export class TypelessAttr extends MoveAttr { }
|
||||||
|
|
||||||
|
export class BypassRedirectAttr extends MoveAttr { }
|
||||||
|
|
||||||
|
|
||||||
export class DisableMoveAttr extends MoveEffectAttr {
|
export class DisableMoveAttr extends MoveEffectAttr {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(false);
|
super(false);
|
||||||
@ -6061,7 +6064,7 @@ export function initMoves() {
|
|||||||
.attr(DiscourageFrequentUseAttr)
|
.attr(DiscourageFrequentUseAttr)
|
||||||
.ignoresVirtual(),
|
.ignoresVirtual(),
|
||||||
new AttackMove(Moves.SNIPE_SHOT, Type.WATER, MoveCategory.SPECIAL, 80, 100, 15, -1, 0, 8)
|
new AttackMove(Moves.SNIPE_SHOT, Type.WATER, MoveCategory.SPECIAL, 80, 100, 15, -1, 0, 8)
|
||||||
.partial(),
|
.attr(BypassRedirectAttr),
|
||||||
new AttackMove(Moves.JAW_LOCK, Type.DARK, MoveCategory.PHYSICAL, 80, 100, 10, -1, 0, 8)
|
new AttackMove(Moves.JAW_LOCK, Type.DARK, MoveCategory.PHYSICAL, 80, 100, 10, -1, 0, 8)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, false, 1)
|
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, false, 1)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, true, false, 1)
|
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, true, false, 1)
|
||||||
|
@ -5,19 +5,19 @@ import { Moves } from "./data/enums/moves";
|
|||||||
import { WeatherType } from "./data/weather";
|
import { WeatherType } from "./data/weather";
|
||||||
|
|
||||||
export const SEED_OVERRIDE = '';
|
export const SEED_OVERRIDE = '';
|
||||||
export const STARTER_SPECIES_OVERRIDE = 0;
|
export const STARTER_SPECIES_OVERRIDE = 847;
|
||||||
export const STARTER_FORM_OVERRIDE = 0;
|
export const STARTER_FORM_OVERRIDE = 0;
|
||||||
export const STARTING_LEVEL_OVERRIDE = 0;
|
export const STARTING_LEVEL_OVERRIDE = 50;
|
||||||
export const STARTING_WAVE_OVERRIDE = 0;
|
export const STARTING_WAVE_OVERRIDE = 0;
|
||||||
export const STARTING_BIOME_OVERRIDE = Biome.TOWN;
|
export const STARTING_BIOME_OVERRIDE = Biome.SWAMP;
|
||||||
export const STARTING_MONEY_OVERRIDE = 0;
|
export const STARTING_MONEY_OVERRIDE = 10000;
|
||||||
export const WEATHER_OVERRIDE = WeatherType.NONE;
|
export const WEATHER_OVERRIDE = WeatherType.NONE;
|
||||||
export const DOUBLE_BATTLE_OVERRIDE = false;
|
export const DOUBLE_BATTLE_OVERRIDE = true;
|
||||||
|
|
||||||
export const ABILITY_OVERRIDE = Abilities.NONE;
|
export const ABILITY_OVERRIDE = Abilities.NONE;
|
||||||
export const PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
|
export const PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
|
||||||
export const MOVE_OVERRIDE = Moves.NONE;
|
export const MOVE_OVERRIDE = Moves.NONE;
|
||||||
export const MOVE_OVERRIDE_2 = Moves.NONE;
|
export const MOVE_OVERRIDE_2 = Moves.SNIPE_SHOT;
|
||||||
export const OPP_SPECIES_OVERRIDE = 0;
|
export const OPP_SPECIES_OVERRIDE = 0;
|
||||||
export const OPP_ABILITY_OVERRIDE = Abilities.NONE;
|
export const OPP_ABILITY_OVERRIDE = Abilities.NONE;
|
||||||
export const OPP_PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
|
export const OPP_PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
|
||||||
|
@ -2,7 +2,7 @@ import BattleScene, { AnySound, bypassLogin, startingWave } from "./battle-scene
|
|||||||
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon";
|
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon";
|
||||||
import * as Utils from './utils';
|
import * as Utils from './utils';
|
||||||
import { Moves } from "./data/enums/moves";
|
import { Moves } from "./data/enums/moves";
|
||||||
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr, PreMoveMessageAttr, HealStatusEffectAttr, IgnoreOpponentStatChangesAttr, NoEffectAttr, FixedDamageAttr, PostVictoryStatChangeAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr, VariableTargetAttr } from "./data/move";
|
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr, PreMoveMessageAttr, HealStatusEffectAttr, IgnoreOpponentStatChangesAttr, NoEffectAttr, BypassRedirectAttr ,FixedDamageAttr, PostVictoryStatChangeAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr, VariableTargetAttr } from "./data/move";
|
||||||
import { Mode } from './ui/ui';
|
import { Mode } from './ui/ui';
|
||||||
import { Command } from "./ui/command-ui-handler";
|
import { Command } from "./ui/command-ui-handler";
|
||||||
import { Stat } from "./data/pokemon-stat";
|
import { Stat } from "./data/pokemon-stat";
|
||||||
@ -30,7 +30,7 @@ import { Weather, WeatherType, getRandomWeatherType, getTerrainBlockMessage, get
|
|||||||
import { TempBattleStat } from "./data/temp-battle-stat";
|
import { TempBattleStat } from "./data/temp-battle-stat";
|
||||||
import { ArenaTagSide, ArenaTrapTag, MistTag, TrickRoomTag } from "./data/arena-tag";
|
import { ArenaTagSide, ArenaTrapTag, MistTag, TrickRoomTag } from "./data/arena-tag";
|
||||||
import { ArenaTagType } from "./data/enums/arena-tag-type";
|
import { ArenaTagType } from "./data/enums/arena-tag-type";
|
||||||
import { CheckTrappedAbAttr, IgnoreOpponentStatChangesAbAttr, PostAttackAbAttr, PostBattleAbAttr, PostDefendAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreSwitchOutAbAttr, PreWeatherDamageAbAttr, ProtectStatAbAttr, RedirectMoveAbAttr, RunSuccessAbAttr, StatChangeMultiplierAbAttr, SuppressWeatherEffectAbAttr, SyncEncounterNatureAbAttr, applyAbAttrs, applyCheckTrappedAbAttrs, applyPostAttackAbAttrs, applyPostBattleAbAttrs, applyPostDefendAbAttrs, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreSwitchOutAbAttrs, applyPreWeatherEffectAbAttrs, BattleStatMultiplierAbAttr, applyBattleStatMultiplierAbAttrs, IncrementMovePriorityAbAttr, applyPostVictoryAbAttrs, PostVictoryAbAttr, applyPostBattleInitAbAttrs, PostBattleInitAbAttr, BlockNonDirectDamageAbAttr as BlockNonDirectDamageAbAttr, applyPostKnockOutAbAttrs, PostKnockOutAbAttr, PostBiomeChangeAbAttr, applyPostFaintAbAttrs, PostFaintAbAttr, IncreasePpAbAttr, PostStatChangeAbAttr, applyPostStatChangeAbAttrs, AlwaysHitAbAttr, PreventBerryUseAbAttr, StatChangeCopyAbAttr } from "./data/ability";
|
import { CheckTrappedAbAttr, IgnoreOpponentStatChangesAbAttr, PostAttackAbAttr, PostBattleAbAttr, PostDefendAbAttr, PostSummonAbAttr, PostTurnAbAttr, PostWeatherLapseAbAttr, PreSwitchOutAbAttr, PreWeatherDamageAbAttr, ProtectStatAbAttr, RedirectMoveAbAttr, BlockRedirectAbAttr, RunSuccessAbAttr, StatChangeMultiplierAbAttr, SuppressWeatherEffectAbAttr, SyncEncounterNatureAbAttr, applyAbAttrs, applyCheckTrappedAbAttrs, applyPostAttackAbAttrs, applyPostBattleAbAttrs, applyPostDefendAbAttrs, applyPostSummonAbAttrs, applyPostTurnAbAttrs, applyPostWeatherLapseAbAttrs, applyPreStatChangeAbAttrs, applyPreSwitchOutAbAttrs, applyPreWeatherEffectAbAttrs, BattleStatMultiplierAbAttr, applyBattleStatMultiplierAbAttrs, IncrementMovePriorityAbAttr, applyPostVictoryAbAttrs, PostVictoryAbAttr, applyPostBattleInitAbAttrs, PostBattleInitAbAttr, BlockNonDirectDamageAbAttr as BlockNonDirectDamageAbAttr, applyPostKnockOutAbAttrs, PostKnockOutAbAttr, PostBiomeChangeAbAttr, applyPostFaintAbAttrs, PostFaintAbAttr, IncreasePpAbAttr, PostStatChangeAbAttr, applyPostStatChangeAbAttrs, AlwaysHitAbAttr, PreventBerryUseAbAttr, StatChangeCopyAbAttr } from "./data/ability";
|
||||||
import { Unlockables, getUnlockableName } from "./system/unlockables";
|
import { Unlockables, getUnlockableName } from "./system/unlockables";
|
||||||
import { getBiomeKey } from "./field/arena";
|
import { getBiomeKey } from "./field/arena";
|
||||||
import { BattleType, BattlerIndex, TurnCommand } from "./battle";
|
import { BattleType, BattlerIndex, TurnCommand } from "./battle";
|
||||||
@ -2210,8 +2210,11 @@ export class MovePhase extends BattlePhase {
|
|||||||
const moveTarget = this.targets.length === 1
|
const moveTarget = this.targets.length === 1
|
||||||
? new Utils.IntegerHolder(this.targets[0])
|
? new Utils.IntegerHolder(this.targets[0])
|
||||||
: null;
|
: null;
|
||||||
if (moveTarget) {
|
if (moveTarget) {
|
||||||
this.scene.getField(true).filter(p => p !== this.pokemon).forEach(p => applyAbAttrs(RedirectMoveAbAttr, p, null, this.move.moveId, moveTarget));
|
if (!(this.pokemon.hasAbilityWithAttr(BlockRedirectAbAttr) || this.move.getMove().getAttrs(BypassRedirectAttr).length) )
|
||||||
|
{
|
||||||
|
this.scene.getField(true).filter(p => p !== this.pokemon).forEach(p => applyAbAttrs(RedirectMoveAbAttr, p, null, this.move.moveId, moveTarget));
|
||||||
|
}
|
||||||
this.targets[0] = moveTarget.value;
|
this.targets[0] = moveTarget.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user