Python | Adventure Game

/ 7 Jul 2013 /
This is my second program I built and it's just a basic game, it asks you questions, with the optional answers and the end of the line, and results differently depending on what you chose.



 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
def start():
    print("Welcome to Bane of Athropods")
    print("Do you want to fight the beast? (yes | no)")
    yorn = input()
    if yorn == "yes":
        print("Let the battle begin!")
        print(' ')
    elif yorn == "no":
        print("Too bad! Woos!")
        print(' ')
    else:
        print("What? Quick, the battle is about to start, survive!")
    print(' ')
        

def battle():
    print("How do you attack? (punch | kick)")
    q1 = input()
    if q1 == "punch":
        print('You punched the beast, he is too strong, he felt nothing!!')
        print('The beast punched you back!')
        print('...')
        print('You died.')
        print(' ')
    elif q1 == "kick":
        print('''You kicked the beast in the balls, that is a dog shot, but
it gives you enough time to escape, so RUN!''')
        print('The beast is up and running! It is chasing you, and catching up!')
        print('The beast caught you!')
        print('The beast crushed you to death!')
        print('...')
        print('You died.')
        print(' ')
    else:
        print("You didn't PUNCH or KICK! You were too slow and now you're dead!")
        print("Since you are now dead, I would like to thankyou for giving me your soul.")
        print(' ')
        print("Wait.. This soul, it.. it isn't humane, what are you?")
start()
battle()
 
Copyright © 2010 M(ath)+me, All rights reserved