mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-03 06:37:12 +00:00
83c70889fc
Implement trainer battles; add dialogue functionality; add random session seed for predictable random results; remove capitalization from text; add full party heal after every 10 waves
20 lines
714 B
TypeScript
20 lines
714 B
TypeScript
import BattleScene from "../battle-scene";
|
|
import { TrainerType } from "../data/trainer-type";
|
|
import Trainer from "../trainer";
|
|
|
|
export default class TrainerData {
|
|
public trainerType: TrainerType;
|
|
public female: boolean;
|
|
public partyTemplateIndex: integer;
|
|
|
|
constructor(source: Trainer | any) {
|
|
const sourceTrainer = source instanceof Trainer ? source as Trainer : null;
|
|
this.trainerType = sourceTrainer ? sourceTrainer.config.trainerType : source.trainerType;
|
|
this.female = source.female;
|
|
this.partyTemplateIndex = source.partyMemberTemplateIndex;
|
|
}
|
|
|
|
toTrainer(scene: BattleScene): Trainer {
|
|
return new Trainer(scene, this.trainerType, this.female, this.partyTemplateIndex);
|
|
}
|
|
} |