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)
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)
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")
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)
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)
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)
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)