python小游戏代码
import random as r
import time as t
import turtle as a
import sys as s
a.hideturtle()
a.speed(1000)
a.screensize(600,600)
Blood = 0
Mana = 0
Attack = 0
Defence = 0
Speed = 0
Ability = " "
Skill = " "
Invisibility = 0
Accuracy = 0
Crit = 0
Regeneration = 0
Physical_resistance = 0
Magical_resistance = 0
Spiritual_resistance = 0
Abnormal_resistance = 0
Penetration = 0
mBlood = 0
mMana = 0
mAttack = 0
mDefence = 0
mSpeed = 0
mAbility = " "
mSkill = " "
mPhysical_resistance = 0
mMagical_resistance = 0
mSpiritual_resistance = 0
mAbnormal_resistance = 0
mPenetration = 0
Race = "N/A"
mRace = "N/A"
mName = " "
mLevel = 0
mRank = " "
def move(x,y):
a.penup()
a.goto(x,y)
a.pendown()
def bodyDrawing():
move(0,100)
a.circle(40)
move(0,100)
a.right(90)
a.forward(120)
move(0,80)
a.right(40)
a.forward(110)
move(0,80)
a.left(80)
a.forward(110)
move(0,-20)
a.right(5)
a.forward(120)
move(0,-20)
a.right(70)
a.forward(120)
class draw:
def assassin():
a.pencolor("black")
a.pensize(5)
bodyDrawing()
move(72,-6)
a.right(145)
a.forward(30)
a.right(90)
a.color("silver")
a.begin_fill()
a.forward(20)
a.right(180)
a.forward(40)
a.right(90)
a.goto(62,96)
a.goto(92,24)
a.end_fill()
def archer():
a.pencolor("black")
a.pensize(5)
bodyDrawing()
move(-72,-6)
a.left(35)
a.forward(60)
a.right(180)
a.forward(160)
y = 94
while(y>=-66):
a.goto((y-14)*(y-14)/128 -122, y)
y = y - 1
move(72,-26)
a.goto(67,-32)
a.goto(77,-32)
a.goto(72,-26)
a.forward(120)
a.color("black")
a.begin_fill()
a.goto(62,79)
a.goto(82,79)
a.goto(72,94)
a.end_fill()
def warrior():
a.pencolor("black")
a.pensize(5)
bodyDrawing()
move(-72,-6)
a.color("grey")
a.begin_fill()
a.goto(-92,0)
a.goto(-92,4)
a.goto(-280,96)
a.goto(-280,71)
a.goto(-92,-10)
a.goto(-92,-6)
a.goto(-72,-12)
a.goto(-72,-6)
a.end_fill()
move(72,-6)
a.begin_fill()
a.goto(92,0)
a.goto(92,4)
a.goto(280,96)
a.goto(280,71)
a.goto(92,-10)
a.goto(92,-6)
a.goto(72,-12)
a.goto(72,-6)
a.end_fill()
def sorcerer():
a.pencolor("black")
a.pensize(5)
bodyDrawing()
move(72,-26)
a.right(145)
a.forward(120)
a.color("red")
a.begin_fill()
a.goto(67,99)
a.goto(72,114)
a.goto(77,99)
a.goto(72,94)
a.end_fill()
def avenue_warrior():
a.clear()
a.pencolor("black")
a.pensize(5)
move(-300,-300)
a.goto(-100,300)
move(300,-300)
a.goto(100,300)
a.color("black")
a.begin_fill()
move(-50,-300)
a.goto(-50*4/5,-200)
a.goto(50*4/5,-200)
a.goto(50,-300)
a.goto(-50,-300)
a.end_fill()
a.begin_fill()
move(-50*4/5,-175)
a.goto(-50*3/5,-75)
a.goto(50*3/5,-75)
a.goto(50*4/5,-175)
a.goto(-50*4/5,-175)
a.end_fill()
a.begin_fill()
move(-50*3/5,-50)
a.goto(-50*2/5,50)
a.goto(50*2/5,50)
a.goto(50*3/5,-50)
a.goto(-50*3/5,-50)
a.end_fill()
a.begin_fill()
move(-50*2/5,75)
a.goto(-50*1/5,175)
a.goto(50*1/5,175)
a.goto(50*2/5,75)
a.goto(-50*2/5,75)
a.end_fill()
a.begin_fill()
move(-50*1/5,200)
a.goto(-50/10,300)
a.goto(50/10,300)
a.goto(50*1/5,200)
a.goto(-50*1/5,200)
a.end_fill()
def green_pearl():
a.clear()
a.pencolor("lightseagreen")
a.pensize(5)
move(0,-240)
a.color("teal")
a.begin_fill()
a.circle(240)
a.end_fill()
move(-20,-185)
a.color("lightseagreen")
a.begin_fill()
a.circle(210)
a.end_fill()
move(-50,-120)
a.color("mediumturquoise")
a.begin_fill()
a.circle(170)
a.end_fill()
move(-70,-70)
a.color("mediumspringgreen")
a.begin_fill()
a.circle(140)
a.end_fill()
def gorcery():
a.clear()
a.color("black")
a.begin_fill()
move(-250,-200)
a.goto(250,-200)
a.goto(250,200)
a.goto(-250,200)
a.goto(-250,-200)
a.end_fill()
a.color("white")
move(-180,140)
a.begin_fill()
a.goto(180,140)
a.goto(180,-60)
a.goto(-180,-60)
a.goto(-180,140)
a.end_fill()
move(-250,140)
a.begin_fill()
a.goto(-210,140)
a.goto(-210,-60)
a.goto(-250,-60)
a.goto(-250,140)
a.end_fill()
move(250,140)
a.begin_fill()
a.goto(210,140)
a.goto(210,-60)
a.goto(250,-60)
a.goto(250,140)
a.end_fill()
move(-20,170)
a.pencolor("white")
a.pensize(10)
a.write("GORCERY")
def data_showing_player():
a.pencolor("black")
move(-100,80)
a.write("Level:")
move(-50,80)
a.write(level)
move(-30,80)
a.write("Career:")
move(10,80)
a.write(career)
move(70,80)
a.write("Race:")
move(110,80)
a.write(race)
move(-100,70)
a.write("Blood:")
move(-50,70)
a.write(Blood)
move(-100,50)
a.write("Mana:")
move(-50,50)
a.write(Mana)
move(-100,30)
a.write("Attack:")
move(-50,30)
a.write(Attack)
move(-100,10)
a.write("Defence:")
move(-50,10)
a.write(Defence)
move(-100,-10)
a.write("Speed:")
move(-50,-10)
a.write(Speed)
move(-100,-30)
if(career == "assassin"):
a.write("Invisibility:")
move(-50,-30)
a.write(Insivibility)
if(career == "archer"):
a.write("Accuracy:")
move(-50,-30)
a.write(Accuracy)
if(career == "warrior"):
a.write("Crit:")
move(-50,-30)
a.write(Crit)
if(career == "sorcerer"):
a.write("Regeneration:")
move(-20,-30)
a.write(Regeneration)
move(-100,-50)
a.write("Ability:")
move(-50,-50)
a.write(Ability)
move(-100,-70)
a.write("Skill:")
move(-50,-70)
a.write(Skill)
move(30,70)
a.write("Physical resistance:")
move(130,70)
a.write(Physical_resistance)
move(30,50)
a.write("Magical resistance:")
move(130,50)
a.write(Magical_resistance)
move(30,30)
a.write("Spiritual resistance:")
move(130,30)
a.write(Spiritual_resistance)
move(30,10)
a.write("Abnormal resistance:")
move(140,10)
a.write(Abnormal_resistance)
move(10,-10)
a.write("Penetration:")
move(130,-10)
a.write(Penetration)
def data_showing_monster():
a.pencolor("black")
move(-100,80)
a.write("Name")
move(-50,80)
a.write(mName)
move(-30,80)
a.write("Level:")
move(10,80)
a.write(mLevel)
move(70,80)
a.write("Quality")
move(110,80)
a.write(mQuality)
move(-100,70)
a.write("Blood:")
move(-50,70)
a.write(mBlood)
move(-100,50)
a.write("Mana:")
move(-50,50)
a.write(mMana)
move(-100,30)
a.write("Attack:")
move(-50,30)
a.write(mAttack)
move(-100,10)
a.write("Defence:")
move(-50,10)
a.write(mDefence)
move(-100,-10)
a.write("Speed:")
move(-50,-10)
a.write(mSpeed)
move(-100,-50)
a.write("Ability:")
move(-50,-50)
a.write(mAbility)
move(-100,-70)
a.write("Skill:")
move(-50,-70)
a.write(mSkill)
move(30,70)
a.write("Physical resistance:")
move(130,70)
a.write(mPhysical_resistance)
move(30,50)
a.write("Magical resistance:")
move(130,50)
a.write(mMagical_resistance)
move(30,30)
a.write("Spiritual resistance:")
move(130,30)
a.write(mSpiritual_resistance)
move(30,10)
a.write("Abnormal resistance:")
move(140,10)
a.write(mAbnormal_resistance)
move(10,-10)
a.write("Penetration:")
move(130,-10)
a.write(mPenetration)
#hide turn degree when the thing above is hide
print("Welcome to the game 'Saint attack' made by Gary(copyright law protecting)")
t.sleep(3)
count = 0
for i in range(0,101):
print("\r","Game initializing:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print(" ",flush = False)
count = 0
for i in range(0,101):
print("\r","Background setting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print(" ",flush = False)
count = 0
for i in range(0,101):
print("\r","Data uploading:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print(" ",flush = False)
count = 0
for i in range(0,101):
print("\r","Model creating:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print(" ",flush = False)
t.sleep(3)
password = input("Please enter your password, if you don't have one, type no: ")
if(password == "no"):
print("Welcome to password creation process, may I ask your name(all lower case, no space): ",end = "",flush = True)
name = input("")
print("May I ask your birthday(e.g.20200202): ",end = "",flush = True)
birthday = input("")
print("May I ask your age: ",end = "",flush = True)
age = input("")
print("Would your like to create by yourself or randomly pick one: ",end = "", flush = True)
way = input("")
listupper = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
listlower = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
listnum = ["0","1","2","3","4","5","6","7","8","9"]
listran = []
way1 = "my"
way2 = "random"
way3 = "create"
way4 = "pick"
result = True
if(way1 in way or way3 in way):
while(True):
print("-------------------------------------------------")
print("Please type in your password, it at least must contain a uppercase letter, a lower case letter, a number and need to be no shorter than 8 characters: ",end = "", flush = True)
password = input("")
if(password.isalnum() == False):
print("Please make sure that your password contains no other character like space.")
result = False
t.sleep(1)
if(password.isalpha() == True):
print("Please make sure that your password contains not only letter but also other stuffs.")
result = False
t.sleep(1)
if(password.isdigit() == True):
print("Please make sure that your password contains not only number but also other stuffs.")
result = False
t.sleep(1)
if(password.islower() == True):
print("Please make sure that your password contains not only lowercase but also uppercase.")
result = False
t.sleep(1)
if(password.isupper() == True):
print("Please make sure that your password contains not only uppercase but also lowercase.")
result = False
t.sleep(1)
if(len(password)<8):
print("Please make sure that your password is long enough.")
result = False
t.sleep(1)
if(name in password):
print("Please make sure that your password does not contain your name.")
result = False
t.sleep(1)
if(birthday in password):
print("Please make sure that your password does not contain your birthday.")
result = False
t.sleep(1)
if(age in password):
print("Please make sure that your password does not contain your age.")
result = False
t.sleep(1)
if(result == True):
t.sleep(1)
print("You have successfully create your password.")
print("Your password is", password)
break
elif(way2 in way or way4 in way):
p1 = r.choice(listupper)
p2 = r.choice(listupper)
p3 = r.choice(listlower)
p4 = r.choice(listlower)
p5 = r.choice(listnum)
p6 = r.choice(listnum)
p7 = r.choice(listnum)
p8 = r.choice(listnum)
listran.append(p1)
listran.append(p2)
listran.append(p3)
listran.append(p4)
listran.append(p5)
listran.append(p6)
listran.append(p7)
listran.append(p8)
r.shuffle(listran)
password = listran[0] + listran[1] + listran[2] + listran[3] + listran[4] + listran[5] + listran[6] + listran[7]
print("This is your randomly choosed password: ", password)
t.sleep(5)
print("Please re-login to activate your new password.")
t.sleep(1)
file = open("password.txt", "w+")
file.write(password)
file.close()
s.quit()
else:
file = open("password.txt", "r")
Spassword = file.read()
while(1):
if(password == Spassword):
print("You have successfully logged in.")
t.sleep(1)
break
elif(password != Spassword):
print("Please check if you are entering the right password.")
t.sleep(1)
print("We cannot ensure that you are one of our users.")
t.sleep(1)
s.quit()
file.close()
print("Welcome to the city of Saint Gary, my people")
t.sleep(3)
print("You are the chosen one, brave and energetic.")
t.sleep(3)
print("As you know, this city has been occupied by monsters.")
t.sleep(3)
print("Hold on to your weapon and fight for the Empire.")
t.sleep(3)
print("----------separatrix----------")
print("To help you, we can provide you four strong and potential career.")
t.sleep(3)
print("They are: assassin, archer, warrior, sorcerer.")
t.sleep(3)
career = input("Choose one and start your journey: ")
assassin = "assassin"
archer = "archer"
warrior = "warrior"
sorcerer = "sorcerer"
list_career = ["assassin", "archer", "warrior", "sorcerer"]
if(career == "" or career ==" "):
carrer = r.choice(list_career)
if(assassin == career):
draw.assassin()
t.sleep(3)
if(archer == career):
draw.archer()
t.sleep(3)
if(warrior == career):
draw.warrior()
t.sleep(3)
if(sorcerer == career):
draw.sorcerer()
t.sleep(3)
print("Congratulations, you have chosen to be a %s."%career)
t.sleep(3)
print("----------separatrix----------")
print("Your first stop is Avenue Warrior.")
draw.avenue_warrior()
print("Hey, see that green creature on the side of the road?")
t.sleep(3)
print("That's the weakest monsters in Saint Gary. It's called Slime.")
t.sleep(3)
print("Go and beat it!")
t.sleep(1)
print("Option: I'll try. / I am always ready.")
beat_Slime = input("You: ")
beat_Slime_try = "I'll try"
beat_Slime_ready = "I am always ready"
if(beat_Slime == beat_Slime_try):
print("Well, I shall give you a dictionary.")
t.sleep(3)
elif(beat_Slime == beat_Slime_ready):
print("Wow, you are born to be ready.")
t.sleep(3)
if(career == "assassin"):
print("I shall give you a dictionary and a [copper dagger].")
t.sleep(3)
if(career == "archer"):
print("I shall give you a dictionary and a [noob shoes].")
t.sleep(3)
if(career == "warrior"):
print("I shall give you a dictionary and a [noob armor].")
t.sleep(3)
if(career == "sorcerer"):
print("I shall give you a dictionary and a {noob hat}.")
t.sleep(3)
print("This dictionary contains information about most monsters.")
t.sleep(3)
print("Also after the battle, you will be rewarded.")
t.sleep(3)
print("Now go and fight with the information of Slime I gave you.")
t.sleep(3)
dict_assassin = {'Blood': 80, 'Mana': 15, 'Attack': 10, 'Defence': 5, 'Speed': 15, 'Ability': " ", 'Skill': " ", 'Invisibility':5}
dict_archer = {'Blood': 70, 'Mana': 10, 'Attack': 5, 'Defence': 8, 'Speed': 10, 'Ability': " ", 'Skill': " ", 'Accuracy':5}
dict_warrior = {'Blood': 120, 'Mana': 5, 'Attack': 15, 'Defence': 15, 'Speed': 1, 'Ability': " ", 'Skill': " ", 'Crit':3}
dict_sorcerer = {'Blood': 70, 'Mana': 20, 'Attack': 5, 'Defence': 8, 'Speed': 5, 'Ability': " ", 'Skill': " ", 'Regeneration':5}
dict_Slime = {'Name': "Slime", 'Blood': 50, 'Mana': 0, 'Attack': 5, 'Defence': 5, 'Speed': 0, 'Ability': " ", 'Skill': " "}
mBlood = 50
mMana = 0
mAttack = 5
mDefence = 5
mSpeed = 0
mAbility = " "
mSkill = " "
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
print(dict_Slime)
t.sleep(3)
if(career == "assassin"):
print("According to your career, you get a special range: [Invisibility: 5%]")
t.sleep(3)
print("Your information is:", dict_assassin)
t.sleep(3)
Blood = 80
Mana = 15
Attack = 10
Defence = 5
Speed = 15
Ability = " "
Skill = " "
Invisibility = 5
if(career == "archer"):
print("According to your career, you get a special range: [Accuracy: 5%]")
t.sleep(3)
print("Your information is:", dict_archer)
t.sleep(3)
Blood = 70
Mana = 10
Attack = 5
Defence = 8
Speed = 10
Ability = " "
Skill = " "
Accuracy = 5
if(career == "warrior"):
print("According to your career, you get a special range: [Crit: 3%]")
t.sleep(3)
print("Your information is:", dict_warrior)
t.sleep(3)
Blood = 120
Mana = 5
Attack = 15
Defence = 15
Speed = 1
Ability = " "
Skill = " "
Crit = 3
if(career == "sorcerer"):
print("According to your career, you get a special range: [Regeneration: 5%]")
t.sleep(3)
print("Your information is:", dict_sorcerer)
t.sleep(3)
Blood = 70
Mana = 20
Attack = 5
Defence = 8
Speed = 5
Ability = " "
Skill = " "
Regeneration = 5
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
print("You get two skill: normal attack and charge.")
t.sleep(3)
print("Normal attack is make a damage that equals to your original attack data.")
t.sleep(3)
print("Charge is to increase your damage 20%")
t.sleep(3)
dict_assassin['Skill'] = "normal attack,charge"
dict_archer['Skill'] = "normal attack,charge"
dict_warrior['Skill'] = "normal attack,charge"
dict_sorcerer['Skill'] = "normal attack,charge"
print("Now, start the fight!")
print("----------separatrix----------")
while(Blood>=0 or mBlood>=0):
attack = input("Your turn: ")
if(attack == "normal attack"):
print("Slime's blood = " + str(monsterBlood))
monsterBlood = monsterBlood - playerAttack
t.sleep(1)
print("Slime's blood =" + str(monsterBlood))
t.sleep(1)
print("You did an attack of " + str(playerAttack))
t.sleep(1)
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
print("Slime did an attack of 5")
t.sleep(1)
if(monsterAttack<=playerDefence):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>playerDefence):
print("The attack works because your defence wasn't big enough.")
playerBlood = playerBlood - monsterAttack
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Slime, Congratulations!")
if(playerBlood<=0):
pass
count = 0
t.sleep(1)
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
t.sleep(1)
print("-You got nothing.")
break
if(playerBlood<=0):
print("Don't give up, you can do it next time.")
break
level = 1
t.sleep(3)
print("----------separatrix----------")
print("You were so brilliant and powerful.")
t.sleep(3)
print("Your level has gone up.")
t.sleep(3)
level = level + 1
print("Your current level is",level)
t.sleep(3)
print("Your information has been updated.")
t.sleep(3)
if(career == "assassin"):
Blood = Blood + 1
dict_assassin['Blood'] = Blood
Attack = Attack + 4
dict_assassin['Attack'] = Attack
Speed = Speed + 3
dict_assassin['Speed'] = Speed
Invisibility = Invisibility + 3
dict_assassin['Invisibility'] = Invisibility
print(dict_assassin)
elif(career == "archer"):
Blood = Blood + 4
dict_archer['Blood'] = Blood
Attack = Attack + 3
dict_archer['Attack'] = Attack
Speed = Speed + 3
dict_archer['Speed'] = Speed
Accuracy = Accuracy + 2
dict_archer['Accuracy'] = Accuracy
print(dict_archer)
elif(career == "warrior"):
Blood = Blood + 10
dict_warrior['Blood'] = Blood
Attack = Attack + 2
dict_warrior['Attack'] = Attack
Defence = Defence + 3
dict_warrior['Defence'] = Defence
Crit = Crit + 1
dict_warrior['Crit'] = Crit
print(dict_warrior)
elif(career == "sorcerer"):
Mana = Mana + 5
dict_sorcerer['Mana'] = Mana
Attack = Attack + 4
dict_sorcerer['Attack'] = Attack
Defence = Defence + 2
dict_sorcerer['Defence'] = Defence
Regeneration = Regeneration + 3
dict_sorcerer['Regeneration'] = Regeneration
print(dict_sorcerer)
t.sleep(3)
dict_EliteSlime = {'Name': 'Elite Slime','Blood': 140,'Mana': 30,'Attack': 20,'Defence': 18,'Speed': 7,'Ability': " ",'Skill': "sticky, regeneration"}
mBlood = 140
mMana = 30
mAttack = 20
mDefence = 18
mSpeed = 7
mAbility = " "
mSkill = "sticky, regeneration"
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
print("----------separatrix----------")
print("How was your first fight, easy or difficult?")
ans_easy = "easy"
ans_diff = "difficult"
dice = 1
ans_e_f = input("You: ")
if(ans_e_f == ans_easy):
print("Ha, I knew you would say this.")
t.sleep(3)
print("It seems like a little achievement made you arrogant.")
t.sleep(3)
print("Try this, see the bigger Slime? That's called Elite Slime.")
t.sleep(3)
print("Information of Elite Slime: ",dict_EliteSlime)
t.sleep(3)
print("Show you talent to me, don't forget you can use normal attack and charge")
t.sleep(3)
print("----------separatrix----------")
while(playerBlood>=0 or monsterBlood>=0):
monsterDefence = mDefence
attack = input("Your turn: ")
if(attack == "normal attack"):
if(monsterMana>=15):
monsterDefence = monsterDefence * 2
print("Elite Slime used sticky, its defence is doubled.")
monsterMana = monsterMana - 15
t.sleep(1)
if(monsterMana<30):
monsterMana = monsterMana + 3
if(playerAttack<=monsterDefence):
print("Your attack didn't work because Elite Slime have a denfence of " + str(monsterDefence))
t.sleep(1)
if(playerAttack>monsterDefence):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work cause Elite Slime was too fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack))
monsterBlood = monsterBlood - playerAttack
print("Slime's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
print("Slime did an attack of " + str(monsterAttack))
t.sleep(1)
if(monsterAttack<=playerDefence):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>playerDefence):
print("The attack works because your defence wasn't big enough.")
playerBlood = playerBlood - monsterAttack
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Elite Slime, Congratulations!")
if(playerBlood<=0):
pass
count = 0
t.sleep(1)
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
t.sleep(1)
print("-You got nothing.")
break
if(playerBlood<=0):
print("See? You are far away from powerful. Stop your arrogance.")
break
elif(ans_e_f == ans_diff):
print("Good, it seems that you are wise enough.")
t.sleep(3)
print("I am so glad that you weren't arrogant.")
else:
pass
t.sleep(3)
print("To enhance your ability, beat a Slime again. However, the Silme is stronger this time.")
t.sleep(3)
dict_CrackSlime = {'Name': "Crack Slime",'Blood': 120,'Mana': 20,'Attack': 13,'Defence': 13,'Speed': 4,'Ability': " ",'Skill': "slow potion"}
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
mBlood = 120
mMana = 20
mAttack = 13
mDefence = 13
mSpeed = 4
mAbility = " "
mSkill = "slow potion"
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
judgement = False
print("Here's the information: " , dict_CrackSlime)
t.sleep(3)
print("----------separatrix----------")
while(playerBlood>=0 or monsterBlood>=0):
monsterDefence = mDefence
attack = input("Your turn: ")
if(attack == "normal attack"):
if(monsterMana>=6):
playerAttack = playerAttack - 2
monsterMana = monsterMana - 6
print("Crack Slime used slow potion, your attack is reduced by 2.")
t.sleep(1)
judgement = True
if(playerAttack<=monsterDefence):
print("Your attack didn't work because Crack Slime have a denfence of " + str(monsterDefence))
t.sleep(1)
if(playerAttack>monsterDefence):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work cause Crack Slime was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack))
monsterBlood = monsterBlood - playerAttack
print("Slime's blood = " + str(monsterBlood))
t.sleep(1)
if(judgement):
playerAttack = playerAttack + 2
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
dice = r.randint(1,100)
if(dice<=playerSpeed):
print("Slime's attack didn't work because you are so fast")
t.sleep(1)
else:
print("Slime did an attack of " + str(monsterAttack))
t.sleep(1)
if(monsterAttack<=playerDefence):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>playerDefence):
print("The attack works because your defence wasn't big enough.")
playerBlood = playerBlood - monsterAttack
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Crack Slime, Congratulations!")
if(playerBlood<=0):
pass
result = "win"
count = 0
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print("-You got nothing.")
t.sleep(3)
break
if(playerBlood<=0):
print("Well, I didn't know you are such weak")
result = "lose"
break
t.sleep(3)
print("----------separatrix----------")
if(result == "win"):
print("Your level has gone up.")
t.sleep(3)
level = level + 1
print("Your current level is",level)
t.sleep(3)
print("Your information has been updated.")
t.sleep(3)
if(career == "assassin"):
Blood = Blood + 2
dict_assassin['Blood'] = Blood
Attack = Attack + 5
dict_assassin['Attack'] = Attack
Speed = Speed + 2
dict_assassin['Speed'] = Speed
Invisibility = Invisibility + 3
dict_assassin['Invisibility'] = Invisibility
print(dict_assassin)
if(career == "archer"):
Blood = Blood + 3
dict_archer['Blood'] = Blood
Attack = Attack + 5
dict_archer['Attack'] = Attack
Speed = Speed + 4
dict_archer['Speed'] = Speed
Accuracy = Accuracy + 3
dict_archer['Accuracy'] = Accuracy
print(dict_archer)
if(career == "warrior"):
Blood = Blood + 13
dict_warrior['Blood'] = Blood
Attack = Attack + 1
dict_warrior['Attack'] = Attack
Defence = Defence + 3
dict_warrior['Defence'] = Defence
Crit = Crit + 1
dict_warrior['Crit'] = Crit
print(dict_warrior)
if(career == "sorcerer"):
Mana = Mana + 7
dict_sorcerer['Mana'] = Mana
Attack = Attack + 4
dict_sorcerer['Attack'] = Attack
Defence = Defence + 2
dict_sorcerer['Defence'] = Defence
Regeneration = Regeneration + 4
dict_sorcerer['Regeneration'] = Regeneration
print(dict_sorcerer)
t.sleep(3)
elif(result == "lose"):
print("Don't be sad, maybe that monster is actually trained to be against your career.")
t.sleep(3)
print("Wow, wait, saw that green pearl under Crack Slime's body")
draw.green_pearl()
t.sleep(3)
print("That's for you to level up.")
t.sleep(3)
print("Wow, your level has gone up after swallowing the pearl.")
t.sleep(3)
level = level + 1
print("Your current level is",level)
t.sleep(3)
print("Your information has been updated.")
t.sleep(3)
print("To be honest, the improvement on your data isn't as much as you level up bu yourself. Have a look:")
t.sleep(3)
if(career == "assassin"):
Blood = Blood + 1
dict_assassin['Blood'] = Blood
Attack = Attack + 3
dict_assassin['Attack'] = Attack
Speed = Speed + 2
dict_assassin['Speed'] = Speed
Invisibility = Invisibility + 2
dict_assassin['Invisibility'] = Invisibility
print(dict_assassin)
if(career == "archer"):
Blood = Blood + 3
dict_archer['Blood'] = Blood
Attack = Attack + 4
dict_archer['Attack'] = Attack
Speed = Speed + 3
dict_archer['Speed'] = Speed
Accuracy = Accuracy + 3
dict_archer['Accuracy'] = Accuracy
print(dict_archer)
if(career == "warrior"):
Blood = Blood + 9
dict_warrior['Blood'] = Blood
Attack = Attack + 1
dict_warrior['Attack'] = Attack
Defence = Defence + 3
dict_warrior['Defence'] = Defence
Crit = Crit + 1
dict_warrior['Crit'] = Crit
print(dict_warrior)
if(career == "sorcerer"):
Mana = Mana + 6
dict_sorcerer['Mana'] = Mana
Attack = Attack + 4
dict_sorcerer['Attack'] = Attack
Defence = Defence + 2
dict_sorcerer['Defence'] = Defence
Regeneration = Regeneration + 3
dict_sorcerer['Regeneration'] = Regeneration
print(dict_sorcerer)
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
t.sleep(3)
print("----------separatrix----------")
print("Now, I think you should wonder about what does those data means, let me explain.")
t.sleep(3)
print("Blood means the amount of blood you have. It determines how long you can live.")
t.sleep(3)
print("Mana means the amount of energy you have. It determines how many ability you can use.")
t.sleep(3)
print("Attack means the amount of damage you can make. It determines the amount of attack can act on your enemies.")
t.sleep(3)
print("Defence means the amount of attack you can bear. It determines the amount of attack can act on you.")
t.sleep(3)
print("Speed means the probability of letting the attack of enemies missed. It determines whether the attack will work or not.")
t.sleep(3)
print("Ability means something natural. It automatically happens every time you attack or your enemies atttack.")
t.sleep(3)
print("Skill means ways of attacking, defencing or hiding. It can be chosed to use while you attack.")
t.sleep(3)
print("Invisibility means the probability for you to double your speed during the next attack.")
t.sleep(3)
print("Accuracy means the probability for you to double your penetration.")
t.sleep(3)
print("Crit means the probability for you to double your attack.")
t.sleep(3)
print("Regeneration means the amount of mana you can gain after each round.")
t.sleep(3)
print("----------separatrix----------")
print("Even though your fight was not so wonderful, those monsters retreated.")
t.sleep(3)
print("Now walk along the street and turn left at the end.")
count = 0
t.sleep(1)
for i in range(0,101):
print("\r","Walking:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print(" ",flush = False)
t.sleep(1)
print("Hey, see that gorcery on the side of the road?")
t.sleep(3)
print("Your option: yes or no")
t.sleep(3)
see_gorcery = input("You: ")
see_gorceryY = "yes"
see_gorceryN = "no"
while(True):
if(see_gorcery == see_gorceryY):
draw.gorcery()
t.sleep(3)
break
elif(see_gorcery == see_gorceryN):
print("Well, if you cannot see it, go and check your eyes!")
t.sleep(3)
s.quit()
else:
break
print("Actually, I did not expect that to appear such early.")
t.sleep(3)
print("You know, they are not powerful monsters, but they are really annoying.")
t.sleep(3)
print("I can easily tell that they will come one by one.")
t.sleep(3)
print("It means that your need to beat them one by one.")
t.sleep(3)
print("Now go and try!")
t.sleep(3)
dict_grape = {'Name': "Grape",'Blood': 60,'Mana': 0,'Attack': 8,'Defence': 10,'Speed': 1,'Ability': " ",'Skill': "too sweet"}
dict_apple = {'Name': "Apple",'Blood': 90,'Mana': 1,'Attack': 12,'Defence': 13,'Speed': 2,'Ability': " ",'Skill': "too green too young"}
dict_coconut = {'Name': "Coconut",'Blood': 120,'Mana': 10,'Attack': 11,'Defence': 17,'Speed': 3,'Ability': " ",'Skill': "hard shell"}
dict_watermelon = {'Name': "Watermelon",'Blood': 150,'Mana': 20,'Attack': 15,'Defence': 15,'Speed': 4,'Ability': " ",'Skill': "extra seed"}
dict_artocarpus_heterophyllus = {'Name': "Artocarpus heterophyllus",'Blood': 180,'Mana': 15,'Attack': 18,'Defence': 16,'Speed': 8,'Ability': " ",'Skill': "quick growth"}
mBlood = 60
mMana = 0
mAttack = 8
mDefence = 10
mSpeed = 1
mAbility = " "
mSkill = "too sweet"
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
print("----------separatrix----------")
print("Here's the information: " , dict_grape)
while(playerBlood>=0 or monsterBlood>=0):
attack = input("Your turn: ")
if(attack == "normal attack"):
if(playerAttack<=monsterDefence):
print("Your attack didn't work because Grape has a denfence of ", str(monsterDefence))
t.sleep(1)
if(playerAttack>monsterDefence):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work because Grape was so fast.")
else:
dice = r.randint(1,100)
if(dice<=42):
playerAttack = playerAttack - 2
print("Grape successfully used too sweet. Your attack has been reduced by 2.")
t.sleep(1)
print("You did an attack of " + str(playerAttack))
monsterBlood = monsterBlood - playerAttack
t.sleep(1)
print("Grape's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
dice = r.randint(1,100)
if(dice<=playerSpeed):
print("Grape's attack didn't work because you are so fast")
t.sleep(1)
else:
print("Grape did an attack of " + str(monsterAttack))
t.sleep(1)
if(monsterAttack<=playerDefence):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>playerDefence):
print("The attack works because your defence wasn't big enough.")
playerBlood = playerBlood - monsterAttack
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Grape, Congratulations!")
if(playerBlood<=0):
pass
count = 0
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print("-You got nothing.")
t.sleep(3)
break
if(playerBlood<=0):
print("Well, keep on fighting.")
break
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
mBlood = 90
mMana = 1
mAttack = 12
mDefence = 13
mSpeed = 2
mAbility = " "
mSkill = "too green too young"
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
print("----------separatrix----------")
print("Here's the information: " , dict_apple)
while(playerBlood>=0 or monsterBlood>=0):
attack = input("Your turn: ")
if(attack == "normal attack"):
if(playerAttack<=monsterDefence):
print("Your attack didn't work because Apple has a denfence of " + str(monsterDefence))
t.sleep(1)
if(playerAttack>monsterDefence):
dice = r.randint(1,100)
print("Apple used too green too young. Its speed increased by 18")
monsterSpeed = monsterSpeed + 18
t.sleep(1)
if(dice<=monsterSpeed):
print("Your attack didn't work because Apple was so fast.")
else:
print("You did an attack of " + str(playerAttack))
monsterBlood = monsterBlood - playerAttack
t.sleep(1)
print("Apple's blood = " + str(monsterBlood))
t.sleep(1)
monsterSpeed = mSpeed
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
dice = r.randint(1,100)
if(dice<=playerSpeed):
print("Apple's attack didn't work because you are so fast")
t.sleep(1)
else:
print("Apple did an attack of " + str(monsterAttack))
t.sleep(1)
if(monsterAttack<=playerDefence):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>playerDefence):
print("The attack works because your defence wasn't big enough.")
playerBlood = playerBlood - monsterAttack
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Apple, Congratulations!")
if(playerBlood<=0):
pass
count = 0
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print("-You got nothing.")
t.sleep(3)
break
if(playerBlood<=0):
print("Well, keep on fighting.")
break
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
mBlood = 120
mMana = 10
mAttack = 11
mDefence = 17
mSpeed = 3
mAbility = " "
mSkill = "hard shell"
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
print("----------separatrix----------")
print("Here's the information: " , dict_coconut)
while(playerBlood>=0 or monsterBlood>=0):
attack = input("Your turn: ")
monsterMana = monsterMana + 1
if(attack == "normal attack"):
if(playerAttack<=monsterDefence):
print("Your attack didn't work because Coconut has a denfence of " + str(monsterDefence))
t.sleep(1)
if(playerAttack>monsterDefence):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work because Coconut was so fast.")
else:
print("You did an attack of " + str(playerAttack))
if(monsterMana>=5):
print("Coconut used hardshell. Half of your attack would be given back to you.")
t.sleep(1)
playerBlood = playerBlood - playerAttack*0.5
print("Your blood is " + str(playerBlood))
monsterMana = monsterMana - 5
t.sleep(1)
monsterBlood = monsterBlood - playerAttack
print("Coconut's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
dice = r.randint(1,100)
if(dice<=playerSpeed):
print("Coconut's attack didn't work because you are so fast")
t.sleep(1)
else:
print("Coconut did an attack of " + str(monsterAttack))
t.sleep(1)
if(monsterAttack<=playerDefence):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>playerDefence):
print("The attack works because your defence wasn't big enough.")
playerBlood = playerBlood - monsterAttack
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Coconut, Congratulations!")
if(playerBlood<=0):
pass
count = 0
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print("-You got nothing.")
t.sleep(3)
break
if(playerBlood<=0):
print("Well, keep on fighting.")
break
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
mBlood = 150
mMana = 20
mAttack = 15
mDefence = 15
mSpeed = 4
mAbility = " "
mSkill = "extra seed"
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
print("----------separatrix----------")
print("Here's the information: " , dict_watermelon)
while(playerBlood>=0 or monsterBlood>=0):
attack = input("Your turn: ")
monsterMana = monsterMana + 2
if(attack == "normal attack"):
if(playerAttack<=monsterDefence):
print("Your attack didn't work because Watermelon has a denfence of " + str(monsterDefence))
t.sleep(1)
if(playerAttack>monsterDefence):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work because Watermelon was so fast.")
else:
print("You did an attack of " + str(playerAttack))
monsterBlood = monsterBlood - playerAttack
print("Watermelon's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
dice = r.randint(1,100)
if(dice<=playerSpeed):
print("Watermelon's attack didn't work because you are so fast")
t.sleep(1)
else:
print("Watermelon did an attack of " + str(monsterAttack))
t.sleep(1)
if(monsterAttack<=playerDefence):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
print("Watermelon used extra seed. You got an extra attack of 3")
playerBlood = playerBlood - 3
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterAttack>playerDefence):
print("The attack works because your defence wasn't big enough.")
playerBlood = playerBlood - monsterAttack
t.sleep(1)
print("Watermelon used extra seed. You got an extra attack of 3")
playerBlood = playerBlood - 3
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Watermelon, Congratulations!")
if(playerBlood<=0):
pass
count = 0
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print("-You got nothing.")
t.sleep(3)
break
if(playerBlood<=0):
print("Well, keep on fighting.")
break
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
mBlood = 180
mMana = 20
mAttack = 18
mDefence = 16
mSpeed = 8
mAbility = " "
mSkill = "quick growth"
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
print("----------separatrix----------")
print("Here's the information: " , dict_artocarpus_heterophyllus)
t.sleep(3)
print("This is the final boss, be careful.")
t.sleep(1)
while(playerBlood>=0 or monsterBlood>=0):
attack = input("Your turn: ")
monsterMana = monsterMana + 3
if(attack == "normal attack"):
if(playerAttack<=monsterDefence):
print("Your attack didn't work because Artocarpus Heterophyllus has a denfence of " + str(monsterDefence))
t.sleep(1)
if(playerAttack>monsterDefence):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work because Artocarpus Heterophyllus was so fast.")
else:
print("You did an attack of " + str(playerAttack))
monsterBlood = monsterBlood - playerAttack
t.sleep(1)
print("Artocarpus Heterophyllus's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
dice = r.randint(1,100)
if(dice<=playerSpeed):
print("Artocarpus Heterophyllus's attack didn't work because you are so fast")
t.sleep(1)
else:
print("Artocarpus Heterophyllus did an attack of " + str(monsterAttack))
t.sleep(1)
if(monsterAttack<=playerDefence):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>playerDefence):
print("The attack works because your defence wasn't big enough.")
playerBlood = playerBlood - monsterAttack
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Artocarpus Heterophyllus, Congratulations!")
if(playerBlood<=0):
pass
t.sleep(3)
break
if(playerBlood<=0):
print("Well, keep on fighting.")
break
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
mBlood = 180
mMana = 15
mAttack = 18
mDefence = 16
mSpeed = 8
mAbility = " "
mSkill = "quick growth"
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
print("----------separatrix----------")
print("Wait, did you notice something wrong?")
t.sleep(3)
print("I think you should find out that we did not collect the booty from the last monster.")
t.sleep(3)
print("The booty should be automatically collected, except---")
t.sleep(3)
print("THE MONSTER IS STILL ALIVE!!!")
t.sleep(3)
print("There comes the real monster,same info as before.")
while(playerBlood>=0 or monsterBlood>=0):
attack = input("Your turn: ")
monsterMana = monsterMana + 3
if(attack == "normal attack"):
if(playerAttack<=monsterDefence):
print("Your attack didn't work because Artocarpus Heterophyllus has a denfence of " + str(monsterDefence))
t.sleep(1)
if(playerAttack>monsterDefence):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work because Artocarpus Heterophyllus was so fast.")
else:
print("You did an attack of " + str(playerAttack))
monsterBlood = monsterBlood - playerAttack
t.sleep(1)
print("Artocarpus Heterophyllus's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
if(monsterMana>=30):
print("Artocarpus Heterophyllus used quick growth. Its blood increased by 60.")
monsterBlood = monsterBlood + 60
monsterMana = monsterMana - 30
t.sleep(1)
dice = r.randint(1,100)
if(dice<=playerSpeed):
print("Artocarpus Heterophyllus's attack didn't work because you are so fast")
t.sleep(1)
else:
print("Artocarpus Heterophyllus did an attack of " + str(monsterAttack))
t.sleep(1)
if(monsterAttack<=playerDefence):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>playerDefence):
print("The attack works because your defence wasn't big enough.")
playerBlood = playerBlood - monsterAttack
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Artocarpus Heterophyllus, Congratulations!")
if(playerBlood<=0):
pass
count = 0
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print("-You got a copper weapon.")
t.sleep(3)
break
if(playerBlood<=0):
print("Well, at least you tried.")
break
print("----------separatrix----------")
print("That was a hard fighting, right?")
t.sleep(3)
print("You must be so strong and brilliant to beat 5 monsters together when you are at level three.")
t.sleep(3)
print("Let's check your booty.")
t.sleep(3)
print("Your level has gone up.")
t.sleep(3)
level = level + 2
print("Your current level is",level)
t.sleep(3)
print("Your information has been updated.")
t.sleep(3)
if(career == "assassin"):
Blood = Blood + 4
dict_assassin['Blood'] = Blood
Attack = Attack + 8
dict_assassin['Attack'] = Attack
Speed = Speed + 6
dict_assassin['Speed'] = Speed
Invisibility = Invisibility + 4
dict_assassin['Invisibility'] = Invisibility
print(dict_assassin)
if(career == "archer"):
Blood = Blood + 8
dict_archer['Blood'] = Blood
Attack = Attack + 10
dict_archer['Attack'] = Attack
Speed = Speed + 8
dict_archer['Speed'] = Speed
Accuracy = Accuracy + 8
dict_archer['Accuracy'] = Accuracy
print(dict_archer)
if(career == "warrior"):
Blood = Blood + 20
dict_warrior['Blood'] = Blood
Attack = Attack + 4
dict_warrior['Attack'] = Attack
Defence = Defence + 8
dict_warrior['Defence'] = Defence
Crit = Crit + 4
dict_warrior['Crit'] = Crit
print(dict_warrior)
if(career == "sorcerer"):
Mana = Mana + 14
dict_sorcerer['Mana'] = Mana
Attack = Attack + 10
dict_sorcerer['Attack'] = Attack
Defence = Defence + 6
dict_sorcerer['Defence'] = Defence
Regeneration = Regeneration + 8
dict_sorcerer['Regeneration'] = Regeneration
print(dict_sorcerer)
t.sleep(3)
print("----------separatrix----------")
print("Since you're at level 5, you can get another skill.")
assassin_skill = ["quick attack", "double attack", "parry"]
archer_skill = ["ice arrow", "fire arrow", "electric arrow"]
warrior_skill = ["leap attack", "hard attack", "parry"]
sorcerer_skill = ["fire ball", "fire pillar", "healing"]
t.sleep(3)
print("One skill that you would get among these three are:")
t.sleep(3)
if(career == assassin):
print(assassin_skill)
new_skill = r.choice(assassin_skill)
if(career == archer):
print(archer_skill)
new_skill = r.choice(archer_skill)
if(career == warrior):
print(warrior_skill)
new_skill = r.choice(warrior_skill)
if(career == sorcerer):
print(sorcerer_skill)
new_skill = r.choice(sorcerer_skill)
print("They are all good skills, but I cannot decide for you.")
t.sleep(3)
print("Hmmmmmm, let the fate decide for you.")
t.sleep(3)
print("Your new skill would be", new_skill)
t.sleep(3)
Skill = Skill + new_skill
print("Check the information:")
quick_attack = {'Level': 1, 'Mana cost': 3, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "During next attack, your enemy will get a reduction of (4) on speed"}
double_attack = {'Level': 1, 'Mana cost': 4, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "After the first attack, one extra attack of {Attack*(0.4)}+{2} will be followed"}
parry = {'Level': 1, 'Mana cost': 0, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "Let the next front attack become useless unless the attack is linked with other effects."}
ice_arrow = {'Level': 1, 'Mana cost': 2, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "Decrease enemies' speed by (1) and cause a damage of {Attack*(1.2)}"}
fire_arrow = {'Level': 1, 'Mana cost': 3, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "Cause an damage of {Attack*(1.2)} and 3 following damages of {Attack*(0.1)}"}
electric_arrow = {'Level': 1, 'Mana cost': 4, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "Cause an damage of {Attack*(1.2)} and probably a percentage of {Speed/Attack + Mana} to cause a damage of {Attack*(5)}"}
leap_attack = {'Level': 1, 'Mana cost': 2, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "Has a percentage of {Attack/Speed + (2)} to stop enemies' next attack while attacking"}
hard_attack = {'Level': 1, 'Mana cost': 4, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "Provide a extra attack of {Attack*(0.3)} that must hit expect especial condition"}
fire_ball = {'Level': 1, 'Mana cost': 8, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "Cause an damage of {Mana*(0.3)+Attack*(0.3)}"}
fire_pillar = {'Level': 1, 'Mana cost': 15, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "Cause an damage of {Mana*(0.5)+Attack*(0.4)} and a effect of 'blow up'"}
healing = {'Level': 1, 'Mana cost': 20, 'Level required': 5, 'Career required': "N/A", 'Race required': "N/A", 'Function': "Add {Blood*(0.2)} of blood"}
if(new_skill == "quick attack"):
print(quick_attack)
t.sleep(3)
elif(new_skill == "double attack"):
print(double_attack)
t.sleep(3)
elif(new_skill == "parry"):
print(parry)
t.sleep(3)
elif(new_skill == "ice arrow"):
print(ice_arrow)
t.sleep(3)
elif(new_skill == "fire arrow"):
print(fire_arrow)
t.sleep(3)
elif(new_skill == "electric arrow"):
print(electric_arrow)
t.sleep(3)
elif(new_skill == "leap attack"):
print(leap_attack)
t.sleep(3)
elif(new_skill == "hard attack"):
print(hard_attack)
t.sleep(3)
elif(new_skill == "fire ball"):
print(fire_ball)
t.sleep(3)
elif(new_skill == "fire pillar"):
print(fire_pillar)
t.sleep(3)
elif(new_skill == "healing"):
print(healing)
t.sleep(3)
print("----------separatrix----------")
print("Don't you think that this kind of fighting is boring?")
t.sleep(3)
print("There's no chanllenges and excitement.")
t.sleep(3)
print("Acutally, that's not even called as fighting.")
t.sleep(3)
print("To help you pass your novice stage, I actually changed your penetration datas and resistance datas to 100%.")
t.sleep(3)
print("That's why your attack made a lot of damage on the monsters.")
t.sleep(3)
print("Now, your novice stage is ended. You need to face the real fight.")
t.sleep(3)
print("In the following fight, every attack from you and your enemies would be affected by penetration, physical resistance, magical resistance, spirtual resistance and abnormal resistance.")
t.sleep(3)
print("Penetration can help you to decrease your enemies' defence.")
t.sleep(3)
print("Physical resistance can decrease the effect of conditions like repel or blow up. For example, blow up might decrease your defence and speed but the resistance can reduce the decreasement.")
t.sleep(3)
print("Magical resistance can decrease the upcoming conditions or damages like burning or paralysis.")
t.sleep(3)
print("Spiritual resistance can decrease the effect of conditions like demoralization or decreasement of accuracy.")
t.sleep(3)
print("Abnormal resistance can decrease the effect of conditions like attack-decrease or defence-decrease.")
t.sleep(3)
print("Penetration would work by decreasing enemies' defence when you attack. Resistances would work by decreasing enemies' attack that after subtracting defence. However, penetration can eliminate all the defence for a while but resistance has a minimum of 1.")
t.sleep(3)
print("In case you forget all your data, I've made a chart for you.")
t.sleep(3)
if(career == "assassin"):
Physical_resistance = 2
dict_assassin['Physical resistance'] = Physical_resistance
Magical_resistance = 1
dict_assassin['Magical resistance'] = Magical_resistance
Spiritual_resistance = 1
dict_assassin['Spiritual resistance'] = Spiritual_resistance
Abnormal_resistance = 0
dict_assassin['Abnormal resistance'] = Abnormal_resistance
Penetration = 6
dict_assassin['Penetration'] = Penetration
print(dict_assassin)
if(career == "archer"):
Physical_resistance = 1
dict_archer['Physical resistance'] = Physical_resistance
Magical_resistance = 2
dict_archer['Magical resistance'] = Magical_resistance
Spiritual_resistance = 1
dict_archer['Spiritual resistance'] = Spiritual_resistance
Abnormal_resistance = 1
dict_archer['Abnormal resistance'] = Abnormal_resistance
Penetration = 4
dict_archer['Penetration'] = Penetration
print(dict_archer)
if(career == "warrior"):
Physical_resistance = 4
dict_assassin['Physical resistance'] = Physical_resistance
Magical_resistance = 2
dict_assassin['Magical resistance'] = Magical_resistance
Spiritual_resistance = 1
dict_assassin['Spiritual resistance'] = Spiritual_resistance
Abnormal_resistance = 0
dict_assassin['Abnormal resistance'] = Abnormal_resistance
Penetration = 4
dict_assassin['Penetration'] = Penetration
print(dict_warrior)
if(career == "sorcerer"):
Physical_resistance = 0
dict_assassin['Physical resistance'] = Physical_resistance
Magical_resistance = 2
dict_assassin['Magical resistance'] = Magical_resistance
Spiritual_resistance = 2
dict_assassin['Spiritual resistance'] = Spiritual_resistance
Abnormal_resistance = 2
dict_assassin['Abnormal resistance'] = Abnormal_resistance
Penetration = 2
dict_assassin['Penetration'] = Penetration
print(dict_sorcerer)
draw.data_showing_player()
t.sleep(5)
print("----------separatrix----------")
print("After introducing so many things, I bet you are eager to fight.")
t.sleep(3)
print("Try this one, it's called Fighting bull")
t.sleep(3)
dict_fighting_bull = {'Name': "Fighting bull", 'Level': 9, 'Race': "cow", 'Rank': "normal", 'Blood': 160, 'Mana': 24, 'Attack': 28, 'Defence': 20, 'Speed': 1,
'Ability': " ",'Skill': "let the fight continues(fighting bull regenerate its blood by 5%)",
'Physical resistance': 4, 'Magical resistance': 4, 'Spiritual resistance': 0, 'Abnormal resistance': 4, 'Penetration': 2}
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
playerPhysical_resistance = Physical_resistance
playerMagical_resistance = Magical_resistance
playerSpiritual_resistance = Spiritual_resistance
playerAbnormal_resistance = Abnormal_resistance
playerPenetration = Penetration
mBlood = 160
mMana = 24
mAttack = 28
mDefence = 20
mSpeed = 1
mAbility = " "
mSkill = "let the fight continues(fighting bull regenerate its blood by 5%)"
mPhysical_resistance = 4
mMagical_resistance = 4
mSpiritual_resistance = 0
mAbnormal_resistance = 4
mPenetration = 2
mLevel = 9
mRank = "Normal"
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
monsterPhysical_resistance = mPhysical_resistance
monsterMagical_resistance = mMagical_resistance
monsterSpiritual_resistance = mSpiritual_resistance
monsterAbnormal_resistance = mAbnormal_resistance
monsterPenetration = mPenetration
condition = " "
print("Here's the information:", dict_fighting_bull)
t.sleep(3)
print("Go and win the battle.")
print("----------separatrix----------")
while(playerBlood>=0 or monsterBlood>=0):
attack = input("Your turn: ")
dice = r.randint(1,100)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
if(dice<=Crit and career == "warrior"):
print("You have triggered crit. Your attack will be double during the next attack.")
t.sleep(1)
playerAttack = playerAttack*2
print("Your current attack is " + playerAttack)
t.sleep(1)
dice = r.randint(1,100)
if(dice<=Accuracy and career == "archer"):
print("You have triggered accuracy. Your penetration will be double during the next attack.")
t.sleep(1)
playerPenetration = playerPenetration*2
print("Your current speed is " + playerPenetration)
t.sleep(1)
if(attack == "normal attack"):
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
elif(attack == "quick attack" and playerMana >= 3 and new_skill == "quick attack"):
print("You used quick attack.")
playerMana = playerMana - 3
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
print("Fighting bull's speed decrease by 4.")
t.sleep(1)
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-4)):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
monsterSpeed = mSpeed
elif(attack == "double attack" and playerMana >= 4 and new_skill == "double attack"):
print("You used double attack.")
playerMana = playerMana - 4
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-4)):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
print("You cause an extra attack of", str(playerAttack*0.4 + 2))
t.sleep(1)
extra_damage = playerAttack*0.4 + 2
if((extra_damage + playerPenetration) > monsterPhysical_resistance):
monsterBlood = monsterBlood - (extra_damage - monsterPhysical_resistance + playerPenetration)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
elif((extra_damage + playerPenetration) <= monsterPhysical_resistance):
print("Fighting bull has a high physical resistance. The extra attack did not work")
t.sleep(1)
elif(attack == "parry" and new_skill == "parry"):
print("You used parry.")
t.sleep(1)
condition = "parry"
elif(attack == "ice arrow" and playerMana >= 2 and new_skill == "ice arrow"):
print("You used ice arrow.")
playerMana = playerMana - 2
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
print("Fighting bull's speed decrease by 1.")
t.sleep(1)
if(playerAttack*1.2 <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack*1.2 > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-1)):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*1.2 - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*1.2 - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
monsterSpeed = mSpeed
elif(attack == "fire arrow" and playerMana >= 3 and new_skill == "fire arrow"):
print("You used fire arrow.")
playerMana = playerMana - 3
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
print("Fighting bull has gained a condition: burning")
condition = "fire"
buring_routine = 3
t.sleep(1)
if(playerAttack*1.2 <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack*1.2 > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-1)):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*1.2 - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*1.2 - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "electric arrow" and playerMana >= 4 and new_skill == "electric arrow"):
print("You used electric arrow.")
playerMana = playerMana - 4
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if(playerAttack*1.2 <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack*1.2 > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-1)):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*1.2 - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*1.2 - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
dice = r.randint(1,100)
if(dice <= (Speed/Attack + Mana)):
print("You have successfully triggered the lighting stroke attack.")
t.sleep(1)
if((playerAttack*5 + playerPenetration) > monsterMagical_resistance):
monsterBlood = monsterBlood - (playerAttack*5 - monsterMagical_resistance + playerPenetration)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
elif((playerAttack*5 + playerPenetration) <= monsterMagical_resistance):
print("Fighting bull has a high Magical resistance. The buring did not work")
t.sleep(1)
elif(attack == "leap attack" and playerMana >= 2 and new_skill == "leap attack"):
print("You used leap attack.")
playerMana = playerMana - 2
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
condition = "jump"
elif(attack == "hard attack" and playerMana >= 4 and new_skill == "hard attack"):
print("You used hard attack.")
playerMana = playerMana - 4
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice <= monsterSpeed):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
print("You cause an extra attack of " + str(playerAttack*0.3))
monsterBlood = monsterBlood - playerAttack*0.3
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "fire ball" and playerMana >= 8 and new_skill == "fire ball"):
print("You used fire ball.")
playerMana = playerMana - 8
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if((playerAttack*0.3 + Mana*0.3) <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif((playerAttack*0.3 + Mana*0.3) > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice <= monsterSpeed):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*0.3 + Mana*0.3 - monsterMagical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*0.3 + Mana*0.3 - monsterMagical_resistance + playerPenetration)
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "fire pillar" and playerMana >= 15 and new_skill == "fire pillar"):
print("You used fire pillar.")
playerMana = playerMana - 15
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if((playerAttack*0.4 + Mana*0.5) <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Fighting bull has a denfence of " + str(monsterDefence))
t.sleep(1)
elif((playerAttack*0.4 + Mana*0.5) > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice <= monsterSpeed):
print("Your attack didn't work cause Fighting bull was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*0.4 + Mana*0.5 - monsterMagical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*0.4 + Mana*0.5 - monsterMagical_resistance + playerPenetration)
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
print("You blow up Fighting bull, its defence, attack and speed decreased a little.")
monsterDefence = monsterDefence*0.95
monsterAttack = monsterAttack*0.95
monsterSpeed = monsterSpeed*0.95
t.sleep(1)
elif(attack == "healing" and playerMana >= 20 and new_skill == "healing"):
print("You used healing.")
playerMana = playerMana - 20
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
print("You heal yourself by 20%.")
playerBlood = Blood*0.2 + playerBlood
t.sleep(1)
else:
print("Incompletable operation, please check if your mana is enough or you are entering the correct skill.")
t.sleep(1)
if(condition == "fire" and burning_routine > 0):
print("Fighting bull is burning.")
t.sleep(1)
burning_routine = burning_routine - 1
if(playerAttack*0.1 + playerPenetration > monsterMagical_resistance):
monsterBlood = monsterBlood - (playerAttack*0.1 - monsterMagical_resistance + playerPenetration)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
elif(playerAttack*0.1 + playerPenetration <= monsterMagical_resistance):
print("Fighting bull has a high Magical resistance. The buring did not work")
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Fighting bull, Congratulations!")
t.sleep(1)
count = 0
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print("-You got a green pearl.")
t.sleep(3)
break
dice = r.randint(1,100)
if(dice<=Invisibility and career == "assassin"):
print("You have triggered invisibility. Your speed will be double during the next attack.")
t.sleep(1)
playerSpeed = playerSpeed*2
print("Your current speed is " + playerSpeed)
t.sleep(1)
if(monsterMana>=12 and monsterBlood <= mBlood*0.5):
monsterMana = monsterMana - 12
print("Fighting bull used let fight continues, it regenerates it blood by 5%")
monsterBlood = mBlood*0.05 + monsterBlood
t.sleep(1)
print("Fighting bull's blood = " + str(monsterBlood))
t.sleep(1)
dice = r.randint(1,100)
if(dice<=playerSpeed):
print("Fighting bull's attack didn't work because you are so fast")
t.sleep(1)
else:
if(condition == "parry"):
print("Fighting bull's attack did not work.")
t.sleep(1)
condition = ""
elif(condition == "jump"):
dice = r.randint(1,100)
if(dice <= (playerAttack/playerSpeed + 2)):
print("Fighting bull did not hit you while you jump up.")
else:
print("Fighting bull did an attack of " + str(monsterAttack - playerPhysical_resistance + monsterPenetration))
t.sleep(1)
if(monsterAttack<=(playerDefence-monsterPenetration)):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>(playerDefence-monsterPenetration)):
print("Your defence was not big enough.")
playerBlood = playerBlood - (monsterAttack - playerPhysical_resistance + monsterPenetration)
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
else:
print("Fighting bull did an attack of " + str(monsterAttack - playerPhysical_resistance + monsterPenetration))
t.sleep(1)
if(monsterAttack<=(playerDefence-monsterPenetration)):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>(playerDefence-monsterPenetration)):
print("Your defence was not big enough.")
playerBlood = playerBlood - (monsterAttack - playerPhysical_resistance + monsterPenetration)
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
playerSpeed = Speed
playerAttack = Attack
playerPenetration = Penetration
if(career == "sorcerer" and playerMana<Mana):
print("You have triggered regeneration. Your mana regenerate " + Regeneration)
playerMana = playerMana + Regeneration
t.sleep(1)
if(playerMana >Mana):
playerMana = Mana
print("Your current mana is " + playerMana)
t.sleep(1)
else:
print("Your current mana is " + playerMana)
t.sleep(1)
if(playerBlood<=0):
print("Well, I didn't know you are such weak")
t.sleep(3)
break
print("----------separatrix----------")
draw.green_pearl()
print("Your level has gone up.")
t.sleep(3)
level = level + 1
print("Your current level is",level)
t.sleep(3)
print("You got a chance to improve your data.")
t.sleep(3)
print("This time, we decided not to interpret your growth.")
t.sleep(3)
print("You can choose which aspects you want to improve.")
t.sleep(3)
print("You can add all on one aspects, like attack or speed.")
t.sleep(3)
print("Or you can add them equally to every aspect.")
t.sleep(3)
print("Currently, you cannot add any point to your special range, resistances and penetration.")
t.sleep(3)
print("Now, I suppose you are quite unfamiliar to this right?")
t.sleep(3)
print("In case this happens, I have already prepared some ways of adding.")
t.sleep(3)
print("Those way might not be the best ones, but they definitely are the most suitable ones.")
t.sleep(3)
print("By the way, the sum of adding is 10 points. Every point added on blood would make a increase of 5 on blood.")
t.sleep(3)
print("----------separatrix----------")
t.sleep(3)
if(career == "assassin"):
print("This is your original data.")
t.sleep(3)
print(dict_assassin)
dict_assassin['Blood'] = Blood + 5
dict_assassin['Mana'] = Mana + 1
dict_assassin['Attack'] = Attack + 4
dict_assassin['Speed'] = Speed + 4
t.sleep(3)
print("This is your current data.")
t.sleep(3)
print(dict_assassin)
t.sleep(3)
if(career == "archer"):
print("This is your original data.")
t.sleep(3)
print(dict_archer)
dict_archer['Blood'] = Blood + 5
dict_archer['Mana'] = Mana + 2
dict_archer['Attack'] = Attack + 3
dict_archer['Defence'] = Defence + 2
dict_archer['Speed'] = Speed + 2
t.sleep(3)
print("This is your current data.")
t.sleep(3)
print(dict_archer)
t.sleep(3)
if(career == "warrior"):
print("This is your original data.")
t.sleep(3)
print(dict_warrior)
dict_warrior['Blood'] = Blood + 15
dict_warrior['Attack'] = Attack + 3
dict_warrior['Defence'] = Defence + 4
t.sleep(3)
print("This is your current data.")
t.sleep(3)
print(dict_warrior)
t.sleep(3)
if(career == "sorcerer"):
print("This is your original data.")
t.sleep(3)
print(dict_sorcerer)
dict_sorcerer['Mana'] = Mana + 5
dict_sorcerer['Attack'] = Attack + 3
dict_sorcerer['Speed'] = Speed + 2
t.sleep(3)
print("This is your current data.")
t.sleep(3)
print(dict_sorcerer)
t.sleep(3)
decide_data1 = input("If you like it, type yes. If you don't like it, type no and we shall let you decide for youself:")
t.sleep(3)
if(decide_data1 == "yes"):
print("Congretulations, you made a good choice.")
t.sleep(3)
if(career == "assassin"):
Blood = Blood + 5
Mana = Mana + 1
Attack = Attack + 4
Defence = Defence + 4
if(career == "archer"):
Blood = Blood + 5
Mana = Mana + 2
Attack = Attack + 3
Defence = Defence + 2
Speed = Speed + 2
if(career == "warrior"):
Blood = Blood + 15
Attack = Attack + 3
Defence = Defence + 4
if(carrer == "sorcerer"):
Mana = Mana + 5
Attack = Attack + 3
Defence = Defence + 2
if(decide_data1 == "no"):
if(career == "assassin"):
dict_assassin["Blood"] = Blood
dict_assassin["Mana"] = Mana
dict_assassin["Attack"] = Attack
dict_assassin["Speed"] = Speed
if(career == "archer"):
dict_archer['Blood'] = Blood
dict_archer['Mana'] = Mana
dict_archer['Attack'] = Attack
dict_archer['Defence'] = Defence
dict_archer['Speed'] = Speed
if(career == "warrior"):
dict_warrior['Blood'] = Blood
dict_warrior['Attack'] = Attack
dict_warrior['Defence'] = Defence
if(career == "sorcerer"):
dict_sorcerer['Mana'] = Mana
dict_sorcerer['Attack'] = Attack
dict_sorcerer['Speed'] = Speed
print("Well, we agree your choice, but I strongly suggest that you use the given way.")
t.sleep(3)
print("Alright then, type the name of the data and the points you want to add. Make sure they are next to each other without any space.")
t.sleep(3)
print("----------separatrix----------")
total_point = 10
actual_point = 10
while(actual_point >= 0):
nd = input("")
if(nd.startswith("B") or nd.startswith("b")):
if(nd.endswith("1")):
total_point = total_point - 1
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("2")):
total_point = total_point - 2
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("3")):
total_point = total_point - 3
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("4")):
total_point = total_point - 4
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("5")):
total_point = total_point - 5
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("6")):
total_point = total_point - 6
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("7")):
total_point = total_point - 7
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("8")):
total_point = total_point - 8
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("9")):
total_point = total_point - 9
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.startswith("M") or nd.startswith("m")):
if(nd.endswith("1")):
total_point = total_point - 1
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("2")):
total_point = total_point - 2
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("3")):
total_point = total_point - 3
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("4")):
total_point = total_point - 4
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("5")):
total_point = total_point - 5
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("6")):
total_point = total_point - 6
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("7")):
total_point = total_point - 7
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("8")):
total_point = total_point - 8
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("9")):
total_point = total_point - 9
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.startswith("A") or nd.startswith("a")):
if(nd.endswith("1")):
total_point = total_point - 1
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("2")):
total_point = total_point - 2
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("3")):
total_point = total_point - 3
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("4")):
total_point = total_point - 4
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("5")):
total_point = total_point - 5
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("6")):
total_point = total_point - 6
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("7")):
total_point = total_point - 7
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("8")):
total_point = total_point - 8
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("9")):
total_point = total_point - 9
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.startswith("D") or nd.startswith("d")):
if(nd.endswith("1")):
total_point = total_point - 1
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("2")):
total_point = total_point - 2
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("3")):
total_point = total_point - 3
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("4")):
total_point = total_point - 4
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("5")):
total_point = total_point - 5
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("6")):
total_point = total_point - 6
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("7")):
total_point = total_point - 7
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("8")):
total_point = total_point - 8
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("9")):
total_point = total_point - 9
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.startswith("S") or nd.startswith("s")):
if(nd.endswith("1")):
total_point = total_point - 1
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("2")):
total_point = total_point - 2
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("3")):
total_point = total_point - 3
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("4")):
total_point = total_point - 4
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("5")):
total_point = total_point - 5
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("6")):
total_point = total_point - 6
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("7")):
total_point = total_point - 7
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("8")):
total_point = total_point - 8
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(nd.endswith("9")):
total_point = total_point - 9
print("The total point you have right now is" + str(total_point))
t.sleep(1)
if(total_point >= 0):
actual_point = total_point
print("You still get " + str(actual_point) + " points")
if(nd.startswith("B") or nd.startswith("b")):
Blood = Blood + (10 - actual_point)*5
if(career == "assassin"):
dict_assassin["Blood"] = Blood
if(career == "archer"):
dict_archer["Blood"] = Blood
if(career == "warrior"):
dict_warrior["Blood"] = Blood
if(career == "sorcerer"):
dict_sorcerer["Blood"] = Blood
if(nd.startswith("M") or nd.startswith("m")):
Blood = Blood + (10 - actual_point)*5
if(career == "assassin"):
dict_assassin["Blood"] = Mana
if(career == "archer"):
dict_archer["Blood"] = Mana
if(career == "warrior"):
dict_warrior["Blood"] = Mana
if(career == "sorcerer"):
dict_sorcerer["Blood"] = Mana
if(nd.startswith("A") or nd.startswith("a")):
Blood = Blood + (10 - actual_point)*5
if(career == "assassin"):
dict_assassin["Blood"] = Attack
if(career == "archer"):
dict_archer["Blood"] = Attack
if(career == "warrior"):
dict_warrior["Blood"] = Attack
if(career == "sorcerer"):
dict_sorcerer["Blood"] = Attack
if(nd.startswith("D") or nd.startswith("d")):
Blood = Blood + (10 - actual_point)*5
if(career == "assassin"):
dict_assassin["Blood"] = Defence
if(career == "archer"):
dict_archer["Blood"] = Defence
if(career == "warrior"):
dict_warrior["Blood"] = Defence
if(career == "sorcerer"):
dict_sorcerer["Blood"] = Defence
if(nd.startswith("S") or nd.startswith("s")):
Blood = Blood + (10 - actual_point)*5
if(career == "assassin"):
dict_assassin["Blood"] = Speed
if(career == "archer"):
dict_archer["Blood"] = Speed
if(career == "warrior"):
dict_warrior["Blood"] = Speed
if(career == "sorcerer"):
dict_sorcerer["Blood"] = Speed
t.sleep(1)
if(actual_point == 0):
print("You have used all your points.")
t.sleep(1)
break
if(total_point < 0):
print("Your point is not enough.")
total_point = actual_point
t.sleep(1)
if(career == "assassin"):
print(dict_assassin)
t.sleep(1)
if(career == "archer"):
print(dict_archer)
t.sleep(1)
if(career == "warrior"):
print(dict_warrior)
t.sleep(1)
if(career == "sorcerer"):
print(dict_sorcerer)
t.sleep(1)
print("----------separatrix----------")
print("Do you still remember that you have gain a copper weapon by killing Artocarpus Heterophyllus?")
t.sleep(3)
print("A copper weapon could provide an extra attack of 5 for you.")
t.sleep(3)
print("This is the information of the copper weapon.")
t.sleep(3)
dict_noob_weapon_amplify = {'Blood': 0, 'Mana': 0, 'Attack': 10, 'Defence': 0, 'Speed': 0,
'Physical resistance': 0, 'Magical resistance': 0, 'Spiritual resistance': 0, 'Abnormal resistance': 0, 'Penetration': 0}
dict_noob_weapon = {'Name': "noob weapon", 'Intensification': 0, 'Career require': "N/A", 'Race require': "N/A", 'Level require': 5, 'Rank': "Copper", 'Durability': -1,
'Amplification': dict_noob_weapon_amplify, 'Extra effect': "N/A"}
noob_weapon_durability = dict_noob_weapon_amplify["Durability"]
print(dict_noob_weapon)
t.sleep(3)
Attack = Attack + dict_noob_weapon_amplify["Attack"]
print("Every weapon is valued by their ranks.")
t.sleep(3)
print("From the lowest to highest, they are: copper, silver, gold, diamond, obsidian, star and god.")
t.sleep(3)
print("This is different from the ranking of monsters, which are: normal, crack, elite, suzerain, royal, disaster and ancestor.")
t.sleep(3)
print("Now, let's try to beat a crack monster.")
t.sleep(3)
dict_iron_falcon = {'Name': "Fighting bull", 'Level': 4, 'Race': "falcon", 'Rank': "crack", 'Blood': 70, 'Mana': 12, 'Attack': 20, 'Defence': 10, 'Speed': 12,
'Ability': "lacerated wound(every time leave an uncurable wound keeping making damage)",'Skill': "sharp eyes(penetration doubles)",
'Physical resistance': 1, 'Magical resistance': 2, 'Spiritual resistance': 1, 'Abnormal resistance': 1, 'Penetration': 3}
print("Here's the information:", dict_iron_falcon)
t.sleep(3)
playerAttack = Attack
playerBlood = Blood
playerDefence = Defence
playerSpeed = Speed
playerMana = Mana
playerCrit = Crit
playerInvisibility = Invisibility
playerAccuracy = Accuracy
playerRegeneration = Regeneration
playerPhysical_resistance = Physical_resistance
playerMagical_resistance = Magical_resistance
playerSpiritual_resistance = Spiritual_resistance
playerAbnormal_resistance = Abnormal_resistance
playerPenetration = Penetration
mBlood = 70
mMana = 12
mAttack = 20
mDefence = 10
mSpeed = 12
mAbility = "lacerated wound(every time leave an uncurable wound keeping making damage)"
mSkill = "sharp eyes(penetration doubles)"
mPhysical_resistance = 1
mMagical_resistance = 2
mSpiritual_resistance = 1
mAbnormal_resistance = 1
mPenetration = 3
mLevel = 4
mRank = "crack"
monsterAttack = mAttack
monsterBlood = mBlood
monsterDefence = mDefence
monsterSpeed = mSpeed
monsterMana = mMana
monsterAbility = mAbility
monsterSkill = mSkill
monsterPhysical_resistance = mPhysical_resistance
monsterMagical_resistance = mMagical_resistance
monsterSpiritual_resistance = mSpiritual_resistance
monsterAbnormal_resistance = mAbnormal_resistance
monsterPenetration = mPenetration
condition = " "
laceration = 0
print("Go and beat it.")
t.sleep(3)
print("----------separatrix----------")
while(playerBlood>=0 or monsterBlood>=0):
attack = input("Your turn: ")
dice = r.randint(1,100)
if(attack == "this is gary commanding: kill"):
monsterBlood = -Blood
if(dice<=Crit and career == "warrior"):
print("You have triggered crit. Your attack will be double during the next attack.")
t.sleep(1)
playerAttack = playerAttack*2
print("Your current attack is " + playerAttack)
t.sleep(1)
dice = r.randint(1,100)
if(dice<=Accuracy and career == "archer"):
print("You have triggered accuracy. Your penetration will be double during the next attack.")
t.sleep(1)
playerPenetration = playerPenetration*2
print("Your current speed is " + playerPenetration)
t.sleep(1)
if(attack == "normal attack"):
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "charge"):
print("Charging...")
playerAttack = playerAttack*1.2
t.sleep(1)
elif(attack == "quick attack" and playerMana >= 3 and new_skill == "quick attack"):
print("You used quick attack.")
playerMana = playerMana - 3
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
print("Iron falcon's speed decrease by 4.")
t.sleep(1)
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-4)):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
monsterSpeed = mSpeed
elif(attack == "double attack" and playerMana >= 4 and new_skill == "double attack"):
print("You used double attack.")
playerMana = playerMana - 4
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-4)):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
print("You cause an extra attack of", str(playerAttack*0.4 + 2))
t.sleep(1)
extra_damage = playerAttack*0.4 + 2
if((extra_damage + playerPenetration) > monsterPhysical_resistance):
monsterBlood = monsterBlood - (extra_damage - monsterPhysical_resistance + playerPenetration)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
elif((extra_damage + playerPenetration) <= monsterPhysical_resistance):
print("Iron falcon has a high physical resistance. The extra attack did not work")
t.sleep(1)
elif(attack == "parry" and new_skill == "parry"):
print("You used parry.")
t.sleep(1)
condition = "parry"
elif(attack == "ice arrow" and playerMana >= 2 and new_skill == "ice arrow"):
print("You used ice arrow.")
playerMana = playerMana - 2
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
print("Iron falcon's speed decrease by 1.")
t.sleep(1)
if(playerAttack*1.2 <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack*1.2 > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-1)):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*1.2 - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*1.2 - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
monsterSpeed = mSpeed
elif(attack == "fire arrow" and playerMana >= 3 and new_skill == "fire arrow"):
print("You used fire arrow.")
playerMana = playerMana - 3
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
print("Iron falcon has gained a condition: burning")
condition = "fire"
buring_routine = 3
t.sleep(1)
if(playerAttack*1.2 <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack*1.2 > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-1)):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*1.2 - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*1.2 - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "electric arrow" and playerMana >= 4 and new_skill == "electric arrow"):
print("You used electric arrow.")
playerMana = playerMana - 4
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if(playerAttack*1.2 <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack*1.2 > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=(monsterSpeed-1)):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*1.2 - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*1.2 - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
dice = r.randint(1,100)
if(dice <= (Speed/Attack + Mana)):
print("You have successfully triggered the lighting stroke attack.")
t.sleep(1)
if((playerAttack*5 + playerPenetration) > monsterMagical_resistance):
monsterBlood = monsterBlood - (playerAttack*5 - monsterMagical_resistance + playerPenetration)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
elif((playerAttack*5 + playerPenetration) <= monsterMagical_resistance):
print("Iron falcon has a high Magical resistance. The buring did not work")
t.sleep(1)
elif(attack == "leap attack" and playerMana >= 2 and new_skill == "leap attack"):
print("You used leap attack.")
playerMana = playerMana - 2
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice<=monsterSpeed):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
condition = "jump"
elif(attack == "hard attack" and playerMana >= 4 and new_skill == "hard attack"):
print("You used hard attack.")
playerMana = playerMana - 4
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if(playerAttack <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif(playerAttack > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice <= monsterSpeed):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack - monsterPhysical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack - monsterPhysical_resistance + playerPenetration)
t.sleep(1)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
print("You cause an extra attack of " + str(playerAttack*0.3))
monsterBlood = monsterBlood - playerAttack*0.3
t.sleep(1)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "fire ball" and playerMana >= 8 and new_skill == "fire ball"):
print("You used fire ball.")
playerMana = playerMana - 8
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if((playerAttack*0.3 + Mana*0.3) <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif((playerAttack*0.3 + Mana*0.3) > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice <= monsterSpeed):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*0.3 + Mana*0.3 - monsterMagical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*0.3 + Mana*0.3 - monsterMagical_resistance + playerPenetration)
t.sleep(1)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
elif(attack == "fire pillar" and playerMana >= 15 and new_skill == "fire pillar"):
print("You used fire pillar.")
playerMana = playerMana - 15
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
if((playerAttack*0.4 + Mana*0.5) <= (monsterDefence-playerPenetration)):
print("Your attack didn't work because Iron falcon has a denfence of " + str(monsterDefence))
t.sleep(1)
elif((playerAttack*0.4 + Mana*0.5) > (monsterDefence-playerPenetration)):
dice = r.randint(1,100)
if(dice <= monsterSpeed):
print("Your attack didn't work cause Iron falcon was so fast.")
t.sleep(1)
else:
print("You did an attack of " + str(playerAttack*0.4 + Mana*0.5 - monsterMagical_resistance + playerPenetration))
monsterBlood = monsterBlood - (playerAttack*0.4 + Mana*0.5 - monsterMagical_resistance + playerPenetration)
t.sleep(1)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
print("You blow up Iron falcon, its defence, attack and speed decreased a little.")
monsterDefence = monsterDefence*0.95
monsterAttack = monsterAttack*0.95
monsterSpeed = monsterSpeed*0.95
t.sleep(1)
elif(attack == "healing" and playerMana >= 20 and new_skill == "healing"):
print("You used healing.")
playerMana = playerMana - 20
t.sleep(1)
print("Your mana is", playerMana)
t.sleep(1)
print("You heal yourself by 20%.")
playerBlood = Blood*0.2 + playerBlood
t.sleep(1)
else:
print("Incompletable operation, please check if your mana is enough or you are entering the correct skill.")
t.sleep(1)
if(condition == "fire" and burning_routine > 0):
print("Iron falcon is burning.")
t.sleep(1)
burning_routine = burning_routine - 1
if(playerAttack*0.1 + playerPenetration > monsterMagical_resistance):
monsterBlood = monsterBlood - (playerAttack*0.1 - monsterMagical_resistance + playerPenetration)
print("Iron falcon's blood = " + str(monsterBlood))
t.sleep(1)
elif(playerAttack*0.1 + playerPenetration <= monsterMagical_resistance):
print("Iron falcon has a high Magical resistance. The buring did not work")
t.sleep(1)
if(monsterBlood<=0):
print("You have beat Iron falcon, Congratulations!")
t.sleep(1)
result = "win"
count = 0
for i in range(0,101):
print("\r","Booty collecting:{}%".format(count), end = "", flush = True)
t.sleep(0.05)
count = count + 1
print("-You got a silver armor.")
t.sleep(3)
break
dice = r.randint(1,100)
if(dice<=Invisibility and career == "assassin"):
print("You have triggered invisibility. Your speed will be double during the next attack.")
t.sleep(1)
playerSpeed = playerSpeed*2
print("Your current speed is " + playerSpeed)
t.sleep(1)
dice = r.randint(1,100)
if(monsterMana>=12 and dice <= 33):
monsterMana = monsterMana - 12
print("Iron falcon used sharp eyes, its penetration doubled")
monsterPenetration = monsterPenetration*2
t.sleep(1)
dice = r.randint(1,100)
if(dice<=playerSpeed):
print("Iron falcon's attack didn't work because you are so fast")
t.sleep(1)
else:
if(condition == "parry"):
print("Iron falcon's attack did not work.")
t.sleep(1)
condition = ""
elif(condition == "jump"):
dice = r.randint(1,100)
if(dice <= (playerAttack/playerSpeed + 2)):
print("Iron falcon did not hit you while you jump up.")
else:
print("Iron falcon did an attack of " + str(monsterAttack - playerPhysical_resistance + monsterPenetration))
t.sleep(1)
if(monsterAttack<=(playerDefence-monsterPenetration)):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>(playerDefence-monsterPenetration)):
print("Your defence was not big enough.")
playerBlood = playerBlood - (monsterAttack - playerPhysical_resistance + monsterPenetration)
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
print("Iron falcon lacerated a wound on you.")
t.sleep(1)
laceration = laceration + 1
else:
print("Iron falcon did an attack of " + str(monsterAttack - playerPhysical_resistance + monsterPenetration))
t.sleep(1)
if(monsterAttack<=(playerDefence-monsterPenetration)):
print("The attack didn't work because you have a denfence of " + str(playerDefence))
t.sleep(1)
if(monsterAttack>(playerDefence-monsterPenetration)):
print("Your defence was not big enough.")
playerBlood = playerBlood - (monsterAttack - playerPhysical_resistance + monsterPenetration)
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
print("Iron falcon lacerated a wound on you.")
t.sleep(1)
laceration = laceration + 1
if(laceration > 0):
playerBlood = playerBlood - laceration
print("Lacerated wounds bleeding...")
t.sleep(1)
print("Your blood is " + str(playerBlood))
t.sleep(1)
playerSpeed = Speed
playerAttack = Attack
playerPenetration = Penetration
monsterPenetration = mPenetration
if(career == "sorcerer" and playerMana<Mana):
print("You have triggered regeneration. Your mana regenerate " + Regeneration)
playerMana = playerMana + Regeneration
t.sleep(1)
if(playerMana >Mana):
playerMana = Mana
print("Your current mana is " + playerMana)
t.sleep(1)
else:
print("Your current mana is " + playerMana)
t.sleep(1)
if(playerBlood<=0):
print("You lost.")
result = "lose"
t.sleep(3)
break
current_equipment = [dict_noop_weapon]
print("----------separatrix----------")
if(result == "win"):
print("Wow, you must be so professional in fighting with monsters.")
t.sleep(3)
print("This Iron falcon that is a crack monster is at level 4.")
t.sleep(3)
print("Actually, it is as strong as a normal monster that is at level 14.")
t.sleep(3)
print("So, since you beat it, I shall award you with a silver armor.")
t.sleep(3)
print("It can provide you 40 extra blood and 5 extra physical resistance.")
t.sleep(3)
dict_silver_armor_amplify = {'Blood': 40, 'Mana': 0, 'Attack': 0, 'Defence': 0, 'Speed': 0,
'Physical resistance': 5, 'Magical resistance': 0, 'Spiritual resistance': 0, 'Abnormal resistance': 0, 'Penetration': 0}
dict_silver_armor = {'Name': "silver armor", 'Intensification': 0, 'Career require': "N/A", 'Race require': "N/A", 'Level require': 5, 'Rank': "Copper", 'Durability': -1,
'Amplification': dict_silver_armor_amplify, 'Extra effect': "N/A"}
silver_armor_durability = dict_silver_armor_amplify["Durability"]
print(dict_silver_armor)
t.sleep(3)
Blood = Blood + dict_silver_armor_amplify["Blood"]
Physucal_resistance = Physical_resistance + dict_silver_armor_amplify['Physical resistance']
current_equipment.append(dict_silver_armor)
print("Also, your level has gone up.")
t.sleep(3)
level = level + 1
print("Your current level is",level)
t.sleep(3)
print("Your information has been updated.")
t.sleep(3)
if(career == "assassin"):
Blood = Blood + 12
dict_assassin['Blood'] = Blood
Attack = Attack + 16
dict_assassin['Attack'] = Attack
Speed = Speed + 12
dict_assassin['Speed'] = Speed
Invisibility = Invisibility + 4
dict_assassin['Invisibility'] = Invisibility
print(dict_assassin)
if(career == "archer"):
Blood = Blood + 16
dict_archer['Blood'] = Blood
Attack = Attack + 20
dict_archer['Attack'] = Attack
Speed = Speed + 12
dict_archer['Speed'] = Speed
Accuracy = Accuracy + 4
dict_archer['Accuracy'] = Accuracy
print(dict_archer)
if(career == "warrior"):
Blood = Blood + 40
dict_warrior['Blood'] = Blood
Attack = Attack + 18
dict_warrior['Attack'] = Attack
Defence = Defence + 24
dict_warrior['Defence'] = Defence
Crit = Crit + 4
dict_warrior['Crit'] = Crit
print(dict_warrior)
if(career == "sorcerer"):
Mana = Mana + 28
dict_sorcerer['Mana'] = Mana
Attack = Attack + 20
dict_sorcerer['Attack'] = Attack
Defence = Defence + 12
dict_sorcerer['Defence'] = Defence
Regeneration = Regeneration + 4
dict_sorcerer['Regeneration'] = Regeneration
print(dict_sorcerer)
elif(result == "lose"):
print("Well, I did not expect you to behave as strong as I thought you would be.")
t.sleep(3)
print("Please do not be disdheartened.")
t.sleep(3)
print("No matter how, this is your first time fighting with a crack monster.")
t.sleep(3)
print("Your level has gone up.")
t.sleep(3)
level = level + 1
print("Your current level is",level)
t.sleep(3)
print("Your information has been updated.")
t.sleep(3)
if(career == "assassin"):
Blood = Blood + 10
dict_assassin['Blood'] = Blood
Attack = Attack + 14
dict_assassin['Attack'] = Attack
Speed = Speed + 10
dict_assassin['Speed'] = Speed
Invisibility = Invisibility + 4
dict_assassin['Invisibility'] = Invisibility
print(dict_assassin)
if(career == "archer"):
Blood = Blood + 14
dict_archer['Blood'] = Blood
Attack = Attack + 18
dict_archer['Attack'] = Attack
Speed = Speed + 10
dict_archer['Speed'] = Speed
Accuracy = Accuracy + 4
dict_archer['Accuracy'] = Accuracy
print(dict_archer)
if(career == "warrior"):
Blood = Blood + 36
dict_warrior['Blood'] = Blood
Attack = Attack + 16
dict_warrior['Attack'] = Attack
Defence = Defence + 22
dict_warrior['Defence'] = Defence
Crit = Crit + 4
dict_warrior['Crit'] = Crit
print(dict_warrior)
if(career == "sorcerer"):
Mana = Mana + 24
dict_sorcerer['Mana'] = Mana
Attack = Attack + 18
dict_sorcerer['Attack'] = Attack
Defence = Defence + 12
dict_sorcerer['Defence'] = Defence
Regeneration = Regeneration + 4
dict_sorcerer['Regeneration'] = Regeneration
print(dict_sorcerer)
t.sleep(3)
print("You must be astonished.")
t.sleep(3)
print("Your information improved much bigger than before.")
t.sleep(3)
print("That is reasonable.")
t.sleep(3)
print("Every time you leveled up 5, your data would improve very much.")
t.sleep(3)
print("Now, let's try to beat another monster.")
t.sleep(3)
print("I can tell you what they are, but it's your responsiblity")
并不是完全的程序,但是这点已经可以玩了。基本这里面涵盖了python初学者需要学会的所用的东西。
有一段是生成密码,可以用来借鉴。