Пример #1
0
from enemy import Enemy, Troll, Vampyre, VampyreKing

#random_monster = Enemy("Basic enemy", 12, 1)
#print(random_monster)
#random_monster.take_damage(4)
#print(random_monster)
#random_monster.take_damage(8)
#print(random_monster)
#random_monster.take_damage(9)
#print(random_monster)

#ugly_troll = Troll()
#print("Ugly troll - {}".format(ugly_troll))
#
#another_troll = Troll("ug", 18, 1)
#print("Another troll - {}".format(another_troll))
#
#brother = Troll("Urg", 23)
#print(brother)
#brother.grunt()
#brother.take_damage(5)

vamp = Vampyre("Vlad")
while vamp.alive:
    vamp.take_damage(1)
#    print(vamp)

vampTheGreat = VampyreKing("Big Vlad")
while vampTheGreat.alive:
    vampTheGreat.take_damage(8)
Пример #2
0
ugly_troll = Troll("Pug")
print("Ugly troll - {}".format(ugly_troll))

another_troll = Troll("Ug")
print("Another troll - {}".format(another_troll))
another_troll.take_damage(18)
print(another_troll)

brother = Troll("Urg")
print(brother)

ugly_troll.grunt()
another_troll.grunt()
brother.grunt()

vamp = Vampyre("Vlad")
print(vamp)
vamp.take_damage(5)
print(vamp)

print("-" * 40)
another_troll.take_damage(30)
print(another_troll)

while vamp.alive:
    vamp.take_damage(1)
    print(vamp)

vamp._lives = 0
vamp._hit_points = 1
print(vamp)
Пример #3
0
troll2.take_damage(2)
print(troll2)

troll2.take_damage(1)
print(troll2)

troll2.take_damage(1)
print(troll2)

# troll2.take_damage(4)
# print(troll2)

print('------------------------')

# Creating Vampyre instances
vam1 = Vampyre('vam1')
print(vam1)

vam2 = Vampyre('vam2')
print(vam2)

vam1.take_damage(5)
print(vam1)

vam1.take_damage(8)
print(vam1)

vam3 = Vampyre('vam3')
print(vam3)

while vam3._alive:
Пример #4
0
ugly_troll = Troll("Pug")
print("Ugly troll - {}".format(ugly_troll))

another_troll = Troll("Ug")
print("Another troll - {}".format(another_troll))

brother = Troll("Urg")
print(brother)
brother.take_damage(18)
print(brother)

ugly_troll.grunt()
another_troll.grunt()
brother.grunt()

dracula = Vampyre("Dracula")
print(dracula)
dracula.take_damage(4)
print(dracula)

print("-" * 40)
another_troll.take_damage(30)
print(another_troll)

while dracula._alive:
    dracula.take_damage(1)
    #print(dracula)

vlad = VampyreKing("Vlad")
print(vlad)
Пример #5
0
ugly_troll = Troll("Pug")
print("Ugly troll - {}".format(ugly_troll))

another_troll = Troll("Ug")
print("Another troll - {}".format(another_troll))

brother = Troll("Urg")
print(brother)
brother.take_damage(3)

ugly_troll.grunt()
another_troll.grunt()
brother.grunt()

vamp = Vampyre("Poo")
print("new_vampyre - {}".format(vamp))

vamp.take_damage(4)
print(vamp)

another_vamp = Vampyre("Akash")
print("another_vamp - {}".format(another_vamp))
another_vamp.take_damage(3)

print("*" * 40)

another_troll.take_damage(35)
print(another_troll)

vamp._live = 0
Пример #6
0
from enemy import Troll, Vampyre

ugly_troll = Troll("Pug")
print("Ugly troll - {}".format(ugly_troll))

another_troll = Troll("Ug")
print("Another troll - {}".format(another_troll))
another_troll.take_damage(18)
print(another_troll)

brother = Troll("Urg")
print(brother)

ugly_troll.grunt()
another_troll.grunt()
brother.grunt()

vampyre = Vampyre("Vlad")
print(vampyre)
vampyre.take_damage(5)
print(vampyre)
Пример #7
0
kyle = Player("Kyle")
print(kyle)

hatdog = Enemy("Hatdog", 11, 12)
print(hatdog)

random_monster = Troll("Jorb")
print("Ugly troll - {}".format(random_monster))

another_troll = Troll("Ug")
print(another_troll)

broda = Troll("Urg")
print(broda)

broda.grunt()
another_troll.grunt()
random_monster.grunt()

drac = Vampyre("Drac")
print(drac)

# while drac._alive:
#     drac.take_damage(1)
#     #print(drac)

king = VampyreKing("Robert")
print(king)
while king._hit_points >= 0 and king._lives > 0:
    king.take_damage(200)
    print(king)
Пример #8
0
ugly_troll = Troll("pug")
print("ugly_troll- {}".format(ugly_troll))

another_troll = Troll("ur")
print(another_troll)
another_troll.take_damage(18)
print(another_troll)

brother = Troll("urg")
print(brother)

ugly_troll.grunt()
another_troll.grunt()
brother.grunt()

Vamp = Vampyre("vlad")
print(Vamp)
Vamp.take_damage(5)
print(Vamp)

print("*" * 40)
another_troll.take_damage(30)
print(another_troll)

# while Vamp.alive:
#     Vamp.take_damage(1)

Vamp._lives = 0
Vamp._hit_points = 1
print(Vamp)
Пример #9
0
from enemy import Enemy, Troll, Vampyre, VampyreKing

# random_monster = Enemy("Basic_Enemy", 12, 1)
# print(random_monster)
# random_monster.take_damage(4)
# print(random_monster)

ugly_troll = Troll("pug")
print("ugly troll : {0}".format(ugly_troll))

another_troll = Troll("Ug", 3)
print("another_troll : {0}".format(another_troll))

brother = Troll("Urg")
print(brother)

ugly_troll.grunt()
brother.grunt()

vamp1 = Vampyre("vamp1")
print(vamp1)

print("*" * 40)
while vamp1.alive:
    vamp1.take_damage(5)
    print(vamp1)

vampK = VampyreKing('suresh')
print(vampK)
vampK.take_damage(10)
print(vampK)
Пример #10
0
# another_troll = Troll("Ug", 18, 1)  # When we pass in the Troll subclass
another_troll = Troll("Ug")
print("Another troll appears - {}".format(another_troll))

# brother = Troll("Urg", 23)
brother = Troll("Urg")
print(brother)

print()
ugly_troll.grunt()
another_troll.grunt()
brother.grunt()
print()

# Vampyre insert ########
vamp = Vampyre("Vamp")
print("My name is {0.name}. Welcome!".format(vamp))
print(vamp)
vamp.take_damage(10)
print(vamp)

print("-" * 40)
another_troll.take_damage(30)
print(another_troll)
vamp.take_damage(20)
print(vamp)

while vamp.alive:
    vamp.take_damage(4)
    print(vamp)
Пример #11
0
from enemy import Troll, Vampyre, VampyreKing
from player import Player

a = 3
b = "tim"
c = 1, 2, 3

print(a)
print(b)
print(c)
p1 = Player("Peter")
print(p1)

t1 = Troll("To")
t1.take_damage(5)
print(t1)

v1 = Vampyre("Vlad")
print(v1)
v1.take_damage(3)
print(v1)

v2 = VampyreKing("Dave")
print(v2)
v2.take_damage(16)
print(v2)
Also make sure that the trolls can also take damage, because we haven't tested that yet.
"""
from enemy import Troll, Vampyre

ugly_troll = Troll("Pug")
print("Ugly troll - {}".format(ugly_troll))

another_troll = Troll("Ug")
print("Another troll - {}".format(another_troll))
another_troll.take_damage(18)
print(another_troll)

brother = Troll("Urg")
print(brother)

ugly_troll.grunt()
another_troll.grunt()
brother.grunt()

dracula = Vampyre("Dracula")
amber = Vampyre("Amber")

print(dracula)
dracula.take_damage(10)
print(dracula)

print(amber)
amber.take_damage(7)
print(amber)