Fix grassy terrain heal being applied to all terrains
This commit is contained in:
parent
6dac4c2b0f
commit
20e9a1e761
|
@ -285,20 +285,6 @@ export class Arena {
|
||||||
this.scene.queueMessage(getTerrainStartMessage(terrain));
|
this.scene.queueMessage(getTerrainStartMessage(terrain));
|
||||||
} else
|
} else
|
||||||
this.scene.queueMessage(getTerrainClearMessage(oldTerrainType));
|
this.scene.queueMessage(getTerrainClearMessage(oldTerrainType));
|
||||||
/*[
|
|
||||||
this.scene.arenaBg,
|
|
||||||
this.scene.arenaBgTransition,
|
|
||||||
this.scene.arenaPlayer.base,
|
|
||||||
this.scene.arenaPlayer.props,
|
|
||||||
this.scene.arenaPlayerTransition.base,
|
|
||||||
this.scene.arenaPlayerTransition.props,
|
|
||||||
this.scene.arenaEnemy.base,
|
|
||||||
this.scene.arenaEnemy.props,
|
|
||||||
this.scene.arenaNextEnemy.base,
|
|
||||||
this.scene.arenaNextEnemy.props
|
|
||||||
]
|
|
||||||
.flat()
|
|
||||||
.map(a => a.pipelineData['terrainColor'] = getTerrainColor());*/
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ export enum FieldPosition {
|
||||||
}
|
}
|
||||||
|
|
||||||
const ABILITY_OVERRIDE = Abilities.NONE;
|
const ABILITY_OVERRIDE = Abilities.NONE;
|
||||||
const MOVE_OVERRIDE = Moves.NONE;;
|
const MOVE_OVERRIDE = Moves.NONE;
|
||||||
|
|
||||||
const OPP_ABILITY_OVERRIDE = Abilities.NONE;
|
const OPP_ABILITY_OVERRIDE = Abilities.NONE;
|
||||||
const OPP_MOVE_OVERRIDE = Moves.NONE;
|
const OPP_MOVE_OVERRIDE = Moves.NONE;
|
||||||
|
|
|
@ -51,6 +51,7 @@ import { battleSpecDialogue, getCharVariantFromDialogue } from "./data/dialogue"
|
||||||
import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "./ui/modifier-select-ui-handler";
|
import ModifierSelectUiHandler, { SHOP_OPTIONS_ROW_LIMIT } from "./ui/modifier-select-ui-handler";
|
||||||
import { Setting } from "./system/settings";
|
import { Setting } from "./system/settings";
|
||||||
import { Tutorial, handleTutorial } from "./tutorial";
|
import { Tutorial, handleTutorial } from "./tutorial";
|
||||||
|
import { TerrainType } from "./data/terrain";
|
||||||
|
|
||||||
export class LoginPhase extends Phase {
|
export class LoginPhase extends Phase {
|
||||||
private showText: boolean;
|
private showText: boolean;
|
||||||
|
@ -1744,7 +1745,7 @@ export class TurnEndPhase extends FieldPhase {
|
||||||
this.scene.applyModifier(EnemyStatusEffectHealChanceModifier, false, pokemon);
|
this.scene.applyModifier(EnemyStatusEffectHealChanceModifier, false, pokemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.scene.arena.terrain && pokemon.isGrounded()) {
|
if (this.scene.arena.terrain?.terrainType === TerrainType.GRASSY && pokemon.isGrounded()) {
|
||||||
this.scene.unshiftPhase(new PokemonHealPhase(this.scene, pokemon.getBattlerIndex(),
|
this.scene.unshiftPhase(new PokemonHealPhase(this.scene, pokemon.getBattlerIndex(),
|
||||||
Math.max(pokemon.getMaxHp() >> 4, 1), getPokemonMessage(pokemon, ' regained\nhealth from the Grassy Terrain!'), true));
|
Math.max(pokemon.getMaxHp() >> 4, 1), getPokemonMessage(pokemon, ' regained\nhealth from the Grassy Terrain!'), true));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue