Merge branch 'main' into plates_memories
3
.env
@ -1,2 +1,3 @@
|
||||
VITE_BYPASS_LOGIN=0
|
||||
VITE_BYPASS_TUTORIAL=0
|
||||
VITE_BYPASS_TUTORIAL=0
|
||||
VITE_SERVER_URL=http://localhost:8001
|
@ -1,2 +1,3 @@
|
||||
VITE_BYPASS_LOGIN=1
|
||||
VITE_BYPASS_TUTORIAL=0
|
||||
VITE_BYPASS_TUTORIAL=0
|
||||
VITE_SERVER_URL=http://localhost:8001
|
5
.github/workflows/github-pages.yml
vendored
@ -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
@ -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
|
||||
|
||||
|
4
.vscode/settings.json
vendored
@ -1,4 +0,0 @@
|
||||
{
|
||||
"javascript.preferences.importModuleSpecifierEnding": "minimal",
|
||||
"typescript.preferences.importModuleSpecifierEnding": "minimal"
|
||||
}
|
72
index.css
@ -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
@ -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",
|
||||
|
@ -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"
|
||||
|
148
public/images/inputs/dualshock.json
Normal 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$"
|
||||
}
|
||||
}
|
BIN
public/images/inputs/dualshock.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
596
public/images/inputs/keyboard.json
Normal 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$"
|
||||
}
|
||||
}
|
BIN
public/images/inputs/keyboard.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
140
public/images/inputs/xbox.json
Normal 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$"
|
||||
}
|
||||
}
|
BIN
public/images/inputs/xbox.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
2834
public/images/pokemon/133-partner.json
Normal file
BIN
public/images/pokemon/133-partner.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
2456
public/images/pokemon/25-partner.json
Normal file
BIN
public/images/pokemon/25-partner.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
2834
public/images/pokemon/back/133-partner.json
Normal file
BIN
public/images/pokemon/back/133-partner.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
2456
public/images/pokemon/back/25-partner.json
Normal file
BIN
public/images/pokemon/back/25-partner.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
2456
public/images/pokemon/back/female/25-partner.json
Normal file
BIN
public/images/pokemon/back/female/25-partner.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
2834
public/images/pokemon/back/shiny/133-partner.json
Normal file
BIN
public/images/pokemon/back/shiny/133-partner.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
2456
public/images/pokemon/back/shiny/25-partner.json
Normal file
BIN
public/images/pokemon/back/shiny/25-partner.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
2456
public/images/pokemon/back/shiny/female/25-partner.json
Normal file
BIN
public/images/pokemon/back/shiny/female/25-partner.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
2456
public/images/pokemon/female/25-partner.json
Normal file
BIN
public/images/pokemon/female/25-partner.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
public/images/pokemon/icons/1/133-partner.png
Normal file
After Width: | Height: | Size: 394 B |
BIN
public/images/pokemon/icons/1/133s-partner.png
Normal file
After Width: | Height: | Size: 419 B |
BIN
public/images/pokemon/icons/1/25-partner.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
public/images/pokemon/icons/1/25s-partner.png
Normal file
After Width: | Height: | Size: 397 B |
2834
public/images/pokemon/shiny/133-partner.json
Normal file
BIN
public/images/pokemon/shiny/133-partner.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
2456
public/images/pokemon/shiny/25-partner.json
Normal file
BIN
public/images/pokemon/shiny/25-partner.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
2456
public/images/pokemon/shiny/female/25-partner.json
Normal file
BIN
public/images/pokemon/shiny/female/25-partner.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
@ -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 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
22
public/images/pokemon/variant/back/female/111.json
Normal 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"
|
||||
}
|
||||
}
|
26
public/images/pokemon/variant/back/female/112.json
Normal 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"
|
||||
}
|
||||
}
|
34
public/images/pokemon/variant/back/female/464.json
Normal 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"
|
||||
}
|
||||
}
|
22
public/images/pokemon/variant/female/111.json
Normal 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"
|
||||
}
|
||||
}
|
32
public/images/pokemon/variant/female/112.json
Normal 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"
|
||||
}
|
||||
}
|
34
public/images/pokemon/variant/female/464.json
Normal 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"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
@ -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
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 81 KiB |
41
public/images/trainer/sailor.json
Normal 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$"
|
||||
}
|
||||
}
|
BIN
public/images/trainer/sailor.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
public/images/ui/dawn_icon_bg.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
public/images/ui/dawn_icon_fg.png
Normal file
After Width: | Height: | Size: 347 B |
BIN
public/images/ui/dawn_icon_mg.png
Normal file
After Width: | Height: | Size: 273 B |
BIN
public/images/ui/day_icon_bg.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
public/images/ui/day_icon_fg.png
Normal file
After Width: | Height: | Size: 398 B |
BIN
public/images/ui/day_icon_mg.png
Normal file
After Width: | Height: | Size: 245 B |
BIN
public/images/ui/dusk_icon_bg.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
public/images/ui/dusk_icon_fg.png
Normal file
After Width: | Height: | Size: 388 B |
BIN
public/images/ui/dusk_icon_mg.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
public/images/ui/legacy/dawn_icon_bg.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
public/images/ui/legacy/dawn_icon_fg.png
Normal file
After Width: | Height: | Size: 249 B |
BIN
public/images/ui/legacy/dawn_icon_mg.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
public/images/ui/legacy/day_icon_bg.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
public/images/ui/legacy/day_icon_fg.png
Normal file
After Width: | Height: | Size: 255 B |
BIN
public/images/ui/legacy/day_icon_mg.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
public/images/ui/legacy/dusk_icon_bg.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
public/images/ui/legacy/dusk_icon_fg.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
public/images/ui/legacy/dusk_icon_mg.png
Normal file
After Width: | Height: | Size: 219 B |
BIN
public/images/ui/legacy/night_icon_bg.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
public/images/ui/legacy/night_icon_fg.png
Normal file
After Width: | Height: | Size: 240 B |
BIN
public/images/ui/legacy/night_icon_mg.png
Normal file
After Width: | Height: | Size: 120 B |
BIN
public/images/ui/night_icon_bg.png
Normal file
After Width: | Height: | Size: 186 B |
BIN
public/images/ui/night_icon_fg.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
public/images/ui/night_icon_mg.png
Normal file
After Width: | Height: | Size: 271 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.1 KiB |
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
293
src/configs/inputs/cfg_keyboard_qwerty.ts
Normal 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;
|
208
src/configs/inputs/configHandler.ts
Normal 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;
|
||||
// }
|
88
src/configs/inputs/pad_dualshock.ts
Normal 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;
|
90
src/configs/inputs/pad_generic.ts
Normal 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;
|
85
src/configs/inputs/pad_procon.ts
Normal 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;
|
76
src/configs/inputs/pad_unlicensedSNES.ts
Normal 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;
|
84
src/configs/inputs/pad_xbox360.ts
Normal 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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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;
|
@ -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!`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|