From cfee310350f65533b3c9fe44e9750cbd6867b74f Mon Sep 17 00:00:00 2001 From: Madmadness65 Date: Fri, 3 May 2024 19:21:02 -0500 Subject: [PATCH 01/20] Adjust more passive abilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes some of the more problematic passives some Pokémon had. As usual, if there's any that you may have a problem with, we are always up for suggestions. --- src/data/biomes.ts | 4 ++-- src/data/pokemon-species.ts | 48 ++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/data/biomes.ts b/src/data/biomes.ts index 3dc124918..61da0410d 100644 --- a/src/data/biomes.ts +++ b/src/data/biomes.ts @@ -4391,8 +4391,8 @@ export const biomeTrainerPools: BiomeTrainerPools = { ] ], [ Species.SHAYMIN, Type.GRASS, -1, [ - [ Biome.MEADOW, BiomePoolTier.BOSS_ULTRA_RARE ] - ] + [ Biome.MEADOW, BiomePoolTier.BOSS_ULTRA_RARE ] + ] ], [ Species.ARCEUS, Type.NORMAL, -1, [ ] ], diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 57bb9230c..a045fe229 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -3209,7 +3209,7 @@ export const starterPassiveAbilities = { [Species.BELLSPROUT]: Abilities.CORROSION, [Species.TENTACOOL]: Abilities.INNARDS_OUT, [Species.GEODUDE]: Abilities.ROCKY_PAYLOAD, - [Species.PONYTA]: Abilities.PIXILATE, + [Species.PONYTA]: Abilities.MAGIC_GUARD, [Species.SLOWPOKE]: Abilities.UNAWARE, [Species.MAGNEMITE]: Abilities.MOTOR_DRIVE, [Species.FARFETCHD]: Abilities.PURE_POWER, @@ -3235,7 +3235,7 @@ export const starterPassiveAbilities = { [Species.SCYTHER]: Abilities.SPEED_BOOST, [Species.PINSIR]: Abilities.SAP_SIPPER, [Species.TAUROS]: Abilities.ROCK_HEAD, - [Species.MAGIKARP]: Abilities.BERSERK, + [Species.MAGIKARP]: Abilities.MULTISCALE, [Species.LAPRAS]: Abilities.LIQUID_VOICE, [Species.DITTO]: Abilities.GOOEY, [Species.EEVEE]: Abilities.PROTEAN, @@ -3249,16 +3249,16 @@ export const starterPassiveAbilities = { [Species.DRATINI]: Abilities.DELTA_STREAM, [Species.MEWTWO]: Abilities.NEUROFORCE, [Species.MEW]: Abilities.PROTEAN, - [Species.CHIKORITA]: Abilities.RIPEN, + [Species.CHIKORITA]: Abilities.THICK_FAT, [Species.CYNDAQUIL]: Abilities.TURBOBLAZE, [Species.TOTODILE]: Abilities.TOUGH_CLAWS, [Species.SENTRET]: Abilities.FLUFFY, [Species.HOOTHOOT]: Abilities.CURSED_BODY, - [Species.LEDYBA]: Abilities.SCREEN_CLEANER, + [Species.LEDYBA]: Abilities.PRANKSTER, [Species.SPINARAK]: Abilities.PRANKSTER, [Species.CHINCHOU]: Abilities.REGENERATOR, [Species.PICHU]: Abilities.TRANSISTOR, - [Species.CLEFFA]: Abilities.MISTY_SURGE, + [Species.CLEFFA]: Abilities.MAGIC_BOUNCE, [Species.IGGLYBUFF]: Abilities.SERENE_GRACE, [Species.TOGEPI]: Abilities.OPPORTUNIST, [Species.NATU]: Abilities.TINTED_LENS, @@ -3276,7 +3276,7 @@ export const starterPassiveAbilities = { [Species.DUNSPARCE]: Abilities.MARVEL_SCALE, [Species.GLIGAR]: Abilities.MERCILESS, [Species.SNUBBULL]: Abilities.BALL_FETCH, - [Species.QWILFISH]: Abilities.LIQUID_OOZE, + [Species.QWILFISH]: Abilities.TOXIC_DEBRIS, [Species.SHUCKLE]: Abilities.WELL_BAKED_BODY, [Species.HERACROSS]: Abilities.QUICK_FEET, [Species.SNEASEL]: Abilities.MOXIE, @@ -3292,7 +3292,7 @@ export const starterPassiveAbilities = { [Species.STANTLER]: Abilities.MAGIC_GUARD, [Species.SMEARGLE]: Abilities.QUICK_DRAW, [Species.TYROGUE]: Abilities.STAMINA, - [Species.SMOOCHUM]: Abilities.CUTE_CHARM, + [Species.SMOOCHUM]: Abilities.DAZZLING, [Species.ELEKID]: Abilities.IRON_FIST, [Species.MAGBY]: Abilities.CONTRARY, [Species.MILTANK]: Abilities.GLUTTONY, @@ -3303,7 +3303,7 @@ export const starterPassiveAbilities = { [Species.LUGIA]: Abilities.DELTA_STREAM, [Species.HO_OH]: Abilities.MAGIC_GUARD, [Species.CELEBI]: Abilities.GRASSY_SURGE, - [Species.TREECKO]: Abilities.GRASSY_SURGE, + [Species.TREECKO]: Abilities.TINTED_LENS, [Species.TORCHIC]: Abilities.RECKLESS, [Species.MUDKIP]: Abilities.REGENERATOR, [Species.POOCHYENA]: Abilities.STRONG_JAW, @@ -3320,7 +3320,7 @@ export const starterPassiveAbilities = { [Species.NINCADA]: Abilities.OVERCOAT, [Species.WHISMUR]: Abilities.PUNK_ROCK, [Species.MAKUHITA]: Abilities.STAMINA, - [Species.AZURILL]: Abilities.UNNERVE, + [Species.AZURILL]: Abilities.MISTY_SURGE, [Species.NOSEPASS]: Abilities.LEVITATE, [Species.SKITTY]: Abilities.SCRAPPY, [Species.SABLEYE]: Abilities.UNNERVE, @@ -3351,7 +3351,7 @@ export const starterPassiveAbilities = { [Species.BALTOY]: Abilities.OWN_TEMPO, [Species.LILEEP]: Abilities.WATER_ABSORB, [Species.ANORITH]: Abilities.WATER_ABSORB, - [Species.FEEBAS]: Abilities.PASTEL_VEIL, + [Species.FEEBAS]: Abilities.MAGIC_GUARD, [Species.CASTFORM]: Abilities.ADAPTABILITY, [Species.KECLEON]: Abilities.ADAPTABILITY, [Species.SHUPPET]: Abilities.MUMMY, @@ -3431,7 +3431,7 @@ export const starterPassiveAbilities = { [Species.VICTINI]: Abilities.SUPER_LUCK, [Species.SNIVY]: Abilities.MULTISCALE, [Species.TEPIG]: Abilities.ROCK_HEAD, - [Species.OSHAWOTT]: Abilities.MOLD_BREAKER, + [Species.OSHAWOTT]: Abilities.QUICK_DRAW, [Species.PATRAT]: Abilities.STAKEOUT, [Species.LILLIPUP]: Abilities.BALL_FETCH, [Species.PURRLOIN]: Abilities.DEFIANT, @@ -3444,14 +3444,14 @@ export const starterPassiveAbilities = { [Species.ROGGENROLA]: Abilities.SOLID_ROCK, [Species.WOOBAT]: Abilities.SOUL_HEART, [Species.DRILBUR]: Abilities.SAND_STREAM, - [Species.AUDINO]: Abilities.SERENE_GRACE, + [Species.AUDINO]: Abilities.FRIEND_GUARD, [Species.TIMBURR]: Abilities.STAMINA, [Species.TYMPOLE]: Abilities.MOODY, [Species.THROH]: Abilities.SIMPLE, [Species.SAWK]: Abilities.DEFIANT, [Species.SEWADDLE]: Abilities.SHARPNESS, [Species.VENIPEDE]: Abilities.INTIMIDATE, - [Species.COTTONEE]: Abilities.MISTY_SURGE, + [Species.COTTONEE]: Abilities.FLUFFY, [Species.PETILIL]: Abilities.DANCER, [Species.BASCULIN]: Abilities.OPPORTUNIST, [Species.SANDILE]: Abilities.STRONG_JAW, @@ -3460,7 +3460,7 @@ export const starterPassiveAbilities = { [Species.DWEBBLE]: Abilities.STAMINA, [Species.SCRAGGY]: Abilities.ROCK_HEAD, [Species.SIGILYPH]: Abilities.MAGICIAN, - [Species.YAMASK]: Abilities.GOOD_AS_GOLD, + [Species.YAMASK]: Abilities.PURIFYING_SALT, [Species.TIRTOUGA]: Abilities.SHELL_ARMOR, [Species.ARCHEN]: Abilities.ROCKY_PAYLOAD, [Species.TRUBBISH]: Abilities.GOOEY, @@ -3521,7 +3521,7 @@ export const starterPassiveAbilities = { [Species.SKIDDO]: Abilities.GRASSY_SURGE, [Species.PANCHAM]: Abilities.FLUFFY, [Species.FURFROU]: Abilities.BALL_FETCH, - [Species.ESPURR]: Abilities.PSYCHIC_SURGE, + [Species.ESPURR]: Abilities.FUR_COAT, [Species.HONEDGE]: Abilities.SHARPNESS, [Species.SPRITZEE]: Abilities.MISTY_SURGE, [Species.SWIRLIX]: Abilities.WELL_BAKED_BODY, @@ -3548,7 +3548,7 @@ export const starterPassiveAbilities = { [Species.HOOPA]: Abilities.OPPORTUNIST, [Species.VOLCANION]: Abilities.FILTER, [Species.ROWLET]: Abilities.SNIPER, - [Species.LITTEN]: Abilities.PRANKSTER, + [Species.LITTEN]: Abilities.FLAME_BODY, [Species.POPPLIO]: Abilities.PUNK_ROCK, [Species.PIKIPEK]: Abilities.ANGER_POINT, [Species.YUNGOOS]: Abilities.HUGE_POWER, @@ -3577,7 +3577,7 @@ export const starterPassiveAbilities = { [Species.KOMALA]: Abilities.GUTS, [Species.TURTONATOR]: Abilities.ANGER_SHELL, [Species.TOGEDEMARU]: Abilities.STATIC, - [Species.MIMIKYU]: Abilities.CURSED_BODY, + [Species.MIMIKYU]: Abilities.TOUGH_CLAWS, [Species.BRUXISH]: Abilities.MULTISCALE, [Species.DRAMPA]: Abilities.FLASH_FIRE, [Species.DHELMISE]: Abilities.INFILTRATOR, @@ -3607,9 +3607,9 @@ export const starterPassiveAbilities = { [Species.SOBBLE]: Abilities.SUPER_LUCK, [Species.SKWOVET]: Abilities.HONEY_GATHER, [Species.ROOKIDEE]: Abilities.IRON_BARBS, - [Species.BLIPBUG]: Abilities.TINTED_LENS, + [Species.BLIPBUG]: Abilities.PSYCHIC_SURGE, [Species.NICKIT]: Abilities.INTIMIDATE, - [Species.GOSSIFLEUR]: Abilities.STORM_DRAIN, + [Species.GOSSIFLEUR]: Abilities.GRASSY_SURGE, [Species.WOOLOO]: Abilities.ROCK_HEAD, [Species.CHEWTLE]: Abilities.ROCK_HEAD, [Species.YAMPER]: Abilities.STAKEOUT, @@ -3624,7 +3624,7 @@ export const starterPassiveAbilities = { [Species.SINISTEA]: Abilities.WATER_ABSORB, [Species.HATENNA]: Abilities.MAGIC_GUARD, [Species.IMPIDIMP]: Abilities.TANGLING_HAIR, - [Species.MILCERY]: Abilities.WELL_BAKED_BODY, + [Species.MILCERY]: Abilities.MISTY_SURGE, [Species.FALINKS]: Abilities.MOXIE, [Species.PINCURCHIN]: Abilities.IRON_BARBS, [Species.SNOM]: Abilities.SNOW_WARNING, @@ -3674,9 +3674,9 @@ export const starterPassiveAbilities = { [Species.RELLOR]: Abilities.MAGIC_GUARD, [Species.FLITTLE]: Abilities.COMPETITIVE, [Species.TINKATINK]: Abilities.HUGE_POWER, - [Species.WIGLETT]: Abilities.STORM_DRAIN, + [Species.WIGLETT]: Abilities.STURDY, [Species.BOMBIRDIER]: Abilities.UNAWARE, - [Species.FINIZEN]: Abilities.LIQUID_VOICE, + [Species.FINIZEN]: Abilities.IRON_FIST, [Species.VAROOM]: Abilities.SPEED_BOOST, [Species.CYCLIZAR]: Abilities.PROTEAN, [Species.ORTHWORM]: Abilities.HEATPROOF, @@ -3725,13 +3725,13 @@ export const starterPassiveAbilities = { [Species.ALOLA_RATTATA]: Abilities.CHEEK_POUCH, [Species.ALOLA_SANDSHREW]: Abilities.ICE_BODY, [Species.ALOLA_VULPIX]: Abilities.ICE_BODY, - [Species.ALOLA_DIGLETT]: Abilities.CUTE_CHARM, + [Species.ALOLA_DIGLETT]: Abilities.STURDY, [Species.ALOLA_MEOWTH]: Abilities.UNNERVE, [Species.ALOLA_GEODUDE]: Abilities.ELECTROMORPHOSIS, [Species.ALOLA_GRIMER]: Abilities.MERCILESS, [Species.ETERNAL_FLOETTE]: Abilities.MAGIC_GUARD, [Species.GALAR_MEOWTH]: Abilities.SUPER_LUCK, - [Species.GALAR_PONYTA]: Abilities.MAGIC_GUARD, + [Species.GALAR_PONYTA]: Abilities.PIXILATE, [Species.GALAR_SLOWPOKE]: Abilities.POISON_TOUCH, [Species.GALAR_FARFETCHD]: Abilities.SUPER_LUCK, [Species.GALAR_ARTICUNO]: Abilities.SERENE_GRACE, From ed24e03a6f79c3641295d4dc2c2d769a628c63f8 Mon Sep 17 00:00:00 2001 From: Madmadness65 Date: Fri, 3 May 2024 19:35:07 -0500 Subject: [PATCH 02/20] Fix Groudon's passive Changed from Flame Body to Protosynthesis, the original change wasn't discussed enough. --- src/data/pokemon-species.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index a045fe229..d118adc0f 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -3372,7 +3372,7 @@ export const starterPassiveAbilities = { [Species.LATIAS]: Abilities.SOUL_HEART, [Species.LATIOS]: Abilities.TINTED_LENS, [Species.KYOGRE]: Abilities.HYDRATION, - [Species.GROUDON]: Abilities.FLAME_BODY, + [Species.GROUDON]: Abilities.PROTOSYNTHESIS, [Species.RAYQUAZA]: Abilities.UNNERVE, [Species.JIRACHI]: Abilities.COMATOSE, [Species.DEOXYS]: Abilities.PROTEAN, From e02b85629f833f4a0c408d1d82c3c22cb478c807 Mon Sep 17 00:00:00 2001 From: Benjamin Odom Date: Fri, 3 May 2024 19:47:28 -0500 Subject: [PATCH 03/20] Fix Enemy Counter Moves The AI couldn't decide who to target with CounterDamageAttr moves which don't need a target. This change makes an exception. Now functions the same as when the player selects one of these moves. --- src/field/pokemon.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 909d255ee..27728680c 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -4,7 +4,7 @@ import { Variant, VariantSet, variantColorCache } from '#app/data/variant'; import { variantData } from '#app/data/variant'; import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info'; 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, CounterDamageAttr } from "../data/move"; import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities } from '../data/pokemon-species'; import * as Utils from '../utils'; import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type'; @@ -2731,6 +2731,10 @@ export class EnemyPokemon extends Pokemon { let targetScores: integer[] = []; for (let mt of moveTargets[move.id]) { + // Prevent a target score from being calculated when there isn't a target + if (mt === -1) + break; + const target = this.scene.getField()[mt]; let targetScore = move.getUserBenefitScore(this, target, move) + move.getTargetBenefitScore(this, target, move) * (mt < BattlerIndex.ENEMY === this.isPlayer() ? 1 : -1); if (move.name.endsWith(' (N)') || !move.applyConditions(this, target, move)) @@ -2801,8 +2805,14 @@ export class EnemyPokemon extends Pokemon { return scoreA < scoreB ? 1 : scoreA > scoreB ? -1 : 0; }); - if (!sortedBenefitScores.length) + if (!sortedBenefitScores.length) { + // Set target to -1 when using a counter move + // This is the same as when the player does so + if (!!move.findAttr(attr => attr instanceof CounterDamageAttr)) + return [-1]; + return []; + } let targetWeights = sortedBenefitScores.map(s => s[1]); const lowestWeight = targetWeights[targetWeights.length - 1]; From 4163005f122e886feef1168df73c0aa6c58b0393 Mon Sep 17 00:00:00 2001 From: Tempoanon <163687446+TempsRay@users.noreply.github.com> Date: Fri, 3 May 2024 22:10:40 -0400 Subject: [PATCH 04/20] Implement Forewarn, Frisk, and BattlerTags for Magnet Rise (WIP) (#241) * Implement Forewarn, Frisk, and BattlerTags for Magnet Rise (WIP) --- src/data/ability.ts | 51 ++++++++++++++++++++++++++++-- src/data/battler-tags.ts | 15 +++++++++ src/data/enums/battler-tag-type.ts | 3 +- src/data/move.ts | 4 +++ 4 files changed, 70 insertions(+), 3 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 7ac3e7218..88695e23f 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1785,6 +1785,53 @@ function getAnticipationCondition(): AbAttrCondition { }; } +export class ForewarnAbAttr extends PostSummonAbAttr { + constructor() { + super(true); + } + + applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean { + let maxPowerSeen = 0; + let maxMove = ""; + let movePower = 0; + for (let opponent of pokemon.getOpponents()) { + for (let move of opponent.moveset) { + if (move.getMove() instanceof StatusMove) { + movePower = 1; + } else if (move.getMove().findAttr(attr => attr instanceof OneHitKOAttr)) { + movePower = 150; + } else if (move.getMove().id === Moves.COUNTER || move.getMove().id === Moves.MIRROR_COAT || move.getMove().id === Moves.METAL_BURST) { + movePower = 120; + } else if (move.getMove().power === -1) { + movePower = 80; + } else { + movePower = move.getMove().power; + } + + if (movePower > maxPowerSeen) { + maxPowerSeen = movePower; + maxMove = move.getName(); + } + } + } + pokemon.scene.queueMessage(getPokemonMessage(pokemon, " was forewarned about " + maxMove + "!")); + return true; + } +} + +export class FriskAbAttr extends PostSummonAbAttr { + constructor() { + super(true); + } + + applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean { + for (let opponent of pokemon.getOpponents()) { + pokemon.scene.queueMessage(getPokemonMessage(pokemon, " frisked " + opponent.name + "\'s " + opponent.getAbility().name + "!")); + } + return true; + } +} + export class PostWeatherChangeAbAttr extends AbAttr { applyPostWeatherChange(pokemon: Pokemon, passive: boolean, weather: WeatherType, args: any[]): boolean { return false; @@ -2854,7 +2901,7 @@ export function initAbilities() { new Ability(Abilities.ANTICIPATION, 4) .conditionalAttr(getAnticipationCondition(), PostSummonMessageAbAttr, (pokemon: Pokemon) => getPokemonMessage(pokemon, ' shuddered!')), new Ability(Abilities.FOREWARN, 4) - .unimplemented(), + .attr(ForewarnAbAttr), new Ability(Abilities.UNAWARE, 4) .attr(IgnoreOpponentStatChangesAbAttr) .ignorable(), @@ -2883,7 +2930,7 @@ export function initAbilities() { new Ability(Abilities.HONEY_GATHER, 4) .unimplemented(), new Ability(Abilities.FRISK, 4) - .unimplemented(), + .attr(FriskAbAttr), new Ability(Abilities.RECKLESS, 4) .attr(MovePowerBoostAbAttr, (user, target, move) => move.getAttrs(RecoilAttr).length && move.id !== Moves.STRUGGLE, 1.2), new Ability(Abilities.MULTITYPE, 4) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 8ff684394..183306d50 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -984,6 +984,19 @@ export class HideSpriteTag extends BattlerTag { } } +export class TypeImmuneTag extends BattlerTag { + public immuneType: Type; + constructor(tagType: BattlerTagType, sourceMove: Moves, immuneType: Type, length: number) { + super(tagType, BattlerTagLapseType.TURN_END, 1, sourceMove); + } +} + +export class MagnetRisenTag extends TypeImmuneTag { + constructor(tagType: BattlerTagType, sourceMove: Moves) { + super(tagType, sourceMove, Type.GROUND, 5); + } +} + export class TypeBoostTag extends BattlerTag { public boostedType: Type; public boostValue: number; @@ -1211,6 +1224,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc return new CursedTag(sourceId); case BattlerTagType.CHARGED: return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true); + case BattlerTagType.MAGNET_RISEN: + return new MagnetRisenTag(tagType, sourceMove); case BattlerTagType.NONE: default: return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId); diff --git a/src/data/enums/battler-tag-type.ts b/src/data/enums/battler-tag-type.ts index 7a9f6ba8b..d18ccf1c5 100644 --- a/src/data/enums/battler-tag-type.ts +++ b/src/data/enums/battler-tag-type.ts @@ -54,5 +54,6 @@ export enum BattlerTagType { SALT_CURED = "SALT_CURED", CURSED = "CURSED", CHARGED = "CHARGED", - GROUNDED = "GROUNDED" + GROUNDED = "GROUNDED", + MAGNET_RISEN = "MAGNET_RISEN" } diff --git a/src/data/move.ts b/src/data/move.ts index 958588f7a..0fedea1ec 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4895,6 +4895,10 @@ export function initMoves() { new SelfStatusMove(Moves.AQUA_RING, Type.WATER, -1, 20, -1, 0, 4) .attr(AddBattlerTagAttr, BattlerTagType.AQUA_RING, true, true), new SelfStatusMove(Moves.MAGNET_RISE, Type.ELECTRIC, -1, 10, -1, 0, 4) + .attr(AddBattlerTagAttr, BattlerTagType.MAGNET_RISEN, true, true) + .condition((user, target, move) => !user.scene.arena.getTag(ArenaTagType.GRAVITY) && + !user.getTag(BattlerTagType.IGNORE_FLYING) && !user.getTag(BattlerTagType.INGRAIN) && + !user.getTag(BattlerTagType.MAGNET_RISEN)) .unimplemented(), new AttackMove(Moves.FLARE_BLITZ, Type.FIRE, MoveCategory.PHYSICAL, 120, 100, 15, 10, 0, 4) .attr(RecoilAttr, false, 0.33) From f9abc50d8bf884f1dd3ad85c02f1a428149137aa Mon Sep 17 00:00:00 2001 From: Tempoanon <163687446+TempsRay@users.noreply.github.com> Date: Fri, 3 May 2024 22:29:30 -0400 Subject: [PATCH 05/20] Add Neutralizing Gas message, display Manaphy egg gacha origin, allow catching wonder guard bosses (#322) * Add Neutralizing Gas message, display Manaphy egg gacha origin, allowcatching wonder guard bosses * Add edge cases of supressed/overriden wonder guard bosses --- src/data/ability.ts | 1 + src/data/egg.ts | 2 -- src/phases.ts | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 88695e23f..960818a24 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3356,6 +3356,7 @@ export function initAbilities() { .attr(UncopiableAbilityAbAttr) .attr(UnswappableAbilityAbAttr) .attr(NoTransformAbilityAbAttr) + .attr(PostSummonMessageAbAttr, (pokemon: Pokemon) => getPokemonMessage(pokemon, '\'s Neutralizing Gas filled the area!')) .partial(), new Ability(Abilities.PASTEL_VEIL, 8) .attr(StatusEffectImmunityAbAttr, StatusEffect.POISON, StatusEffect.TOXIC) diff --git a/src/data/egg.ts b/src/data/egg.ts index 08982cd4a..f0d6de26a 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -77,8 +77,6 @@ export function getEggHatchWavesMessage(hatchWaves: integer): string { } export function getEggGachaTypeDescriptor(scene: BattleScene, egg: Egg): string { - if (egg.isManaphyEgg()) - return ''; switch (egg.gachaType) { case GachaType.LEGENDARY: return `Legendary Rate Up (${getPokemonSpecies(getLegendaryGachaSpeciesForTimestamp(scene, egg.timestamp)).getName()})`; diff --git a/src/phases.ts b/src/phases.ts index e4ed8d293..3d80b22eb 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -57,6 +57,7 @@ import { fetchDailyRunSeed, getDailyRunStarters } from "./data/daily-run"; import { GameModes, gameModes } from "./game-mode"; import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species"; import i18next from './plugins/i18n'; +import { Abilities } from "./data/enums/abilities"; import { STARTER_FORM_OVERRIDE, STARTER_SPECIES_OVERRIDE } from './overrides'; export class LoginPhase extends Phase { @@ -1729,7 +1730,7 @@ export class CommandPhase extends FieldPhase { }, null, true); } else if (cursor < 5) { const targetPokemon = this.scene.getEnemyField().find(p => p.isActive(true)); - if (targetPokemon.isBoss() && targetPokemon.bossSegmentIndex >= 1 && cursor < PokeballType.MASTER_BALL) { + if (targetPokemon.isBoss() && targetPokemon.bossSegmentIndex >= 1 && !targetPokemon.hasAbility(Abilities.WONDER_GUARD, false, true) && cursor < PokeballType.MASTER_BALL) { this.scene.ui.setMode(Mode.COMMAND, this.fieldIndex); this.scene.ui.setMode(Mode.MESSAGE); this.scene.ui.showText(i18next.t('battle:noPokeballStrong'), null, () => { From 5b44905b86d80125a7c326ea280f84c504ade218 Mon Sep 17 00:00:00 2001 From: Tempoanon <163687446+TempsRay@users.noreply.github.com> Date: Fri, 3 May 2024 22:30:23 -0400 Subject: [PATCH 06/20] Fix Shedinja passive, mummy passive, acupressure, moody, and added a second move override (#369) --- README.md | 2 +- src/data/ability.ts | 29 +++++++++++++++++++---------- src/data/move.ts | 19 ++++++++++++++++++- src/field/pokemon.ts | 10 ++++++++-- src/overrides.ts | 2 ++ 5 files changed, 48 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b2955f8c4..d08107867 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you have the motivation and experience with Typescript/Javascript (or are wil ### ❔ FAQ **How do I test a new _______?** -- In the `battle-scene.ts` file there are overrides for most values you'll need to change for testing +- In the `src/overrides.ts` file there are overrides for most values you'll need to change for testing ## 🪧 To Do diff --git a/src/data/ability.ts b/src/data/ability.ts index 960818a24..b43b3b625 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -827,13 +827,16 @@ export class PostDefendAbilitySwapAbAttr extends PostDefendAbAttr { } export class PostDefendAbilityGiveAbAttr extends PostDefendAbAttr { - constructor() { + private ability: Abilities; + + constructor(ability: Abilities) { super(); + this.ability = ability; } applyPostDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean { if (move.getMove().checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && !attacker.getAbility().hasAttr(UnsuppressableAbilityAbAttr) && !attacker.getAbility().hasAttr(PostDefendAbilityGiveAbAttr)) { - attacker.summonData.ability = pokemon.getAbility().id; + attacker.summonData.ability = this.ability; return true; } @@ -1982,13 +1985,19 @@ export class MoodyAbAttr extends PostTurnAbAttr { } applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean { - // TODO: Edge case of not choosing to buff or debuff a stat that's already maxed let selectableStats = [BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD]; - let increaseStat = selectableStats[Utils.randInt(selectableStats.length)]; - selectableStats = selectableStats.filter(s => s !== increaseStat); - let decreaseStat = selectableStats[Utils.randInt(selectableStats.length)]; - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [increaseStat], 2)); - pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [decreaseStat], -1)); + let increaseStatArray = selectableStats.filter(s => pokemon.summonData.battleStats[s] < 6); + let decreaseStatArray = selectableStats.filter(s => pokemon.summonData.battleStats[s] > -6); + + if (increaseStatArray.length > 0) { + let increaseStat = increaseStatArray[Utils.randInt(increaseStatArray.length)]; + decreaseStatArray = decreaseStatArray.filter(s => s !== increaseStat); + pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [increaseStat], 2)); + } + if (decreaseStatArray.length > 0) { + let decreaseStat = selectableStats[Utils.randInt(selectableStats.length)]; + pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [decreaseStat], -1)); + } return true; } } @@ -3023,7 +3032,7 @@ export function initAbilities() { new Ability(Abilities.INFILTRATOR, 5) .unimplemented(), new Ability(Abilities.MUMMY, 5) - .attr(PostDefendAbilityGiveAbAttr) + .attr(PostDefendAbilityGiveAbAttr, Abilities.MUMMY) .bypassFaint(), new Ability(Abilities.MOXIE, 5) .attr(PostVictoryStatChangeAbAttr, BattleStat.ATK, 1), @@ -3395,7 +3404,7 @@ export function initAbilities() { .attr(UnswappableAbilityAbAttr) .attr(UnsuppressableAbilityAbAttr), new Ability(Abilities.LINGERING_AROMA, 9) - .attr(PostDefendAbilityGiveAbAttr) + .attr(PostDefendAbilityGiveAbAttr, Abilities.LINGERING_AROMA) .bypassFaint(), new Ability(Abilities.SEED_SOWER, 9) .attr(PostDefendTerrainChangeAbAttr, TerrainType.GRASSY), diff --git a/src/data/move.ts b/src/data/move.ts index 0fedea1ec..dc6d326b2 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1496,6 +1496,23 @@ export class StatChangeAttr extends MoveEffectAttr { } } +export class AcupressureStatChangeAttr extends MoveEffectAttr { + constructor() { + super(); + } + + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean | Promise { + let randStats = [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD, BattleStat.ACC, BattleStat.EVA ]; + randStats = randStats.filter(s => target.summonData.battleStats[s] < 6); + if (randStats.length > 0) { + let boostStat = [randStats[Utils.randInt(randStats.length)]]; + user.scene.unshiftPhase(new StatChangePhase(user.scene, target.getBattlerIndex(), this.selfTarget, boostStat, 2)); + return true; + } + return false; + } +} + export class GrowthStatChangeAttr extends StatChangeAttr { constructor() { super([ BattleStat.ATK, BattleStat.SPATK ], 1, true); @@ -4823,7 +4840,7 @@ export function initMoves() { .attr(AddArenaTagAttr, ArenaTagType.TAILWIND, 4, true) .target(MoveTarget.USER_SIDE), new StatusMove(Moves.ACUPRESSURE, Type.NORMAL, -1, 30, -1, 0, 4) - .attr(StatChangeAttr, BattleStat.RAND, 2) + .attr(AcupressureStatChangeAttr) .target(MoveTarget.USER_OR_NEAR_ALLY), new AttackMove(Moves.METAL_BURST, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 4) .attr(CounterDamageAttr, (move: Move) => (move.category === MoveCategory.PHYSICAL || move.category === MoveCategory.SPECIAL), 1.5) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 27728680c..05340344a 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -43,8 +43,8 @@ import { Nature, getNatureStatMultiplier } from '../data/nature'; import { SpeciesFormChange, SpeciesFormChangeActiveTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangePostMoveTrigger, SpeciesFormChangeStatusEffectTrigger } from '../data/pokemon-forms'; import { TerrainType } from '../data/terrain'; import { TrainerSlot } from '../data/trainer-config'; +import { ABILITY_OVERRIDE, MOVE_OVERRIDE, MOVE_OVERRIDE_2, OPP_ABILITY_OVERRIDE, OPP_MOVE_OVERRIDE, OPP_MOVE_OVERRIDE_2, OPP_SHINY_OVERRIDE, OPP_VARIANT_OVERRIDE } from '../overrides'; import { BerryType } from '../data/berry'; -import { ABILITY_OVERRIDE, MOVE_OVERRIDE, OPP_ABILITY_OVERRIDE, OPP_MOVE_OVERRIDE, OPP_SHINY_OVERRIDE, OPP_VARIANT_OVERRIDE } from '../overrides'; import i18next from '../plugins/i18n'; export enum FieldPosition { @@ -725,6 +725,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.moveset[0] = new PokemonMove(MOVE_OVERRIDE, Math.min(this.moveset[0].ppUsed, allMoves[MOVE_OVERRIDE].pp)); else if (OPP_MOVE_OVERRIDE && !this.isPlayer()) this.moveset[0] = new PokemonMove(OPP_MOVE_OVERRIDE, Math.min(this.moveset[0].ppUsed, allMoves[OPP_MOVE_OVERRIDE].pp)); + if (MOVE_OVERRIDE_2 && this.isPlayer()) + this.moveset[1] = new PokemonMove(MOVE_OVERRIDE_2, Math.min(this.moveset[1].ppUsed, allMoves[MOVE_OVERRIDE_2].pp)); + else if (OPP_MOVE_OVERRIDE_2 && !this.isPlayer()) + this.moveset[1] = new PokemonMove(OPP_MOVE_OVERRIDE_2, Math.min(this.moveset[1].ppUsed, allMoves[OPP_MOVE_OVERRIDE_2].pp)); + return ret; } @@ -2474,9 +2479,10 @@ export class PlayerPokemon extends Pokemon { if (newEvolution.condition.predicate(this)) { const newPokemon = this.scene.addPlayerPokemon(this.species, this.level, this.abilityIndex, this.formIndex, undefined, this.shiny, this.variant, this.ivs, this.nature); newPokemon.natureOverride = this.natureOverride; + newPokemon.passive = this.passive; + newPokemon.moveset = this.moveset.slice(); newPokemon.moveset = this.copyMoveset(); newPokemon.luck = this.luck; - newPokemon.fusionSpecies = this.fusionSpecies; newPokemon.fusionFormIndex = this.fusionFormIndex; newPokemon.fusionAbilityIndex = this.fusionAbilityIndex; diff --git a/src/overrides.ts b/src/overrides.ts index 732b1a5a4..4b9bcaa0b 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -15,9 +15,11 @@ export const WEATHER_OVERRIDE = WeatherType.NONE; export const ABILITY_OVERRIDE = Abilities.NONE; export const MOVE_OVERRIDE = Moves.NONE; +export const MOVE_OVERRIDE_2 = Moves.NONE; export const OPP_SPECIES_OVERRIDE = 0; export const OPP_ABILITY_OVERRIDE = Abilities.NONE; export const OPP_MOVE_OVERRIDE = Moves.NONE; +export const OPP_MOVE_OVERRIDE_2 = Moves.NONE; export const OPP_SHINY_OVERRIDE = false; export const OPP_VARIANT_OVERRIDE = 0; From fabd2b1550973d441e19fc3fe9dfa9d3ac454374 Mon Sep 17 00:00:00 2001 From: Tempoanon <163687446+TempsRay@users.noreply.github.com> Date: Fri, 3 May 2024 22:40:34 -0400 Subject: [PATCH 07/20] Add in missing import (#445) --- src/data/ability.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index b43b3b625..3245b26f6 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -9,7 +9,7 @@ import { BattlerTag } from "./battler-tags"; import { BattlerTagType } from "./enums/battler-tag-type"; import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect"; import { Gender } from "./gender"; -import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, RecoilAttr, StatusMoveTypeImmunityAttr, FlinchAttr, OneHitKOAttr, HitHealAttr, StrengthSapHealAttr, allMoves } from "./move"; +import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, RecoilAttr, StatusMoveTypeImmunityAttr, FlinchAttr, OneHitKOAttr, HitHealAttr, StrengthSapHealAttr, allMoves, StatusMove } from "./move"; import { ArenaTagSide, ArenaTrapTag } from "./arena-tag"; import { ArenaTagType } from "./enums/arena-tag-type"; import { Stat } from "./pokemon-stat"; From 5d6181926a49e995d071f0b314971ca0662416a6 Mon Sep 17 00:00:00 2001 From: Benjamin Odom Date: Fri, 3 May 2024 21:09:08 -0500 Subject: [PATCH 08/20] Removed Hardcoded Values Realized there was an enum for the -1 value which should help clear up confusion if someone has to mess with this code later --- src/field/pokemon.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 05340344a..adbe8a8d8 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2737,8 +2737,8 @@ export class EnemyPokemon extends Pokemon { let targetScores: integer[] = []; for (let mt of moveTargets[move.id]) { - // Prevent a target score from being calculated when there isn't a target - if (mt === -1) + // Prevent a target score from being calculated when the target is whoever attacks the user + if (mt === BattlerIndex.ATTACKER) break; const target = this.scene.getField()[mt]; @@ -2812,10 +2812,10 @@ export class EnemyPokemon extends Pokemon { }); if (!sortedBenefitScores.length) { - // Set target to -1 when using a counter move + // Set target to BattlerIndex.ATTACKER when using a counter move // This is the same as when the player does so if (!!move.findAttr(attr => attr instanceof CounterDamageAttr)) - return [-1]; + return [BattlerIndex.ATTACKER]; return []; } From b529eee5acaed036019f53337f5d62c2e0801a95 Mon Sep 17 00:00:00 2001 From: Benjamin Odom Date: Fri, 3 May 2024 23:02:55 -0500 Subject: [PATCH 09/20] Add Form Text to Starter UI (#446) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add Form Text to Starter UI Adds text to the starter screen UI which indicates which Form you are currently selecting. This helps with Pokémon who don't have a sprite change for their form because it doesn't affect them until later. * Make Title Case --- src/ui/starter-select-ui-handler.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 7cc99d81f..4cfef282c 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -128,6 +128,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { private starterSelectMessageBox: Phaser.GameObjects.NineSlice; private starterSelectMessageBoxContainer: Phaser.GameObjects.Container; private statsContainer: StatsContainer; + private pokemonFormText: Phaser.GameObjects.Text; private genMode: boolean; private statsMode: boolean; @@ -434,6 +435,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonCandyIcon.setOrigin(0, 0); this.starterSelectContainer.add(this.pokemonCandyIcon); + this.pokemonFormText = addTextObject(this.scene, 6, 42, 'Form', TextStyle.WINDOW_ALT, { fontSize: '42px' }); + this.pokemonFormText.setOrigin(0, 0); + this.starterSelectContainer.add(this.pokemonFormText); + this.pokemonCandyOverlayIcon = this.scene.add.sprite(1, 12, 'items', 'candy_overlay'); this.pokemonCandyOverlayIcon.setScale(0.5); this.pokemonCandyOverlayIcon.setOrigin(0, 0); @@ -1288,6 +1293,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonCandyOverlayIcon.setVisible(true); this.pokemonCandyCountText.setText(`x${this.scene.gameData.starterData[species.speciesId].candyCount}`); this.pokemonCandyCountText.setVisible(true); + this.pokemonFormText.setVisible(true); } this.iconAnimHandler.addOrUpdate(this.starterSelectGenIconContainers[species.generation - 1].getAt(this.genSpecies[species.generation - 1].indexOf(species)) as Phaser.GameObjects.Sprite, PokemonIconAnimMode.PASSIVE); @@ -1337,6 +1343,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonCandyIcon.setVisible(false); this.pokemonCandyOverlayIcon.setVisible(false); this.pokemonCandyCountText.setVisible(false); + this.pokemonFormText.setVisible(false); const defaultDexAttr = this.scene.gameData.getSpeciesDefaultDexAttr(species, true, true); const defaultAbilityIndex = this.scene.gameData.getStarterSpeciesDefaultAbilityIndex(species); @@ -1363,6 +1370,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonCandyIcon.setVisible(false); this.pokemonCandyOverlayIcon.setVisible(false); this.pokemonCandyCountText.setVisible(false); + this.pokemonFormText.setVisible(false); this.setSpeciesDetails(species, false, 0, false, 0, 0, 0); this.pokemonSprite.clearTint(); @@ -1522,6 +1530,13 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.starterMoveset.push(...availableStarterMoves.filter(sm => this.starterMoveset.indexOf(sm) === -1).slice(0, 4 - this.starterMoveset.length)); const speciesForm = getPokemonSpeciesForm(species.speciesId, formIndex); + + const formText = species?.forms[formIndex]?.formKey.split('-'); + for (let i = 0; i < formText?.length; i++) + formText[i] = formText[i].charAt(0).toUpperCase() + formText[i].substring(1); + + this.pokemonFormText.setText(formText?.join(' ')); + this.setTypeIcons(speciesForm.type1, speciesForm.type2); } else { this.pokemonAbilityText.setText(''); From 5b4f1da854407d59f83c9fcd8a2cb2b845474d21 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 4 May 2024 00:19:50 -0400 Subject: [PATCH 10/20] Fix level capped party members not gaining friendship --- src/phases.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index 3d80b22eb..bfe309878 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3220,19 +3220,22 @@ export class VictoryPhase extends PokemonPhase { const expShareModifier = this.scene.findModifier(m => m instanceof ExpShareModifier) as ExpShareModifier; const expBalanceModifier = this.scene.findModifier(m => m instanceof ExpBalanceModifier) as ExpBalanceModifier; const multipleParticipantExpBonusModifier = this.scene.findModifier(m => m instanceof MultipleParticipantExpBonusModifier) as MultipleParticipantExpBonusModifier; - const expPartyMembers = party.filter(p => p.hp && p.level < this.scene.getMaxExpLevel()); + const nonFaintedPartyMembers = party.filter(p => p.hp); + const expPartyMembers = nonFaintedPartyMembers.filter(p => p.level < this.scene.getMaxExpLevel()); const partyMemberExp = []; if (participantIds.size) { let expValue = this.getPokemon().getExpValue(); if (this.scene.currentBattle.battleType === BattleType.TRAINER) expValue = Math.floor(expValue * 1.5); - for (let partyMember of expPartyMembers) { + for (let partyMember of nonFaintedPartyMembers) { const pId = partyMember.id; const participated = participantIds.has(pId); if (participated) partyMember.addFriendship(2); - else if (!expShareModifier) { + if (!expPartyMembers.includes(partyMember)) + continue; + if (!participated && !expShareModifier) { partyMemberExp.push(0); continue; } From c58a2fdee32d6eaff5e8d1d2e0af23b3b9bebad4 Mon Sep 17 00:00:00 2001 From: dpMelian Date: Sat, 4 May 2024 14:41:35 +0100 Subject: [PATCH 11/20] feat: replace steel type sprite with new version for consistency --- public/images/ui/pbinfo_player_type.png | Bin 1482 -> 3664 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/public/images/ui/pbinfo_player_type.png b/public/images/ui/pbinfo_player_type.png index ad88950392570f02f619dcaf8600f3e98b96b3e4..b78d078de95d3194292cd86a75d6d7dd9a3bef76 100644 GIT binary patch literal 3664 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 O0VWsCE|eKKNBjqRU>*+u delta 1475 zcmV;!1w8uD9Lfuj8Gi!+0081mc*y_&0K-sBR7C&)03aYJIh_AWp+Qn{%~HPZTF&QU znZ09UwP>J_b5MJ8T1tCJdwXN&d(KjUroMxvT86^^kj0CULCcg-iabc9&Rpv1dNYXWG1u``5vE`jC{*5+FF)d*h(2P zyi|Fh&a|q9<^8CpCZ?Gl@h1~`xCQYB;3gJj#BI^3L4UlFd%83tYb;05oejL`cX|S9`PF!dAJ2}%pW6;fo@@}#WCN?C5Yf5sEoiASp;3IgJaLe zZ+wRuI*wj)jGn+^r{lwFrIBajz&c$ z_F>xWqiO0TpCO^H?MF4Wc*K93$ir=j5Q_+Yzz=!gMZD(;;S(c@iT?{3A>`DMBt8_B zrE+ZwqD|b{cgWq#6J0xIb2*e+)Q@Uv@reI0k$;DEL~#F%7(-r6U_PJQj0EV%!9coC z!Fj77_jM1D=^TRlLW{~@vzl5w;(tx#;TFUdtP&zXA|skBD~pdJlBwJ z>4}F#`4*pmE(r*pYgpcoYHIO_&rIZDJ%159*A_M06>xTm@Y09~`8%iKWeVcLONN&Q zp1JSwneUK+FVy~u*Q}-%kN8&;dAJP`5+e4pC31%oqClH52~T1OCnq2$4P`Y17*rOu zN~`fn1IznSO)VbrUncT!3*t4vbu7vk#)_<6GY#UkETxMUB^_SZz~pkZk?&BhB!5-B zR!jO(O)VbrdlPxMxj3cHO|3|TxE7}(@kNP}4zEqdayaFk`K&6R$~65xe*Kg`QSFqE z3sY)QKdPz4BYrTEhntH_YUk35{tsO(F4>Z^5|>LkR7SkPmGIDpsJ7rza_WMX53VNP zA=xSMl1p3rEBaAQEgtcOi9D<&Qh$#xo~#H07h04bg~ij862XaWcyY0K(kU0>E$luE zSsS1)bMdsU_E)@SHMMxe?@Z+3=AsP5ik|^K(-Dd9{8@?Q@Ff=cx&|hftBrhzawVza zm0Hw~YHIO_e=(7V+YkZT;t*h%5S_Yf8B-+=1r81Lzx*ROOhL)vAyX>I6@L})G;HcD z??*MYc*Iv2|6n{m-rwEb#qd7B-GPHf91I*J=ETl`D8ai%>IuYLk(vD3l6U4cL^ zb~=afWpE4Mk=-}q;o%p!{rMdn+u7~+aUmsm#N(TWbQ~GjhtcR5Mqj_eQGnfU_ZW`* zBlvUw=*V{nAujCUvA4hPs64caMp002ovPDHLkV1i4S)!P67 From 3de4b9cd12f8d4fb093432f6de54371a56f699b9 Mon Sep 17 00:00:00 2001 From: Lugiad Date: Sat, 4 May 2024 16:32:59 +0200 Subject: [PATCH 12/20] Minor Update to French battle.ts --- src/locales/fr/battle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index 742a8f63d..286a53efc 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -12,7 +12,7 @@ export const battle: SimpleTranslationEntries = { "switchQuestion": "Voulez-vous changer\n{{pokemonName}} ?", "trainerDefeated": `Vous avez battu\n{{trainerName}} !`, "pokemonCaught": "Vous avez attrapé {{pokemonName}} !", - "pokemon": "Pokémon", + "pokemon": "de Pokémon", "sendOutPokemon": "{{pokemonName}} ! Go !", "hitResultCriticalHit": "Coup critique !", "hitResultSuperEffective": "C’est super efficace !", From d77ae729c0d22a5c0f5f44fc6f19e84aae4fbe30 Mon Sep 17 00:00:00 2001 From: Lugiad Date: Sat, 4 May 2024 17:00:31 +0200 Subject: [PATCH 13/20] Minor Update to French battle.ts Thanks to @Dakurei for this nice compromise --- src/locales/fr/battle.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locales/fr/battle.ts b/src/locales/fr/battle.ts index 286a53efc..a4abf5239 100644 --- a/src/locales/fr/battle.ts +++ b/src/locales/fr/battle.ts @@ -9,10 +9,10 @@ export const battle: SimpleTranslationEntries = { "trainerComeBack": "{{trainerName}} retire {{pokemonName}} !", "playerGo": "{{pokemonName}} ! Go !", "trainerGo": "{{pokemonName}} est envoyé par\n{{trainerName}} !", - "switchQuestion": "Voulez-vous changer\n{{pokemonName}} ?", + "switchQuestion": "Voulez-vous changer\nvotre {{pokemonName}} ?", "trainerDefeated": `Vous avez battu\n{{trainerName}} !`, "pokemonCaught": "Vous avez attrapé {{pokemonName}} !", - "pokemon": "de Pokémon", + "pokemon": "Pokémon", "sendOutPokemon": "{{pokemonName}} ! Go !", "hitResultCriticalHit": "Coup critique !", "hitResultSuperEffective": "C’est super efficace !", From 3d2f31eb4f2a0fb2d576a16305c0a04b2dae6e65 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 4 May 2024 11:50:15 -0400 Subject: [PATCH 14/20] Fix endure token weight --- src/modifier/modifier-type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index 4229b8be3..d203dc292 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1151,7 +1151,7 @@ const enemyBuffModifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.ENEMY_ATTACK_FREEZE_CHANCE, 2), new WeightedModifierType(modifierTypes.ENEMY_ATTACK_BURN_CHANCE, 2), new WeightedModifierType(modifierTypes.ENEMY_STATUS_EFFECT_HEAL_CHANCE, 10), - new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 10000), + new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 5), new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 1) ].map(m => { m.setTier(ModifierTier.COMMON); return m; }), [ModifierTier.GREAT]: [ From da5615eb4ad160cff170c27fb6a23616a95bb867 Mon Sep 17 00:00:00 2001 From: nrawicz <102765708+nrawicz@users.noreply.github.com> Date: Sat, 4 May 2024 11:52:24 -0400 Subject: [PATCH 15/20] Implement Expanding Force (#417) * Expanding Force Implementation Added target change attribute based on terrain * Class change I guess * Expanding Force Implementation Added target change attribute based on terrain Class change I guess Squashed weird split commit * Fixed removed commits My bad * ACTUALLY fixed removed commits --- src/data/move.ts | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index dc6d326b2..054d0505e 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -3707,6 +3707,22 @@ export class LastResortAttr extends MoveAttr { } } +export class VariableTargetAttr extends MoveAttr { + private targetChangeFunc: (user: Pokemon, target: Pokemon, move: Move) => number; + + constructor(targetChange: (user: Pokemon, target: Pokemon, move: Move) => number) { + super(); + + this.targetChangeFunc = targetChange; + } + + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + const targetVal = args[0] as Utils.NumberHolder; + targetVal.value = this.targetChangeFunc(user, target, move); + return true; + } +} + const failOnGravityCondition: MoveConditionFunc = (user, target, move) => !user.scene.arena.getTag(ArenaTagType.GRAVITY); const failOnBossCondition: MoveConditionFunc = (user, target, move) => !target.isBossImmune(); @@ -3787,7 +3803,10 @@ export type MoveTargetSet = { } export function getMoveTargets(user: Pokemon, move: Moves): MoveTargetSet { - const moveTarget = move ? allMoves[move].moveTarget : move === undefined ? MoveTarget.NEAR_ENEMY : []; + const variableTarget = new Utils.NumberHolder(0); + user.getOpponents().forEach(p => applyMoveAttrs(VariableTargetAttr, user, p, allMoves[move], variableTarget)); + + const moveTarget = allMoves[move].getAttrs(VariableTargetAttr).length ? variableTarget.value : move ? allMoves[move].moveTarget : move === undefined ? MoveTarget.NEAR_ENEMY : []; const opponents = user.getOpponents(); let set: Pokemon[] = []; @@ -5989,7 +6008,8 @@ export function initMoves() { new AttackMove(Moves.STEEL_BEAM, Type.STEEL, MoveCategory.SPECIAL, 140, 95, 5, -1, 0, 8) .attr(HalfSacrificialAttr), new AttackMove(Moves.EXPANDING_FORCE, Type.PSYCHIC, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 8) - .partial(), + .attr(MovePowerMultiplierAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.PSYCHIC && user.isGrounded() ? 1.5 : 1) + .attr(VariableTargetAttr, (user, target, move) => user.scene.arena.getTerrainType() === TerrainType.PSYCHIC && user.isGrounded() ? 6 : 3), new AttackMove(Moves.STEEL_ROLLER, Type.STEEL, MoveCategory.PHYSICAL, 130, 100, 5, -1, 0, 8) .attr(ClearTerrainAttr) .condition((user, target, move) => !!user.scene.arena.terrain), From a7af14b8e2b243fc624c304d7a3ead20b5975552 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 4 May 2024 11:54:00 -0400 Subject: [PATCH 16/20] Fix fusion token weight at 1000 --- src/modifier/modifier-type.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index d203dc292..2e18cd917 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -1162,12 +1162,12 @@ const enemyBuffModifierPool: ModifierPool = { new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 1) ].map(m => { m.setTier(ModifierTier.GREAT); return m; }), [ModifierTier.ULTRA]: [ - new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_BOOSTER, 5), - new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_REDUCTION, 5), - new WeightedModifierType(modifierTypes.ENEMY_HEAL, 5), - new WeightedModifierType(modifierTypes.ENEMY_STATUS_EFFECT_HEAL_CHANCE, 5), - new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 5), - new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 300) + new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_BOOSTER, 10), + new WeightedModifierType(modifierTypes.ENEMY_DAMAGE_REDUCTION, 10), + new WeightedModifierType(modifierTypes.ENEMY_HEAL, 10), + new WeightedModifierType(modifierTypes.ENEMY_STATUS_EFFECT_HEAL_CHANCE, 10), + new WeightedModifierType(modifierTypes.ENEMY_ENDURE_CHANCE, 10), + new WeightedModifierType(modifierTypes.ENEMY_FUSED_CHANCE, 5) ].map(m => { m.setTier(ModifierTier.ULTRA); return m; }), [ModifierTier.ROGUE]: [ ].map(m => { m.setTier(ModifierTier.ROGUE); return m; }), [ModifierTier.MASTER]: [ ].map(m => { m.setTier(ModifierTier.MASTER); return m; }) From f53c699d04b047cb725574841cd921c407474cc0 Mon Sep 17 00:00:00 2001 From: Benjamin Odom Date: Sat, 4 May 2024 01:10:33 -0500 Subject: [PATCH 17/20] Updated Learnset of Gen1 to Indigo Disc Not many changes here for how much time it takes to comb through, but here it is. Only notable change is Power-Up Punch got removed this gen so it had to be removed from Hitmonchan's learnset. Are we okay with this change? If so, this is good to go for Gen 1. --- src/data/pokemon-level-moves.ts | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/data/pokemon-level-moves.ts b/src/data/pokemon-level-moves.ts index 0b545d1bd..c67e917b3 100644 --- a/src/data/pokemon-level-moves.ts +++ b/src/data/pokemon-level-moves.ts @@ -30,7 +30,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 24, Moves.SWEET_SCENT ], [ 27, Moves.SYNTHESIS ], [ 30, Moves.WORRY_SEED ], - [ 33, Moves.DOUBLE_EDGE ], + [ 33, Moves.POWER_WHIP ], [ 36, Moves.SOLAR_BEAM ], ], [Species.IVYSAUR]: [ @@ -47,16 +47,16 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 30, Moves.SWEET_SCENT ], [ 35, Moves.SYNTHESIS ], [ 40, Moves.WORRY_SEED ], - [ 45, Moves.DOUBLE_EDGE ], + [ 45, Moves.POWER_WHIP ], [ 50, Moves.SOLAR_BEAM ], ], [Species.VENUSAUR]: [ [ 0, Moves.PETAL_BLIZZARD ], + [ 1, Moves.GROWTH ], + [ 1, Moves.PETAL_DANCE ], [ 1, Moves.VINE_WHIP ], [ 1, Moves.TACKLE ], [ 1, Moves.GROWL ], - [ 1, Moves.GROWTH ], - [ 1, Moves.PETAL_DANCE ], [ 9, Moves.LEECH_SEED ], [ 12, Moves.RAZOR_LEAF ], [ 15, Moves.POISON_POWDER ], @@ -66,7 +66,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 30, Moves.SWEET_SCENT ], [ 37, Moves.SYNTHESIS ], [ 44, Moves.WORRY_SEED ], - [ 51, Moves.DOUBLE_EDGE ], + [ 51, Moves.POWER_WHIP ], [ 58, Moves.SOLAR_BEAM ], ], [Species.CHARMANDER]: [ @@ -127,7 +127,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 27, Moves.SHELL_SMASH ], [ 30, Moves.IRON_DEFENSE ], [ 33, Moves.HYDRO_PUMP ], - [ 36, Moves.SKULL_BASH ], + [ 36, Moves.WAVE_CRASH ], ], [Species.WARTORTLE]: [ [ 1, Moves.TACKLE ], @@ -143,7 +143,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 35, Moves.SHELL_SMASH ], [ 40, Moves.IRON_DEFENSE ], [ 45, Moves.HYDRO_PUMP ], - [ 50, Moves.SKULL_BASH ], + [ 50, Moves.WAVE_CRASH ], ], [Species.BLASTOISE]: [ [ 0, Moves.FLASH_CANNON ], @@ -160,7 +160,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 35, Moves.SHELL_SMASH ], [ 42, Moves.IRON_DEFENSE ], [ 49, Moves.HYDRO_PUMP ], - [ 56, Moves.SKULL_BASH ], + [ 56, Moves.WAVE_CRASH ], ], [Species.CATERPIE]: [ [ 1, Moves.TACKLE ], @@ -341,9 +341,9 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 12, Moves.GLARE ], [ 17, Moves.SCREECH ], [ 20, Moves.ACID ], + [ 25, Moves.SWALLOW ], [ 25, Moves.STOCKPILE ], [ 25, Moves.SPIT_UP ], - [ 25, Moves.SWALLOW ], [ 28, Moves.ACID_SPRAY ], [ 33, Moves.SLUDGE_BOMB ], [ 36, Moves.GASTRO_ACID ], @@ -1780,14 +1780,15 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 4, Moves.DOUBLE_KICK ], [ 8, Moves.LOW_KICK ], [ 12, Moves.ENDURE ], - [ 16, Moves.REVENGE ], + [ 16, Moves.SUCKER_PUNCH ], [ 21, Moves.WIDE_GUARD ], [ 24, Moves.BLAZE_KICK ], - [ 28, Moves.MIND_READER ], + [ 28, Moves.FEINT ], [ 32, Moves.MEGA_KICK ], [ 36, Moves.CLOSE_COMBAT ], [ 40, Moves.REVERSAL ], [ 44, Moves.HIGH_JUMP_KICK ], + [ 50, Moves.AXE_KICK ], ], [Species.HITMONCHAN]: [ [ 0, Moves.DRAIN_PUNCH ], @@ -1796,16 +1797,14 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 1, Moves.FAKE_OUT ], [ 1, Moves.HELPING_HAND ], [ 1, Moves.FEINT ], - [ 1, Moves.VACUUM_WAVE ], - [ 1, Moves.BULLET_PUNCH ], [ 4, Moves.MACH_PUNCH ], - [ 8, Moves.POWER_UP_PUNCH ], + [ 8, Moves.VACUUM_WAVE ], [ 12, Moves.DETECT ], - [ 16, Moves.REVENGE ], + [ 16, Moves.BULLET_PUNCH ], [ 21, Moves.QUICK_GUARD ], - [ 24, Moves.FIRE_PUNCH ], - [ 24, Moves.ICE_PUNCH ], [ 24, Moves.THUNDER_PUNCH ], + [ 24, Moves.ICE_PUNCH ], + [ 24, Moves.FIRE_PUNCH ], [ 28, Moves.AGILITY ], [ 32, Moves.MEGA_PUNCH ], [ 36, Moves.CLOSE_COMBAT ], From cd7de107221211e09e030e015d4c8eaf02de0383 Mon Sep 17 00:00:00 2001 From: nrawicz <102765708+nrawicz@users.noreply.github.com> Date: Sat, 4 May 2024 14:28:44 -0400 Subject: [PATCH 18/20] Expanding force hotfix (#459) * Expanding Force Implementation Added target change attribute based on terrain * Class change I guess * Expanding Force Implementation Added target change attribute based on terrain Class change I guess Squashed weird split commit * Fixed removed commits My bad * ACTUALLY fixed removed commits * Expanding Force Hotfix Fixes a bug where Expanding Force would not act as a multi-target move in the MoveEffectPhase while in psychic terrain --- src/phases.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index bfe309878..a3b66edf0 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2,7 +2,7 @@ import BattleScene, { bypassLogin, startingWave } from "./battle-scene"; import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon"; import * as Utils from './utils'; 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, OneHitKOAccuracyAttr, ForceSwitchOutAttr } 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, FixedDamageAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr, VariableTargetAttr } from "./data/move"; import { Mode } from './ui/ui'; import { Command } from "./ui/command-ui-handler"; import { Stat } from "./data/pokemon-stat"; @@ -2400,7 +2400,7 @@ export class MoveEffectPhase extends PokemonPhase { const targetHitChecks = Object.fromEntries(targets.map(p => [ p.getBattlerIndex(), this.hitCheck(p) ])); const activeTargets = targets.map(t => t.isActive(true)); - if (!activeTargets.length || (!this.move.getMove().isMultiTarget() && !targetHitChecks[this.targets[0]])) { + if (!activeTargets.length || (!this.move.getMove().getAttrs(VariableTargetAttr).length && !this.move.getMove().isMultiTarget() && !targetHitChecks[this.targets[0]])) { user.turnData.hitCount = 1; user.turnData.hitsLeft = 1; if (activeTargets.length) { From 620a92aace2f94439fb098169a2c585bac9013bd Mon Sep 17 00:00:00 2001 From: LaukkaE <73663099+LaukkaE@users.noreply.github.com> Date: Sun, 5 May 2024 01:28:15 +0300 Subject: [PATCH 19/20] Bugfix Tickle, Tearful Look, Decorate (#464) --- src/data/move.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 054d0505e..f3a1c0494 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4736,8 +4736,7 @@ export function initMoves() { .attr(StatusEffectAttr, StatusEffect.SLEEP) .soundBased(), new StatusMove(Moves.TICKLE, Type.NORMAL, 100, 20, -1, 0, 3) - .attr(StatChangeAttr, BattleStat.ATK, -1) - .attr(StatChangeAttr, BattleStat.DEF, -1), + .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF ], -1), new SelfStatusMove(Moves.COSMIC_POWER, Type.PSYCHIC, -1, 20, -1, 0, 3) .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], 1, true), new AttackMove(Moves.WATER_SPOUT, Type.WATER, MoveCategory.SPECIAL, 150, 100, 5, -1, 0, 3) @@ -5777,8 +5776,7 @@ export function initMoves() { .ignoresAbilities() .partial(), new StatusMove(Moves.TEARFUL_LOOK, Type.NORMAL, -1, 20, 100, 0, 7) - .attr(StatChangeAttr, BattleStat.ATK, -1) - .attr(StatChangeAttr, BattleStat.SPATK, -1), + .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1), new AttackMove(Moves.ZING_ZAP, Type.ELECTRIC, MoveCategory.PHYSICAL, 80, 100, 10, 30, 0, 7) .attr(FlinchAttr), new AttackMove(Moves.NATURES_MADNESS, Type.FAIRY, MoveCategory.SPECIAL, -1, 90, 10, -1, 0, 7) @@ -5957,8 +5955,7 @@ export function initMoves() { new AttackMove(Moves.BODY_PRESS, Type.FIGHTING, MoveCategory.PHYSICAL, 80, 100, 10, -1, 0, 8) .attr(DefAtkAttr), new StatusMove(Moves.DECORATE, Type.FAIRY, -1, 15, 100, 0, 8) - .attr(StatChangeAttr, BattleStat.ATK, 2) - .attr(StatChangeAttr, BattleStat.SPATK, 2), + .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], 2), new AttackMove(Moves.DRUM_BEATING, Type.GRASS, MoveCategory.PHYSICAL, 80, 100, 10, 100, 0, 8) .attr(StatChangeAttr, BattleStat.SPD, -1) .makesContact(false), From 92fb8b715e86baf085ede2c5d7b96249dfaf6d83 Mon Sep 17 00:00:00 2001 From: Akuma-Reiki <66755974+Akuma-Reiki@users.noreply.github.com> Date: Sat, 4 May 2024 17:29:48 -0500 Subject: [PATCH 20/20] Added Candy Progress UI (#463) * Added Candy Progress UI * GetRootSpecies rather than colors of current Species --- public/images/ui/candy.png | Bin 0 -> 415 bytes public/images/ui/candy_overlay.png | Bin 0 -> 211 bytes public/images/ui/legacy/candy.png | Bin 0 -> 415 bytes public/images/ui/legacy/candy_overlay.png | Bin 0 -> 211 bytes src/loading-scene.ts | 2 ++ src/ui/summary-ui-handler.ts | 40 +++++++++++++++++++++- 6 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 public/images/ui/candy.png create mode 100644 public/images/ui/candy_overlay.png create mode 100644 public/images/ui/legacy/candy.png create mode 100644 public/images/ui/legacy/candy_overlay.png diff --git a/public/images/ui/candy.png b/public/images/ui/candy.png new file mode 100644 index 0000000000000000000000000000000000000000..6b633a195040a4177cbbcf632e760b0a1d2aea90 GIT binary patch literal 415 zcmV;Q0bu@#P)Px$KS@MER5*==lQFJ>KoEvMjfFi4fs#nGm7yZ>0$#*;2oB&O40oXB0wkP(irBG) zSXe3DzQXLvy5RehO_+iC{#kZ*#e#$oY8p39vzq(PN$SEp&#nCFbeaWOfe=FFdCqpb zHMwyd9nciA{#6V(@#S){wzr-u4#RK};`_b@F&!jHVv6-zQktgbd8OR}4u=B(Qc9$h zR?#?)#-uDu0J1D&qg|zxR8>V3MNS8=*9(BY?+w`VJb*VK2m<4LyWK4J?^76t0nhV@ zbm~C5JIS;DAe=${JFZWQ(f1oq9~L;h0WAK|D64P zZ?*;Scsyv^miztgbY&(=2%)amE4$s!Zf~MAO=;Vf^Z9J1(HUh8nbUW%1JDq7kL*-g zmI41eK@{oCO|{#S9GG z!XV7ZFl&wkP_V+&#WAE}PIAHm(I5Z+@3$~g3tem}q;^k1XOPx$KS@MER5*==lQFJ>KoEvMjfFi4fs#nGm7yZ>0$#*;2oB&O40oXB0wkP(irBG) zSXe3DzQXLvy5RehO_+iC{#kZ*#e#$oY8p39vzq(PN$SEp&#nCFbeaWOfe=FFdCqpb zHMwyd9nciA{#6V(@#S){wzr-u4#RK};`_b@F&!jHVv6-zQktgbd8OR}4u=B(Qc9$h zR?#?)#-uDu0J1D&qg|zxR8>V3MNS8=*9(BY?+w`VJb*VK2m<4LyWK4J?^76t0nhV@ zbm~C5JIS;DAe=${JFZWQ(f1oq9~L;h0WAK|D64P zZ?*;Scsyv^miztgbY&(=2%)amE4$s!Zf~MAO=;Vf^Z9J1(HUh8nbUW%1JDq7kL*-g zmI41eK@{oCO|{#S9GG z!XV7ZFl&wkP_V+&#WAE}PIAHm(I5Z+@3$~g3tem}q;^k1XO (this.scene as BattleScene).ui.hideTooltip()); } + var currentFriendship = this.scene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].friendship; + if (!currentFriendship || currentFriendship === undefined) + currentFriendship = 0; + + const friendshipCap = getStarterValueFriendshipCap(speciesStarters[this.pokemon.species.getRootSpeciesId()]); + const candyCropY = 16 - (16 * (currentFriendship / friendshipCap)); + + if (this.candyShadow.visible) { + this.candyShadow.on('pointerover', () => (this.scene as BattleScene).ui.showTooltip(null, `${currentFriendship}/${friendshipCap}`, true)); + this.candyShadow.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip()); + } + + this.candyIcon.setCrop(0,candyCropY,16, 16); + this.candyOverlay.setCrop(0,candyCropY,16, 16); + const doubleShiny = isFusion && this.pokemon.shiny && this.pokemon.fusionShiny; const baseVariant = !doubleShiny ? this.pokemon.getVariant() : this.pokemon.variant;