コード例 #1
0
ファイル: B4.py プロジェクト: absheckler/Game-Beta
def B4_text(history):
    print
    print
    print
    delay("You enter a small study, littered with documents and bookshelves lining the walls.")
    print
    print
    delay("To the NORTH is a door made of some strange white, polished material.")
    print
    print
    if overall.master.is_alive == True:
        delay("At the center of the room is a DESK, behind which sits an old scholarly man reading a book. As you enter the man looks up.")
        print
        print
        if 'visited' in history:
            delay("The man exclaims, 'You again? I told you you could leave, go on, it's just through that door.'")
            print
        else:
            delay("The man says 'Wha- who are you?! How did you get here? Ah well, I guess it doesn't matter, go on leave, just through that door'. He points to the white door to the NORTH")
            print
    else:
        delay("At the center of the room is a DESK, behind which sits the decapitated corpse of an old man.")
        print
    print
    player_input = raw_input("What do you want to do?: ")
    overall.action(player_input)
    new_command = overall.command
    B4(new_command, overall.subject, player_input)
コード例 #2
0
def A2_text(history):
    print
    print
    print
    if overall.if_empty(A2_inventory) == True:
        print
        delay("You enter an empty room")
        print
    elif overall.if_empty(A2_inventory) == False:
        print
        delay("You enter a room. On the floor lies a: ")
        print
        for item in A2_inventory:
            print
            delay(item)
        print
    if 'visited' in history:
        pass
    else:
        print
        delay("TUTORIAL: To check your health type 'health'. Don't let your health get too low!")
        print
        print
        delay("TUTORIAL: To view what you have in your inventory, type 'inventory'")
        print
    print
    delay("At the NORTH, SOUTH, and WEST sides of the room are doors.")
    print
    print
    player_input = raw_input("What do you want to do?: ")
    overall.action(player_input)
    new_command = overall.command
    A2(new_command, overall.subject, player_input)
コード例 #3
0
def B3_reit(success):
    print
    while success == False:
        player_input = raw_input("What do you want to do?: ")
        overall.action(player_input)
        new_command = overall.command
        new_subject = overall.subject
        B3(new_command, new_subject, player_input)
コード例 #4
0
def B3_combat_reit(success):
    print
    while overall.final_enemy.is_alive == True and overall.final_enemy.is_asleep == False:
        player_input = raw_input("What do you want to do?: ")
        overall.action(player_input)
        new_command = overall.command
        new_subject = overall.subject
        B3_combat(new_command, new_subject, player_input)
コード例 #5
0
def A3_combat_reit(success):
    print
    while overall.enemy1.is_alive == True:
        player_input = raw_input("What do you want to do?: ")
        overall.action(player_input)
        new_command = overall.command
        new_subject = overall.subject
        A3_combat(new_command, new_subject, player_input)
コード例 #6
0
ファイル: B4.py プロジェクト: absheckler/Game-Beta
def B4_reit(success):
    print
    while success == False:
        player_input = raw_input("What do you want to do?: ")
        overall.action(player_input)
        new_command = overall.command
        new_subject = overall.subject
        B4(new_command, new_subject, player_input)
コード例 #7
0
def B3_text(history):
    print
    print
    print
    if 'visited' not in history:
        overall.final_enemy.is_alive = True
        overall.final_enemy.is_asleep = False
    else:
        pass
    delay("You enter a large stone cavern lit by a ring of torches.")
    print
    print
    delay("There are doors at the EAST and NORTH ends of the room.")
    print
    print
    if overall.final_enemy.is_alive == True:
        if overall.final_enemy.is_asleep == True:
            delay(
                "A great large slumbering hound sleeps curled up in the middle of the room."
            )
            print
        elif overall.final_enemy.is_asleep == False:
            delay(
                "A great large hound the size of a small house stands in the center of the room. It catches sight of you as you enter and snarls."
            )
            print
            print
            delay("The ENEMY moves to attack!")
            print
        else:
            pass
        if overall.if_empty(B3_inventory) == False:
            print
            delay("On the floor lies a: ")
            for item in B3_inventory:
                print
                delay(item)
                print
        print
    else:
        delay("On the floor lies the body of a slain ENEMY")
        print
        if overall.if_empty(B3_inventory) == False:
            print
            delay("On the floor also lies a: ")
            for item in B3_inventory:
                print
                delay(item)
                print
        print
    player_input = raw_input("What do you want to do?: ")
    overall.action(player_input)
    new_command = overall.command
    if overall.final_enemy.is_alive == True and overall.final_enemy.is_asleep == False:
        B3_combat(new_command, overall.subject, player_input)
    else:
        B3(new_command, overall.subject, player_input)
