From 37eb5c8eb0d1eba65fb7f4c367e80787b3f6c535 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 5 Apr 2024 11:42:55 -0400 Subject: [PATCH] Add more recent move selections for trainer and boss Pokemon --- src/field/pokemon.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 6fd5564ef..732439c7a 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -952,15 +952,17 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { return move.category !== MoveCategory.STATUS; }); + const easeType = this.hasTrainer() || this.isBoss() ? this.hasTrainer() && this.isBoss() ? 'Quart.easeIn' : 'Cubic.easeIn' : 'Sine.easeIn'; + if (attackMovePool.length) { - const randomAttackMove = Utils.randSeedEasedWeightedItem(attackMovePool); + const randomAttackMove = Utils.randSeedEasedWeightedItem(attackMovePool, easeType); this.moveset.push(new PokemonMove(randomAttackMove, 0, 0)); console.log(allMoves[randomAttackMove]); movePool.splice(movePool.findIndex(m => m === randomAttackMove), 1); } while (movePool.length && this.moveset.length < 4) { - const randomMove = Utils.randSeedEasedWeightedItem(movePool); + const randomMove = Utils.randSeedEasedWeightedItem(movePool, easeType); this.moveset.push(new PokemonMove(randomMove, 0, 0)); console.log(allMoves[randomMove]); movePool.splice(movePool.indexOf(randomMove), 1);