Implement mega evolutions
This commit is contained in:
1 parent
fae2c50916
commit
70827420cd
64 files changed
+4664
-3406
No files matched your search
@@ -131,7 +131,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
this.splicedIcon.setPositionRelative(this.nameText, nameTextWidth + this.genderText.displayWidth + 1, 1);
|
||||
this.splicedIcon.setVisible(!!pokemon.fusionSpecies);
|
||||
if (this.splicedIcon.visible) {
|
||||
this.splicedIcon.on('pointerover', () => (this.scene as BattleScene).ui.showTooltip(null, `${pokemon.species.name}/${pokemon.fusionSpecies.name}`));
|
||||
this.splicedIcon.on('pointerover', () => (this.scene as BattleScene).ui.showTooltip(null, `${pokemon.species.getName(pokemon.formIndex)}/${pokemon.fusionSpecies.getName(pokemon.fusionFormIndex)}`));
|
||||
this.splicedIcon.on('pointerout', () => (this.scene as BattleScene).ui.hideTooltip());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import BattleScene, { Button } from "../battle-scene";
|
||||
import PokemonSpecies, { allSpecies, getPokemonSpecies, speciesStarters as speciesStarterValues } from "../data/pokemon-species";
|
||||
import PokemonSpecies, { SpeciesFormKey, allSpecies, getPokemonSpecies, speciesStarters as speciesStarterValues } from "../data/pokemon-species";
|
||||
import { Species } from "../data/species";
|
||||
import { TextStyle, addTextObject, getTextColor } from "./text";
|
||||
import { Mode } from "./ui";
|
||||
@@ -742,7 +742,8 @@ 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.map((_, f) => dexEntry.caughtAttr & this.scene.gameData.getFormAttr(f)).filter(a => a).length > 1;
|
||||
this.canCycleForm = species.forms.filter(f => !f.formKey || f.formKey.indexOf(SpeciesFormKey.MEGA) === -1)
|
||||
.map((_, f) => dexEntry.caughtAttr & this.scene.gameData.getFormAttr(f)).filter(a => a).length > 1;
|
||||
}
|
||||
|
||||
if (dexEntry.caughtAttr && species.malePercent !== null) {
|
||||
|
||||
Reference in new issue
Block a user