mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Hydro Steam, Spirit Shackle, U-turn fix
Match formatting to project style Co-authored-by: Samuel H <flashfireex@gmail.com>
This commit is contained in:
parent
1a53c19e3b
commit
5bc9f889c7
@ -789,6 +789,22 @@ export class SacrificialFullRestoreAttr extends SacrificialAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class IgnoreWeatherTypeDebuffAttr extends MoveAttr {
|
||||||
|
public weather: WeatherType;
|
||||||
|
constructor(weather: WeatherType){
|
||||||
|
super();
|
||||||
|
this.weather=weather;
|
||||||
|
}
|
||||||
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
(args[0] as Utils.IntegerHolder).value = 1;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
getCondition(): MoveCondition | MoveConditionFunc {
|
||||||
|
return (user, target, move) => user.scene.arena.weather?.weatherType==this.weather;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export abstract class WeatherHealAttr extends HealAttr {
|
export abstract class WeatherHealAttr extends HealAttr {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(0.5);
|
super(0.5);
|
||||||
@ -2870,6 +2886,9 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
if (!player && !user.scene.currentBattle.battleType) {
|
if (!player && !user.scene.currentBattle.battleType) {
|
||||||
if (this.batonPass)
|
if (this.batonPass)
|
||||||
return false;
|
return false;
|
||||||
|
//U-turn et al should not switch a wild mon out, but a player's Dragon Tail can
|
||||||
|
if (!(user instanceof PlayerPokemon) && move.category !== MoveCategory.STATUS)
|
||||||
|
return false;
|
||||||
// Don't allow wild opponents to flee on the boss stage since it can ruin a run early on
|
// Don't allow wild opponents to flee on the boss stage since it can ruin a run early on
|
||||||
if (!(user.scene.currentBattle.waveIndex % 10))
|
if (!(user.scene.currentBattle.waveIndex % 10))
|
||||||
return false;
|
return false;
|
||||||
@ -5439,8 +5458,8 @@ export function initMoves() {
|
|||||||
new SelfStatusMove(Moves.BANEFUL_BUNKER, Type.POISON, -1, 10, -1, 4, 7)
|
new SelfStatusMove(Moves.BANEFUL_BUNKER, Type.POISON, -1, 10, -1, 4, 7)
|
||||||
.attr(ProtectAttr, BattlerTagType.BANEFUL_BUNKER),
|
.attr(ProtectAttr, BattlerTagType.BANEFUL_BUNKER),
|
||||||
new AttackMove(Moves.SPIRIT_SHACKLE, Type.GHOST, MoveCategory.PHYSICAL, 80, 100, 10, -1, 0, 7)
|
new AttackMove(Moves.SPIRIT_SHACKLE, Type.GHOST, MoveCategory.PHYSICAL, 80, 100, 10, -1, 0, 7)
|
||||||
.makesContact(false)
|
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, false, 1)
|
||||||
.partial(),
|
.makesContact(false),
|
||||||
new AttackMove(Moves.DARKEST_LARIAT, Type.DARK, MoveCategory.PHYSICAL, 85, 100, 10, -1, 0, 7)
|
new AttackMove(Moves.DARKEST_LARIAT, Type.DARK, MoveCategory.PHYSICAL, 85, 100, 10, -1, 0, 7)
|
||||||
.attr(IgnoreOpponentStatChangesAttr),
|
.attr(IgnoreOpponentStatChangesAttr),
|
||||||
new AttackMove(Moves.SPARKLING_ARIA, Type.WATER, MoveCategory.SPECIAL, 90, 100, 10, -1, 0, 7)
|
new AttackMove(Moves.SPARKLING_ARIA, Type.WATER, MoveCategory.SPECIAL, 90, 100, 10, -1, 0, 7)
|
||||||
@ -6161,7 +6180,7 @@ export function initMoves() {
|
|||||||
.attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.ELECTRIC && user.isGrounded() ? 1.5 : 1)
|
.attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.ELECTRIC && user.isGrounded() ? 1.5 : 1)
|
||||||
.slicingMove(),
|
.slicingMove(),
|
||||||
new AttackMove(Moves.HYDRO_STEAM, Type.WATER, MoveCategory.SPECIAL, 80, 100, 15, -1, 0, 9)
|
new AttackMove(Moves.HYDRO_STEAM, Type.WATER, MoveCategory.SPECIAL, 80, 100, 15, -1, 0, 9)
|
||||||
.partial(),
|
.attr(IgnoreWeatherTypeDebuffAttr, WeatherType.SUNNY),
|
||||||
new AttackMove(Moves.RUINATION, Type.DARK, MoveCategory.SPECIAL, 1, 90, 10, -1, 0, 9)
|
new AttackMove(Moves.RUINATION, Type.DARK, MoveCategory.SPECIAL, 1, 90, 10, -1, 0, 9)
|
||||||
.attr(TargetHalfHpDamageAttr),
|
.attr(TargetHalfHpDamageAttr),
|
||||||
new AttackMove(Moves.COLLISION_COURSE, Type.FIGHTING, MoveCategory.PHYSICAL, 100, 100, 5, -1, 0, 9)
|
new AttackMove(Moves.COLLISION_COURSE, Type.FIGHTING, MoveCategory.PHYSICAL, 100, 100, 5, -1, 0, 9)
|
||||||
|
@ -4,7 +4,7 @@ import { Variant, VariantSet, variantColorCache } from '#app/data/variant';
|
|||||||
import { variantData } from '#app/data/variant';
|
import { variantData } from '#app/data/variant';
|
||||||
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info';
|
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info';
|
||||||
import { Moves } from "../data/enums/moves";
|
import { Moves } from "../data/enums/moves";
|
||||||
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr, VariableMoveCategoryAttr } from "../data/move";
|
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr, VariableMoveCategoryAttr, IgnoreWeatherTypeDebuffAttr } from "../data/move";
|
||||||
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, starterPassiveAbilities } from '../data/pokemon-species';
|
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, starterPassiveAbilities } from '../data/pokemon-species';
|
||||||
import * as Utils from '../utils';
|
import * as Utils from '../utils';
|
||||||
import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type';
|
import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type';
|
||||||
@ -1265,6 +1265,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const arenaAttackTypeMultiplier = this.scene.arena.getAttackTypeMultiplier(type, source.isGrounded());
|
const arenaAttackTypeMultiplier = this.scene.arena.getAttackTypeMultiplier(type, source.isGrounded());
|
||||||
|
applyMoveAttrs(IgnoreWeatherTypeDebuffAttr, source, this, move, arenaAttackTypeMultiplier);
|
||||||
if (this.scene.arena.getTerrainType() === TerrainType.GRASSY && this.isGrounded() && type === Type.GROUND && move.moveTarget === MoveTarget.ALL_NEAR_OTHERS)
|
if (this.scene.arena.getTerrainType() === TerrainType.GRASSY && this.isGrounded() && type === Type.GROUND && move.moveTarget === MoveTarget.ALL_NEAR_OTHERS)
|
||||||
power.value /= 2;
|
power.value /= 2;
|
||||||
applyMoveAttrs(VariablePowerAttr, source, this, move, power);
|
applyMoveAttrs(VariablePowerAttr, source, this, move, power);
|
||||||
|
Loading…
Reference in New Issue
Block a user