Skip to content

Instantly share code, notes, and snippets.

@Sanokei
Created August 26, 2021 02:55
Show Gist options
  • Save Sanokei/7b7ab7a44d288a67756139b36e9a40da to your computer and use it in GitHub Desktop.
Save Sanokei/7b7ab7a44d288a67756139b36e9a40da to your computer and use it in GitHub Desktop.
#started 12/23/15
#V 1.3.0
#all my imports so i can use them later
import random
#Dice
Dice6 = (1, 2, 3, 4, 5, 6)
TDice6 = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
Dice20 = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
D6 = (random.choice(Dice6))
TD6 = (random.choice(TDice6))
D20 = (random.choice(Dice20))
#Exp and Gold
Exp = 0
Gold = 0
#Weapons and the Strength + boost
Wood_Sword = 2 #+Strength
Stone_Sword = 3 #+Strength
Steel_Sword = 4 #+Strength
Gold_Sword = 5 #+Strength
#Armor and shields and the Health + boost
Wood_Armor = 2 #+Health
Stone_Armor = 3 #+Health
Steel_Armor = 4 #+Health
Gold_Armor = 5 #+Health
#Other
King_Crown = 2 #+Health
Rabbit_Foot= 3 #+Luck
Boots = 2 #+Run
#I did this manually because if i want to control it later i can
RandomA = (2, 3, 4, 5, 6)#Luck and run
RandomB = (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)#Health and Strength
RandomC = (5, 6, 7, 8, 9, 10, 11, 12)
#The random attacks and defence points
Strength = (random.choice(RandomB))
Run = (random.choice(RandomA))
Luck = (random.choice(RandomB))
Health = (random.choice(RandomC))
#Monster Stats
#Chapter 1
RC_Health = (random.choice(RandomA)) #Easy Monster
RC_Strength = (random.choice(RandomA)) #Easy Monster
#Chaper 4
RCH_Health = (random.choice(RandomB)) #Hard Monster
RCH_Strength = (random.choice(RandomB))#Hard Monster
#The stats of the player
print "Before we start you should know your stats"
print "Your Stats:"
#Health
print "Your Health"
print Health
print "max Health is 12, but with armor its more!"
print ""
#Strength
print "Your Strength"
print Strength
print "max Strength is 12, but with weapons its more!"
print ""
#Luck
print "Your luck"
print Luck
print "max Luck is 12"
print ""
#Run
print "If you can run"
print Run
print "max Running is 6"
print ""
print "How Attacking and other stats work in this game is, you roll a pair of dice ranging from D6 to a D20. If your roll a number lower then the stat number then you 'hit'. For example"
print "your Strength is"
print Strength
print "Lets say you roll a"
print Strength - 2
print "then you hit!"
print "but if you roll a"
print Strength + 2
print "for example, you miss! so the higher the stat the better"
print "Remeber!!!VERY IMPORTANT!!! CAPITALIZE the Commands"
print ""
print "You need to Scroll up after questions!"
print ""
print "When it says you died please restart."
print "Lets start!"
print "Chapter 1:The Monster"
#intro
print "Welcome To Adventure Quest To get started What is Your Name?"
Name = raw_input("I'm ")
print "Hello Young %s! The Land Of Adventure awaits. Here take a wooden sword!" %(Name)
print "+2 Strength, Your Strength now is"
print Strength + Wood_Sword
print "" #I did print "" because I want indents
#Story Arch
print "Before you go"
print '"Yes?" %s says' %(Name)
print "I need you to save my daughter the prineses."
print 'You take the quest and go on your mary way.'
print "You walk up the road and"
Random = ("Goblin", "Zombie", "Troll")
Random_Choice = (random.choice(Random))
print "you see a %s up in the distance." %(Random_Choice)
#Ask what the player want they want to do
print ""
print "What do you do? do you Run, Attack, or do Nothing?(Run,Attack,Nothing)"
Command = raw_input("Enter:")
#Every Fight is controlled like this here
#12/30/15
if Command == 'Attack':
print "You decide to Attack!"
print "%s's Stats are:" %(Random_Choice)
print "Its Strength is"
print RC_Strength
print "Its Health is"
print RC_Health
#time to use the dice!
print "You Roll a D6 and its a"
print D6
print "Did you hit it?"
if Strength > D6:
print "Hit"
print ""
print "Now, Lets roll again to see how much damage you inflicted"
print ""
D6 = (random.choice(Dice6))
print "The amount of damage you inflicted to the enemy"
print D6
print "+Wood Sword"
print D6 + Wood_Sword
print "%s's Health is now" %(Random_Choice)
print RC_Health - (D6 + Wood_Sword)
RC_Health = RC_Health - (D6 + Wood_Sword)
elif Strength <= D6:
print "%s It didnt hit!" %(Name)
print ""
print "What do you do? Do you run, or do you do nothing?(Run,Nothing)"
print "You can no longer Attack"
Command = raw_input("Enter:")
if RC_Health <= 0:
print "%s is dead!" %(Random_Choice)
elif RC_Health > 0:
print "%s's turn" %(Random_Choice)
print "%s rolls a D6 and its a" %(Random_Choice)
D6 = (random.choice(Dice6))
print D6
print "did he hit?"
if RC_Strength > D6:
print "Hit"
print ""
print "He rolls again to see how much damage he does."
D6 = (random.choice(Dice6))
print "The amount of damage he does is"
print D6
print "Your Health is now"
Health = Health - D6
print Health
if Health <= 0:
print "You Died!"
print "Game Over"
raise SystemExit
print "What do you do? Do you Run, or do Nothing?(Run,Nothing)"
print "You can no longer attack"
Command = raw_input("Enter:")
#Run
if Command == 'Run':
print "You try to run!"
print "lets roll to see if you can"
print "You roll a D6 and its a"
D6 = (random.choice(Dice6))
print D6
if Run > D6:
print "You Ran Away!"
elif Run <= D6:
print "Your legs were too tired, and you got eaten while you were sleeping."
print "Your Dead!"
print "Game Over"
raise SystemExit
#Nothing
if Command == 'Nothing':
print "You Coward"
print "You do nothing."
print "You got attacked from behind, and sadly died!"
print "Game Over!"
raise SystemExit
print "You got out of there alive!"
print '"That was awesome" %s said to him self' %(Name)
print "Chapter 1:The Monster is over"
#This Chapter took exacly 175 lines of code more to come later!
# 12/31/15
print ""
print "Chapter 2:The Strange Man"
print "You get the basics now, you had your first fight and you got out alive."
print "You feel a evil presence ahead."
print "Do you want to adventure ahead or side off from the road?(Ahead,Side)"
Direction = raw_input("Enter:")
if Direction == 'Ahead':
print "You later go down the road you where going down earlier."
print "You encounter a Strange man."
print "Do you Talk to him, Ask to trade, or walk past?(Talk,Trade,Walk?)"
Strange_Man_Choice = raw_input("Enter:")
if Direction == 'Side':
print "You go off to the of the road."
print "You see a house in the distance, do you Go in or Walk away.(Go,Walk)"
House = raw_input("Enter:")
if House == 'Go':
print "You see a Strange man."
print "Do you Walk away or Talk to him?(Walk,Talk)"
Strange_Man_Choice = raw_input("Enter:")
if House == 'Walk':
print "You try to walk away"
print "Lets roll the D6 to see if you can!"
D6 = (random.choice(Dice6))
print "You roll a"
print D6
if Run > D6:
print "You walked away!"
print "You walk up the road safely"
elif Run <= D6:
print "The Strange man noticed you."
print "Do you Talk or Trade him?(Talk,Trade)"
Strange_Man_Choice = raw_input("Enter:")
if Strange_Man_Choice == 'Walk':
print "You try to walk away"
print "Lets roll the D6 to see if you can!"
D6 = (random.choice(Dice6))
print "You roll a"
print D6
if Run > D6:
print "You walked away!"
print "You walk up the road salfley"
elif Run <= D6:
print "The Strange man noticed you."
print "Do you Talk or Trade him?(Talk, Trade)"
Strange_Man_Choice = raw_input("Enter:")
if Strange_Man_Choice == 'Talk':
print '"Hello?" %s asked.' %(Name)
print '"Hello young one"The man said in a groggy voice'
print '"Do you know what is ahead?" You ask the man'
print '"Yes,Ill Tell you for that wooden sword"The man said"'
print "Do you Trade the man your sword for the information or Threaten him(Trade,Threaten)"
Strange_Man_Choice = raw_input("Enter:")
if Strange_Man_Choice == 'Trade':
print "You Decide to trade your sword for the infomation."
print "-Wooden Sword"
print '"There is a Castle ahead do not at any cost look in the kings eyes. It will Kill you" Said the Strange Man'
print "You Strength is now"
print Strength
if Strange_Man_Choice == 'Trade':
print "You decide to trade!"
print '"I have a Stone Sword to sell you." The Strange man says'
print '"All I have is this Wooden Sword." You mumble'
print '"Well,"The Strange man says you can Gamble it.'
print '"Gamble? umm I"'
print "Do you Gamble or dont?(Gamble,Dont)"
#This is where luck is used!
Gambling = raw_input('Enter:')
if Gambling == 'Gamble':
print "You decide to Gamble!"
print "You need to roll under a"
print Luck
print "ok lets roll"
D6 = (random.choice(Dice6))
print D6
if Luck > D6:
print "You got luck on your side!"
print "-Wooden Sword"
print "your strength is now"
print Strength
print "+Stone Sword"
print "your Strength is now"
print Strength + Stone_Sword
Strength = Strength + Stone_Sword
elif Luck <= D6:
print "You lost!"
print "-Wooden Sword"
print "Your Strength is now"
print Strength
if Gambling == 'Dont':
print "You decide to not Gamble your sword"
if Strange_Man_Choice =='Threaten':
print "You press your sword agaist his neck."
print "But then he disapears!"
print '"WHAT THE *Bleep*?" You say, in a scared manner!'
print 'Right Behind you you here the "Strange man" casting a spell! He is a wizard! You panic do you Run or Fight?(Run,Fight)'
Bad_Idea = raw_input("Enter:")
if Bad_Idea == 'Run':
print "You panically roll a D6."
D6 = (random.choice(Dice6))
print D6
print "Since your legs are shaking from fear you cant run as well. (Run - 2)"
if Run > D6:
print "You ran away safely."
else:
print "You couldn't Run"
print "What do you do? Do you fight?(Fight)"
Bad_Idea = raw_input("Enter:")
if Bad_Idea == 'Fight':
AttackW = ("FireBall", "Lightning Missile", "Magic Missile")
Wiz_Attack = (random.choice(AttackW))
print "You decide to fight!"
print "Wizard goes first!"
print "Wizards stats"
print ""
print "Boss: Level 1"
print "Bosses Strength"
D20 = (random.choice(Dice20))
Boss1S = D20
print D20
print "Max Strength is 20"
print "Bosses Health"
print ""
D20 = (random.choice(Dice20))
Boss1H = D20
print D20
print "Max Health is 20"
print ""
print "Wizard Rolls 2 D6s"
TD6 = (random.choice(TDice20))
print "Wizard Rolls a"
print TD6
print "Did he land the attack?"
if Boss1S > TD6:
print "Hit"
print "He Rolls again to see how much damage he does."
D6 = (random.choice(Dice6))
print "The Wizard Rolls a"
print D6
print "Wizard Shoots a %s at you" %(Wiz_Attack)
print "Your Health is now"
print Health - D6
Health = Health - D6
if Health <= 0:
print "You Died"
print "Game over"
raise SystemExit
else:
print "The Wizard did not hit"
print "Your Turn"
print "Lets Roll."
D6 = (random.choice(Dice6))
print "You Rolled a"
print D6
print "Did you hit?"
if (Strength + Wood_Sword) > D6:
print "Hit"
print "Roll again to see how much damage you do."
D6 = (random.choice(Dice6))
print "You rolled a"
print D6
print "Wizards Health is now"
print Boss1H - D6
print "+Wooden Sword"
print Boss1H - (D6 + Wood_Sword)
Boss1H = Boss1H - (D6 + Wood_Sword)
print Boss1H
if Boss1H <= 0:
print "You killed him!"
print "+10 Gold"
print "+3 Exp"
print "Your gold is now."
Gold + 10
Gold = Gold + 10
print Gold
print ""
print "Your Exp is now."
Exp + 3
Exp = Exp + 3
print Exp
print ""
elif Boss1H >= 0:
print "What do you do? do you Run, or do Nothing?(Run,Nothing)"
print "You can no longer attack"
Command = raw_input("Enter:")
#Run
if Command == 'Run':
print "You try to run!"
print "lets roll to see if you can"
print "You roll a D6 and its a"
D6 = (random.choice(Dice6))
print D6
if Run > D6:
print "You Ran Away!"
elif Run <= D6:
print "Your legs were to tired and you got eaten while sleeping."
print "Your Dead!"
print "Game Over"
raise SystemExit
#Nothing
if Command == 'Nothing':
print "You Coward"
print "You do nothing."
print "You Got attacked from behind and died!"
print "Game Over"
raise SystemExit
print "Chapter 2:The Strange Man is over"
#This took 192 lines of code.
print ""
print"Chapter 3:The Castle"
print "After meeting the man you decide to go up the road."
print "your see a castle up ahead."
print "There looks like theres two ways in."
print "The Bridge or the the Sewers.(Bridge,Sewers)"
Wayin = raw_input('Enter:')
if Wayin == 'Bridge':
print "You Decide to go over the Bridge"
print "You see two knights on each sides. Do you want to Speak or Walk By?(Speak,Walk)"
Knight = raw_input('Enter:')
if Knight == 'Speak':
print '"Hello!"%s asked kindly.' %(Name)
print 'One of the Knights looks over, "What do you need?"'
print '"Umm. . ."Do you want to ask about the Castle or Walk Away?(Castle,Walk)'
Knight = raw_input('Enter:')
if Knight == 'Castle':
print '"The Castle? oh the King lives there.People Live in the Village."One of the Knight says'
print '"Thank You!"'
print "Do you want to Walk Away?(Walk)"
print "You can no longer ask about the Castle"
Knight = raw_input('Enter:')
if Knight == 'Walk':
print "You Decide to walk away"
print "Your now in Middle Square."
if Wayin == 'Sewers':
print "You decide to go though the Serwers. For some reason."
print "You go in the Sewer Tunnel. You get to a Y-intersection do you want to go Left or Right.(Left,Right)"
Tunnel = raw_input('Enter:')
if Tunnel == 'Left':
print "You go Left"
print "You See a way up"
print "You end up under a man hole cover in a train thats running."
print "You are super confused.You decide to move on."
print "You see another way up"
print "Your in the Middle Square now."
if Tunnel == 'Right':
print "You go Right"
print "You See a way up"
print "You end up under a man hole cover in a pub."
print "You decide to move on."
print "You see another way up"
print "Your in the Middle Sqare now."
print "Your in the Middle Square."
print "Do you want to go the Kingdom or the Hotle and sleep until tommorw?(Kingdom,Hotel)"
MiddleSquare = raw_input('Enter:')
if MiddleSquare == 'Hotel':
print "You decide to go to a Hotel."
print "You get a good night sleep."
print "1 +Health"
print "your Heatlth is now"
Health = Health + 1
print Health
print "Where do you want to go now?(Kingdom)"
print "You can no longer go to the hotel"
MiddleSquare = raw_input("I'll")
if MiddleSquare == 'Kingdom':
print "You decide to go to the Kingdom."
print "Theres two gaurds on each side of his throne."
print "You kneel down"
print '"Hello my Son"The King Says.'
print '"Hello"You say '
print '"Look at me, my son."'
print "Look at him Dont(Look,Dont)"
Look = raw_input('Enter:')
if Look == 'Look':
print "You Look up"
print "You look into his eyes."
print "You turn into stone"
print "Game Over"
raise SystemExit
if Look == 'Dont':
print "You dont look up"
print '"Why dont you look up young one?"'
print '"That is very rude, you know."'
print '"Im sorry"'
print '"Gaurds I want his head!"'
print '"What are you insane???"'
print '"Your right, if you want something done right you need to do it your self.'
print "Boss: 2"
AttackK = ("Sword Trow", "Bow and Arrow")
King_Attack = (random.choice(AttackK))
print "You Decide to fight!"
print "King goes first!"
print "King stats"
print ""
print "Boss: Level 2"
print "Bosses Strength"
D20 = (random.choice(Dice20))
Boss2S = D20
print D20
print "Max Strength is 20"
print "Bosses Health"
print ""
D20 = (random.choice(Dice20))
Boss2H = D20
print D20
print "Max Health is 20"
print ""
print "King Rolls 2 D6s"
TD6 = (random.choice(TDice6))
print "King Rolls a"
print TD6
print "Did he hit?"
if Boss2S > TD6:
print "Hit"
print "He Rolls again to see how much damage he does."
D6 = (random.choice(Dice6))
print "The King Rolls a"
print D6
print "King Shoots a %s at you" %(King_Attack)
print "Your Health is now"
print Health - D6
Health = Health - D6
if Health <= 0:
print "You Died"
print "Game over"
raise SystemExit
else:
print "The King didnt hit"
print "Your Turn"
print "Lets Roll."
D6 = (random.choice(Dice6))
print "You Rolled a"
print D6
print "Did you hit?"
if (Strength + Wood_Sword) > D6:
print "Hit"
print "Roll again to see how much damage you do."
D6 = (random.choice(Dice6))
print "You rolled a"
print D6
print "Kings Health is now"
print Boss1H - D6
print "+Wooden Sword"
print Boss1H - (D6 + Wood_Sword)
Boss1H = Boss1H - (D6 + Wood_Sword)
print Boss1H
if Boss1H >= 0:
print "You killed him!"
elif Boss1H > 0:
print "What do you do? do you Run, or do Nothing?(Run,Nothing)"
print "You can no longer attack"
Command = raw_input("Enter:")
#Run
if Command == 'Run':
print "You try to run!"
print "lets roll to see if you can"
print "You roll a D6 and its a"
D6 = (random.choice(Dice6))
print D6
if Run > D6:
print "You Ran Away!"
else:
print "Your legs were to tired and you got eaten while sleeping."
print "Your Dead!"
print "Game Over"
raise SystemExit
#Nothing
if Command == 'Nothing':
print "You Coward"
print "You do nothing."
print "You Got attacked from behind and died!"
print "Game Over"
raise SystemExit
print "For Winning"
print "The knight gives you a new peice of Stone armor"
print "Your Health now is"
print "Your Health + Stone Armor"
print Health + Stone_Armor
Health = (Health + Stone_Armor)
print "Chapter 3:The Castle is over"
#This Chapter is 167 lines long
#1/2/16
#1/4/16
print "Chapter 4:Labrinth"
print ""
print "Please note combat has now changed."
print "Fights will be harder and you might die."
print ""
print "3 months later."
print "While you were looting a dungeon you come across a maze of some kind."
print "Enter?(Enter, Leave.)"
Cave = raw_input("I'll")
if Cave == "Enter":
print "You see a Minitoar"
print "Do you Fight or Run?(Attack, Run)"
Cave2 = raw_input("I'll")
if Cave2 == "Attack":
print "You decide to attack the %s" %(Random_Choice)
print "The %s Stats are"
print "Health:"
print RCH_Health
print "Strength:"
print RCH_Strength
# 3/15/16
print "You go first"
AttackM = ("Roar", "Hilt Smash", "Axe of Fury")
Mini_Attack = (random.choice(AttackM))
print "Minitoar stats"
print ""
print "Boss: Level 3"
print "Bosses Strength"
D20 = (random.choice(Dice20))
Boss3S = D20
print D20
print "Max Strength is 20"
print "Bosses Health"
print ""
D20 = (random.choice(Dice20))
Boss3H = D20
print D20
print "Max Health is 20"
#Fight
while Cave3 == 1:
print "You Roll a D6"
D6 = (random.choice(Dice6))
print D6
print "Let's see if you 'Hit'"
if Strength > D6:
print "Hit"
print "Roll again to see how much damage you do."
D6 = (random.choice(Dice6))
print "You rolled a"
print D6
print "Minitoar's Health is now"
print Boss3H - D6
Boss3H = D6
print Boss1H
if Boss3H <= 0:
print "You killed him!"
Cave3 = 2
elif Health <= 0:
print "You died"
print "Game over"
raise SystemExit
else:
print "Keep on fighting"
else:
print "You swing pointlessly in the air."
print "Minitoar's Turn"
print "Minitoar rolls a D6"
D6 = (random.choice(Dice6))
print "Let's see if he 'Hit'"
if Boss3S > D6:
print "Hit"
Mini_Attack = (random.choice(AttackM))
print "Minitoar uses %r" %(Mini_Attack)
print "He rolls again to see how much damage he dose."
D6 = (random.choice(Dice6))
print "He rolled a"
print D6
print "Your Health is now"
Health = Health - D6
print Health
if Health <= 0:
print "You died"
print "Game over"
raise SystemExit
else:
print "Keep on fighting"
else:
print "Minitoar swing pointlessly in the air."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment