Ejemplo n.º 1
0
from character import Enemy

dave = Enemy("Dave", "A smelly zombie")

dave.describe()

dave.set_conversation("Hi.")

dave.talk()

dave.set_weakness("Hammer")

print("What will you fight with?")
fight_with = input("> ")
dave.fight(fight_with)
from character import Character
from character import Enemy

sylv = Enemy("Sylvanas","A dirty, smelly, morally grey banshee zombie.")
sylv.describe()
sylv.set_conversation("BURN IT!")
sylv.talk()
sylv.set_weakness("Frostmourne")

print("What will you fight with?")
fight_with = input()
sylv.fight(fight_with)
Ejemplo n.º 3
0
from character import Enemy

greg = Enemy("Greg", 'Just a normal dude')
greg.set_conversation(
    "Hi, My name is greg, i'm just a normal dude trying to make his way in the text adventure"
)
greg.set_weakness("fork")
fight_with = input("What will you fight with: ")
greg.fight(fight_with)
from character import Enemy 

sid = Enemy('sid','demon from hell')
sid.describe()
sid.set_conversation("I lurk in the darkness")
sid.talk()
sid.set_weakness('light')
sid.get_weakness()
x = input()
sid.fight(x)
Ejemplo n.º 5
0
from character import Enemy
dave = Enemy("Dave", "He is a smelly zombie!")
dave.set_conversation("Braaaaains!")
dave.set_weakness("axe")

while True:
    dave.describe()
    command = input("> ")
    if command == "talk":
        while True:
            say = input("Talk to Dave > ")
            if say == "goodbye":
                break
            else:
                dave.talk()
    elif command == "fight":
        fight_with = input("What do you fight with? ")
        result = dave.fight(fight_with)
        if result == True:
            print("You have defeated Dave. There is nothing else to do.")
            break
        elif result == False:
            print("You are dead.")
            break
    else:
        print("You can't do that")
Ejemplo n.º 6
0
from character import Character
from character import Enemy

dave=Enemy('Dave','He seems to be a weird guy.')

dave.describe()

dave.set_conversation('Hi, my name is Inigo Montoya. You killed my father. Prepare to die.')

dave.talk()

dave.set_weakness("cheese")

print("What will you fight with ?")
item_chosen=input()
dave.fight(item_chosen)
Ejemplo n.º 7
0
from character import Character
from character import Enemy

dave = Character("Dave", "A smelly zombie!")
dave.describe()
dave.set_conversation("Hi!!")
dave.talk()

#*I am going to create the enemy zombie, bob
bob = Enemy("Bob", "A dangerous zombie!")
bob.describe()
fight_with = input("What will you fight bob with?")
bob.set_weakness("cheese")
bob.fight(fight_with)
from character import Enemy

derek = Enemy("Derek", "A smelly zombie!")
derek.describe()

# Add some dialogue for Derek for when he is spoken to
derek.set_conversation("What's up dude?")
derek.talk()  # Trigger a conversation with Derek

# Set a weakness
derek.set_weakness("penicilin")

# Fight with Derek
print("What is your weapon of choice?")
weapon = input()
derek.fight(weapon)
from room import Room
from item import Item
from character import Character, Enemy, Hero
from rpginfo import RPGInfo

hero = Hero("Hero")
enemy = Enemy("enemy", "Example enemy")
item = Item("Sword", 25)

print(hero.health)
print(enemy.health)

hero.fight(enemy, item.damage)
hero.fight(enemy, item.damage)
enemy.fight(hero, 5)
print(hero.health)
print(enemy.health)
Ejemplo n.º 10
0
from character import Enemy

dave = Enemy("Dave", "A smelly zombie")
dave.set_weakness("milk")

dave.describe()
dave.talk()
fightWith = input("What will you fight with? \n")
dave.fight(fightWith)
Ejemplo n.º 11
0
from character import Enemy

dave = Enemy('Dave', 'A smelly zombie.', 'garlic')
dave.conversation = 'I like to eat humans.'
print(dave.bio)
print(dave.chat)
weapon = input('Fight with: ')
dave.fight(weapon)