From d127773a89a4a774c3c17d9a9f2e74f38aaefa89 Mon Sep 17 00:00:00 2001 From: Blitzy <118096277+Blitz425@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:48:10 -0500 Subject: [PATCH 01/30] [Balance] Change Some Mainline Starter's Early Learnset (#3445) * Update pokemon-level-moves.ts * Change Poipole's Early Move * Add notes --- src/data/pokemon-level-moves.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/data/pokemon-level-moves.ts b/src/data/pokemon-level-moves.ts index ccf6ac022ae..bacb84930b4 100644 --- a/src/data/pokemon-level-moves.ts +++ b/src/data/pokemon-level-moves.ts @@ -2631,7 +2631,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.CHIKORITA]: [ [ 1, Moves.TACKLE ], [ 1, Moves.GROWL ], - [ 6, Moves.RAZOR_LEAF ], + [ 5, Moves.RAZOR_LEAF ], //Custom, moved from 6 to 5 [ 9, Moves.POISON_POWDER ], [ 12, Moves.SYNTHESIS ], [ 17, Moves.REFLECT ], @@ -2681,8 +2681,8 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.CYNDAQUIL]: [ [ 1, Moves.TACKLE ], [ 1, Moves.LEER ], - [ 6, Moves.SMOKESCREEN ], - [ 10, Moves.EMBER ], + [ 5, Moves.EMBER ], //Custom, moved to 5 + [ 10, Moves.SMOKESCREEN ], //Custom, moved to 10 [ 13, Moves.QUICK_ATTACK ], [ 19, Moves.FLAME_WHEEL ], [ 22, Moves.DEFENSE_CURL ], @@ -2736,7 +2736,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.TOTODILE]: [ [ 1, Moves.SCRATCH ], [ 1, Moves.LEER ], - [ 6, Moves.WATER_GUN ], + [ 5, Moves.WATER_GUN ], //Custom, moved from 6 to 5 [ 9, Moves.BITE ], [ 13, Moves.SCARY_FACE ], [ 19, Moves.ICE_FANG ], @@ -6723,7 +6723,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.TURTWIG]: [ [ 1, Moves.TACKLE ], [ 5, Moves.WITHDRAW ], - [ 9, Moves.ABSORB ], + [ 5, Moves.ABSORB ], //Custom, moved from 9 to 5 [ 13, Moves.RAZOR_LEAF ], [ 17, Moves.CURSE ], [ 21, Moves.BITE ], @@ -6768,7 +6768,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.CHIMCHAR]: [ [ 1, Moves.SCRATCH ], [ 1, Moves.LEER ], - [ 7, Moves.EMBER ], + [ 5, Moves.EMBER ], //Custom, moved from 7 to 5 [ 9, Moves.TAUNT ], [ 15, Moves.FURY_SWIPES ], [ 17, Moves.FLAME_WHEEL ], @@ -6817,7 +6817,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.PIPLUP]: [ [ 1, Moves.POUND ], [ 4, Moves.GROWL ], - [ 8, Moves.WATER_GUN ], + [ 5, Moves.WATER_GUN ], //Custom, moved from 8 to 5 [ 11, Moves.CHARM ], [ 15, Moves.PECK ], [ 18, Moves.BUBBLE_BEAM ], @@ -8591,7 +8591,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.SNIVY]: [ [ 1, Moves.TACKLE ], [ 4, Moves.LEER ], - [ 7, Moves.VINE_WHIP ], + [ 5, Moves.VINE_WHIP ], //Custom, moved from 7 to 5 [ 10, Moves.WRAP ], [ 13, Moves.GROWTH ], [ 16, Moves.MAGICAL_LEAF ], @@ -8639,7 +8639,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.TEPIG]: [ [ 1, Moves.TACKLE ], [ 3, Moves.TAIL_WHIP ], - [ 7, Moves.EMBER ], + [ 5, Moves.EMBER ], //Custom, moved from 7 to 5 [ 9, Moves.ENDURE ], [ 13, Moves.DEFENSE_CURL ], [ 15, Moves.FLAME_CHARGE ], @@ -8693,7 +8693,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.OSHAWOTT]: [ [ 1, Moves.TACKLE ], [ 5, Moves.TAIL_WHIP ], - [ 7, Moves.WATER_GUN ], + [ 5, Moves.WATER_GUN ], //Custom, moved from 7 to 5 [ 11, Moves.SOAK ], [ 13, Moves.FOCUS_ENERGY ], [ 17, Moves.RAZOR_SHELL ], @@ -13850,11 +13850,11 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [ 99, Moves.CLOSE_COMBAT ], ], [Species.POIPOLE]: [ + [ RELEARN_MOVE, Moves.DRAGON_PULSE ], //Custom, made relearn [ 1, Moves.GROWL ], [ 1, Moves.ACID ], [ 1, Moves.PECK ], [ 1, Moves.HELPING_HAND ], - [ 1, Moves.DRAGON_PULSE ], [ 7, Moves.FURY_ATTACK ], [ 14, Moves.FELL_STINGER ], [ 21, Moves.CHARM ], @@ -13969,7 +13969,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.GROOKEY]: [ [ 1, Moves.SCRATCH ], [ 1, Moves.GROWL ], - [ 6, Moves.BRANCH_POKE ], + [ 5, Moves.BRANCH_POKE ], //Custom, moved from 6 to 5 [ 8, Moves.TAUNT ], [ 12, Moves.RAZOR_LEAF ], [ 17, Moves.SCREECH ], @@ -14014,7 +14014,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.SCORBUNNY]: [ [ 1, Moves.TACKLE ], [ 1, Moves.GROWL ], - [ 6, Moves.EMBER ], + [ 5, Moves.EMBER ], //Custom, moved from 6 to 5 [ 8, Moves.QUICK_ATTACK ], [ 12, Moves.DOUBLE_KICK ], [ 17, Moves.FLAME_CHARGE ], @@ -14056,7 +14056,7 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = { [Species.SOBBLE]: [ [ 1, Moves.POUND ], [ 1, Moves.GROWL ], - [ 6, Moves.WATER_GUN ], + [ 5, Moves.WATER_GUN ], //Custom, moved from 6 to 5 [ 8, Moves.BIND ], [ 12, Moves.WATER_PULSE ], [ 17, Moves.TEARFUL_LOOK ], From e820163505dfc409570fb69cbdd3de45ee8e1b99 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:58:15 -0700 Subject: [PATCH 02/30] [Misc] Update Pull Request template (#3467) --- .github/pull_request_template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index acfe341c075..a765ed4a114 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,10 +2,10 @@ -## What are the changes? +## What are the changes the user will see? -## Why am I doing these changes the user will see? +## Why am I making these changes? From 638a0a66b57cb1d5bf331be4d4dfbab21c0f6155 Mon Sep 17 00:00:00 2001 From: DustinLin <39450497+DustinLin@users.noreply.github.com> Date: Fri, 9 Aug 2024 22:27:22 -0700 Subject: [PATCH 03/30] [Bug] removing destroy() calls on enemy pokemon after BattleEndPhase and breaks endless %50 waves (#3461) --- src/phases.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index 46d1f4b98db..fcd3cfb8801 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2581,15 +2581,6 @@ export class BattleEndPhase extends BattlePhase { this.scene.updateModifiers().then(() => this.end()); } - - end() { - // removing pokemon at the end of a battle - for (const p of this.scene.getEnemyParty()) { - p.destroy(); - } - - super.end(); - } } export class NewBattlePhase extends BattlePhase { From 566cd80522943790cd5102747bd790b6cae246a6 Mon Sep 17 00:00:00 2001 From: Tim Perdok <43152351+TimPerdok@users.noreply.github.com> Date: Sat, 10 Aug 2024 15:17:04 +0200 Subject: [PATCH 04/30] [Feature] Move touch controls configuration (Reopened) (#3256) * [Hotfix] Fix interactions of some moves not changing types (#3183) * [Hotfix] Fix wild spawns not having their HA (#3190) * [Hotfix] Allow to hatch pokemon with Hidden Ability again (#3222) * chore: Update TNC links layout and position in index.html * chore: Update TNC links font size in index.css (#3230) * Move Touch Controls * ConfigToolbar alignment * Insert config toolbar on open, camel-case classes, hidden setting * Better toolbar styling, fixed double configToolbar bug * Fixed typedocs --------- Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com> Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> Co-authored-by: Frederico Santos --- index.css | 301 +++++++++----- index.html | 100 +++-- src/inputs-controller.ts | 3 + src/locales/de/settings.ts | 1 + src/locales/en/settings.ts | 1 + src/locales/es/settings.ts | 1 + src/locales/fr/settings.ts | 1 + src/locales/it/settings.ts | 1 + src/locales/ko/settings.ts | 1 + src/locales/pt_BR/settings.ts | 1 + src/locales/zh_CN/settings.ts | 1 + src/locales/zh_TW/settings.ts | 1 + src/system/settings/settings.ts | 21 +- src/test/utils/fakeMobile.html | 97 +++-- src/touch-controls.ts | 46 ++- .../settings/abstract-settings-ui-handler.ts | 26 +- .../settings/move-touch-controls-handler.ts | 380 ++++++++++++++++++ src/ui/settings/settings-audio-ui-handler.ts | 5 +- .../settings/settings-display-ui-handler.ts | 5 +- src/ui/settings/settings-ui-handler.ts | 5 +- 20 files changed, 794 insertions(+), 204 deletions(-) create mode 100644 src/ui/settings/move-touch-controls-handler.ts diff --git a/index.css b/index.css index be480ab6c78..54eda86161d 100644 --- a/index.css +++ b/index.css @@ -1,16 +1,8 @@ +/* Global */ :root { --color-base: hsl(0, 0%, 55%); --color-light: hsl(0, 0%, 90%); --color-dark: hsl(0, 0%, 10%); - --controls-size: 10vh; - --text-shadow-size: 0.65vh; -} - -@media (orientation: landscape) { - :root { - --controls-size: 20vh; - --text-shadow-size: 1.3vh; - } } html { @@ -43,33 +35,173 @@ body { transform-origin: top !important; } +#layout:fullscreen #dpad, #layout:fullscreen { + bottom: 6rem; +} + +input:-internal-autofill-selected { + -webkit-background-clip: text; + background-clip: text; +} + /* Need adjust input font-size */ input { font-size: 3.2rem; } +.hidden { + display: none !important; +} + + +input:-internal-autofill-selected { + -webkit-background-clip: text; + background-clip: text; +} + +/* Touch Controls: */ + +#touchControls { + --text-shadow-size: 0.65vh; + --controls-size: 10vh; + --touch-control-opacity: 0.6; + + --controls-padding: 1rem; + + --controls-size-with-padding: calc(var(--controls-size) + var(--controls-padding)); + --control-group-extra-size: calc(var(--controls-size) * 0.8); + + --control-group-extra-2-offset: calc(var(--controls-size-with-padding) + (var(--controls-size) - var(--control-group-extra-size)) / 2); + --control-group-extra-1-offset: calc(var(--controls-padding) + (var(--controls-size) - var(--control-group-extra-size)) / 2); + + --small-control-size: calc(var(--controls-size) / 3); + --rect-control-size: calc(var(--controls-size) * 0.74); + + font-family: 'emerald'; + font-size: var(--controls-size); + text-shadow: var(--color-dark) var(--text-shadow-size) var(--text-shadow-size); + color: var(--color-light); +} + +@media (orientation: landscape) { + #touchControls { + --controls-size: 20vh; + --text-shadow-size: 1.3vh; + --small-button-offset: 4vh; + } +} + #touchControls:not(.visible) { display: none; } -#dpad, #apad { +#touchControls .active { + opacity: var(--touch-control-opacity); +} + +.control-group { position: fixed; - bottom: 1rem; + display: flex; + flex-wrap: wrap; + justify-content: space-around; + align-items: center; + width: var(--controls-size); +} + +.control-group-dpad { + width: calc(2 * var(--controls-size)); + height: calc(2 * var(--controls-size)); +} + +.control-group-extra { + width: var(--control-group-extra-size); + height: var(--control-group-extra-size); +} +/* Hide buttons on specific UIs */ + +/* Show #cycleForm and #cycleShiny only on STARTER_SELECT and SETTINGS */ +#touchControls:not([data-ui-mode='STARTER_SELECT']):not([data-ui-mode^='SETTINGS']) #apadCycleForm, +#touchControls:not([data-ui-mode='STARTER_SELECT']):not([data-ui-mode^='SETTINGS']) #apadCycleShiny { + display: none; +} + +/* Show #apadInfo only in battle */ +#touchControls:not([data-ui-mode='COMMAND']):not([data-ui-mode='FIGHT']):not([data-ui-mode='BALL']) #apadInfo { + display: none; +} + +/* Show #apadInfo only in battle and target select */ +#touchControls:not([data-ui-mode='COMMAND']):not([data-ui-mode='FIGHT']):not([data-ui-mode='BALL']):not([data-ui-mode='TARGET_SELECT']):not([data-ui-mode='MODIFIER_SELECT']) #apadStats { + display: none; +} + +/* Show cycle buttons only on STARTER_SELECT and on touch configuration panel */ +#touchControls:not(.config-mode):not([data-ui-mode='STARTER_SELECT']) #apadCycleNature, +#touchControls:not(.config-mode):not([data-ui-mode='STARTER_SELECT']) #apadCycleAbility, +#touchControls:not(.config-mode):not([data-ui-mode='STARTER_SELECT']) #apadCycleGender, +#touchControls:not(.config-mode):not([data-ui-mode='STARTER_SELECT']) #apadCycleVariant { + display: none; +} + +/* Configuration toolbar */ + +#configToolbar { + width: 100%; + position: fixed; + top: 1rem; + left: 0; + z-index: 9; + user-select: none; +} + +#configToolbar .column { + display: flex; + flex-direction: column; + align-items: center; + gap: 10%; + padding: 0 var(--controls-padding); +} + +#configToolbar .button-row { + display: flex; + justify-content: space-evenly; + width: 100%; +} + +#configToolbar .info-row { + display: flex; + justify-content: flex-start; + width: 100%; +} + +#configToolbar .button { z-index: 3; + background-color: var(--color-base); + display: flex; + justify-content: center; + align-items: center; + text-align: center; + border-radius: 10%; + height: var(--small-control-size); + font-size: var(--small-control-size); + border-radius: 8px; + padding: 2px 8px; + text-shadow: var(--color-dark) calc(var(--text-shadow-size) / 3) calc(var(--text-shadow-size) / 3); } -@media (orientation: portrait) { - #dpad, #apad { - bottom: calc(1rem + env(safe-area-inset-bottom)); - } +#configToolbar .button:active { + opacity: var(--touch-control-opacity) } +#configToolbar .orientation-label { + font-size: var(--small-control-size); + text-shadow: var(--color-dark) calc(var(--text-shadow-size) / 3) calc(var(--text-shadow-size) / 3); +} + +/* dpad */ #dpad { - left: 1rem; -} - -#apad { - right: 1rem; + z-index: 3; + opacity: 0.8; } #dpad svg { @@ -78,114 +210,83 @@ input { fill: var(--color-base); } -#dpad svg rect { - opacity: 0.6; -} +/* apad buttons */ -#apad > * { - width: var(--controls-size); - height: var(--controls-size); -} - -#apad .apadBtn { - width: var(--controls-size); - height: var(--controls-size); +.apad-button { background-color: var(--color-base); border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + right: 0; + bottom: 0; + width: var(--controls-size); + height: var(--controls-size); + opacity: 0.8; + border-radius: 8px; } -#apad .apadLabel { - font-family: 'emerald'; - font-size: var(--controls-size); - text-shadow: var(--color-dark) var(--text-shadow-size) var(--text-shadow-size); - color: var(--color-light); +.apad-small { + width: var(--small-control-size); + height: var(--small-control-size); +} + +.apad-label { user-select: none; + height: 100%; + margin-right: -2px; } -#apad .apadLabelSmall { - font-size: calc(var(--controls-size) / 3); +.apad-small > .apad-label { + font-size: var(--small-control-size); text-shadow: var(--color-dark) calc(var(--text-shadow-size) / 3) calc(var(--text-shadow-size) / 3); } -#apad #apadLabelAction, #apad #apadLabelCancel { - margin-left: calc(var(--controls-size) / 3); - line-height: 0.9; -} - -#apad > :nth-child(2) { - position: relative; - right: var(--controls-size); -} - -#apad .apadRectBtn { - position: relative; +.apad-rectangle { text-align: center; - padding-right: 10%; - border-radius: 10%; - bottom: calc(var(--controls-size) * 0.05); - width: calc(var(--controls-size) * 0.6); - height: calc(var(--controls-size) * 0.3); + width: var(--rect-control-size); + height: var(--small-control-size); } -#apad .apadSqBtn { - border-radius: 10%; - width: calc(var(--controls-size) * 0.3); - height: calc(var(--controls-size) * 0.3); +.apad-square { + width: var(--small-control-size); + height: var(--small-control-size); } -#apad .apadBtnContainer { - position: relative; - display: flex; +.apad-circle { + width: var(--controls-size); + height: var(--controls-size); + border-radius: 50%; } -#apad .apadRectBtnContainer { - flex-wrap: wrap; - margin-top: calc(var(--controls-size) * -0.8); - left: calc(var(--controls-size) * 0.175); - height: calc(var(--controls-size) * 0.8); +/* Defaults:*/ + +#control-group-dpad { + left: var(--controls-padding); + bottom: var(--controls-padding); } -#apad .apadSqBtnContainer { - flex-wrap: wrap; - justify-content: space-evenly; - align-items: center; - margin-bottom: calc(var(--controls-size) * -0.8); - top: calc(var(--controls-size) * -0.9); - width: calc(var(--controls-size) * 0.8); - height: calc(var(--controls-size) * 0.8); +#control-group-action { + right: var(--controls-padding); + bottom: var(--controls-size-with-padding); } -#apad .apadRectBtnContainer > #apadMenu { - align-self: flex-end; +#control-group-cancel { + right: var(--controls-size-with-padding); + bottom: var(--controls-padding);; } -#apad .apadRectBtnContainer > .apadSqBtn:not(:first-child) { - margin-left: 10%; +#control-group-extra-1 { + right: var(--control-group-extra-1-offset); + bottom: var(--control-group-extra-1-offset); } -#touchControls:not([data-ui-mode='STARTER_SELECT']):not([data-ui-mode='SETTINGS']):not([data-ui-mode='SETTINGS_DISPLAY']):not([data-ui-mode='SETTINGS_AUDIO']):not([data-ui-mode='SETTINGS_GAMEPAD']):not([data-ui-mode='SETTINGS_KEYBOARD']) #apad .apadRectBtnContainer > .apadSqBtn:not(.apadBattle), -#touchControls:not([data-ui-mode='STARTER_SELECT']):not([data-ui-mode='SETTINGS']):not([data-ui-mode='SETTINGS_DISPLAY']):not([data-ui-mode='SETTINGS_AUDIO']):not([data-ui-mode='SETTINGS_GAMEPAD']):not([data-ui-mode='SETTINGS_KEYBOARD']) #apad .apadSqBtnContainer > .apadSqBtn:not(.apadBattle) -{ - display: none; +#control-group-extra-2 { + right: var(--control-group-extra-2-offset); + bottom: var(--control-group-extra-2-offset); } -#touchControls:not([data-ui-mode='COMMAND']):not([data-ui-mode='FIGHT']):not([data-ui-mode='BALL']):not([data-ui-mode='TARGET_SELECT']):not([data-ui-mode='MODIFIER_SELECT']) #apad .apadBattle { - display: none; -} - -#apad .apadRectBtnContainer + .apadSqBtnContainer { - top: calc(var(--controls-size) * -1.9); - left: calc(var(--controls-size) * -0.9); -} - -#apad .apadBtnContainer .apadLabel { - margin-left: calc(var(--controls-size) / 12); - line-height: 0.8; -} - -#dpad path:not(.active), #apad .apadBtn:not(.active) { - opacity: 0.6; -} +/* Layout */ #layout:fullscreen #dpad, #layout:fullscreen #apad { bottom: 6rem; diff --git a/index.html b/index.html index ebe5b063c52..5ebf822521e 100644 --- a/index.html +++ b/index.html @@ -64,54 +64,70 @@
-
- - - - - - - +
+
+
+ + + + + + + +
+
-
-
- A -
-
- B -
-
-
- R -
-
- V -
-
- C -
-
- Menu +
+
+
+ A
-
-
- F -
-
- G -
-
- E -
-
- N -
-
- V + +
+
+ B
+ +
+
+ R +
+
+ V +
+
+ C +
+
+ Menu +
+
+ +
+
+ F +
+
+ G +
+
+ E +
+
+ N +
+
+ V +
+
+