Minor fixes
This commit is contained in:
parent
052d8ca765
commit
34ba66346e
|
@ -26,5 +26,5 @@ dist-ssr
|
|||
public/images/trainer/convert/*
|
||||
public/images/pokemon/input/*.png
|
||||
public/images/pokemon/input/output/*
|
||||
src/data/battle-anim-raw-data.ts
|
||||
src/data/battle-anim-raw-data*.ts
|
||||
src/data/battle-anim-data.ts
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
import BattleScene, { startingLevel, startingWave } from "./battle-scene";
|
||||
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult } from "./pokemon";
|
||||
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./pokemon";
|
||||
import * as Utils from './utils';
|
||||
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveCategory, MoveEffectAttr, MoveFlags, Moves, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr } from "./data/move";
|
||||
import { Mode } from './ui/ui';
|
||||
|
@ -34,6 +34,7 @@ import { Species } from "./data/species";
|
|||
import { HealAchv, LevelAchv, MoneyAchv, achvs } from "./system/achv";
|
||||
import { DexEntry } from "./system/game-data";
|
||||
import { pokemonPrevolutions } from "./data/pokemon-evolutions";
|
||||
import { trainerConfigs } from "./data/trainer-type";
|
||||
|
||||
export class CheckLoadPhase extends BattlePhase {
|
||||
private loaded: boolean;
|
||||
|
@ -1603,6 +1604,12 @@ export class MovePhase extends BattlePhase {
|
|||
}
|
||||
|
||||
showMoveText(): void {
|
||||
if (this.move.getMove().getAttrs(ChargeAttr).length) {
|
||||
const lastMove = this.pokemon.getLastXMoves() as TurnMove[];
|
||||
if (!lastMove.length || lastMove[0].move !== this.move.getMove().id || lastMove[0].result !== MoveResult.OTHER)
|
||||
return;
|
||||
}
|
||||
|
||||
this.scene.queueMessage(getPokemonMessage(this.pokemon, ` used\n${this.move.getName()}!`), 500);
|
||||
}
|
||||
|
||||
|
@ -3306,6 +3313,32 @@ export class ScanIvsPhase extends PokemonPhase {
|
|||
}
|
||||
}
|
||||
|
||||
export class TrainerMessageTestPhase extends BattlePhase {
|
||||
constructor(scene: BattleScene) {
|
||||
super(scene);
|
||||
}
|
||||
|
||||
start() {
|
||||
super.start();
|
||||
|
||||
let testMessages: string[] = [];
|
||||
|
||||
for (let t of Object.keys(trainerConfigs)) {
|
||||
const config = trainerConfigs[parseInt(t)];
|
||||
[ config.encounterMessages, config.femaleEncounterMessages, config.victoryMessages, config.femaleVictoryMessages, config.defeatMessages, config.femaleDefeatMessages ]
|
||||
.map(messages => {
|
||||
if (messages?.length)
|
||||
testMessages.push(...messages);
|
||||
});
|
||||
}
|
||||
|
||||
for (let message of testMessages)
|
||||
this.scene.pushPhase(new TestMessagePhase(this.scene, message));
|
||||
|
||||
this.end();
|
||||
}
|
||||
}
|
||||
|
||||
export class TestMessagePhase extends MessagePhase {
|
||||
constructor(scene: BattleScene, message: string) {
|
||||
super(scene, message, null, true);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Phaser from 'phaser';
|
||||
import { Biome } from './data/biome';
|
||||
import UI, { Mode } from './ui/ui';
|
||||
import { EncounterPhase, SummonPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, CheckLoadPhase, TurnInitPhase, ReturnPhase, LevelCapPhase, TestMessagePhase, ShowTrainerPhase } from './battle-phases';
|
||||
import { EncounterPhase, SummonPhase, NextEncounterPhase, NewBiomeEncounterPhase, SelectBiomePhase, MessagePhase, CheckLoadPhase, TurnInitPhase, ReturnPhase, LevelCapPhase, TestMessagePhase, ShowTrainerPhase, TrainerMessageTestPhase } from './battle-phases';
|
||||
import Pokemon, { PlayerPokemon, EnemyPokemon } from './pokemon';
|
||||
import PokemonSpecies, { PokemonSpeciesFilter, allSpecies, getPokemonSpecies, initSpecies } from './data/pokemon-species';
|
||||
import * as Utils from './utils';
|
||||
|
@ -690,7 +690,7 @@ export default class BattleScene extends Phaser.Scene {
|
|||
this.currentBattle = new Battle(newWaveIndex, newBattleType, newTrainer, newDouble);
|
||||
this.currentBattle.incrementTurn(this);
|
||||
|
||||
//this.pushPhase(new TestMessagePhase(this, trainerConfigs[TrainerType.RIVAL].encounterMessages[0]))
|
||||
//this.pushPhase(new TrainerMessageTestPhase(this));
|
||||
|
||||
if (!waveIndex) {
|
||||
const isNewBiome = !lastBattle || !(lastBattle.waveIndex % 10);
|
||||
|
|
|
@ -167,7 +167,7 @@ export async function printPokemon() {
|
|||
speciesFormLevelMoves[speciesKey][pokemonForm.formIndex] = [];
|
||||
|
||||
for (let version of versions) {
|
||||
if (pokemon.moves.find(m => m.version_group_details.find(v => v.version_group.name === version))) {
|
||||
if (pokemon.moves.find(m => m.version_group_details.find(v => v.version_group.name === version && v.move_learn_method.name === 'level-up'))) {
|
||||
moveVer = version;
|
||||
break;
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ export async function printPokemon() {
|
|||
speciesLevelMoves[speciesKey] = [];
|
||||
|
||||
for (let version of versions) {
|
||||
if (pokemon.moves.find(m => m.version_group_details.find(v => v.version_group.name === version))) {
|
||||
if (pokemon.moves.find(m => m.version_group_details.find(v => v.version_group.name === version && v.move_learn_method.name === 'level-up'))) {
|
||||
moveVer = version;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -779,16 +779,16 @@ export const trainerConfigs: TrainerConfigs = {
|
|||
]),
|
||||
[TrainerType.FLANNERY]: new TrainerConfig(++t).initForGymLeader(Species.TORKOAL, Type.FIRE)
|
||||
.setEncounterMessages([
|
||||
`Nice to meet you! Wait, no...\nI will crush you!`,
|
||||
`I've only been a leader for a little while,\nbut I'll smoke you!`,
|
||||
`It's time to demonstrate the moves my grandfather has taught me!\nLet's battle!`
|
||||
`Nice to meet you! Wait, no…\nI will crush you!`,
|
||||
`I've only been a leader for a little while, but I'll smoke you!`,
|
||||
`It's time to demonstrate the moves my grandfather has taught me! Let's battle!`
|
||||
]).setVictoryMessages([
|
||||
`You remind me of my grandfather...\nNo wonder I lost.`,
|
||||
`You remind me of my grandfather…\nNo wonder I lost.`,
|
||||
`Am I trying too hard?\nI should relax, can't get too heated.`,
|
||||
`Losing isn't going to smother me out.\nTime to reignite training!`
|
||||
]).setDefeatMessages([
|
||||
`I hope I've made my grandfather proud...\nLet's battle again some time.`,
|
||||
`I...I can't believe I won!\nDoing things my way worked!`,
|
||||
`I hope I've made my grandfather proud…\nLet's battle again some time.`,
|
||||
`I…I can't believe I won!\nDoing things my way worked!`,
|
||||
`Let's exchange burning hot moves again soon!`
|
||||
]),
|
||||
[TrainerType.NORMAN]: new TrainerConfig(++t).initForGymLeader(Species.SLAKOTH, Type.NORMAL)
|
||||
|
@ -797,8 +797,8 @@ export const trainerConfigs: TrainerConfigs = {
|
|||
`I'll do everything in my power as a Gym Leader to win.\nLet's go!`,
|
||||
`You better give this your all.\nIt's time to battle!`
|
||||
]).setVictoryMessages([
|
||||
`I lost to you...?\nRules are rules, though.`,
|
||||
`Was moving from Olivine a mistake...?`,
|
||||
`I lost to you…?\nRules are rules, though.`,
|
||||
`Was moving from Olivine a mistake…?`,
|
||||
`I can't believe it.\nThat was a great match.`
|
||||
]).setDefeatMessages([
|
||||
`We both tried our best.\nI hope we can battle again soon.`,
|
||||
|
@ -807,57 +807,57 @@ export const trainerConfigs: TrainerConfigs = {
|
|||
]),
|
||||
[TrainerType.WINONA]: new TrainerConfig(++t).initForGymLeader(Species.SWABLU, Type.FLYING)
|
||||
.setEncounterMessages([
|
||||
`I've been soaring the skies looking for prey...\nAnd you're my target!`,
|
||||
`No matter how our battle is, My Flying Pokèmon and I will triumph with grace.\nLet's battle!`,
|
||||
`I've been soaring the skies looking for prey…\nAnd you're my target!`,
|
||||
`No matter how our battle is, my Flying Pokémon and I will triumph with grace. Let's battle!`,
|
||||
`I hope you aren't scared of heights.\nLet's ascend!`
|
||||
]).setVictoryMessages([
|
||||
`You're the first Trainer I've seen with more grace than I.\nExcellently played.`,
|
||||
`Oh, my Flying Pokèmon have plummeted!\nVery well.`,
|
||||
`Though I may have fallen, my Pokèmon will continue to fly!`
|
||||
`Oh, my Flying Pokémon have plummeted!\nVery well.`,
|
||||
`Though I may have fallen, my Pokémon will continue to fly!`
|
||||
]).setDefeatMessages([
|
||||
`My Flying Pokèmon and I will forever dance elegantly!`,
|
||||
`My Flying Pokémon and I will forever dance elegantly!`,
|
||||
`I hope you enjoyed our show.\nOur graceful dance is finished.`,
|
||||
`Won't you come see our elegant choreography again?`
|
||||
]),
|
||||
[TrainerType.TATE]: new TrainerConfig(++t).initForGymLeader(Species.SOLROCK, Type.PSYCHIC)
|
||||
.setEncounterMessages([
|
||||
`Hehehe...\nWere you surprised to see me without my sister?`,
|
||||
`I can see what you're thinking...\nYou want to battle!`,
|
||||
`How can you defeat someone...\nWho knows your every move?`
|
||||
`Hehehe…\nWere you surprised to see me without my sister?`,
|
||||
`I can see what you're thinking…\nYou want to battle!`,
|
||||
`How can you defeat someone…\nWho knows your every move?`
|
||||
]).setVictoryMessages([
|
||||
`It can't be helped...\nI miss Liza...`,
|
||||
`Your bond with your Pokèmon was stronger than mine.`,
|
||||
`It can't be helped…\nI miss Liza…`,
|
||||
`Your bond with your Pokémon was stronger than mine.`,
|
||||
`If I were with Liza, we would have won.\nWe can finish each other's thoughts!`
|
||||
]).setDefeatMessages([
|
||||
`My Pokèmon and I are superior!`,
|
||||
`My Pokémon and I are superior!`,
|
||||
`If you can't even defeat me, you'll never be able to defeat Liza either.`,
|
||||
`It's all thanks to my strict training with Liza.\nI can make myself one with Pokèmon.`
|
||||
`It's all thanks to my strict training with Liza.\nI can make myself one with Pokémon.`
|
||||
]),
|
||||
[TrainerType.LIZA]: new TrainerConfig(++t).initForGymLeader(Species.LUNATONE, Type.PSYCHIC)
|
||||
.setEncounterMessages([
|
||||
`Fufufu...\nWere you surprised to see me without my brother?`,
|
||||
`I can determine what you desire...\nYou want to battle, don't you?`,
|
||||
`How can you defeat someone...\nWho's one with their Pokèmon?`
|
||||
`Fufufu…\nWere you surprised to see me without my brother?`,
|
||||
`I can determine what you desire…\nYou want to battle, don't you?`,
|
||||
`How can you defeat someone…\nWho's one with their Pokémon?`
|
||||
]).setVictoryMessages([
|
||||
`It can't be helped...\nI miss Tate...`,
|
||||
`Your bond with your Pokèmon...\nIt's stronger than mine.`,
|
||||
`It can't be helped…\nI miss Tate…`,
|
||||
`Your bond with your Pokémon…\nIt's stronger than mine.`,
|
||||
`If I were with Tate, we would have won.\nWe can finish each other's sentences!`
|
||||
]).setDefeatMessages([
|
||||
`My Pokèmon and I are victorious.`,
|
||||
`My Pokémon and I are victorious.`,
|
||||
`If you can't even defeat me, you'll never be able to defeat Tate either.`,
|
||||
`It's all thanks to my strict training with Tate.\nI can synchronize myself with my Pokèmon.`
|
||||
`It's all thanks to my strict training with Tate.\nI can synchronize myself with my Pokémon.`
|
||||
]),
|
||||
[TrainerType.JUAN]: new TrainerConfig(++t).initForGymLeader(Species.HORSEA, Type.WATER)
|
||||
.setEncounterMessages([
|
||||
`Now's not the time to act coy.\nLet's battle!`,
|
||||
`Ahahaha, You'll be witness to my artistry with Water Pokèmon!`,
|
||||
`Ahahaha, You'll be witness to my artistry with Water Pokémon!`,
|
||||
`A typhoon approaches!\nWill you be able to test me?`
|
||||
]).setVictoryMessages([
|
||||
`You may be a genius who can take on Wallace!`,
|
||||
`I focused on elegance while you trained.\nIt's only natural that you defeated me.`,
|
||||
`Ahahaha!\nVery well, You have won this time.`
|
||||
]).setDefeatMessages([
|
||||
`My Pokèmon and I have sculpted an illusion of Water and come out victorious.`,
|
||||
`My Pokémon and I have sculpted an illusion of Water and come out victorious.`,
|
||||
`Ahahaha, I have won, and you have lost.`,
|
||||
`Shall I loan you my outfit? It may help you battle!\nAhahaha, I jest!`
|
||||
]),
|
||||
|
|
|
@ -518,9 +518,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
}
|
||||
|
||||
getMoveset(ignoreOverride?: boolean): PokemonMove[] {
|
||||
if (!ignoreOverride && this.summonData?.moveset)
|
||||
return this.summonData.moveset;
|
||||
return this.moveset;
|
||||
const ret = !ignoreOverride && this.summonData?.moveset
|
||||
? this.summonData.moveset
|
||||
: this.moveset;
|
||||
|
||||
if (MOVE_OVERRIDE && this.isPlayer())
|
||||
this.moveset[0] = new PokemonMove(MOVE_OVERRIDE);
|
||||
else if (OPP_MOVE_OVERRIDE && !this.isPlayer())
|
||||
this.moveset[0] = new PokemonMove(OPP_MOVE_OVERRIDE);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
getLearnableLevelMoves(): Moves[] {
|
||||
|
@ -761,11 +768,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
console.log(allMoves[movePool[moveIndex]]);
|
||||
movePool.splice(moveIndex, 1);
|
||||
}
|
||||
|
||||
if (MOVE_OVERRIDE && this.isPlayer())
|
||||
this.moveset[0] = new PokemonMove(MOVE_OVERRIDE);
|
||||
else if (OPP_MOVE_OVERRIDE && !this.isPlayer())
|
||||
this.moveset[0] = new PokemonMove(OPP_MOVE_OVERRIDE);
|
||||
}
|
||||
|
||||
trySelectMove(moveIndex: integer, ignorePp?: boolean): boolean {
|
||||
|
|
Loading…
Reference in New Issue