mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 05:42:18 +02:00
Added comments to PostTerrainTypeChangeAttr
This commit is contained in:
parent
b2ddd56925
commit
900113a03f
@ -2148,16 +2148,16 @@ export class PostTerrainChangeTypeAttr extends PostTerrainChangeAbAttr {
|
|||||||
|
|
||||||
applyPostTerrainChange(pokemon: Pokemon, passive: boolean, terrain: TerrainType, args: any[]): boolean {
|
applyPostTerrainChange(pokemon: Pokemon, passive: boolean, terrain: TerrainType, args: any[]): boolean {
|
||||||
|
|
||||||
if (this.terrainToTypeMap[terrain] == Type.UNKNOWN) {
|
if (this.terrainToTypeMap[terrain] == Type.UNKNOWN) { //If no type is given, transform back to original type
|
||||||
if (pokemon.summonData.types == null) return false;
|
if (pokemon.summonData.types == null) return false; //If already original type, ability did not activate
|
||||||
pokemon.summonData.types = null;
|
pokemon.summonData.types = null; //Clear any changed type
|
||||||
pokemon.updateInfo();
|
pokemon.updateInfo(); //Update info to apply change
|
||||||
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` transformed\nback into its original type!`));
|
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` transformed\nback into its original type!`));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
pokemon.summonData.types = [this.terrainToTypeMap[terrain]]
|
pokemon.summonData.types = [this.terrainToTypeMap[terrain]] //Changes type to the specified type based on the record
|
||||||
pokemon.updateInfo();
|
pokemon.updateInfo(); //Apply changes
|
||||||
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` transformed\ninto the ${Utils.toReadableString(Type[pokemon.getTypes()[0]])} type!`));
|
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` transformed\ninto the ${Utils.toReadableString(Type[pokemon.getTypes()[0]])} type!`));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user