diff --git a/public/images/events/september-update-pt_BR.png b/public/images/events/september-update-pt-BR.png similarity index 100% rename from public/images/events/september-update-pt_BR.png rename to public/images/events/september-update-pt-BR.png diff --git a/public/images/events/september-update-zh_CN.png b/public/images/events/september-update-zh-CN.png similarity index 100% rename from public/images/events/september-update-zh_CN.png rename to public/images/events/september-update-zh-CN.png diff --git a/public/images/inputs/keyboard.json b/public/images/inputs/keyboard.json index a8124004c12..c9b3c79fbfb 100644 --- a/public/images/inputs/keyboard.json +++ b/public/images/inputs/keyboard.json @@ -1,604 +1,529 @@ -{"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} -}, -{ - "filename": "ACTION.png", - "frame": {"x":1018,"y":0,"w":28,"h":12}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":28,"h":12}, - "sourceSize": {"w":28,"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$" -} +{ "frames": { + "0.png": { + "frame": { "x": 12, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "1.png": { + "frame": { "x": 36, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "2.png": { + "frame": { "x": 0, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "3.png": { + "frame": { "x": 12, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "4.png": { + "frame": { "x": 24, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "5.png": { + "frame": { "x": 84, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "6.png": { + "frame": { "x": 96, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "7.png": { + "frame": { "x": 120, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "8.png": { + "frame": { "x": 132, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "9.png": { + "frame": { "x": 52, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "A.png": { + "frame": { "x": 64, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "ALT.png": { + "frame": { "x": 0, "y": 22, "w": 16, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 16, "h": 11 }, + "sourceSize": { "w": 16, "h": 11 } + }, + "B.png": { + "frame": { "x": 76, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "BACK.png": { + "frame": { "x": 80, "y": 0, "w": 24, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 24, "h": 11 }, + "sourceSize": { "w": 24, "h": 11 } + }, + "C.png": { + "frame": { "x": 88, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "CTRL.png": { + "frame": { "x": 0, "y": 11, "w": 22, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 11 }, + "sourceSize": { "w": 22, "h": 11 } + }, + "D.png": { + "frame": { "x": 100, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "DEL.png": { + "frame": { "x": 116, "y": 11, "w": 17, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 17, "h": 11 }, + "sourceSize": { "w": 17, "h": 11 } + }, + "E.png": { + "frame": { "x": 112, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "END.png": { + "frame": { "x": 81, "y": 11, "w": 18, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 18, "h": 11 }, + "sourceSize": { "w": 18, "h": 11 } + }, + "ENTER.png": { + "frame": { "x": 28, "y": 0, "w": 27, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 27, "h": 11 }, + "sourceSize": { "w": 27, "h": 11 } + }, + "ESC.png": { + "frame": { "x": 99, "y": 11, "w": 17, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 17, "h": 11 }, + "sourceSize": { "w": 17, "h": 11 } + }, + "F.png": { + "frame": { "x": 124, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "F1.png": { + "frame": { "x": 78, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F2.png": { + "frame": { "x": 91, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F3.png": { + "frame": { "x": 104, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F4.png": { + "frame": { "x": 117, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F5.png": { + "frame": { "x": 130, "y": 22, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F6.png": { + "frame": { "x": 0, "y": 33, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F7.png": { + "frame": { "x": 13, "y": 33, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F8.png": { + "frame": { "x": 26, "y": 33, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F9.png": { + "frame": { "x": 39, "y": 33, "w": 13, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 13, "h": 11 }, + "sourceSize": { "w": 13, "h": 11 } + }, + "F10.png": { + "frame": { "x": 16, "y": 22, "w": 16, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 16, "h": 11 }, + "sourceSize": { "w": 16, "h": 11 } + }, + "F11.png": { + "frame": { "x": 48, "y": 22, "w": 15, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 15, "h": 11 }, + "sourceSize": { "w": 15, "h": 11 } + }, + "F12.png": { + "frame": { "x": 133, "y": 11, "w": 16, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 16, "h": 11 }, + "sourceSize": { "w": 16, "h": 11 } + }, + "G.png": { + "frame": { "x": 136, "y": 33, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "H.png": { + "frame": { "x": 0, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "HOME.png": { + "frame": { "x": 104, "y": 0, "w": 23, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 23, "h": 11 }, + "sourceSize": { "w": 23, "h": 11 } + }, + "I.png": { + "frame": { "x": 24, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "INS.png": { + "frame": { "x": 32, "y": 22, "w": 16, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 16, "h": 11 }, + "sourceSize": { "w": 16, "h": 11 } + }, + "J.png": { + "frame": { "x": 48, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "K.png": { + "frame": { "x": 60, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "KEY_ARROW_DOWN.png": { + "frame": { "x": 72, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "KEY_ARROW_LEFT.png": { + "frame": { "x": 72, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "KEY_ARROW_RIGHT.png": { + "frame": { "x": 84, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "KEY_ARROW_UP.png": { + "frame": { "x": 94, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "L.png": { + "frame": { "x": 96, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "LEFT_BRACKET.png": { + "frame": { "x": 127, "y": 66, "w": 10, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 10, "h": 11 }, + "sourceSize": { "w": 10, "h": 11 } + }, + "M.png": { + "frame": { "x": 108, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "MINUS.png": { + "frame": { "x": 105, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "N.png": { + "frame": { "x": 120, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "O.png": { + "frame": { "x": 12, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "P.png": { + "frame": { "x": 132, "y": 44, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "PAGE_DOWN.png": { + "frame": { "x": 22, "y": 11, "w": 20, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 20, "h": 11 }, + "sourceSize": { "w": 20, "h": 11 } + }, + "PAGE_UP.png": { + "frame": { "x": 42, "y": 11, "w": 20, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 20, "h": 11 }, + "sourceSize": { "w": 20, "h": 11 } + }, + "PLUS.png": { + "frame": { "x": 116, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "Q.png": { + "frame": { "x": 36, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "QUOTE.png": { + "frame": { "x": 83, "y": 66, "w": 11, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 11, "h": 11 }, + "sourceSize": { "w": 11, "h": 11 } + }, + "R.png": { + "frame": { "x": 48, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "RIGHT_BRACKET.png": { + "frame": { "x": 137, "y": 66, "w": 10, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 10, "h": 11 }, + "sourceSize": { "w": 10, "h": 11 } + }, + "S.png": { + "frame": { "x": 60, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "SEMICOLON.png": { + "frame": { "x": 72, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "SHIFT.png": { + "frame": { "x": 127, "y": 0, "w": 23, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 23, "h": 11 }, + "sourceSize": { "w": 23, "h": 11 } + }, + "SPACE.png": { + "frame": { "x": 55, "y": 0, "w": 25, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 25, "h": 11 }, + "sourceSize": { "w": 25, "h": 11 } + }, + "T.png": { + "frame": { "x": 108, "y": 55, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "TAB.png": { + "frame": { "x": 62, "y": 11, "w": 19, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 19, "h": 11 }, + "sourceSize": { "w": 19, "h": 11 } + }, + "TILDE.png": { + "frame": { "x": 63, "y": 22, "w": 15, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 15, "h": 11 }, + "sourceSize": { "w": 15, "h": 11 } + }, + "U.png": { + "frame": { "x": 0, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "V.png": { + "frame": { "x": 12, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "W.png": { + "frame": { "x": 24, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "X.png": { + "frame": { "x": 36, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "Y.png": { + "frame": { "x": 48, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "Z.png": { + "frame": { "x": 60, "y": 66, "w": 12, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 12, "h": 11 }, + "sourceSize": { "w": 12, "h": 11 } + }, + "ACTION.png": { + "frame": { "x": 0, "y": 0, "w": 28, "h": 11 }, + "rotated": false, + "trimmed": true, + "spriteSourceSize": { "x": 0, "y": 0, "w": 28, "h": 11 }, + "sourceSize": { "w": 28, "h": 11 } + } + }, + "meta": { + "app": "https://www.aseprite.org/", + "version": "1.3.7-dev", + "image": "keyboard.png", + "format": "RGBA8888", + "size": { "w": 150, "h": 77 }, + "scale": "1" + } } diff --git a/public/images/inputs/keyboard.png b/public/images/inputs/keyboard.png index 1fc5adfa31c..e4d849be0fb 100644 Binary files a/public/images/inputs/keyboard.png and b/public/images/inputs/keyboard.png differ diff --git a/src/data/ability.ts b/src/data/ability.ts index 04dd15f9239..16ae7a2b2d2 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -3475,12 +3475,12 @@ export class MoodyAbAttr extends PostTurnAbAttr { if (!simulated) { if (canRaise.length > 0) { - const raisedStat = Utils.randSeedItem(canRaise); + const raisedStat = canRaise[pokemon.randSeedInt(canRaise.length)]; canLower = canRaise.filter(s => s !== raisedStat); pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ raisedStat ], 2)); } if (canLower.length > 0) { - const loweredStat = Utils.randSeedItem(canLower); + const loweredStat = canLower[pokemon.randSeedInt(canLower.length)]; pokemon.scene.unshiftPhase(new StatStageChangePhase(pokemon.scene, pokemon.getBattlerIndex(), true, [ loweredStat ], -1)); } } diff --git a/src/data/biomes.ts b/src/data/biomes.ts index 721231f9cb0..0e37cc94ff5 100644 --- a/src/data/biomes.ts +++ b/src/data/biomes.ts @@ -1,6 +1,6 @@ import { Type } from "./type"; import * as Utils from "../utils"; -import {pokemonEvolutions, SpeciesFormEvolution} from "./pokemon-evolutions"; +import { pokemonEvolutions, SpeciesFormEvolution } from "./pokemon-evolutions"; import i18next from "i18next"; import { Biome } from "#enums/biome"; import { Species } from "#enums/species"; @@ -46,7 +46,7 @@ export const biomeLinks: BiomeLinks = { [Biome.SEABED]: [ Biome.CAVE, [ Biome.VOLCANO, 3 ] ], [Biome.MOUNTAIN]: [ Biome.VOLCANO, [ Biome.WASTELAND, 2 ], [ Biome.SPACE, 3 ] ], [Biome.BADLANDS]: [ Biome.DESERT, Biome.MOUNTAIN ], - [Biome.CAVE]: [ Biome.BADLANDS, Biome.LAKE [ Biome.LABORATORY, 2 ] ], + [Biome.CAVE]: [ Biome.BADLANDS, Biome.LAKE, [ Biome.LABORATORY, 2 ] ], [Biome.DESERT]: [ Biome.RUINS, [ Biome.CONSTRUCTION_SITE, 2 ] ], [Biome.ICE_CAVE]: Biome.SNOWY_FOREST, [Biome.MEADOW]: [ Biome.PLAINS, Biome.FAIRY_CAVE ], diff --git a/src/data/move.ts b/src/data/move.ts index bcdb16cdfbc..14d7addead0 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2675,7 +2675,7 @@ export class AcupressureStatStageChangeAttr extends MoveEffectAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean | Promise { const randStats = BATTLE_STATS.filter(s => target.getStatStage(s) < 6); if (randStats.length > 0) { - const boostStat = [randStats[Utils.randInt(randStats.length)]]; + const boostStat = [randStats[user.randSeedInt(randStats.length)]]; user.scene.unshiftPhase(new StatStageChangePhase(user.scene, target.getBattlerIndex(), this.selfTarget, boostStat, 2)); return true; } diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 8930c7053a3..09448b332e4 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -944,7 +944,7 @@ export function initSpecies() { new PokemonSpecies(Species.METAPOD, 1, false, false, false, "Cocoon Pokémon", Type.BUG, null, 0.7, 9.9, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 50, 20, 55, 25, 25, 30, 120, 50, 72, GrowthRate.MEDIUM_FAST, 50, false), new PokemonSpecies(Species.BUTTERFREE, 1, false, false, false, "Butterfly Pokémon", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, GrowthRate.MEDIUM_FAST, 50, true, true, new PokemonForm("Normal", "", Type.BUG, Type.FLYING, 1.1, 32, Abilities.COMPOUND_EYES, Abilities.NONE, Abilities.TINTED_LENS, 395, 60, 45, 50, 90, 80, 70, 45, 50, 198, true, null, true), - new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.BUG, Type.FLYING, 17, 32, Abilities.TINTED_LENS, Abilities.TINTED_LENS, Abilities.TINTED_LENS, 495, 85, 35, 80, 120, 90, 85, 45, 50, 198, true), + new PokemonForm("G-Max", SpeciesFormKey.GIGANTAMAX, Type.BUG, Type.FLYING, 17, 32, Abilities.COMPOUND_EYES, Abilities.COMPOUND_EYES, Abilities.COMPOUND_EYES, 495, 85, 35, 80, 120, 90, 85, 45, 50, 198, true), ), new PokemonSpecies(Species.WEEDLE, 1, false, false, false, "Hairy Bug Pokémon", Type.BUG, Type.POISON, 0.3, 3.2, Abilities.SHIELD_DUST, Abilities.NONE, Abilities.RUN_AWAY, 195, 40, 35, 30, 20, 20, 50, 255, 70, 39, GrowthRate.MEDIUM_FAST, 50, false), new PokemonSpecies(Species.KAKUNA, 1, false, false, false, "Cocoon Pokémon", Type.BUG, Type.POISON, 0.6, 10, Abilities.SHED_SKIN, Abilities.NONE, Abilities.SHED_SKIN, 205, 45, 25, 50, 25, 25, 35, 120, 70, 72, GrowthRate.MEDIUM_FAST, 50, false), diff --git a/src/loading-scene.ts b/src/loading-scene.ts index 4d67ec01ccd..432dbcd7469 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -246,7 +246,7 @@ export class LoadingScene extends SceneBase { } else { this.loadAtlas("types", ""); } - const availableLangs = ["en", "de", "it", "fr", "ja", "ko", "es", "pt_BR", "zh_CN"]; + const availableLangs = ["en", "de", "it", "fr", "ja", "ko", "es", "pt-BR", "zh-CN"]; if (lang && availableLangs.includes(lang)) { this.loadImage("september-update-"+lang, "events"); } else { diff --git a/src/locales/de/battle.json b/src/locales/de/battle.json index 762b5848439..05205b001b6 100644 --- a/src/locales/de/battle.json +++ b/src/locales/de/battle.json @@ -94,5 +94,6 @@ "retryBattle": "Möchtest du vom Beginn des Kampfes neustarten?", "unlockedSomething": "{{unlockedThing}} wurde freigeschaltet.", "congratulations": "Glückwunsch!", - "beatModeFirstTime": "{{speciesName}} hat den {{gameMode}} Modus zum ersten Mal beendet! Du erhältst {{newModifier}}!" + "beatModeFirstTime": "{{speciesName}} hat den {{gameMode}} Modus zum ersten Mal beendet! Du erhältst {{newModifier}}!", + "eggSkipPrompt": "Zur Ei-Zusammenfassung springen?" } \ No newline at end of file diff --git a/src/locales/de/challenges.json b/src/locales/de/challenges.json index 17c33353bc6..c8836c50549 100644 --- a/src/locales/de/challenges.json +++ b/src/locales/de/challenges.json @@ -1,10 +1,11 @@ { + "noneSelected": "Keine ausgewählt", "title": "Herausforderungsmodifikatoren", "illegalEvolution": "{{pokemon}} hat sich in ein Pokémon verwandelt, dass für diese Herausforderung nicht zulässig ist!", "singleGeneration": { "name": "Mono-Generation", "desc": "Du kannst nur Pokémon aus der {{gen}} Generation verwenden.", - "desc_default": "Du kannst nur Pokémon gewählten Generation verwenden.", + "desc_default": "Du kannst nur Pokémon aus der gewählten Generation verwenden.", "gen_1": "ersten", "gen_2": "zweiten", "gen_3": "dritten", diff --git a/src/locales/de/menu-ui-handler.json b/src/locales/de/menu-ui-handler.json index 56c03102b9c..93c3f4c38e8 100644 --- a/src/locales/de/menu-ui-handler.json +++ b/src/locales/de/menu-ui-handler.json @@ -25,5 +25,6 @@ "unlinkGoogle": "Google trennen", "cancel": "Abbrechen", "losingProgressionWarning": "Du wirst jeglichen Fortschritt seit Anfang dieses Kampfes verlieren. Fortfahren?", - "noEggs": "Du brütest aktuell keine Eier aus!" + "noEggs": "Du brütest aktuell keine Eier aus!", + "donate": "Spenden" } \ No newline at end of file diff --git a/src/locales/fr/battle.json b/src/locales/fr/battle.json index 1c108c89ded..b8da3a953ae 100644 --- a/src/locales/fr/battle.json +++ b/src/locales/fr/battle.json @@ -94,5 +94,6 @@ "retryBattle": "Voulez-vous réessayer depuis le début du combat ?", "unlockedSomething": "{{unlockedThing}}\na été débloqué.", "congratulations": "Félicitations !", - "beatModeFirstTime": "{{speciesName}} a battu le mode {{gameMode}} pour la première fois !\nVous avez reçu {{newModifier}} !" -} \ No newline at end of file + "beatModeFirstTime": "{{speciesName}} a battu le mode {{gameMode}} pour la première fois !\nVous avez reçu {{newModifier}} !", + "eggSkipPrompt": "Aller directement au résumé des Œufs éclos ?" +} diff --git a/src/locales/fr/menu-ui-handler.json b/src/locales/fr/menu-ui-handler.json index 807b34f1315..b8627bf91b5 100644 --- a/src/locales/fr/menu-ui-handler.json +++ b/src/locales/fr/menu-ui-handler.json @@ -25,5 +25,6 @@ "unlinkGoogle": "Délier Google", "cancel": "Retour", "losingProgressionWarning": "Vous allez perdre votre progression depuis le début du combat. Continuer ?", - "noEggs": "Vous ne faites actuellement\néclore aucun Œuf !" -} \ No newline at end of file + "noEggs": "Vous ne faites actuellement\néclore aucun Œuf !", + "donate": "Faire un don" +} diff --git a/src/phases/encounter-phase.ts b/src/phases/encounter-phase.ts index 6e0658d4ccb..3f37095569a 100644 --- a/src/phases/encounter-phase.ts +++ b/src/phases/encounter-phase.ts @@ -161,9 +161,11 @@ export class EncounterPhase extends BattlePhase { return this.scene.reset(true); } this.doEncounter(); + this.scene.resetSeed(); }); } else { this.doEncounter(); + this.scene.resetSeed(); } }); }); diff --git a/src/system/game-data.ts b/src/system/game-data.ts index 29bb6057722..50cc6177a84 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -946,7 +946,7 @@ export class GameData { return ret; } - private getSessionSaveData(scene: BattleScene): SessionSaveData { + public getSessionSaveData(scene: BattleScene): SessionSaveData { return { seed: scene.seed, playTime: scene.sessionPlayTime, diff --git a/src/test/abilities/beast_boost.test.ts b/src/test/abilities/beast_boost.test.ts index cfe015c822e..05645a1231d 100644 --- a/src/test/abilities/beast_boost.test.ts +++ b/src/test/abilities/beast_boost.test.ts @@ -1,15 +1,12 @@ -import { Stat } from "#enums/stat"; -import GameManager from "#test/utils/gameManager"; +import { BattlerIndex } from "#app/battle"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; +import { Stat } from "#enums/stat"; +import GameManager from "#test/utils/gameManager"; +import { SPLASH_ONLY } from "#test/utils/testUtils"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { SPLASH_ONLY } from "../utils/testUtils"; -import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; -import { VictoryPhase } from "#app/phases/victory-phase"; -import { TurnStartPhase } from "#app/phases/turn-start-phase"; -import { BattlerIndex } from "#app/battle"; describe("Abilities - Beast Boost", () => { let phaserGame: Phaser.Game; @@ -37,49 +34,44 @@ describe("Abilities - Beast Boost", () => { .enemyMoveset(SPLASH_ONLY); }); - // Note that both MOXIE and BEAST_BOOST test for their current implementation and not their mainline behavior. it("should prefer highest stat to boost its corresponding stat stage by 1 when winning a battle", async() => { - // SLOWBRO's highest stat is DEF, so it should be picked here - await game.startBattle([ - Species.SLOWBRO - ]); + await game.classicMode.startBattle([Species.SLOWBRO]); const playerPokemon = game.scene.getPlayerPokemon()!; + // Set the pokemon's highest stat to DEF, so it should be picked by Beast Boost + vi.spyOn(playerPokemon, "stats", "get").mockReturnValue([ 10000, 100, 1000, 200, 100, 100 ]); + console.log(playerPokemon.stats); expect(playerPokemon.getStatStage(Stat.DEF)).toBe(0); game.move.select(Moves.FLAMETHROWER); - await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(VictoryPhase); + await game.phaseInterceptor.to("VictoryPhase"); expect(playerPokemon.getStatStage(Stat.DEF)).toBe(1); }, 20000); it("should use in-battle overriden stats when determining the stat stage to raise by 1", async() => { - // If the opponent can GUARD_SPLIT, SLOWBRO's second highest stat should be SPATK game.override.enemyMoveset(new Array(4).fill(Moves.GUARD_SPLIT)); - await game.startBattle([ - Species.SLOWBRO - ]); + await game.classicMode.startBattle([Species.SLOWBRO]); const playerPokemon = game.scene.getPlayerPokemon()!; + // If the opponent uses Guard Split, the pokemon's second highest stat (SPATK) should be chosen + vi.spyOn(playerPokemon, "stats", "get").mockReturnValue([ 10000, 100, 201, 200, 100, 100 ]); expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(0); game.move.select(Moves.FLAMETHROWER); await game.setTurnOrder([ BattlerIndex.ENEMY, BattlerIndex.PLAYER ]); - - await game.phaseInterceptor.runFrom(TurnStartPhase).to(VictoryPhase); + await game.phaseInterceptor.to("VictoryPhase"); expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); }, 20000); it("should have order preference in case of stat ties", async() => { // Order preference follows the order of EFFECTIVE_STAT - await game.startBattle([ - Species.SLOWBRO - ]); + await game.classicMode.startBattle([Species.SLOWBRO]); const playerPokemon = game.scene.getPlayerPokemon()!; @@ -90,7 +82,7 @@ describe("Abilities - Beast Boost", () => { game.move.select(Moves.FLAMETHROWER); - await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(VictoryPhase); + await game.phaseInterceptor.to("VictoryPhase"); expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); }, 20000); diff --git a/src/test/boss-pokemon.test.ts b/src/test/boss-pokemon.test.ts index f8437932580..c6fc276551f 100644 --- a/src/test/boss-pokemon.test.ts +++ b/src/test/boss-pokemon.test.ts @@ -10,7 +10,7 @@ import { EnemyPokemon } from "#app/field/pokemon"; import { toDmgValue } from "#app/utils"; describe("Boss Pokemon / Shields", () => { - const TIMEOUT = 2500; + const TIMEOUT = 20 * 1000; let phaserGame: Phaser.Game; let game: GameManager; diff --git a/src/test/reload.test.ts b/src/test/reload.test.ts new file mode 100644 index 00000000000..0a712fcc7df --- /dev/null +++ b/src/test/reload.test.ts @@ -0,0 +1,137 @@ +import { Species } from "#app/enums/species"; +import { GameModes } from "#app/game-mode"; +import GameManager from "#test/utils/gameManager"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; +import { SPLASH_ONLY } from "./utils/testUtils"; +import { Moves } from "#app/enums/moves"; +import { Biome } from "#app/enums/biome"; + +describe("Reload", () => { + let phaserGame: Phaser.Game; + let game: GameManager; + + beforeAll(() => { + phaserGame = new Phaser.Game({ + type: Phaser.HEADLESS, + }); + }); + + afterEach(() => { + game.phaseInterceptor.restoreOg(); + }); + + beforeEach(() => { + game = new GameManager(phaserGame); + }); + + it("should not have RNG inconsistencies in a Classic run", async () => { + await game.classicMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies after a biome switch", async () => { + game.override + .startingWave(10) + .startingBiome(Biome.CAVE) // Will lead to biomes with randomly generated weather + .battleType("single") + .startingLevel(100) + .enemyLevel(1000) + .disableTrainerWaves() + .moveset([Moves.KOWTOW_CLEAVE]) + .enemyMoveset(SPLASH_ONLY); + await game.dailyMode.startBattle(); + + // Transition from Daily Run Wave 10 to Wave 11 in order to trigger biome switch + game.move.select(Moves.KOWTOW_CLEAVE); + await game.phaseInterceptor.to("DamagePhase"); + await game.doKillOpponents(); + await game.toNextWave(); + expect(game.phaseInterceptor.log).toContain("NewBiomeEncounterPhase"); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run wild Pokemon fight", async () => { + await game.dailyMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run double battle", async () => { + game.override + .battleType("double"); + await game.dailyMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run Gym Leader fight", async () => { + game.override + .battleType("single") + .startingWave(40); + await game.dailyMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run regular trainer fight", async () => { + game.override + .battleType("single") + .startingWave(45); + await game.dailyMode.startBattle(); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); + + it("should not have RNG inconsistencies at a Daily run wave 50 Boss fight", async () => { + game.override + .battleType("single") + .startingWave(50); + await game.runToFinalBossEncounter([Species.BULBASAUR], GameModes.DAILY); + + const preReloadRngState = Phaser.Math.RND.state(); + + await game.reload.reloadSession(); + + const postReloadRngState = Phaser.Math.RND.state(); + + expect(preReloadRngState).toBe(postReloadRngState); + }, 20000); +}); diff --git a/src/test/utils/gameManager.ts b/src/test/utils/gameManager.ts index 6724e05521c..998d10ddf12 100644 --- a/src/test/utils/gameManager.ts +++ b/src/test/utils/gameManager.ts @@ -45,6 +45,8 @@ import { ChallengeModeHelper } from "./helpers/challengeModeHelper"; import { MoveHelper } from "./helpers/moveHelper"; import { OverridesHelper } from "./helpers/overridesHelper"; import { SettingsHelper } from "./helpers/settingsHelper"; +import { ReloadHelper } from "./helpers/reloadHelper"; +import { CheckSwitchPhase } from "#app/phases/check-switch-phase"; /** * Class to manage the game state and transitions between phases. @@ -61,6 +63,7 @@ export default class GameManager { public readonly dailyMode: DailyModeHelper; public readonly challengeMode: ChallengeModeHelper; public readonly settings: SettingsHelper; + public readonly reload: ReloadHelper; /** * Creates an instance of GameManager. @@ -82,6 +85,7 @@ export default class GameManager { this.dailyMode = new DailyModeHelper(this); this.challengeMode = new ChallengeModeHelper(this); this.settings = new SettingsHelper(this); + this.reload = new ReloadHelper(this); } /** @@ -231,12 +235,12 @@ export default class GameManager { this.onNextPrompt("SelectModifierPhase", Mode.MODIFIER_SELECT, () => { const handler = this.scene.ui.getHandler() as ModifierSelectUiHandler; handler.processInput(Button.CANCEL); - }, () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(NewBattlePhase), true); + }, () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(NewBattlePhase) || this.isCurrentPhase(CheckSwitchPhase), true); this.onNextPrompt("SelectModifierPhase", Mode.CONFIRM, () => { const handler = this.scene.ui.getHandler() as ModifierSelectUiHandler; handler.processInput(Button.ACTION); - }, () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(NewBattlePhase)); + }, () => this.isCurrentPhase(CommandPhase) || this.isCurrentPhase(NewBattlePhase) || this.isCurrentPhase(CheckSwitchPhase)); } forceOpponentToSwitch() { diff --git a/src/test/utils/helpers/reloadHelper.ts b/src/test/utils/helpers/reloadHelper.ts new file mode 100644 index 00000000000..c15347b08c9 --- /dev/null +++ b/src/test/utils/helpers/reloadHelper.ts @@ -0,0 +1,53 @@ +import { GameManagerHelper } from "./gameManagerHelper"; +import { TitlePhase } from "#app/phases/title-phase"; +import { Mode } from "#app/ui/ui"; +import { vi } from "vitest"; +import { BattleStyle } from "#app/enums/battle-style"; +import { CommandPhase } from "#app/phases/command-phase"; +import { TurnInitPhase } from "#app/phases/turn-init-phase"; + +/** + * Helper to allow reloading sessions in unit tests. + */ +export class ReloadHelper extends GameManagerHelper { + /** + * Simulate reloading the session from the title screen, until reaching the + * beginning of the first turn (equivalent to running `startBattle()`) for + * the reloaded session. + */ + async reloadSession() : Promise { + const scene = this.game.scene; + const sessionData = scene.gameData.getSessionSaveData(scene); + const titlePhase = new TitlePhase(scene); + + scene.clearPhaseQueue(); + + // Set the last saved session to the desired session data + vi.spyOn(scene.gameData, "getSession").mockReturnValue( + new Promise((resolve, reject) => { + resolve(sessionData); + }) + ); + scene.unshiftPhase(titlePhase); + this.game.endPhase(); // End the currently ongoing battle + + titlePhase.loadSaveSlot(-1); // Load the desired session data + this.game.phaseInterceptor.shift(); // Loading the save slot also ended TitlePhase, clean it up + + // Run through prompts for switching Pokemon, copied from classicModeHelper.ts + if (this.game.scene.battleStyle === BattleStyle.SWITCH) { + this.game.onNextPrompt("CheckSwitchPhase", Mode.CONFIRM, () => { + this.game.setMode(Mode.MESSAGE); + this.game.endPhase(); + }, () => this.game.isCurrentPhase(CommandPhase) || this.game.isCurrentPhase(TurnInitPhase)); + + this.game.onNextPrompt("CheckSwitchPhase", Mode.CONFIRM, () => { + this.game.setMode(Mode.MESSAGE); + this.game.endPhase(); + }, () => this.game.isCurrentPhase(CommandPhase) || this.game.isCurrentPhase(TurnInitPhase)); + } + + await this.game.phaseInterceptor.to(CommandPhase); + console.log("==================[New Turn]=================="); + } +} diff --git a/src/test/utils/phaseInterceptor.ts b/src/test/utils/phaseInterceptor.ts index c342ef2c483..22bbeee772e 100644 --- a/src/test/utils/phaseInterceptor.ts +++ b/src/test/utils/phaseInterceptor.ts @@ -12,12 +12,14 @@ import { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { EvolutionPhase } from "#app/phases/evolution-phase"; import { FaintPhase } from "#app/phases/faint-phase"; import { LearnMovePhase } from "#app/phases/learn-move-phase"; +import { LevelCapPhase } from "#app/phases/level-cap-phase"; import { LoginPhase } from "#app/phases/login-phase"; import { MessagePhase } from "#app/phases/message-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MovePhase } from "#app/phases/move-phase"; import { NewBattlePhase } from "#app/phases/new-battle-phase"; +import { NewBiomeEncounterPhase } from "#app/phases/new-biome-encounter-phase"; import { NextEncounterPhase } from "#app/phases/next-encounter-phase"; import { PostSummonPhase } from "#app/phases/post-summon-phase"; import { QuietFormChangePhase } from "#app/phases/quiet-form-change-phase"; @@ -63,6 +65,7 @@ export default class PhaseInterceptor { [TitlePhase, this.startPhase], [SelectGenderPhase, this.startPhase], [EncounterPhase, this.startPhase], + [NewBiomeEncounterPhase, this.startPhase], [SelectStarterPhase, this.startPhase], [PostSummonPhase, this.startPhase], [SummonPhase, this.startPhase], @@ -98,6 +101,7 @@ export default class PhaseInterceptor { [PartyHealPhase, this.startPhase], [EvolutionPhase, this.startPhase], [EndEvolutionPhase, this.startPhase], + [LevelCapPhase, this.startPhase], ]; private endBySetMode = [ @@ -239,6 +243,22 @@ export default class PhaseInterceptor { this.scene.shiftPhase(); } + /** + * Remove the current phase from the phase interceptor. + * + * Do not call this unless absolutely necessary. This function is intended + * for cleaning up the phase interceptor when, for whatever reason, a phase + * is manually ended without using the phase interceptor. + * + * @param shouldRun Whether or not the current scene should also be run. + */ + shift(shouldRun: boolean = false) : void { + this.onHold.shift(); + if (shouldRun) { + this.scene.shiftPhase(); + } + } + /** * Method to initialize phases and their corresponding methods. */ diff --git a/src/timed-event-manager.ts b/src/timed-event-manager.ts index abdb2db232a..874bf6a8b46 100644 --- a/src/timed-event-manager.ts +++ b/src/timed-event-manager.ts @@ -33,7 +33,7 @@ const timedEvents: TimedEvent[] = [ xPosition: 19, yPosition: 115, scale: 0.30, - availableLangs: ["en", "de", "it", "fr", "ja", "ko", "es", "pt_BR", "zh_CN"] + availableLangs: ["en", "de", "it", "fr", "ja", "ko", "es", "pt-BR", "zh-CN"] } ];