Exemplo n.º 1
0
from classes.magic import spell
from classes.inventory import item
import random

# create black magic
fire = spell("Fire", 25, 600, "black")
thunder = spell("Thunder", 25, 600, "black")
blizzard = spell("Blizzard", 25, 600, "black")
meteor = spell("Meteor", 40, 1200, "black")
quake = spell("Quake", 14, 140, "black")
# create white magic
cure = spell("Cure", 25, 620, "White")
cura = spell("Cura", 32, 1500, "White")
curaga = spell("Curaga", 50, 6000, "White")
# Create some items
potion = item("Potion", "potion", "Heals 50 HP", 50)
hipotion = item("Hi- Potion", "potion", "Heals 100 HP", 100)
superpotion = item("Super Potion", "potion", "Heals 1000 HP", 1000)
elixer = item("Elixer", "elixer", "Fully restores HP/MP of one party member", 9999)
hielixer = item("Megaelixer", "elixer", "Fully restores party's HP/MP ", 9999)

grenade = item("grenade", "attack", "deals 500 damage", 500)

player_spells = [fire, thunder, blizzard, meteor, cure, cura]
enemy_spells = [fire, meteor, curaga]
player_items = [{"item": potion, "quantity": 15, }, {"item": hipotion, "quantity": 5},
				{"item": superpotion, "quantity": 5}, {"item": elixer, "quantity": 5},
				{"item": hielixer, "quantity": 2}, {"item": grenade, "quantity": 5}]
# Instantiate People
player1 = person("Valos:", 3260, 132, 300, 34, player_spells, player_items)
player2 = person("Nick :", 4160, 188, 311, 34, player_spells, player_items)
Exemplo n.º 2
0
import random

#Creating black magic
fire = Spell("Fire", 10, 100, "black")
thunder = Spell("Thunder", 10, 100, "black")
blizzard = Spell("Blizzard", 10, 100, "black")
meteor = Spell("Meteor", 20, 200, "black")
quake = Spell("Quake", 40, 240, "black")

#Create White magic
cure = Spell("Cure", 22, 120, "white")
cura = Spell("Cura", 48, 200, "white")
#changed magic into a file and spell a class

#create some items
potion = item("Potion", "potion", "Heals 50 HP", 50)
hipotion = item("Hi-Potion", "potion", "Heals 100 HP", 100)
superpotion = item("Super-Potion", "potion", "Heals 350 HP", 350)
elixer = item("Elixer", "elixer", "Fully restores HP/MP of one party member",
              500)
hielixer = item("Mega Elixer", "elixer", "Fully restores party's HP/MP", 500)

grenade = item("Grenade", "attack", "Deals 300 damage", 340)

