Minor changes to forms
This commit is contained in:
1 parent
2d5dcaf835
commit
ea6c547af1
6 files changed
+7
-8
No files matched your search
@@ -16,6 +16,7 @@ import { StatsContainer } from "./stats-container";
|
||||
import { addWindow } from "./window";
|
||||
import { Nature, getNatureName } from "../data/nature";
|
||||
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||
import { pokemonFormChanges } from "../data/pokemon-forms";
|
||||
|
||||
export type StarterSelectCallback = (starters: Starter[]) => void;
|
||||
|
||||
@@ -830,7 +831,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.canCycleShiny = !!(dexEntry.caughtAttr & DexAttr.NON_SHINY && dexEntry.caughtAttr & DexAttr.SHINY);
|
||||
this.canCycleGender = !!(dexEntry.caughtAttr & DexAttr.MALE && dexEntry.caughtAttr & DexAttr.FEMALE);
|
||||
this.canCycleAbility = [ dexEntry.caughtAttr & DexAttr.ABILITY_1, dexEntry.caughtAttr & DexAttr.ABILITY_2, dexEntry.caughtAttr & DexAttr.ABILITY_HIDDEN ].filter(a => a).length > 1;
|
||||
this.canCycleForm = species.forms.filter(f => !f.formKey || f.formKey.indexOf(SpeciesFormKey.MEGA) === -1)
|
||||
this.canCycleForm = species.forms.filter(f => !f.formKey || !pokemonFormChanges[species.speciesId].find(fc => fc.formKey))
|
||||
.map((_, f) => dexEntry.caughtAttr & this.scene.gameData.getFormAttr(f)).filter(a => a).length > 1;
|
||||
this.canCycleNature = this.scene.gameData.getNaturesForAttr(dexEntry.natureAttr).length > 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user