コード例 #1
0
ファイル: aventure_game.py プロジェクト: nckmrrtt/aventure
def woods_1_n1():
    """
    dangerous corner woods
    +---------+
    |	      |
    |	      |
    |	    X |
    +---------+
    """
    global woods_1_n1_name,map_2
    map_2 = map_2[:12] + '|	  X |' + map_2[24:]
    try:
	raw_input("You enter " + woods_1_n1_name + ".\n")
    except:

	woods_1_n1_name = words.woods_name()
	raw_input("You enter " + woods_1_n1_name + ".\n")
    monsta_here = round(random.random() + .4)
    if monsta_here:
	result = encounter_monster(['medium_monsters','large_monsters'])
	if result == 'death':
	    return result
    else:
	raw_input("Not much here.\n")

    next = (
	    ['woods_1_0','woods_0_n1'],
	    ["North","West"]
	    )

    return pick_place(next,'Where to next?')
コード例 #2
0
ファイル: aventure_game.py プロジェクト: nckmrrtt/aventure
def woods_0_n1():
    """
    quieter, southern woods
    +---------+
    |	      |
    |	      |
    |	 X    |
    +---------+
    """
    global woods_0_n1_name,map_2
    map_2 = map_2[:12] + '|    X    |' + map_2[24:]
    try:
	raw_input("You enter " + woods_0_n1_name + "!\n")
    except:

	woods_0_n1_name = words.woods_name()
	raw_input("You enter " + woods_0_n1_name + "!\n")
    monsta_here = round(random.random() -.2)
    if monsta_here:
	result = encounter_monster(['tiny_monsters','small_monsters'])
	if result == 'death':
	    return result
    else:
	raw_input("Not much here.\n")
    next =  (
	    ['woods_0_0','woods_1_n1','woods_n1_n1'],
	    ["North","East","West"]
	    )

    return pick_place(next,'Where to next?')
コード例 #3
0
ファイル: aventure_game.py プロジェクト: nckmrrtt/aventure
def woods_1_0():
    """
    shady eastern woods
    +---------+
    |	      |
    |	    X |
    |	      |
    +---------+
    """
    global woods_1_0_name,map_1
    map_1 = map_1[:12] + '|	  X |' + map_1[24:]
    try:
	print "You enter " + woods_1_0_name + ".\n"
    except:

	woods_1_0_name = words.woods_name()
	print "You enter " + woods_1_0_name + ".\n"

    monsta_here = round(random.random() +.3)
    if monsta_here:
	result = encounter_monster(['small_monsters','medium_monsters'])
	if result == 'death':
	    return result
    else:
	raw_input("There's a giant colosseum in the distance...\n")

    next = (
	    ['woods_0_0','woods_1_1','woods_1_n1','arena'],
	    ["West","North","South","Arena"]
	    )

    return pick_place(next,'Where to next?')
コード例 #4
0
ファイル: aventure_game.py プロジェクト: nckmrrtt/aventure
def woods_n1_n1():
    """
    dangerous corner woods
    +---------+
    |	      |
    |	      |
    | X       |
    +---------+
    """
    global woods_n1_n1_name,map_2
    map_2 = map_2[:12] + '| X	    |' + map_2[24:]
    try:
	raw_input("You enter " + woods_n1_n1_name + ".\n")
    except:
	woods_n1_n1_name = words.woods_name()
	raw_input("You enter " + woods_n1_n1_name + ".\n")
    monsta_here = 1 ###yep, there's always a monster here
    if monsta_here:
	result = encounter_monster(['medium_monsters','large_monsters'])
	if result == 'death':
	    return result
    else:
	raw_input("Wait, what? nope nope nope you broke something, bro.\n")

    next = (
	    ['woods_n1_0','woods_0_n1'],
	    ["North","East"]
	    )

    return pick_place(next,'Where to next?')
