diff --git a/src/data/ability.ts b/src/data/ability.ts index 2ac7d6be1ac..35f6da685eb 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -679,6 +679,19 @@ export class PostDefendContactApplyStatusEffectAbAttr extends PostDefendAbAttr { } } +export class EffectSporeAbAttr extends PostDefendContactApplyStatusEffectAbAttr { + constructor() { + super(10, StatusEffect.POISON, StatusEffect.PARALYSIS, StatusEffect.SLEEP); + } + + applyPostDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean { + if (attacker.hasAbility(Abilities.OVERCOAT) || attacker.isOfType(Type.GRASS)) { + return false; + } + return super.applyPostDefend(pokemon, passive, attacker, move, hitResult, args); + } +} + export class PostDefendContactApplyTagChanceAbAttr extends PostDefendAbAttr { private chance: integer; private tagType: BattlerTagType; @@ -2572,7 +2585,7 @@ export function initAbilities() { .attr(TypeImmunityAbAttr, Type.GROUND, (pokemon: Pokemon) => !pokemon.getTag(BattlerTagType.IGNORE_FLYING) && !pokemon.scene.arena.getTag(ArenaTagType.GRAVITY) && !pokemon.getTag(BattlerTagType.GROUNDED)) .ignorable(), new Ability(Abilities.EFFECT_SPORE, 3) - .attr(PostDefendContactApplyStatusEffectAbAttr, 10, StatusEffect.POISON, StatusEffect.PARALYSIS, StatusEffect.SLEEP), + .attr(EffectSporeAbAttr), new Ability(Abilities.SYNCHRONIZE, 3) .attr(SyncEncounterNatureAbAttr) .unimplemented(), diff --git a/src/data/berry.ts b/src/data/berry.ts index b28772373b1..1228bb54904 100644 --- a/src/data/berry.ts +++ b/src/data/berry.ts @@ -99,6 +99,8 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc { case BerryType.SITRUS: case BerryType.ENIGMA: return (pokemon: Pokemon) => { + if (pokemon.battleData) + pokemon.battleData.berriesEaten.push(berryType); const hpHealed = new Utils.NumberHolder(Math.floor(pokemon.getMaxHp() / 4)); applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, hpHealed); pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(), @@ -106,6 +108,8 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc { }; case BerryType.LUM: return (pokemon: Pokemon) => { + if (pokemon.battleData) + pokemon.battleData.berriesEaten.push(berryType); if (pokemon.status) { pokemon.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectHealText(pokemon.status.effect))); pokemon.resetStatus(); @@ -119,6 +123,8 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc { case BerryType.APICOT: case BerryType.SALAC: return (pokemon: Pokemon) => { + if (pokemon.battleData) + pokemon.battleData.berriesEaten.push(berryType); const battleStat = (berryType - BerryType.LIECHI) as BattleStat; const statLevels = new Utils.NumberHolder(1); applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, statLevels); @@ -126,16 +132,22 @@ export function getBerryEffectFunc(berryType: BerryType): BerryEffectFunc { }; case BerryType.LANSAT: return (pokemon: Pokemon) => { + if (pokemon.battleData) + pokemon.battleData.berriesEaten.push(berryType); pokemon.addTag(BattlerTagType.CRIT_BOOST); }; case BerryType.STARF: return (pokemon: Pokemon) => { + if (pokemon.battleData) + pokemon.battleData.berriesEaten.push(berryType); const statLevels = new Utils.NumberHolder(2); applyAbAttrs(DoubleBerryEffectAbAttr, pokemon, null, statLevels); pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ BattleStat.RAND ], statLevels.value)); }; case BerryType.LEPPA: return (pokemon: Pokemon) => { + if (pokemon.battleData) + pokemon.battleData.berriesEaten.push(berryType); const ppRestoreMove = pokemon.getMoveset().find(m => !m.getPpRatio()); ppRestoreMove.ppUsed = Math.max(ppRestoreMove.ppUsed - 10, 0); pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` restored PP to its move ${ppRestoreMove.getName()}\nusing its ${getBerryName(berryType)}!`)); diff --git a/src/data/move.ts b/src/data/move.ts index 60e07b8f513..a13c1ac8861 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2615,7 +2615,7 @@ export class CurseAttr extends MoveEffectAttr { } let curseRecoilDamage = Math.floor(user.getMaxHp() / 2); user.damageAndUpdate(curseRecoilDamage, HitResult.OTHER, false, true, true); - user.scene.queueMessage(getPokemonMessage(user, ' cut its own HP!')); + user.scene.queueMessage(getPokemonMessage(user, ` cut its own HP\nand laid a curse on the ${target.name}!`)); target.addTag(BattlerTagType.CURSED, 0, move.id, user.id); return true; } else { @@ -3706,6 +3706,19 @@ export class FirstMoveCondition extends MoveCondition { } } +export class hitsSameTypeAttr extends VariableMoveTypeMultiplierAttr { + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + const multiplier = args[0] as Utils.NumberHolder; + if (!user.getTypes().some(type => target.getTypes().includes(type))){ + multiplier.value = 0; + return true; + } + return false; + } +} + +const unknownTypeCondition: MoveConditionFunc = (user, target, move) => !user.getTypes().includes(Type.UNKNOWN); + export type MoveTargetSet = { targets: BattlerIndex[]; multiple: boolean; @@ -5087,7 +5100,8 @@ export function initMoves() { .condition(failOnMaxCondition), new AttackMove(Moves.SYNCHRONOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5) .target(MoveTarget.ALL_NEAR_OTHERS) - .partial(), + .condition(unknownTypeCondition) + .attr(hitsSameTypeAttr), new AttackMove(Moves.ELECTRO_BALL, Type.ELECTRIC, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 5) .attr(BattleStatRatioPowerAttr, Stat.SPD) .ballBombMove(), @@ -5157,7 +5171,7 @@ export function initMoves() { new StatusMove(Moves.QUASH, Type.DARK, 100, 15, -1, 0, 5) .unimplemented(), new AttackMove(Moves.ACROBATICS, Type.FLYING, MoveCategory.PHYSICAL, 55, 100, 15, -1, 0, 5) - .partial(), + .attr(MovePowerMultiplierAttr, (user, target, move) => Math.max(1, 2 - 0.2 * user.getHeldItems().reduce((v, m) => v + m.stackCount, 0))), new StatusMove(Moves.REFLECT_TYPE, Type.NORMAL, -1, 15, -1, 0, 5) .attr(CopyTypeAttr), new AttackMove(Moves.RETALIATE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 5, -1, 0, 5) @@ -5287,7 +5301,7 @@ export function initMoves() { new StatusMove(Moves.MAT_BLOCK, Type.FIGHTING, -1, 10, -1, 0, 6) .unimplemented(), new AttackMove(Moves.BELCH, Type.POISON, MoveCategory.SPECIAL, 120, 90, 10, -1, 0, 6) - .partial(), + .condition((user, target, move) => user.battleData.berriesEaten.length > 0), new StatusMove(Moves.ROTOTILLER, Type.GROUND, -1, 10, 100, 0, 6) .target(MoveTarget.ALL) .unimplemented(), diff --git a/src/data/pokemon-level-moves.ts b/src/data/pokemon-level-moves.ts index 07691b01eff..0b545d1bd63 100644 --- a/src/data/pokemon-level-moves.ts +++ b/src/data/pokemon-level-moves.ts @@ -4278,6 +4278,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 30, Moves.ANCIENT_POWER ], [ 40, Moves.LIFE_DEW ], [ 50, Moves.LEECH_SEED ], + [ 55, Moves.HEAL_BLOCK ], [ 60, Moves.RECOVER ], [ 70, Moves.FUTURE_SIGHT ], [ 80, Moves.HEALING_WISH ], @@ -4976,6 +4977,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 23, Moves.ABSORB ], [ 29, Moves.SHADOW_SNEAK ], [ 36, Moves.FURY_SWIPES ], + [ 41, Moves.HEAL_BLOCK ], [ 43, Moves.MIND_READER ], [ 50, Moves.SHADOW_BALL ], [ 57, Moves.SPITE ], @@ -5796,6 +5798,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 20, Moves.PSYSHOCK ], [ 25, Moves.COSMIC_POWER ], [ 30, Moves.PSYCHIC ], + [ 33, Moves.HEAL_BLOCK ], [ 35, Moves.STONE_EDGE ], [ 40, Moves.FUTURE_SIGHT ], [ 45, Moves.MAGIC_ROOM ], @@ -5814,6 +5817,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 20, Moves.ZEN_HEADBUTT ], [ 25, Moves.COSMIC_POWER ], [ 30, Moves.PSYCHIC ], + [ 33, Moves.HEAL_BLOCK ], [ 35, Moves.STONE_EDGE ], [ 40, Moves.SOLAR_BEAM ], [ 45, Moves.WONDER_ROOM ], @@ -5890,6 +5894,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 3, Moves.RAPID_SPIN ], [ 6, Moves.CONFUSION ], [ 9, Moves.ROCK_TOMB ], + [ 10, Moves.HEAL_BLOCK ], [ 12, Moves.POWER_TRICK ], [ 15, Moves.PSYBEAM ], [ 18, Moves.ANCIENT_POWER ], @@ -5911,6 +5916,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 1, Moves.MUD_SLAP ], [ 1, Moves.RAPID_SPIN ], [ 9, Moves.ROCK_TOMB ], + [ 10, Moves.HEAL_BLOCK ], [ 12, Moves.POWER_TRICK ], [ 15, Moves.PSYBEAM ], [ 18, Moves.ANCIENT_POWER ], @@ -6506,6 +6512,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.LATIOS]: [ [ 1, Moves.DRAGON_DANCE ], [ 1, Moves.STORED_POWER ], + [ 1, Moves.HEAL_BLOCK ], [ 5, Moves.HELPING_HAND ], [ 10, Moves.RECOVER ], [ 15, Moves.CONFUSION ], @@ -7364,6 +7371,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 36, Moves.IRON_DEFENSE ], [ 40, Moves.METAL_SOUND ], [ 44, Moves.FUTURE_SIGHT ], + [ 45, Moves.HEAL_BLOCK ], ], [Species.BRONZONG]: [ [ 0, Moves.BLOCK ], @@ -7382,6 +7390,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 38, Moves.IRON_DEFENSE ], [ 44, Moves.METAL_SOUND ], [ 50, Moves.FUTURE_SIGHT ], + [ 52, Moves.HEAL_BLOCK ], [ 56, Moves.RAIN_DANCE ], ], [Species.BONSLY]: [ @@ -9491,6 +9500,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.YAMASK]: [ [ 1, Moves.PROTECT ], [ 1, Moves.ASTONISH ], + [ 1, Moves.HEAL_BLOCK ], [ 4, Moves.HAZE ], [ 8, Moves.NIGHT_SHADE ], [ 12, Moves.DISABLE ], @@ -9513,6 +9523,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 1, Moves.PROTECT ], [ 1, Moves.SCARY_FACE ], [ 1, Moves.ASTONISH ], + [ 1, Moves.HEAL_BLOCK ], [ 12, Moves.DISABLE ], [ 16, Moves.WILL_O_WISP ], [ 20, Moves.CRAFTY_SHIELD ], @@ -9720,6 +9731,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 24, Moves.HYPNOSIS ], [ 28, Moves.FAKE_TEARS ], [ 33, Moves.PSYCH_UP ], + [ 34, Moves.HEAL_BLOCK ], [ 36, Moves.PSYCHIC ], [ 40, Moves.FLATTER ], [ 44, Moves.FUTURE_SIGHT ], @@ -9735,6 +9747,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 20, Moves.PSYSHOCK ], [ 24, Moves.HYPNOSIS ], [ 28, Moves.FAKE_TEARS ], + [ 34, Moves.HEAL_BLOCK ], [ 35, Moves.PSYCH_UP ], [ 46, Moves.FLATTER ], [ 52, Moves.FUTURE_SIGHT ], @@ -9750,6 +9763,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 20, Moves.PSYSHOCK ], [ 24, Moves.HYPNOSIS ], [ 28, Moves.FAKE_TEARS ], + [ 34, Moves.HEAL_BLOCK ], [ 35, Moves.PSYCH_UP ], [ 40, Moves.PSYCHIC ], [ 48, Moves.FLATTER ], @@ -9771,6 +9785,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 36, Moves.PSYCHIC ], [ 40, Moves.SKILL_SWAP ], [ 44, Moves.FUTURE_SIGHT ], + [ 46, Moves.HEAL_BLOCK ], [ 48, Moves.WONDER_ROOM ], ], [Species.DUOSION]: [ @@ -9787,6 +9802,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 35, Moves.PAIN_SPLIT ], [ 40, Moves.PSYCHIC ], [ 46, Moves.SKILL_SWAP ], + [ 50, Moves.HEAL_BLOCK ], [ 52, Moves.FUTURE_SIGHT ], [ 58, Moves.WONDER_ROOM ], ], @@ -9805,6 +9821,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 35, Moves.PAIN_SPLIT ], [ 40, Moves.PSYCHIC ], [ 48, Moves.SKILL_SWAP ], + [ 54, Moves.HEAL_BLOCK ], [ 56, Moves.FUTURE_SIGHT ], [ 64, Moves.WONDER_ROOM ], ], @@ -10209,6 +10226,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 1, Moves.GROWL ], [ 1, Moves.CONFUSION ], [ 6, Moves.IMPRISON ], + [ 8, Moves.HEAL_BLOCK ], [ 12, Moves.TELEPORT ], [ 18, Moves.PSYBEAM ], [ 24, Moves.GUARD_SPLIT ], @@ -10226,6 +10244,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 1, Moves.TELEPORT ], [ 1, Moves.IMPRISON ], [ 1, Moves.PSYCHIC_TERRAIN ], + [ 8, Moves.HEAL_BLOCK ], [ 18, Moves.PSYBEAM ], [ 24, Moves.GUARD_SPLIT ], [ 24, Moves.POWER_SPLIT ], @@ -10884,6 +10903,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 20, Moves.SHOCK_WAVE ], [ 25, Moves.AGILITY ], [ 30, Moves.CHARGE ], + [ 31, Moves.HEAL_BLOCK ], [ 35, Moves.VOLT_SWITCH ], [ 40, Moves.CRUNCH ], [ 45, Moves.DISCHARGE ], @@ -11972,6 +11992,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 40, Moves.PLAY_ROUGH ], [ 44, Moves.MAGIC_ROOM ], [ 48, Moves.FOUL_PLAY ], + [ 50, Moves.HEAL_BLOCK ], [ 52, Moves.LAST_RESORT ], ], [Species.PHANTUMP]: [ @@ -13045,6 +13066,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 45, Moves.IRON_HEAD ], [ 50, Moves.TAKE_DOWN ], [ 55, Moves.DOUBLE_EDGE ], + [ 60, Moves.HEAL_BLOCK ], ], [Species.SILVALLY]: [ [ 0, Moves.MULTI_ATTACK ], @@ -13059,6 +13081,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 1, Moves.ICE_FANG ], [ 1, Moves.FIRE_FANG ], [ 1, Moves.IRON_HEAD ], + [ 1, Moves.HEAL_BLOCK ], [ 15, Moves.DOUBLE_HIT ], [ 20, Moves.METAL_SOUND ], [ 25, Moves.CRUSH_CLAW ], diff --git a/src/data/tms.ts b/src/data/tms.ts index 71264d16c62..332eb2234b1 100644 --- a/src/data/tms.ts +++ b/src/data/tms.ts @@ -29550,7 +29550,6 @@ export const tmSpecies: TmSpecies = { Species.MURKROW, Species.SLOWKING, Species.MISDREAVUS, - Species.UNOWN, Species.GIRAFARIG, Species.PINECO, Species.FORRETRESS, @@ -62012,21 +62011,49 @@ export const tmSpecies: TmSpecies = { Species.ALOLA_MAROWAK, ], [Moves.TERA_BLAST]: [ + Species.BULBASAUR, + Species.IVYSAUR, + Species.VENUSAUR, Species.CHARMANDER, Species.CHARMELEON, Species.CHARIZARD, + Species.SQUIRTLE, + Species.WARTORTLE, + Species.BLASTOISE, + Species.BUTTERFREE, + Species.BEEDRILL, + Species.PIDGEY, + Species.PIDGEOTTO, + Species.PIDGEOT, + Species.RATTATA, + Species.RATICATE, + Species.SPEAROW, + Species.FEAROW, Species.EKANS, Species.ARBOK, Species.PIKACHU, Species.RAICHU, Species.SANDSHREW, Species.SANDSLASH, + Species.NIDORAN_F, + Species.NIDORINA, + Species.NIDOQUEEN, + Species.NIDORAN_M, + Species.NIDORINO, + Species.NIDOKING, Species.CLEFAIRY, Species.CLEFABLE, Species.VULPIX, Species.NINETALES, Species.JIGGLYPUFF, Species.WIGGLYTUFF, + Species.ZUBAT, + Species.GOLBAT, + Species.ODDISH, + Species.GLOOM, + Species.VILEPLUME, + Species.PARAS, + Species.PARASECT, Species.VENONAT, Species.VENOMOTH, Species.DIGLETT, @@ -62042,16 +62069,31 @@ export const tmSpecies: TmSpecies = { Species.POLIWAG, Species.POLIWHIRL, Species.POLIWRATH, + Species.ABRA, + Species.KADABRA, + Species.ALAKAZAM, + Species.MACHOP, + Species.MACHOKE, + Species.MACHAMP, Species.BELLSPROUT, Species.WEEPINBELL, Species.VICTREEBEL, + Species.TENTACOOL, + Species.TENTACRUEL, Species.GEODUDE, Species.GRAVELER, Species.GOLEM, + Species.PONYTA, + Species.RAPIDASH, Species.SLOWPOKE, Species.SLOWBRO, Species.MAGNEMITE, Species.MAGNETON, + Species.FARFETCHD, + Species.DODUO, + Species.DODRIO, + Species.SEEL, + Species.DEWGONG, Species.GRIMER, Species.MUK, Species.SHELLDER, @@ -62059,20 +62101,52 @@ export const tmSpecies: TmSpecies = { Species.GASTLY, Species.HAUNTER, Species.GENGAR, + Species.ONIX, Species.DROWZEE, Species.HYPNO, + Species.KRABBY, + Species.KINGLER, Species.VOLTORB, Species.ELECTRODE, + Species.EXEGGCUTE, + Species.EXEGGUTOR, + Species.CUBONE, + Species.MAROWAK, + Species.HITMONLEE, + Species.HITMONCHAN, + Species.LICKITUNG, Species.KOFFING, Species.WEEZING, + Species.RHYHORN, + Species.RHYDON, Species.CHANSEY, + Species.TANGELA, + Species.KANGASKHAN, + Species.HORSEA, + Species.SEADRA, + Species.GOLDEEN, + Species.SEAKING, + Species.STARYU, + Species.STARMIE, + Species.MR_MIME, Species.SCYTHER, + Species.JYNX, + Species.ELECTABUZZ, + Species.MAGMAR, + Species.PINSIR, Species.TAUROS, Species.GYARADOS, + Species.LAPRAS, Species.EEVEE, Species.VAPOREON, Species.JOLTEON, Species.FLAREON, + Species.PORYGON, + Species.OMANYTE, + Species.OMASTAR, + Species.KABUTO, + Species.KABUTOPS, + Species.AERODACTYL, Species.SNORLAX, Species.ARTICUNO, Species.ZAPDOS, @@ -62082,21 +62156,37 @@ export const tmSpecies: TmSpecies = { Species.DRAGONITE, Species.MEWTWO, Species.MEW, + Species.CHIKORITA, + Species.BAYLEEF, + Species.MEGANIUM, Species.CYNDAQUIL, Species.QUILAVA, Species.TYPHLOSION, + Species.TOTODILE, + Species.CROCONAW, + Species.FERALIGATR, Species.SENTRET, Species.FURRET, Species.HOOTHOOT, Species.NOCTOWL, + Species.LEDYBA, + Species.LEDIAN, Species.SPINARAK, Species.ARIADOS, + Species.CROBAT, + Species.CHINCHOU, + Species.LANTURN, Species.PICHU, Species.CLEFFA, Species.IGGLYBUFF, + Species.TOGEPI, + Species.TOGETIC, + Species.NATU, + Species.XATU, Species.MAREEP, Species.FLAAFFY, Species.AMPHAROS, + Species.BELLOSSOM, Species.MARILL, Species.AZUMARILL, Species.SUDOWOODO, @@ -62120,8 +62210,12 @@ export const tmSpecies: TmSpecies = { Species.FORRETRESS, Species.DUNSPARCE, Species.GLIGAR, + Species.STEELIX, + Species.SNUBBULL, + Species.GRANBULL, Species.QWILFISH, Species.SCIZOR, + Species.SHUCKLE, Species.HERACROSS, Species.SNEASEL, Species.TEDDIURSA, @@ -62130,24 +62224,58 @@ export const tmSpecies: TmSpecies = { Species.MAGCARGO, Species.SWINUB, Species.PILOSWINE, + Species.CORSOLA, + Species.REMORAID, + Species.OCTILLERY, Species.DELIBIRD, + Species.MANTINE, + Species.SKARMORY, Species.HOUNDOUR, Species.HOUNDOOM, + Species.KINGDRA, Species.PHANPY, Species.DONPHAN, + Species.PORYGON2, Species.STANTLER, + Species.TYROGUE, + Species.HITMONTOP, + Species.SMOOCHUM, + Species.ELEKID, + Species.MAGBY, + Species.MILTANK, Species.BLISSEY, + Species.RAIKOU, + Species.ENTEI, + Species.SUICUNE, Species.LARVITAR, Species.PUPITAR, Species.TYRANITAR, + Species.LUGIA, + Species.HO_OH, + Species.CELEBI, + Species.TREECKO, + Species.GROVYLE, + Species.SCEPTILE, + Species.TORCHIC, + Species.COMBUSKEN, + Species.BLAZIKEN, + Species.MUDKIP, + Species.MARSHTOMP, + Species.SWAMPERT, Species.POOCHYENA, Species.MIGHTYENA, + Species.ZIGZAGOON, + Species.LINOONE, + Species.BEAUTIFLY, + Species.DUSTOX, Species.LOTAD, Species.LOMBRE, Species.LUDICOLO, Species.SEEDOT, Species.NUZLEAF, Species.SHIFTRY, + Species.TAILLOW, + Species.SWELLOW, Species.WINGULL, Species.PELIPPER, Species.RALTS, @@ -62160,49 +62288,101 @@ export const tmSpecies: TmSpecies = { Species.SLAKOTH, Species.VIGOROTH, Species.SLAKING, + Species.NINCADA, + Species.NINJASK, + Species.SHEDINJA, + Species.WHISMUR, + Species.LOUDRED, + Species.EXPLOUD, Species.MAKUHITA, Species.HARIYAMA, Species.AZURILL, Species.NOSEPASS, + Species.SKITTY, + Species.DELCATTY, Species.SABLEYE, + Species.MAWILE, + Species.ARON, + Species.LAIRON, + Species.AGGRON, Species.MEDITITE, Species.MEDICHAM, + Species.ELECTRIKE, + Species.MANECTRIC, + Species.PLUSLE, + Species.MINUN, Species.VOLBEAT, Species.ILLUMISE, + Species.ROSELIA, Species.GULPIN, Species.SWALOT, + Species.CARVANHA, + Species.SHARPEDO, + Species.WAILMER, + Species.WAILORD, Species.NUMEL, Species.CAMERUPT, Species.TORKOAL, Species.SPOINK, Species.GRUMPIG, + Species.SPINDA, + Species.TRAPINCH, + Species.VIBRAVA, + Species.FLYGON, Species.CACNEA, Species.CACTURNE, Species.SWABLU, Species.ALTARIA, Species.ZANGOOSE, Species.SEVIPER, + Species.LUNATONE, + Species.SOLROCK, Species.BARBOACH, Species.WHISCASH, Species.CORPHISH, Species.CRAWDAUNT, + Species.BALTOY, + Species.CLAYDOL, + Species.LILEEP, + Species.CRADILY, + Species.ANORITH, + Species.ARMALDO, Species.FEEBAS, Species.MILOTIC, + Species.CASTFORM, + Species.KECLEON, Species.SHUPPET, Species.BANETTE, Species.DUSKULL, Species.DUSCLOPS, Species.TROPIUS, Species.CHIMECHO, + Species.ABSOL, Species.SNORUNT, Species.GLALIE, + Species.SPHEAL, + Species.SEALEO, + Species.WALREIN, + Species.CLAMPERL, + Species.HUNTAIL, + Species.GOREBYSS, + Species.RELICANTH, Species.LUVDISC, Species.BAGON, Species.SHELGON, Species.SALAMENCE, + Species.METANG, + Species.METAGROSS, + Species.REGIROCK, + Species.REGICE, + Species.REGISTEEL, + Species.LATIAS, + Species.LATIOS, Species.KYOGRE, Species.GROUDON, Species.RAYQUAZA, + Species.JIRACHI, + Species.DEOXYS, Species.TURTWIG, Species.GROTLE, Species.TORTERRA, @@ -62215,30 +62395,49 @@ export const tmSpecies: TmSpecies = { Species.STARLY, Species.STARAVIA, Species.STARAPTOR, + Species.BIDOOF, + Species.BIBAREL, Species.KRICKETOT, Species.KRICKETUNE, Species.SHINX, Species.LUXIO, Species.LUXRAY, + Species.BUDEW, + Species.ROSERADE, + Species.CRANIDOS, + Species.RAMPARDOS, + Species.SHIELDON, + Species.BASTIODON, + Species.BURMY, + Species.WORMADAM, + Species.MOTHIM, Species.COMBEE, Species.VESPIQUEN, Species.PACHIRISU, Species.BUIZEL, Species.FLOATZEL, + Species.CHERUBI, + Species.CHERRIM, Species.SHELLOS, Species.GASTRODON, Species.AMBIPOM, Species.DRIFLOON, Species.DRIFBLIM, + Species.BUNEARY, + Species.LOPUNNY, Species.MISMAGIUS, Species.HONCHKROW, + Species.GLAMEOW, + Species.PURUGLY, Species.CHINGLING, Species.STUNKY, Species.SKUNTANK, Species.BRONZOR, Species.BRONZONG, Species.BONSLY, + Species.MIME_JR, Species.HAPPINY, + Species.CHATOT, Species.SPIRITOMB, Species.GIBLE, Species.GABITE, @@ -62248,19 +62447,30 @@ export const tmSpecies: TmSpecies = { Species.LUCARIO, Species.HIPPOPOTAS, Species.HIPPOWDON, + Species.SKORUPI, + Species.DRAPION, Species.CROAGUNK, Species.TOXICROAK, + Species.CARNIVINE, Species.FINNEON, Species.LUMINEON, + Species.MANTYKE, Species.SNOVER, Species.ABOMASNOW, Species.WEAVILE, Species.MAGNEZONE, + Species.LICKILICKY, + Species.RHYPERIOR, + Species.TANGROWTH, + Species.ELECTIVIRE, + Species.MAGMORTAR, + Species.TOGEKISS, Species.YANMEGA, Species.LEAFEON, Species.GLACEON, Species.GLISCOR, Species.MAMOSWINE, + Species.PORYGON_Z, Species.GALLADE, Species.PROBOPASS, Species.DUSKNOIR, @@ -62272,39 +62482,127 @@ export const tmSpecies: TmSpecies = { Species.DIALGA, Species.PALKIA, Species.HEATRAN, + Species.REGIGIGAS, Species.GIRATINA, Species.CRESSELIA, + Species.PHIONE, + Species.MANAPHY, + Species.DARKRAI, + Species.SHAYMIN, Species.ARCEUS, + Species.VICTINI, + Species.SNIVY, + Species.SERVINE, + Species.SERPERIOR, + Species.TEPIG, + Species.PIGNITE, + Species.EMBOAR, Species.OSHAWOTT, Species.DEWOTT, Species.SAMUROTT, + Species.PATRAT, + Species.WATCHOG, + Species.LILLIPUP, + Species.HERDIER, + Species.STOUTLAND, + Species.PURRLOIN, + Species.LIEPARD, + Species.PANSAGE, + Species.SIMISAGE, + Species.PANSEAR, + Species.SIMISEAR, + Species.PANPOUR, + Species.SIMIPOUR, + Species.MUNNA, + Species.MUSHARNA, + Species.PIDOVE, + Species.TRANQUILL, + Species.UNFEZANT, + Species.BLITZLE, + Species.ZEBSTRIKA, + Species.ROGGENROLA, + Species.BOLDORE, + Species.GIGALITH, + Species.WOOBAT, + Species.SWOOBAT, + Species.DRILBUR, + Species.EXCADRILL, + Species.AUDINO, Species.TIMBURR, Species.GURDURR, Species.CONKELDURR, + Species.TYMPOLE, + Species.PALPITOAD, + Species.SEISMITOAD, + Species.THROH, + Species.SAWK, Species.SEWADDLE, Species.SWADLOON, Species.LEAVANNY, + Species.VENIPEDE, + Species.WHIRLIPEDE, + Species.SCOLIPEDE, + Species.COTTONEE, + Species.WHIMSICOTT, Species.PETILIL, Species.LILLIGANT, Species.BASCULIN, Species.SANDILE, Species.KROKOROK, Species.KROOKODILE, + Species.DARUMAKA, + Species.DARMANITAN, + Species.MARACTUS, + Species.DWEBBLE, + Species.CRUSTLE, + Species.SCRAGGY, + Species.SCRAFTY, + Species.SIGILYPH, + Species.YAMASK, + Species.COFAGRIGUS, + Species.TIRTOUGA, + Species.CARRACOSTA, + Species.ARCHEN, + Species.ARCHEOPS, + Species.TRUBBISH, + Species.GARBODOR, Species.ZORUA, Species.ZOROARK, + Species.MINCCINO, + Species.CINCCINO, Species.GOTHITA, Species.GOTHORITA, Species.GOTHITELLE, + Species.SOLOSIS, + Species.DUOSION, + Species.REUNICLUS, Species.DUCKLETT, Species.SWANNA, + Species.VANILLITE, + Species.VANILLISH, + Species.VANILLUXE, Species.DEERLING, Species.SAWSBUCK, + Species.EMOLGA, + Species.KARRABLAST, + Species.ESCAVALIER, Species.FOONGUS, Species.AMOONGUSS, + Species.FRILLISH, + Species.JELLICENT, Species.ALOMOMOLA, + Species.JOLTIK, + Species.GALVANTULA, + Species.FERROSEED, + Species.FERROTHORN, + Species.KLINK, + Species.KLANG, + Species.KLINKLANG, Species.TYNAMO, Species.EELEKTRIK, Species.EELEKTROSS, + Species.ELGYEM, + Species.BEHEEYEM, Species.LITWICK, Species.LAMPENT, Species.CHANDELURE, @@ -62314,23 +62612,40 @@ export const tmSpecies: TmSpecies = { Species.CUBCHOO, Species.BEARTIC, Species.CRYOGONAL, + Species.SHELMET, + Species.ACCELGOR, + Species.STUNFISK, Species.MIENFOO, Species.MIENSHAO, + Species.DRUDDIGON, + Species.GOLETT, + Species.GOLURK, Species.PAWNIARD, Species.BISHARP, + Species.BOUFFALANT, Species.RUFFLET, Species.BRAVIARY, Species.VULLABY, Species.MANDIBUZZ, + Species.HEATMOR, + Species.DURANT, Species.DEINO, Species.ZWEILOUS, Species.HYDREIGON, Species.LARVESTA, Species.VOLCARONA, + Species.COBALION, + Species.TERRAKION, + Species.VIRIZION, Species.TORNADUS, Species.THUNDURUS, + Species.RESHIRAM, + Species.ZEKROM, Species.LANDORUS, + Species.KYUREM, + Species.KELDEO, Species.MELOETTA, + Species.GENESECT, Species.CHESPIN, Species.QUILLADIN, Species.CHESNAUGHT, @@ -62345,6 +62660,8 @@ export const tmSpecies: TmSpecies = { 'battle-bond', 'ash', ], + Species.BUNNELBY, + Species.DIGGERSBY, Species.FLETCHLING, Species.FLETCHINDER, Species.TALONFLAME, @@ -62354,14 +62671,43 @@ export const tmSpecies: TmSpecies = { Species.LITLEO, Species.PYROAR, Species.FLABEBE, - Species.FLOETTE, + [ + Species.FLOETTE, + 'red', + 'yellow', + 'orange', + 'blue', + 'white', + ], Species.FLORGES, Species.SKIDDO, Species.GOGOAT, + Species.PANCHAM, + Species.PANGORO, + Species.FURFROU, + Species.ESPURR, + Species.MEOWSTIC, + Species.HONEDGE, + Species.DOUBLADE, + Species.AEGISLASH, + Species.SPRITZEE, + Species.AROMATISSE, + Species.SWIRLIX, + Species.SLURPUFF, + Species.INKAY, + Species.MALAMAR, + Species.BINACLE, + Species.BARBARACLE, Species.SKRELP, Species.DRAGALGE, Species.CLAUNCHER, Species.CLAWITZER, + Species.HELIOPTILE, + Species.HELIOLISK, + Species.TYRUNT, + Species.TYRANTRUM, + Species.AMAURA, + Species.AURORUS, Species.SYLVEON, Species.HAWLUCHA, Species.DEDENNE, @@ -62372,16 +62718,30 @@ export const tmSpecies: TmSpecies = { Species.KLEFKI, Species.PHANTUMP, Species.TREVENANT, + Species.PUMPKABOO, + Species.GOURGEIST, Species.BERGMITE, Species.AVALUGG, Species.NOIBAT, Species.NOIVERN, + Species.XERNEAS, + Species.YVELTAL, + Species.ZYGARDE, Species.DIANCIE, Species.HOOPA, Species.VOLCANION, Species.ROWLET, Species.DARTRIX, Species.DECIDUEYE, + Species.LITTEN, + Species.TORRACAT, + Species.INCINEROAR, + Species.POPPLIO, + Species.BRIONNE, + Species.PRIMARINA, + Species.PIKIPEK, + Species.TRUMBEAK, + Species.TOUCANNON, Species.YUNGOOS, Species.GUMSHOOS, Species.GRUBBIN, @@ -62394,28 +62754,84 @@ export const tmSpecies: TmSpecies = { Species.RIBOMBEE, Species.ROCKRUFF, Species.LYCANROC, + Species.WISHIWASHI, Species.MAREANIE, Species.TOXAPEX, Species.MUDBRAY, Species.MUDSDALE, + Species.DEWPIDER, + Species.ARAQUANID, Species.FOMANTIS, Species.LURANTIS, + Species.MORELULL, + Species.SHIINOTIC, Species.SALANDIT, Species.SALAZZLE, + Species.STUFFUL, + Species.BEWEAR, Species.BOUNSWEET, Species.STEENEE, Species.TSAREENA, + Species.COMFEY, Species.ORANGURU, Species.PASSIMIAN, + Species.WIMPOD, + Species.GOLISOPOD, Species.SANDYGAST, Species.PALOSSAND, + Species.TYPE_NULL, + Species.SILVALLY, + Species.MINIOR, Species.KOMALA, + Species.TURTONATOR, + Species.TOGEDEMARU, Species.MIMIKYU, Species.BRUXISH, + Species.DRAMPA, + Species.DHELMISE, Species.JANGMO_O, Species.HAKAMO_O, Species.KOMMO_O, + Species.TAPU_KOKO, + Species.TAPU_LELE, + Species.TAPU_BULU, + Species.TAPU_FINI, + Species.SOLGALEO, + Species.LUNALA, + Species.NIHILEGO, + Species.BUZZWOLE, + Species.PHEROMOSA, + Species.XURKITREE, + Species.CELESTEELA, + Species.KARTANA, + Species.GUZZLORD, + Species.NECROZMA, Species.MAGEARNA, + Species.MARSHADOW, + Species.POIPOLE, + Species.NAGANADEL, + Species.STAKATAKA, + Species.BLACEPHALON, + Species.ZERAORA, + Species.ALOLA_RATTATA, + Species.ALOLA_RATICATE, + Species.ALOLA_RAICHU, + Species.ALOLA_SANDSHREW, + Species.ALOLA_SANDSLASH, + Species.ALOLA_VULPIX, + Species.ALOLA_NINETALES, + Species.ALOLA_DIGLETT, + Species.ALOLA_DUGTRIO, + Species.ALOLA_MEOWTH, + Species.ALOLA_PERSIAN, + Species.ALOLA_GEODUDE, + Species.ALOLA_GRAVELER, + Species.ALOLA_GOLEM, + Species.ALOLA_GRIMER, + Species.ALOLA_MUK, + Species.ALOLA_EXEGGUTOR, + Species.ALOLA_MAROWAK, + Species.ETERNAL_FLOETTE, Species.GROOKEY, Species.THWACKEY, Species.RILLABOOM, @@ -62596,21 +63012,6 @@ export const tmSpecies: TmSpecies = { Species.MUNKIDORI, Species.FEZANDIPITI, Species.OGERPON, - Species.ALOLA_RAICHU, - Species.ALOLA_SANDSHREW, - Species.ALOLA_SANDSLASH, - Species.ALOLA_VULPIX, - Species.ALOLA_NINETALES, - Species.ALOLA_DIGLETT, - Species.ALOLA_DUGTRIO, - Species.ALOLA_MEOWTH, - Species.ALOLA_PERSIAN, - Species.ALOLA_GEODUDE, - Species.ALOLA_GRAVELER, - Species.ALOLA_GOLEM, - Species.ALOLA_GRIMER, - Species.ALOLA_MUK, - Species.ETERNAL_FLOETTE, Species.GALAR_MEOWTH, Species.GALAR_SLOWPOKE, Species.GALAR_SLOWBRO, diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 55036e1906d..82915ce41bc 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -43,6 +43,7 @@ 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 { BerryType } from '../data/berry'; import { ABILITY_OVERRIDE, MOVE_OVERRIDE, OPP_ABILITY_OVERRIDE, OPP_MOVE_OVERRIDE, OPP_SHINY_OVERRIDE, OPP_VARIANT_OVERRIDE } from '../overrides'; export enum FieldPosition { @@ -455,6 +456,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return 1; } + getHeldItems(): PokemonHeldItemModifier[] { + if (!this.scene) + return []; + return this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier && (m as PokemonHeldItemModifier).pokemonId === this.id, this.isPlayer()) as PokemonHeldItemModifier[]; + } + updateScale(): void { this.setScale(this.getSpriteScale()); } @@ -2993,6 +3000,7 @@ export class PokemonSummonData { export class PokemonBattleData { public hitCount: integer = 0; public endured: boolean = false; + public berriesEaten: BerryType[] = []; } export class PokemonBattleSummonData { diff --git a/src/phases.ts b/src/phases.ts index ad2a7537de7..2e0b8425567 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -4095,7 +4095,7 @@ export class AttemptCapturePhase extends PokemonPhase { this.scene.pokemonInfoContainer.show(pokemon, true); - this.scene.gameData.updateSpeciesDexIvs(pokemon.species.speciesId, pokemon.ivs); + this.scene.gameData.updateSpeciesDexIvs(pokemon.species.getRootSpeciesId(true), pokemon.ivs); this.scene.ui.showText(i18next.t('menu:pokemonCaught', { pokemonName: pokemon.name }), null, () => { const end = () => { diff --git a/src/ui/stats-container.ts b/src/ui/stats-container.ts index 0144658051f..b8d9c59a4d7 100644 --- a/src/ui/stats-container.ts +++ b/src/ui/stats-container.ts @@ -4,7 +4,8 @@ import { Stat, getStatName } from "../data/pokemon-stat"; import { TextStyle, addBBCodeTextObject, addTextObject, getTextColor } from "./text"; const ivChartSize = 24; -const ivChartStatCoordMultipliers = [ [ 0, 1 ], [ 0.825, 0.5 ], [ 0.825, -0.5 ], [ 0, -1 ], [ -0.825, -0.5 ], [ -0.825, 0.5 ] ]; +const ivChartStatCoordMultipliers = [ [ 0, -1 ], [ 0.825, -0.5 ], [ 0.825, 0.5 ], [ -0.825, -0.5 ], [ -0.825, 0.5 ], [ 0, 1 ] ]; +const ivChartStatIndexes = [0,1,2,5,4,3] // swap special attack and speed const defaultIvChartData = new Array(12).fill(null).map(() => 0); export class StatsContainer extends Phaser.GameObjects.Container { @@ -22,7 +23,7 @@ export class StatsContainer extends Phaser.GameObjects.Container { } setup() { - const ivChartBgData = new Array(6).fill(null).map((_, i: integer) => [ ivChartSize * ivChartStatCoordMultipliers[i][0], ivChartSize * ivChartStatCoordMultipliers[i][1] ] ).flat(); + const ivChartBgData = new Array(6).fill(null).map((_, i: integer) => [ ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][0], ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][1] ] ).flat(); const ivChartBg = this.scene.add.polygon(48, 44, ivChartBgData, 0xd8e0f0, 0.625); ivChartBg.setOrigin(0, 0); @@ -62,7 +63,7 @@ export class StatsContainer extends Phaser.GameObjects.Container { updateIvs(ivs: integer[], originalIvs?: integer[]): void { if (ivs) { - const ivChartData = new Array(6).fill(null).map((_, i) => [ (ivs[i] / 31) * ivChartSize * ivChartStatCoordMultipliers[i][0], (ivs[i] / 31) * ivChartSize * ivChartStatCoordMultipliers[i][1] ] ).flat(); + const ivChartData = new Array(6).fill(null).map((_, i) => [ (ivs[ivChartStatIndexes[i]] / 31) * ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][0], (ivs[ivChartStatIndexes[i]] / 31) * ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][1] ] ).flat(); const lastIvChartData = this.statsIvsCache || defaultIvChartData; this.statsIvsCache = ivChartData.slice(0);