Various updates and changes

This commit is contained in:
Flashfyre 2023-03-31 16:04:39 -04:00
parent dbc4661507
commit 0effdfa7fb
24 changed files with 4428 additions and 3425 deletions

241
package-lock.json generated
View File

@ -8,13 +8,26 @@
"name": "phaser3-vite-template", "name": "phaser3-vite-template",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"phaser": "^3.55.2" "phaser": "^3.55.2",
"phaser3-rex-plugins": "^1.1.84"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.25.0", "eslint": "^8.25.0",
"json-beautify": "^1.1.1",
"vite": "^3.1.0" "vite": "^3.1.0"
} }
}, },
"node_modules/@babel/runtime": {
"version": "7.21.0",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz",
"integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==",
"dependencies": {
"regenerator-runtime": "^0.13.11"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@esbuild/android-arm": { "node_modules/@esbuild/android-arm": {
"version": "0.15.11", "version": "0.15.11",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.11.tgz",
@ -272,8 +285,7 @@
"node_modules/argparse": { "node_modules/argparse": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
"dev": true
}, },
"node_modules/array-union": { "node_modules/array-union": {
"version": "2.1.0", "version": "2.1.0",
@ -377,6 +389,14 @@
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true "dev": true
}, },
"node_modules/cross-fetch": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
"dependencies": {
"node-fetch": "2.6.7"
}
},
"node_modules/cross-spawn": { "node_modules/cross-spawn": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -1209,6 +1229,36 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/i18next": {
"version": "22.4.13",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-22.4.13.tgz",
"integrity": "sha512-GX7flMHRRqQA0I1yGLmaZ4Hwt1JfLqagk8QPDPZsqekbKtXsuIngSVWM/s3SLgNkrEXjA+0sMGNuOEkkmyqmWg==",
"funding": [
{
"type": "individual",
"url": "https://locize.com"
},
{
"type": "individual",
"url": "https://locize.com/i18next.html"
},
{
"type": "individual",
"url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"
}
],
"dependencies": {
"@babel/runtime": "^7.20.6"
}
},
"node_modules/i18next-http-backend": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.2.0.tgz",
"integrity": "sha512-Z4sM7R6tzdLknSPER9GisEBxKPg5FkI07UrQniuroZmS15PHQrcCPLyuGKj8SS68tf+O2aEDYSUnmy1TZqZSbw==",
"dependencies": {
"cross-fetch": "3.1.5"
}
},
"node_modules/ignore": { "node_modules/ignore": {
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
@ -1316,7 +1366,6 @@
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"dependencies": { "dependencies": {
"argparse": "^2.0.1" "argparse": "^2.0.1"
}, },
@ -1324,6 +1373,15 @@
"js-yaml": "bin/js-yaml.js" "js-yaml": "bin/js-yaml.js"
} }
}, },
"node_modules/json-beautify": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/json-beautify/-/json-beautify-1.1.1.tgz",
"integrity": "sha512-17j+Hk2lado0xqKtUcyAjK0AtoHnPSIgktWRsEXgdFQFG9UnaGw6CHa0J7xsvulxRpFl6CrkDFHght1p5ZJc4A==",
"dev": true,
"bin": {
"json-beautify": "bin/json-beautify"
}
},
"node_modules/json-schema-traverse": { "node_modules/json-schema-traverse": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@ -1428,6 +1486,25 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
"dev": true "dev": true
}, },
"node_modules/node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/once": { "node_modules/once": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@ -1484,6 +1561,11 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/papaparse": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz",
"integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw=="
},
"node_modules/parent-module": { "node_modules/parent-module": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@ -1556,6 +1638,24 @@
"path": "^0.12.7" "path": "^0.12.7"
} }
}, },
"node_modules/phaser3-rex-plugins": {
"version": "1.1.84",
"resolved": "https://registry.npmjs.org/phaser3-rex-plugins/-/phaser3-rex-plugins-1.1.84.tgz",
"integrity": "sha512-q+EIcQKljC99px+Gckuh00/xs3PyXFL3pUTXHsEO6xWnb4kooTlo1VMUQjpRHxC+JZHyzC44clksN8XVz398Qg==",
"dependencies": {
"eventemitter3": "^3.1.2",
"i18next": "^22.4.9",
"i18next-http-backend": "^2.1.1",
"js-yaml": "^4.1.0",
"papaparse": "^5.3.2",
"webfontloader": "^1.6.28"
}
},
"node_modules/phaser3-rex-plugins/node_modules/eventemitter3": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz",
"integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q=="
},
"node_modules/picocolors": { "node_modules/picocolors": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
@ -1644,6 +1744,11 @@
} }
] ]
}, },
"node_modules/regenerator-runtime": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
},
"node_modules/regexpp": { "node_modules/regexpp": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
@ -1893,6 +1998,11 @@
"node": ">=8.0" "node": ">=8.0"
} }
}, },
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"node_modules/type-check": { "node_modules/type-check": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@ -1975,6 +2085,25 @@
} }
} }
}, },
"node_modules/webfontloader": {
"version": "1.6.28",
"resolved": "https://registry.npmjs.org/webfontloader/-/webfontloader-1.6.28.tgz",
"integrity": "sha512-Egb0oFEga6f+nSgasH3E0M405Pzn6y3/9tOVanv/DLfa1YBIgcv90L18YyWnvXkRbIM17v5Kv6IT2N6g1x5tvQ=="
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/which": { "node_modules/which": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
@ -2019,6 +2148,14 @@
} }
}, },
"dependencies": { "dependencies": {
"@babel/runtime": {
"version": "7.21.0",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz",
"integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==",
"requires": {
"regenerator-runtime": "^0.13.11"
}
},
"@esbuild/android-arm": { "@esbuild/android-arm": {
"version": "0.15.11", "version": "0.15.11",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.11.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.11.tgz",
@ -2203,8 +2340,7 @@
"argparse": { "argparse": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
"dev": true
}, },
"array-union": { "array-union": {
"version": "2.1.0", "version": "2.1.0",
@ -2290,6 +2426,14 @@
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true "dev": true
}, },
"cross-fetch": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
"requires": {
"node-fetch": "2.6.7"
}
},
"cross-spawn": { "cross-spawn": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@ -2816,6 +2960,22 @@
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true "dev": true
}, },
"i18next": {
"version": "22.4.13",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-22.4.13.tgz",
"integrity": "sha512-GX7flMHRRqQA0I1yGLmaZ4Hwt1JfLqagk8QPDPZsqekbKtXsuIngSVWM/s3SLgNkrEXjA+0sMGNuOEkkmyqmWg==",
"requires": {
"@babel/runtime": "^7.20.6"
}
},
"i18next-http-backend": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.2.0.tgz",
"integrity": "sha512-Z4sM7R6tzdLknSPER9GisEBxKPg5FkI07UrQniuroZmS15PHQrcCPLyuGKj8SS68tf+O2aEDYSUnmy1TZqZSbw==",
"requires": {
"cross-fetch": "3.1.5"
}
},
"ignore": { "ignore": {
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
@ -2899,11 +3059,16 @@
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"requires": { "requires": {
"argparse": "^2.0.1" "argparse": "^2.0.1"
} }
}, },
"json-beautify": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/json-beautify/-/json-beautify-1.1.1.tgz",
"integrity": "sha512-17j+Hk2lado0xqKtUcyAjK0AtoHnPSIgktWRsEXgdFQFG9UnaGw6CHa0J7xsvulxRpFl6CrkDFHght1p5ZJc4A==",
"dev": true
},
"json-schema-traverse": { "json-schema-traverse": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@ -2984,6 +3149,14 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
"dev": true "dev": true
}, },
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"once": { "once": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@ -3025,6 +3198,11 @@
"p-limit": "^3.0.2" "p-limit": "^3.0.2"
} }
}, },
"papaparse": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz",
"integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw=="
},
"parent-module": { "parent-module": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@ -3082,6 +3260,26 @@
"path": "^0.12.7" "path": "^0.12.7"
} }
}, },
"phaser3-rex-plugins": {
"version": "1.1.84",
"resolved": "https://registry.npmjs.org/phaser3-rex-plugins/-/phaser3-rex-plugins-1.1.84.tgz",
"integrity": "sha512-q+EIcQKljC99px+Gckuh00/xs3PyXFL3pUTXHsEO6xWnb4kooTlo1VMUQjpRHxC+JZHyzC44clksN8XVz398Qg==",
"requires": {
"eventemitter3": "^3.1.2",
"i18next": "^22.4.9",
"i18next-http-backend": "^2.1.1",
"js-yaml": "^4.1.0",
"papaparse": "^5.3.2",
"webfontloader": "^1.6.28"
},
"dependencies": {
"eventemitter3": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz",
"integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q=="
}
}
},
"picocolors": { "picocolors": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
@ -3128,6 +3326,11 @@
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
"dev": true "dev": true
}, },
"regenerator-runtime": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
},
"regexpp": { "regexpp": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
@ -3290,6 +3493,11 @@
"is-number": "^7.0.0" "is-number": "^7.0.0"
} }
}, },
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"type-check": { "type-check": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@ -3335,6 +3543,25 @@
"rollup": "~2.78.0" "rollup": "~2.78.0"
} }
}, },
"webfontloader": {
"version": "1.6.28",
"resolved": "https://registry.npmjs.org/webfontloader/-/webfontloader-1.6.28.tgz",
"integrity": "sha512-Egb0oFEga6f+nSgasH3E0M405Pzn6y3/9tOVanv/DLfa1YBIgcv90L18YyWnvXkRbIM17v5Kv6IT2N6g1x5tvQ=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"which": { "which": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",

View File

@ -10,9 +10,11 @@
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.25.0", "eslint": "^8.25.0",
"json-beautify": "^1.1.1",
"vite": "^3.1.0" "vite": "^3.1.0"
}, },
"dependencies": { "dependencies": {
"phaser": "^3.55.2" "phaser": "^3.55.2",
"phaser3-rex-plugins": "^1.1.84"
} }
} }

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 616 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 613 B