コード例 #8
0
def A3_text(history):
    print
    print
    print
    if 'visited' not in history:
        overall.enemy1.is_alive = True
    else:
        pass
    delay('You enter a large circular room with a soaring ceiling, supported by a ring of pillars and lit by flaming braziers. The floor is a a sand pit, littered with human bones and skulls.')
    print
    print
    delay("There are doors at the WEST and SOUTH sides of the room")
    print
    print
    if overall.enemy1.is_alive == True:
        delay("At the center of the room stands a masked ENEMY, armed with a viciously long knife")
        print
        if overall.if_empty(A3_inventory) == False:
            print
            delay("On the floor lies a: ")
            for item in A3_inventory:
                print
                delay(item)
                print
        print
        delay("The ENEMY moves to attack!")
        print
        print
    else:
        delay("On the floor lies the body of a slain ENEMY")
        print
        if overall.if_empty(A3_inventory) == False:
            print
            delay("On the floor also lies a: ")
            for item in A3_inventory:
                print
                delay(item)
                print
        print
    player_input = raw_input("What do you want to do?: ")
    overall.action(player_input)
    new_command = overall.command
    if overall.enemy1.is_alive == True:
        A3_combat(new_command, overall.subject, player_input)
    else:
        A3(new_command, overall.subject, player_input)
コード例 #9
0
ファイル: B2.py プロジェクト: absheckler/Game-Beta
def B2_text(history):
    print
    print
    print
    delay("You enter a dimly lit storage room with a CHEST in the back corner.")
    print
    print
    if 'visited' not in history:
        delay("TUTORIAL: To search a container or a body, type 'search' and the name of the thing you want to search. For example, if you wanted to search a cabinet, you would type 'search cabinet'.")
        print
        print
    delay("The only door in the room is the one on the EAST side through which you just entered.")
    print
    print
    player_input = raw_input("What do you want to do?: ")
    overall.action(player_input)
    new_command = overall.command
    B2(new_command, overall.subject, player_input)
コード例 #10
0
def B4_text(history):
    print
    print
    print
    delay(
        "You enter a small study, littered with documents and bookshelves lining the walls."
    )
    print
    print
    delay(
        "To the NORTH is a door made of some strange white, polished material."
    )
    print
    print
    if overall.master.is_alive == True:
        delay(
            "At the center of the room is a DESK, behind which sits an old scholarly man reading a book. As you enter the man looks up."
        )
        print
        print
        if 'visited' in history:
            delay(
                "The man exclaims, 'You again? I told you you could leave, go on, it's just through that door.'"
            )
            print
        else:
            delay(
                "The man says 'Wha- who are you?! How did you get here? Ah well, I guess it doesn't matter, go on leave, just through that door'. He points to the white door to the NORTH"
            )
            print
    else:
        delay(
            "At the center of the room is a DESK, behind which sits the decapitated corpse of an old man."
        )
        print
    print
    player_input = raw_input("What do you want to do?: ")
    overall.action(player_input)
    new_command = overall.command
    B4(new_command, overall.subject, player_input)