コード例 #5
0
ファイル: aventure_game.py プロジェクト: nckmrrtt/aventure
def woods_0_0():
    """
    main, central woods
    +---------+
    |	      |
    |	 X    |
    |	      |
    +---------+
    """
    global woods_0_0_name, map_1
    map_1 = map_1[:12] + '|    X    |' + map_1[24:]

    try:
	print "You're in " + woods_0_0_name + "!\n"
    except:
	woods_0_0_name = words.woods_name()
	print "You enter " + woods_0_0_name + "!\n"

    raw_input('Well-traveled paths lead north and south, ' + \
	      'and darker, twisting paths lead east and west.\n\n' + \
	      "There's also an odd-looking building in " + \
	      "the distance. Maybe it's a tavern?")

    next = (
	    ['woods_0_1','woods_1_0','woods_0_n1','woods_n1_0','tavern'],
	    ["North","East","South","West","Tavern"]
	    )

    return pick_place(next,'Where to next?')
コード例 #6
0
def woods_n1_n1():
    """
    dangerous corner woods
    +---------+
    |         |
    |         |
    | X       |
    +---------+
    """
    global woods_n1_n1_name, map_2
    map_2 = '| X       |' + map_2[12:]
    try:
        raw_input("You enter " + woods_n1_n1_name + ".\n")
    except:

        woods_n1_n1_name = words.woods_name()
        raw_input("You enter " + woods_n1_n1_name + ".\n")
    monsta_here = 1  ###yep, there's always a monster here
    if monsta_here:
        result = encounter_monster(['medium_monsters', 'large_monsters'])
        if result == 'death':
            return result
    else:
        raw_input("Wait, what? nope nope nope you broke something, bro.\n")

    next = (['woods_n1_0', 'woods_0_n1'], ["North", "East"])

    return pick_place(next, 'Where to next?')
コード例 #7
0
ファイル: aventure_game.py プロジェクト: nckmrrtt/aventure
def woods_n1_1():
    """
    dangerous corner woods
    +---------+
    | X       |
    |	      |
    |	      |
    +---------+
    """
    global woods_n1_1_name,map_0
    map_0 = map_0[:12] + '| X	    |' + map_0[24:]
    try:
	raw_input("You enter " + woods_n1_1_name + ".\n")
    except:
	woods_n1_1_name = words.woods_name()
	raw_input("You enter " + woods_n1_1_name + ".\n")
    monsta_here = round(random.random()+.4) #usually there's a monsta here
    if monsta_here:
	result = encounter_monster(['medium_monsters','large_monsters'])
	if result == 'death':
	    return result
	question = 'You survived. Nice. Where to next?'
    else:
	raw_input("That's odd...\n")
	raw_input("There's usually a monster here.\n")
	question = "Oh well. Where to next?"

    next = (
	    ['woods_n1_0','woods_0_1'],
	    ["South","East"]
	    )

    return pick_place(next,question)
コード例 #8
0
def woods_n1_1():
    """
    dangerous corner woods
    +---------+
    | X       |
    |         |
    |         |
    +---------+
    """
    global woods_n1_1_name, map_0
    map_0 = '| X       |' + map_0[12:]
    try:
        raw_input("You enter " + woods_n1_1_name + ".\n")
    except:
        woods_n1_1_name = words.woods_name()
        raw_input("You enter " + woods_n1_1_name + ".\n")
    monsta_here = round(random.random() + .4)  #usually there's a monsta here
    if monsta_here:
        result = encounter_monster(['medium_monsters', 'large_monsters'])
        if result == 'death':
            return result
        question = 'You survived. Nice. Where to next?'
    else:
        raw_input("That's odd...\n")
        raw_input("There's usually a monster here.\n")
        question = "Oh well. Where to next?"

    next = (['woods_n1_0', 'woods_0_1'], ["South", "East"])

    return pick_place(next, question)
コード例 #9
0
def woods_n1_0():
    """
    shady western woods
    +---------+
    |         |
    | X       |
    |         |
    +---------+
    """
    global woods_n1_0_name, map_1
    map_1 = '| X       |' + map_1[12:]
    try:
        print "You enter " + woods_n1_0_name + ".\n"
    except:

        woods_n1_0_name = words.woods_name()
        print "You enter " + woods_n1_0_name + ".\n"

    raw_input("There's a giant colosseum in the distance...\n")

    monsta_here = round(random.random() + .3)
    if monsta_here:
        result = encounter_monster(['small_monsters', 'medium_monsters'])
        if result == 'death':
            return result
    else:
        raw_input("Hmm... something ominous is definitely lurking here...\n")

    next = (['woods_0_0', 'woods_n1_1', 'woods_n1_n1',
             'arena'], ["East", "North", "South", "Arena"])

    return pick_place(next, 'Where to next?')
