Exemplo n.º 1
0
def inventoryProcessing():
    while 0 == 0:
        os.system('cls')
        menu.Refresh(4)

        while msvcrt.kbhit():
            msvcrt.getwch()

        dat.PlayerInput = raw_input()

        if dat.PlayerInput.upper() == 'A':  #Exit
            dat.characterMenuFlag = 0
            break
        elif dat.PlayerInput.upper() == 'C':  #Character
            dat.characterMenuFlag = 1
            break
        else:
            os.system('cls')
            menu.Refresh(4)
Exemplo n.º 2
0
def townProcessing():
    while msvcrt.kbhit():
        msvcrt.getwch()

    dat.PlayerInput = raw_input()

    if dat.PlayerInput.upper() == 'C':
        menu.Refresh(0)
        dat.characterMenuFlag = 1
        characterProcessing()
        menu.Refresh(1)
    elif dat.PlayerInput.upper() == 'R':  #rest
        MenuScreen.restScreen()
        dat.characterCurrentHP = dat.characterHP
        dat.characterCurrentMP = dat.characterMP
        os.system('pause')
        menu.Refresh(1)
    elif dat.PlayerInput.upper() == 'EXIT':  #Close game
        dat.gameOverFlag = 1

    #The below commented out lines of code were used to test the battle system from town

    #elif dat.PlayerInput.upper() == 'B':
        #battle.initialize('Slime', 'Goblin', 'DeathKnight', '2 Slimes emerge!!!', 0, 'regular')
        #dat.sceneTransition = 1
        #menu.Refresh(1)

    elif dat.PlayerInput.upper() == 'S':  #Shop
        dat.sceneTransition = 1
        menu.Refresh(2)
    elif dat.PlayerInput.upper() == 'F':  #Field
        dat.sceneTransition = 1
        menu.Refresh(3)
    else:
        menu.Refresh(1)
Exemplo n.º 3
0
def statsProcessing():
    while 0 == 0:
        os.system('cls')
        menu.Refresh(0)

        while msvcrt.kbhit():
            msvcrt.getwch()

        dat.PlayerInput = raw_input()

        if dat.PlayerInput.upper() == 'Q':
            os.system('cls')
            print('No description established...')  #No menu yet, shows descriptions for statistics
            os.system('pause')
        elif dat.PlayerInput.upper() == 'A':  #Exit
            dat.characterMenuFlag = 0
            break
        elif dat.PlayerInput.upper() == 'I':  #Inventory
            dat.characterMenuFlag = 2
            break
        else:
            os.system('cls')
            menu.Refresh(0)
Exemplo n.º 4
0
def shopProcessing():
    while msvcrt.kbhit():
        msvcrt.getwch()

    dat.PlayerInput = raw_input()

    if dat.PlayerInput.upper() == '1':
        if dat.Gold > 39:
            dat.Gold -= 40
            equipment.changeWep('dagger')  #This string depicts what gets equipped on purchase. See 'equipment.py'
        menu.Refresh(2)
    elif dat.PlayerInput.upper() == '7':
        if dat.Gold > 9 and dat.equipmentPotionCount < 10:  #Max HP potions = 10
            music.playSE('Sounds/Equip.wav')
            dat.Gold -= 10
            dat.equipmentPotionCount += 1
    elif dat.PlayerInput.upper() == '8':
        if dat.Gold > 19 and dat.equipmentManaPotionCount < 3:  #Max MP potions = 3
            music.playSE('Sounds/Equip.wav')
            dat.Gold -= 20
            dat.equipmentManaPotionCount += 1
    elif dat.PlayerInput.upper() == 'GOLD':  #hidden command to get gold
        os.system('cls')
        dat.Gold += 100
        menu.Refresh(2)
    elif dat.PlayerInput.upper() == '2':
        if dat.Gold > 99:
            dat.Gold -= 100
            equipment.changeWep('shortsword')
        menu.Refresh(2)
    elif dat.PlayerInput.upper() == '3':
        if dat.Gold > 299:
            dat.Gold -= 300
            equipment.changeWep('longsword')
        menu.Refresh(2)
    elif dat.PlayerInput.upper() == '4':
        if dat.Gold > 99:
            dat.Gold -= 100
            equipment.changeArmor('leatherarmor')
        menu.Refresh(2)
    elif dat.PlayerInput.upper() == '5':
        if dat.Gold > 399:
            dat.Gold -= 400
            equipment.changeArmor('platearmor')
        menu.Refresh(2)
    elif dat.PlayerInput.upper() == '6':
        if dat.Gold > 49:
            dat.Gold -= 50
            equipment.changeShield('shield')
        menu.Refresh(2)
    elif dat.PlayerInput.upper() == 'A':  #Exit
        dat.sceneTransition = 1
        menu.Refresh(1)
    elif dat.PlayerInput.upper() == 'I':
        menu.Refresh(4)
        dat.characterMenuFlag = 2
        characterProcessing()
        menu.Refresh(2)
    else:
        menu.Refresh(2)
Exemplo n.º 5
0
def fieldProcessing():
    while msvcrt.kbhit():
        msvcrt.getwch()

    dat.PlayerInput = raw_input()

    if dat.PlayerInput.upper() == '1':  #Zone 1: East Fields
        os.system('cls')
        eventHandler.zone1Events()
        menu.Refresh(3)
    elif dat.PlayerInput.upper() == '2':  #Zone 2: West Fields
        os.system('cls')
        eventHandler.zone2Events()
        menu.Refresh(3)
    elif dat.PlayerInput.upper() == '3':  #Zone 3: Goblin Camp
        os.system('cls')
        eventHandler.zone3Events()
        menu.Refresh(3)
    elif dat.PlayerInput.upper() == '4':  #Zone 4: Old Ruins
        os.system('cls')
        eventHandler.zone4Events()
        menu.Refresh(3)
    elif dat.PlayerInput.upper() == '5':  #Zone 5: Area Boss
        os.system('cls')
        eventHandler.zone5Events()
        menu.Refresh(3)
    elif dat.PlayerInput.upper() == 'A':  #Exit
        dat.sceneTransition = 1
        menu.Refresh(1)
    elif dat.PlayerInput.upper() == 'C':  #Character
        menu.Refresh(0)
        dat.characterMenuFlag = 1
        characterProcessing()
        menu.Refresh(3)
    elif dat.PlayerInput.upper() == 'I':  #Inventory
        menu.Refresh(4)
        dat.characterMenuFlag = 2
        characterProcessing()
        menu.Refresh(3)
    else:menu.Refresh(3)