コード例 #11
0
def B2_text(history):
    print
    print
    print
    delay(
        "You enter a dimly lit storage room with a CHEST in the back corner.")
    print
    print
    if 'visited' not in history:
        delay(
            "TUTORIAL: To search a container or a body, type 'search' and the name of the thing you want to search. For example, if you wanted to search a cabinet, you would type 'search cabinet'."
        )
        print
        print
    delay(
        "The only door in the room is the one on the EAST side through which you just entered."
    )
    print
    print
    player_input = raw_input("What do you want to do?: ")
    overall.action(player_input)
    new_command = overall.command
    B2(new_command, overall.subject, player_input)
コード例 #12
0
ファイル: Initialize.py プロジェクト: absheckler/Game-Beta
delay("You are at the end of a windowless, damp, dark, cobblestone hallway, lit by a series of torches.")
print
print
delay("You can't remember how you got here.")
print
print
delay("At the NORTH end of the hallway is a door.")
print
print
delay("TUTORIAL: To move in a certain direction type 'go' and the direction you want to go in. For example, if you wanted to move WEST, you would type in 'Go West'.")
print
print
player_input = raw_input("What do you want to do?:  ")


while overall.action(player_input) == False:
    player_input = raw_input("What do you want to do?: ")


overall.action(player_input)

if overall.command == 1:
    disembark = True
elif overall.command == 2 or overall.command == 3 or overall.command == 4:
    print
    delay("A wall blocks your way")
    print
    disembark = False
else:
    print
    print
コード例 #13
0
def A3_combat(command, subject, player_input):
    if command == 1 or command == 2 or command == 3 or command == 4:
        print
        delay("You try to flee, but the ENEMY warrior catches you first")
        print
    elif command == 5:
        if subject.lower() in A3_inventory:
            print
            delay("You move to pick up the %s, but the ENEMY warrior blocks your way.")
            print
        else:
            print
            delay("There is no %s to pick up.")
            print
    elif command == 6:
        print
        if subject.lower() in overall.main_character.inventory:
            A3_inventory[subject] = overall.main_character.inventory[subject]
            del overall.main_character.inventory[subject]
            delay('%s has been removed from inventory' %(subject))
        else:
            delay('%s not in inventory' %(subject))
        print
    elif command == 7:
        print
        delay("Nothing here to search.")
        print
    elif command == 8:
        print
        if subject.lower() in overall.main_character.inventory and overall.main_character.inventory[subject.lower()].form == 'weapon':
            delay("You attack the ENEMY warrior with your %s. You deal %s damage." %(subject.lower(), overall.main_character.inventory[subject.lower()].value)) 
            print
            overall.enemy1.health -= overall.main_character.inventory[subject.lower()].value
            overall.enemy1.enemy_death()
        elif subject.lower() in overall.main_character.inventory:
            overall.main_character.inventory[subject].use()
            if overall.main_character.inventory[subject.lower()].form == 'food':
                del overall.main_character.inventory[subject.lower()]       
        else:
            delay('No %s in inventory' %(subject))
            print
    elif command == 9:
        for item in overall.main_character.inventory:
            print
            delay(item)
            print
        if overall.if_empty(overall.main_character.inventory) == True:
            print
            delay("You have nothing in your inventory!")
            print
    elif command == 10:
        print
        if subject.lower() in overall.main_character.inventory:
            overall.main_character.inventory[subject].describe()
        else:
            delay('%s not in inventory' %(subject))
        print
    elif command == 11:
        print
        overall.main_character.death()
    else:
        pass
    if overall.enemy1.is_alive == True:
        print
        delay("The ENEMY warrior attacks with a lacerating cut from its knife.")
        print
        overall.enemy1.enemy_attack()
        A3_combat_reit(nothing)
    else:
        player_input = raw_input("What do you want to do?: ")
        overall.action(player_input)
        new_command = overall.command
        A3(new_command, overall.subject, player_input)
コード例 #14
0
print
print
delay("You can't remember how you got here.")
print
print
delay("At the NORTH end of the hallway is a door.")
print
print
delay(
    "TUTORIAL: To move in a certain direction type 'go' and the direction you want to go in. For example, if you wanted to move WEST, you would type in 'Go West'."
)
print
print
player_input = raw_input("What do you want to do?:  ")

