Add generation 7 Pokemon and new biomes
This commit is contained in:
1 parent
3da558f2f8
commit
982e9c7e1e
11 files changed
+703
-178
No files matched your search
@@ -3,6 +3,7 @@ import { Biome, biomeLinks, getBiomeName } from "../data/biome";
|
||||
import { addTextObject, TextStyle } from "./text";
|
||||
import { Mode } from "./ui";
|
||||
import UiHandler from "./uiHandler";
|
||||
import * as Utils from "../utils";
|
||||
|
||||
export default class BiomeSelectUiHandler extends UiHandler {
|
||||
private biomeSelectContainer: Phaser.GameObjects.Container;
|
||||
@@ -38,10 +39,17 @@ export default class BiomeSelectUiHandler extends UiHandler {
|
||||
if (args.length >= 2 && typeof(args[0]) === 'number' && args[1] instanceof Function) {
|
||||
super.show(args);
|
||||
|
||||
if (!Array.isArray(biomeLinks[args[0]]))
|
||||
this.scene.executeWithSeedOffset(() => {
|
||||
this.biomeChoices = (!Array.isArray(biomeLinks[args[0]])
|
||||
? [ biomeLinks[args[0]] as Biome ]
|
||||
: biomeLinks[args[0]] as (Biome | [Biome, integer])[])
|
||||
.filter((b, i) => !Array.isArray(b) || !Utils.randSeedInt(b[1]))
|
||||
.map(b => Array.isArray(b) ? b[0] : b);
|
||||
}, this.scene.currentBattle.waveIndex);
|
||||
|
||||
if (this.biomeChoices.length <= 1)
|
||||
return;
|
||||
|
||||
this.biomeChoices = biomeLinks[args[0]] as Biome[];
|
||||
this.biomeSelectBg.setTexture(`option_select_window_${this.biomeChoices.length}`)
|
||||
this.biomesText.setText(this.biomeChoices.map(b => getBiomeName(b)).join('\n'));
|
||||
this.biomesText.setPositionRelative(this.biomeSelectBg, 16, 9);
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface Starter {
|
||||
pokerus: boolean;
|
||||
}
|
||||
|
||||
const gens = [ 'I', 'II', 'III', 'IV', 'V', 'VI' ];
|
||||
const gens = [ 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII' ];
|
||||
const ivChartSize = 24;
|
||||
const ivChartStatCoordMultipliers = [ [ 0, 1 ], [ 0.825, 0.5 ], [ 0.825, -0.5 ], [ 0, -1 ], [ -0.825, -0.5 ], [ -0.825, 0.5 ] ];
|
||||
const defaultIvChartData = new Array(12).fill(null).map(() => 0);
|
||||
@@ -198,8 +198,6 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.genSpecies.push([]);
|
||||
|
||||
for (let species of allSpecies) {
|
||||
if (species.generation > gens.length)
|
||||
break;
|
||||
if (!speciesStarterValues.hasOwnProperty(species.speciesId) || species.generation !== g + 1)
|
||||
continue;
|
||||
starterSpecies.push(species.speciesId);
|
||||
|
||||
Reference in new issue
Block a user