Add color change ability, some moves, and fix mimic

This commit is contained in:
Flashfyre committed 2023-05-06 00:42:01 -04:00
1 parent 45f73cc6ed
commit 15cfd3bad4
9 files changed
+152 -52

No files matched your search

+2 -2
View File
@@ -63,7 +63,7 @@ export function initAutoPlay() {
const getMaxMoveEffectiveness = (attacker: Pokemon, defender: Pokemon) => {
let maxEffectiveness = 0.5;
for (let m of attacker.moveset) {
for (let m of attacker.getMoveset()) {
const moveType = m.getMove().type;
const effectiveness = defender.getAttackMoveEffectiveness(moveType);
if (effectiveness > maxEffectiveness)
@@ -129,7 +129,7 @@ export function initAutoPlay() {
playerPokemon.aiType = AiType.SMART;
thisArg.time.delayedCall(20, () => {
const nextMove = playerPokemon.getNextMove() as PokemonMove;
fightUiHandler.setCursor(playerPokemon.moveset.indexOf(nextMove));
fightUiHandler.setCursor(playerPokemon.getMoveset().indexOf(nextMove));
thisArg.time.delayedCall(20, () => this.processInput(Button.ACTION));
});
}
+1
View File
@@ -65,6 +65,7 @@ export default class PokemonData {
this.summonData.battleStats = source.summonData.battleStats;
this.summonData.moveQueue = source.summonData.moveQueue;
this.summonData.tags = []; // TODO
this.summonData.moveset = source.summonData.moveset;
this.summonData.types = source.summonData.types;
}
}