From f93f2bfca660af2facab21e8bdf5a7877cec2832 Mon Sep 17 00:00:00 2001 From: Benjamin Odom Date: Mon, 20 May 2024 04:06:20 -0500 Subject: [PATCH 01/17] Reduce EXP Balance (#1128) * Set max to 4 --- src/modifier/modifier.ts | 2 +- src/system/game-data.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 0736831a01e..75f54296a20 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -1423,7 +1423,7 @@ export class ExpBalanceModifier extends PersistentModifier { } getMaxStackCount(scene: BattleScene): integer { - return 5; + return 4; } } diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 2691e79be61..8b09fe8b910 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -867,8 +867,11 @@ export class GameData { const ret: PersistentModifierData[] = []; if (v === null) v = []; - for (let md of v) + for (let md of v) { + if(md?.className === 'ExpBalanceModifier') // Temporarily limit EXP Balance until it gets reworked + md.stackCount = Math.min(md.stackCount, 4); ret.push(new PersistentModifierData(md, player)); + } return ret; } From 9493f59a4e82894bfab159e23d5ad62dc91a37d8 Mon Sep 17 00:00:00 2001 From: JO <35469623+AJ2O@users.noreply.github.com> Date: Mon, 20 May 2024 08:30:45 -0400 Subject: [PATCH 02/17] Complete Psychic Fangs TM list (#1161) --- src/data/tms.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/data/tms.ts b/src/data/tms.ts index 0b2c2c93bc8..d8b22438c37 100644 --- a/src/data/tms.ts +++ b/src/data/tms.ts @@ -60026,10 +60026,14 @@ export const tmSpecies: TmSpecies = { Species.ARCANINE, Species.AERODACTYL, Species.MEW, + Species.CROCONAW, + Species.FERALIGATR, Species.ESPEON, Species.GIRAFARIG, Species.GLIGAR, Species.STEELIX, + Species.SNUBBULL, + Species.GRANBULL, Species.HOUNDOUR, Species.HOUNDOOM, Species.POOCHYENA, From d2e455cdadbe250bf02ab44b4b885f2cc750429e Mon Sep 17 00:00:00 2001 From: Greenlamp2 <44787002+Greenlamp2@users.noreply.github.com> Date: Mon, 20 May 2024 14:31:16 +0200 Subject: [PATCH 03/17] Tests - Check if something is wrong with the variant's sprite (#1162) * return a list of errors if something is wrong with the variant's sprite * reformat --- src/test/pokemonSprite.test.ts | 213 +++++++++++++++++++++++++++++++++ src/test/testUtils.ts | 10 ++ 2 files changed, 223 insertions(+) create mode 100644 src/test/pokemonSprite.test.ts create mode 100644 src/test/testUtils.ts diff --git a/src/test/pokemonSprite.test.ts b/src/test/pokemonSprite.test.ts new file mode 100644 index 00000000000..f1be5c0ca3c --- /dev/null +++ b/src/test/pokemonSprite.test.ts @@ -0,0 +1,213 @@ +import {beforeAll, describe, expect, it} from "vitest"; +import _masterlist from '../../public/images/pokemon/variant/_masterlist.json'; +import fs from 'fs'; +import path from 'path'; +import {getAppRootDir} from "#app/test/testUtils"; + +const deepCopy = (data) => { + return JSON.parse(JSON.stringify(data)); +} + + +describe("check if every variant's sprite are correctly set", () => { + let masterlist; + let expVariant; + let femaleVariant; + let backVariant; + let rootDir; + + beforeAll(() => { + rootDir = `${getAppRootDir()}${path.sep}public${path.sep}images${path.sep}pokemon${path.sep}variant${path.sep}` + masterlist = deepCopy(_masterlist); + expVariant = masterlist.exp; + femaleVariant = masterlist.female; + backVariant = masterlist.back; + delete masterlist.exp + delete masterlist.female + delete masterlist.back + }); + + it('data should not be undefined', () => { + expect(masterlist).not.toBeUndefined(); + expect(expVariant).not.toBeUndefined(); + expect(femaleVariant).not.toBeUndefined(); + expect(backVariant).not.toBeUndefined(); + }); + + function getMissingMasterlist(mlist, dirpath, excludes = []) { + const errors = []; + if (fs.existsSync(dirpath)) { + const files = fs.readdirSync(dirpath); + for (const filename of files) { + const filePath = `${dirpath}${filename}` + const ext = filename.split('.')[1]; + const name = filename.split('.')[0]; + if (excludes.includes(name)) continue; + if (name.includes('_')) { + const id = name.split('_')[0]; + const variant = name.split('_')[1]; + if (ext !== 'json') { + if (mlist.hasOwnProperty(id)) { + const urlJsonFile = `${dirpath}${id}.json`; + const jsonFileExists = fs.existsSync(urlJsonFile); + if (mlist[id].includes(1)) { + const msg = `MISSING JSON ${urlJsonFile}`; + if (!jsonFileExists && !errors.includes(msg)) errors.push(msg); + } + } + if (!mlist.hasOwnProperty(id)) errors.push(`missing key ${id} in masterlist for ${filePath}`); + else if (mlist[id][parseInt(variant, 10) - 1] !== 2) errors.push(`the value should be 2 for the index ${parseInt(variant, 10) - 1} - ${filePath}`); + } + } else if (!mlist.hasOwnProperty(name)) errors.push(`named - missing key ${name} in masterlist for ${filePath}`);else { + const raw = fs.readFileSync(filePath, {encoding: 'utf8', flag: 'r'}); + const data = JSON.parse(raw); + for (const key of Object.keys(data)) { + if (mlist[name][key] !== 1) errors.push(`the value should be 1 in the array ${filePath}`); + } + } + } + } + return errors; + } + + function getMissingFiles(keys, dirPath) { + const errors = []; + for (const key of Object.keys(keys)) { + const row = keys[key]; + for (const [index, elm] of row.entries()) { + let url; + if (elm === 0) continue + else if (elm === 1) { + url = `${key}.json` + let filePath = `${dirPath}${url}`; + const raw = fs.readFileSync(filePath, {encoding: 'utf8', flag: 'r'}); + const data = JSON.parse(raw); + if (!data.hasOwnProperty(index)) { + errors.push(`index: ${index} - ${filePath}`); + } + } else if (elm === 2) { + url = `${key}_${parseInt(index, 10) + 1}.png`; + let filePath = `${dirPath}${url}`; + if (!fs.existsSync(filePath)) { + errors.push(filePath) + } + + url = `${key}_${parseInt(index, 10) + 1}.json`; + filePath = `${dirPath}${url}`; + if (!fs.existsSync(filePath)) { + errors.push(filePath) + } + } + } + } + return errors; + } + + // chech presence of every files listed in masterlist + + it('check root variant files', () => { + const dirPath = rootDir; + const errors = getMissingFiles(masterlist, dirPath); + if (errors.length) console.log('errors', errors); + expect(errors.length).toBe(0); + }); + + it('check female variant files', () => { + const dirPath = `${rootDir}female${path.sep}`; + const errors = getMissingFiles(femaleVariant, dirPath); + if (errors.length) console.log('errors', errors); + expect(errors.length).toBe(0); + }); + + it('check back female variant files', () => { + const dirPath = `${rootDir}back${path.sep}female${path.sep}`; + const errors = getMissingFiles(backVariant.female, dirPath); + if (errors.length) console.log('errors', errors); + expect(errors.length).toBe(0); + }); + + it('check back male back variant files', () => { + const dirPath = `${rootDir}back${path.sep}`; + let backMaleVariant = deepCopy(backVariant); + delete backMaleVariant.female; + const errors = getMissingFiles(backMaleVariant, dirPath); + if (errors.length) console.log('errors', errors); + expect(errors.length).toBe(0); + }); + + it('check exp back variant files', () => { + const dirPath = `${rootDir}exp${path.sep}back${path.sep}`; + const errors = getMissingFiles(expVariant.back, dirPath); + if (errors.length) console.log('errors', errors); + expect(errors.length).toBe(0); + }); + + it('check exp female variant files', () => { + const dirPath = `${rootDir}exp${path.sep}female${path.sep}`; + const errors = getMissingFiles(expVariant.female, dirPath); + if (errors.length) console.log('errors', errors); + expect(errors.length).toBe(0); + }); + + it('check exp male variant files', () => { + const dirPath = `${rootDir}exp${path.sep}`; + let expMaleVariant = deepCopy(expVariant); + delete expMaleVariant.female; + delete expMaleVariant.back; + const errors = getMissingFiles(expMaleVariant, dirPath); + if (errors.length) console.log('errors', errors); + expect(errors.length).toBe(0); + }); + + // check over every file if it's correctly set in the masterlist + + it('look over every file in variant female and check if present in masterlist', () => { + const dirPath = `${rootDir}female${path.sep}`; + const errors = getMissingMasterlist(femaleVariant, dirPath); + if (errors.length) console.log('errors for ', dirPath, errors); + expect(errors.length).toBe(0); + }); + + it('look over every file in variant back female and check if present in masterlist', () => { + const dirPath = `${rootDir}back${path.sep}female${path.sep}`; + const errors = getMissingMasterlist(backVariant.female, dirPath); + if (errors.length) console.log('errors for ', dirPath, errors); + expect(errors.length).toBe(0); + }); + + it('look over every file in variant back male and check if present in masterlist', () => { + const dirPath = `${rootDir}back${path.sep}`; + let backMaleVariant = deepCopy(backVariant); + const errors = getMissingMasterlist(backMaleVariant, dirPath, ['female']); + if (errors.length) console.log('errors for ', dirPath, errors); + expect(errors.length).toBe(0); + }); + + it('look over every file in variant exp back and check if present in masterlist', () => { + const dirPath = `${rootDir}exp${path.sep}back${path.sep}`; + const errors = getMissingMasterlist(expVariant.back, dirPath); + if (errors.length) console.log('errors for ', dirPath, errors); + expect(errors.length).toBe(0); + }); + + it('look over every file in variant exp female and check if present in masterlist', () => { + const dirPath = `${rootDir}exp${path.sep}female${path.sep}`; + const errors = getMissingMasterlist(expVariant.female, dirPath); + if (errors.length) console.log('errors for ', dirPath, errors); + expect(errors.length).toBe(0); + }); + + it('look over every file in variant exp male and check if present in masterlist', () => { + const dirPath = `${rootDir}exp${path.sep}`; + const errors = getMissingMasterlist(expVariant, dirPath, ['back', 'female']); + if (errors.length) console.log('errors for ', dirPath, errors); + expect(errors.length).toBe(0); + }); + + it('look over every file in variant root and check if present in masterlist', () => { + const dirPath = `${rootDir}`; + const errors = getMissingMasterlist(masterlist, dirPath, ['back', 'female', 'exp', 'icons']); + if (errors.length) console.log('errors for ', dirPath, errors); + expect(errors.length).toBe(0); + }); +}); \ No newline at end of file diff --git a/src/test/testUtils.ts b/src/test/testUtils.ts new file mode 100644 index 00000000000..6d01afdb1bc --- /dev/null +++ b/src/test/testUtils.ts @@ -0,0 +1,10 @@ +const fs = require('fs') +const path = require('path') + +export function getAppRootDir () { + let currentDir = __dirname + while(!fs.existsSync(path.join(currentDir, 'package.json'))) { + currentDir = path.join(currentDir, '..') + } + return currentDir +} \ No newline at end of file From 136afa6b003a0c7a7aa94e8e2ff054fb4d082a42 Mon Sep 17 00:00:00 2001 From: Greenlamp2 <44787002+Greenlamp2@users.noreply.github.com> Date: Mon, 20 May 2024 21:40:40 +0200 Subject: [PATCH 04/17] Tests - Check if something is wrong with the variant's sprite (#1175) * return a list of errors if something is wrong with the variant's sprite * reformat * added data in error message * added read comfort + detection of missing json for existing variant * fix an error of message display --- src/test/pokemonSprite.test.ts | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/test/pokemonSprite.test.ts b/src/test/pokemonSprite.test.ts index f1be5c0ca3c..2ea66878f36 100644 --- a/src/test/pokemonSprite.test.ts +++ b/src/test/pokemonSprite.test.ts @@ -36,10 +36,12 @@ describe("check if every variant's sprite are correctly set", () => { function getMissingMasterlist(mlist, dirpath, excludes = []) { const errors = []; + const trimmedDirpath = `variant${path.sep}${dirpath.split(rootDir)[1]}`; if (fs.existsSync(dirpath)) { const files = fs.readdirSync(dirpath); for (const filename of files) { const filePath = `${dirpath}${filename}` + const trimmedFilePath = `${trimmedDirpath}${filename}` const ext = filename.split('.')[1]; const name = filename.split('.')[0]; if (excludes.includes(name)) continue; @@ -49,20 +51,30 @@ describe("check if every variant's sprite are correctly set", () => { if (ext !== 'json') { if (mlist.hasOwnProperty(id)) { const urlJsonFile = `${dirpath}${id}.json`; + const trimmedUrlJsonFilepath = `${trimmedDirpath}${id}.json`; const jsonFileExists = fs.existsSync(urlJsonFile); if (mlist[id].includes(1)) { - const msg = `MISSING JSON ${urlJsonFile}`; + const msg = `[${name}] MISSING JSON ${trimmedUrlJsonFilepath}`; if (!jsonFileExists && !errors.includes(msg)) errors.push(msg); } } - if (!mlist.hasOwnProperty(id)) errors.push(`missing key ${id} in masterlist for ${filePath}`); - else if (mlist[id][parseInt(variant, 10) - 1] !== 2) errors.push(`the value should be 2 for the index ${parseInt(variant, 10) - 1} - ${filePath}`); + if (!mlist.hasOwnProperty(id)) errors.push(`[${id}] missing key ${id} in masterlist for ${trimmedFilePath}`); + else if (mlist[id][parseInt(variant, 10) - 1] !== 2) { + const urlJsonFile = `${dirpath}${name}.json`; + const trimmedUrlJsonFilepath = `${trimmedDirpath}${name}.json`; + const jsonFileExists = fs.existsSync(urlJsonFile); + if (mlist[id].includes(1)) { + const msg = `[${id}] MISSING JSON ${trimmedUrlJsonFilepath}`; + if (!jsonFileExists && !errors.includes(msg)) errors.push(msg); + } + errors.push(`[${id}] [${mlist[id]}] - the value should be 2 for the index ${parseInt(variant, 10) - 1} - ${trimmedFilePath}`); + } } - } else if (!mlist.hasOwnProperty(name)) errors.push(`named - missing key ${name} in masterlist for ${filePath}`);else { + } else if (!mlist.hasOwnProperty(name)) errors.push(`named - missing key ${name} in masterlist for ${trimmedFilePath}`);else { const raw = fs.readFileSync(filePath, {encoding: 'utf8', flag: 'r'}); const data = JSON.parse(raw); for (const key of Object.keys(data)) { - if (mlist[name][key] !== 1) errors.push(`the value should be 1 in the array ${filePath}`); + if (mlist[name][key] !== 1) errors.push(`[${name}] [${mlist[name]}] - the value should be 1 for the index ${key} - ${trimmedFilePath}`); } } } From 04045623a026d22527459a0caba5d73e59d9fc4a Mon Sep 17 00:00:00 2001 From: Matthew Olker Date: Mon, 20 May 2024 16:41:40 -0400 Subject: [PATCH 05/17] Update shiny event end to match discord announcement --- src/field/pokemon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 8e56d163141..8071b2c032e 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1127,7 +1127,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { let shinyThreshold = new Utils.IntegerHolder(32); if (thresholdOverride === undefined) { if (!this.hasTrainer()) { - if (new Date() < new Date('2024-05-21')) + if (new Date() < new Date(2024, 4, 21, 20)) shinyThreshold.value *= 3; this.scene.applyModifiers(ShinyRateBoosterModifier, true, shinyThreshold); } From 6952fe065b44c0c6371f0a575b8cf5fb8e97dbe3 Mon Sep 17 00:00:00 2001 From: Tempoanon <163687446+TempsRay@users.noreply.github.com> Date: Mon, 20 May 2024 17:11:36 -0400 Subject: [PATCH 06/17] Add selstar to credits (#1180) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c5d4f1f0525..72887579f17 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Check out our [Trello Board](https://trello.com/b/z10B703R/pokerogue-board) to s ### 🎨 Trainer Portraits - pkmn_realidea (Paid Commissions) -### 🎨 Pokemon Sprites +### 🎨 Pokemon Sprites and Animation - GAMEFREAK (Pokémon Black/White 2) - Smogon Sprite Project (Various Artists) - Skyflyer @@ -100,6 +100,7 @@ Check out our [Trello Board](https://trello.com/b/z10B703R/pokerogue-board) to s - bizcoeindoloro - mangalos810 - Involuntary-Twitch + - selstar ### 🎨 Move Animations - Pokémon Reborn From 0fd2dcf0aa52abac51dc98bae419c10fc1edc6f4 Mon Sep 17 00:00:00 2001 From: damocleas Date: Mon, 20 May 2024 18:15:09 -0600 Subject: [PATCH 07/17] Update pokemon-species.ts (#1184) Updated Starter Point Values for 6+ Cost mons --- src/data/pokemon-species.ts | 88 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 5032bd0dfbc..deb3fdbc00e 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -2634,7 +2634,7 @@ export const speciesStarters = { [Species.MOLTRES]: 6, [Species.DRATINI]: 4, [Species.MEWTWO]: 8, - [Species.MEW]: 7, + [Species.MEW]: 6, [Species.CHIKORITA]: 3, [Species.CYNDAQUIL]: 3, @@ -2693,7 +2693,7 @@ export const speciesStarters = { [Species.LARVITAR]: 4, [Species.LUGIA]: 8, [Species.HO_OH]: 8, - [Species.CELEBI]: 7, + [Species.CELEBI]: 6, [Species.TREECKO]: 3, [Species.TORCHIC]: 3, @@ -2765,9 +2765,9 @@ export const speciesStarters = { [Species.REGISTEEL]: 6, [Species.LATIAS]: 7, [Species.LATIOS]: 7, - [Species.KYOGRE]: 8, - [Species.GROUDON]: 8, - [Species.RAYQUAZA]: 8, + [Species.KYOGRE]: 9, + [Species.GROUDON]: 9, + [Species.RAYQUAZA]: 9, [Species.JIRACHI]: 7, [Species.DEOXYS]: 7, @@ -2809,19 +2809,19 @@ export const speciesStarters = { [Species.MANTYKE]: 3, [Species.SNOVER]: 3, [Species.ROTOM]: 5, - [Species.UXIE]: 7, - [Species.MESPRIT]: 7, - [Species.AZELF]: 7, + [Species.UXIE]: 6, + [Species.MESPRIT]: 6, + [Species.AZELF]: 6, [Species.DIALGA]: 8, [Species.PALKIA]: 8, - [Species.HEATRAN]: 7, - [Species.REGIGIGAS]: 8, + [Species.HEATRAN]: 6, + [Species.REGIGIGAS]: 7, [Species.GIRATINA]: 8, - [Species.CRESSELIA]: 7, - [Species.PHIONE]: 5, + [Species.CRESSELIA]: 6, + [Species.PHIONE]: 4, [Species.MANAPHY]: 7, - [Species.DARKRAI]: 7, - [Species.SHAYMIN]: 7, + [Species.DARKRAI]: 6, + [Species.SHAYMIN]: 6, [Species.ARCEUS]: 9, [Species.VICTINI]: 7, @@ -2903,9 +2903,9 @@ export const speciesStarters = { [Species.ZEKROM]: 8, [Species.LANDORUS]: 7, [Species.KYUREM]: 8, - [Species.KELDEO]: 7, - [Species.MELOETTA]: 7, - [Species.GENESECT]: 7, + [Species.KELDEO]: 6, + [Species.MELOETTA]: 6, + [Species.GENESECT]: 6, [Species.CHESPIN]: 3, [Species.FENNEKIN]: 3, @@ -2943,7 +2943,7 @@ export const speciesStarters = { [Species.ZYGARDE]: 8, [Species.DIANCIE]: 7, [Species.HOOPA]: 7, - [Species.VOLCANION]: 7, + [Species.VOLCANION]: 6, [Species.ETERNAL_FLOETTE]: 5, [Species.ROWLET]: 3, @@ -2971,7 +2971,7 @@ export const speciesStarters = { [Species.WIMPOD]: 3, [Species.SANDYGAST]: 3, [Species.PYUKUMUKU]: 3, - [Species.TYPE_NULL]: 6, + [Species.TYPE_NULL]: 5, [Species.MINIOR]: 5, [Species.KOMALA]: 5, [Species.TURTONATOR]: 5, @@ -2985,21 +2985,21 @@ export const speciesStarters = { [Species.TAPU_LELE]: 6, [Species.TAPU_BULU]: 6, [Species.TAPU_FINI]: 6, - [Species.COSMOG]: 7, - [Species.NIHILEGO]: 7, - [Species.BUZZWOLE]: 7, + [Species.COSMOG]: 6, + [Species.NIHILEGO]: 6, + [Species.BUZZWOLE]: 6, [Species.PHEROMOSA]: 7, - [Species.XURKITREE]: 7, - [Species.CELESTEELA]: 7, + [Species.XURKITREE]: 6, + [Species.CELESTEELA]: 6, [Species.KARTANA]: 7, - [Species.GUZZLORD]: 7, + [Species.GUZZLORD]: 6, [Species.NECROZMA]: 8, [Species.MAGEARNA]: 7, [Species.MARSHADOW]: 7, [Species.POIPOLE]: 7, - [Species.STAKATAKA]: 7, + [Species.STAKATAKA]: 6, [Species.BLACEPHALON]: 7, - [Species.ZERAORA]: 7, + [Species.ZERAORA]: 6, [Species.MELTAN]: 6, [Species.ALOLA_RATTATA]: 2, [Species.ALOLA_SANDSHREW]: 4, @@ -3046,14 +3046,14 @@ export const speciesStarters = { [Species.ARCTOVISH]: 5, [Species.DURALUDON]: 5, [Species.DREEPY]: 4, - [Species.ZACIAN]: 8, + [Species.ZACIAN]: 9, [Species.ZAMAZENTA]: 8, [Species.ETERNATUS]: 10, - [Species.KUBFU]: 7, - [Species.ZARUDE]: 7, + [Species.KUBFU]: 6, + [Species.ZARUDE]: 6, [Species.REGIELEKI]: 6, [Species.REGIDRAGO]: 6, - [Species.GLASTRIER]: 7, + [Species.GLASTRIER]: 6, [Species.SPECTRIER]: 7, [Species.CALYREX]: 8, [Species.GALAR_MEOWTH]: 4, @@ -3127,27 +3127,27 @@ export const speciesStarters = { [Species.IRON_THORNS]: 6, [Species.FRIGIBAX]: 4, [Species.GIMMIGHOUL]: 5, - [Species.WO_CHIEN]: 7, + [Species.WO_CHIEN]: 6, [Species.CHIEN_PAO]: 7, - [Species.TING_LU]: 7, + [Species.TING_LU]: 6, [Species.CHI_YU]: 7, [Species.ROARING_MOON]: 6, [Species.IRON_VALIANT]: 6, - [Species.KORAIDON]: 8, - [Species.MIRAIDON]: 8, - [Species.WALKING_WAKE]: 7, - [Species.IRON_LEAVES]: 7, + [Species.KORAIDON]: 9, + [Species.MIRAIDON]: 9, + [Species.WALKING_WAKE]: 6, + [Species.IRON_LEAVES]: 6, [Species.POLTCHAGEIST]: 4, - [Species.OKIDOGI]: 7, - [Species.MUNKIDORI]: 7, - [Species.FEZANDIPITI]: 7, - [Species.OGERPON]: 8, + [Species.OKIDOGI]: 6, + [Species.MUNKIDORI]: 6, + [Species.FEZANDIPITI]: 6, + [Species.OGERPON]: 7, [Species.GOUGING_FIRE]: 7, - [Species.RAGING_BOLT]: 7, + [Species.RAGING_BOLT]: 6, [Species.IRON_BOULDER]: 7, - [Species.IRON_CROWN]: 7, + [Species.IRON_CROWN]: 6, [Species.TERAPAGOS]: 8, - [Species.PECHARUNT]: 7, + [Species.PECHARUNT]: 6, [Species.PALDEA_TAUROS]: 5, [Species.PALDEA_WOOPER]: 3, [Species.BLOODMOON_URSALUNA]: 7, From c454e2d2327b586188ac636d67c993556d1a745e Mon Sep 17 00:00:00 2001 From: Greenlamp2 <44787002+Greenlamp2@users.noreply.github.com> Date: Tue, 21 May 2024 02:17:21 +0200 Subject: [PATCH 08/17] Fix - shiny color swap (#1183) * return a list of errors if something is wrong with the variant's sprite * reformat * added data in error message * added read comfort + detection of missing json for existing variant * fix an error of message display * fix fetch color swap, missing a return --- src/field/pokemon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 8071b2c032e..99cd56fbf04 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -336,7 +336,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { console.error(`Could not load ${res.url}!`); return; } - res.json() + return res.json() }).then(c => { variantColorCache[key] = c; resolve(); From 680eecc452eb9ff1cd232f8f986278e3cfdb3775 Mon Sep 17 00:00:00 2001 From: Matthew Olker Date: Mon, 20 May 2024 21:40:56 -0400 Subject: [PATCH 09/17] Fix incorrect passive costs --- src/ui/starter-select-ui-handler.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index b0321946e9b..090a0692424 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -85,11 +85,11 @@ const languageSettings: { [key: string]: LanguageSetting } = { const starterCandyCosts: { passive: integer, costReduction: [integer, integer] }[] = [ { passive: 50, costReduction: [30, 75] }, // 1 { passive: 45, costReduction: [25, 60] }, // 2 - { passive: 30, costReduction: [20, 50] }, // 3 - { passive: 25, costReduction: [15, 40] }, // 4 - { passive: 20, costReduction: [12, 35] }, // 5 - { passive: 15, costReduction: [10, 30] }, // 6 - { passive: 10, costReduction: [8, 20] }, // 7 + { passive: 40, costReduction: [20, 50] }, // 3 + { passive: 30, costReduction: [15, 40] }, // 4 + { passive: 25, costReduction: [12, 35] }, // 5 + { passive: 20, costReduction: [10, 30] }, // 6 + { passive: 15, costReduction: [8, 20] }, // 7 { passive: 10, costReduction: [5, 15] }, // 8 { passive: 10, costReduction: [3, 10] }, // 9 { passive: 10, costReduction: [3, 10] }, // 10 From 82be3daf9dd3a3c2af5b4d6803fc14f533fe0c47 Mon Sep 17 00:00:00 2001 From: Madmadness65 Date: Mon, 20 May 2024 22:12:07 -0500 Subject: [PATCH 10/17] Allow Roaming Gimmighoul to be caught --- src/battle-scene.ts | 1 + src/data/pokemon-evolutions.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 0f75447a500..5a7b2246b01 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1016,6 +1016,7 @@ export default class BattleScene extends SceneBase { case Species.ZARUDE: case Species.SQUAWKABILLY: case Species.TATSUGIRI: + case Species.GIMMIGHOUL: case Species.PALDEA_TAUROS: return Utils.randSeedInt(species.forms.length); case Species.GRENINJA: diff --git a/src/data/pokemon-evolutions.ts b/src/data/pokemon-evolutions.ts index 7511b0e4162..80f62ee223e 100644 --- a/src/data/pokemon-evolutions.ts +++ b/src/data/pokemon-evolutions.ts @@ -1608,7 +1608,8 @@ export const pokemonEvolutions: PokemonEvolutions = { new SpeciesEvolution(Species.FROSMOTH, 1, null, new SpeciesFriendshipEvolutionCondition(90, p => p.scene.arena.getTimeOfDay() === TimeOfDay.DUSK || p.scene.arena.getTimeOfDay() === TimeOfDay.NIGHT), SpeciesWildEvolutionDelay.MEDIUM) ], [Species.GIMMIGHOUL]: [ - new SpeciesEvolution(Species.GHOLDENGO, 1, null, new SpeciesFriendshipEvolutionCondition(70), SpeciesWildEvolutionDelay.VERY_LONG) + new SpeciesFormEvolution(Species.GHOLDENGO, '', '', 1, null, new SpeciesFriendshipEvolutionCondition(70), SpeciesWildEvolutionDelay.VERY_LONG), + new SpeciesFormEvolution(Species.GHOLDENGO, 'roaming', '', 1, null, new SpeciesFriendshipEvolutionCondition(70), SpeciesWildEvolutionDelay.VERY_LONG) ] }; From e97d79170de24e935053408396bdcd2b1df85e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ricardo=20Fleury=20Oliveira?= Date: Tue, 21 May 2024 00:26:53 -0300 Subject: [PATCH 11/17] added nonExplicitSupportedLngs (#1181) --- src/plugins/i18n.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index 29e28f60f39..7bb3535ba4a 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -93,8 +93,9 @@ export function initI18n(): void { i18next.use(LanguageDetector).init({ lng: lang, + nonExplicitSupportedLngs: true, fallbackLng: 'en', - supportedLngs: ['en', 'es', 'fr', 'it', 'de', 'zh_CN','pt_BR'], + supportedLngs: ['en', 'es', 'fr', 'it', 'de', 'zh','pt'], debug: true, interpolation: { escapeValue: false, From e3a71cf17164b6d1a3276c201630ee76a1963200 Mon Sep 17 00:00:00 2001 From: Matthew Olker Date: Mon, 20 May 2024 23:51:16 -0400 Subject: [PATCH 12/17] Revert: Allow Roaming Gimmighoul to be caught --- src/battle-scene.ts | 1 - src/data/pokemon-evolutions.ts | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 5a7b2246b01..0f75447a500 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -1016,7 +1016,6 @@ export default class BattleScene extends SceneBase { case Species.ZARUDE: case Species.SQUAWKABILLY: case Species.TATSUGIRI: - case Species.GIMMIGHOUL: case Species.PALDEA_TAUROS: return Utils.randSeedInt(species.forms.length); case Species.GRENINJA: diff --git a/src/data/pokemon-evolutions.ts b/src/data/pokemon-evolutions.ts index 80f62ee223e..de80df37260 100644 --- a/src/data/pokemon-evolutions.ts +++ b/src/data/pokemon-evolutions.ts @@ -1608,9 +1608,7 @@ export const pokemonEvolutions: PokemonEvolutions = { new SpeciesEvolution(Species.FROSMOTH, 1, null, new SpeciesFriendshipEvolutionCondition(90, p => p.scene.arena.getTimeOfDay() === TimeOfDay.DUSK || p.scene.arena.getTimeOfDay() === TimeOfDay.NIGHT), SpeciesWildEvolutionDelay.MEDIUM) ], [Species.GIMMIGHOUL]: [ - new SpeciesFormEvolution(Species.GHOLDENGO, '', '', 1, null, new SpeciesFriendshipEvolutionCondition(70), SpeciesWildEvolutionDelay.VERY_LONG), - new SpeciesFormEvolution(Species.GHOLDENGO, 'roaming', '', 1, null, new SpeciesFriendshipEvolutionCondition(70), SpeciesWildEvolutionDelay.VERY_LONG) - ] + new SpeciesEvolution(Species.GHOLDENGO, 1, null, new SpeciesFriendshipEvolutionCondition(70), SpeciesWildEvolutionDelay.VERY_LONG) ] }; interface PokemonPrevolutions { From 70939bf89fa9031c90df4a0bb95af7258cab6847 Mon Sep 17 00:00:00 2001 From: Matthew Olker Date: Tue, 21 May 2024 00:25:55 -0400 Subject: [PATCH 13/17] Should fix black screen on load issue --- src/ui/starter-select-ui-handler.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 090a0692424..4a040792643 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -70,12 +70,12 @@ const languageSettings: { [key: string]: LanguageSetting } = { starterInfoTextSize: '54px', instructionTextSize: '42px', }, - "zh_CN":{ + "zh":{ starterInfoTextSize: '40px', instructionTextSize: '42px', starterInfoYOffset: 2 }, - "pt_BR":{ + "pt":{ starterInfoTextSize: '47px', instructionTextSize: '38px', starterInfoXPos: 32, @@ -217,7 +217,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler { setup() { const ui = this.getUi(); const currentLanguage = i18next.language; - const textSettings = languageSettings[currentLanguage]; + const langSettingKey = Object.keys(languageSettings).find(lang => currentLanguage.includes(lang)); + const textSettings = languageSettings[langSettingKey]; this.starterSelectContainer = this.scene.add.container(0, -this.scene.game.canvas.height / 6); this.starterSelectContainer.setVisible(false); @@ -280,7 +281,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { let starterInfoYOffset = textSettings?.starterInfoYOffset || 0; // The font size should be set per language - let starterInfoTextSize = textSettings.starterInfoTextSize; + let starterInfoTextSize = textSettings?.starterInfoTextSize || 56; this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127 + starterInfoYOffset, i18next.t("starterSelectUiHandler:ability"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize }); this.pokemonAbilityLabelText.setOrigin(0, 0); From 67d5532d153f39d84d288fedc60849dbae24bc3d Mon Sep 17 00:00:00 2001 From: 0zuzu <63069680+0zuzu@users.noreply.github.com> Date: Tue, 21 May 2024 08:16:17 +0100 Subject: [PATCH 14/17] Check available Pkmn before asking to switch (#1194) * Create Start Server.bat idk anymore * Update .gitignore * Delete Start Server.bat * Update .gitignore * Update phases.ts Check available party before asking to switch --- src/phases.ts | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index de40e1abe6b..c560fd5daa0 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -366,10 +366,14 @@ export class TitlePhase extends Phase { this.scene.pushPhase(new SummonPhase(this.scene, 0, true, true)); if (this.scene.currentBattle.double && availablePartyMembers > 1) this.scene.pushPhase(new SummonPhase(this.scene, 1, true, true)); - if (this.scene.currentBattle.waveIndex > 1 && this.scene.currentBattle.battleType !== BattleType.TRAINER) { - this.scene.pushPhase(new CheckSwitchPhase(this.scene, 0, this.scene.currentBattle.double)); - if (this.scene.currentBattle.double && availablePartyMembers > 1) - this.scene.pushPhase(new CheckSwitchPhase(this.scene, 1, this.scene.currentBattle.double)); + + if (this.scene.currentBattle.battleType !== BattleType.TRAINER && (this.scene.currentBattle.waveIndex > 1 || !this.scene.gameMode.isDaily)) { + const minPartySize = this.scene.currentBattle.double ? 2 : 1; + if (availablePartyMembers > minPartySize) { + this.scene.pushPhase(new CheckSwitchPhase(this.scene, 0, this.scene.currentBattle.double)); + if (this.scene.currentBattle.double) + this.scene.pushPhase(new CheckSwitchPhase(this.scene, 1, this.scene.currentBattle.double)); + } } } @@ -955,10 +959,13 @@ export class EncounterPhase extends BattlePhase { this.scene.pushPhase(new ToggleDoublePositionPhase(this.scene, false)); } - if (this.scene.currentBattle.waveIndex > startingWave && this.scene.currentBattle.battleType !== BattleType.TRAINER) { - this.scene.pushPhase(new CheckSwitchPhase(this.scene, 0, this.scene.currentBattle.double)); - if (this.scene.currentBattle.double && availablePartyMembers.length > 1) - this.scene.pushPhase(new CheckSwitchPhase(this.scene, 1, this.scene.currentBattle.double)); + if (this.scene.currentBattle.battleType !== BattleType.TRAINER && (this.scene.currentBattle.waveIndex > 1 || !this.scene.gameMode.isDaily)) { + const minPartySize = this.scene.currentBattle.double ? 2 : 1; + if (availablePartyMembers.length > minPartySize) { + this.scene.pushPhase(new CheckSwitchPhase(this.scene, 0, this.scene.currentBattle.double)); + if (this.scene.currentBattle.double) + this.scene.pushPhase(new CheckSwitchPhase(this.scene, 1, this.scene.currentBattle.double)); + } } } From 6016ecfb46767901a6f1537c1eff4ae4ce78f761 Mon Sep 17 00:00:00 2001 From: Jacob Knispel Date: Tue, 21 May 2024 02:24:03 -0500 Subject: [PATCH 15/17] Prevent Pokemon Info screen from being covered up (#1156) * Move Pokemon info screen when confirming Prevents the yes/no confirm menu from getting in the way when the Pokemon Info screen is open when catching a new Pokemon * Greatly sped up makeRoomForConfirmUi() --- src/phases.ts | 1 + src/ui/confirm-ui-handler.ts | 5 ++++- src/ui/pokemon-info-container.ts | 21 +++++++++++++++++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index c560fd5daa0..b861c82f0e8 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -4423,6 +4423,7 @@ export class AttemptCapturePhase extends PokemonPhase { if (this.scene.getParty().length === 6) { const promptRelease = () => { this.scene.ui.showText(`Your party is full.\nRelease a Pokémon to make room for ${pokemon.name}?`, null, () => { + this.scene.pokemonInfoContainer.makeRoomForConfirmUi(); this.scene.ui.setMode(Mode.CONFIRM, () => { this.scene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (slotIndex: integer, _option: PartyOption) => { this.scene.ui.setMode(Mode.MESSAGE).then(() => { diff --git a/src/ui/confirm-ui-handler.ts b/src/ui/confirm-ui-handler.ts index bac980db99e..a9b959a9950 100644 --- a/src/ui/confirm-ui-handler.ts +++ b/src/ui/confirm-ui-handler.ts @@ -5,6 +5,9 @@ import i18next from "i18next"; import {Button} from "../enums/buttons"; export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler { + + public static readonly windowWidth: integer = 48; + private switchCheck: boolean; private switchCheckCursor: integer; @@ -13,7 +16,7 @@ export default class ConfirmUiHandler extends AbstractOptionSelectUiHandler { } getWindowWidth(): integer { - return 48; + return ConfirmUiHandler.windowWidth; } show(args: any[]): boolean { diff --git a/src/ui/pokemon-info-container.ts b/src/ui/pokemon-info-container.ts index 572a28f10c8..14d7ec35d1b 100644 --- a/src/ui/pokemon-info-container.ts +++ b/src/ui/pokemon-info-container.ts @@ -9,8 +9,11 @@ import { getNatureName } from "../data/nature"; import * as Utils from "../utils"; import { Type } from "../data/type"; import { getVariantTint } from "#app/data/variant"; +import ConfirmUiHandler from "./confirm-ui-handler"; export default class PokemonInfoContainer extends Phaser.GameObjects.Container { + private readonly infoWindowWidth = 104; + private pokemonGenderLabelText: Phaser.GameObjects.Text; private pokemonGenderText: Phaser.GameObjects.Text; private pokemonAbilityLabelText: Phaser.GameObjects.Text; @@ -37,7 +40,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { } setup(): void { - const infoBg = addWindow(this.scene, 0, 0, 104, 132); + const infoBg = addWindow(this.scene, 0, 0, this.infoWindowWidth, 132); infoBg.setOrigin(0.5, 0.5); this.pokemonMovesContainer = this.scene.add.container(6, 14); @@ -172,7 +175,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { targets: this, duration: Utils.fixedInt(Math.floor(750 / speedMultiplier)), ease: 'Cubic.easeInOut', - x: this.initialX - 104, + x: this.initialX - this.infoWindowWidth, onComplete: () => { resolve(); } @@ -201,6 +204,20 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container { }); } + makeRoomForConfirmUi(speedMultiplier: number = 1): Promise { + return new Promise(resolve => { + this.scene.tweens.add({ + targets: this, + duration: Utils.fixedInt(Math.floor(150 / speedMultiplier)), + ease: 'Cubic.easeInOut', + x: this.initialX - this.infoWindowWidth - ConfirmUiHandler.windowWidth, + onComplete: () => { + resolve(); + } + }); + }); + } + hide(speedMultiplier: number = 1): Promise { return new Promise(resolve => { if (!this.shown) From 42e2be22bc8eac3a184095418bed49df3a810c5d Mon Sep 17 00:00:00 2001 From: Sbug98 <68464158+Sbug98@users.noreply.github.com> Date: Tue, 21 May 2024 09:26:01 +0200 Subject: [PATCH 16/17] Implements bad dreams (#633) * test commit * de modified readme * first implementation, needs testing with healer * fixed beahviour if 2+ opponents are on field, also added message * further fixed * reset of overrides.ts before merge to main * fixed grammar Co-authored-by: Jonas Pinson * Implemented changes suggested by @bennybroseph and @TempsRay * Added more docs to the class * removed old comments * fixed ability name in comments * added translation and made message localized * fixed ability name * added missing bracket --------- Co-authored-by: Jonas Pinson --- src/data/ability.ts | 30 +++++++++++++++++++++++++++- src/locales/de/ability-trigger.ts | 1 + src/locales/en/ability-trigger.ts | 1 + src/locales/es/ability-trigger.ts | 3 ++- src/locales/fr/ability-trigger.ts | 1 + src/locales/it/ability-trigger.ts | 1 + src/locales/zh_CN/ability-trigger.ts | 1 + 7 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index c44357cc3c6..c236aa85805 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2282,6 +2282,34 @@ export class PostTurnFormChangeAbAttr extends PostTurnAbAttr { } } + +/** + * Attribute used for abilities (Bad Dreams) that damages the opponents for being asleep + */ +export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr { + + /** + * Deals damage to all sleeping opponents equal to 1/8 of their max hp (min 1) + * @param {Pokemon} pokemon Pokemon that has this ability + * @param {boolean} passive N/A + * @param {any[]} args N/A + * @returns {boolean} true if any opponents are sleeping + */ + applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise { + let hadEffect: boolean = false; + for(let opp of pokemon.getOpponents()) { + if(opp.status !== undefined && opp.status.effect === StatusEffect.SLEEP) { + opp.damageAndUpdate(Math.floor(Math.max(1, opp.getMaxHp() / 8)), HitResult.OTHER); + pokemon.scene.queueMessage(i18next.t('abilityTriggers:badDreams', {pokemonName: `${getPokemonPrefix(opp)}${opp.name}`})); + hadEffect = true; + } + + } + return hadEffect; + } +} + + /** * Grabs the last failed Pokeball used * @extends PostTurnAbAttr @@ -3327,7 +3355,7 @@ export function initAbilities() { .ignorable() .partial(), new Ability(Abilities.BAD_DREAMS, 4) - .unimplemented(), + .attr(PostTurnHurtIfSleepingAbAttr), new Ability(Abilities.PICKPOCKET, 5) .attr(PostDefendStealHeldItemAbAttr, (target, user, move) => move.hasFlag(MoveFlags.MAKES_CONTACT)), new Ability(Abilities.SHEER_FORCE, 5) diff --git a/src/locales/de/ability-trigger.ts b/src/locales/de/ability-trigger.ts index 27d2053b621..7ba2b7af7f5 100644 --- a/src/locales/de/ability-trigger.ts +++ b/src/locales/de/ability-trigger.ts @@ -2,4 +2,5 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const abilityTriggers: SimpleTranslationEntries = { 'blockRecoilDamage' : `{{pokemonName}} wurde durch {{abilityName}}\nvor Rückstoß geschützt!`, + 'badDreams': `{{pokemonName}} wird gequält!`, } as const; diff --git a/src/locales/en/ability-trigger.ts b/src/locales/en/ability-trigger.ts index 88900741218..49505217126 100644 --- a/src/locales/en/ability-trigger.ts +++ b/src/locales/en/ability-trigger.ts @@ -2,4 +2,5 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const abilityTriggers: SimpleTranslationEntries = { 'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`, + 'badDreams': `{{pokemonName}} is tormented!`, } as const; \ No newline at end of file diff --git a/src/locales/es/ability-trigger.ts b/src/locales/es/ability-trigger.ts index 88900741218..cd6def4c628 100644 --- a/src/locales/es/ability-trigger.ts +++ b/src/locales/es/ability-trigger.ts @@ -2,4 +2,5 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const abilityTriggers: SimpleTranslationEntries = { 'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`, -} as const; \ No newline at end of file + 'badDreams': `{{pokemonName}} Está atormentado!` +} as const; diff --git a/src/locales/fr/ability-trigger.ts b/src/locales/fr/ability-trigger.ts index f668ee5e8ab..d74acb31b4f 100644 --- a/src/locales/fr/ability-trigger.ts +++ b/src/locales/fr/ability-trigger.ts @@ -2,4 +2,5 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const abilityTriggers: SimpleTranslationEntries = { 'blockRecoilDamage' : `{{abilityName}}\nde {{pokemonName}} le protège du contrecoup !`, + 'badDreams': `{{pokemonName}} est tourmenté!` } as const; diff --git a/src/locales/it/ability-trigger.ts b/src/locales/it/ability-trigger.ts index de41e087236..3f7d09c9221 100644 --- a/src/locales/it/ability-trigger.ts +++ b/src/locales/it/ability-trigger.ts @@ -2,4 +2,5 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const abilityTriggers: SimpleTranslationEntries = { 'blockRecoilDamage' : `{{abilityName}} di {{pokemonName}}\nl'ha protetto dal contraccolpo!`, + 'badDreams': `{{pokemonName}} è tormentato!`, } as const; \ No newline at end of file diff --git a/src/locales/zh_CN/ability-trigger.ts b/src/locales/zh_CN/ability-trigger.ts index 85152b1bccc..d40fad7a10a 100644 --- a/src/locales/zh_CN/ability-trigger.ts +++ b/src/locales/zh_CN/ability-trigger.ts @@ -2,4 +2,5 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n"; export const abilityTriggers: SimpleTranslationEntries = { 'blockRecoilDamage' : `{{pokemonName}} 的 {{abilityName}}\n抵消了反作用力!`, + 'badDreams': `{{pokemonName}} 被折磨着!` } as const; \ No newline at end of file From 3fd1ecf6a77ee311bf7658af45071b44eddf3c4b Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Tue, 21 May 2024 17:40:53 +1000 Subject: [PATCH 17/17] Update moveset logic to account for new sacrifice attr (#1192) --- src/field/pokemon.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 99cd56fbf04..3efbbb45b29 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, CounterDamageAttr, StatChangeAttr, RechargeAttr, ChargeAttr, IgnoreWeatherTypeDebuffAttr, BypassBurnDamageReductionAttr } 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, StatChangeAttr, RechargeAttr, ChargeAttr, IgnoreWeatherTypeDebuffAttr, BypassBurnDamageReductionAttr, SacrificialAttrOnHit } 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'; @@ -1282,11 +1282,13 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { if (this.isBoss()) // Bosses never get self ko moves movePool = movePool.filter(m => !allMoves[m[0]].getAttrs(SacrificialAttr).length); + movePool = movePool.filter(m => !allMoves[m[0]].getAttrs(SacrificialAttrOnHit).length); if (this.hasTrainer()) { // Trainers never get OHKO moves movePool = movePool.filter(m => !allMoves[m[0]].getAttrs(OneHitKOAttr).length); // Half the weight of self KO moves movePool = movePool.map(m => [m[0], m[1] * (!!allMoves[m[0]].getAttrs(SacrificialAttr).length ? 0.5 : 1)]); + movePool = movePool.map(m => [m[0], m[1] * (!!allMoves[m[0]].getAttrs(SacrificialAttrOnHit).length ? 0.5 : 1)]); // Trainers get a weight bump to stat buffing moves movePool = movePool.map(m => [m[0], m[1] * (allMoves[m[0]].getAttrs(StatChangeAttr).some(a => (a as StatChangeAttr).levels > 1 && (a as StatChangeAttr).selfTarget) ? 1.25 : 1)]); // Trainers get a weight decrease to multiturn moves