player_spells = [fire, thunder, blizzard, meteor, cure, cura, quake]
enemy_spells = [fire, meteor, quake]
player_items = [{
    "items": potion,
    "quantity": 15
}, {
    "items": hipotion,
Exemplo n.º 3
0

#black magic
fire = spell("fire", 10, 100, "black")
Thunder = spell("Thunder", 17, 130, "black")
Blizzer = spell("Blizzer", 17, 130, "black")
meteor = spell("meteor", 20, 160, "black")
quak = spell("Quak", 12, 120, "black")

#white magic
cure = spell("cure", 12, 120, "white")
cura = spell("cura", 18, 200, "white")

#creat some items

potion = item("potion",  "potion", "heals for 50 HP", 50)
hight_potion = item("hi_potion",  "potion", "heals for 100 HP", 100)
super_potion = item("supper_potion", "potion", "heals for 150 HP", 500)
exiler = item("exiler","exiler", "fully restor  HP/MP for party memeber", 99990)
hiexiler = item("mega_exiler", "exiler", "fully restor  HP/MP for Player", 99990)
grenad = item("grenad", "attak", "generate damage 50 HP ", 50)

player_spells = [fire, Thunder, Blizzer, meteor, quak, cure, cura]
player_items= [{"item" : potion, "quantity" : 5}, {"item" :hight_potion, "quantity" : 5},
                {"item" :super_potion, "quantity" : 5}, {"item" :exiler, "quantity" : 5}, {"item" :hiexiler, "quantity" : 2},
                {"item" :grenad, "quantity" : 5}]


player1 = person("valos", 3000, 65, 80, 34, player_spells , player_items)
player2 = person("jhony", 2500, 65, 60, 34, player_spells , player_items)
player3 = person("mikey", 2500, 65, 60, 34, player_spells , player_items)
Exemplo n.º 4
0
from classes.inventory import item
import random

#Create black magic
fire = magic('Fire', 110, 1100, 'black')
thunder = magic('Thunder', 120, 1200, 'black')
blizzard = magic('Blizzard', 100, 1000, 'black')
meteor = magic('Meteor', 220, 2000, 'black')
quake = magic('Quake', 120, 1200, 'black')

#Create white magic
cure = magic('Cure', 12, 120, 'white')
cura = magic('Cura', 18, 200, 'white')

#Create items
potion = item("Clover Leaf Potion", "potion", "Heals 50 HP", 50)
high_potion = item("Moon Moss Potion", "potion", "Heals 100 HP", 100)
super_potion = item("Bat Wing Potion", "potion", "Heals 500 HP", 500)
elixir = item("Blooming Blossom Elixir", "elixir",
              "Restores HP and MP for one member of the party", 9999)
high_elixir = item("Healing Star Elixir", "elixir",
                   "Restores HP and MP for the entire party", 9999)
grenade = item("Grenade", "weapon", "Deals 500 Damage", 500)

#create a list of items and spells for each player
player_spells = [fire, thunder, blizzard, meteor, cure, cura]
player_items = [{
    'item': potion,
    'quantity': 15
}, {
    'item': high_potion,
Exemplo n.º 5
0
print(               "_________________________                  ___________")
print("valos 460/460 |                         |         65/65  |           |")


#black magic
fire = spell("fire",10,100,"black")
thunder = spell("thunder",10,100,"black")
blizzard = spell("blizzard",10,100,"black")
meteor = spell("meteor",20,200,"black")
quake = spell("quake",14,140,"black")

#white magic
cure = spell("cure",10,100,"white")
cura = spell("cura",10,100,"white")

potion = item("potion","potion","heals 50 hp",50,15)
hipotion = item("hi-potion","potion","heals 100 hp",100,2)
superpotion = item("superpotion","potion","heals 500 hp",500,5)
elixer = item("elixer","elixer","fully restores hp/mp of one party member",9999,5)
mega_elixer = item("Mega elixer","elixer","fully restores party's hp/mp",9999,5)
grenade = item("grenade","attack","deals 500 damage",500,5)

player_spells = [fire,thunder,blizzard,meteor,quake,cure,cura]
player_items = [{"item": potion,"quantity":15},
                {"item":hipotion,"quantity":5},
               {"item":superpotion,"quantity":2},
                {"item":elixer,"quantity":5},
               {"item":mega_elixer,"quantity":5},
                {"item":grenade,"quantity":5}]

Exemplo n.º 6
0
from classes.game import person, bcolors
from classes.magic import spell
from classes.inventory import item

fire = spell("fire", 10, 100, "rage")  # attacking spells
thunder = spell("thunder", 30, 120, "rage")
shocker = spell("shocker", 50, 150, "rage")
meteor = spell("meteor", 70, 170, "rage")
quake = spell("quake", 100, 200, "rage")

potion = item('potion', 'potion', 'heals 50 hp', 50)  # items
hipotion = item('hipotion', 'potion', 'heals 100 hp', 100)
megapotion = item('megapotion', 'potion', 'heals 500 hp', 500)
elixir = item('elixir', 'potion', 'fully heals', 9999)

grenade = item('grenade', 'bomb', 'deals 500 damage', 500)  # attacking item

cure = spell("cure", 12, 120, "heal")  # healing spells
aid = spell("aid", 14, 150, "heal")

# instantiate
player1 = person('pekka', 465, 60, 30, 34,
                 [fire, thunder, shocker, meteor, quake, cure, aid],
                 [potion, hipotion, megapotion, elixir, grenade])
player2 = person('goblin', 800, 100, 30, 34,
                 [fire, thunder, shocker, meteor, quake, cure, aid],
                 [potion, hipotion, megapotion, elixir, grenade])
player3 = person('giant', 950, 150, 30, 34,
                 [fire, thunder, shocker, meteor, quake, cure, aid],
                 [potion, hipotion, megapotion, elixir, grenade])
enemy = person('witch', 1000, 600, 200, 45, [], [])
Exemplo n.º 7
0
from classes.magic import spell
from classes.inventory import item

# Create Black Magic
fire = spell("Fire", 10, 100, "black")
thunder = spell("Thunder", 12, 120, "black")
blizzard = spell("Blizzard", 14, 150, "black")
meteor = spell("Meteor", 20, 200, "black")
quake = spell("Quake", 12, 140, "black")

# Create White Magic
cure = spell("Cure", 12, 150, "white")
relieve = spell("Relieve", 18, 200, "white")

# Create Items
potion = item("Potion", "potion", "Heals by 50 HP", 50)
hi_potion = item("Hi-Potion", "potion", "Heals by 100 HP", 100)
su_potion = item("Super-Potion", "potion", "Heals by 500 HP", 500)
elixir = item("Elixir", "elixir", "Fully restores HP/MP of one party member",
              9999)
mg_elixir = item("Mega-Potion", "elixir", "Fully restores party's HP/MP", 9999)

grenade = item("Grenade", "attack", "Deals 500 Damage", 500)

player_spells = [fire, thunder, blizzard, meteor, cure, relieve]
player_items = [potion, hi_potion, su_potion, elixir, mg_elixir, grenade]
# Instantiate Person
player = person(400, 65, 60, 35, player_spells, player_items)
enemy = person(1200, 65, 60, 25, [], [])

print(bcolors.FAIL + "An Enemy Attacked!" + bcolors.ENDC)
Exemplo n.º 8
0
thunder = magic("Thunder", 12, 120, "Black")
blizzard = magic("Blizzard", 14, 140, "Black")
darin = magic("Drain", 16, 160, "Black")
osmose = magic("Osmose", 18, 180, "Black")
fira = magic("Fira", 20, 200, "Black")
alvin = magic("Alvin", 10, 100, "White")
arion = magic("Arion", 12, 120, "White")
argus = magic("Argus", 14, 140, "White")
ambrose = magic("Ambrose", 16, 160, "White")
aelfdene = magic("Aelfdene", 18, 180, "White")
aeamus = magic("Aeamus", 20, 200, "White")
player_magics = [fire, blizzard, osmose, alvin, argus, aeamus]
#endregion

# region defining items
potion = item("Potion", "potion", "It heals for 50 HP", 200)
super_potion = item("Super Potion", "potion", "It heals for 500 HP", 500)
elixir = item("Elixir", "elixir", "It fully restores HP/MP of a player", 0)
super_elixir = item("Super Elixir", "elixir",
                    "It fully restores HP/MP of all team members", 0)
grenade = item("Grenade", "attack", "Makes 50 damages", 200)
bomb = item("Bomb", "attack", "Makes 500 damages", 500)
player_items = [{
    "name": potion,
    "quant": 1
}, {
    "name": super_potion,
    "quant": 1
}, {
    "name": elixir,
    "quant": 1
Exemplo n.º 9
0
from classes.inventory import item
from classes.magic import spell

# creating black magic
fire = spell("Fire", 10, 100, "Black")
blizzard = spell("Blizzard", 15, 150, "Black")
meteor = spell("Meteor", 30, 300, "Black")
amadioha = spell("Amadioha", 50, 500, "Black")
ice = spell("Ice", 20, 200, "Black")

# create cure
cure = spell("cure", 12, 120, "Health")
cura = spell("cura", 15, 200, "Health")

# create items
potion = item("Potion", "potion", "Heals 50", 50)
hipotion = item("Hi-potion", "potion", "Heals 100", 100)
superpotion = item("Super Potion", "potion", "Heals 500", 500)
ndu = item("Ndu", "ndu", "Restores HP/MP for one party/member", 9999)
anwuanwu = item("AnwuAnwu", "ndu", "Fully Restores party's HP/MP", 9999)

grenade = item("Grenade", "attack", "Deals 500 damage", 500)

magic = [
        {"name": "fire", "cost": 10, "dmg": 200},
        {"name": "thunder", "cost": 10, "dmg": 1300},
        {"name": "lightning", "cost": 10, "dmg": 100},
]

player_spells = [fire, blizzard, meteor, amadioha, ice, cure, cura]
player_items =  [