mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-24 01:41:08 +00:00
2bd07cb84e
- remove any `.js` extension imports - remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static - increase vite chunk-size warning limit Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
21 lines
896 B
TypeScript
21 lines
896 B
TypeScript
import { Arena } from "../field/arena";
|
|
import { ArenaTag } from "../data/arena-tag";
|
|
import { Biome } from "#enums/biome";
|
|
import { Weather } from "../data/weather";
|
|
import { Terrain } from "#app/data/terrain";
|
|
|
|
export default class ArenaData {
|
|
public biome: Biome;
|
|
public weather: Weather | null;
|
|
public terrain: Terrain | null;
|
|
public tags: ArenaTag[];
|
|
|
|
constructor(source: Arena | any) {
|
|
const sourceArena = source instanceof Arena ? source as Arena : null;
|
|
this.biome = sourceArena ? sourceArena.biomeType : source.biome;
|
|
this.weather = sourceArena ? sourceArena.weather : source.weather ? new Weather(source.weather.weatherType, source.weather.turnsLeft) : null;
|
|
this.terrain = sourceArena ? sourceArena.terrain : source.terrain ? new Terrain(source.terrain.terrainType, source.terrain.turnsLeft) : null;
|
|
this.tags = sourceArena ? sourceArena.tags : [];
|
|
}
|
|
}
|