Add Xerneas, Yveltal, and Eternatus

This commit is contained in:
Flashfyre 2023-04-26 16:07:29 -04:00
parent 3e2ba0020c
commit 55ba3cd5e7
29 changed files with 90125 additions and 452 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,648 @@
{
"graphic": "",
"frames": [
[
{
"x": 0,
"y": 0,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 0,
"graphicFrame": 0,
"opacity": 226,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": true,
"priority": 1,
"focus": 2
},
{
"x": 128,
"y": -64,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 1,
"graphicFrame": 0,
"opacity": 255,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": false,
"priority": 1,
"focus": 1
}
],
[
{
"x": 0,
"y": 0,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 0,
"graphicFrame": 0,
"opacity": 198,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": true,
"priority": 1,
"focus": 2
},
{
"x": 128,
"y": -64,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 1,
"graphicFrame": 0,
"opacity": 255,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": false,
"priority": 1,
"focus": 1
}
],
[
{
"x": 0,
"y": 0,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 0,
"graphicFrame": 0,
"opacity": 170,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": true,
"priority": 1,
"focus": 2
},
{
"x": 128,
"y": -64,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 1,
"graphicFrame": 0,
"opacity": 255,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": false,
"priority": 1,
"focus": 1
}
],
[
{
"x": 0,
"y": 0,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 0,
"graphicFrame": 0,
"opacity": 141,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": true,
"priority": 1,
"focus": 2
},
{
"x": 128,
"y": -64,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 1,
"graphicFrame": 0,
"opacity": 255,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": false,
"priority": 1,
"focus": 1
}
],
[
{
"x": 0,
"y": 0,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 0,
"graphicFrame": 0,
"opacity": 113,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": true,
"priority": 1,
"focus": 2
},
{
"x": 128,
"y": -64,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 1,
"graphicFrame": 0,
"opacity": 255,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": false,
"priority": 1,
"focus": 1
}
],
[
{
"x": 0,
"y": 0,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 0,
"graphicFrame": 0,
"opacity": 85,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": true,
"priority": 1,
"focus": 2
},
{
"x": 128,
"y": -64,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 1,
"graphicFrame": 0,
"opacity": 255,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": false,
"priority": 1,
"focus": 1
}
],
[
{
"x": 0,
"y": 0,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 0,
"graphicFrame": 0,
"opacity": 56,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": true,
"priority": 1,
"focus": 2
},
{
"x": 128,
"y": -64,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 1,
"graphicFrame": 0,
"opacity": 255,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": false,
"priority": 1,
"focus": 1
}
],
[
{
"x": 0,
"y": 0,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 0,
"graphicFrame": 0,
"opacity": 28,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": true,
"priority": 1,
"focus": 2
},
{
"x": 128,
"y": -64,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 1,
"graphicFrame": 0,
"opacity": 255,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": false,
"priority": 1,
"focus": 1
}
],
[
{
"x": 0,
"y": 0,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 0,
"graphicFrame": 0,
"opacity": 0,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": true,
"priority": 1,
"focus": 2
},
{
"x": 128,
"y": -64,
"zoomX": 100,
"zoomY": 100,
"angle": 0,
"mirror": false,
"visible": true,
"blendType": 0,
"target": 1,
"graphicFrame": 0,
"opacity": 255,
"color": [
0,
0,
0,
0
],
"tone": [
0,
0,
0,
0
],
"flash": [
0,
0,
0,
0
],
"locked": false,
"priority": 1,
"focus": 1
}
]
],
"frameTimedEvents": {
"0": [
{
"frameIndex": 0,
"resourceName": "PRSFX- Phantom Force1.wav",
"volume": 100,
"pitch": 100,
"eventType": "AnimTimedSoundEvent"
}
]
},
"position": 4,
"hue": 0
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,83 @@
{
"textures": [
{
"image": "pokemon_icons_6.png",
"format": "RGBA8888",
"size": {
"w": 63,
"h": 73
},
"scale": 1,
"frames": [
{
"filename": "890",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 56,
"h": 42
},
"spriteSourceSize": {
"x": 1,
"y": 0,
"w": 55,
"h": 42
},
"frame": {
"x": 0,
"y": 0,
"w": 55,
"h": 42
}
},
{
"filename": "717",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 56,
"h": 42
},
"spriteSourceSize": {
"x": 13,
"y": 14,
"w": 32,
"h": 28
},
"frame": {
"x": 0,
"y": 42,
"w": 32,
"h": 28
}
},
{
"filename": "716",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 56,
"h": 42
},
"spriteSourceSize": {
"x": 11,
"y": 11,
"w": 31,
"h": 31
},
"frame": {
"x": 32,
"y": 42,
"w": 31,
"h": 31
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:4b6a1ba281ae27408c7aa4ec0f283be1:8564d882e57b533f2d1425eff77e6e8c:96737d38f2029744a75c1ee001bc1929$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -71,7 +71,7 @@ export class EncounterPhase extends BattlePhase {
this.scene.updateWaveCountText();
const battle = this.scene.currentBattle;
const enemySpecies = this.scene.arena.randomSpecies(battle.waveIndex, battle.enemyLevel);
const enemySpecies = this.scene.randomSpecies(battle.waveIndex, battle.enemyLevel, true);
battle.enemyPokemon = new EnemyPokemon(this.scene, enemySpecies, battle.enemyLevel);
const enemyPokemon = this.scene.getEnemyPokemon();
enemyPokemon.resetSummonData();
@ -1773,7 +1773,10 @@ export class AttemptCapturePhase extends BattlePhase {
}
},
onRepeat: () => {
if (shakeCount++ < 3) {
if (!pokemon.species.isObtainable()) {
shakeCounter.stop();
this.failCatch(shakeCount);
} else if (shakeCount++ < 3) {
if (Utils.randInt(65536) < y)
this.scene.sound.play('pb_move');
else {

View File

@ -223,7 +223,7 @@ export default class BattleScene extends Phaser.Scene {
this.loadAtlas('statuses', '');
this.loadAtlas('categories', '');
for (let i = 0; i < 6; i++)
for (let i = 0; i < 7; i++)
this.loadAtlas(`pokemon_icons_${i}`, 'ui');
this.loadSe('select');
@ -521,6 +521,8 @@ export default class BattleScene extends Phaser.Scene {
}
randomSpecies(waveIndex: integer, level: integer, fromArenaPool?: boolean): PokemonSpecies {
if (waveIndex === 150)
return getPokemonSpecies(Species.ETERNATUS);
return fromArenaPool
? this.arena.randomSpecies(waveIndex, level)
: getPokemonSpecies(allSpecies[(Utils.randInt(allSpecies.length)) - 1].getSpeciesForLevel(level));

View File

@ -17,8 +17,12 @@ export class Battle {
private getLevelForWave(): number {
let baseLevel = 1 + this.waveIndex / 2 + Math.pow(this.waveIndex / 25, 2);
if (!(this.waveIndex % 10))
return Math.floor(baseLevel * 1.2);
if (!(this.waveIndex % 10)) {
let bossMultiplier = 1.2;
if (this.waveIndex > 100)
bossMultiplier += 0.028 * Math.floor((this.waveIndex - 100) / 10);
return Math.floor(baseLevel * bossMultiplier);
}
const deviation = 10 / this.waveIndex;

View File

@ -37,7 +37,9 @@ export enum ChargeAnim {
SKY_ATTACK_CHARGING,
ICE_BURN_CHARGING,
DOOM_DESIRE_CHARGING,
RAZOR_WIND_CHARGING
RAZOR_WIND_CHARGING,
PHANTOM_FORCE_CHARGING,
GEOMANCY_CHARGING
}
export enum CommonAnim {
@ -604,12 +606,6 @@ export abstract class BattleAnim {
scaleX = scaleX * -1;
break;
}
/*const xOffset = (!isReverseCoords ? (userInitialX - targetInitialX) : (targetInitialX - userInitialX));
const yOffset = (!isReverseCoords ? (userInitialY - targetInitialY) : (targetInitialY - userInitialY));
const ySpriteOffset = ((userHalfHeight * (1 - xProgress)) + (targetHalfHeight * xProgress)) * -1;
x = (initialX + xOffset * (!isReverseCoords ? 1 : -1) + frame.x * (!isReverseCoords ? 1 : -1));
y = ((initialY + yOffset * (!isReverseCoords || frame.focus === AnimFocus.USER || frame.focus === AnimFocus.SCREEN ? 1 : -1)
+ frame.y * (!isReverseCoords || (frame.focus !== AnimFocus.USER_TARGET) ? 1 : -1) + ySpriteOffset));*/
const angle = -frame.angle;
const key = frame.target === AnimFrameTarget.GRAPHIC ? g++ : frame.target === AnimFrameTarget.USER ? u++ : t++;
ret.get(frame.target).set(key, { x: x, y: y, scaleX: scaleX, scaleY: scaleY, angle: angle });
@ -753,17 +749,6 @@ export abstract class BattleAnim {
moveSprite.setVisible(frame.visible);
moveSprite.setBlendMode(frame.blendType === AnimBlendType.NORMAL ? Phaser.BlendModes.NORMAL : frame.blendType === AnimBlendType.ADD ? Phaser.BlendModes.ADD : Phaser.BlendModes.DIFFERENCE);
}
/*if (frame.target !== AnimFrameTarget.GRAPHIC && frame.locked) {
const pokemon = frame.target === AnimFrameTarget.USER ? user : target;
pokemon.setScale(!frame.mirror ? 1 : -1)
pokemon.setAlpha(frame.opacity / 255);
pokemon.setAngle(-frame.angle * (!isReverseCoords ? 1 : -1));
const zoomScaleX = frame.zoomX / 100;
const zoomScaleY = frame.zoomY / 100;
const zoomSprite = pokemon.getZoomSprite();
zoomSprite.setY(zoomSprite.displayHeight * (zoomScaleY - 1) * 0.5);
zoomSprite.setScale(zoomScaleX, zoomScaleY);
}*/
}
if (anim.frameTimedEvents.has(f)) {
for (let event of anim.frameTimedEvents.get(f))
@ -895,7 +880,7 @@ export function populateAnims() {
const moveName = Moves[move].toUpperCase().replace(/\_/g, '');
moveNameToId[moveName] = move;
}
const animsData = []; //battleAnimRawData.split('!ruby/array:PBAnimation').slice(1);
const animsData = [];//battleAnimRawData.split('!ruby/array:PBAnimation').slice(1);
for (let a = 0; a < animsData.length; a++) {
const fields = animsData[a].split('@').slice(1);

View File

@ -30,6 +30,7 @@ export enum BattlerTagType {
PROTECTED,
FLYING,
UNDERGROUND,
HIDDEN,
CRIT_BOOST,
NO_CRIT,
BYPASS_SLEEP,
@ -523,6 +524,7 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
return new ProtectedTag(sourceMove);
case BattlerTagType.FLYING:
case BattlerTagType.UNDERGROUND:
case BattlerTagType.HIDDEN:
return new HideSpriteTag(tagType, turnCount, sourceMove);
case BattlerTagType.CRIT_BOOST:
return new CritBoostTag(tagType, sourceMove);

View File

@ -690,7 +690,12 @@ export enum Moves {
ICICLE_CRASH,
V_CREATE,
FUSION_FLARE,
FUSION_BOLT
FUSION_BOLT,
MOONBLAST,
PHANTOM_FORCE,
GEOMANCY,
OBLIVION_WING,
DYNAMAX_CANNON
}
export abstract class MoveAttr {
@ -864,8 +869,16 @@ export class WeatherHealAttr extends HealAttr {
}
export class HitHealAttr extends MoveHitEffectAttr {
private healRatio: number;
constructor(healRatio?: number) {
super();
this.healRatio = healRatio || 0.5;
}
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.isPlayer(), Math.max(Math.floor(user.turnData.damageDealt / 2), 1), getPokemonMessage(target, ` had its\nenergy drained!`), false, true));
user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.isPlayer(), Math.max(Math.floor(user.turnData.damageDealt * this.healRatio), 1), getPokemonMessage(target, ` had its\nenergy drained!`), false, true));
return true;
}
}
@ -2553,7 +2566,7 @@ export const allMoves = [
new AttackMove(Moves.OMINOUS_WIND, "Ominous Wind", Type.GHOST, MoveCategory.SPECIAL, 60, 100, 5, -1, "May raise all user's stats at once.", 10, 0, 4)
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true),
new AttackMove(Moves.SHADOW_FORCE, "Shadow Force", Type.GHOST, MoveCategory.PHYSICAL, 120, 100, 5, -1, "Disappears on first turn, attacks on second. Can strike through Protect/Detect.", -1, 0, 4)
.attr(ChargeAttr, ChargeAnim.SHADOW_FORCE_CHARGING, 'vanished\ninstantly!')
.attr(ChargeAttr, ChargeAnim.SHADOW_FORCE_CHARGING, 'vanished\ninstantly!', BattlerTagType.HIDDEN)
.ignoreProtect(),
new SelfStatusMove(Moves.HONE_CLAWS, "Hone Claws", Type.DARK, -1, 15, -1, "Raises user's Attack and Accuracy.", -1, 0, 5)
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.ACC ], 1, true),
@ -2703,5 +2716,17 @@ export const allMoves = [
new AttackMove(Moves.V_CREATE, "V-create", Type.FIRE, MoveCategory.PHYSICAL, 180, 95, 5, -1, "Lowers user's Defense, Special Defense and Speed.", 100, 0, 5)
.attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF, BattleStat.SPD ], -1, true),
new AttackMove(Moves.FUSION_FLARE, "Fusion Flare (N)", Type.FIRE, MoveCategory.SPECIAL, 100, 100, 5, -1, "Power increases if Fusion Bolt is used in the same turn.", -1, 0, 5),
new AttackMove(Moves.FUSION_BOLT, "Fusion Bolt (N)", Type.ELECTRIC, MoveCategory.PHYSICAL, 100, 100, 5, -1, "Power increases if Fusion Flare is used in the same turn.", -1, 0, 5)
new AttackMove(Moves.FUSION_BOLT, "Fusion Bolt (N)", Type.ELECTRIC, MoveCategory.PHYSICAL, 100, 100, 5, -1, "Power increases if Fusion Flare is used in the same turn.", -1, 0, 5),
new AttackMove(Moves.MOONBLAST, 'Moonblast', Type.FAIRY, MoveCategory.SPECIAL, 95, 100, 15, -1, "May lower opponent's Special Attack.", 30, 0, 6)
.attr(StatChangeAttr, BattleStat.SPATK, -1),
new AttackMove(Moves.PHANTOM_FORCE, "Phantom Force", Type.GHOST, MoveCategory.PHYSICAL, 90, 100, 10, -1, "Disappears on first turn, attacks on second. Can strike through Protect/Detect.", -1, 0, 6)
.attr(ChargeAttr, ChargeAnim.PHANTOM_FORCE_CHARGING, 'vanished\ninstantly!', BattlerTagType.HIDDEN)
.ignoreProtect(),
new SelfStatusMove(Moves.GEOMANCY, "Geomancy", Type.FAIRY, -1, 10, -1, "Charges on the first turn, sharply raises user's Special Attack, Special Defense and Speed on the second.", -1, 0, 6)
.attr(ChargeAttr, ChargeAnim.GEOMANCY_CHARGING, "is charging\nits power!")
.attr(StatChangeAttr, [ BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 2, true),
new AttackMove(Moves.OBLIVION_WING, "Oblivion Wing", Type.FLYING, MoveCategory.SPECIAL, 80, 100, 10, -1, "User recovers 3/4 the HP inflicted on the opponent.", -1, 0, 6)
.attr(HitHealAttr, 0.75),
new AttackMove(Moves.DYNAMAX_CANNON, "Dynamax Cannon", Type.DRAGON, MoveCategory.SPECIAL, 100, 100, 5, -1, "Power is doubled if the target is over level 150.", -1, 0, 8)
.attr(MovePowerMultiplierAttr, (user: Pokemon, target: Pokemon, move: Move) => target.level > 150 ? 2 : 1)
];

View File

@ -10905,5 +10905,64 @@ export const pokemonLevelMoves: PokemonLevelMoves = {
[ 66, Moves.ZAP_CANNON ],
[ 73, Moves.HYPER_BEAM ],
[ 77, Moves.SELF_DESTRUCT ]
],
[Species.XERNEAS]: [
[ 1, Moves.TACKLE ],
[ 1, Moves.GRAVITY ],
[ 5, Moves.LIGHT_SCREEN ],
[ 10, Moves.AURORA_BEAM ],
[ 15, Moves.NATURE_POWER ],
[ 20, Moves.NIGHT_SLASH ],
[ 25, Moves.AROMATHERAPY ],
[ 30, Moves.PSYCH_UP ],
[ 35, Moves.HORN_LEECH ],
[ 40, Moves.CALM_MIND ],
[ 45, Moves.INGRAIN ],
[ 50, Moves.TAKE_DOWN ],
[ 55, Moves.GEOMANCY ],
[ 60, Moves.MOONBLAST ],
[ 65, Moves.HEAL_PULSE ],
[ 70, Moves.MEGAHORN ],
[ 75, Moves.CLOSE_COMBAT ],
[ 80, Moves.OUTRAGE ],
[ 85, Moves.GIGA_IMPACT ]
],
[Species.YVELTAL]: [
[ 1, Moves.GUST ],
[ 1, Moves.DOUBLE_TEAM ],
[ 5, Moves.TAUNT ],
[ 10, Moves.SNARL ],
[ 15, Moves.DISABLE ],
[ 20, Moves.SUCKER_PUNCH ],
[ 25, Moves.TAILWIND ],
[ 30, Moves.ROOST ],
[ 35, Moves.AIR_SLASH ],
[ 40, Moves.DARK_PULSE ],
[ 45, Moves.PSYCHIC ],
[ 50, Moves.OBLIVION_WING ],
[ 55, Moves.PHANTOM_FORCE ],
[ 60, Moves.FOUL_PLAY ],
[ 65, Moves.DRAGON_RUSH ],
[ 70, Moves.HURRICANE ],
[ 75, Moves.FOCUS_BLAST ],
[ 80, Moves.SKY_ATTACK ],
[ 85, Moves.HYPER_BEAM]
],
[Species.ETERNATUS]: [
[ 1, Moves.POISON_TAIL ],
[ 1, Moves.CONFUSE_RAY ],
[ 1, Moves.DRAGON_TAIL ],
[ 1, Moves.AGILITY ],
[ 8, Moves.TOXIC ],
[ 16, Moves.VENOSHOCK ],
[ 24, Moves.DRAGON_DANCE ],
[ 32, Moves.CROSS_POISON ],
[ 40, Moves.DRAGON_PULSE ],
[ 48, Moves.FLAMETHROWER ],
[ 56, Moves.DYNAMAX_CANNON ],
[ 64, Moves.COSMIC_POWER ],
[ 72, Moves.RECOVER ],
[ 80, Moves.HYPER_BEAM ],
[ 88, Moves.OUTRAGE ]
]
};

View File

@ -8,7 +8,7 @@ import * as Utils from '../utils';
export function getPokemonSpecies(species: Species): PokemonSpecies {
if (species >= Species.XERNEAS)
return allSpecies[Species.GENESECT + (species - Species.XERNEAS)];
return allSpecies.find(s => s.speciesId === species);
return allSpecies[species - 1];
}
@ -71,6 +71,10 @@ export abstract class PokemonSpeciesForm {
return !abilityIndex ? this.ability1 : abilityIndex === 1 && this.ability2 ? this.ability2 : this.abilityHidden
}
isObtainable() {
return this.generation <= 5;
}
getSpriteAtlasPath(female: boolean, formIndex?: integer, shiny?: boolean): string {
return this.getSpriteId(female, formIndex, shiny).replace(/\_{2}/g, '/');
}
@ -90,7 +94,7 @@ export abstract class PokemonSpeciesForm {
abstract getFormSpriteKey(formIndex?: integer): string;
getIconAtlasKey(): string {
return `pokemon_icons_${this.generation}`;
return `pokemon_icons_${Math.min(this.generation, 6)}`;
}
getIconId(female: boolean, formIndex?: integer): string {
@ -1079,5 +1083,6 @@ export const allSpecies = [
),
new PokemonSpecies(Species.GENESECT, "Genesect", 5, false, false, true, "Paleozoic Pokémon", Type.BUG, Type.STEEL, 1.5, 82.5, Abilities.DOWNLOAD, Abilities.NONE, Abilities.NONE, 600, 71, 120, 95, 120, 95, 99, 3, 0, 270, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
new PokemonSpecies(Species.XERNEAS, "Xerneas", 6, false, true, false, "Life Pokémon", Type.FAIRY, null, 3, 215, Abilities.FAIRY_AURA, Abilities.NONE, Abilities.NONE, 680, 126, 131, 95, 131, 98, 99, 45, 0, 306, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
new PokemonSpecies(Species.YVELTAL, "Yveltal", 6, false, true, false, "Destruction Pokémon", Type.DARK, Type.FLYING, 5.8, 203, Abilities.DARK_AURA, Abilities.NONE, Abilities.NONE, 680, 126, 131, 95, 131, 98, 99, 45, 0, 306, GrowthRate.SLOW, "Undiscovered", null, null, 120, false)
new PokemonSpecies(Species.YVELTAL, "Yveltal", 6, false, true, false, "Destruction Pokémon", Type.DARK, Type.FLYING, 5.8, 203, Abilities.DARK_AURA, Abilities.NONE, Abilities.NONE, 680, 126, 131, 95, 131, 98, 99, 45, 0, 306, GrowthRate.SLOW, "Undiscovered", null, null, 120, false),
new PokemonSpecies(Species.ETERNATUS, 'Eternatus', 8, false, true, false, 'Gigantic Pokemon', Type.POISON, Type.DRAGON, 20, 950, Abilities.PRESSURE, Abilities.NONE, Abilities.NONE, 690, 140, 85, 95, 145, 95, 130, 255, 0, 345, GrowthRate.SLOW, "Undiscovered", null, null, 120, false, false)
];

View File

@ -649,5 +649,6 @@ export enum Species {
MELOETTA,
GENESECT,
XERNEAS = 716,
YVELTAL
YVELTAL,
ETERNATUS = 890
};

View File

@ -13,6 +13,7 @@ import { getPokemonMessage } from '../messages';
import * as Utils from "../utils";
import { TempBattleStat } from '../data/temp-battle-stat';
import { BerryType, getBerryEffectFunc, getBerryPredicate } from '../data/berry';
import { Species } from '../data/species';
type ModifierType = ModifierTypes.ModifierType;
export type ModifierPredicate = (modifier: Modifier) => boolean;
@ -258,7 +259,15 @@ export abstract class PokemonHeldItemModifier extends PersistentModifier {
if (!forSummary) {
const pokemon = this.getPokemon(scene);
const pokemonIcon = scene.add.sprite(0, 8, pokemon.species.getIconAtlasKey());
pokemonIcon.play(pokemon.getIconKey()).stop();
if (pokemon.species.isObtainable())
pokemonIcon.play(pokemon.getIconKey()).stop();
else {
if (pokemon.species.speciesId === Species.ETERNATUS)
pokemonIcon.setScale(0.5, 0.5);
else
pokemonIcon.setPosition(-8, 0);
pokemonIcon.setFrame(pokemon.getIconId());
}
pokemonIcon.setOrigin(0, 0.5);
container.add(pokemonIcon);

View File

@ -55,6 +55,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
constructor(scene: BattleScene, x: number, y: number, species: PokemonSpecies, level: integer, abilityIndex?: integer, formIndex?: integer, gender?: Gender, shiny?: boolean, dataSource?: Pokemon) {
super(scene, x, y);
if (!species.isObtainable() && this.isPlayer())
throw `Cannot create a player Pokemon for species '${species.name}'`;
this.name = Utils.toPokemonUpperCase(species.name);
this.species = species;
this.battleInfo = this.isPlayer()
@ -121,13 +125,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
console.log('REAL SHINY!!');
if (this.shiny)
console.log((E ^ F), shinyThreshold.value);
/*else
this.shiny = Utils.randInt(16) === 0;*/
}
this.winCount = 0;
}
if (!species.isObtainable())
this.shiny = false;
//this.setPipeline(this.scene).spritePipeline);
this.calculateStats();

View File

@ -51,8 +51,8 @@ export class GameData {
this.scene = scene;
this.trainerId = Utils.randInt(65536);
this.secretId = Utils.randInt(65536);
if (!this.load())
this.initDexData();
this.initDexData();
this.load();
}
private save(): boolean {
@ -80,11 +80,12 @@ export class GameData {
this.trainerId = data.trainerId;
this.secretId = data.secretId;
this.dexData = data.dexData;
if (data.timestamp === undefined)
this.convertDexData(data.dexData);
this.dexData = Object.assign(this.dexData, data.dexData);
return true;
}

View File

@ -138,6 +138,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.genSpecies.push([]);
for (let species of allSpecies) {
if (species.generation > 5)
break;
if (pokemonPrevolutions.hasOwnProperty(species.speciesId) || species.generation !== g + 1)
continue;
this.speciesLoaded.set(species.speciesId, false);