コード例 #10
0
def woods_1_n1():
    """
    dangerous corner woods
    +---------+
    |         |
    |         |
    |       X |
    +---------+
    """
    global woods_1_n1_name, map_2
    map_2 = '|       X |' + map_2[12:]
    try:
        raw_input("You enter " + woods_1_n1_name + ".\n")
    except:

        woods_1_n1_name = words.woods_name()
        raw_input("You enter " + woods_1_n1_name + ".\n")
    monsta_here = round(random.random() + .4)
    if monsta_here:
        result = encounter_monster(['medium_monsters', 'large_monsters'])
        if result == 'death':
            return result
    else:
        raw_input("Not much here.\n")

    next = (['woods_1_0', 'woods_0_n1'], ["North", "West"])

    return pick_place(next, 'Where to next?')
コード例 #11
0
def woods_0_n1():
    """
    quieter, southern woods
    +---------+
    |         |
    |         |
    |    X    |
    +---------+
    """
    global woods_0_n1_name, map_2
    map_2 = '|    X    |' + map_2[12:]
    try:
        raw_input("You enter " + woods_0_n1_name + "!\n")
    except:

        woods_0_n1_name = words.woods_name()
        raw_input("You enter " + woods_0_n1_name + "!\n")
    monsta_here = round(random.random() - .2)
    if monsta_here:
        result = encounter_monster(['tiny_monsters', 'small_monsters'])
        if result == 'death':
            return result
    else:
        raw_input("Not much here.\n")
    next = (['woods_0_0', 'woods_1_n1',
             'woods_n1_n1'], ["North", "East", "West"])

    return pick_place(next, 'Where to next?')
コード例 #12
0
def woods_0_0():
    """
    main, central woods
    +---------+
    |         |
    |    X    |
    |         |
    +---------+
    """
    global woods_0_0_name, map_1
    map_1 = '|    X    |' + map_1[12:]

    try:
        print "You're in " + woods_0_0_name + "!\n"
    except:
        woods_0_0_name = words.woods_name()
        print "You enter " + woods_0_0_name + "!\n"

    raw_input('Well-traveled paths lead north and south, ' + \
              'and darker, twisting paths lead east and west.\n\n' + \
              "There's also an odd-looking building in " + \
              "the distance. Maybe it's a tavern?")

    next = (['woods_0_1', 'woods_1_0', 'woods_0_n1', 'woods_n1_0',
             'tavern'], ["North", "East", "South", "West", "Tavern"])

    return pick_place(next, 'Where to next?')
コード例 #13
0
ファイル: aventure_game.py プロジェクト: nckmrrtt/aventure
def woods_n1_0():
    """
    shady western woods
    +---------+
    |	      |
    | X       |
    |	      |
    +---------+
    """
    global woods_n1_0_name,map_1
    map_1 = map_1[:12] + '| X	    |' + map_1[24:]
    try:
	print "You enter " + woods_n1_0_name + ".\n"
    except:

	woods_n1_0_name = words.woods_name()
	print "You enter " + woods_n1_0_name + ".\n"

    raw_input("Uh oh...\n")

    monsta_here = round(random.random() +.3)
    if monsta_here:
	result = encounter_monster(['small_monsters','medium_monsters'])
	if result == 'death':
	    return result
    else:
	print "You smell smoke, and a faint whiff of burning flesh.\n"
	print "There's a giant mountain in the distance. It looks pretty climbable.\n"
	raw_input("Something ominous is definitely lurking here, though...\n")

    next = (
	    ['woods_0_0','woods_n1_1','woods_n1_n1'], #TODO ,'mountain_base'],
	    ["East","North","South"] # TODO,"Mountain"]
	    )

    return pick_place(next,'Where to next?')