Пример #1
0
def Craft(item):
    item = item.lower()
    printing.Print("You crafted a " + str(item))
    if item == "torch":
        index.player.inventory['wood'] = index.player.inventory['wood'] - 2
        index.player.AddToInv("Torch", 1)
        
    explore.Idle()
Пример #2
0
def Craft(player, item):
    item = item.lower()
    printing.Print("You crafted a " + str(item))
    if item == "torch":
        player.inventory['wood'] = player.inventory['wood'] - 2
        player.AddToInv("Torch", 1)
        if player.inventory['torch'] > 100:
            printing.Print("OMG STOP MAKING TORCHES")
            printing.Print("FINE HERE,")
            printing.Print("You win!! yay now go do something else ffs")

    explore.Idle(player)
Пример #3
0
 def CheckInv(self):
     i = 0
     for key, value in self.inventory.items():
         if value < 1:
             pass
         else:
             printing.PrintItem(key + " x " + str(value) + "     " + self.IsWeapon(key))
             i+=1
     if i < 1:
         printing.Print("You are not carrying anything")
     if self.CanEquip():
         while True:
             choice = ""
             printing.PrintOpt("Equip a weapon? (y/n)")
             choice = input().lower()
             if choice == "y":
                 self.Equip()
                 explore.Idle(self)
             elif choice == "n":
                 explore.Idle(self)
             else:
                 pass
Пример #4
0
 def Equip(self):
     printing.Print("Which item would you like to equip?")
     choice = ""
     choices = []
     for item in self.weapons:
         if item in self.inventory and self.inventory[item] > 0:
             printing.PrintOpt(item.lower())
             choices.append(item.lower())
     choice = input().lower()
     if choice in choices:
         self.equipped = choice
         printing.PrintItem(choice + " equipped!")
         return
     elif choice == "back":
         explore.Idle(self)
     else:
         self.Equip()
Пример #5
0
def Crafting():
    choices = []
    choice = ""

    printing.Print("You decide to craft a...")
    if index.player.inventory['wood'] >= 2:
        printing.PrintOpt("Torch")
        choices.append("torch")

    printing.PrintOpt("Back")
    choices.append("back")
    
    choice = input()
    choice = choice.lower()
    if choice in choices:
        if choice == "torch" and "torch" in choices:
            Craft("torch")
        elif choice == "back":
            explore.Idle()
        else:
            Crafting()
Пример #6
0
def Fight(name, health, damage):
    enemy = enemypg.Enemy(name, health, damage)

    printing.Print("A wild " + enemy.name + " has appeared!")

    while enemy.health > 0:
        choice = ''

        printing.PrintHitByPlayer("Your health is " + str(index.player.health))
        printing.PrintHitByEnemy(enemy.name + "'s health is " +
                                 str(enemy.health))

        printing.PrintOpt("Attack")
        printing.PrintOpt("Counter")
        printing.PrintOpt("Run")

        choice = input().lower()

        if choice == "attack":
            enemy.Take(False)
            enemy.Deal(False)
        elif choice == "counter":
            enemy.Deal(True)
        elif choice == "run":
            printing.Print("You try to make a break for it...")
            if CanRun():
                Run()
            else:
                printing.Print("The " + enemy.name + " catches up to you")
                enemy.Deal(False)
        else:
            printing.Print("You stumble giving the " + enemy.name +
                           " a chance to attack")
            enemy.Deal(False)
    printing.Print("You defeated the " + enemy.name)
    explore.Idle()
Пример #7
0
def Run():
    printing.Print("You manage to lose them")
    printing.Print(
        "you rest for a little bit after running so far and for so long")
    explore.Idle()
Пример #8
0
#made in python 3

from stuff import player as playerpg, printing, explore, fight

printing.PrintTitle()
printing.Print("You wake up, your head is hurting and you are cold")
printing.Print("You struggle to remember your own name..")

name = input().title()
if name == "":
    name = "THE NAMELESS ONE"
player = playerpg.Players(name)

printing.Print("Thats right it's " + player.name)
printing.Print("You look around")
printing.Print("Nothing but trees and snow")

#player.AddToInv("dagger", 1 )

answer = ''

while answer != 'y' and answer != 'n':
    printing.PrintOpt("Should you go exploring? (y/n)")
    answer = input()

if answer == 'y':
    explore.Explore(player)
else:
    printing.Print("You decide to rest while until your head feels better")
    explore.Idle(player)
Пример #9
0
from stuff import player as playerpg, printing, explore

printing.PrintTitle()
printing.Print("You wake up, your head is hurting and you are cold")
printing.Print("You struggle to remember your own name..")

name = input()
player = playerpg.Players(name)

printing.Print("Thats right it's " + player.name)
printing.Print("You look around")
printing.Print("Nothing but trees and snow")

#fight.Fight("Wolf", 20, 2)

answer = ''

while answer != 'y' and answer != 'n':
    printing.PrintOpt("Should you go exploring? (y/n)")
    answer = input()

if answer == 'y':
    explore.Explore()
else:
    explore.Idle()