Fix some bugs

pull/1/head
Flashfyre 2023-04-21 00:10:45 -04:00
parent 4d69d3b219
commit 3b238737a1
2 changed files with 2 additions and 2 deletions

View File

@ -598,7 +598,7 @@ export class TurnEndPhase extends BattlePhase {
const enemyPokemon = this.scene.getEnemyPokemon();
const handlePokemon = (pokemon: Pokemon) => {
if (!pokemon)
if (!pokemon || !pokemon.hp)
return;
pokemon.lapseTags(BattleTagLapseType.TURN_END);

View File

@ -273,7 +273,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
let ret = this.stats[stat] * (Math.max(2, 2 + statLevel.value) / Math.max(2, 2 - statLevel.value));
if (stat === Stat.SPDEF && this.scene.arena.weather?.weatherType === WeatherType.SANDSTORM)
ret *= 1.5;
if (this.status && this.status.effect === StatusEffect.PARALYSIS)
if (stat === Stat.SPD && this.status && this.status.effect === StatusEffect.PARALYSIS)
ret >>= 2;
return ret;
}