View File

@ -35,8 +35,25 @@ export class EncounterPhase extends BattlePhase {
start() { start() {
super.start(); super.start();
const battle = this.scene.currentBattle;
const enemySpecies = this.scene.arena.randomSpecies(1, battle.enemyLevel);
battle.enemyPokemon = new EnemyPokemon(this.scene, enemySpecies, battle.enemyLevel);
const enemyPokemon = this.scene.getEnemyPokemon(); const enemyPokemon = this.scene.getEnemyPokemon();
console.log(enemyPokemon.species.name, enemyPokemon.species.speciesId, enemyPokemon.stats);
enemyPokemon.loadAssets().then(() => {
this.scene.field.add(enemyPokemon);
if (this.scene.getPlayerPokemon().visible)
this.scene.field.moveBelow(enemyPokemon, this.scene.getPlayerPokemon());
enemyPokemon.tint(0, 0.5); enemyPokemon.tint(0, 0.5);
this.doEncounter();
});
this.scene.load.start();
}
doEncounter() {
const enemyPokemon = this.scene.getEnemyPokemon();
this.scene.tweens.add({ this.scene.tweens.add({
targets: [ this.scene.arenaEnemy, enemyPokemon, this.scene.arenaPlayer, this.scene.trainer ], targets: [ this.scene.arenaEnemy, enemyPokemon, this.scene.arenaPlayer, this.scene.trainer ],
x: (_target, _key, value, targetIndex: integer) => targetIndex < 2 ? value + 300 : value - 300, x: (_target, _key, value, targetIndex: integer) => targetIndex < 2 ? value + 300 : value - 300,
@ -60,38 +77,26 @@ export class EncounterPhase extends BattlePhase {
} }
} }
export class NextEncounterPhase extends BattlePhase { export class NextEncounterPhase extends EncounterPhase {
constructor(scene: BattleScene) { constructor(scene: BattleScene) {
super(scene); super(scene);
} }
start() { doEncounter(): void {
super.start(); const enemyPokemon = this.scene.getEnemyPokemon();
console.log(this.scene.getPlayerPokemon(), this.scene.getParty().map(p => p.name), this.scene.getPlayerPokemon().id)
this.scene.getEnemyPokemon().destroy();
const newEnemyPokemon = new EnemyPokemon(this.scene, this.scene.randomSpecies(true), this.scene.getLevelForNextWave());
newEnemyPokemon.loadAssets().then(() => {
this.scene.newBattle(newEnemyPokemon);
this.scene.field.add(newEnemyPokemon);
this.scene.field.moveBelow(newEnemyPokemon, this.scene.getPlayerPokemon());
newEnemyPokemon.tint(0, 0.5);
this.scene.tweens.add({ this.scene.tweens.add({
targets: [ this.scene.arenaEnemy, this.scene.arenaEnemy2, newEnemyPokemon ], targets: [ this.scene.arenaEnemy, this.scene.arenaNextEnemy, enemyPokemon ],
x: '+=300', x: '+=300',
duration: 2000, duration: 2000,
onComplete: () => { onComplete: () => {
this.scene.arenaEnemy.setX(this.scene.arenaEnemy2.x); this.scene.arenaEnemy.setX(this.scene.arenaNextEnemy.x);
this.scene.arenaEnemy2.setX(this.scene.arenaEnemy2.x - 300); this.scene.arenaNextEnemy.setX(this.scene.arenaNextEnemy.x - 300);
newEnemyPokemon.untint(100, 'Sine.easeOut'); enemyPokemon.untint(100, 'Sine.easeOut');
newEnemyPokemon.cry(); enemyPokemon.cry();
newEnemyPokemon.showInfo(); enemyPokemon.showInfo();
this.scene.ui.showText(`A wild ${newEnemyPokemon.name} appeared!`, null, () => this.end(), 1500); this.scene.ui.showText(`A wild ${enemyPokemon.name} appeared!`, null, () => this.end(), 1500);
} }
}); });
});
this.scene.load.start();
} }
end() { end() {
@ -104,6 +109,81 @@ export class NextEncounterPhase extends BattlePhase {
} }
} }
export class NewBiomeEncounterPhase extends NextEncounterPhase {
constructor(scene: BattleScene) {
super(scene);
}
doEncounter(): void {
const enemyPokemon = this.scene.getEnemyPokemon();
this.scene.tweens.add({
targets: [ this.scene.arenaEnemy, enemyPokemon ],
x: (_target, _key, value, targetIndex: integer) => targetIndex < 2 ? value + 300 : value - 300,
duration: 2000,
onComplete: () => {
enemyPokemon.untint(100, 'Sine.easeOut');
enemyPokemon.cry();
enemyPokemon.showInfo();
this.scene.ui.showText(`A wild ${enemyPokemon.name} appeared!`, null, () => this.end(), 1500);
}
});
}
}
export class SwitchBiomePhase extends BattlePhase {
constructor(scene: BattleScene) {
super(scene);
}
start() {
super.start();
this.scene.arena.fadeOutBgm(2000);
this.scene.tweens.add({
targets: this.scene.arenaEnemy,
x: '+=300',
duration: 2000,
onComplete: () => {
this.scene.arenaEnemy.setX(this.scene.arenaEnemy.x - 600);
this.scene.newBiome();
const biomeKey = this.scene.arena.getBiomeKey();
const bgTexture = `${biomeKey}_bg`;
const playerTexture = `${biomeKey}_a`;
const enemyTexture = `${biomeKey}_b`;
this.scene.arenaBgTransition.setTexture(bgTexture)
this.scene.arenaBgTransition.setAlpha(0);
this.scene.arenaBgTransition.setVisible(true);
this.scene.arenaPlayerTransition.setTexture(playerTexture)
this.scene.arenaPlayerTransition.setAlpha(0);
this.scene.arenaPlayerTransition.setVisible(true);
this.scene.time.delayedCall(1000, () => this.scene.arena.playBgm());
this.scene.tweens.add({
targets: [ this.scene.arenaBgTransition, this.scene.arenaPlayerTransition ],
duration: 1000,
delay: 1000,
ease: 'Sine.easeInOut',
alpha: 1,
onComplete: () => {
this.scene.arenaBg.setTexture(bgTexture);
this.scene.arenaPlayer.setTexture(playerTexture);
this.scene.arenaEnemy.setTexture(enemyTexture);
this.scene.arenaNextEnemy.setTexture(enemyTexture);
this.scene.arenaBgTransition.setVisible(false);
this.scene.arenaPlayerTransition.setVisible(false);
this.end();
}
})
}
});
}
}
export class SummonPhase extends BattlePhase { export class SummonPhase extends BattlePhase {
constructor(scene: BattleScene) { constructor(scene: BattleScene) {
super(scene); super(scene);
@ -536,7 +616,7 @@ export class VictoryPhase extends PokemonPhase {
} }
} }
this.scene.unshiftPhase(new SelectModifierPhase(this.scene)); this.scene.unshiftPhase(new SelectModifierPhase(this.scene));
this.scene.unshiftPhase(new NextEncounterPhase(this.scene)); this.scene.newBattle();
this.end(); this.end();
} }
@ -587,7 +667,7 @@ export class ExpPhase extends PartyMemberPokemonPhase {
pokemon.addExp(exp.value); pokemon.addExp(exp.value);
newLevel = pokemon.level; newLevel = pokemon.level;
if (newLevel > lastLevel) if (newLevel > lastLevel)
this.scene.unshiftPhase(new LevelUpPhase(this.scene, newLevel)); this.scene.unshiftPhase(new LevelUpPhase(this.scene, this.partyMemberIndex, newLevel));
pokemon.updateInfo(() => this.end()); pokemon.updateInfo(() => this.end());
}, null, true); }, null, true);
} }
@ -595,11 +675,11 @@ export class ExpPhase extends PartyMemberPokemonPhase {
} }
export class LevelUpPhase extends PokemonPhase { export class LevelUpPhase extends PartyMemberPokemonPhase {
private level: integer; private level: integer;
constructor(scene: BattleScene, level: integer) { constructor(scene: BattleScene, partyMemberIndex: integer, level: integer) {
super(scene, true); super(scene, partyMemberIndex);
this.level = level; this.level = level;
} }
@ -622,18 +702,18 @@ export class LevelUpPhase extends PokemonPhase {
continue; continue;
else if (level > this.level) else if (level > this.level)
break; break;
this.scene.unshiftPhase(new LearnMovePhase(this.scene, lm[1])); this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, lm[1]));
} }
} }
this.scene.time.delayedCall(1500, () => this.scene.resumeBgm()); this.scene.time.delayedCall(1500, () => this.scene.resumeBgm());
} }
} }
export class LearnMovePhase extends PokemonPhase { export class LearnMovePhase extends PartyMemberPokemonPhase {
private moveId: Move; private moveId: Move;
constructor(scene: BattleScene, moveId: Move) { constructor(scene: BattleScene, partyMemberIndex: integer, moveId: Move) {
super(scene, true); super(scene, partyMemberIndex);
this.moveId = moveId; this.moveId = moveId;
} }
@ -813,7 +893,7 @@ export class SelectModifierPhase extends BattlePhase {
regenerateModifierPoolThresholds(this.scene.getParty()); regenerateModifierPoolThresholds(this.scene.getParty());
const modifierCount = new Utils.IntegerHolder(3); const modifierCount = new Utils.IntegerHolder(3);
this.scene.applyModifiers(ExtraModifierModifier, modifierCount); this.scene.applyModifiers(ExtraModifierModifier, modifierCount);
const types: Array<ModifierType> = getModifierTypesForWave(this.scene.waveIndex, modifierCount.value); const types: Array<ModifierType> = getModifierTypesForWave(this.scene.currentBattle.waveIndex, modifierCount.value);
this.scene.ui.setMode(Mode.MODIFIER_SELECT, types, (cursor: integer) => { this.scene.ui.setMode(Mode.MODIFIER_SELECT, types, (cursor: integer) => {
if (cursor < 0) { if (cursor < 0) {
@ -828,7 +908,7 @@ export class SelectModifierPhase extends BattlePhase {
this.scene.ui.setModeWithoutClear(Mode.PARTY, false, (slotIndex: integer) => { this.scene.ui.setModeWithoutClear(Mode.PARTY, false, (slotIndex: integer) => {
if (slotIndex < 6) { if (slotIndex < 6) {
this.scene.ui.setMode(Mode.MODIFIER_SELECT); this.scene.ui.setMode(Mode.MODIFIER_SELECT);
this.scene.addModifier(types[cursor].newModifier(this.scene.getParty()[slotIndex].id)); this.scene.addModifier(types[cursor].newModifier(this.scene.getParty()[slotIndex]));
this.scene.ui.setMode(Mode.MESSAGE); this.scene.ui.setMode(Mode.MESSAGE);
super.end(); super.end();
} else } else

View File

@ -1,7 +1,7 @@
import Phaser from 'phaser'; import Phaser from 'phaser';
import { Biome, BiomeArena } from './biome'; import { Biome, BiomeArena } from './biome';
import UI from './ui/ui'; import UI from './ui/ui';
import { BattlePhase, EncounterPhase, SummonPhase, CommandPhase } from './battle-phase'; import { BattlePhase, EncounterPhase, SummonPhase, CommandPhase, NextEncounterPhase, SwitchBiomePhase, NewBiomeEncounterPhase } from './battle-phase';
import { PlayerPokemon, EnemyPokemon } from './pokemon'; import { PlayerPokemon, EnemyPokemon } from './pokemon';
import PokemonSpecies, { allSpecies, getPokemonSpecies } from './pokemon-species'; import PokemonSpecies, { allSpecies, getPokemonSpecies } from './pokemon-species';
import * as Utils from './utils'; import * as Utils from './utils';
@ -13,18 +13,21 @@ import { Battle } from './battle';
export default class BattleScene extends Phaser.Scene { export default class BattleScene extends Phaser.Scene {
private auto: boolean; private auto: boolean;
private autoSpeed: integer = 3; private autoSpeed: integer = 10;
private phaseQueue: Array<BattlePhase>; private phaseQueue: Array<BattlePhase>;
private phaseQueuePrepend: Array<BattlePhase>; private phaseQueuePrepend: Array<BattlePhase>;
private currentPhase: BattlePhase; private currentPhase: BattlePhase;
private arena: BiomeArena;
public field: Phaser.GameObjects.Container; public field: Phaser.GameObjects.Container;
public fieldUI: Phaser.GameObjects.Container; public fieldUI: Phaser.GameObjects.Container;
public arenaBg: Phaser.GameObjects.Image; public arenaBg: Phaser.GameObjects.Image;
public arenaBgTransition: Phaser.GameObjects.Image;
public arenaPlayer: Phaser.GameObjects.Image; public arenaPlayer: Phaser.GameObjects.Image;
public arenaPlayerTransition: Phaser.GameObjects.Image;
public arenaEnemy: Phaser.GameObjects.Image; public arenaEnemy: Phaser.GameObjects.Image;
public arenaEnemy2: Phaser.GameObjects.Image; public arenaEnemyTransition: Phaser.GameObjects.Image;
public arenaNextEnemy: Phaser.GameObjects.Image;
public arena: BiomeArena;
public trainer: Phaser.GameObjects.Sprite; public trainer: Phaser.GameObjects.Sprite;
public currentBattle: Battle; public currentBattle: Battle;
public pokeballCounts = Object.fromEntries(Utils.getEnumValues(PokeballType).map(t => [ t, 0 ])); public pokeballCounts = Object.fromEntries(Utils.getEnumValues(PokeballType).map(t => [ t, 0 ]));
@ -176,22 +179,24 @@ export default class BattleScene extends Phaser.Scene {
this.field = field; this.field = field;
// Init arena this.newBiome();
const arenas = Utils.getEnumValues(Biome).map(at => new BiomeArena(this, at, Biome[at].toLowerCase()));
const arena = arenas[Utils.randInt(11)];
this.arena = arena; const biomeKey = this.arena.getBiomeKey();
this.arenaBg = this.add.sprite(0, 0, `${biomeKey}_bg`);
this.arenaBgTransition = this.add.sprite(0, 0, `${biomeKey}_bg`);
this.arenaPlayer = this.add.sprite(340, 20, `${biomeKey}_a`);
this.arenaPlayerTransition = this.add.sprite(40, 20, `${biomeKey}_a`);
this.arenaEnemy = this.add.sprite(-240, 13, `${biomeKey}_b`);
this.arenaNextEnemy = this.add.sprite(-240, 13, `${biomeKey}_b`);
this.arenaBg = this.add.image(0, 0, `${Biome[arena.biomeType].toLowerCase()}_bg`); this.arenaBgTransition.setVisible(false);
this.arenaPlayer = this.add.image(340, 20, `${Biome[arena.biomeType].toLowerCase()}_a`); this.arenaPlayerTransition.setVisible(false);
this.arenaEnemy = this.add.image(-240, 13, `${Biome[arena.biomeType].toLowerCase()}_b`);
this.arenaEnemy2 = this.add.image(-240, 13, `${Biome[arena.biomeType].toLowerCase()}_b`);
[this.arenaBg, this.arenaPlayer, this.arenaEnemy, this.arenaEnemy2].forEach(a => { [this.arenaBg, this.arenaBgTransition, this.arenaPlayer, this.arenaPlayerTransition, this.arenaEnemy, this.arenaNextEnemy].forEach(a => {
a.setOrigin(0, 0); a.setOrigin(0, 0);
field.add(a); field.add(a);
}); });
//arena.playBgm(); this.arena.playBgm();
const fieldUI = this.add.container(0, this.game.canvas.height); const fieldUI = this.add.container(0, this.game.canvas.height);
fieldUI.setScale(6); fieldUI.setScale(6);
@ -222,19 +227,7 @@ export default class BattleScene extends Phaser.Scene {
this.party.push(playerPokemon); this.party.push(playerPokemon);
} }
const enemySpecies = arena.randomSpecies(1);
console.log(enemySpecies.name);
const enemyPokemon = new EnemyPokemon(this, enemySpecies, this.getLevelForNextWave());
loadPokemonAssets.push(enemyPokemon.loadAssets());
this.add.existing(enemyPokemon);
this.newBattle(enemyPokemon);
field.add(enemyPokemon);
console.log(this.getPlayerPokemon().species.name, this.getPlayerPokemon().species.speciesId, this.getPlayerPokemon().stats); console.log(this.getPlayerPokemon().species.name, this.getPlayerPokemon().species.speciesId, this.getPlayerPokemon().stats);
console.log(enemyPokemon.species.name, enemyPokemon.species.speciesId, enemyPokemon.stats);
const trainerPbFrameNames = this.anims.generateFrameNames('trainer_m_pb', { zeroPad: 2, start: 1, end: 12 }); const trainerPbFrameNames = this.anims.generateFrameNames('trainer_m_pb', { zeroPad: 2, start: 1, end: 12 });
this.anims.create({ this.anims.create({
@ -276,7 +269,7 @@ export default class BattleScene extends Phaser.Scene {
if (this.auto) if (this.auto)
initAutoPlay.apply(this, [ this.autoSpeed ]); initAutoPlay.apply(this, [ this.autoSpeed ]);
this.phaseQueue.push(new EncounterPhase(this), new SummonPhase(this)); this.newBattle();
this.shiftPhase(); this.shiftPhase();
}); });
@ -299,27 +292,36 @@ export default class BattleScene extends Phaser.Scene {
return this.currentBattle.enemyPokemon; return this.currentBattle.enemyPokemon;
} }
newBattle(enemyPokemon: EnemyPokemon): Battle { newBattle(): Battle {
this.currentBattle = new Battle((this.currentBattle?.waveIndex || 0) + 1, enemyPokemon); if (this.currentBattle) {
console.log(this.getPlayerPokemon(), this.getParty().map(p => p.name), this.getPlayerPokemon().id)
this.getEnemyPokemon().destroy();
if (this.currentBattle.waveIndex % 10)
this.unshiftPhase(new NextEncounterPhase(this));
else {
this.unshiftPhase(new SwitchBiomePhase(this));
this.unshiftPhase(new NewBiomeEncounterPhase(this));
}
} else {
this.pushPhase(new EncounterPhase(this));
this.pushPhase(new SummonPhase(this));
}
this.currentBattle = new Battle((this.currentBattle?.waveIndex || 0) + 1);
return this.currentBattle; return this.currentBattle;
} }
randomSpecies(fromArenaPool?: boolean): PokemonSpecies { newBiome(): BiomeArena {
return fromArenaPool const biome = Utils.randInt(20) as Biome;
? this.arena.randomSpecies(1) this.arena = new BiomeArena(this, biome, Biome[biome].toLowerCase());
: allSpecies[(Utils.randInt(allSpecies.length)) - 1]; return this.arena;
} }
getLevelForNextWave() { randomSpecies(level: integer, fromArenaPool?: boolean): PokemonSpecies {
const waveIndex = (this.currentBattle?.waveIndex || 0) + 1; return fromArenaPool
let averageLevel = 1 + waveIndex * 0.25; ? this.arena.randomSpecies(1, level)
: allSpecies[(Utils.randInt(allSpecies.length)) - 1];
if (waveIndex % 10 === 0)
return Math.floor(averageLevel * 1.25);
const deviation = 10 / waveIndex;
return Math.max(Math.round(averageLevel + Utils.randGauss(deviation)), 1);
} }
checkInput(): boolean { checkInput(): boolean {
@ -346,10 +348,8 @@ export default class BattleScene extends Phaser.Scene {
} }
playBgm(bgmName: string): void { playBgm(bgmName: string): void {
if (this.bgm) { if (this.bgm && this.bgm.isPlaying)
this.bgm.stop(); this.bgm.stop();
this.bgm.destroy();
}
this.bgm = this.sound.add(bgmName, { loop: true }); this.bgm = this.sound.add(bgmName, { loop: true });
this.bgm.play(); this.bgm.play();
} }

View File

@ -1,21 +1,33 @@
import { EnemyPokemon, PlayerPokemon } from "./pokemon"; import { EnemyPokemon, PlayerPokemon } from "./pokemon";
import * as Utils from "./utils";
export class Battle { export class Battle {
public waveIndex: integer; public waveIndex: integer;
public enemyLevel: integer;
public enemyPokemon: EnemyPokemon; public enemyPokemon: EnemyPokemon;
public playerParticipantIds: Set<integer> = new Set<integer>(); public playerParticipantIds: Set<integer> = new Set<integer>();
constructor(waveIndex: integer, enemyPokemon: EnemyPokemon) { constructor(waveIndex: integer) {
this.waveIndex = waveIndex; this.waveIndex = waveIndex;
this.enemyPokemon = enemyPokemon; this.enemyLevel = this.getLevelForWave();
} }
addParticipant(playerPokemon: PlayerPokemon) { private getLevelForWave(): number {
console.log('add participant', playerPokemon.name) let averageLevel = 1 + this.waveIndex * 0.5;
if (!(this.waveIndex % 10))
return Math.floor(averageLevel * 1.25);
const deviation = 10 / this.waveIndex;
return Math.max(Math.round(averageLevel + Utils.randGauss(deviation)), 1);
}
addParticipant(playerPokemon: PlayerPokemon): void {
this.playerParticipantIds.add(playerPokemon.id); this.playerParticipantIds.add(playerPokemon.id);
} }
removeFaintedParticipant(playerPokemon: PlayerPokemon) { removeFaintedParticipant(playerPokemon: PlayerPokemon): void {
this.playerParticipantIds.delete(playerPokemon.id); this.playerParticipantIds.delete(playerPokemon.id);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -172,7 +172,6 @@ export class PokemonBaseStatModifier extends PokemonModifier {
for (let modifier of modifiers) { for (let modifier of modifiers) {
if (modifier instanceof PokemonBaseStatModifier) { if (modifier instanceof PokemonBaseStatModifier) {
const pokemonStatModifier = modifier as PokemonBaseStatModifier; const pokemonStatModifier = modifier as PokemonBaseStatModifier;
console.log(pokemonStatModifier.stat, this.stat, pokemonStatModifier.pokemonId === this.pokemonId && pokemonStatModifier.stat === this.stat)
if (pokemonStatModifier.pokemonId === this.pokemonId && pokemonStatModifier.stat === this.stat) { if (pokemonStatModifier.pokemonId === this.pokemonId && pokemonStatModifier.stat === this.stat) {
pokemonStatModifier.incrementStack(); pokemonStatModifier.incrementStack();
modifierBar.updateModifier(pokemonStatModifier, modifiers); modifierBar.updateModifier(pokemonStatModifier, modifiers);

View File

@ -2,13 +2,12 @@ import Pokemon from "./pokemon";
import { Stat } from "./pokemon-stat"; import { Stat } from "./pokemon-stat";
import { Species } from "./species"; import { Species } from "./species";
export enum SpeciesWildEvolutionRate { export enum SpeciesWildEvolutionDelay {
INSTANT, NONE,
FAST, SHORT,
MEDIUM, MEDIUM,
SLOW, LONG,
VERY_SLOW, VERY_LONG
TAG_NONE
} }
export class SpeciesEvolution { export class SpeciesEvolution {
@ -16,14 +15,14 @@ export class SpeciesEvolution {
public level: integer; public level: integer;
public item: string; public item: string;
public condition: SpeciesEvolutionCondition | string; public condition: SpeciesEvolutionCondition | string;
public wildRate: SpeciesWildEvolutionRate; public wildDelay: SpeciesWildEvolutionDelay;
constructor(speciesId: Species, level: integer, item: string, condition: SpeciesEvolutionCondition | string, wildRate?: SpeciesWildEvolutionRate) { constructor(speciesId: Species, level: integer, item: string, condition: SpeciesEvolutionCondition | string, wildDelay?: SpeciesWildEvolutionDelay) {
this.speciesId = speciesId; this.speciesId = speciesId;
this.level = level; this.level = level;
this.item = item; this.item = item;
this.condition = condition; this.condition = condition;
this.wildRate = wildRate || SpeciesWildEvolutionRate.INSTANT; this.wildDelay = wildDelay || SpeciesWildEvolutionDelay.NONE;
} }
} }
@ -346,7 +345,7 @@ export const pokemonEvolutions = {
], ],
[Species.KIRLIA]: [ [Species.KIRLIA]: [
new SpeciesEvolution(Species.GARDEVOIR, 30, null, new SpeciesEvolutionCondition((p: Pokemon) => !p.gender, true)), new SpeciesEvolution(Species.GARDEVOIR, 30, null, new SpeciesEvolutionCondition((p: Pokemon) => !p.gender, true)),
new SpeciesEvolution(Species.GALLADE, 1, "Dawn Stone", new SpeciesEvolutionCondition((p: Pokemon) => p.gender, true), SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.GALLADE, 1, "Dawn Stone", new SpeciesEvolutionCondition((p: Pokemon) => p.gender, true), SpeciesWildEvolutionDelay.LONG)
], ],
[Species.SURSKIT]: [ [Species.SURSKIT]: [
new SpeciesEvolution(Species.MASQUERAIN, 22, null, null) new SpeciesEvolution(Species.MASQUERAIN, 22, null, null)
@ -435,7 +434,7 @@ export const pokemonEvolutions = {
], ],
[Species.SNORUNT]: [ [Species.SNORUNT]: [
new SpeciesEvolution(Species.GLALIE, 42, null, null), new SpeciesEvolution(Species.GLALIE, 42, null, null),
new SpeciesEvolution(Species.FROSLASS, 1, "Dawn Stone", new SpeciesEvolutionCondition((p: Pokemon) => !p.gender, true), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.FROSLASS, 1, "Dawn Stone", new SpeciesEvolutionCondition((p: Pokemon) => !p.gender, true), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.SPHEAL]: [ [Species.SPHEAL]: [
new SpeciesEvolution(Species.SEALEO, 32, null, null) new SpeciesEvolution(Species.SEALEO, 32, null, null)
@ -726,210 +725,210 @@ export const pokemonEvolutions = {
new SpeciesEvolution(Species.VOLCARONA, 59, null, null) new SpeciesEvolution(Species.VOLCARONA, 59, null, null)
], ],
[Species.PIKACHU]: [ [Species.PIKACHU]: [
new SpeciesEvolution(Species.RAICHU, 1, "Thunder Stone", null) new SpeciesEvolution(Species.RAICHU, 1, "Thunder Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.NIDORINA]: [ [Species.NIDORINA]: [
new SpeciesEvolution(Species.NIDOQUEEN, 1, "Moon Stone", null) new SpeciesEvolution(Species.NIDOQUEEN, 1, "Moon Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.NIDORINO]: [ [Species.NIDORINO]: [
new SpeciesEvolution(Species.NIDOKING, 1, "Moon Stone", null) new SpeciesEvolution(Species.NIDOKING, 1, "Moon Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.CLEFAIRY]: [ [Species.CLEFAIRY]: [
new SpeciesEvolution(Species.CLEFABLE, 1, "Moon Stone", null) new SpeciesEvolution(Species.CLEFABLE, 1, "Moon Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.VULPIX]: [ [Species.VULPIX]: [
new SpeciesEvolution(Species.NINETALES, 1, "Fire Stone", null) new SpeciesEvolution(Species.NINETALES, 1, "Fire Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.JIGGLYPUFF]: [ [Species.JIGGLYPUFF]: [
new SpeciesEvolution(Species.WIGGLYTUFF, 1, "Moon Stone", null) new SpeciesEvolution(Species.WIGGLYTUFF, 1, "Moon Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.GLOOM]: [ [Species.GLOOM]: [
new SpeciesEvolution(Species.VILEPLUME, 1, "Leaf Stone", null), new SpeciesEvolution(Species.VILEPLUME, 1, "Leaf Stone", null, SpeciesWildEvolutionDelay.LONG),
new SpeciesEvolution(Species.BELLOSSOM, 1, "Sun Stone", null) new SpeciesEvolution(Species.BELLOSSOM, 1, "Sun Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.GROWLITHE]: [ [Species.GROWLITHE]: [
new SpeciesEvolution(Species.ARCANINE, 1, "Fire Stone", null) new SpeciesEvolution(Species.ARCANINE, 1, "Fire Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.POLIWHIRL]: [ [Species.POLIWHIRL]: [
new SpeciesEvolution(Species.POLIWRATH, 1, "Water Stone", null, SpeciesWildEvolutionRate.SLOW), new SpeciesEvolution(Species.POLIWRATH, 1, "Water Stone", null, SpeciesWildEvolutionDelay.LONG),
new SpeciesEvolution(Species.POLITOED, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* King's rock*/), SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.POLITOED, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* King's rock*/), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.WEEPINBELL]: [ [Species.WEEPINBELL]: [
new SpeciesEvolution(Species.VICTREEBEL, 1, "Leaf Stone", null) new SpeciesEvolution(Species.VICTREEBEL, 1, "Leaf Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.MAGNETON]: [ [Species.MAGNETON]: [
new SpeciesEvolution(Species.MAGNEZONE, 1, "Thunder Stone", null) new SpeciesEvolution(Species.MAGNEZONE, 1, "Thunder Stone", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.SHELLDER]: [ [Species.SHELLDER]: [
new SpeciesEvolution(Species.CLOYSTER, 1, "Water Stone", null) new SpeciesEvolution(Species.CLOYSTER, 1, "Water Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.EXEGGCUTE]: [ [Species.EXEGGCUTE]: [
new SpeciesEvolution(Species.EXEGGUTOR, 1, "Leaf Stone", null) new SpeciesEvolution(Species.EXEGGUTOR, 1, "Leaf Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.STARYU]: [ [Species.STARYU]: [
new SpeciesEvolution(Species.STARMIE, 1, "Water Stone", null) new SpeciesEvolution(Species.STARMIE, 1, "Water Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.EEVEE]: [ [Species.EEVEE]: [
new SpeciesEvolution(Species.ESPEON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 /* daytime */), SpeciesWildEvolutionRate.MEDIUM), new SpeciesEvolution(Species.ESPEON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 /* daytime */), SpeciesWildEvolutionDelay.MEDIUM),
new SpeciesEvolution(Species.UMBREON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 /* nighttime */), SpeciesWildEvolutionRate.MEDIUM), new SpeciesEvolution(Species.UMBREON, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 /* nighttime */), SpeciesWildEvolutionDelay.MEDIUM),
new SpeciesEvolution(Species.VAPOREON, 1, "Water Stone", null, SpeciesWildEvolutionRate.MEDIUM), new SpeciesEvolution(Species.VAPOREON, 1, "Water Stone", null, SpeciesWildEvolutionDelay.MEDIUM),
new SpeciesEvolution(Species.JOLTEON, 1, "Thunder Stone", null, SpeciesWildEvolutionRate.MEDIUM), new SpeciesEvolution(Species.JOLTEON, 1, "Thunder Stone", null, SpeciesWildEvolutionDelay.MEDIUM),
new SpeciesEvolution(Species.FLAREON, 1, "Fire Stone", null, SpeciesWildEvolutionRate.MEDIUM), new SpeciesEvolution(Species.FLAREON, 1, "Fire Stone", null, SpeciesWildEvolutionDelay.MEDIUM),
new SpeciesEvolution(Species.LEAFEON, 1, "Leaf Stone", null, SpeciesWildEvolutionRate.MEDIUM), new SpeciesEvolution(Species.LEAFEON, 1, "Leaf Stone", null, SpeciesWildEvolutionDelay.MEDIUM),
new SpeciesEvolution(Species.GLACEON, 1, "Ice Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.GLACEON, 1, "Ice Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.TOGETIC]: [ [Species.TOGETIC]: [
new SpeciesEvolution(Species.TOGEKISS, 1, "Shiny Stone", null, SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.TOGEKISS, 1, "Shiny Stone", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.SUNKERN]: [ [Species.SUNKERN]: [
new SpeciesEvolution(Species.SUNFLORA, 1, "Sun Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.SUNFLORA, 1, "Sun Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.MURKROW]: [ [Species.MURKROW]: [
new SpeciesEvolution(Species.HONCHKROW, 1, "Dusk Stone", null, SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.HONCHKROW, 1, "Dusk Stone", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.MISDREAVUS]: [ [Species.MISDREAVUS]: [
new SpeciesEvolution(Species.MISMAGIUS, 1, "Dusk Stone", null, SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.MISMAGIUS, 1, "Dusk Stone", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.LOMBRE]: [ [Species.LOMBRE]: [
new SpeciesEvolution(Species.LUDICOLO, 1, "Water Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.LUDICOLO, 1, "Water Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.NUZLEAF]: [ [Species.NUZLEAF]: [
new SpeciesEvolution(Species.SHIFTRY, 1, "Leaf Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.SHIFTRY, 1, "Leaf Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.SKITTY]: [ [Species.SKITTY]: [
new SpeciesEvolution(Species.DELCATTY, 1, "Moon Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.DELCATTY, 1, "Moon Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.ROSELIA]: [ [Species.ROSELIA]: [
new SpeciesEvolution(Species.ROSERADE, 1, "Shiny Stone", null, SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.ROSERADE, 1, "Shiny Stone", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.PANSAGE]: [ [Species.PANSAGE]: [
new SpeciesEvolution(Species.SIMISAGE, 1, "Leaf Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.SIMISAGE, 1, "Leaf Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.PANSEAR]: [ [Species.PANSEAR]: [
new SpeciesEvolution(Species.SIMISEAR, 1, "Fire Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.SIMISEAR, 1, "Fire Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.PANPOUR]: [ [Species.PANPOUR]: [
new SpeciesEvolution(Species.SIMIPOUR, 1, "Water Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.SIMIPOUR, 1, "Water Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.MUNNA]: [ [Species.MUNNA]: [
new SpeciesEvolution(Species.MUSHARNA, 1, "Moon Stone", null, SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.MUSHARNA, 1, "Moon Stone", null, SpeciesWildEvolutionDelay.LONG)
], ],
[Species.COTTONEE]: [ [Species.COTTONEE]: [
new SpeciesEvolution(Species.WHIMSICOTT, 1, "Sun Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.WHIMSICOTT, 1, "Sun Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.PETILIL]: [ [Species.PETILIL]: [
new SpeciesEvolution(Species.LILLIGANT, 1, "Sun Stone", null, SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.LILLIGANT, 1, "Sun Stone", null, SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.MINCCINO]: [ [Species.MINCCINO]: [
new SpeciesEvolution(Species.CINCCINO, 1, "Shiny Stone", null, SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.CINCCINO, 1, "Shiny Stone", null, SpeciesWildEvolutionDelay.SHORT)
], ],
[Species.EELEKTRIK]: [ [Species.EELEKTRIK]: [
new SpeciesEvolution(Species.EELEKTROSS, 1, "Thunder Stone", null, SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.EELEKTROSS, 1, "Thunder Stone", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.LAMPENT]: [ [Species.LAMPENT]: [
new SpeciesEvolution(Species.CHANDELURE, 1, "Dusk Stone", null, SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.CHANDELURE, 1, "Dusk Stone", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.KADABRA]: [ [Species.KADABRA]: [
new SpeciesEvolution(Species.ALAKAZAM, 1, "Link Cable", null, SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.ALAKAZAM, 1, "Link Cable", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.MACHOKE]: [ [Species.MACHOKE]: [
new SpeciesEvolution(Species.MACHAMP, 1, "Link Cable", null, SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.MACHAMP, 1, "Link Cable", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.GRAVELER]: [ [Species.GRAVELER]: [
new SpeciesEvolution(Species.GOLEM, 1, "Link Cable", null, SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.GOLEM, 1, "Link Cable", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.SLOWPOKE]: [ [Species.SLOWPOKE]: [
new SpeciesEvolution(Species.SLOWKING, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* King's rock*/), SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.SLOWKING, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* King's rock*/), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.HAUNTER]: [ [Species.HAUNTER]: [
new SpeciesEvolution(Species.GENGAR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true), SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.GENGAR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.ONIX]: [ [Species.ONIX]: [
new SpeciesEvolution(Species.STEELIX, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Metal coat*/ ), SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.STEELIX, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Metal coat*/ ), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.RHYDON]: [ [Species.RHYDON]: [
new SpeciesEvolution(Species.RHYPERIOR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Protector */), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.RHYPERIOR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Protector */), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.SEADRA]: [ [Species.SEADRA]: [
new SpeciesEvolution(Species.KINGDRA, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Dragon scale*/), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.KINGDRA, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Dragon scale*/), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.SCYTHER]: [ [Species.SCYTHER]: [
new SpeciesEvolution(Species.SCIZOR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Metal coat*/), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.SCIZOR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Metal coat*/), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.ELECTABUZZ]: [ [Species.ELECTABUZZ]: [
new SpeciesEvolution(Species.ELECTIVIRE, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Electirizer*/), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.ELECTIVIRE, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Electirizer*/), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.MAGMAR]: [ [Species.MAGMAR]: [
new SpeciesEvolution(Species.MAGMORTAR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Magmarizer*/), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.MAGMORTAR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Magmarizer*/), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.PORYGON]: [ [Species.PORYGON]: [
new SpeciesEvolution(Species.PORYGON2, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /*Upgrade*/), SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.PORYGON2, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /*Upgrade*/), SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.PORYGON2]: [ [Species.PORYGON2]: [
new SpeciesEvolution(Species.PORYGON_Z, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Dubious disc*/), SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.PORYGON_Z, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Dubious disc*/), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.FEEBAS]: [ [Species.FEEBAS]: [
new SpeciesEvolution(Species.MILOTIC, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Prism scale*/), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.MILOTIC, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Prism scale*/), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.DUSCLOPS]: [ [Species.DUSCLOPS]: [
new SpeciesEvolution(Species.DUSKNOIR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Reaper cloth*/), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.DUSKNOIR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Reaper cloth*/), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.CLAMPERL]: [ [Species.CLAMPERL]: [
new SpeciesEvolution(Species.HUNTAIL, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Deep sea tooth*/), SpeciesWildEvolutionRate.MEDIUM), new SpeciesEvolution(Species.HUNTAIL, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Deep sea tooth*/), SpeciesWildEvolutionDelay.MEDIUM),
new SpeciesEvolution(Species.GOREBYSS, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Deep sea scale*/), SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.GOREBYSS, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Deep sea scale*/), SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.BOLDORE]: [ [Species.BOLDORE]: [
new SpeciesEvolution(Species.GIGALITH, 1, "Link Cable", null, SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.GIGALITH, 1, "Link Cable", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.GURDURR]: [ [Species.GURDURR]: [
new SpeciesEvolution(Species.CONKELDURR, 1, "Link Cable", null, SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.CONKELDURR, 1, "Link Cable", null, SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.KARRABLAST]: [ [Species.KARRABLAST]: [
new SpeciesEvolution(Species.ESCAVALIER, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Trade with shelmet??*/), SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.ESCAVALIER, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Trade with shelmet??*/), SpeciesWildEvolutionDelay.LONG)
], ],
[Species.SHELMET]: [ [Species.SHELMET]: [
new SpeciesEvolution(Species.ACCELGOR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Trade with karrablast??*/), SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.ACCELGOR, 1, "Link Cable", new SpeciesEvolutionCondition((p: Pokemon) => true /* Trade with karrablast??*/), SpeciesWildEvolutionDelay.LONG)
], ],
[Species.PICHU]: [ [Species.PICHU]: [
new SpeciesEvolution(Species.PIKACHU, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.PIKACHU, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
], ],
[Species.CLEFFA]: [ [Species.CLEFFA]: [
new SpeciesEvolution(Species.CLEFAIRY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.CLEFAIRY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
], ],
[Species.IGGLYBUFF]: [ [Species.IGGLYBUFF]: [
new SpeciesEvolution(Species.JIGGLYPUFF, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.JIGGLYPUFF, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
], ],
[Species.GOLBAT]: [ [Species.GOLBAT]: [
new SpeciesEvolution(Species.CROBAT, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.CROBAT, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.CHANSEY]: [ [Species.CHANSEY]: [
new SpeciesEvolution(Species.BLISSEY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.BLISSEY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.VERY_LONG)
], ],
[Species.MUNCHLAX]: [ [Species.MUNCHLAX]: [
new SpeciesEvolution(Species.SNORLAX, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.VERY_SLOW) new SpeciesEvolution(Species.SNORLAX, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.LONG)
], ],
[Species.TOGEPI]: [ [Species.TOGEPI]: [
new SpeciesEvolution(Species.TOGETIC, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.TOGETIC, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
], ],
[Species.AZURILL]: [ [Species.AZURILL]: [
new SpeciesEvolution(Species.MARILL, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.MARILL, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.SHORT)
], ],
[Species.BUDEW]: [ [Species.BUDEW]: [
new SpeciesEvolution(Species.ROSELIA, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount > 10 /* daytime */), SpeciesWildEvolutionRate.FAST) new SpeciesEvolution(Species.ROSELIA, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount > 10 /* daytime */), SpeciesWildEvolutionDelay.SHORT)
], ],
[Species.CHINGLING]: [ [Species.CHINGLING]: [
new SpeciesEvolution(Species.CHIMECHO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 /* nighttime */), SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.CHIMECHO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 /* nighttime */), SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.BUNEARY]: [ [Species.BUNEARY]: [
new SpeciesEvolution(Species.LOPUNNY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.LOPUNNY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.RIOLU]: [ [Species.RIOLU]: [
new SpeciesEvolution(Species.LUCARIO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 /* daytime */), SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.LUCARIO, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10 /* daytime */), SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.WOOBAT]: [ [Species.WOOBAT]: [
new SpeciesEvolution(Species.SWOOBAT, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.MEDIUM) new SpeciesEvolution(Species.SWOOBAT, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.MEDIUM)
], ],
[Species.SWADLOON]: [ [Species.SWADLOON]: [
new SpeciesEvolution(Species.LEAVANNY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionRate.SLOW) new SpeciesEvolution(Species.LEAVANNY, 1, null, new SpeciesEvolutionCondition((p: Pokemon) => p.winCount >= 10), SpeciesWildEvolutionDelay.LONG)
] ]
} };