// Constructor public Trainer( string name = "", int playerID = -1, int teamPos = 1, bool isWildPokemon = false, IEnumerable <Pokemon> party = null, IEnumerable <Item> items = null, Item megaRing = null, Item ZRing = null, Item dynamaxBand = null) { this.name = name; this.playerID = playerID; this.teamID = teamPos; this.party = new List <Pokemon>(); if (party != null) { this.party.AddRange(party); } this.items = new List <Item>(); if (items != null) { this.items.AddRange(items); } this.megaRing = (megaRing == null) ? null : megaRing.Clone(); this.ZRing = (ZRing == null) ? null : ZRing.Clone(); this.dynamaxBand = (dynamaxBand == null) ? null : dynamaxBand.Clone(); // battle bProps = new TrainerBattleProperties(this); }
// Clone public TrainerBattleProperties Clone(Trainer original) { TrainerBattleProperties clone = new TrainerBattleProperties(original); clone.usedMegaEvolution = usedMegaEvolution; clone.usedZMove = usedZMove; clone.usedDynamax = usedDynamax; clone.usedBallFetch = usedBallFetch; clone.failedPokeball = failedPokeball; clone.payDayMoney = payDayMoney; return(clone); }