mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-03 14:47:12 +00:00
17 lines
663 B
TypeScript
17 lines
663 B
TypeScript
import { Arena } from "../arena";
|
|
import { ArenaTag } from "../data/arena-tag";
|
|
import { Biome } from "../data/biome";
|
|
import { Weather } from "../data/weather";
|
|
|
|
export default class ArenaData {
|
|
public biome: Biome;
|
|
public weather: Weather;
|
|
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) : undefined;
|
|
this.tags = sourceArena ? sourceArena.tags : [];
|
|
}
|
|
} |