示例#1
0
def starterBall(data, starter):
    if data.story.oakSpeechCompleted == False:
        worldText(data, 'There are three pokeballs on the table.')
    elif data.story.startPokemonChosen == True:
        worldText(data, 'This is where I got my first Pokemon!')
    else:
        chooseStarter(data, starter)
示例#2
0
def chooseStarter(data, starter):
    if starter == 'Bulbasaur':
        outcome = worldTextOptions(
            data,
            'Would you like Bulbasaur, the grass-type Pokemon?',
            options=["Yes", "No"],
            response=True)
    elif starter == 'Charmander':
        outcome = worldTextOptions(
            data,
            'Would you like Charmander, the fire-type Pokemon?',
            options=["Yes", "No"],
            response=True)
    elif starter == 'Squirtle':
        outcome = worldTextOptions(
            data,
            'Would you like Squirtle, the water-type Pokemon?',
            options=["Yes", "No"],
            response=True)
    if outcome == "Yes":
        getStarter(data, starter)
        worldText(data, '> Congratulations, you got a',
                  data.player.team[0].name + '! <')
        getNamePokemon(data, data.player.team[0], battle=False)
        worldText(data, data.rival.name + ': Alright then, I\'ll take the',
                  data.rival.team[0].name + '!')
def getNamePokemon(data, pokemon, battle=True):
    if battle == False:
        choice = worldTextOptions(data,
                                  'Would you like to name the ' +
                                  pokemon.name + '?',
                                  options=["Yes", "No"],
                                  response=True)
    else:
        drawScreen(data)
        onlyTextBoxWithOptions('Would you like to name the ' + pokemon.name +
                               '?',
                               options=["Yes", "No"])
        choice = getOption(["Yes", "No"])
    if choice == "Yes":
        if battle == False:
            worldText(data, "What would you like to name it?", response=True)
        else:
            drawScreen(data)
            onlyTextBox("What would you like to name it?")
        while True:
            choiceInput = input('-- ')
            if len(choiceInput) <= 10:
                if choiceInput == "":
                    pokemon.name = pokemon.species
                    return
                pokemon.name = choiceInput
                return
            else:
                print('That name is too long! 10 characters max!')


#┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
#┃ │	 a	 ╭╮		   ╭╮	 c	 ╭╮	 d	 │ ┃
#┃ │   ITEMS   ││	 b	 ││ KEY ITEMS ││   BALLS   │ ┃
#┃ ╰───────────╯│  HEALING  │╰───────────╯╰───────────╯ ┃
#┃			  ╰───────────╯						   ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┃						   │						  ┃
#┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
#┃ Which item would you like to choose?				 ┃
#┃													  ┃
#┃													  ┃
#┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
示例#4
0
def chooseCharacterName(data):
    while True:
        try:
            choiceInput = input('-- ')
            if choiceInput != '':
                return choiceInput
            worldText(data,
                      'Oak: Sorry, I missed that. Say again?',
                      response=True)
        except ValueError:
            worldText(data,
                      'Oak: Sorry, I missed that. Say again?',
                      response=True)
def checkStoryInteraction(data, x, y):
    if data.environment.location.name == 'Pallet Town':
        if data.story.startPokemonChosen == False:
            worldText(data,
                      'You shouldn\'t go into tall grass without a Pokemon!')
            return True
        else:
            return False
    elif data.environment.location.name == 'Oak Lab':
        if data.story.startPokemonChosen == True and data.story.starterRivalFightCompleted == False:
            talkStarterRivalFight(data)
            return False
        else:
            return False
    else:
        return False