while overall.action(player_input) == False:
    player_input = raw_input("What do you want to do?: ")

overall.action(player_input)

if overall.command == 1:
    disembark = True
elif overall.command == 2 or overall.command == 3 or overall.command == 4:
    print
    delay("A wall blocks your way")
    print
    disembark = False
else:
    print
    print
    delay("You can not %s at this time" % (player_input))
コード例 #15
0
ファイル: A1.py プロジェクト: absheckler/Game-Beta
def A1_text(history):
    print
    print
    print
    global player_input
    delay("You enter a room lit by a single torch.")
    print
    if 'visited' not in history:
        print
        delay("The door behind you closes and seals.")
        print
    else:
        pass
    if 'note' not in A1_inventory:
        if overall.if_empty(A1_inventory) == True:
            print
            delay(
                "The room is empty except for a barren alter standing at its center."
            )
            print
        elif overall.if_empty(A1_inventory) == False:
            print
            delay(
                "The room is empty except for an alter standing at its center. Upon the alter sits a: "
            )
            print
            for item in A1_inventory:
                print
                delay(item)
            print
    if 'note' in A1_inventory:
        print
        delay(
            "The room is empty except for an alter standing at its center. Upon the alter is a NOTE."
        )
        print
        print
        if overall.if_empty(A1_inventory) == False and overall.count > 1:
            delay("On the alter there also sits a: ")
            for item in A1_inventory:
                print
                delay(item)
            print
            print
        delay("The NOTE reads: ")
        print
        note.describe()
    else:
        pass
    if 'visited' in history:
        pass
    else:
        print
        delay(
            "TUTORIAL: To pick up an item, type 'pick up' and the name of the item you want to pick up. For example, if you wanted to pick up an apple, you would type 'Pick up apple'"
        )
        print
        print
        delay(
            "TUTORIAL: If you want to get rid of an item, type 'drop' and the name of the item you want to get rid of. Remember, if you drop an item you can always come back and pick it up!"
        )
        print
    print
    delay("There is a door on the NORTH side of the room")
    print
    print
    if 'visited' in history:
        delay(
            "There is a closed and sealed door at the SOUTH side of the room")
        print
        print
    player_input = raw_input("What do you want to do?: ")
    overall.action(player_input)
    new_command = overall.command
    A1(new_command, overall.subject, player_input)
