Beispiel #1
0
def playermenu():
    global musicstate
    mixer.Sound.play(clicksound)
    userinput = input(f'[1] Take a Action\n[2] Open Inventory\n[3] ...\n[4] Options\n\nTerminal: ')
    if userinput == '2':
        mixer.Sound.play(clicksound)
        clear()
        inv.draw()
        input("\n" + ('#' * 100) + "\n\nTerminal: ")
        mixer.Sound.play(clicksound)
        clear()
        hud(0)
        playermenu()
    elif userinput == '4':
        mixer.Sound.play(clicksound)
        boxer(("[1] Music is " + musicstate + "\n[0] Back"))
        userinput = input('\n\nTerminal: ')
        mixer.Sound.play(clicksound)
        if userinput == '1':
            if mixer.music.get_volume() > 0: 
                musicstate = '[ OFF ]'
                mixer.music.set_volume(0)
                clear()
                hud(0)
                playermenu()
            else:
                musicstate = '[ ON ]'
                mixer.music.set_volume(1)
                clear()
                hud(0)
                playermenu()
        else:
            clear()
            hud(0)
            playermenu()
Beispiel #2
0
def hud(playerid):
    playershowclass = ' Lv ' + str(player[playerid].level) + ' [' + str(player[playerid].exp) + '/' + str(player[playerid].expnextlevel) + '] '
    playershowpoints = '  ' + str(player[playerid].hp) + '/' + str(player[playerid].maxhp) + '   ' + str(player[playerid].stamina) + '/' + str(player[playerid].maxstamina)
    playerstatus = '     | ' + player[playerid].name + (' ' * (14 - len(player[playerid].name))) + '| ' + playershowclass + (' ' * (24 - len(playershowclass))) + '|' + playershowpoints + (' ' * (18 - len(playershowpoints))) + '  | '
    hudplayer = '      | Player       | Class                   |    HP    | Stamina  | Location                   \n ' + playerstatus
    hudfinal = (hudplayer + (' ' * (209 - len(hudplayer))))
    boxer(hudfinal)
Beispiel #3
0
def actionmenu():
    hud(0)
    userinput = input(f"{options[0]}{costs[0]} \n{options[1]}{costs[1]} \n{options[2]}{costs[2]} \n{options[3]}{costs[3]} \n{options[4]}{costs[4]} \n\nTerminal: ")
    if chapter == 1:
        if userinput == '1':
            player[0].stamina
            random.randint()
            boxer('You discouver')
Beispiel #4
0
def createplayer(name):
    clear()
    player = Player(name)
    input('You have 10 points to put on attributes')
    points = 15
    while points > 0:
        information = '[' + player.name + '] Strengh: [' + str(player.strengh) + '] Agility: [' + str(player.agility) + '] Inteligence: [' + str(player.inteligence) + ']'
        boxer(information)
        userinput = input('[1] Add Strengh\n[2] Add Agility\n[3] Add Inteligence\n[0] Reset\n\nTerminal: ')
        if userinput == '1':
            player.strengh += 1
            points -= 1
        elif userinput == '2':
            player.agility += 1
            points -= 1
        elif userinput == '3':
            player.inteligence += 1
            points -= 1
        elif userinput == '0':
            userinput = input('Confirm reset?\n[1] Confirm\n[0] Cancel\n\nTerminal: ')
            if userinput == '1':
                player.strengh = 2
                player.agility = 2
                player.inteligence = 2
                points = 15
            else:
                return  ######Set the habilities or attributes that is important on a castaway
        else:
            clear()
            input('Invalid Input!')
    boxer(information)
    userinput = input('Is everything right?\n[1] Confirm\n[0] Reset\n\nTerminal: ')
    if userinput == '0':
        player.strengh = 2
        player.agility = 2
        player.inteligence = 2
        points = 15
        createplayer(player.name)
    else:
        clear()
Beispiel #5
0
def takeaction(actualsituation):
    boxer(actualsituation)
    userinput = 'a'
Beispiel #6
0
clicksound = mixer.Sound('sounds/click.wav')
musicstate = '[ ON ]'


userinput = input('\nEnter your name: ')
while len(userinput) < 4 or len(userinput) > 14 or userinput.isdigit():
    mixer.Sound.play(clicksound)
    input('Error! Must be at least 4 caracter and max 14 caracter')
    clear()
    userinput = input('Enter your name: ')

createplayer(str(userinput))

mixer.Sound.play(clicksound)
history = '[Lester]: Alright, ' + str(userinput) + '. Be careful, they still here somewere. We have to get out of here. I will  search for survivors in another place, see you around.'
boxer(history)
input('\n\nPress enter do Continue')
mixer.Sound.play(clicksound)
allplayerscount = 1
player[0] = Player(str(userinput))
inv = Inventory(2)
personalhistory = '[' + player[0].name + ']: Agh! What is happening? I cant remember anything and my head keep spinning. Who is Lester? And where am i? '
boxer(personalhistory)
input('\n\nPress enter do Continue')
mixer.Sound.play(clicksound)
clear()
mixer.music.play(-1)
musicstate = '[ ON ]'
hud(0)
playermenu()
    
Beispiel #7
0
def platform():
    boxer('                     Terminal Castaway   By: MagusVOX ')
    userinput = input(
        '[1] Start a New Game\n[2] Load Game (Not Available)\n[3] Options(Not Available)\n[0] Exit\n\nTerminal: '
    )
    mixer.Sound.play(clicksound)
    if userinput == '1':
        mixer.Sound.play(clicksound)
        boxer('                     Start a New Game')
        userinput = input(
            '[1] Single Player\n[2] Multi-Player (Not Available)\n[0] Back to menu\n\nTerminal: '
        )
        if userinput == '1':
            mixer.Sound.play(clicksound)
            boxer(
                'This is a experiment. The main goal is to make a terminal game that can run on any pc by terminal. Feel free to modify and send pull requests on Github. '
            )
            input('\n\nPress Enter to Continue ')
            mixer.Sound.play(clicksound)
            boxer('Chapter 1')
            input('\n\nPress Enter to Continue ')
            mixer.Sound.play(clicksound)
            boxer(
                '[Commander]: We are now passing by a storm, everyone please stay down '
            )
            input('\n\nPress Enter to Continue ')
            mixer.Sound.play(clicksound)
            boxer('[Alert! Alert! Alert! Alert!]')
            input('\n\nPress Enter to Continue ')
            mixer.Sound.play(clicksound)
            boxer('[Commander]: WE ARE GOING DOWN!! ')
            input('\n\nPress Enter to Continue ')
            mixer.Sound.play(clicksound)
            import rpg
        else:
            mixer.Sound.play(clicksound)
            platform()
    elif userinput == '0':
        mixer.Sound.play(clicksound)
        userinput = input('Are you sure? [Y] to confirm ')
        if userinput.upper() == 'Y':
            exit()
        else:
            mixer.Sound.play(clicksound)
            platform()
    else:
        input("Error: invalid input [98]")
        platform()