pokerogue/src/system/arena-data.ts

17 lines
675 B
TypeScript
Raw Normal View History

2024-02-29 20:08:50 -05:00
import { Arena } from "../field/arena";
2023-04-28 15:03:42 -04:00
import { ArenaTag } from "../data/arena-tag";
import { Biome } from "../data/enums/biome";
2023-04-28 15:03:42 -04:00
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 : [];
}
}