コード例 #16
0
def B3_combat(command, subject, player_input):
    if command == 1 or command == 2 or command == 3 or command == 4:
        print
        delay("You try to flee, but the ENEMY hound catches you first")
        print
    elif command == 5:
        if subject.lower() in A3_inventory:
            print
            delay(
                "You move to pick up the %s, but the ENEMY hound blocks your way."
            )
            print
        else:
            print
            delay("There is no %s to pick up.")
            print
    elif command == 6:
        print
        if subject.lower(
        ) in overall.main_character.inventory and subject.lower(
        ) == 'dried meat':
            delay("dried meat has been removed from inventory")
            print
            print
            delay(
                "The hound stops and sniffs the air. It questioningly walks over to the dried meat and in one bite snaps it up and swallows. It looks at you and licks your face, then turns and walks away to lie down."
            )
            print
            print
            delay("The ENEMY is now asleep")
            print
            overall.final_enemy.is_asleep = True
            del overall.main_character.inventory[subject.lower()]
        elif subject.lower() in overall.main_character.inventory:
            B3_inventory[subject] = overall.main_character.inventory[subject]
            del overall.main_character.inventory[subject]
            delay('%s has been removed from inventory' % (subject))
        else:
            delay('%s not in inventory' % (subject))
        print
    elif command == 7:
        print
        delay("Nothing here to search.")
        print
    elif command == 8:
        print
        if subject.lower(
        ) in overall.main_character.inventory and overall.main_character.inventory[
                subject.lower()].form == 'weapon':
            delay(
                "You attack the ENEMY hound with your %s. You deal %s damage."
                % (subject.lower(),
                   overall.main_character.inventory[subject.lower()].value))
            print
            overall.final_enemy.health -= overall.main_character.inventory[
                subject.lower()].value
            overall.final_enemy.enemy_death()
        elif subject.lower(
        ) in overall.main_character.inventory and overall.main_character.inventory[
                subject.lower()].form == 'instrument':
            overall.main_character.inventory[subject].use()
            print
            delay(
                "The hound stops and tilts its head. It then lets out a humongous yawn, lays down, rests its head on its paws, and closes its eyes."
            )
            print
            print
            delay("The ENEMY is now asleep.")
            print
            print
            overall.final_enemy.is_asleep = True
        elif subject.lower() in overall.main_character.inventory:
            overall.main_character.inventory[subject].use()
            if overall.main_character.inventory[
                    subject.lower()].form == 'food':
                del overall.main_character.inventory[subject.lower()]
        else:
            delay('No %s in inventory' % (subject))
            print
    elif command == 9:
        for item in overall.main_character.inventory:
            print
            delay(item)
            print
        if overall.if_empty(overall.main_character.inventory) == True:
            print
            delay("You have nothing in your inventory!")
            print
    elif command == 10:
        print
        if subject.lower() in overall.main_character.inventory:
            overall.main_character.inventory[subject].describe()
        else:
            delay('%s not in inventory' % (subject))
        print
    elif command == 11:
        print
        overall.main_character.death()
    else:
        pass
    if overall.final_enemy.is_alive == True and overall.final_enemy.is_asleep == False:
        print
        delay(
            "The ENEMY hound runs over and attacks, taking you in its mouth and violently shaking you, then throwing you to the opposite side of the room."
        )
        print
        overall.final_enemy.enemy_attack()
        B3_combat_reit(nothing)
    else:
        player_input = raw_input("What do you want to do?: ")
        overall.action(player_input)
        new_command = overall.command
        B3(new_command, overall.subject, player_input)
コード例 #17
0
ファイル: A1.py プロジェクト: absheckler/Game-Beta
def A1_text(history):
    print
    print
    print
    global player_input
    delay("You enter a room lit by a single torch.")
    print
    if 'visited' not in history:
        print
        delay("The door behind you closes and seals.")
        print
    else:
        pass
    if 'note' not in A1_inventory:
        if overall.if_empty(A1_inventory) == True:
            print
            delay("The room is empty except for a barren alter standing at its center.")
            print
        elif overall.if_empty(A1_inventory) == False:
            print
            delay("The room is empty except for an alter standing at its center. Upon the alter sits a: ")
            print
            for item in A1_inventory:
                print
                delay(item)
            print           
    if 'note' in A1_inventory:
        print
        delay("The room is empty except for an alter standing at its center. Upon the alter is a NOTE.")
        print
        print
        if overall.if_empty(A1_inventory) == False and overall.count > 1:
            delay("On the alter there also sits a: ")
            for item in A1_inventory:
                print
                delay(item)
            print
            print
        delay("The NOTE reads: ")
        print
        note.describe()
    else:
        pass
    if 'visited' in history:
        pass
    else:
        print
        delay("TUTORIAL: To pick up an item, type 'pick up' and the name of the item you want to pick up. For example, if you wanted to pick up an apple, you would type 'Pick up apple'")
        print
        print
        delay("TUTORIAL: If you want to get rid of an item, type 'drop' and the name of the item you want to get rid of. Remember, if you drop an item you can always come back and pick it up!")
        print
    print
    delay("There is a door on the NORTH side of the room")
    print
    print
    if 'visited' in history:
        delay("There is a closed and sealed door at the SOUTH side of the room")
        print
        print
    player_input = raw_input("What do you want to do?: ")
    overall.action(player_input)
    new_command = overall.command
    A1(new_command, overall.subject, player_input)