Add Mega Rayquaza (static sprite)
parent
e604d75436
commit
c778ef5e36
Binary file not shown.
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "384-mega.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 96,
|
||||
"h": 96
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:430b196156dce7e35efeb616df2afbb1:f04557de6b8b7c9f59e02ae300538366:cf7a16daaa5962e1da39cbbb1392de14$"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "384-mega.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 96,
|
||||
"h": 96
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:3d06b3a8aabe77748c6fd866e165d0fc:0f452ac0571c863522fa872a4e9a1be6:cf7a16daaa5962e1da39cbbb1392de14$"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "384-mega.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 96,
|
||||
"h": 96
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:3d06b3a8aabe77748c6fd866e165d0fc:0f452ac0571c863522fa872a4e9a1be6:cf7a16daaa5962e1da39cbbb1392de14$"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"textures": [
|
||||
{
|
||||
"image": "384-mega.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"scale": 1,
|
||||
"frames": [
|
||||
{
|
||||
"filename": "0001.png",
|
||||
"rotated": false,
|
||||
"trimmed": false,
|
||||
"sourceSize": {
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 96,
|
||||
"h": 96
|
||||
},
|
||||
"frame": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 96,
|
||||
"h": 96
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"app": "https://www.codeandweb.com/texturepacker",
|
||||
"version": "3.0",
|
||||
"smartupdate": "$TexturePacker:SmartUpdate:430b196156dce7e35efeb616df2afbb1:f04557de6b8b7c9f59e02ae300538366:cf7a16daaa5962e1da39cbbb1392de14$"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -1,7 +1,7 @@
|
|||
import Phaser from 'phaser';
|
||||
import { Biome } from './data/biome';
|
||||
import UI from './ui/ui';
|
||||
import { EncounterPhase, SummonPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, CheckLoadPhase, TurnInitPhase, ReturnPhase, ToggleDoublePositionPhase, CheckSwitchPhase, LevelCapPhase, TestMessagePhase, ShowTrainerPhase, PartyHealPhase } from './battle-phases';
|
||||
import { EncounterPhase, SummonPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, CheckLoadPhase, TurnInitPhase, ReturnPhase, ToggleDoublePositionPhase, CheckSwitchPhase, LevelCapPhase, TestMessagePhase, ShowTrainerPhase } from './battle-phases';
|
||||
import Pokemon, { PlayerPokemon, EnemyPokemon } from './pokemon';
|
||||
import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies } from './data/pokemon-species';
|
||||
import * as Utils from './utils';
|
||||
|
|
|
@ -1184,6 +1184,7 @@ export enum Abilities {
|
|||
DARK_AURA,
|
||||
FAIRY_AURA,
|
||||
PROTEAN,
|
||||
DELTA_STREAM,
|
||||
SLUSH_RUSH,
|
||||
NEUTRALIZING_GAS
|
||||
}
|
||||
|
@ -1439,6 +1440,8 @@ export function initAbilities() {
|
|||
new Ability(Abilities.DARK_AURA, "Dark Aura (N)", "Raises power of DARK type moves for all Pokémon in battle.", 6),
|
||||
new Ability(Abilities.FAIRY_AURA, "Fairy Aura (N)", "Raises power of FAIRY type moves for all Pokémon in battle.", 6),
|
||||
new Ability(Abilities.PROTEAN, "Protean (N)", "Changes the Pokémon's type to its last used move.", 6),
|
||||
new Ability(Abilities.DELTA_STREAM, "Delta Stream", "The Pokémon creates strong winds when it enters a battle.", 6)
|
||||
.attr(PostSummonWeatherChangeAbAttr, WeatherType.STRONG_WINDS),
|
||||
new Ability(Abilities.SLUSH_RUSH, "Slush Rush (N)", "Boosts the Pokémon's Speed stat in a hailstorm.", 7),
|
||||
new Ability(Abilities.NEUTRALIZING_GAS, "Neutralizing Gas (N)", "Neutralizes abilities of all Pokémon in battle.", 8)
|
||||
);
|
||||
|
|
|
@ -139,9 +139,17 @@ export abstract class PokemonSpeciesForm {
|
|||
return `pkmn_icon__${this.getIconId(female, formIndex)}`;
|
||||
}
|
||||
|
||||
getCryKey(formIndex?: integer): string {
|
||||
let ret = this.speciesId.toString();
|
||||
const forms = getPokemonSpecies(this.speciesId).forms;
|
||||
if (forms.length && forms[formIndex || 0].formKey === 'mega')
|
||||
ret += '-mega';
|
||||
return ret;
|
||||
}
|
||||
|
||||
loadAssets(scene: BattleScene, female: boolean, formIndex?: integer, shiny?: boolean, startLoad?: boolean): Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
scene.load.audio(this.speciesId.toString(), `audio/cry/${this.speciesId}.mp3`);
|
||||
scene.load.audio(this.speciesId.toString(), `audio/cry/${this.getCryKey(formIndex)}.mp3`);
|
||||
scene.loadAtlas(this.getSpriteKey(female, formIndex, shiny), 'pokemon', this.getSpriteAtlasPath(female, formIndex, shiny));
|
||||
scene.load.once(Phaser.Loader.Events.COMPLETE, () => {
|
||||
const originalWarn = console.warn;
|
||||
|
@ -769,7 +777,10 @@ export function initSpecies() {
|
|||
new PokemonSpecies(Species.LATIOS, "Latios", 3, true, false, false, "Eon Pokémon", Type.DRAGON, Type.PSYCHIC, 2, 60, Abilities.LEVITATE, Abilities.NONE, Abilities.NONE, 600, 80, 90, 80, 130, 110, 110, 3, 90, 270, GrowthRate.SLOW, "Undiscovered", null, 100, 120, false),
|
||||
new PokemonSpecies(Species.KYOGRE, "Kyogre", 3, false, true, false, "Sea Basin Pokémon", Type.WATER, null, 4.5, 352, Abilities.DRIZZLE, Abilities.NONE, Abilities.NONE, 670, 100, 100, 90, 150, 140, 90, 3, 0, 302, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
|
||||
new PokemonSpecies(Species.GROUDON, "Groudon", 3, false, true, false, "Continent Pokémon", Type.GROUND, null, 3.5, 950, Abilities.DROUGHT, Abilities.NONE, Abilities.NONE, 670, 100, 150, 140, 100, 90, 90, 3, 0, 302, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
|
||||
new PokemonSpecies(Species.RAYQUAZA, "Rayquaza", 3, false, true, false, "Sky High Pokémon", Type.DRAGON, Type.FLYING, 7, 206.5, Abilities.AIR_LOCK, Abilities.NONE, Abilities.NONE, 680, 105, 150, 90, 150, 90, 95, 45, 0, 306, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
|
||||
new PokemonSpecies(Species.RAYQUAZA, "Rayquaza", 3, false, true, false, "Sky High Pokémon", Type.DRAGON, Type.FLYING, 7, 206.5, Abilities.AIR_LOCK, Abilities.NONE, Abilities.NONE, 680, 105, 150, 90, 150, 90, 95, 45, 0, 306, GrowthRate.SLOW, "Undiscovered", null, null, 120, false, false,
|
||||
new PokemonForm("Normal", "", Type.DRAGON, Type.FLYING, 7, 206.5, Abilities.AIR_LOCK, Abilities.NONE, Abilities.NONE, 680, 105, 150, 90, 150, 90, 95, 45, 0, 306, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
|
||||
new PokemonForm("Mega", "mega", Type.DRAGON, Type.FLYING, 7, 206.5, Abilities.DELTA_STREAM, Abilities.NONE, Abilities.NONE, 780, 105, 180, 100, 180, 100, 115, 45, 0, 306, GrowthRate.SLOW, "Undiscovered", null, null, 120, false)
|
||||
),
|
||||
new PokemonSpecies(Species.JIRACHI, "Jirachi", 3, false, false, true, "Wish Pokémon", Type.STEEL, Type.PSYCHIC, 0.3, 1.1, Abilities.SERENE_GRACE, Abilities.NONE, Abilities.NONE, 600, 100, 100, 100, 100, 100, 100, 3, 100, 270, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
|
||||
new PokemonSpecies(Species.DEOXYS, "Deoxys", 3, false, false, true, "DNA Pokémon", Type.PSYCHIC, null, 1.7, 60.8, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 600, 50, 150, 50, 150, 50, 150, 3, 0, 270, GrowthRate.SLOW, "Undiscovered", null, null, 120, false, true,
|
||||
new PokemonForm("Normal Forme", "normal", Type.PSYCHIC, null, 1.7, 60.8, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 600, 50, 150, 50, 150, 50, 150, 3, 0, 270, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
|
||||
|
|
|
@ -724,5 +724,5 @@ export const trainerConfigs: TrainerConfigs = {
|
|||
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.PIDGEOT, Species.NOCTOWL, Species.SWELLOW, Species.STARAPTOR, Species.UNFEZANT ]))
|
||||
.setPartyMemberFunc(2, getSpeciesFilterRandomPartyMemberFunc((species: PokemonSpecies) => !pokemonEvolutions.hasOwnProperty(species.speciesId) && !pokemonPrevolutions.hasOwnProperty(species.speciesId) && species.baseTotal >= 450))
|
||||
.setSpeciesFilter(species => species.baseTotal >= 540)
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.RAYQUAZA ])),
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.RAYQUAZA ], p => p.formIndex = 1)),
|
||||
}
|
|
@ -435,7 +435,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
getAbility(): Ability {
|
||||
if (ABILITY_OVERRIDE && this.isPlayer())
|
||||
return abilities[ABILITY_OVERRIDE];
|
||||
return abilities[this.species.getAbility(this.abilityIndex)];
|
||||
return abilities[this.getSpeciesForm().getAbility(this.abilityIndex)];
|
||||
}
|
||||
|
||||
canApplyAbility(): boolean {
|
||||
|
@ -1124,7 +1124,7 @@ export class PlayerPokemon extends Pokemon {
|
|||
this.handleSpecialEvolutions(evolution);
|
||||
this.species = getPokemonSpecies(evolution.speciesId);
|
||||
this.name = this.species.name;
|
||||
const abilityCount = this.species.getAbilityCount();
|
||||
const abilityCount = this.getSpeciesForm().getAbilityCount();
|
||||
if (this.abilityIndex >= abilityCount) // Shouldn't happen
|
||||
this.abilityIndex = abilityCount - 1;
|
||||
this.getSpeciesForm().generateIconAnim(this.scene, this.gender === Gender.FEMALE, this.formIndex);
|
||||
|
|
Loading…
Reference in New Issue