Ejemplo n.º 1
0
bulb = Pokemon('bulbasaur', route_1, {'absorb': 5}, 'gary\'s grass starter')
squirt = Pokemon('squirtle', route_1, {'bubble': 5}, 'gary\'s water starter')
charm = Pokemon('charmander', route_1, {'ember': 5}, 'gary\'s fire starter')
bulbasaur = Pokemon('bulbasaur', oak, {'absorb': 20}, 'The grass starter')
squirtle = Pokemon('squirtle', oak, {'bubble': 20}, 'The water starter')
charmander = Pokemon('charmander', oak, {'ember': 20}, 'The fire starter')
oak.add_pokemon(bulbasaur)
oak.add_pokemon(squirtle)
oak.add_pokemon(charmander)
starters.append(bulb)
starters.append(squirt)
starters.append(charm)

player = Trainer('ash')

rb1 = Trainer('gary')
rb1.weapon = random.choice(starters)
rb1.location = route_1


trainer_list = []
a = list(globals().values())
for item in a:
    if isinstance(item, Trainer):
        trainer_list.append(item)
        
def move_others():
    for et in trainer_list:
        if et.name != 'ash' and et.location == player.location:
            print('\nTrainer {} challenges you!\n'.format(et.name))
            move = et.weapon.damage.keys()
Ejemplo n.º 2
0
p_city_mart.add_pokemon(potion)
p_city_mart.add_pokemon(potion)
p_city_mart.add_pokemon(potion)
p_city_mart.add_pokemon(potion)
p_city_mart.add_pokemon(super_potion)
v_city_mart.add_pokemon(potion)
v_city_mart.add_pokemon(potion)
v_city_mart.add_pokemon(potion)
v_city_mart.add_pokemon(potion)
v_city_mart.add_pokemon(potion)
v_city_mart.add_pokemon(super_potion)
broom.add_pokemon(super_potion)

player = Trainer('ash')

rb1 = Trainer('gary')
rb1.weapon = random.choice(starters)
rb1.location = route_1
rb1.inventory = [potion] 

bt1 = Trainer('bug_trainer_bryce')
bt1.weapon = weedle2
bt1.location = v_forest1

bt2 = Trainer('bug_trainer_dillon')
bt2.weapon = scyth
bt2.location = v_forest4
bt2.inventory = [potion]

bt3 = Trainer('bug_trainer_zak')
bt3.weapon = butterfree