-
-
Save anonymous/757e7723ce6412d20ef31c8044b4e81d to your computer and use it in GitHub Desktop.
problemmmm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gnoul(): | |
p_hp = 300 | |
xp = 100 | |
ogre(p_hp, xp) | |
def ogre(p_hp, xp,): | |
p_w_att = 20 | |
o_hp = 200 + 60 | |
rnd = 1 # round number | |
for i in range(999999): | |
while o_hp > 0: | |
print("ROUND " + str(rnd) + " - ENEMY - OGRE BOSS") | |
rnd = rnd + 1 | |
print("Ogre boss attack damage = " + str(25) + " | Warrior attack damage = " + str(p_w_att)) | |
print("Ogre boss hit points = " + str(o_hp) + " | Warrior hit points = " + str(p_hp)) | |
p_hp = p_hp - 25 | |
o_hp = o_hp - p_w_att | |
print("==============================================") | |
print("You are now attacking the Ogre boss.") | |
print("You dealt " + str(p_w_att) + " dmg to Ogre boss, leaving him at " + str(o_hp) + " hp and gained " + str(p_w_att) + " experience.") | |
print("Ogre boss dealt " + str(25) + " damage to you leaving you at " + str(p_hp) + " hp.") | |
#======================================================== | |
xp_func(xp, p_w_att) | |
xp = xp + p_w_att | |
input("continue?: ") | |
def xp_func(xp,p_w_att): | |
if xp >= 0 and xp <= 150: | |
print("You are level 1 with " + str(xp) + " experience!") | |
elif xp >= 151 and xp <= 500: | |
print("You are now level 2 with " + str(xp) + " experience!") | |
p_w_att = p_w_att + 10 | |
print(p_w_att) | |
elif xp >= 501 and xp <= 1000: | |
print("You are now level 3 with " + str(xp) + " experience!") | |
p_w_att = p_w_att + 10 | |
print(p_w_att) | |
gnoul() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment