Compare commits

...

132 Commits

Author SHA1 Message Date
Madmadness65
389c479825 Update comments 2024-06-07 18:23:53 -05:00
Madmadness65
66d1de42a2 Use move.type instead of type.value
The type effectiveness now works again.
2024-06-07 17:59:17 -05:00
Madmadness65
cf2ac89741 Merge branch 'main' into plates_memories 2024-06-07 17:35:46 -05:00
Greenlamp2
1a149bfa04
[Testing] Flexible Testing Wrapper for Phaser-Based Battle-Scenes (#1908)
* refactor executed code while importing and initializing all of these in loading-scene

* reset to main

* fix server url

* added rule no-trailing-spaces

* made progress

* test somme data from a session save is working

* trying to launch a battle

* added fetch wrapper to load data locally

* trying to mockAllSettled

* pushPhase & shiftPhase

* check integrity of exported session

* set toke + loggedInUser in tests

* progress on starting new battle

* tring to test phase but it's async

* mocking fetch

* working mock fetch

* need to handle pile of data

* attempt to use real phaser classes

* reorder overrides

* refactored to use some real classes from phaser

* removed useless things

* started to work on some container mock

* finished the mockContainer time to add some logic

* some more mock containers

* removed addMethods since there is the mock classes now

* commented issues

* attempt to create mockTextureManager

* fix tests

* mockSprite & mockText

* yes but not really

* yes but not really

* fix tutorial callback

* reached mode title

* added achievement tests

* fix test achievements with current state of mock

* correct sequence loading for BattleScene with mockLoader !

* deep dive into next step

* working wait until starter selection screen

* added newGame method into wrapper

* expect to save_slot

* trying to manage pokemon sprite for getAll without success yet

* added test for egg output

* fixed egg test for June

* fix tests + locate next issue to fix

* we are in battle baby

* added new game in one-line

* export is working but export only what's in the fetch

* fix start game as guest

* refactored how we start a battle + cleanup

* overrided mewtwo but issue with currentBattle

* refactor: rename InitAchievements to initAchievements

* added missing mock method

* override level and pokemon forms working as intended

* bringToTop Obj

* remove launch battle in achivement test

* fix getIndex when same pokemon

* can run all tests

* first attack, faint, and shop modifiers, MockClock

* on method for container

* added doAttack one-liner

* one-line export data

* removed throw error

* feat: Make `scenes` property of `GameWrapper` class public

The `scenes` property of the `GameWrapper` class was changed from private to public. This change allows external access to the `scenes` map, which is used to store Phaser scenes. This modification was made to enable easier manipulation and interaction with the scenes in the game.

* correction

* removed CanvasRenderer

* added a param to remove console.log and added a param to preven scene create call

* fix encounter wave 30 when it's a trainer

* test double-battle

* test fight without KO

* test double fight no ko

* fix crashing texture + added Text wrapper to log fight

* fix tests on boss - trainer - rival

* chore: Refactor BattleScene initialization and add new phases

Refactor the BattleScene initialization code to remove unnecessary delay and improve performance. Also, add new phases for the title and unavailable states to enhance the game experience.

* rework of Game tests

* skipFn is working

* added onNextPrompt and restore Og Start

* better newGame

* added skipFN in remove

* not yet working test but updated interceptors

* do attack work but not on PostSummonPhase phase when there is mention of silcoon and wurmple

* error located, it's just a double fight, i was not there yet

* single OHKO & double no OHKO

* added expirationFn into next prompt

* all tests are passing

* working test on non damaging move from opponent

* cleaned a bit

* removed phaser initialisation on every tests

* renamed test file

* added load system data

* added some ability support

* added onKill & onSummon abilities test

* removed useless test + cleanup

* removed useless test + cleanup

* fixed tests after merge main

* added itemHeld endTurn trigger test (toxic orb)

* added runFrom..To

* added mustRun to assert currentPhase

* added no-miss move to test things

* cleaner restore mock

* fix test

* fix moxie test + game speed

* improve test speed

* added onOurself and onOpponent mvoe test

* added onDamage test for tackle

* removed timeout in intervals to run tests faster

* cleanup

* added never crit override + separate file per test + remove randomness in randBattleSeedInt

* move folders

* better org

* renamed itemHeld folder to items

* fix deploy.yml

* cleanup

* simplified the gameManager start battle and allow single pokemon in party

* remove the need of mode development

* added input handler to test inputs + remove time from phaser into inputController

* added keyboard support

* added fakeMobile support

* added details

* removed a console.log + added logUp

* move test to folder

* fixed canvas issue

* added starter select tests

* added some more test on starter-select

* added battle-order tests

* added battle-order tests

* fixing Phaser RNG

* ordering stats for better reading

* fix tests for main

* adapt battle-order test to be more readable

* fix merge

* fix some errors and silent all errors from gameWrapper since it's not possible to avoid them

* fix mocks to manage childs & stuffs

* added some docs

* fix achievement test

* removed an unused file

* separate misc tests to clean battle.test file

* added a basic french lokalization test

* added i18n where it needs to be used only

* revers extracted method

* removed unused method

* removed handler fetch since we do not test anything server related

* fix test with handlers removed

* added intrepid sword test

* fix enum exp party

---------

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
2024-06-07 18:33:45 -04:00
Madmadness65
3d87e86e58 Fix minor typo in Surskit's German name 2024-06-07 16:57:26 -05:00
Jannik Tappert
ece7c9f2d5
Added missing german dialogue for sailor and firebreather (#1883) 2024-06-07 22:51:49 +01:00
AJ Fontaine
f3898dbabd
[Bug] Fix female trainer names on male Backpackers/Hikers (#1919)
* Fix female trainer names on male Backpackers/Hikers

* Remove duplicate Backpacker Ruth
2024-06-07 17:44:35 -04:00
AJ Fontaine
eb058d7eb7
[Bug] Fix Harvest not checking stack limits for berries (#1920) 2024-06-07 17:42:48 -04:00
Madmadness65
83c11a0865 Allow Partner Pikachu & Eevee to Gigantamax
Note that they will revert back to regular Pikachus and Eevees if deactivated due to an existing bug with the form changes.
2024-06-07 16:21:18 -05:00
Matthew Olker
63d98fe70e Hotfix: types breaking gh-pages action 2024-06-07 17:05:44 -04:00
td76099
0a17c2495a
Bugfix: Abilities check final move type instead of default move type (#1440)
* Added check for move changing type before determining if defending is immune to it because of an ability

* Remove duplicate Ability change class and added getType() function under a move

* Reworking how moves get passed into hit calc

* Fixing exceptions and overreaching changes

* reverting forwarn and dancing move back to original since they are not being changed

* fixing some small move related bugs

* Fixing file permissions after testing

* Fixing move type not resetting after individual MoveEffectPhase

* Fixing move.ts permissions (again)

* Addressing some MR feedback and adding some documentation for PokemonMove class
2024-06-07 16:57:57 -04:00
sodam
636cb9c8f2
[Localization] #1761 Korean trainer dialogue (some unnamed trainers) (#1911)
* localized to korean (some unnamed trainers)

* fixed dialogue's meaning clear

Co-authored-by: returntoice <dieandbecome@gmail.com>

* fixed spacing right

Co-authored-by: Sangmin Lee <66083363+GINK-SS@users.noreply.github.com>

---------

Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: Sangmin Lee <66083363+GINK-SS@users.noreply.github.com>
2024-06-07 21:52:31 +01:00
prime
f5f98ec537
[Bug] fixed wrong stacking of move info overlay issues (#1888)
* fixed wrongly stacking overlay issues

- starter selection
 - IVs are now behind the overlay
 - the overlay should clear when exiting it via controller (requires tests as i don't have a controller)
- TM
 - will prevent C/Shift from showing the overlay until the next item selection, when selecting a TM as item reward.
 - will prevent C/Shift from showing the overlay when canceling item selection

* removed reference to previously deleted resource

* fixed override
2024-06-07 16:45:49 -04:00
Jannik Tappert
97dde2d1f3
[QoL] Added https and server url is read from the env now (#1764)
* Added https and server url is read from the env now

* Added the new key to the vite.env.d.ts
2024-06-07 21:43:32 +01:00
Arxalc
7c3ace7204
[Bug] Fixed primal weather interaction. (#1744)
* Fixed primal weather interaction.

* Made adjustments

* Improved code readability
2024-06-07 15:22:06 -04:00
Corrade
c177f3c1fb
[Bug] Ignored strong winds for stealth rock and anticipation (#1682) 2024-06-07 15:15:24 -04:00
Lee ByungHoon
d592187f2c
[Localization] Add localization in party-ui-handler (#1712)
* [Localization] Add localization in party-ui-handler

* [Localization] Add "Release", "Apply", "Teach" localization, changed translation of Korean

* [Localization] Translated party-ui-handler's localization to Deutsch
2024-06-07 15:08:34 -04:00
Madmadness65
a224f5e822 Add Partner Pikachu & Eevee party icons
This also necessitated giving them unique front & back sprites too, even if they are currently just duplicates of the normal forms. This change will help players identify when they are using/have encountered a Partner Pikachu or Eevee.
2024-06-07 13:58:48 -05:00
Adam Clemons
fb21caa769
[Bug] Fix ability Download switch in (1669) (#1679)
* Update ability Dowbload

* Remove whitespace

* Update ability.ts
2024-06-07 14:17:22 -04:00
hayuna
bb1dde5b0c
[Refactor] Move enum ExpNotification into separated file (#1909)
* Move enum ExpNotification into separated file

* Update phases.ts

* Change type of this.scene.expParty into enum
2024-06-07 13:14:52 -04:00
雪霁
19712e0d43
fix language auto detect (#1784) 2024-06-07 11:27:42 -05:00
Matthew Olker
20a3a4f60f added a few more gameobject names for debug 2024-06-07 10:27:36 -04:00
MutenYoshii
f17a4ff3f2
[Move] Implemented Court Change (#1799)
* [Move] Implemented Court Change

* Returned overides to normal

* Added recommended changes

* Removed an unnecessary if statement for swaparenatagsattr

* Move the swaptags array to the call as well as changes to the quiet boolean

---------

Co-authored-by: Juan <jmora279@fiu.edu>
2024-06-07 09:27:11 -05:00
MadridPawmot
4745b591c2
[Localization] Spanish dialogues (#1892)
* Update dialogue.ts

* Fixed typo
2024-06-07 15:02:24 +01:00
Sangmin Lee
50bf717c5c
[Localization] #1761 Korean trainer dialogue (roark, gardenia, maylene, fantina) (#1905)
* [Localization] #1761 Korean trainer dialogue (roark, gardenia)

* [Localization] #1761 Korean trainer dialogue (maylene, fantina)

* Modified Roark's dialogue more natural

Co-authored-by: returntoice <dieandbecome@gmail.com>

---------

Co-authored-by: returntoice <dieandbecome@gmail.com>
2024-06-07 09:57:14 -04:00
DustinLin
ffdbdc1139
fix sleep talk targeting (#1813) 2024-06-07 13:38:22 +01:00
José Ricardo Fleury Oliveira
132d01776e
[ptBR Localization] Updated dialogue.ts, Tera Shards and trainer.ts (#1881)
* updated sailor dialogue

* tera fix

* trainers

* ice face
2024-06-07 12:57:10 +01:00
Cycrum
cc2e31dbe0
[Localization] Corrected capitalization on Quick Claw activation text (#1894)
* Update pokemon-species.ts

Updated Pokemon genders to canonical rates

* Corrected capitalization of Quick Claw activation
2024-06-07 00:45:36 -04:00
MrWaterT
a852106a9d
[Localization] Correct and apply updates to Korean (#1863)
* [Localization] Apply Korean to update

ability-trigeer.ts
  windPowerCharged: Wind Power/Wind Rider #1566
  Perish Body #1554
  Poison Heal #1245
menu.ts
  Loading screen disclaimer 7c9e5e9
modifier-type.ts
  TM description with overlay key notice #1585

* Correct wrong text and align text width

change RV
remove space from FGEN

* Edit wrong space

* Use special color(official) rather than unofficial shiny

* Translate iceFaceAvoidedDamage
2024-06-07 00:19:45 -04:00
Xavion3
9013921523
[Bug] Fix speed tie code (#1895)
* Fix speed tie code

* Fix off by one error

* Shuffle before sorting to make code cleaner
2024-06-06 23:01:13 -04:00
DustinLin
a815b73d96
[Documentation] documentation of move.ts (#1828)
* starting documentation of move.ts

* more docs

* fixing comments

* updating comments
2024-06-06 20:11:14 -05:00
Benjamin Odom
4cce8a1bfa
Update index.css (#1898) 2024-06-06 19:57:12 -05:00
prime
5568def1a4
Show C-Button on mobile during modifier selection (#1893) 2024-06-06 19:20:13 -05:00
Raidette
209a69d098
[Move] Rototiller implementation (#1885)
* rototiller implementation

* attack now fails if no eligible grass type pokémon is fielded
2024-06-06 17:22:04 -04:00
Greenlamp2
9c1a13eb54
Fix - double inputs (#1842)
* fix an issue where the input repeated itself too fast

* remove remnant code
2024-06-06 22:55:01 +02:00
returntoice
a18d796e2e
[Localization] Fix Korean multi lens description (#1891) 2024-06-06 16:43:25 -04:00
Cycrum
4fcc3ef9ff
[Feature] Update Gardevoir, Glalie, and Meloetta genders (#1864)
Updated Pokemon genders to canonical rates
2024-06-06 16:19:41 -04:00
Jannik Tappert
1312d4f825
[Qol] The title will now be displayed in the voucher overview (and flyout) (#1886)
* The title will now be displayed in the voucher overview

* Update src/system/voucher.ts

* Intend
2024-06-06 15:01:21 -04:00
Tempoanon
ac8ae6c724
Thunderclap should not let the AI read your inputs (#1884) 2024-06-06 12:59:22 -05:00
Tempoanon
609efb0cf9
Fix typo in healing charm for Chinese localization (#1874) 2024-06-06 12:58:02 -05:00
Matthew Olker
1276006de3 Money shouldn't cover full screen even if its funny 2024-06-06 13:30:43 -04:00
HighMans
17edaeb708
[QoL] Sort items on summary screen (#1880) 2024-06-06 13:13:14 -04:00
MadridPawmot
f3de114d2b
[enhancement] Added Sailor trainer class (#1411)
* Add files via upload

* Update trainer-type.ts

* Update biomes.ts

* Update trainer-config.ts

* Update trainer-names.ts

* Update trainer-names.ts

* Update trainers.ts

* Update trainers.ts

* Added German translation

Thanks to CodeTappert

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts

* Update trainers.ts to resolve conflicts

* Fixed syntax error

* Update biomes.ts

* Re-added possible biomes for the Sailor trainer class

* Added data for dialogue lines for the sailor class

* Added dialogue from FRLG

* Added locale

* Added locale

* Added locale

* Update trainers.ts

* Added locale

* Added locale

* Added Korean translation

* Added locale

* Added Portuguese translation

* Added locale

* Added locale

* Added Mandarin Chinese translation

* Added Cantonese Chinese translation

* Added images

* Recentered sprite

* Added Spanish translation for the dialogue

* Delete duplicate

* Delete duplicate

* Updated dialogue with requested changes

* Update Spanish translation to reflect the changes

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts

* Update dialogue.ts
2024-06-06 11:55:32 -05:00
Noor Q
14b5d141c1
[QoL] Added an indicator when money changes. (#1772)
* added an animation and color shift when adding/removing money

* eslint fix

* The animation is now vertically centered, larger and faster.
2024-06-06 11:50:02 -05:00
Lee ByungHoon
90aa9b4209
[Localization] #1761 Korean trainer dialogue (#1853)
* [Localization] #1761 Translation to Korean about some trainers

### trainer list
- ace_trainer
- parasol_lady
- twins
- cyclist
- black_belt

* fixed the grammar of some sentences. and changed Korean about ace trainer.

* Modify translation dialogue with parasol lday and cyclist
2024-06-06 12:22:31 -04:00
HighMans
a221a46220
Attempt to sort items on summary & battle screen for user's party. (#1188)
* Sort items in summary screen by type then name.

* Use modifierSortFunc from modifier.ts

* Implement proper sort function which also applies to the battle scene.

* Implement proper sort function which also applies to the battle scene.

* Run linter.

* Fix type assertions.
2024-06-06 11:10:38 -05:00
Dmitriy K
223d8a731d
[Feature] Implement Full Heal/Lum/Full Restore to heal Confusion #1658 (#1876)
* Added Confusion to be healed with Full Heals and Full Restores

* Semi-Colon oversight

* Changed resetStatus to have a condition whether to include confusion or not, defaults to false so you manually have to add

* Fixed spacing and semicolon

* Refactored the Lum Berry case

* Fix berry conflicts

* Update {}

* Fix PP Conflict

* Build fix?

* Fix Modifier

* Build Fix

* Fix

* Fix StatuHeal from eslint

* Fix revive (will show testing through everything again)

* Update documentation

---------

Co-authored-by: Ethan <hensley.ethan64@gmail.com>
Co-authored-by: Ethan <71776311+EvasiveAce@users.noreply.github.com>
2024-06-06 12:04:16 -04:00
Adrian T
8d6a0bb0a1
[Ability] Implement Ice Face (#1755)
* implement ice face ability

* remove showing ability bar

* fixes

* add documentations

* move code out of phases.ts

* add hardcoded eiscue check, localization

* add KO locale

* remove unnecessary constructor

* use && instead of || to specify ice form on eiscue
2024-06-06 11:49:50 -04:00
MrWaterT
ba66f2c916
[Bug] Remove text on summary bg (#1709) 2024-06-06 11:31:31 -04:00
SeafoamQueen
3fea384dc1
[Feature] Added Battle Style setting (#1872)
* Added Battle Style setting with Shift and Set options

* Changed 'Shift' option to 'Switch' to match the Gen 8 setting.
2024-06-06 11:26:04 -04:00
José Ricardo Fleury Oliveira
cb27fc2b06
[Localization] ptBR removing capital letters in battle.ts (#1873) 2024-06-06 11:19:38 -04:00
h44451890
94099e0fba
Fix all ability name and description of zh_tw (#1478) 2024-06-06 10:17:53 -05:00
Lee ByungHoon
081d813540
[Feature] Move to start button when you can't add party anymore (#1673)
* [Feature] Move to start button when you can't add party anymore

* Add comment about #1673

* Update starter-select-ui-handler.ts

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-06-06 10:12:19 -05:00
c4vv
e0401a93aa
[Bug] Fix generateVariant to account for forms (#1783)
* Add form check to generateVaraint

* Add index check

* Fix for typedoc
2024-06-06 10:55:50 -04:00
SeafoamQueen
5ac1b7245f
[Feature] Refactored Game Settings UI navigation menu and sorting (#1860)
* Refactored settings UI menu options and added the battle style setting

* Removed the new Battle Style setting. It will be added in a seperate PR.

* Fixed typo and spacing
2024-06-06 10:38:54 -04:00
dorri-riddo
63ce24afb2
[Localization] #1761 Korean trainer dialogue (ramos, viola) (#1868) 2024-06-06 10:22:46 -04:00
José Ricardo Fleury Oliveira
9c4c4005ae
[Localization] ptBr battle.ts translations (#1870) 2024-06-06 10:12:40 -04:00
Greenlamp2
5764324f61
fix display touch control V in battle (#1869) 2024-06-06 09:47:08 -04:00
Laeticia PIERRE
f53dce432b
useMove + pokemon affix localization (#1276)
* useMove + pokemonPrefix localization

* Rename prefix to affix + line break fr

* getPokemonAffix to getPokemonNameWithAffix + remove space + replace

* Better getPokemonNameWithAffix switch

* Ko locale + fix es locale

* Doc getPokemonNameWithAffix + getPokemonMessage + fix

* Ko translate / missing weather changes

* Fix conflicts getPokemonPrefix

---------

Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
2024-06-06 08:36:12 -05:00
Frede
40328d5712
[BUG] Fix Move Info Overlay Scroll Bug (#1856)
* Added "Skip Dialogues" option (if at least 1 classic win)

* Removed error sound and hide option instead when classic wins = 0

* Add skip dialogues option to Unlockables and show unlocked message on first classic win

* Only skips seen dialogues, removed dialogue option from unlockables, seen dialogues get saved to local storage

* oops

* dont show charSprite when skipping a dialogue, small fixes

* correctly reset move description scrolling when changing move

* override fix

---------

Co-authored-by: Frederik Hobein <frederik.hobein@nterra.com>
2024-06-06 08:22:37 -05:00
José Ricardo Fleury Oliveira
0e9bcfb4fd
[Bug] Minor ptBR mint fix (#1852) 2024-06-06 01:23:44 -04:00
flx-sta
a8489cc707
[Bug] Revert start-label text to translation (#1855) 2024-06-06 01:18:54 -04:00
Benjamin Odom
5e52be676f
[QoL] Add Time of Day Widget to Arena Flyout (#1846)
* Time of Day Sample

* Add Proper Time of Day Tracking

* Add Settings
2024-06-05 22:57:55 -05:00
AJ Fontaine
daa9e1ef0f
[BUG] Fix fullheal, burn/poison, and endure tokens in existing saves not updating after rebalance (#1848)
* Fix tokens not actually updating

* Remove changes to getArgs

* Added parentheses around conditional for safety

* Laid a space betwixt the two and its respective one at the behest of Temp
2024-06-05 23:07:47 -04:00
José Ricardo Fleury Oliveira
c1b4be83d0
translations (#1850) 2024-06-05 21:52:59 -05:00
returntoice
6b31db0bc5
[Localization] Paldean gym leaders and elite 4 dialogue Korean translation (#1838)
* Your commit message

* localization
2024-06-05 21:54:08 -04:00
sodam
19114e4fd3
[Localization] #1761 Korean trainer dialogue (Gym leader in Hoenn region) (#1830)
* localized to korean (Gym leader's dialouge in Houenn region)

* modified the spacing

Co-authored-by: returntoice <dieandbecome@gmail.com>

* modified the spacing

Co-authored-by: returntoice <dieandbecome@gmail.com>

* modified the spelling

Co-authored-by: returntoice <dieandbecome@gmail.com>

---------

Co-authored-by: returntoice <dieandbecome@gmail.com>
2024-06-05 21:52:30 -04:00
prime
1c98106642
[QoL] Move Info Overlay (#1585)
* move info implemented for starter selection

a move info box is displayed when editing the starter moveset.

also menus have now onHover triggers.

todo:
- show ui when selecting TMs
- show ui when selecting moves to remember (memory mushroom)

* More Move Info Overlays

Added overlays during Memory Mushroom use and when viewing TMs.
Furthermore a settings option can enable/disable those overlays.

* Added missing ko language entry

... though translation still remains necessary

* updated ui

also added overrides for item rewards

* minor ui update

moved values to the right in the tm move info box

* fixed typedoc issues

* removed settings in to prepare for merge

* updated settings option

added settings option to new settings implementation

* minor changes

removed unused graphic
moved settings option to accessibility
2024-06-05 20:28:12 -05:00
Matthew
c5689dfc96
dont make api calls when no server is connected in local (#1847)
* dont make api calls in local without a server connected and fix fusionLuck not set by default
2024-06-05 21:24:47 -04:00
Tempoanon
6d35399c31
[Bug] Change confuse chance from 2/3 to 1/3 (#1827) 2024-06-05 20:05:44 -05:00
flx-sta
283714bd0f
[Refactor] Move enums from game-data into their respective files in src/data/enums (#1837)
* move PlayerGender enum into src/data/enums/player-gender.ts

this is necessary to avoid circular dependencies which did crash tests in the past (in PRs)

* Update settings.ts

* Update game-data.ts

* Update summary-ui-handler.ts

* Update ui.ts

* move Passive & GameDataType enums into own files
2024-06-05 19:11:07 -05:00
Blitzy
46dc7e9b01
[Balance] Give Partner Pikachu its Signature Moves and change Cosplay's stats (#1737)
* Update Cosplay Pikachu stats

* Give Partner Pikachu its signature moves in its learnset

* Added a "custom" note next to stats

* Spread out signatures per Brain Frog's request
2024-06-05 16:56:31 -05:00
Xavion3
4b36d38acb
Hotfix for NaN luck (#1840)
Makes luck default to 0 if false-y
2024-06-05 20:42:15 +01:00
Matthew Olker
3855b92237 fix weird luck when catching a fused mon 2024-06-05 15:41:04 -04:00
José Ricardo Fleury Oliveira
4a9fe763a5
[ptBR] Translated text (#1821)
* translated disclaimer

* minor fix
2024-06-05 12:44:48 -05:00
YounesM
e614aec8ca
[Bug] Fix for Dancer activating when enemy in not on field / using a 2 steps charging move (#1708)
* Fixes !1686 and !1450

* Added forbidden tags

* Restored original import indentations

* Restored missing import
2024-06-05 13:10:24 -04:00
Matthew Olker
b532a6b2d0 okay not that lucky 2024-06-05 11:21:47 -04:00
Matthew Olker
6d71db0f13 luck based encounter 2024-06-05 11:02:58 -04:00
NightKev
395fa6e33d
[Bug] Allow second mon of a fusion to learn/remember on-evo moves (#1778)
Fixes #520
2024-06-05 10:36:42 -04:00
GoldTra
dce4518b93
Updated Spanish translations (#1825) 2024-06-05 09:24:33 -05:00
Frede
fe732bbbe6
[QoL] Pokemon Info Container hides Enemy Modifier Bar (#1820)
* Added "Skip Dialogues" option (if at least 1 classic win)

* Removed error sound and hide option instead when classic wins = 0

* Add skip dialogues option to Unlockables and show unlocked message on first classic win

* Only skips seen dialogues, removed dialogue option from unlockables, seen dialogues get saved to local storage

* oops

* dont show charSprite when skipping a dialogue, small fixes

* pokemonInfoContainer always on top of battle UI when shown

* removed setDepth and rather hide enemyModifierBar

---------

Co-authored-by: Frederik Hobein <frederik.hobein@nterra.com>
2024-06-05 10:09:06 -04:00
Lee ByungHoon
e599931ff3
[Localization] Add Korean trainer dialogue (youngster, lass) (#1809)
* [Localization] #1761 Korean trainer dialogue (youngster, lass)

* changed ellipsis character that used 3 character to used 1 character.

* Update src/locales/ko/dialogue.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update src/locales/ko/dialogue.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update src/locales/ko/dialogue.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

---------

Co-authored-by: returntoice <dieandbecome@gmail.com>
2024-06-05 10:00:43 -04:00
Adrian T
bd34fc0b47
[Bug] Fix quick claw message showing if command is not fight (#1819) 2024-06-05 09:38:43 -04:00
Madmadness65
219f227cab Remove basic Voucher from Ultra item pool
It should only be in the Great item pool now.
2024-06-04 21:53:22 -05:00
sodam
7cc5ca1839
[Localization] Korean Kanto gym leader dialogue ( (#1794)
* localized to korean (Gym leader's dialouge at Kanto region)

* modified Brock's dialogue clearly

* Add missed word to lt_surge's dialogue
2024-06-04 22:17:49 -04:00
Madmadness65
1dd7a792d4 Fix Wide Lens being accidentally added to Rogue pool 2024-06-04 21:15:10 -05:00
damocleas
dd3ffb4315
Voucher Item tier changes/addition (#1516)
* Voucher Item tier changes/addition

- Voucher moved from Ultra -> Great Tier, given a weight of 1 and disappears after first reroll, should still appear more often with a healthy team than in ultra tier at all.
- Voucher Plus moved from Master -> Rogue Tier, with weight starting at 9 -> 5 and decreasing with each reroll with 3 -> 2
Should appear just a bit more often than before.
- Voucher Premium added to Master (based on suggestion from Madmadness) with same weight as new Voucher Plus, and disabled in Endless / Endless Spliced
Should appear ~20% of the time with *perfect luck* in a whole average classic run.

Overall would be a 40-45% increase in total eggs in perfect conditions (luck, healthy team, etc.)

* fixed an extra spacebar at the end of 1303

* fixed an extra spacebar at the end of 1360

* fixed to account for Wide Lens being added
2024-06-04 22:05:29 -04:00
Matthew Olker
7eb0e8e77d revert pokemon info container depth change 2024-06-04 21:45:36 -04:00
Matthew Olker
7c9e5e9f52 loading screen disclaimer 2024-06-04 21:41:36 -04:00
Matthew Olker
5464f964c9 add more gameobject names for debugging 2024-06-04 21:06:46 -04:00
Frede
cfe9b3303a
[QoL] Pokemon Info Container always on top of Battle UI (#1782)
* Added "Skip Dialogues" option (if at least 1 classic win)

* Removed error sound and hide option instead when classic wins = 0

* Add skip dialogues option to Unlockables and show unlocked message on first classic win

* Only skips seen dialogues, removed dialogue option from unlockables, seen dialogues get saved to local storage

* oops

* dont show charSprite when skipping a dialogue, small fixes

* pokemonInfoContainer always on top of battle UI when shown

---------

Co-authored-by: Frederik Hobein <frederik.hobein@nterra.com>
2024-06-04 21:05:25 -04:00
Adrian T
48f60a5b50
[QoL] add message when quick claw is triggered (#1684) 2024-06-04 18:11:30 -04:00
Benjamin Odom
d04010226d
[Bug] Fix Leppa Berries not Updating Flyout PP (#1806)
* Fix Leppa Berries not Updating Flyout PP

* Code Cleanup

* Update battle-flyout.ts
2024-06-04 16:59:39 -05:00
AJ Fontaine
eecad0fdc4
Balance endless tokens (#1733)
* Balanced tokens

* Remove existing tokens, all 10 stack limit

* Linter complained

* Sorry Mr. Lint I’ll do better next time

* Removed redundant min

* Used a version system to update tokens

* The linter has peculiar tastes

* See if this works

* I'm at my limit omg wtf Sam

* Call me Swoobat the way I keep it Simple

* Clean up some log statements

* Adjust token weights to make up for removal of sleep and freeze

* Be so fr GitHub that’s not a real merge conflict
2024-06-04 16:39:22 -05:00
Jannik Tappert
a8205ae819
[Bug] Handle if the browser gives a long form of a language (like "de-DE") … (#1795)
* Handle if the browser gives a long form of a language (like "de-DE") for cases where we only have the short form "de".

* Changed it so that now resolved Language is now used anywhere. This is basically what i orignally did manually but provided from i18next directly
2024-06-04 15:11:02 -05:00
Tempoanon
809c86599d
[Feature] Updated Champion teams (#1676)
* Updated champion teams

* Forgot Alder's legendary

* Give Alder Genesect

* Merge and update

* Update teams a bit more

* Red now leads with Pikachu, fixed Iris dialogue

* Add champ leads
2024-06-04 14:37:04 -04:00
Benjamin Odom
6dbf99cc72
[Bug] Fix Circular Dependency with BerryType (#1802)
* Fix Potential Circular Dependency with BerryType

* remove .js
2024-06-04 19:03:02 +01:00
Tempoanon
1c73b3b084
Revert "[Feature] Add possibility to override whole user party (#1643)" (#1796)
This reverts commit ef8b6aa4f9.
2024-06-04 16:39:02 +01:00
hayuna
ef8b6aa4f9
[Feature] Add possibility to override whole user party (#1643)
* Add possibility to override whole user party

* Update species overriding

* Replace SPARTER_SPECIES_OVERRIDE with array

* Replace SPARTER_SPECIES_OVERRIDE with array

* Add possibility to override species forms

* Add possibility to override species forms

* Fix eslint styling

* Add possibility to override Abilities for party

* Override status, gender, moveset

* Add possibility to override shinies

* Fix CI
2024-06-04 11:29:38 -04:00
Matthew Olker
7ac7c2b63b fix mobile settings touch controls 2024-06-04 09:54:10 -04:00
chaosgrimmon
7da8bdfdb6
[Bug] Epic Drifblim using Drifloon sprite (#1788) 2024-06-04 09:26:03 -04:00
chaosgrimmon
38f533276f
[Bug] Lustrous Globe named Lustrous Orb (#1781)
* [Bug] Lustrous Globe, not Orb for Palkia Origin

* [Bug] Lustrous Globe named Lustrous Orb

Translation sourced from https://www.pokewiki.de/Wei%C3%9Fkristall

* [Bug] Lustrous Globe named Lustrous Orb

* [Bug] Lustrous Globe named Lustrous Orb

Prior translation appears correct, cross-referenced with https://www.wikidex.net/wiki/Gran_lustresfera

* [Bug] Lustrous Globe named Lustrous Orb

Translation sourced from https://www.pokepedia.fr/Globe_Perl%C3%A9

* [Bug] Lustrous Globe named Lustrous Orb

Translation sourced from https://wiki.pokemoncentral.it/Splendisferoide

* [Bug] Lustrous Globe named Lustrous Orb

Prior translation seems correct, cross-referenced with https://pokemon.fandom.com/ko/wiki/%ED%81%B0%EB%B0%B1%EC%98%A5

* [Bug] Lustrous Globe named Lustrous Orb

No source found. Brilhante take from canonical translation of https://bulbapedia.bulbagarden.net/wiki/Lustrous_Orb

* [Bug] Lustrous Globe named Lustrous Orb

Translation sourced from https://bulbapedia.bulbagarden.net/wiki/Lustrous_Globe

* [Bug] Lustrous Globe named Lustrous Orb

Translation sourced from https://bulbapedia.bulbagarden.net/wiki/Lustrous_Globe
2024-06-04 01:53:58 -04:00
Madmadness65
a01cb96de6 Allow Pumpkaboo & Gourgeist forms to be caught
They do not have sprite differences currently, so they won't be able to be identified at a glance, but they do have the canon stat differences between "sizes".
2024-06-04 00:33:57 -05:00
Tempoanon
c499f351d1
[Bug] Add missing snowscape TM mons (#1742) 2024-06-03 23:51:36 -05:00
returntoice
041519a78f
[Localization] #1761 Korean double trainer dialogue (#1765)
* Your commit message

* localization
2024-06-03 23:46:42 -04:00
Tempoanon
f503080167
[Bug] Curse should do at least 1 damage (#1740)
* [Bug] Curse should do at least 1 damage

* Used the wrong math function lol
2024-06-03 22:33:26 -04:00
Benjamin Odom
98cff12fd1
[QoL] Add Arena Info Flyout for Weather, Terrain, etc. (#1734)
* Initial Commit

* Add Time of Day Icons and Remove Fight UI Dependancy

* Rename to Match

* Update battle-scene.ts

* Add Settings

* Add Comments
2024-06-03 21:18:09 -05:00
MrWaterT
b9575d3ffc
[Localization] Korean Font update (#1678)
* Update PokePT_Wansung.ttf

https://github.com/MrWaterT/PokePT_Wansung v2.1

* Update PokePT_Wansung.ttf with é

https://github.com/MrWaterT/PokePT_Wansung v2.2
2024-06-03 21:59:23 -04:00
Yurical
e0fd11746f
[Localization] Use proper postpositional particle for Korean (#1759)
In Korean, postpositional particles vary depending on whether the
preceding syllable ends in a consonant or a vowel. Currently there
is no ability differentiate between the two types of particles, so both
forms are being used at the same time.
To remedy this problem, I added the relevant i18next processor to
properly select and print the correct form of the particle.
2024-06-03 21:38:52 -04:00
Matthew
69da96d543
Settings Refactor (#1771) 2024-06-03 19:57:47 -04:00
Philippe
763d2bfeeb
[Move] Implement pollen puff (#1732) 2024-06-03 16:26:15 -04:00
Xavion3
ff0e4fbdf0
Implement Pity System (#1752)
* Implement Pity System

* Add comments and optimised worst case slightly
2024-06-03 15:43:52 -04:00
sodam
145a79f8ef
[Localization] Fixed typo in Korean tutorial (#1757) 2024-06-03 11:38:37 -04:00
José Ricardo Fleury Oliveira
1abc591318
[ptBR Translations] Dialogue, game-stats and more (#1559)
* fixed translations and started dialogues

* ptBR translations

* fixes

* minor fix

* minor fixes 2

* firebreather

* minor translations

* minor translations
2024-06-03 15:30:27 +01:00
Frede
12bd22f2ca
Added "Skip Seen Dialogues" option (#1431)
* Added "Skip Dialogues" option (if at least 1 classic win)

* Removed error sound and hide option instead when classic wins = 0

* Add skip dialogues option to Unlockables and show unlocked message on first classic win

* Only skips seen dialogues, removed dialogue option from unlockables, seen dialogues get saved to local storage

* oops

* dont show charSprite when skipping a dialogue, small fixes

---------

Co-authored-by: Frederik Hobein <frederik.hobein@nterra.com>
2024-06-03 11:49:13 +01:00
GoldTra
50c1f8aee4
[Localization] ES Weather and Achievements (#1722) 2024-06-02 20:13:54 -04:00
chaosgrimmon
eddc6d73bf
[Bug] Fix undesired opaque pixels (#1719) 2024-06-02 09:41:05 -05:00
chaosgrimmon
59b1e58507
[Bug] Female variant Rhyhorn line missing .json palette [#1681] (#1718)
* [Bug] Female variant Rhyperior missing .json palette

Adds the missing variant back palette map. Taken from the male variant back.

* [Bug] Female variant Rhyperior missing .json palette

Adds the missing variant front palette map. Taken from the male variant.

* [Bug] Female variant Rhydon line missing .json palette 

Lets the game know that variants, both front and back, for Rhydon, Rhyhorn, and Rhyperior exist.

* [Bug] Female variant Rhydon, Rhyperior missing .json palette 

Adds the missing variant front palette maps. Taken from the male variants.

* [Bug] Female variant Rhydon, Rhyperior missing .json palette 

Adds the missing variant back palette maps. Taken from the male variant backs.
2024-06-02 09:40:37 -05:00
chaosgrimmon
289b42441f
[Bug] Add variant Larvesta icons (#1717)
* [Bug] Add variant Larvesta icons

The game wants them in pokemon_cons_5v.json, where they are currently not. All Solosis and Tympole_3 sprites placements adjusted for adequate spacing.

* [Bug] Add variant Larvesta icons 

Adds the icons to the spritesheet, and moves around some other icons for optimal use of space and spacing.
2024-06-02 09:39:01 -05:00
José Ricardo Fleury Oliveira
655e3ba24c
fix first voucher description (#1710) 2024-06-02 03:30:22 +01:00
damocleas
902d4df1a8
Wide Lens to Ultra item tier, Berry Count limits, and small Berry Pouch % chance reduction (#1472)
* Voucher and Wide Lens item table Changes

- Wide Lens moved from Rogue -> Ultra Tier, same weight
- Voucher moved from Ultra -> Great Tier, same weight
- Voucher Plus moved from Master -> Rogue Tier, with weight starting at 9 -> 6 and decreasing with each reroll with 3 -> 2
- Voucher Premium added to Master (based on suggestion from Madmadness) with same weight as new Voucher Plus, and disabled in Endless / Endless Spliced

* Added Berry Count limiter

2 count for Lum, Leppa, Sitrus, Enigma

3 count for all else

* fix test 1

* fix test 2

I blame browser coding for this

* fix test  3

I BLAME BROWSER CODING

* Changed Berry Pouch to 30% > 33*%, max stack 90% > 100%

* fix test 4!!!!

oops

* english.

* german.

* spanish.

* french.

* italian

* portugese.

* simplified chinese.

* traditional chinese.

* Removed voucher changes, making separate PR for them to be discussed.

* Swapped switch statement to .includes statement

* Update modifier-type.ts

* thank you cheek pouch pr
2024-06-02 03:10:58 +01:00
MrWaterT
dcbe479001
[Localization] Fix wrong sentence in ko rival dialogue (#1704) 2024-06-01 20:33:40 -04:00
José Ricardo Fleury Oliveira
c7de17a46e
Achievements localization, organized some locales files and ptBR translations (#1150)
* organizing, translations and achv localization

* localized for all languages

* minor fix

* minor fix 2

* minor fix 3

* Fixed Achivment Localization, Added german localization and fixes some issues with german localization at other parts

* fix pickup description

* Update French achv.ts

* French typo correction achv.ts

* eslint fixes

* added zhTW

* minor fix

* Achivment Bar is localized and gets bigger when using german

* Changed some things to make it not as Big

* The Achivment Bar now grows with the context

* Updated Achivment Names in german

* Update French achv.ts

* Vouchers now will show the correct descrption again

* minor fix

* minor fixes

* "sub" to "semi"

* minor fix

* fixes warning and organizes some files

* forgot about english

* korean translations

* test fix

---------

Co-authored-by: Jannik Tappert <tappertjannik@googlemail.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
2024-06-02 00:53:13 +01:00
Jannik Tappert
7ee6c979cf
Disables all unique double battles but tate and Liza. And those two will now always have lunatone and the other one (solrock?) as their first pokemon (#1654) 2024-06-02 09:15:17 +10:00
td76099
06ba63dd7d
[Bug] Liquid Ooze hurts move user instead of one with ability (#1301)
* Fixing Liquid Ooze to turn move user and not one with the ability as well as converted strength sap to use same logic instead of making it a separate class

* Replaced "undefined" with "null"

* Updated based on feedback + fix file permissions

* Fixing file permission on battler-tags

* Adding localization for drain message

* Apparently this file is 755 unlike the others

* Removed ability for custom message in exchange for getting to pass Pokemon name

* Once again changing moves from 644 to 755 like it is in repo right now :)

* putting ability back to 755 (why are file permissions all over the place)
2024-06-01 15:53:32 -04:00
InnocentGameDev
b7ecebbc6e
[Localization] Toxic and Flame Orb (en, de, es, fr, it) Localisations (only missing pt_BR, zh) (#1668)
* toxic and flame orb odds tweak and localisation

* Update modifier-type.ts

German name, but English description

* Update modifier-type.ts

Spanish done, in this regard!

* Update src/locales/fr/modifier-type.ts

French translation, thanks @Dakurei

Co-authored-by: Dakurei <maxime.palanchini@gmail.com>

* Update src/locales/fr/modifier-type.ts

French translation, thanks @Dakurei

Co-authored-by: Dakurei <maxime.palanchini@gmail.com>

* Update modifier-type.ts

Missed eliminating the "."

* Update modifier-type.ts

* Update modifier-type.ts

"it" gets proper English description, waiting on an Italian localisation

* Update modifier-type.ts

fixed the english desc.

* Update src/locales/it/modifier-type.ts

it localisation

Co-authored-by: Dakurei <maxime.palanchini@gmail.com>

* Update src/locales/it/modifier-type.ts

GoaTed translator

Co-authored-by: Dakurei <maxime.palanchini@gmail.com>

* Update modifier-type.ts

English in pt

* Update modifier-type.ts

English everywhere zzz

* Update modifier-type.ts

Final English, ready for translation by whoever sees it fit!

* Update src/locales/pt_BR/modifier-type.ts

Fixed a mixup

Co-authored-by: Dakurei <maxime.palanchini@gmail.com>

* Update src/locales/pt_BR/modifier-type.ts

Fixed a mixup

Co-authored-by: Dakurei <maxime.palanchini@gmail.com>

* Update modifier-type.ts

Added DerTapp translations without the "Ein Item zum Tragen." part for consistency throughout the file and with the rest of the locales, and according to what was briefly discussed in the Discord last night.

* Update modifier-type.ts

Missed taking out the "." in the /de, to keep it consistent with all other descriptions

* Delete src/locales/ko/modifier-type.ts

Korean localisation is already done

* Add back ko modifier-type

---------

Co-authored-by: Dakurei <maxime.palanchini@gmail.com>
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
Co-authored-by: Temps Ray <temps.ray@gmail.com>
2024-06-01 11:25:46 -04:00
Greenlamp2
060b1b2ccc
Menu - Controls Rebind - Gamepad & Keyboard (Cleaner git log) (#1666)
* squased merge rebind_menu

* azerty to qwerty

* add a check to preven a crash in firefox

* reset navigation menu on quit

* removed dual lock mekanism

* navigation display update icons on new bind

* added submit binding

* removed attribute no longer used

* change protected to abstract

* remove last bind protection since action and cancel are protected + renamed default controller to controller

* removed default alt qwerty keys in config

* fix some errors for doc

* fix tests

* fix some more errors for docs

* fix some more errors for docs final ?

* added alt bind for menu navigation + update icons on delete/home
2024-06-01 13:56:32 +01:00
returntoice
5cf9a98ee0
[Localization] Minor Korean modifications (#1665) 2024-06-01 01:27:21 -04:00
Xavion3
e7fed48f8e
[Balance] Simplify and fix flame/toxic orb weight (#1670) 2024-06-01 12:10:10 +10:00
Benjamin Odom
da771daee6
[QoL] Remove VS Code Settings (#1672)
* Remove VS Code Settings

* Update .gitignore
2024-06-01 02:26:00 +01:00
Dmitriy K
d052d444b6
[QoL] Add type inference to getAttrs methods and refactor accordingly (#1633)
* add type inference to getAttrs methods and refactor accordingly

* Tests/infer types for get attrs methods (#1)

* #1633: add spec/tests for coverage

* move ability/move tests into /src/tests and rename to *.test.ts to match common naming patterns

* use None in test cases to remove ambiguity

* revert back to before test cases were merged

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-05-31 19:50:30 -05:00
Dakurei
13c9888902
Trigger the github-pages workflow even during pull requests (#1655)
+ Allows upstream identification of problems such as those that occurred during merge of PR #1567
2024-06-01 01:30:55 +01:00
340 changed files with 54037 additions and 9022 deletions

3
.env
View File

@ -1,2 +1,3 @@
VITE_BYPASS_LOGIN=0
VITE_BYPASS_TUTORIAL=0
VITE_BYPASS_TUTORIAL=0
VITE_SERVER_URL=http://localhost:8001

View File

@ -1,2 +1,3 @@
VITE_BYPASS_LOGIN=1
VITE_BYPASS_TUTORIAL=0
VITE_BYPASS_TUTORIAL=0
VITE_SERVER_URL=http://localhost:8001

View File

@ -4,6 +4,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
pages:
@ -33,6 +36,7 @@ jobs:
node-version: 20
- name: Checkout repository for Github Pages
if: github.event_name == 'push'
uses: actions/checkout@v3
with:
path: pokerogue_gh
@ -52,6 +56,7 @@ jobs:
npx typedoc --out /tmp/docs --githubPages false --entryPoints ./src/
- name: Commit & Push docs
if: github.event_name == 'push'
run: |
cd pokerogue_gh
git config user.email "github-actions[bot]@users.noreply.github.com"

5
.gitignore vendored
View File

@ -14,8 +14,6 @@ dist-ssr
# Editor directories and files
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
.idea
.DS_Store
*.suo
@ -36,4 +34,7 @@ src/data/battle-anim-data.ts
src/overrides.ts
coverage
# Local Documentation
/typedoc

View File

@ -1,4 +0,0 @@
{
"javascript.preferences.importModuleSpecifierEnding": "minimal",
"typescript.preferences.importModuleSpecifierEnding": "minimal"
}

View File

@ -146,11 +146,13 @@ body {
margin-left: 10%;
}
#touchControls:not([data-ui-mode='STARTER_SELECT']) #apad .apadRectBtnContainer > .apadSqBtn, #touchControls:not([data-ui-mode='STARTER_SELECT']) #apad .apadSqBtnContainer > .apadSqBtn {
#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;
}
#touchControls:not([data-ui-mode='COMMAND']):not([data-ui-mode='FIGHT']):not([data-ui-mode='BALL']):not([data-ui-mode='TARGET_SELECT']) #apad .apadBattle {
#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;
}
@ -175,4 +177,70 @@ body {
input:-internal-autofill-selected {
-webkit-background-clip: text;
background-clip: text;
}
#banner {
display: none;
position: absolute;
top: 33.2%;
left: 0;
text-align: center;
z-index: 1000; /* Ensures the banner is on top of other elements */
& > img {
opacity: 50%;
}
}
/* Firefox old*/
@-moz-keyframes blink {
0% {
opacity:1;
}
50% {
opacity:0;
}
100% {
opacity:1;
}
}
@-webkit-keyframes blink {
0% {
opacity:1;
}
50% {
opacity:0;
}
100% {
opacity:1;
}
}
/* IE */
@-ms-keyframes blink {
0% {
opacity:1;
}
50% {
opacity:0;
}
100% {
opacity:1;
}
}
/* Opera and prob css3 final iteration */
@keyframes blink {
0% {
opacity:1;
}
50% {
opacity:0;
}
100% {
opacity:1;
}
}
.blink-image {
-moz-animation: blink normal 4s infinite ease-in-out; /* Firefox */
-webkit-animation: blink normal 4s infinite ease-in-out; /* Webkit */
-ms-animation: blink normal 4s infinite ease-in-out; /* IE */
animation: blink normal 4s infinite ease-in-out; /* Opera and prob css3 final iteration */
}

9
package-lock.json generated
View File

@ -12,6 +12,7 @@
"crypto-js": "^4.2.0",
"i18next": "^23.11.1",
"i18next-browser-languagedetector": "^7.2.1",
"i18next-korean-postposition-processor": "^1.0.0",
"json-stable-stringify": "^1.1.0",
"phaser": "^3.70.0",
"phaser3-rex-plugins": "^1.1.84"
@ -3615,6 +3616,14 @@
"cross-fetch": "4.0.0"
}
},
"node_modules/i18next-korean-postposition-processor": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/i18next-korean-postposition-processor/-/i18next-korean-postposition-processor-1.0.0.tgz",
"integrity": "sha512-ruNXjI9awsFK6Ie+F9gYaMW8ciLMuCkeRjH9QkSv2Wb8xI0mnm773v3M9eua8dtvAXudIUk4p6Ho7hNkEASXDg==",
"peerDependencies": {
"i18next": ">=8.4.0"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",

View File

@ -43,6 +43,7 @@
"crypto-js": "^4.2.0",
"i18next": "^23.11.1",
"i18next-browser-languagedetector": "^7.2.1",
"i18next-korean-postposition-processor": "^1.0.0",
"json-stable-stringify": "^1.1.0",
"phaser": "^3.70.0",
"phaser3-rex-plugins": "^1.1.84"

Binary file not shown.

View File

@ -0,0 +1,148 @@
{"frames": [
{
"filename": "CIRCLE.png",
"frame": {"x":0,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "CROSS.png",
"frame": {"x":12,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "DOWN.png",
"frame": {"x":24,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "L1.png",
"frame": {"x":36,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "L2.png",
"frame": {"x":48,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "L3.png",
"frame": {"x":60,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "LEFT.png",
"frame": {"x":72,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "R1.png",
"frame": {"x":84,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "R2.png",
"frame": {"x":96,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "R3.png",
"frame": {"x":108,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "RIGHT.png",
"frame": {"x":120,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "SELECT.png",
"frame": {"x":132,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "SQUARE.png",
"frame": {"x":144,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "START.png",
"frame": {"x":156,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "TOUCH.png",
"frame": {"x":168,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "TRIANGLE.png",
"frame": {"x":180,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "UP.png",
"frame": {"x":192,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
}],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "1.0",
"image": "dualshock.png",
"format": "RGBA8888",
"size": {"w":204,"h":12},
"scale": "1",
"smartupdate": "$TexturePacker:SmartUpdate:47df68ade4299adf7d334f25cb833ece:039b9ac469e3616fb9635a6a19cca50e:adc25708364be3d9e70074e95305c745$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,596 @@
{"frames": [
{
"filename": "0.png",
"frame": {"x":0,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "1.png",
"frame": {"x":12,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "2.png",
"frame": {"x":24,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "3.png",
"frame": {"x":36,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "4.png",
"frame": {"x":48,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "5.png",
"frame": {"x":60,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "6.png",
"frame": {"x":72,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "7.png",
"frame": {"x":84,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "8.png",
"frame": {"x":96,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "9.png",
"frame": {"x":108,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "A.png",
"frame": {"x":120,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "ALT.png",
"frame": {"x":132,"y":0,"w":16,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":16,"h":12},
"sourceSize": {"w":16,"h":12}
},
{
"filename": "B.png",
"frame": {"x":148,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "BACK.png",
"frame": {"x":160,"y":0,"w":24,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":24,"h":12},
"sourceSize": {"w":24,"h":12}
},
{
"filename": "C.png",
"frame": {"x":184,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "CTRL.png",
"frame": {"x":196,"y":0,"w":22,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":22,"h":12},
"sourceSize": {"w":22,"h":12}
},
{
"filename": "D.png",
"frame": {"x":218,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "DEL.png",
"frame": {"x":230,"y":0,"w":17,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":17,"h":12},
"sourceSize": {"w":17,"h":12}
},
{
"filename": "E.png",
"frame": {"x":247,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "END.png",
"frame": {"x":259,"y":0,"w":18,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":18,"h":12},
"sourceSize": {"w":18,"h":12}
},
{
"filename": "ENTER.png",
"frame": {"x":277,"y":0,"w":27,"h":11},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":27,"h":11},
"sourceSize": {"w":27,"h":11}
},
{
"filename": "ESC.png",
"frame": {"x":304,"y":0,"w":17,"h":11},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":17,"h":11},
"sourceSize": {"w":17,"h":11}
},
{
"filename": "F.png",
"frame": {"x":321,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "F1.png",
"frame": {"x":333,"y":0,"w":13,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":13,"h":12},
"sourceSize": {"w":13,"h":12}
},
{
"filename": "F2.png",
"frame": {"x":346,"y":0,"w":13,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":13,"h":12},
"sourceSize": {"w":13,"h":12}
},
{
"filename": "F3.png",
"frame": {"x":359,"y":0,"w":13,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":13,"h":12},
"sourceSize": {"w":13,"h":12}
},
{
"filename": "F4.png",
"frame": {"x":372,"y":0,"w":13,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":13,"h":12},
"sourceSize": {"w":13,"h":12}
},
{
"filename": "F5.png",
"frame": {"x":385,"y":0,"w":13,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":13,"h":12},
"sourceSize": {"w":13,"h":12}
},
{
"filename": "F6.png",
"frame": {"x":398,"y":0,"w":13,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":13,"h":12},
"sourceSize": {"w":13,"h":12}
},
{
"filename": "F7.png",
"frame": {"x":411,"y":0,"w":13,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":13,"h":12},
"sourceSize": {"w":13,"h":12}
},
{
"filename": "F8.png",
"frame": {"x":424,"y":0,"w":13,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":13,"h":12},
"sourceSize": {"w":13,"h":12}
},
{
"filename": "F9.png",
"frame": {"x":437,"y":0,"w":13,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":13,"h":12},
"sourceSize": {"w":13,"h":12}
},
{
"filename": "F10.png",
"frame": {"x":450,"y":0,"w":16,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":16,"h":12},
"sourceSize": {"w":16,"h":12}
},
{
"filename": "F11.png",
"frame": {"x":466,"y":0,"w":15,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":15,"h":12},
"sourceSize": {"w":15,"h":12}
},
{
"filename": "F12.png",
"frame": {"x":481,"y":0,"w":16,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":16,"h":12},
"sourceSize": {"w":16,"h":12}
},
{
"filename": "G.png",
"frame": {"x":497,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "H.png",
"frame": {"x":509,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "HOME.png",
"frame": {"x":521,"y":0,"w":23,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":23,"h":12},
"sourceSize": {"w":23,"h":12}
},
{
"filename": "I.png",
"frame": {"x":544,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "INS.png",
"frame": {"x":556,"y":0,"w":16,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":16,"h":12},
"sourceSize": {"w":16,"h":12}
},
{
"filename": "J.png",
"frame": {"x":572,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "K.png",
"frame": {"x":584,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "KEY_ARROW_DOWN.png",
"frame": {"x":596,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "KEY_ARROW_LEFT.png",
"frame": {"x":608,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "KEY_ARROW_RIGHT.png",
"frame": {"x":620,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "KEY_ARROW_UP.png",
"frame": {"x":632,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "L.png",
"frame": {"x":644,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "LEFT_BRACKET.png",
"frame": {"x":656,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "M.png",
"frame": {"x":668,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "MINUS.png",
"frame": {"x":680,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "N.png",
"frame": {"x":692,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "O.png",
"frame": {"x":704,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "P.png",
"frame": {"x":716,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "PAGE_DOWN.png",
"frame": {"x":728,"y":0,"w":20,"h":11},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":20,"h":11},
"sourceSize": {"w":20,"h":11}
},
{
"filename": "PAGE_UP.png",
"frame": {"x":748,"y":0,"w":20,"h":11},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":20,"h":11},
"sourceSize": {"w":20,"h":11}
},
{
"filename": "PLUS.png",
"frame": {"x":768,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "Q.png",
"frame": {"x":780,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "QUOTE.png",
"frame": {"x":792,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "R.png",
"frame": {"x":804,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "RIGHT_BRACKET.png",
"frame": {"x":816,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "S.png",
"frame": {"x":828,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "SEMICOLON.png",
"frame": {"x":840,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "SHIFT.png",
"frame": {"x":852,"y":0,"w":23,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":23,"h":12},
"sourceSize": {"w":23,"h":12}
},
{
"filename": "SPACE.png",
"frame": {"x":875,"y":0,"w":25,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":25,"h":12},
"sourceSize": {"w":25,"h":12}
},
{
"filename": "T.png",
"frame": {"x":900,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "TAB.png",
"frame": {"x":912,"y":0,"w":19,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":19,"h":12},
"sourceSize": {"w":19,"h":12}
},
{
"filename": "TILDE.png",
"frame": {"x":931,"y":0,"w":15,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":15,"h":12},
"sourceSize": {"w":15,"h":12}
},
{
"filename": "U.png",
"frame": {"x":946,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "V.png",
"frame": {"x":958,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "W.png",
"frame": {"x":970,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "X.png",
"frame": {"x":982,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "Y.png",
"frame": {"x":994,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "Z.png",
"frame": {"x":1006,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
}],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "1.0",
"image": "keyboard.png",
"format": "RGBA8888",
"size": {"w":1018,"h":12},
"scale": "1",
"smartupdate": "$TexturePacker:SmartUpdate:085d4353a5c4d18c90f82f8926710d72:45908b22b446cf7f4904d4e0b658b16a:bad03abb89ad027d879c383c13fd51bc$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,140 @@
{"frames": [
{
"filename": "Bumper_L.png",
"frame": {"x":0,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "Bumper_R.png",
"frame": {"x":12,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "DOWN.png",
"frame": {"x":24,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "LEFT.png",
"frame": {"x":36,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "LS.png",
"frame": {"x":48,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "RIGHT.png",
"frame": {"x":60,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "RS.png",
"frame": {"x":72,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "SELECT.png",
"frame": {"x":84,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "START.png",
"frame": {"x":96,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "Trigger_L.png",
"frame": {"x":108,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "Trigger_R.png",
"frame": {"x":120,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "UP.png",
"frame": {"x":132,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "XB_Letter_A_OL.png",
"frame": {"x":144,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "XB_Letter_B_OL.png",
"frame": {"x":156,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "XB_Letter_X_OL.png",
"frame": {"x":168,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
},
{
"filename": "XB_Letter_Y_OL.png",
"frame": {"x":180,"y":0,"w":12,"h":12},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},
"sourceSize": {"w":12,"h":12}
}],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "1.0",
"image": "xbox.png",
"format": "RGBA8888",
"size": {"w":192,"h":12},
"scale": "1",
"smartupdate": "$TexturePacker:SmartUpdate:dda9e220b2ea223723253388c465ea25:8ab4a5ecdc22848a8718a1285590a78c:7ad6008cd8fa3f9f4bfb17e0cfcbbb64$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -2750,6 +2750,16 @@
1,
1
],
"111": [
0,
1,
1
],
"112": [
0,
1,
1
],
"118": [
0,
1,
@ -2835,6 +2845,11 @@
1,
1
],
"464": [
0,
1,
1
],
"592": [
1,
1,
@ -4050,7 +4065,7 @@
"426": [
0,
1,
2
1
],
"427": [
0,
@ -5598,6 +5613,16 @@
1,
1
],
"111": [
0,
1,
1
],
"112": [
0,
1,
1
],
"118": [
0,
1,
@ -5683,6 +5708,11 @@
1,
1
],
"464": [
0,
1,
1
],
"592": [
1,
1,
@ -7650,4 +7680,4 @@
]
}
}
}
}

View File

@ -0,0 +1,22 @@
{
"1": {
"5a5a7b": "261e2d",
"bdbdce": "6a547a",
"8484ad": "402f51",
"3a3a52": "261e2d",
"101010": "101010",
"e6e6ef": "9781ab",
"ffffff": "ffffff",
"ad3a29": "ad3a29"
},
"2": {
"5a5a7b": "ab4355",
"bdbdce": "e18db3",
"8484ad": "d76688",
"3a3a52": "6d2935",
"101010": "101010",
"e6e6ef": "f7b4d1",
"ffffff": "ffffff",
"ad3a29": "ad3a29"
}
}

View File

@ -0,0 +1,26 @@
{
"1": {
"52525a": "3c2945",
"c5c5bd": "6a547a",
"8c8c94": "523c5c",
"101010": "101010",
"e6e6de": "9781ab",
"735a31": "6b6373",
"e6d6ad": "cecede",
"b5a573": "948cad",
"ffffff": "ffffff",
"e6523a": "e6523a"
},
"2": {
"52525a": "642224",
"c5c5bd": "cb568a",
"8c8c94": "ab3f5c",
"101010": "101010",
"e6e6de": "ef86b5",
"735a31": "6d586d",
"e6d6ad": "dacad3",
"b5a573": "be9bb6",
"ffffff": "ffffff",
"e6523a": "e6523a"
}
}

View File

@ -0,0 +1,34 @@
{
"1": {
"523100": "3b1f58",
"bd4200": "60418a",
"ef5200": "6f4d9f",
"29293a": "1f1028",
"3a3a4a": "3b2d40",
"101010": "101010",
"7b6b7b": "6e5d7b",
"6b6373": "6b6373",
"cecede": "cecede",
"efefff": "efefff",
"5a4a63": "514259",
"948cad": "948cad",
"943a00": "4c2f6e",
"ad2900": "ad2900"
},
"2": {
"523100": "492133",
"bd4200": "7d445c",
"ef5200": "6d3950",
"29293a": "442339",
"3a3a4a": "701f38",
"101010": "101010",
"7b6b7b": "c6405b",
"6b6373": "b66360",
"cecede": "e8a797",
"efefff": "ffdfd1",
"5a4a63": "8f2c41",
"948cad": "d98f87",
"943a00": "5b2e42",
"ad2900": "6c7c00"
}
}

View File

@ -0,0 +1,22 @@
{
"1": {
"5a5a7b": "241e2f",
"101010": "101010",
"bdbdce": "6a547a",
"e6e6ef": "9781ab",
"8484ad": "402f51",
"3a3a52": "261e2d",
"ffffff": "ffffff",
"ad3a29": "ad3a29"
},
"2": {
"5a5a7b": "ab4355",
"101010": "101010",
"bdbdce": "e18db3",
"e6e6ef": "f7b4d1",
"8484ad": "d76688",
"3a3a52": "6d2935",
"ffffff": "ffffff",
"ad3a29": "ad3a29"
}
}

View File

@ -0,0 +1,32 @@
{
"1": {
"8c8c94": "523c5c",
"101010": "101010",
"c5c5bd": "6a547a",
"52525a": "3c2945",
"e6e6de": "9781ab",
"735a31": "6b6373",
"ffefc5": "cecede",
"b5a573": "948cad",
"ffffff": "ffffff",
"a53110": "a53110",
"e6523a": "e6523a",
"e6d6ad": "cecede",
"732110": "732110"
},
"2": {
"8c8c94": "ab3f5c",
"101010": "101010",
"c5c5bd": "cb568a",
"52525a": "642224",
"e6e6de": "ef86b5",
"735a31": "6d586d",
"ffefc5": "dacad3",
"b5a573": "be9bb6",
"ffffff": "ffffff",
"a53110": "a53110",
"e6523a": "e6523a",
"e6d6ad": "dacad3",
"732110": "732110"
}
}

View File

@ -0,0 +1,34 @@
{
"1": {
"6b6373": "6b6373",
"3a3a4a": "3b2d40",
"5a4a63": "514259",
"101010": "101010",
"efefff": "efefff",
"29293a": "1f1028",
"523100": "3b1f58",
"7b6b7b": "6e5d7b",
"948cad": "948cad",
"943a00": "4c2f6e",
"ef5200": "6f4d9f",
"cecede": "cecede",
"ad2900": "ad2900",
"bd4200": "60418a"
},
"2": {
"6b6373": "b66360",
"3a3a4a": "701f38",
"5a4a63": "8f2c41",
"101010": "101010",
"efefff": "ffdfd1",
"29293a": "442339",
"523100": "492133",
"7b6b7b": "c6405b",
"948cad": "d98f87",
"943a00": "5b2e42",
"ef5200": "7d445c",
"cecede": "e8a797",
"ad2900": "6c7c00",
"bd4200": "6d3950"
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -3258,8 +3258,8 @@
"h": 16
},
"frame": {
"x": 205,
"y": 268,
"x": 270,
"y": 272,
"w": 17,
"h": 16
}
@ -3279,8 +3279,8 @@
"h": 16
},
"frame": {
"x": 222,
"y": 259,
"x": 270,
"y": 288,
"w": 17,
"h": 16
}
@ -3300,8 +3300,8 @@
"h": 16
},
"frame": {
"x": 239,
"y": 268,
"x": 287,
"y": 288,
"w": 17,
"h": 16
}
@ -3321,11 +3321,53 @@
"h": 13
},
"frame": {
"x": 256,
"x": 254,
"y": 271,
"w": 16,
"h": 13
}
},
{
"filename": "636_2",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 40,
"h": 30
},
"spriteSourceSize": {
"x": 9,
"y": 8,
"w": 22,
"h": 21
},
"frame": {
"x": 195,
"y": 261,
"w": 22,
"h": 21
}
},
{
"filename": "636_3",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 40,
"h": 30
},
"spriteSourceSize": {
"x": 9,
"y": 8,
"w": 22,
"h": 21
},
"frame": {
"x": 217,
"y": 263,
"w": 22,
"h": 21
}
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -0,0 +1,41 @@
{
"textures": [
{
"image": "sailor.png",
"format": "RGBA8888",
"size": {
"w": 72,
"h": 72
},
"scale": 1,
"frames": [
{
"filename": "0001.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 72,
"h": 72
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 73,
"h": 73
},
"frame": {
"x": 0,
"y": 0,
"w": 39,
"h": 72
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:f692676a166fc1915532cd94d5799af4:fb833f76fb6797474657726bb59a7eee:aeb55e30992938f494b6cd2420158dda$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,4 +1,5 @@
import Move from "./data/move";
import { BerryModifier } from "./modifier/modifier";
/** Alias for all {@linkcode BattleScene} events */
export enum BattleSceneEventType {
@ -13,6 +14,17 @@ export enum BattleSceneEventType {
* @see {@linkcode MoveUsedEvent}
*/
MOVE_USED = "onMoveUsed",
/**
* Triggers when a berry gets successfully used
* @see {@linkcode BerryUsedEvent}
*/
BERRY_USED = "onBerryUsed",
/**
* Triggers at the start of each new encounter
* @see {@linkcode EncounterPhaseEvent}
*/
ENCOUNTER_PHASE = "onEncounterPhase",
/**
* Triggers on the first turn of a new battle
* @see {@linkcode TurnInitEvent}
@ -23,6 +35,7 @@ export enum BattleSceneEventType {
* @see {@linkcode TurnEndEvent}
*/
TURN_END = "onTurnEnd",
/**
* Triggers when a new {@linkcode Arena} is created during initialization
* @see {@linkcode NewArenaEvent}
@ -50,7 +63,7 @@ export class CandyUpgradeNotificationChangedEvent extends Event {
*/
export class MoveUsedEvent extends Event {
/** The ID of the {@linkcode Pokemon} that used the {@linkcode Move} */
public userId: number;
public pokemonId: number;
/** The {@linkcode Move} used */
public move: Move;
/** The amount of PP used on the {@linkcode Move} this turn */
@ -58,11 +71,34 @@ export class MoveUsedEvent extends Event {
constructor(userId: number, move: Move, ppUsed: number) {
super(BattleSceneEventType.MOVE_USED);
this.userId = userId;
this.pokemonId = userId;
this.move = move;
this.ppUsed = ppUsed;
}
}
/**
* Container class for {@linkcode BattleSceneEventType.BERRY_USED} events
* @extends Event
*/
export class BerryUsedEvent extends Event {
/** The {@linkcode BerryModifier} being used */
public berryModifier: BerryModifier;
constructor(berry: BerryModifier) {
super(BattleSceneEventType.BERRY_USED);
this.berryModifier = berry;
}
}
/**
* Container class for {@linkcode BattleSceneEventType.ENCOUNTER_PHASE} events
* @extends Event
*/
export class EncounterPhaseEvent extends Event {
constructor() {
super(BattleSceneEventType.ENCOUNTER_PHASE);
}
}
/**
* Container class for {@linkcode BattleSceneEventType.TURN_INIT} events
* @extends Event

View File

@ -1,5 +1,5 @@
import Phaser from "phaser";
import UI from "./ui/ui";
import UI from "./ui/ui";
import { NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, TurnInitPhase, ReturnPhase, LevelCapPhase, ShowTrainerPhase, LoginPhase, MovePhase, TitlePhase, SwitchPhase } from "./phases";
import Pokemon, { PlayerPokemon, EnemyPokemon } from "./field/pokemon";
import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies } from "./data/pokemon-species";
@ -11,8 +11,9 @@ import { Phase } from "./phase";
import { initGameSpeed } from "./system/game-speed";
import { Biome } from "./data/enums/biome";
import { Arena, ArenaBase } from "./field/arena";
import { GameData, PlayerGender } from "./system/game-data";
import { TextStyle, addTextObject } from "./ui/text";
import { GameData } from "./system/game-data";
import { PlayerGender } from "./data/enums/player-gender";
import { TextStyle, addTextObject, getTextColor } from "./ui/text";
import { Moves } from "./data/enums/moves";
import { allMoves } from "./data/move";
import { ModifierPoolType, getDefaultModifierTypeForTier, getEnemyModifierTypesForWave, getLuckString, getLuckTextTint, getModifierPoolForType, getPartyLuckValue } from "./modifier/modifier-type";
@ -58,6 +59,10 @@ import {InputsController} from "./inputs-controller";
import {UiInputs} from "./ui-inputs";
import { MoneyFormat } from "./enums/money-format";
import { NewArenaEvent } from "./battle-scene-events";
import { Abilities } from "./data/enums/abilities";
import ArenaFlyout from "./ui/arena-flyout";
import { EaseType } from "./ui/enums/ease-type";
import { ExpNotification } from "./enums/exp-notification";
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
@ -69,15 +74,20 @@ const expSpriteKeys: string[] = [];
export let starterColors: StarterColors;
interface StarterColors {
[key: string]: [string, string]
[key: string]: [string, string]
}
export interface PokeballCounts {
[pb: string]: integer;
[pb: string]: integer;
}
export type AnySound = Phaser.Sound.WebAudioSound | Phaser.Sound.HTML5AudioSound | Phaser.Sound.NoAudioSound;
export interface InfoToggle {
toggleInfo(force?: boolean): void;
isActive(): boolean;
}
export default class BattleScene extends SceneBase {
public rexUI: UIPlugin;
public inputController: InputsController;
@ -92,8 +102,12 @@ export default class BattleScene extends SceneBase {
public damageNumbersMode: integer = 0;
public reroll: boolean = false;
public showMovesetFlyout: boolean = true;
public showArenaFlyout: boolean = true;
public showTimeOfDayWidget: boolean = true;
public timeOfDayAnimation: EaseType = EaseType.NONE;
public showLevelUpStats: boolean = true;
public enableTutorials: boolean = import.meta.env.VITE_BYPASS_TUTORIAL === "1";
public enableMoveInfo: boolean = true;
public enableRetries: boolean = false;
/**
* Determines the condition for a notification should be shown for Candy Upgrades
@ -114,32 +128,38 @@ export default class BattleScene extends SceneBase {
public experimentalSprites: boolean = false;
public moveAnimations: boolean = true;
public expGainsSpeed: integer = 0;
public skipSeenDialogues: boolean = false;
/**
* Defines the experience gain display mode.
*
* @remarks
* The `expParty` can have several modes:
* - `0` - Default: The normal experience gain display, nothing changed.
* - `1` - Level Up Notification: Displays the level up in the small frame instead of a message.
* - `2` - Skip: No level up frame nor message.
*
* Modes `1` and `2` are still compatible with stats display, level up, new move, etc.
* @default 0 - Uses the default normal experience gain display.
*/
public expParty: integer = 0;
* Defines the experience gain display mode.
*
* @remarks
* The `expParty` can have several modes:
* - `0` - Default: The normal experience gain display, nothing changed.
* - `1` - Level Up Notification: Displays the level up in the small frame instead of a message.
* - `2` - Skip: No level up frame nor message.
*
* Modes `1` and `2` are still compatible with stats display, level up, new move, etc.
* @default 0 - Uses the default normal experience gain display.
*/
public expParty: ExpNotification = 0;
public hpBarSpeed: integer = 0;
public fusionPaletteSwaps: boolean = true;
public enableTouchControls: boolean = false;
public enableVibration: boolean = false;
public gamepadSupport: boolean = false;
public abSwapped: boolean = false;
/**
* Determines the selected battle style.
* - 0 = 'Shift'
* - 1 = 'Set' - The option to switch the active pokemon at the start of a battle will not display.
*/
public battleStyle: integer = 0;
public disableMenu: boolean = false;
public gameData: GameData;
public sessionSlotId: integer;
private phaseQueue: Phase[];
public phaseQueue: Phase[];
private phaseQueuePrepend: Phase[];
private phaseQueuePrependSpliceIndex: integer;
private nextCommandPhaseQueue: Phase[];
@ -178,8 +198,10 @@ export default class BattleScene extends SceneBase {
private luckText: Phaser.GameObjects.Text;
private modifierBar: ModifierBar;
private enemyModifierBar: ModifierBar;
public arenaFlyout: ArenaFlyout;
private fieldOverlay: Phaser.GameObjects.Rectangle;
private modifiers: PersistentModifier[];
public modifiers: PersistentModifier[];
private enemyModifiers: PersistentModifier[];
public uiContainer: Phaser.GameObjects.Container;
public ui: UI;
@ -204,6 +226,8 @@ export default class BattleScene extends SceneBase {
public rngSeedOverride: string = "";
public rngOffset: integer = 0;
private infoToggles: InfoToggle[] = [];
/**
* Allows subscribers to listen for events
*
@ -276,7 +300,8 @@ export default class BattleScene extends SceneBase {
this.fieldSpritePipeline = new FieldSpritePipeline(this.game);
(this.renderer as Phaser.Renderer.WebGL.WebGLRenderer).pipelines.add("FieldSprite", this.fieldSpritePipeline);
this.time.delayedCall(20, () => this.launchBattle());
this.launchBattle();
}
update() {
@ -297,6 +322,7 @@ export default class BattleScene extends SceneBase {
const field = this.add.container(0, 0);
field.setScale(6);
field.setName("container-field");
this.field = field;
@ -386,31 +412,35 @@ export default class BattleScene extends SceneBase {
this.biomeWaveText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, startingWave.toString(), TextStyle.BATTLE_INFO);
this.biomeWaveText.setName("text-biome-wave");
this.biomeWaveText.setOrigin(1, 0);
this.biomeWaveText.setOrigin(1, 0.5);
this.fieldUI.add(this.biomeWaveText);
this.moneyText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, "", TextStyle.MONEY);
this.moneyText.setName("text-money");
this.moneyText.setOrigin(1, 0);
this.moneyText.setOrigin(1, 0.5);
this.fieldUI.add(this.moneyText);
this.scoreText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, "", TextStyle.PARTY, { fontSize: "54px" });
this.scoreText.setName("text-score");
this.scoreText.setOrigin(1, 0);
this.scoreText.setOrigin(1, 0.5);
this.fieldUI.add(this.scoreText);
this.luckText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, "", TextStyle.PARTY, { fontSize: "54px" });
this.luckText.setName("text-luck");
this.luckText.setOrigin(1, 0);
this.luckText.setOrigin(1, 0.5);
this.luckText.setVisible(false);
this.fieldUI.add(this.luckText);
this.luckLabelText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, "Luck:", TextStyle.PARTY, { fontSize: "54px" });
this.luckLabelText.setName("text-luck-label");
this.luckLabelText.setOrigin(1, 0);
this.luckLabelText.setOrigin(1, 0.5);
this.luckLabelText.setVisible(false);
this.fieldUI.add(this.luckLabelText);
this.arenaFlyout = new ArenaFlyout(this);
this.fieldUI.add(this.arenaFlyout);
this.fieldUI.moveBelow<Phaser.GameObjects.GameObject>(this.arenaFlyout, this.fieldOverlay);
this.updateUIPositions();
this.damageNumberHandler = new DamageNumberHandler();
@ -428,9 +458,13 @@ export default class BattleScene extends SceneBase {
const loadPokemonAssets = [];
this.arenaPlayer = new ArenaBase(this, true);
this.arenaPlayer.setName("container-arena-player");
this.arenaPlayerTransition = new ArenaBase(this, true);
this.arenaPlayerTransition.setName("container-arena-player-transition");
this.arenaEnemy = new ArenaBase(this, false);
this.arenaEnemy.setName("container-arena-enemy");
this.arenaNextEnemy = new ArenaBase(this, false);
this.arenaNextEnemy.setName("container-arena-next-enemy");
this.arenaBgTransition.setVisible(false);
this.arenaPlayerTransition.setVisible(false);
@ -445,6 +479,7 @@ export default class BattleScene extends SceneBase {
const trainer = this.addFieldSprite(0, 0, `trainer_${this.gameData.gender === PlayerGender.FEMALE ? "f" : "m"}_back`);
trainer.setOrigin(0.5, 1);
trainer.setName("sprite-trainer");
field.add(trainer);
@ -506,7 +541,7 @@ export default class BattleScene extends SceneBase {
this.playTimeTimer = this.time.addEvent({
delay: Utils.fixedInt(1000),
repeat: -1,
callback: () => {
callback: () => {
if (this.gameData) {
this.gameData.gameStats.playTime++;
}
@ -590,25 +625,25 @@ export default class BattleScene extends SceneBase {
/*const loadPokemonAssets: Promise<void>[] = [];
for (let s of Object.keys(speciesStarters)) {
const species = getPokemonSpecies(parseInt(s));
loadPokemonAssets.push(species.loadAssets(this, false, 0, false));
}
for (let s of Object.keys(speciesStarters)) {
const species = getPokemonSpecies(parseInt(s));
loadPokemonAssets.push(species.loadAssets(this, false, 0, false));
}
Promise.all(loadPokemonAssets).then(() => {
const starterCandyColors = {};
const rgbaToHexFunc = (r, g, b) => [r, g, b].map(x => x.toString(16).padStart(2, '0')).join('');
Promise.all(loadPokemonAssets).then(() => {
const starterCandyColors = {};
const rgbaToHexFunc = (r, g, b) => [r, g, b].map(x => x.toString(16).padStart(2, '0')).join('');
for (let s of Object.keys(speciesStarters)) {
const species = getPokemonSpecies(parseInt(s));
for (let s of Object.keys(speciesStarters)) {
const species = getPokemonSpecies(parseInt(s));
starterCandyColors[species.speciesId] = species.generateCandyColors(this).map(c => rgbaToHexFunc(c[0], c[1], c[2]));
}
starterCandyColors[species.speciesId] = species.generateCandyColors(this).map(c => rgbaToHexFunc(c[0], c[1], c[2]));
}
console.log(JSON.stringify(starterCandyColors));
console.log(JSON.stringify(starterCandyColors));
resolve();
});*/
resolve();
});*/
resolve();
});
@ -673,6 +708,16 @@ export default class BattleScene extends SceneBase {
: ret;
}
// store info toggles to be accessible by the ui
addInfoToggle(infoToggle: InfoToggle): void {
this.infoToggles.push(infoToggle);
}
// return the stored info toggles; used by ui-inputs
getInfoToggles(activeOnly: boolean = false): InfoToggle[] {
return activeOnly ? this.infoToggles.filter(t => t?.isActive()) : this.infoToggles;
}
getPokemonById(pokemonId: integer): Pokemon {
const findInParty = (party: Pokemon[]) => party.find(p => p.id === pokemonId);
return findInParty(this.getParty()) || findInParty(this.getEnemyParty());
@ -719,7 +764,7 @@ export default class BattleScene extends SceneBase {
const container = this.add.container(x, y);
const icon = this.add.sprite(0, 0, pokemon.getIconAtlasKey(ignoreOverride));
icon.setFrame(pokemon.getIconId(true));
icon.setFrame(pokemon.getIconId(true));
// Temporary fix to show pokemon's default icon if variant icon doesn't exist
if (icon.frame.name !== pokemon.getIconId(true)) {
console.log(`${pokemon.name}'s variant icon does not exist. Replacing with default.`);
@ -903,7 +948,8 @@ export default class BattleScene extends SceneBase {
}
newBattle(waveIndex?: integer, battleType?: BattleType, trainerData?: TrainerData, double?: boolean): Battle {
const newWaveIndex = waveIndex || ((this.currentBattle?.waveIndex || (startingWave - 1)) + 1);
const _startingWave = Overrides.STARTING_WAVE_OVERRIDE || startingWave;
const newWaveIndex = waveIndex || ((this.currentBattle?.waveIndex || (_startingWave - 1)) + 1);
let newDouble: boolean;
let newBattleType: BattleType;
let newTrainer: Trainer;
@ -963,6 +1009,9 @@ export default class BattleScene extends SceneBase {
if (Overrides.DOUBLE_BATTLE_OVERRIDE) {
newDouble = true;
}
if (Overrides.SINGLE_BATTLE_OVERRIDE) {
newDouble = false;
}
const lastBattle = this.currentBattle;
@ -1012,6 +1061,12 @@ export default class BattleScene extends SceneBase {
if (resetArenaState) {
this.arena.removeAllTags();
playerField.forEach((_, p) => this.unshiftPhase(new ReturnPhase(this, p)));
for (const pokemon of this.getParty()) {
if (pokemon.hasAbility(Abilities.ICE_FACE)) {
pokemon.formIndex = 0;
}
}
this.unshiftPhase(new ShowTrainerPhase(this));
}
for (const pokemon of this.getParty()) {
@ -1103,6 +1158,8 @@ export default class BattleScene extends SceneBase {
case Species.FLOETTE:
case Species.FLORGES:
case Species.FURFROU:
case Species.PUMPKABOO:
case Species.GOURGEIST:
case Species.ORICORIO:
case Species.MAGEARNA:
case Species.ZARUDE:
@ -1272,6 +1329,13 @@ export default class BattleScene extends SceneBase {
return sprite;
}
moveBelowOverlay<T extends Phaser.GameObjects.GameObject>(gameObject: T) {
this.fieldUI.moveBelow<any>(gameObject, this.fieldOverlay);
}
processInfoButton(pressed: boolean): void {
this.arenaFlyout.toggleFlyout(pressed);
}
showFieldOverlay(duration: integer): Promise<void> {
return new Promise(resolve => {
this.tweens.add({
@ -1296,6 +1360,14 @@ export default class BattleScene extends SceneBase {
});
}
showEnemyModifierBar(): void {
this.enemyModifierBar.setVisible(true);
}
hideEnemyModifierBar(): void {
this.enemyModifierBar.setVisible(false);
}
updateBiomeWaveText(): void {
const isBoss = !(this.currentBattle.waveIndex % 10);
const biomeString: string = getBiomeName(this.arena.biomeType);
@ -1310,7 +1382,7 @@ export default class BattleScene extends SceneBase {
return;
}
const formattedMoney =
this.moneyFormat === MoneyFormat.ABBREVIATED ? Utils.formatFancyLargeNumber(this.money, 3) : this.money.toLocaleString();
this.moneyFormat === MoneyFormat.ABBREVIATED ? Utils.formatFancyLargeNumber(this.money, 3) : this.money.toLocaleString();
this.moneyText.setText(`${formattedMoney}`);
this.fieldUI.moveAbove(this.moneyText, this.luckText);
if (forceVisible) {
@ -1318,6 +1390,22 @@ export default class BattleScene extends SceneBase {
}
}
animateMoneyChanged(positiveChange: boolean): void {
if (this.tweens.getTweensOf(this.moneyText).length > 0) {
return;
}
const deltaScale = this.moneyText.scale * 0.14 * (positiveChange ? 1 : -1);
this.moneyText.setShadowColor(positiveChange ? "#008000" : "#FF0000");
this.tweens.add({
targets: this.moneyText,
duration: 250,
scale: this.moneyText.scale + deltaScale,
loop: 0,
yoyo: true,
onComplete: (_) => this.moneyText.setShadowColor(getTextColor(TextStyle.MONEY, true)),
});
}
updateScoreText(): void {
this.scoreText.setText(`Score: ${this.score.toString()}`);
this.scoreText.setVisible(this.gameMode.isDaily);
@ -1361,7 +1449,10 @@ export default class BattleScene extends SceneBase {
updateUIPositions(): void {
const enemyModifierCount = this.enemyModifiers.filter(m => m.isIconVisible(this)).length;
this.biomeWaveText.setY(-(this.game.canvas.height / 6) + (enemyModifierCount ? enemyModifierCount <= 12 ? 15 : 24 : 0));
const biomeWaveTextHeight = this.biomeWaveText.getBottomLeft().y - this.biomeWaveText.getTopLeft().y;
this.biomeWaveText.setY(
-(this.game.canvas.height / 6) + (enemyModifierCount ? enemyModifierCount <= 12 ? 15 : 24 : 0) + (biomeWaveTextHeight / 2)
);
this.moneyText.setY(this.biomeWaveText.y + 10);
this.scoreText.setY(this.moneyText.y + 10);
[ this.luckLabelText, this.luckText ].map(l => l.setY((this.scoreText.visible ? this.scoreText : this.moneyText).y + 10));
@ -1401,7 +1492,7 @@ export default class BattleScene extends SceneBase {
randomSpecies(waveIndex: integer, level: integer, fromArenaPool?: boolean, speciesFilter?: PokemonSpeciesFilter, filterAllEvolutions?: boolean): PokemonSpecies {
if (fromArenaPool) {
return this.arena.randomSpecies(waveIndex, level);
return this.arena.randomSpecies(waveIndex, level,null , getPartyLuckValue(this.party));
}
const filteredSpecies = speciesFilter ? [...new Set(allSpecies.filter(s => s.isCatchable()).filter(speciesFilter).map(s => {
if (!filterAllEvolutions) {
@ -1763,6 +1854,7 @@ export default class BattleScene extends SceneBase {
addMoney(amount: integer): void {
this.money = Math.min(this.money + amount, Number.MAX_SAFE_INTEGER);
this.updateMoneyText();
this.animateMoneyChanged(true);
this.validateAchvs(MoneyAchv);
}
@ -1900,7 +1992,7 @@ export default class BattleScene extends SceneBase {
const newItemModifier = itemModifier.clone() as PokemonHeldItemModifier;
newItemModifier.pokemonId = target.id;
const matchingModifier = target.scene.findModifier(m => m instanceof PokemonHeldItemModifier
&& (m as PokemonHeldItemModifier).matchType(itemModifier) && m.pokemonId === target.id, target.isPlayer()) as PokemonHeldItemModifier;
&& (m as PokemonHeldItemModifier).matchType(itemModifier) && m.pokemonId === target.id, target.isPlayer()) as PokemonHeldItemModifier;
let removeOld = true;
if (matchingModifier) {
const maxStackCount = matchingModifier.getMaxStackCount(target.scene);
@ -2004,8 +2096,8 @@ export default class BattleScene extends SceneBase {
}
/**
* Removes all modifiers from enemy of PersistentModifier type
*/
* Removes all modifiers from enemy of PersistentModifier type
*/
clearEnemyModifiers(): void {
const modifiersToRemove = this.enemyModifiers.filter(m => m instanceof PersistentModifier);
for (const m of modifiersToRemove) {
@ -2015,8 +2107,8 @@ export default class BattleScene extends SceneBase {
}
/**
* Removes all modifiers from enemy of PokemonHeldItemModifier type
*/
* Removes all modifiers from enemy of PokemonHeldItemModifier type
*/
clearEnemyHeldItemModifiers(): void {
const modifiersToRemove = this.enemyModifiers.filter(m => m instanceof PokemonHeldItemModifier);
for (const m of modifiersToRemove) {

View File

@ -8,7 +8,7 @@ import { Moves } from "./data/enums/moves";
import { TrainerType } from "./data/enums/trainer-type";
import { GameMode } from "./game-mode";
import { BattleSpec } from "./enums/battle-spec";
import { PlayerGender } from "./system/game-data";
import { PlayerGender } from "./data/enums/player-gender";
import { MoneyMultiplierModifier, PokemonHeldItemModifier } from "./modifier/modifier";
import { PokeballType } from "./data/pokeball";
import {trainerConfigs} from "#app/data/trainer-config";
@ -314,8 +314,8 @@ function getRandomTrainerFunc(trainerPool: (TrainerType | TrainerType[])[]): Get
: trainerPoolEntry;
trainerTypes.push(trainerType);
}
// If the trainer type has a double variant, there's a 33% chance of it being a double battle
if (trainerConfigs[trainerTypes[rand]].trainerTypeDouble) {
// If the trainer type has a double variant, there's a 33% chance of it being a double battle (for now we only allow tate&liza to be double)
if (trainerConfigs[trainerTypes[rand]].trainerTypeDouble && (trainerTypes[rand] === TrainerType.TATE || trainerTypes[rand] === TrainerType.LIZA)) {
return new Trainer(scene, trainerTypes[rand], Utils.randSeedInt(3) ? TrainerVariant.DOUBLE : TrainerVariant.DEFAULT);
}
return new Trainer(scene, trainerTypes[rand], TrainerVariant.DEFAULT);

View File

@ -0,0 +1,293 @@
import {Button} from "#app/enums/buttons";
import {SettingKeyboard} from "#app/system/settings/settings-keyboard";
const cfg_keyboard_qwerty = {
padID: "default",
padType: "keyboard",
deviceMapping: {
KEY_A: Phaser.Input.Keyboard.KeyCodes.A,
KEY_B: Phaser.Input.Keyboard.KeyCodes.B,
KEY_C: Phaser.Input.Keyboard.KeyCodes.C,
KEY_D: Phaser.Input.Keyboard.KeyCodes.D,
KEY_E: Phaser.Input.Keyboard.KeyCodes.E,
KEY_F: Phaser.Input.Keyboard.KeyCodes.F,
KEY_G: Phaser.Input.Keyboard.KeyCodes.G,
KEY_H: Phaser.Input.Keyboard.KeyCodes.H,
KEY_I: Phaser.Input.Keyboard.KeyCodes.I,
KEY_J: Phaser.Input.Keyboard.KeyCodes.J,
KEY_K: Phaser.Input.Keyboard.KeyCodes.K,
KEY_L: Phaser.Input.Keyboard.KeyCodes.L,
KEY_M: Phaser.Input.Keyboard.KeyCodes.M,
KEY_N: Phaser.Input.Keyboard.KeyCodes.N,
KEY_O: Phaser.Input.Keyboard.KeyCodes.O,
KEY_P: Phaser.Input.Keyboard.KeyCodes.P,
KEY_Q: Phaser.Input.Keyboard.KeyCodes.Q,
KEY_R: Phaser.Input.Keyboard.KeyCodes.R,
KEY_S: Phaser.Input.Keyboard.KeyCodes.S,
KEY_T: Phaser.Input.Keyboard.KeyCodes.T,
KEY_U: Phaser.Input.Keyboard.KeyCodes.U,
KEY_V: Phaser.Input.Keyboard.KeyCodes.V,
KEY_W: Phaser.Input.Keyboard.KeyCodes.W,
KEY_X: Phaser.Input.Keyboard.KeyCodes.X,
KEY_Y: Phaser.Input.Keyboard.KeyCodes.Y,
KEY_Z: Phaser.Input.Keyboard.KeyCodes.Z,
KEY_0: Phaser.Input.Keyboard.KeyCodes.ZERO,
KEY_1: Phaser.Input.Keyboard.KeyCodes.ONE,
KEY_2: Phaser.Input.Keyboard.KeyCodes.TWO,
KEY_3: Phaser.Input.Keyboard.KeyCodes.THREE,
KEY_4: Phaser.Input.Keyboard.KeyCodes.FOUR,
KEY_5: Phaser.Input.Keyboard.KeyCodes.FIVE,
KEY_6: Phaser.Input.Keyboard.KeyCodes.SIX,
KEY_7: Phaser.Input.Keyboard.KeyCodes.SEVEN,
KEY_8: Phaser.Input.Keyboard.KeyCodes.EIGHT,
KEY_9: Phaser.Input.Keyboard.KeyCodes.NINE,
KEY_CTRL: Phaser.Input.Keyboard.KeyCodes.CTRL,
KEY_DEL: Phaser.Input.Keyboard.KeyCodes.DELETE,
KEY_END: Phaser.Input.Keyboard.KeyCodes.END,
KEY_ENTER: Phaser.Input.Keyboard.KeyCodes.ENTER,
KEY_ESC: Phaser.Input.Keyboard.KeyCodes.ESC,
KEY_F1: Phaser.Input.Keyboard.KeyCodes.F1,
KEY_F2: Phaser.Input.Keyboard.KeyCodes.F2,
KEY_F3: Phaser.Input.Keyboard.KeyCodes.F3,
KEY_F4: Phaser.Input.Keyboard.KeyCodes.F4,
KEY_F5: Phaser.Input.Keyboard.KeyCodes.F5,
KEY_F6: Phaser.Input.Keyboard.KeyCodes.F6,
KEY_F7: Phaser.Input.Keyboard.KeyCodes.F7,
KEY_F8: Phaser.Input.Keyboard.KeyCodes.F8,
KEY_F9: Phaser.Input.Keyboard.KeyCodes.F9,
KEY_F10: Phaser.Input.Keyboard.KeyCodes.F10,
KEY_F11: Phaser.Input.Keyboard.KeyCodes.F11,
KEY_F12: Phaser.Input.Keyboard.KeyCodes.F12,
KEY_HOME: Phaser.Input.Keyboard.KeyCodes.HOME,
KEY_INSERT: Phaser.Input.Keyboard.KeyCodes.INSERT,
KEY_PAGE_DOWN: Phaser.Input.Keyboard.KeyCodes.PAGE_DOWN,
KEY_PAGE_UP: Phaser.Input.Keyboard.KeyCodes.PAGE_UP,
KEY_PLUS: Phaser.Input.Keyboard.KeyCodes.NUMPAD_ADD, // Assuming numpad plus
KEY_MINUS: Phaser.Input.Keyboard.KeyCodes.NUMPAD_SUBTRACT, // Assuming numpad minus
KEY_QUOTATION: Phaser.Input.Keyboard.KeyCodes.QUOTES,
KEY_SHIFT: Phaser.Input.Keyboard.KeyCodes.SHIFT,
KEY_SPACE: Phaser.Input.Keyboard.KeyCodes.SPACE,
KEY_TAB: Phaser.Input.Keyboard.KeyCodes.TAB,
KEY_TILDE: Phaser.Input.Keyboard.KeyCodes.BACKTICK,
KEY_ARROW_UP: Phaser.Input.Keyboard.KeyCodes.UP,
KEY_ARROW_DOWN: Phaser.Input.Keyboard.KeyCodes.DOWN,
KEY_ARROW_LEFT: Phaser.Input.Keyboard.KeyCodes.LEFT,
KEY_ARROW_RIGHT: Phaser.Input.Keyboard.KeyCodes.RIGHT,
KEY_LEFT_BRACKET: Phaser.Input.Keyboard.KeyCodes.OPEN_BRACKET,
KEY_RIGHT_BRACKET: Phaser.Input.Keyboard.KeyCodes.CLOSED_BRACKET,
KEY_SEMICOLON: Phaser.Input.Keyboard.KeyCodes.SEMICOLON,
KEY_BACKSPACE: Phaser.Input.Keyboard.KeyCodes.BACKSPACE,
KEY_ALT: Phaser.Input.Keyboard.KeyCodes.ALT
},
icons: {
KEY_A: "A.png",
KEY_B: "B.png",
KEY_C: "C.png",
KEY_D: "D.png",
KEY_E: "E.png",
KEY_F: "F.png",
KEY_G: "G.png",
KEY_H: "H.png",
KEY_I: "I.png",
KEY_J: "J.png",
KEY_K: "K.png",
KEY_L: "L.png",
KEY_M: "M.png",
KEY_N: "N.png",
KEY_O: "O.png",
KEY_P: "P.png",
KEY_Q: "Q.png",
KEY_R: "R.png",
KEY_S: "S.png",
KEY_T: "T.png",
KEY_U: "U.png",
KEY_V: "V.png",
KEY_W: "W.png",
KEY_X: "X.png",
KEY_Y: "Y.png",
KEY_Z: "Z.png",
KEY_0: "0.png",
KEY_1: "1.png",
KEY_2: "2.png",
KEY_3: "3.png",
KEY_4: "4.png",
KEY_5: "5.png",
KEY_6: "6.png",
KEY_7: "7.png",
KEY_8: "8.png",
KEY_9: "9.png",
KEY_F1: "F1.png",
KEY_F2: "F2.png",
KEY_F3: "F3.png",
KEY_F4: "F4.png",
KEY_F5: "F5.png",
KEY_F6: "F6.png",
KEY_F7: "F7.png",
KEY_F8: "F8.png",
KEY_F9: "F9.png",
KEY_F10: "F10.png",
KEY_F11: "F11.png",
KEY_F12: "F12.png",
KEY_PAGE_DOWN: "PAGE_DOWN.png",
KEY_PAGE_UP: "PAGE_UP.png",
KEY_CTRL: "CTRL.png",
KEY_DEL: "DEL.png",
KEY_END: "END.png",
KEY_ENTER: "ENTER.png",
KEY_ESC: "ESC.png",
KEY_HOME: "HOME.png",
KEY_INSERT: "INS.png",
KEY_PLUS: "PLUS.png",
KEY_MINUS: "MINUS.png",
KEY_QUOTATION: "QUOTE.png",
KEY_SHIFT: "SHIFT.png",
KEY_SPACE: "SPACE.png",
KEY_TAB: "TAB.png",
KEY_TILDE: "TILDE.png",
KEY_ARROW_UP: "KEY_ARROW_UP.png",
KEY_ARROW_DOWN: "KEY_ARROW_DOWN.png",
KEY_ARROW_LEFT: "KEY_ARROW_LEFT.png",
KEY_ARROW_RIGHT: "KEY_ARROW_RIGHT.png",
KEY_LEFT_BRACKET: "LEFT_BRACKET.png",
KEY_RIGHT_BRACKET: "RIGHT_BRACKET.png",
KEY_SEMICOLON: "SEMICOLON.png",
KEY_BACKSPACE: "BACK.png",
KEY_ALT: "ALT.png"
},
settings: {
[SettingKeyboard.Button_Up]: Button.UP,
[SettingKeyboard.Button_Down]: Button.DOWN,
[SettingKeyboard.Button_Left]: Button.LEFT,
[SettingKeyboard.Button_Right]: Button.RIGHT,
[SettingKeyboard.Button_Submit]: Button.SUBMIT,
[SettingKeyboard.Button_Action]: Button.ACTION,
[SettingKeyboard.Button_Cancel]: Button.CANCEL,
[SettingKeyboard.Button_Menu]: Button.MENU,
[SettingKeyboard.Button_Stats]: Button.STATS,
[SettingKeyboard.Button_Cycle_Shiny]: Button.CYCLE_SHINY,
[SettingKeyboard.Button_Cycle_Form]: Button.CYCLE_FORM,
[SettingKeyboard.Button_Cycle_Gender]: Button.CYCLE_GENDER,
[SettingKeyboard.Button_Cycle_Ability]: Button.CYCLE_ABILITY,
[SettingKeyboard.Button_Cycle_Nature]: Button.CYCLE_NATURE,
[SettingKeyboard.Button_Cycle_Variant]: Button.V,
[SettingKeyboard.Button_Speed_Up]: Button.SPEED_UP,
[SettingKeyboard.Button_Slow_Down]: Button.SLOW_DOWN,
[SettingKeyboard.Alt_Button_Up]: Button.UP,
[SettingKeyboard.Alt_Button_Down]: Button.DOWN,
[SettingKeyboard.Alt_Button_Left]: Button.LEFT,
[SettingKeyboard.Alt_Button_Right]: Button.RIGHT,
[SettingKeyboard.Alt_Button_Submit]: Button.SUBMIT,
[SettingKeyboard.Alt_Button_Action]: Button.ACTION,
[SettingKeyboard.Alt_Button_Cancel]: Button.CANCEL,
[SettingKeyboard.Alt_Button_Menu]: Button.MENU,
[SettingKeyboard.Alt_Button_Stats]: Button.STATS,
[SettingKeyboard.Alt_Button_Cycle_Shiny]: Button.CYCLE_SHINY,
[SettingKeyboard.Alt_Button_Cycle_Form]: Button.CYCLE_FORM,
[SettingKeyboard.Alt_Button_Cycle_Gender]: Button.CYCLE_GENDER,
[SettingKeyboard.Alt_Button_Cycle_Ability]: Button.CYCLE_ABILITY,
[SettingKeyboard.Alt_Button_Cycle_Nature]: Button.CYCLE_NATURE,
[SettingKeyboard.Alt_Button_Cycle_Variant]: Button.V,
[SettingKeyboard.Alt_Button_Speed_Up]: Button.SPEED_UP,
[SettingKeyboard.Alt_Button_Slow_Down]: Button.SLOW_DOWN,
},
default: {
KEY_ARROW_UP: SettingKeyboard.Button_Up,
KEY_ARROW_DOWN: SettingKeyboard.Button_Down,
KEY_ARROW_LEFT: SettingKeyboard.Button_Left,
KEY_ARROW_RIGHT: SettingKeyboard.Button_Right,
KEY_ENTER: SettingKeyboard.Button_Submit,
KEY_SPACE: SettingKeyboard.Button_Action,
KEY_BACKSPACE: SettingKeyboard.Button_Cancel,
KEY_ESC: SettingKeyboard.Button_Menu,
KEY_C: SettingKeyboard.Button_Stats,
KEY_R: SettingKeyboard.Button_Cycle_Shiny,
KEY_F: SettingKeyboard.Button_Cycle_Form,
KEY_G: SettingKeyboard.Button_Cycle_Gender,
KEY_E: SettingKeyboard.Button_Cycle_Ability,
KEY_N: SettingKeyboard.Button_Cycle_Nature,
KEY_V: SettingKeyboard.Button_Cycle_Variant,
KEY_PLUS: -1,
KEY_MINUS: -1,
KEY_A: SettingKeyboard.Alt_Button_Left,
KEY_B: -1,
KEY_D: SettingKeyboard.Alt_Button_Right,
KEY_H: -1,
KEY_I: -1,
KEY_J: -1,
KEY_K: -1,
KEY_L: -1,
KEY_M: SettingKeyboard.Alt_Button_Menu,
KEY_O: -1,
KEY_P: -1,
KEY_Q: -1,
KEY_S: SettingKeyboard.Alt_Button_Down,
KEY_T: SettingKeyboard.Alt_Button_Cycle_Form,
KEY_U: -1,
KEY_W: SettingKeyboard.Alt_Button_Up,
KEY_X: SettingKeyboard.Alt_Button_Cancel,
KEY_Y: SettingKeyboard.Alt_Button_Cycle_Shiny,
KEY_Z: SettingKeyboard.Alt_Button_Action,
KEY_0: -1,
KEY_1: -1,
KEY_2: -1,
KEY_3: -1,
KEY_4: -1,
KEY_5: -1,
KEY_6: -1,
KEY_7: -1,
KEY_8: -1,
KEY_9: -1,
KEY_CTRL: -1,
KEY_DEL: -1,
KEY_END: -1,
KEY_F1: -1,
KEY_F2: -1,
KEY_F3: -1,
KEY_F4: -1,
KEY_F5: -1,
KEY_F6: -1,
KEY_F7: -1,
KEY_F8: -1,
KEY_F9: -1,
KEY_F10: -1,
KEY_F11: -1,
KEY_F12: -1,
KEY_HOME: -1,
KEY_INSERT: -1,
KEY_PAGE_DOWN: SettingKeyboard.Button_Slow_Down,
KEY_PAGE_UP: SettingKeyboard.Button_Speed_Up,
KEY_QUOTATION: -1,
KEY_SHIFT: SettingKeyboard.Alt_Button_Stats,
KEY_TAB: -1,
KEY_TILDE: -1,
KEY_LEFT_BRACKET: -1,
KEY_RIGHT_BRACKET: -1,
KEY_SEMICOLON: -1,
KEY_ALT: -1
},
blacklist: [
"KEY_ENTER",
"KEY_ESC",
"KEY_SPACE",
"KEY_BACKSPACE",
"KEY_ARROW_UP",
"KEY_ARROW_DOWN",
"KEY_ARROW_LEFT",
"KEY_ARROW_RIGHT",
"KEY_DEL",
"KEY_HOME",
]
};
export default cfg_keyboard_qwerty;

View File

@ -0,0 +1,208 @@
import {Device} from "#app/enums/devices";
/**
* Retrieves the key associated with the specified keycode from the mapping.
*
* @param config - The configuration object containing the mapping.
* @param keycode - The keycode to search for.
* @returns The key associated with the specified keycode.
*/
export function getKeyWithKeycode(config, keycode) {
return Object.keys(config.deviceMapping).find(key => config.deviceMapping[key] === keycode);
}
/**
* Retrieves the setting name associated with the specified keycode.
*
* @param config - The configuration object containing custom settings.
* @param keycode - The keycode to search for.
* @returns The setting name associated with the specified keycode.
*/
export function getSettingNameWithKeycode(config, keycode) {
const key = getKeyWithKeycode(config, keycode);
return config.custom[key];
}
/**
* Retrieves the icon associated with the specified keycode.
*
* @param config - The configuration object containing icons.
* @param keycode - The keycode to search for.
* @returns The icon associated with the specified keycode.
*/
export function getIconWithKeycode(config, keycode) {
const key = getKeyWithKeycode(config, keycode);
return config.icons[key];
}
/**
* Retrieves the button associated with the specified keycode.
*
* @param config - The configuration object containing settings.
* @param keycode - The keycode to search for.
* @returns The button associated with the specified keycode.
*/
export function getButtonWithKeycode(config, keycode) {
const settingName = getSettingNameWithKeycode(config, keycode);
return config.settings[settingName];
}
/**
* Retrieves the key associated with the specified setting name.
*
* @param config - The configuration object containing custom settings.
* @param settingName - The setting name to search for.
* @returns The key associated with the specified setting name.
*/
export function getKeyWithSettingName(config, settingName) {
return Object.keys(config.custom).find(key => config.custom[key] === settingName);
}
/**
* Retrieves the setting name associated with the specified key.
*
* @param config - The configuration object containing custom settings.
* @param key - The key to search for.
* @returns The setting name associated with the specified key.
*/
export function getSettingNameWithKey(config, key) {
return config.custom[key];
}
/**
* Retrieves the icon associated with the specified key.
*
* @param config - The configuration object containing icons.
* @param key - The key to search for.
* @returns The icon associated with the specified key.
*/
export function getIconWithKey(config, key) {
return config.icons[key];
}
/**
* Retrieves the icon associated with the specified setting name.
*
* @param config - The configuration object containing icons.
* @param settingName - The setting name to search for.
* @returns The icon associated with the specified setting name.
*/
export function getIconWithSettingName(config, settingName) {
const key = getKeyWithSettingName(config, settingName);
return getIconWithKey(config, key);
}
export function getIconForLatestInput(configs, source, devices, settingName) {
let config;
if (source === "gamepad") {
config = configs[devices[Device.GAMEPAD]];
} else {
config = configs[devices[Device.KEYBOARD]];
}
const icon = getIconWithSettingName(config, settingName);
if (!icon) {
const isAlt = settingName.includes("ALT_");
let altSettingName;
if (isAlt) {
altSettingName = settingName.split("ALT_").splice(1)[0];
} else {
altSettingName = `ALT_${settingName}`;
}
return getIconWithSettingName(config, altSettingName);
}
return icon;
}
export function assign(config, settingNameTarget, keycode): boolean {
// first, we need to check if this keycode is already used on another settingName
if (!canIAssignThisKey(config, getKeyWithKeycode(config, keycode)) || !canIOverrideThisSetting(config, settingNameTarget)) {
return false;
}
const previousSettingName = getSettingNameWithKeycode(config, keycode);
// if it was already bound, we delete the bind
if (previousSettingName) {
const previousKey = getKeyWithSettingName(config, previousSettingName);
config.custom[previousKey] = -1;
}
// then, we need to delete the current key for this settingName
const currentKey = getKeyWithSettingName(config, settingNameTarget);
config.custom[currentKey] = -1;
// then, the new key is assigned to the new settingName
const newKey = getKeyWithKeycode(config, keycode);
config.custom[newKey] = settingNameTarget;
return true;
}
export function swap(config, settingNameTarget, keycode) {
// only for gamepad
if (config.padType === "keyboard") {
return false;
}
const prev_key = getKeyWithSettingName(config, settingNameTarget);
const prev_settingName = getSettingNameWithKey(config, prev_key);
const new_key = getKeyWithKeycode(config, keycode);
const new_settingName = getSettingNameWithKey(config, new_key);
config.custom[prev_key] = new_settingName;
config.custom[new_key] = prev_settingName;
return true;
}
/**
* Deletes the binding of the specified setting name.
*
* @param config - The configuration object containing custom settings.
* @param settingName - The setting name to delete.
*/
export function deleteBind(config, settingName) {
const key = getKeyWithSettingName(config, settingName);
if (config.blacklist.includes(key)) {
return false;
}
config.custom[key] = -1;
return true;
}
export function canIAssignThisKey(config, key) {
const settingName = getSettingNameWithKey(config, key);
if (config.blacklist?.includes(key)) {
return false;
}
if (settingName === -1) {
return true;
}
// if (isTheLatestBind(config, settingName)) {
// return false;
// }
return true;
}
export function canIOverrideThisSetting(config, settingName) {
const key = getKeyWithSettingName(config, settingName);
// || isTheLatestBind(config, settingName) no longer needed since action and cancel are protected
if (config.blacklist?.includes(key)) {
return false;
}
return true;
}
export function canIDeleteThisKey(config, key) {
return canIAssignThisKey(config, key);
}
// export function isTheLatestBind(config, settingName) {
// if (config.padType !== "keyboard") {
// return false;
// }
// const isAlt = settingName.includes("ALT_");
// let altSettingName;
// if (isAlt) {
// altSettingName = settingName.split("ALT_").splice(1)[0];
// } else {
// altSettingName = `ALT_${settingName}`;
// }
// const secondButton = getKeyWithSettingName(config, altSettingName);
// return secondButton === undefined;
// }

View File

@ -0,0 +1,88 @@
import {SettingGamepad} from "../../system/settings/settings-gamepad";
import {Button} from "../../enums/buttons";
/**
* Dualshock mapping
*/
const pad_dualshock = {
padID: "Dualshock",
padType: "dualshock",
deviceMapping: {
RC_S: 0,
RC_E: 1,
RC_W: 2,
RC_N: 3,
START: 9, // Options
SELECT: 8, // Share
LB: 4,
RB: 5,
LT: 6,
RT: 7,
LS: 10,
RS: 11,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15,
TOUCH: 17
},
icons: {
RC_S: "CROSS.png",
RC_E: "CIRCLE.png",
RC_W: "SQUARE.png",
RC_N: "TRIANGLE.png",
START: "START.png",
SELECT: "SELECT.png",
LB: "L1.png",
RB: "R1.png",
LT: "L2.png",
RT: "R2.png",
LS: "L3.png",
RS: "R3.png",
LC_N: "UP.png",
LC_S: "DOWN.png",
LC_W: "LEFT.png",
LC_E: "RIGHT.png",
TOUCH: "TOUCH.png"
},
settings: {
[SettingGamepad.Button_Up]: Button.UP,
[SettingGamepad.Button_Down]: Button.DOWN,
[SettingGamepad.Button_Left]: Button.LEFT,
[SettingGamepad.Button_Right]: Button.RIGHT,
[SettingGamepad.Button_Action]: Button.ACTION,
[SettingGamepad.Button_Cancel]: Button.CANCEL,
[SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE,
[SettingGamepad.Button_Cycle_Variant]: Button.V,
[SettingGamepad.Button_Menu]: Button.MENU,
[SettingGamepad.Button_Stats]: Button.STATS,
[SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM,
[SettingGamepad.Button_Cycle_Shiny]: Button.CYCLE_SHINY,
[SettingGamepad.Button_Cycle_Gender]: Button.CYCLE_GENDER,
[SettingGamepad.Button_Cycle_Ability]: Button.CYCLE_ABILITY,
[SettingGamepad.Button_Speed_Up]: Button.SPEED_UP,
[SettingGamepad.Button_Slow_Down]: Button.SLOW_DOWN,
[SettingGamepad.Button_Submit]: Button.SUBMIT
},
default: {
LC_N: SettingGamepad.Button_Up,
LC_S: SettingGamepad.Button_Down,
LC_W: SettingGamepad.Button_Left,
LC_E: SettingGamepad.Button_Right,
RC_S: SettingGamepad.Button_Action,
RC_E: SettingGamepad.Button_Cancel,
RC_W: SettingGamepad.Button_Cycle_Nature,
RC_N: SettingGamepad.Button_Cycle_Variant,
START: SettingGamepad.Button_Menu,
SELECT: SettingGamepad.Button_Stats,
LB: SettingGamepad.Button_Cycle_Form,
RB: SettingGamepad.Button_Cycle_Shiny,
LT: SettingGamepad.Button_Cycle_Gender,
RT: SettingGamepad.Button_Cycle_Ability,
LS: SettingGamepad.Button_Speed_Up,
RS: SettingGamepad.Button_Slow_Down,
TOUCH: SettingGamepad.Button_Submit,
},
};
export default pad_dualshock;

View File

@ -0,0 +1,90 @@
import {SettingGamepad} from "../../system/settings/settings-gamepad";
import {Button} from "../../enums/buttons";
/**
* Generic pad mapping
*/
const pad_generic = {
padID: "Generic",
padType: "xbox",
deviceMapping: {
RC_S: 0,
RC_E: 1,
RC_W: 2,
RC_N: 3,
START: 9,
SELECT: 8,
LB: 4,
RB: 5,
LT: 6,
RT: 7,
LS: 10,
RS: 11,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15
},
icons: {
RC_S: "XB_Letter_A_OL.png",
RC_E: "XB_Letter_B_OL.png",
RC_W: "XB_Letter_X_OL.png",
RC_N: "XB_Letter_Y_OL.png",
START: "START.png",
SELECT: "SELECT.png",
LB: "Bumper_L.png",
RB: "Bumper_R.png",
LT: "Trigger_L.png",
RT: "Trigger_R.png",
LS: "LS.png",
RS: "RS.png",
LC_N: "UP.png",
LC_S: "DOWN.png",
LC_W: "LEFT.png",
LC_E: "RIGHT.png",
},
settings: {
[SettingGamepad.Button_Up]: Button.UP,
[SettingGamepad.Button_Down]: Button.DOWN,
[SettingGamepad.Button_Left]: Button.LEFT,
[SettingGamepad.Button_Right]: Button.RIGHT,
[SettingGamepad.Button_Action]: Button.ACTION,
[SettingGamepad.Button_Cancel]: Button.CANCEL,
[SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE,
[SettingGamepad.Button_Cycle_Variant]: Button.V,
[SettingGamepad.Button_Menu]: Button.MENU,
[SettingGamepad.Button_Stats]: Button.STATS,
[SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM,
[SettingGamepad.Button_Cycle_Shiny]: Button.CYCLE_SHINY,
[SettingGamepad.Button_Cycle_Gender]: Button.CYCLE_GENDER,
[SettingGamepad.Button_Cycle_Ability]: Button.CYCLE_ABILITY,
[SettingGamepad.Button_Speed_Up]: Button.SPEED_UP,
[SettingGamepad.Button_Slow_Down]: Button.SLOW_DOWN
},
default: {
LC_N: SettingGamepad.Button_Up,
LC_S: SettingGamepad.Button_Down,
LC_W: SettingGamepad.Button_Left,
LC_E: SettingGamepad.Button_Right,
RC_S: SettingGamepad.Button_Action,
RC_E: SettingGamepad.Button_Cancel,
RC_W: SettingGamepad.Button_Cycle_Nature,
RC_N: SettingGamepad.Button_Cycle_Variant,
START: SettingGamepad.Button_Menu,
SELECT: SettingGamepad.Button_Stats,
LB: SettingGamepad.Button_Cycle_Form,
RB: SettingGamepad.Button_Cycle_Shiny,
LT: SettingGamepad.Button_Cycle_Gender,
RT: SettingGamepad.Button_Cycle_Ability,
LS: SettingGamepad.Button_Speed_Up,
RS: SettingGamepad.Button_Slow_Down
},
blacklist: [
"LC_N",
"LC_S",
"LC_W",
"LC_E",
]
};
export default pad_generic;

View File

@ -0,0 +1,85 @@
import {SettingGamepad} from "#app/system/settings/settings-gamepad.js";
import {Button} from "#app/enums/buttons";
/**
* Nintendo Pro Controller mapping
*/
const pad_procon = {
padID: "Pro Controller",
padType: "xbox",
deviceMapping: {
RC_S: 1,
RC_E: 0,
RC_W: 3,
RC_N: 2,
START: 9, // +
SELECT: 8, // -
LB: 4,
RB: 5,
LT: 6,
RT: 7,
LS: 10,
RS: 11,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15,
MENU: 16, // Home
},
icons: {
RC_S: "XB_Letter_B_OL.png",
RC_E: "XB_Letter_A_OL.png",
RC_W: "XB_Letter_Y_OL.png",
RC_N: "XB_Letter_X_OL.png",
START: "START.png",
SELECT: "SELECT.png",
LB: "Bumper_L.png",
RB: "Bumper_R.png",
LT: "Trigger_L.png",
RT: "Trigger_R.png",
LS: "LS.png",
RS: "RS.png",
LC_N: "UP.png",
LC_S: "DOWN.png",
LC_W: "LEFT.png",
LC_E: "RIGHT.png",
},
settings: {
[SettingGamepad.Button_Up]: Button.UP,
[SettingGamepad.Button_Down]: Button.DOWN,
[SettingGamepad.Button_Left]: Button.LEFT,
[SettingGamepad.Button_Right]: Button.RIGHT,
[SettingGamepad.Button_Action]: Button.ACTION,
[SettingGamepad.Button_Cancel]: Button.CANCEL,
[SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE,
[SettingGamepad.Button_Cycle_Variant]: Button.V,
[SettingGamepad.Button_Menu]: Button.MENU,
[SettingGamepad.Button_Stats]: Button.STATS,
[SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM,
[SettingGamepad.Button_Cycle_Shiny]: Button.CYCLE_SHINY,
[SettingGamepad.Button_Cycle_Gender]: Button.CYCLE_GENDER,
[SettingGamepad.Button_Cycle_Ability]: Button.CYCLE_ABILITY,
[SettingGamepad.Button_Speed_Up]: Button.SPEED_UP,
[SettingGamepad.Button_Slow_Down]: Button.SLOW_DOWN
},
default: {
LC_N: SettingGamepad.Button_Up,
LC_S: SettingGamepad.Button_Down,
LC_W: SettingGamepad.Button_Left,
LC_E: SettingGamepad.Button_Right,
RC_S: SettingGamepad.Button_Action,
RC_E: SettingGamepad.Button_Cancel,
RC_W: SettingGamepad.Button_Cycle_Nature,
RC_N: SettingGamepad.Button_Cycle_Variant,
START: SettingGamepad.Button_Menu,
SELECT: SettingGamepad.Button_Stats,
LB: SettingGamepad.Button_Cycle_Form,
RB: SettingGamepad.Button_Cycle_Shiny,
LT: SettingGamepad.Button_Cycle_Gender,
RT: SettingGamepad.Button_Cycle_Ability,
LS: SettingGamepad.Button_Speed_Up,
RS: SettingGamepad.Button_Slow_Down
},
};
export default pad_procon;

View File

@ -0,0 +1,76 @@
import {SettingGamepad} from "../../system/settings/settings-gamepad";
import {Button} from "../../enums/buttons";
/**
* 081f-e401 - UnlicensedSNES
*/
const pad_unlicensedSNES = {
padID: "081f-e401",
padType: "xbox",
deviceMapping : {
RC_S: 2,
RC_E: 1,
RC_W: 3,
RC_N: 0,
START: 9,
SELECT: 8,
LB: 4,
RB: 5,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15
},
icons: {
RC_S: "XB_Letter_A_OL.png",
RC_E: "XB_Letter_B_OL.png",
RC_W: "XB_Letter_X_OL.png",
RC_N: "XB_Letter_Y_OL.png",
START: "START.png",
SELECT: "SELECT.png",
LB: "Bumper_L.png",
RB: "Bumper_R.png",
LC_N: "UP.png",
LC_S: "DOWN.png",
LC_W: "LEFT.png",
LC_E: "RIGHT.png",
},
settings: {
[SettingGamepad.Button_Up]: Button.UP,
[SettingGamepad.Button_Down]: Button.DOWN,
[SettingGamepad.Button_Left]: Button.LEFT,
[SettingGamepad.Button_Right]: Button.RIGHT,
[SettingGamepad.Button_Action]: Button.ACTION,
[SettingGamepad.Button_Cancel]: Button.CANCEL,
[SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE,
[SettingGamepad.Button_Cycle_Variant]: Button.V,
[SettingGamepad.Button_Menu]: Button.MENU,
[SettingGamepad.Button_Stats]: Button.STATS,
[SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM,
[SettingGamepad.Button_Cycle_Shiny]: Button.CYCLE_SHINY,
[SettingGamepad.Button_Cycle_Gender]: Button.CYCLE_GENDER,
[SettingGamepad.Button_Cycle_Ability]: Button.CYCLE_ABILITY,
[SettingGamepad.Button_Speed_Up]: Button.SPEED_UP,
[SettingGamepad.Button_Slow_Down]: Button.SLOW_DOWN
},
default: {
LC_N: SettingGamepad.Button_Up,
LC_S: SettingGamepad.Button_Down,
LC_W: SettingGamepad.Button_Left,
LC_E: SettingGamepad.Button_Right,
RC_S: SettingGamepad.Button_Action,
RC_E: SettingGamepad.Button_Cancel,
RC_W: SettingGamepad.Button_Cycle_Nature,
RC_N: SettingGamepad.Button_Cycle_Variant,
START: SettingGamepad.Button_Menu,
SELECT: SettingGamepad.Button_Stats,
LB: SettingGamepad.Button_Cycle_Form,
RB: SettingGamepad.Button_Cycle_Shiny,
LT: -1,
RT: -1,
LS: -1,
RS: -1
},
};
export default pad_unlicensedSNES;

View File

@ -0,0 +1,84 @@
import {SettingGamepad} from "../../system/settings/settings-gamepad";
import {Button} from "#app/enums/buttons";
/**
* Generic pad mapping
*/
const pad_xbox360 = {
padID: "Xbox 360 controller (XInput STANDARD GAMEPAD)",
padType: "xbox",
deviceMapping: {
RC_S: 0,
RC_E: 1,
RC_W: 2,
RC_N: 3,
START: 9,
SELECT: 8,
LB: 4,
RB: 5,
LT: 6,
RT: 7,
LS: 10,
RS: 11,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15
},
icons: {
RC_S: "XB_Letter_A_OL.png",
RC_E: "XB_Letter_B_OL.png",
RC_W: "XB_Letter_X_OL.png",
RC_N: "XB_Letter_Y_OL.png",
START: "START.png",
SELECT: "SELECT.png",
LB: "Bumper_L.png",
RB: "Bumper_R.png",
LT: "Trigger_L.png",
RT: "Trigger_R.png",
LS: "LS.png",
RS: "RS.png",
LC_N: "UP.png",
LC_S: "DOWN.png",
LC_W: "LEFT.png",
LC_E: "RIGHT.png",
},
settings: {
[SettingGamepad.Button_Up]: Button.UP,
[SettingGamepad.Button_Down]: Button.DOWN,
[SettingGamepad.Button_Left]: Button.LEFT,
[SettingGamepad.Button_Right]: Button.RIGHT,
[SettingGamepad.Button_Action]: Button.ACTION,
[SettingGamepad.Button_Cancel]: Button.CANCEL,
[SettingGamepad.Button_Cycle_Nature]: Button.CYCLE_NATURE,
[SettingGamepad.Button_Cycle_Variant]: Button.V,
[SettingGamepad.Button_Menu]: Button.MENU,
[SettingGamepad.Button_Stats]: Button.STATS,
[SettingGamepad.Button_Cycle_Form]: Button.CYCLE_FORM,
[SettingGamepad.Button_Cycle_Shiny]: Button.CYCLE_SHINY,
[SettingGamepad.Button_Cycle_Gender]: Button.CYCLE_GENDER,
[SettingGamepad.Button_Cycle_Ability]: Button.CYCLE_ABILITY,
[SettingGamepad.Button_Speed_Up]: Button.SPEED_UP,
[SettingGamepad.Button_Slow_Down]: Button.SLOW_DOWN
},
default: {
LC_N: SettingGamepad.Button_Up,
LC_S: SettingGamepad.Button_Down,
LC_W: SettingGamepad.Button_Left,
LC_E: SettingGamepad.Button_Right,
RC_S: SettingGamepad.Button_Action,
RC_E: SettingGamepad.Button_Cancel,
RC_W: SettingGamepad.Button_Cycle_Nature,
RC_N: SettingGamepad.Button_Cycle_Variant,
START: SettingGamepad.Button_Menu,
SELECT: SettingGamepad.Button_Stats,
LB: SettingGamepad.Button_Cycle_Form,
RB: SettingGamepad.Button_Cycle_Shiny,
LT: SettingGamepad.Button_Cycle_Gender,
RT: SettingGamepad.Button_Cycle_Ability,
LS: SettingGamepad.Button_Speed_Up,
RS: SettingGamepad.Button_Slow_Down
},
};
export default pad_xbox360;

View File

@ -1,29 +0,0 @@
/**
* Dualshock mapping
*/
const pad_dualshock = {
padID: "Dualshock",
padType: "Sony",
gamepadMapping: {
RC_S: 0,
RC_E: 1,
RC_W: 2,
RC_N: 3,
START: 9, // Options
SELECT: 8, // Share
LB: 4,
RB: 5,
LT: 6,
RT: 7,
LS: 10,
RS: 11,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15,
MENU: 16,
TOUCH: 17
},
};
export default pad_dualshock;

View File

@ -1,27 +0,0 @@
/**
* Generic pad mapping
*/
const pad_generic = {
padID: "Generic",
padType: "generic",
gamepadMapping: {
RC_S: 0,
RC_E: 1,
RC_W: 2,
RC_N: 3,
START: 9,
SELECT: 8,
LB: 4,
RB: 5,
LT: 6,
RT: 7,
LS: 10,
RS: 11,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15
},
};
export default pad_generic;

View File

@ -1,28 +0,0 @@
/**
* Nintendo Pro Controller mapping
*/
const pad_procon = {
padID: "Pro Controller",
padType: "Nintendo",
gamepadMapping: {
RC_S: 1,
RC_E: 0,
RC_W: 3,
RC_N: 2,
START: 9, // +
SELECT: 8, // -
LB: 4,
RB: 5,
LT: 6,
RT: 7,
LS: 10,
RS: 11,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15,
MENU: 16, // Home
},
};
export default pad_procon;

View File

@ -1,23 +0,0 @@
/**
* 081f-e401 - UnlicensedSNES
*/
const pad_unlicensedSNES = {
padID: "081f-e401",
padType: "snes",
gamepadMapping : {
RC_S: 2,
RC_E: 1,
RC_W: 3,
RC_N: 0,
START: 9,
SELECT: 8,
LB: 4,
RB: 5,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15
}
};
export default pad_unlicensedSNES;

View File

@ -1,28 +0,0 @@
/**
* Generic pad mapping
*/
const pad_xbox360 = {
padID: "Xbox 360 controller (XInput STANDARD GAMEPAD)",
padType: "xbox",
gamepadMapping: {
RC_S: 0,
RC_E: 1,
RC_W: 2,
RC_N: 3,
START: 9,
SELECT: 8,
LB: 4,
RB: 5,
LT: 6,
RT: 7,
LS: 10,
RS: 11,
LC_N: 12,
LC_S: 13,
LC_W: 14,
LC_E: 15,
MENU: 16
},
};
export default pad_xbox360;

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,7 @@ export abstract class ArenaTag {
public sourceId: integer;
public side: ArenaTagSide;
constructor(tagType: ArenaTagType, turnCount: integer, sourceMove: Moves, sourceId?: integer, side: ArenaTagSide = ArenaTagSide.BOTH) {
this.tagType = tagType;
this.turnCount = turnCount;
@ -41,10 +42,12 @@ export abstract class ArenaTag {
return true;
}
onAdd(arena: Arena): void { }
onAdd(arena: Arena, quiet: boolean = false): void { }
onRemove(arena: Arena): void {
arena.scene.queueMessage(`${this.getMoveName()}\'s effect wore off${this.side === ArenaTagSide.PLAYER ? "\non your side" : this.side === ArenaTagSide.ENEMY ? "\non the foe's side" : ""}.`);
onRemove(arena: Arena, quiet: boolean = false): void {
if (!quiet) {
arena.scene.queueMessage(`${this.getMoveName()}\'s effect wore off${this.side === ArenaTagSide.PLAYER ? "\non your side" : this.side === ArenaTagSide.ENEMY ? "\non the foe's side" : ""}.`);
}
}
onOverlap(arena: Arena): void { }
@ -65,11 +68,13 @@ export class MistTag extends ArenaTag {
super(ArenaTagType.MIST, turnCount, Moves.MIST, sourceId, side);
}
onAdd(arena: Arena): void {
onAdd(arena: Arena, quiet: boolean = false): void {
super.onAdd(arena);
const source = arena.scene.getPokemonById(this.sourceId);
arena.scene.queueMessage(getPokemonMessage(source, "'s team became\nshrouded in mist!"));
if (!quiet) {
arena.scene.queueMessage(getPokemonMessage(source, "'s team became\nshrouded in mist!"));
}
}
apply(arena: Arena, args: any[]): boolean {
@ -113,8 +118,10 @@ class ReflectTag extends WeakenMoveScreenTag {
return false;
}
onAdd(arena: Arena): void {
arena.scene.queueMessage(`Reflect reduced the damage of physical moves${this.side === ArenaTagSide.PLAYER ? "\non your side" : this.side === ArenaTagSide.ENEMY ? "\non the foe's side" : ""}.`);
onAdd(arena: Arena, quiet: boolean = false): void {
if (!quiet) {
arena.scene.queueMessage(`Reflect reduced the damage of physical moves${this.side === ArenaTagSide.PLAYER ? "\non your side" : this.side === ArenaTagSide.ENEMY ? "\non the foe's side" : ""}.`);
}
}
}
@ -135,8 +142,10 @@ class LightScreenTag extends WeakenMoveScreenTag {
return false;
}
onAdd(arena: Arena): void {
arena.scene.queueMessage(`Light Screen reduced the damage of special moves${this.side === ArenaTagSide.PLAYER ? "\non your side" : this.side === ArenaTagSide.ENEMY ? "\non the foe's side" : ""}.`);
onAdd(arena: Arena, quiet: boolean = false): void {
if (!quiet) {
arena.scene.queueMessage(`Light Screen reduced the damage of special moves${this.side === ArenaTagSide.PLAYER ? "\non your side" : this.side === ArenaTagSide.ENEMY ? "\non the foe's side" : ""}.`);
}
}
}
@ -145,8 +154,10 @@ class AuroraVeilTag extends WeakenMoveScreenTag {
super(ArenaTagType.AURORA_VEIL, turnCount, Moves.AURORA_VEIL, sourceId, side);
}
onAdd(arena: Arena): void {
arena.scene.queueMessage(`Aurora Veil reduced the damage of moves${this.side === ArenaTagSide.PLAYER ? "\non your side" : this.side === ArenaTagSide.ENEMY ? "\non the foe's side" : ""}.`);
onAdd(arena: Arena, quiet: boolean = false): void {
if (!quiet) {
arena.scene.queueMessage(`Aurora Veil reduced the damage of moves${this.side === ArenaTagSide.PLAYER ? "\non your side" : this.side === ArenaTagSide.ENEMY ? "\non the foe's side" : ""}.`);
}
}
}
@ -386,11 +397,13 @@ class SpikesTag extends ArenaTrapTag {
super(ArenaTagType.SPIKES, Moves.SPIKES, sourceId, side, 3);
}
onAdd(arena: Arena): void {
onAdd(arena: Arena, quiet: boolean = false): void {
super.onAdd(arena);
const source = arena.scene.getPokemonById(this.sourceId);
arena.scene.queueMessage(`${this.getMoveName()} were scattered\nall around ${source.getOpponentDescriptor()}'s feet!`);
if (!quiet) {
arena.scene.queueMessage(`${this.getMoveName()} were scattered\nall around ${source.getOpponentDescriptor()}'s feet!`);
}
}
activateTrap(pokemon: Pokemon): boolean {
@ -423,11 +436,13 @@ class ToxicSpikesTag extends ArenaTrapTag {
this.neutralized = false;
}
onAdd(arena: Arena): void {
onAdd(arena: Arena, quiet: boolean = false): void {
super.onAdd(arena);
const source = arena.scene.getPokemonById(this.sourceId);
arena.scene.queueMessage(`${this.getMoveName()} were scattered\nall around ${source.getOpponentDescriptor()}'s feet!`);
if (!quiet) {
arena.scene.queueMessage(`${this.getMoveName()} were scattered\nall around ${source.getOpponentDescriptor()}'s feet!`);
}
}
onRemove(arena: Arena): void {
@ -493,15 +508,17 @@ class StealthRockTag extends ArenaTrapTag {
super(ArenaTagType.STEALTH_ROCK, Moves.STEALTH_ROCK, sourceId, side, 1);
}
onAdd(arena: Arena): void {
onAdd(arena: Arena, quiet: boolean = false): void {
super.onAdd(arena);
const source = arena.scene.getPokemonById(this.sourceId);
arena.scene.queueMessage(`Pointed stones float in the air\naround ${source.getOpponentDescriptor()}!`);
if (!quiet) {
arena.scene.queueMessage(`Pointed stones float in the air\naround ${source.getOpponentDescriptor()}!`);
}
}
getDamageHpRatio(pokemon: Pokemon): number {
const effectiveness = pokemon.getAttackTypeEffectiveness(Type.ROCK);
const effectiveness = pokemon.getAttackTypeEffectiveness(Type.ROCK, undefined, true);
let damageHpRatio: number;
@ -562,13 +579,15 @@ class StickyWebTag extends ArenaTrapTag {
super(ArenaTagType.STICKY_WEB, Moves.STICKY_WEB, sourceId, side, 1);
}
onAdd(arena: Arena): void {
onAdd(arena: Arena, quiet: boolean = false): void {
super.onAdd(arena);
// does not seem to be used anywhere
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const source = arena.scene.getPokemonById(this.sourceId);
arena.scene.queueMessage(`A ${this.getMoveName()} has been laid out on the ground around the opposing team!`);
if (!quiet) {
arena.scene.queueMessage(`A ${this.getMoveName()} has been laid out on the ground around the opposing team!`);
}
}
activateTrap(pokemon: Pokemon): boolean {
@ -626,8 +645,10 @@ class TailwindTag extends ArenaTag {
super(ArenaTagType.TAILWIND, turnCount, Moves.TAILWIND, sourceId, side);
}
onAdd(arena: Arena): void {
arena.scene.queueMessage(`The Tailwind blew from behind${this.side === ArenaTagSide.PLAYER ? "\nyour" : this.side === ArenaTagSide.ENEMY ? "\nthe opposing" : ""} team!`);
onAdd(arena: Arena, quiet: boolean = false): void {
if (!quiet) {
arena.scene.queueMessage(`The Tailwind blew from behind${this.side === ArenaTagSide.PLAYER ? "\nyour" : this.side === ArenaTagSide.ENEMY ? "\nthe opposing" : ""} team!`);
}
const source = arena.scene.getPokemonById(this.sourceId);
const party = source.isPlayer() ? source.scene.getPlayerField() : source.scene.getEnemyField();
@ -646,8 +667,10 @@ class TailwindTag extends ArenaTag {
}
}
onRemove(arena: Arena): void {
arena.scene.queueMessage(`${this.side === ArenaTagSide.PLAYER ? "Your" : this.side === ArenaTagSide.ENEMY ? "The opposing" : ""} team's Tailwind petered out!`);
onRemove(arena: Arena, quiet: boolean = false): void {
if (!quiet) {
arena.scene.queueMessage(`${this.side === ArenaTagSide.PLAYER ? "Your" : this.side === ArenaTagSide.ENEMY ? "The opposing" : ""} team's Tailwind petered out!`);
}
}
}

Some files were not shown because too many files have changed in this diff Show More