示例#6
0
def chooseFromMenu(data):
    while True:
        choices = "Pokedex", "Pokemon", "Bag", "Player", "Save", "Options", "Exit"
        choice = getOption(
            ["Pokedex", "Pokemon", "Bag", "Player", "Save", "Options", "Exit"])
        if choice == "Pokedex":
            print("Pokedex")
            worldText(data,
                      "Sorry, this is not yet available!",
                      menu=True,
                      response=True)
        elif choice == "Pokemon":
            if data.story.startPokemonChosen or data.settings.settingsDict[
                    "WallClip"]:
                openPokemonSelectionScreen(data)
                drawOverworld(data,
                              data.player.xCo,
                              data.player.yCo,
                              data.environment.location.map,
                              text=False,
                              menu=True)
            else:
                worldText(data,
                          "You do not have any Pokemon yet!",
                          menu=True,
                          response=True)
        elif choice == "Bag":
            openBag(data)
            drawOverworld(data,
                          data.player.xCo,
                          data.player.yCo,
                          data.environment.location.map,
                          text=False,
                          menu=True)
        elif choice == "Player":
            print("Player")
            worldText(data,
                      "Sorry, this is not yet available!",
                      menu=True,
                      response=True)
        elif choice == "Save":
            saveGame(data)
            worldText(data,
                      "Your game has been saved successfully!",
                      menu=True,
                      response=True)
        elif choice == "Options":
            optionsScreen(data)
            drawOverworld(data,
                          data.player.xCo,
                          data.player.yCo,
                          data.environment.location.map,
                          text=False,
                          menu=True)
        elif choice == "Exit" or choice == "Back":
            print("Exit")
            return "Exit"
def pokemonCenter(data, whitedOut):
    if whitedOut == True:
        healAllPokemon(data)
    else:
        option = worldTextOptions(
            data,
            'Hello, welcome to the Pokemon Centre, would you like me to heal your Pokemon?',
            options=["Yes", "No"],
            response=True)
        if option == "Yes":
            worldText(
                data,
                "Okay, please let me take your pokemon for a few moments.")
            healAllPokemon(data)
            worldText(
                data,
                'Your team is now at full health! We hope to see you again!')
        else:
            worldText(data, 'Alright, see you next time.')
示例#8
0
def talkStarterRivalFight(data):
    worldText(
        data, data.rival.name +
        ': Where are you running off to?! Now that we\'ve both got Pokemon',
        data.player.name + ', let\'s fight and see who\'s best!')
    data.enemy = data.rival
    outcome = startBattle(data)
    if outcome == 'Win':
        text(data, data.rival.name + ': Yeah, okay, beginner\'s luck.')
        worldText(
            data, data.rival.name +
            ': Next time I won\'t go so easy on you. Anyway, smell ya later!')
    else:
        text(data, data.rival.name + ': Just as I expected, easy.')
        worldText(
            data, data.rival.name +
            ': Better luck next time. Anyway, smell ya later!')
    data.story.starterRivalFightCompleted = True
    worldText(
        data, 'Oak: In any case',
        data.player.name + ", great effort! Let me heal your " +
        data.player.pokemon.name + " up.")
    healPokemon(data.player.pokemon)
    worldText(
        data,
        "Here, take 5 PokeBalls and go and start your Pokemon adventure!")
    worldText(data, '> Congratulations, you received 5 PokeBalls!')
示例#9
0
def talkOak(data):
    if data.story.oakSpeechCompleted == False:
        oakOpeningMonologue(data)
    elif data.story.startPokemonChosen == False:
        worldText(data, 'Oak: Go ahead and choose one from the table there.')
示例#10
0
def oakOpeningMonologue(data):
    worldText(data,
              'Oak: Hello and welcome to the wonderful world of Pokemon!')
    worldText(data,
              'Oak: My name is Professor Oak! What\'s your name?',
              response=True)
    data.player.name = chooseCharacterName(data)
    worldText(
        data,
        'Oak: Ah yes, lovely to meet you. My grandson lives closeby too, any idea what his name is?',
        response=True)
    data.rival.name = chooseCharacterName(data)
    worldText(data,
              data.rival.name + ': Grandpa! Did you forget my name again?!')
    worldText(
        data,
        'Oak: Ahem, no, of course not! I was just joking around. Now let\'s get down to business.'
    )
    worldText(
        data, 'Oak: Now', data.player.name + ',', data.rival.name +
        ', I\'d like to give you each a Pokemon, and see how you get on in the world!'
    )
    worldText(data, data.rival.name + ': Yeah! Thanks Grandpa!')
    worldText(data, 'Oak: Hold on', data.rival.name + ', we should let',
              data.player.name,
              'choose first. Go ahead and choose one from the table there.')
    data.story.oakSpeechCompleted = True
示例#11
0
def printSign(data, newX, newY):
    for sign in data.environment.location.signs:
        if sign.coords == [newX, newY]:
            worldText(data, sign.text)