You are viewing our Forum Archives. To view or take place in current topics click here.
Some sort of game
Posted:
Some sort of gamePosted:
Status: Offline
Joined: Mar 02, 201410Year Member
Posts: 4,749
Reputation Power: 6057
Status: Offline
Joined: Mar 02, 201410Year Member
Posts: 4,749
Reputation Power: 6057
Something i made over the past day or so. It's fairly bad as its basically the first thing over 20 lines i wrote. Tell me if there's anything wrong with it or if i could make it better
Level = 1
BaseHealth = 200
Health = BaseHealth*0.5 * Level
Armour = 0
BaseDamage = 10
LevelDamage = 1.13** Level
LevelDamagemod = BaseDamage // LevelDamage
Damage = BaseDamage * LevelDamagemod
LevelUpMod = 1.2
EnemyLevel = Level // 0.5
BaseEnemyHealth = 100
EnemyHealth = BaseEnemyHealth*0.7 * EnemyLevel
EnemyBaseDamage = 10
EnemyLevelDamage = 1.13** EnemyLevel
EnemyLevelDamageMod = EnemyBaseDamage // EnemyLevelDamage
EnemyDamage = EnemyBaseDamage * EnemyLevelDamageMod
XP = 0
XPRequired = Level * 100 +50
XPEarned= EnemyLevel * 100 *0.75
Name= input("what is you're hero's name? ")
print("Select Class.")
print("1. Warrior")
print("2. Mage")
print("3. Peasant")
print("4. Archer")
Class= input("Enter Class name ")
if Class == 'Warrior':
print("You have chosen Warrior")
elif Class == 'Mage':
print("You have chosen Mage")
elif Class == 'Peasant':
print("You have chosen Peasant")
elif Class == 'Archer':
print("You have chosen Archer")
else:
print("Please pick a class.")
print("Select Race.")
print("1. Altmer")
print("2. Argonian")
print("3. Bosmer")
print("4. Breton")
print("5. Dunmer")
print("6. Imperial")
print("7. Khajiit")
print("8. Nord")
print("9. Orsimer")
print("10. Redguard")
Race = input("What Race are you? ")
if Race == 'Altmer':
print("You have chosen Altmer")
elif Race == 'Argonian':
print("You have chosen Argonion")
elif Race == 'Bosmer':
print("You have chosen Bosmer")
elif Race == 'Breton':
print("You have chosen Breton")
elif Race == 'Dunmer':
print("You have chosen Dunmer")
elif Race == 'Imperial':
print("You have chosen Imperial")
elif Race == 'Khajiit':
print("You have chosen Khajiit")
elif Race == 'Nord':
print("You have chosen Nord")
elif Race == 'Orsimer':
print("You have chosen Orsimer")
elif Race == 'Redgaurd':
print("You have chosen Redgaurd")
else:
print("Please select a Race")
print("Select a Gender")
print("Male")
print("Female")
Gender = input("Enter gender ")
if Gender == 'Male':
print("You have chosen to be a male")
elif Gender == 'Female':
print("You have chosen to be a Female")
else:
print("Please select a gender")
print("Welcome",Name,",You are a trained",Gender,Class,"from the",Race,"race")
Choice=input("Do you wish to continue? Yes or no ")
if Choice == "yes":
print("Welcome! Set fourth on your adventure")
elif Choice == "no":
print("you coward!")
def Moneytoman():
Moneycount= 1000
print("You have",Moneycount,"coins")
Give = int(input("On your journey down the path you see a homless man. How much Money do you wish to give him? "))
if Give < 1:
print("Thats not nice")
elif Give > 1000:
print("you dont have that much")
Moneytoman()
else:
print("Thanks")
Moneycount= Moneycount - Give
print("You now have",Moneycount, "coins left")
Moneytoman()
Bag = ["A Dagger","A Note","A piece of Rope"]
pickingupbagdecision = input("Further down the path you spot a bag lying on the floor. Press Y to pick it up or N to leave it there ")
if pickingupbagdecision == "Y":
Baglook = input("You picked up the bag, do you want to look inside? Press Y to look inside or press N to wait until later ")
if Baglook == "Y":
print("Inside is a")
print(Bag)
else:
print("we'll look later")
elif pickingupbagdecision == "N":
print("You left the bag on the floor")
runorattack = input("You are approched by a man who instantly lashes out at you. Press R to run or A to attack ")
if runorattack == "A":
if pickingupbagdecision == "Y":
print("The Enemy has", EnemyHealth, "Health")
Daggeruse = input("Press Y to use Dagger")
if Daggeruse == "y":
print("You equipped the Dagger")
Attack = input("Press A to attack! ")
if Attack == "A":
print("You hit the enemy and deal", Damage, "Damage! leaving the enemy with",EnemyHealth - Damage,"Health left")
EH = EnemyHealth - Damage
if EH <= 0:
print("You have defeated the enemy!")
elif EH > 0:
print("The Enemy strikes you and deals", EnemyDamage," Damage! You have", Health - EnemyDamage,"Health left")
YH = Health - EnemyDamage
input("Press A to attack! ")
print("You hit the enemy and deal", Damage, "Damage! leaving the enemy with",EH - Damage,"Health left")
EH1 = EH - Damage
if EH1 <= 0:
print("You have defeated the enemy!")
elif EH1 > 0:
print("The Enemy strikes you and deals", EnemyDamage," Damage! You have", YH - EnemyDamage,"Health left")
YH1 = YH - EnemyDamage
input("Press A to attack! ")
print("You hit the enemy and deal", Damage, "Damage! leaving the enemy with",EH1 - Damage,"Health left")
EH2 = EH1 - Damage
if EH2 <= 0:
print("You have defeated the enemy!")
print("You have gained", XPEarned,"XP")
XP = XP + XPEarned
XPRequired1 = XPRequired - XP
if XPRequired1 <= XPRequired:
Level = Level + 1
print("You have leveled up to level", Level,)
Health = Health * LevelUpMod
Damage = Damage * LevelUpMod
print("health increased to", Health)
print("Damage increased to", Damage)
else:
print("Lets move on")
print("Lets move on")
You are viewing our Forum Archives. To view or take place in current topics click here.