Compare commits

...

13 Commits

Author SHA1 Message Date
Opaque02 9ac3eb2156
Merge 39ee5b27fd into 00ba2eebc8 2024-09-18 00:20:14 +00:00
Opaque02 39ee5b27fd
Merge branch 'pagefaultgames:main' into admin-panel-unlink-update 2024-09-18 10:20:12 +10:00
Madmadness65 00ba2eebc8
Add new biome BGM by Firel (#4301) 2024-09-17 21:57:34 +01:00
Leo Kim fe69bd2b55
add missing translation for korean (#4295) 2024-09-17 10:50:51 -07:00
Dakurei 1fb5389765
Auto center the window vertically (#2686)
+ When the game is played in landscape format
    or in portrait format when it's not a touchscreen
2024-09-17 17:55:50 +01:00
cam 18dc9d216c
[Bug][Move] Clanging Scales animation on incorrect sprite (#4290)
Set focus to 1 on move's target sprite for every frame.
2024-09-17 15:58:49 +01:00
AJ Fontaine 3ed2c74f38
[Enhancement] Add Met Wave to Pokemon Data (#4271)
Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>
2024-09-16 15:44:03 -07:00
MokaStitcher 7ea608fb8a
[Bug] Fix Dire Hit & System Data Conversion Failure (#4282)
Co-authored-by: xsn34kzx <xsn34kzx@gmail.com>
2024-09-16 10:56:55 +01:00
flx-sta 79c2829a77
Merge branch 'beta' into admin-panel-unlink-update 2024-09-13 15:38:12 -07:00
Opaque02 2c0fc385bd Don't look too hard at this commit, nothing to see here 2024-09-13 00:47:57 +10:00
Opaque02 f4df35a452 Updated admin panel to allow the concept of unlinking accounts 2024-09-13 00:37:38 +10:00
Frederico Santos 801b0a66f7 Readded vouchers to original weights 2024-09-12 01:13:22 +01:00
Frederico Santos 103c87ec3b Undo egg skip event 2024-09-12 01:09:44 +01:00
26 changed files with 169 additions and 80 deletions

View File

@ -55,7 +55,7 @@ Check out [Github Issues](https://github.com/pagefaultgames/pokerogue/issues) to
- Pokémon Sword/Shield - Pokémon Sword/Shield
- Pokémon Legends: Arceus - Pokémon Legends: Arceus
- Pokémon Scarlet/Violet - Pokémon Scarlet/Violet
- Firel (Custom Laboratory, Metropolis, Seabed, and Space biome music) - Firel (Custom Ice Cave, Laboratory, Metropolis, Plains, Power Plant, Seabed, Space, and Volcano biome music)
- Lmz (Custom Jungle biome music) - Lmz (Custom Jungle biome music)
- Andr06 (Custom Slum and Sea biome music) - Andr06 (Custom Slum and Sea biome music)

View File

@ -26,10 +26,36 @@ body {
#app { #app {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center;
} }
#app > div:first-child { #app > div:first-child {
transform-origin: center !important;
}
/*
Supports automatic vertical centering as suggested in PR#1114, but only via CSS
Condition factorized to deduce CSS rules:
true if (isLandscape && !isMobile() && !hasTouchscreen() || (hasTouchscreen() && !isTouchControlsEnabled))
*/
/* isLandscape && !isMobile() && !hasTouchscreen() */
@media (orientation: landscape) and (pointer: fine) {
#app {
align-items: center;
}
}
@media (pointer: coarse) {
/* hasTouchscreen() && !isTouchControlsEnabled */
body:has(> #touchControls[class=visible]) #app {
align-items: start;
}
body:has(> #touchControls[class=visible]) #app > div:first-child {
transform-origin: top !important; transform-origin: top !important;
}
} }
#layout:fullscreen #dpad, #layout:fullscreen { #layout:fullscreen #dpad, #layout:fullscreen {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -27,7 +27,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -115,7 +115,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -215,7 +215,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -315,7 +315,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -414,7 +414,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -538,7 +538,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 23, "x": 23,
@ -685,7 +685,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": -19, "x": -19,
@ -784,7 +784,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 26, "x": 26,
@ -883,7 +883,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 23.5, "x": 23.5,
@ -994,7 +994,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 9, "x": 9,
@ -1069,7 +1069,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": -18.5, "x": -18.5,
@ -1157,7 +1157,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 37.5, "x": 37.5,
@ -1221,7 +1221,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -1284,7 +1284,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -1348,7 +1348,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -1448,7 +1448,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -1548,7 +1548,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -1647,7 +1647,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 0, "x": 0,
@ -1759,7 +1759,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": -25.5, "x": -25.5,
@ -1870,7 +1870,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 12, "x": 12,
@ -1957,7 +1957,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": -27, "x": -27,
@ -2044,7 +2044,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": -16, "x": -16,
@ -2143,7 +2143,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": -26.5, "x": -26.5,
@ -2230,7 +2230,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 23, "x": 23,
@ -2306,7 +2306,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": 24, "x": 24,
@ -2346,7 +2346,7 @@
"opacity": 255, "opacity": 255,
"locked": true, "locked": true,
"priority": 1, "priority": 1,
"focus": 2 "focus": 1
}, },
{ {
"x": -27, "x": -27,

View File

@ -746,7 +746,7 @@ export class Arena {
case Biome.TOWN: case Biome.TOWN:
return 7.288; return 7.288;
case Biome.PLAINS: case Biome.PLAINS:
return 7.693; return 17.485;
case Biome.GRASS: case Biome.GRASS:
return 1.995; return 1.995;
case Biome.TALL_GRASS: case Biome.TALL_GRASS:
@ -774,13 +774,13 @@ export class Arena {
case Biome.DESERT: case Biome.DESERT:
return 1.143; return 1.143;
case Biome.ICE_CAVE: case Biome.ICE_CAVE:
return 15.010; return 0.000;
case Biome.MEADOW: case Biome.MEADOW:
return 3.891; return 3.891;
case Biome.POWER_PLANT: case Biome.POWER_PLANT:
return 2.810; return 9.447;
case Biome.VOLCANO: case Biome.VOLCANO:
return 5.116; return 17.637;
case Biome.GRAVEYARD: case Biome.GRAVEYARD:
return 3.232; return 3.232;
case Biome.DOJO: case Biome.DOJO:

View File

@ -95,6 +95,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
public metLevel: integer; public metLevel: integer;
public metBiome: Biome | -1; public metBiome: Biome | -1;
public metSpecies: Species; public metSpecies: Species;
public metWave: number;
public luck: integer; public luck: integer;
public pauseEvolutions: boolean; public pauseEvolutions: boolean;
public pokerus: boolean; public pokerus: boolean;
@ -194,6 +195,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.luck = dataSource.luck; this.luck = dataSource.luck;
this.metBiome = dataSource.metBiome; this.metBiome = dataSource.metBiome;
this.metSpecies = dataSource.metSpecies ?? (this.metBiome !== -1 ? this.species.speciesId : this.species.getRootSpeciesId(true)); this.metSpecies = dataSource.metSpecies ?? (this.metBiome !== -1 ? this.species.speciesId : this.species.getRootSpeciesId(true));
this.metWave = dataSource.metWave ?? (this.metBiome === -1 ? -1 : 0);
this.pauseEvolutions = dataSource.pauseEvolutions; this.pauseEvolutions = dataSource.pauseEvolutions;
this.pokerus = !!dataSource.pokerus; this.pokerus = !!dataSource.pokerus;
this.evoCounter = dataSource.evoCounter ?? 0; this.evoCounter = dataSource.evoCounter ?? 0;
@ -240,6 +242,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.metLevel = level; this.metLevel = level;
this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1; this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1;
this.metSpecies = species.speciesId; this.metSpecies = species.speciesId;
this.metWave = scene.currentBattle ? scene.currentBattle.waveIndex : -1;
this.pokerus = false; this.pokerus = false;
if (level > 1) { if (level > 1) {
@ -4081,6 +4084,7 @@ export class PlayerPokemon extends Pokemon {
newPokemon.metLevel = this.metLevel; newPokemon.metLevel = this.metLevel;
newPokemon.metBiome = this.metBiome; newPokemon.metBiome = this.metBiome;
newPokemon.metSpecies = this.metSpecies; newPokemon.metSpecies = this.metSpecies;
newPokemon.metWave = this.metWave;
newPokemon.fusionSpecies = this.fusionSpecies; newPokemon.fusionSpecies = this.fusionSpecies;
newPokemon.fusionFormIndex = this.fusionFormIndex; newPokemon.fusionFormIndex = this.fusionFormIndex;
newPokemon.fusionAbilityIndex = this.fusionAbilityIndex; newPokemon.fusionAbilityIndex = this.fusionAbilityIndex;
@ -4088,6 +4092,7 @@ export class PlayerPokemon extends Pokemon {
newPokemon.fusionVariant = this.fusionVariant; newPokemon.fusionVariant = this.fusionVariant;
newPokemon.fusionGender = this.fusionGender; newPokemon.fusionGender = this.fusionGender;
newPokemon.fusionLuck = this.fusionLuck; newPokemon.fusionLuck = this.fusionLuck;
newPokemon.usedTMs = this.usedTMs;
this.scene.getParty().push(newPokemon); this.scene.getParty().push(newPokemon);
newPokemon.evolve((!isFusion ? newEvolution : new FusionSpeciesFormEvolution(this.id, newEvolution)), evoSpecies); newPokemon.evolve((!isFusion ? newEvolution : new FusionSpeciesFormEvolution(this.id, newEvolution)), evoSpecies);
@ -4779,6 +4784,7 @@ export class EnemyPokemon extends Pokemon {
this.pokeball = pokeballType; this.pokeball = pokeballType;
this.metLevel = this.level; this.metLevel = this.level;
this.metBiome = this.scene.arena.biomeType; this.metBiome = this.scene.arena.biomeType;
this.metWave = this.scene.currentBattle.waveIndex;
this.metSpecies = this.species.speciesId; this.metSpecies = this.species.speciesId;
const newPokemon = this.scene.addPlayerPokemon(this.species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.variant, this.ivs, this.nature, this); const newPokemon = this.scene.addPlayerPokemon(this.species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this.variant, this.ivs, this.nature, this);

View File

@ -11,7 +11,7 @@
"cancel": "Abbrechen", "cancel": "Abbrechen",
"memoString": "Wesen: {{natureFragment}}\n{{metFragment}}", "memoString": "Wesen: {{natureFragment}}\n{{metFragment}}",
"metFragment": { "metFragment": {
"normal": "Herkunft: {{biome}}\nMit Lv. {{level}} erhalten.", "normal": "Herkunft: {{biome}} - Welle {{wave}}\nMit Lv. {{level}} erhalten.",
"apparently": "Herkunft: {{biome}}\nOffenbar mit Lv. {{level}} erhalten." "apparently": "Herkunft: {{biome}}\nOffenbar mit Lv. {{level}} erhalten."
}, },
"natureFragment": { "natureFragment": {

View File

@ -108,7 +108,7 @@
"forest": "PMD EoS Dusk Forest", "forest": "PMD EoS Dusk Forest",
"grass": "PMD EoS Apple Woods", "grass": "PMD EoS Apple Woods",
"graveyard": "PMD EoS Mystifying Forest", "graveyard": "PMD EoS Mystifying Forest",
"ice_cave": "PMD EoS Vast Ice Mountain", "ice_cave": "Firel - -60F",
"island": "PMD EoS Craggy Coast", "island": "PMD EoS Craggy Coast",
"jungle": "Lmz - Jungle", "jungle": "Lmz - Jungle",
"laboratory": "Firel - Laboratory", "laboratory": "Firel - Laboratory",
@ -116,8 +116,8 @@
"meadow": "PMD EoS Sky Peak Forest", "meadow": "PMD EoS Sky Peak Forest",
"metropolis": "Firel - Metropolis", "metropolis": "Firel - Metropolis",
"mountain": "PMD EoS Mt. Horn", "mountain": "PMD EoS Mt. Horn",
"plains": "PMD EoS Sky Peak Prairie", "plains": "Firel - Route 888",
"power_plant": "PMD EoS Far Amp Plains", "power_plant": "Firel - The Klink",
"ruins": "PMD EoS Deep Sealed Ruin", "ruins": "PMD EoS Deep Sealed Ruin",
"sea": "Andr06 - Marine Mystique", "sea": "Andr06 - Marine Mystique",
"seabed": "Firel - Seabed", "seabed": "Firel - Seabed",
@ -128,7 +128,7 @@
"tall_grass": "PMD EoS Foggy Forest", "tall_grass": "PMD EoS Foggy Forest",
"temple": "PMD EoS Aegis Cave", "temple": "PMD EoS Aegis Cave",
"town": "PMD EoS Random Dungeon Theme 3", "town": "PMD EoS Random Dungeon Theme 3",
"volcano": "PMD EoS Steam Cave", "volcano": "Firel - Twisturn Volcano",
"wasteland": "PMD EoS Hidden Highland", "wasteland": "PMD EoS Hidden Highland",
"encounter_ace_trainer": "BW Trainers' Eyes Meet (Ace Trainer)", "encounter_ace_trainer": "BW Trainers' Eyes Meet (Ace Trainer)",
"encounter_backpacker": "BW Trainers' Eyes Meet (Backpacker)", "encounter_backpacker": "BW Trainers' Eyes Meet (Backpacker)",

View File

@ -11,7 +11,7 @@
"cancel": "Cancel", "cancel": "Cancel",
"memoString": "{{natureFragment}} nature,\n{{metFragment}}", "memoString": "{{natureFragment}} nature,\n{{metFragment}}",
"metFragment": { "metFragment": {
"normal": "met at Lv{{level}},\n{{biome}}.", "normal": "met at Lv{{level}},\n{{biome}}, Wave {{wave}}.",
"apparently": "apparently met at Lv{{level}},\n{{biome}}." "apparently": "apparently met at Lv{{level}},\n{{biome}}."
}, },
"natureFragment": { "natureFragment": {

View File

@ -11,7 +11,7 @@
"cancel": "Salir", "cancel": "Salir",
"memoString": "Naturaleza {{natureFragment}},\n{{metFragment}}", "memoString": "Naturaleza {{natureFragment}},\n{{metFragment}}",
"metFragment": { "metFragment": {
"normal": "encontrado al Nv. {{level}},\n{{biome}}.", "normal": "encontrado al Nv. {{level}},\n{{biome}}, Oleada {{wave}}.",
"apparently": "aparentemente encontrado al Nv. {{level}},\n{{biome}}." "apparently": "aparentemente encontrado al Nv. {{level}},\n{{biome}}."
} }
} }

View File

@ -11,7 +11,7 @@
"cancel": "Annuler", "cancel": "Annuler",
"memoString": "{{natureFragment}} de nature,\n{{metFragment}}", "memoString": "{{natureFragment}} de nature,\n{{metFragment}}",
"metFragment": { "metFragment": {
"normal": "rencontré au N.{{level}},\n{{biome}}.", "normal": "rencontré au N.{{level}},\n{{biome}}, Vague {{wave}}.",
"apparently": "apparemment rencontré au N.{{level}},\n{{biome}}." "apparently": "apparemment rencontré au N.{{level}},\n{{biome}}."
}, },
"natureFragment": { "natureFragment": {

View File

@ -11,7 +11,7 @@
"cancel": "Annulla", "cancel": "Annulla",
"memoString": "Natura {{natureFragment}},\n{{metFragment}}", "memoString": "Natura {{natureFragment}},\n{{metFragment}}",
"metFragment": { "metFragment": {
"normal": "incontrato al Lv.{{level}},\n{{biome}}.", "normal": "incontrato al Lv.{{level}},\n{{biome}}, Onda {{wave}}.",
"apparently": "apparentemente incontrato al Lv.{{level}},\n{{biome}}." "apparently": "apparentemente incontrato al Lv.{{level}},\n{{biome}}."
} }
} }

View File

@ -11,7 +11,7 @@
"cancel": "キャンセル", "cancel": "キャンセル",
"memoString": "{{natureFragment}}な性格。\n{{metFragment}}", "memoString": "{{natureFragment}}な性格。\n{{metFragment}}",
"metFragment": { "metFragment": {
"normal": "{{biome}}で\nLv.{{level}}の時に出会った。", "normal": "ラウンド{{wave}}に{{biome}}で\nLv.{{level}}の時に出会った。",
"apparently": "{{biome}}で\nLv.{{level}}の時に出会ったようだ。" "apparently": "{{biome}}で\nLv.{{level}}の時に出会ったようだ。"
}, },
"natureFragment": { "natureFragment": {

View File

@ -13,8 +13,10 @@
"ALL": "전부", "ALL": "전부",
"PASS_BATON": "배턴터치한다", "PASS_BATON": "배턴터치한다",
"UNPAUSE_EVOLUTION": "진화 재개", "UNPAUSE_EVOLUTION": "진화 재개",
"PAUSE_EVOLUTION": "진화 중지",
"REVIVE": "되살린다", "REVIVE": "되살린다",
"RENAME": "닉네임 바꾸기", "RENAME": "닉네임 바꾸기",
"SELECT": "선택한다",
"choosePokemon": "포켓몬을 선택하세요.", "choosePokemon": "포켓몬을 선택하세요.",
"doWhatWithThisPokemon": "포켓몬을 어떻게 하겠습니까?", "doWhatWithThisPokemon": "포켓몬을 어떻게 하겠습니까?",
"noEnergy": "{{pokemonName}}[[는]] 싸울 수 있는\n기력이 남아 있지 않습니다!", "noEnergy": "{{pokemonName}}[[는]] 싸울 수 있는\n기력이 남아 있지 않습니다!",
@ -23,6 +25,7 @@
"tooManyItems": "{{pokemonName}}[[는]] 지닌 도구의 수가\n너무 많습니다", "tooManyItems": "{{pokemonName}}[[는]] 지닌 도구의 수가\n너무 많습니다",
"anyEffect": "써도 효과가 없다.", "anyEffect": "써도 효과가 없다.",
"unpausedEvolutions": "{{pokemonName}}의 진화가 재개되었다.", "unpausedEvolutions": "{{pokemonName}}의 진화가 재개되었다.",
"pausedEvolutions": "{{pokemonName}}[[가]] 진화하지 않도록 했다.",
"unspliceConfirmation": "{{pokemonName}}로부터 {{fusionName}}의 융합을 해제하시겠습니까?\n{{fusionName}}는 사라지게 됩니다.", "unspliceConfirmation": "{{pokemonName}}로부터 {{fusionName}}의 융합을 해제하시겠습니까?\n{{fusionName}}는 사라지게 됩니다.",
"wasReverted": "{{fusionName}}은 {{pokemonName}}의 모습으로 돌아갔습니다!", "wasReverted": "{{fusionName}}은 {{pokemonName}}의 모습으로 돌아갔습니다!",
"releaseConfirmation": "{{pokemonName}}[[를]]\n정말 놓아주겠습니까?", "releaseConfirmation": "{{pokemonName}}[[를]]\n정말 놓아주겠습니까?",

View File

@ -11,7 +11,7 @@
"cancel": "그만둔다", "cancel": "그만둔다",
"memoString": "{{natureFragment}}.\n{{metFragment}}", "memoString": "{{natureFragment}}.\n{{metFragment}}",
"metFragment": { "metFragment": {
"normal": "{{biome}}에서\n레벨 {{level}}일 때 만났다.", "normal": "{{biome}}에서 웨이브{{wave}},\n레벨 {{level}}일 때 만났다.",
"apparently": "{{biome}}에서\n레벨 {{level}}일 때 만난 것 같다." "apparently": "{{biome}}에서\n레벨 {{level}}일 때 만난 것 같다."
}, },
"natureFragment": { "natureFragment": {

View File

@ -11,6 +11,10 @@
"expGainsSpeed": "경험치 획득 속도", "expGainsSpeed": "경험치 획득 속도",
"expPartyDisplay": "파티 경험치 표시", "expPartyDisplay": "파티 경험치 표시",
"skipSeenDialogues": "본 대화 생략", "skipSeenDialogues": "본 대화 생략",
"eggSkip": "알 스킵",
"never": "안 함",
"always": "항상",
"ask": "확인하기",
"battleStyle": "시합 룰", "battleStyle": "시합 룰",
"enableRetries": "재도전 허용", "enableRetries": "재도전 허용",
"hideIvs": "개체값탐지기 효과 끄기", "hideIvs": "개체값탐지기 효과 끄기",

View File

@ -11,7 +11,7 @@
"cancel": "Cancelar", "cancel": "Cancelar",
"memoString": "Natureza {{natureFragment}},\n{{metFragment}}", "memoString": "Natureza {{natureFragment}},\n{{metFragment}}",
"metFragment": { "metFragment": {
"normal": "encontrado no Nv.{{level}},\n{{biome}}.", "normal": "encontrado no Nv.{{level}},\n{{biome}}, Onda {{wave}}.",
"apparently": "aparentemente encontrado no Nv.{{level}},\n{{biome}}." "apparently": "aparentemente encontrado no Nv.{{level}},\n{{biome}}."
}, },
"natureFragment": { "natureFragment": {

View File

@ -12,7 +12,7 @@
"memoString": "{{natureFragment}} 性格,\n{{metFragment}}", "memoString": "{{natureFragment}} 性格,\n{{metFragment}}",
"metFragment": { "metFragment": {
"normal": "met at Lv{{level}},\n{{biome}}.", "normal": "met at Lv{{level}},\n{{biome}}, Wave {{wave}}.",
"apparently": "命中注定般地相遇于Lv.{{level}}\n{{biome}}。" "apparently": "命中注定般地相遇于Lv.{{level}}\n{{biome}}。"
}, },
"natureFragment": { "natureFragment": {

View File

@ -38,8 +38,9 @@ export default class PokemonData {
public status: Status | null; public status: Status | null;
public friendship: integer; public friendship: integer;
public metLevel: integer; public metLevel: integer;
public metBiome: Biome | -1; public metBiome: Biome | -1; // -1 for starters
public metSpecies: Species; public metSpecies: Species;
public metWave: number; // 0 for unknown (previous saves), -1 for starters
public luck: integer; public luck: integer;
public pauseEvolutions: boolean; public pauseEvolutions: boolean;
public pokerus: boolean; public pokerus: boolean;
@ -90,14 +91,14 @@ export default class PokemonData {
this.metLevel = source.metLevel || 5; this.metLevel = source.metLevel || 5;
this.metBiome = source.metBiome !== undefined ? source.metBiome : -1; this.metBiome = source.metBiome !== undefined ? source.metBiome : -1;
this.metSpecies = source.metSpecies; this.metSpecies = source.metSpecies;
this.metWave = source.metWave ?? (this.metBiome === -1 ? -1 : 0);
this.luck = source.luck !== undefined ? source.luck : (source.shiny ? (source.variant + 1) : 0); this.luck = source.luck !== undefined ? source.luck : (source.shiny ? (source.variant + 1) : 0);
if (!forHistory) { if (!forHistory) {
this.pauseEvolutions = !!source.pauseEvolutions; this.pauseEvolutions = !!source.pauseEvolutions;
this.evoCounter = source.evoCounter ?? 0;
} }
this.pokerus = !!source.pokerus; this.pokerus = !!source.pokerus;
this.evoCounter = source.evoCounter ?? 0;
this.fusionSpecies = sourcePokemon ? sourcePokemon.fusionSpecies?.speciesId : source.fusionSpecies; this.fusionSpecies = sourcePokemon ? sourcePokemon.fusionSpecies?.speciesId : source.fusionSpecies;
this.fusionFormIndex = source.fusionFormIndex; this.fusionFormIndex = source.fusionFormIndex;
this.fusionAbilityIndex = source.fusionAbilityIndex; this.fusionAbilityIndex = source.fusionAbilityIndex;

View File

@ -22,6 +22,8 @@ export function applySessionDataPatches(data: SessionSaveData) {
} else if (m.className === "PokemonResetNegativeStatStageModifier") { } else if (m.className === "PokemonResetNegativeStatStageModifier") {
m.className = "ResetNegativeStatStageModifier"; m.className = "ResetNegativeStatStageModifier";
} else if (m.className === "TempBattleStatBoosterModifier") { } else if (m.className === "TempBattleStatBoosterModifier") {
// Dire Hit no longer a part of the TempBattleStatBoosterModifierTypeGenerator
if (m.typeId !== "DIRE_HIT") {
m.className = "TempStatStageBoosterModifier"; m.className = "TempStatStageBoosterModifier";
m.typeId = "TEMP_STAT_STAGE_BOOSTER"; m.typeId = "TEMP_STAT_STAGE_BOOSTER";
@ -31,6 +33,14 @@ export function applySessionDataPatches(data: SessionSaveData) {
// From [ stat, battlesLeft ] to [ stat, maxBattles, battleCount ] // From [ stat, battlesLeft ] to [ stat, maxBattles, battleCount ]
m.args = [ newStat, 5, m.args[1] ]; m.args = [ newStat, 5, m.args[1] ];
} else {
m.className = "TempCritBoosterModifier";
m.typePregenArgs = [];
// From [ stat, battlesLeft ] to [ maxBattles, battleCount ]
m.args = [ 5, m.args[1] ];
}
} else if (m.className === "DoubleBattleChanceBoosterModifier" && m.args.length === 1) { } else if (m.className === "DoubleBattleChanceBoosterModifier" && m.args.length === 1) {
let maxBattles: number; let maxBattles: number;
switch (m.typeId) { switch (m.typeId) {
@ -73,7 +83,7 @@ export function applySystemDataPatches(data: SystemSaveData) {
case "1.0.3": case "1.0.3":
case "1.0.4": case "1.0.4":
// --- LEGACY PATCHES --- // --- LEGACY PATCHES ---
if (data.starterData) { if (data.starterData && data.dexData) {
// Migrate ability starter data if empty for caught species // Migrate ability starter data if empty for caught species
Object.keys(data.starterData).forEach(sd => { Object.keys(data.starterData).forEach(sd => {
if (data.dexData[sd]?.caughtAttr && (data.starterData[sd] && !data.starterData[sd].abilityAttr)) { if (data.dexData[sd]?.caughtAttr && (data.starterData[sd] && !data.starterData[sd].abilityAttr)) {
@ -104,6 +114,7 @@ export function applySystemDataPatches(data: SystemSaveData) {
// --- PATCHES --- // --- PATCHES ---
// Fix Starter Data // Fix Starter Data
if (data.starterData && data.dexData) {
for (const starterId of defaultStarterSpecies) { for (const starterId of defaultStarterSpecies) {
if (data.starterData[starterId]?.abilityAttr) { if (data.starterData[starterId]?.abilityAttr) {
data.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1; data.starterData[starterId].abilityAttr |= AbilityAttr.ABILITY_1;
@ -113,6 +124,7 @@ export function applySystemDataPatches(data: SystemSaveData) {
} }
} }
} }
}
data.gameVersion = LATEST_VERSION; data.gameVersion = LATEST_VERSION;
} }

View File

@ -7,6 +7,8 @@ import { Button } from "#app/enums/buttons";
export default class AdminUiHandler extends FormModalUiHandler { export default class AdminUiHandler extends FormModalUiHandler {
private unlinkAction: Function;
constructor(scene: BattleScene, mode: Mode | null = null) { constructor(scene: BattleScene, mode: Mode | null = null) {
super(scene, mode); super(scene, mode);
} }
@ -24,7 +26,7 @@ export default class AdminUiHandler extends FormModalUiHandler {
} }
getWidth(config?: ModalConfig): number { getWidth(config?: ModalConfig): number {
return 160; return 220;
} }
getMargin(config?: ModalConfig): [number, number, number, number] { getMargin(config?: ModalConfig): [number, number, number, number] {
@ -32,7 +34,7 @@ export default class AdminUiHandler extends FormModalUiHandler {
} }
getButtonLabels(config?: ModalConfig): string[] { getButtonLabels(config?: ModalConfig): string[] {
return ["Link account", "Cancel"]; return ["Link account", "Unlink account", "Cancel"];
} }
processInput(button: Button): boolean { processInput(button: Button): boolean {
@ -48,6 +50,20 @@ export default class AdminUiHandler extends FormModalUiHandler {
if (super.show(args)) { if (super.show(args)) {
const config = args[0] as ModalConfig; const config = args[0] as ModalConfig;
const originalSubmitAction = this.submitAction; const originalSubmitAction = this.submitAction;
let originAction: number = 0; // this is used to keep track of which button has been pressed
/* This code is here because currently the form-modal-ui-handler is hardcoded to only have a single action button and a cancel button
* This code below adds interactivity and a specific action to the unlink account button. This also sets up the originalAction variable
* from above, which lets us figure out if we're linking or unlinking, which makes this.submitAction do post different API calls
*/
for (let i = 0; i < this.buttonBgs.length - 1; i++) {
this.buttonBgs[i].off("pointerdown");
this.buttonBgs[i].on("pointerdown", () => {
originAction = i;
if (this.submitAction) {
this.submitAction();
}
});
}
this.submitAction = (_) => { this.submitAction = (_) => {
this.submitAction = originalSubmitAction; this.submitAction = originalSubmitAction;
this.scene.ui.setMode(Mode.LOADING, { buttonActions: [] }); this.scene.ui.setMode(Mode.LOADING, { buttonActions: [] });
@ -61,6 +77,7 @@ export default class AdminUiHandler extends FormModalUiHandler {
if (!this.inputs[1].text) { if (!this.inputs[1].text) {
return onFail("Discord Id is required"); return onFail("Discord Id is required");
} }
if (originAction === 0) {
Utils.apiPost("admin/account/discord-link", `username=${encodeURIComponent(this.inputs[0].text)}&discordId=${encodeURIComponent(this.inputs[1].text)}`, "application/x-www-form-urlencoded", true) Utils.apiPost("admin/account/discord-link", `username=${encodeURIComponent(this.inputs[0].text)}&discordId=${encodeURIComponent(this.inputs[1].text)}`, "application/x-www-form-urlencoded", true)
.then(response => { .then(response => {
if (!response.ok) { if (!response.ok) {
@ -75,6 +92,22 @@ export default class AdminUiHandler extends FormModalUiHandler {
this.scene.ui.revertMode(); this.scene.ui.revertMode();
}); });
return false; return false;
} else if (originAction === 1) {
Utils.apiPost("admin/account/discord-unlink", `username=${encodeURIComponent(this.inputs[0].text)}&discordId=${encodeURIComponent(this.inputs[1].text)}`, "application/x-www-form-urlencoded", true)
.then(response => {
if (!response.ok) {
console.error(response);
}
this.inputs[0].setText("");
this.inputs[1].setText("");
this.scene.ui.revertMode();
})
.catch((err) => {
console.error(err);
this.scene.ui.revertMode();
});
return false;
}
}; };
return true; return true;
} }

View File

@ -393,6 +393,9 @@ export default class MenuUiHandler extends MessageUiHandler {
() => { () => {
ui.revertMode(); ui.revertMode();
}, },
() => {
ui.revertMode();
},
() => { () => {
ui.revertMode(); ui.revertMode();
} }

View File

@ -824,6 +824,7 @@ export default class SummaryUiHandler extends UiHandler {
metFragment: i18next.t(`pokemonSummary:metFragment.${this.pokemon?.metBiome === -1? "apparently": "normal"}`, { metFragment: i18next.t(`pokemonSummary:metFragment.${this.pokemon?.metBiome === -1? "apparently": "normal"}`, {
biome: `${getBBCodeFrag(getBiomeName(this.pokemon?.metBiome!), TextStyle.SUMMARY_RED)}${closeFragment}`, // TODO: is this bang correct? biome: `${getBBCodeFrag(getBiomeName(this.pokemon?.metBiome!), TextStyle.SUMMARY_RED)}${closeFragment}`, // TODO: is this bang correct?
level: `${getBBCodeFrag(this.pokemon?.metLevel.toString()!, TextStyle.SUMMARY_RED)}${closeFragment}`, // TODO: is this bang correct? level: `${getBBCodeFrag(this.pokemon?.metLevel.toString()!, TextStyle.SUMMARY_RED)}${closeFragment}`, // TODO: is this bang correct?
wave: `${getBBCodeFrag((this.pokemon?.metWave ? this.pokemon.metWave.toString()! : i18next.t("pokemonSummary:unknownTrainer")), TextStyle.SUMMARY_RED)}${closeFragment}`,
}), }),
natureFragment: i18next.t(`pokemonSummary:natureFragment.${rawNature}`, { nature: nature }) natureFragment: i18next.t(`pokemonSummary:natureFragment.${rawNature}`, { nature: nature })
}); });