def copy(parent, toCopy): """ Creates a copy of the given Battle Delegate """ delegate = PokemonBattleDelegate() delegate.parent = parent delegate.currHP = toCopy.currHP delegate.attacks = toCopy.attacks delegate.status = toCopy.status delegate.types = list(toCopy.types) delegate.stats = dict(toCopy.stats) return delegate
def buildStarter(parent): """ Builds a BattleDelegate for a Starter Pokemon """ delegate = PokemonBattleDelegate() # Set parent delegate.parent = parent # Get common info from Pokedex # PokemonBattleDelegateFactory.loadPokedexBattleInfo(delegate, parent.species) # Set currHP to full delegate.currHP = delegate.stats["HP"] # Load attacks delegate.attacks = [] # Status delegate.status = Status() return delegate