-
-
Save Dinocrusher/a8ec8c0d12402eb013d66d4b62b8c69d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*All Variables* | |
Exit = 'Exit' | |
E = 'E' | |
Yes = 'Yes' | |
Y = 'Y' | |
No = 'No' | |
N = 'N' | |
A = 'A' | |
B = 'B' | |
C = 'C' | |
D = 'D' | |
Loop = True | |
LoopBreak = False | |
OneTimeEvent1 = True | |
# Important variables | |
# Weapons/Items/Gold Section | |
IronWeapons = ['Iron Sword', 'Iron Mace', 'Iron Hammer', 'Iron Bow & Arrow', 'Iron Axe', 'Iron Spear'] | |
IronWeaponsAmount = [1, 1, 1, 0, 0, 0] | |
IronWeaponsDamage = [2, 1, 2.5, 1.5, 2, 1.5] # Second one has a 50% chance of dealing 3 damage, Fourth one has a 20% chance of dealing 4 damage and the sixth one has a 30% chance of dealing 3 damage | |
SteelWeapons = ['Steel Sword', 'Steel Mace', 'Steel Hammer', 'Steel Bow & Arrow', 'Steel Axe', 'Steel Spear'] | |
SteelWeaponsAmount = [0, 0, 0, 0, 0, 0] | |
GoldWeapons = ['Gold Katana', 'Gold Mace', 'Gold Great Hammer', 'Gold Bow & Arrow', 'Gold Axe', 'Gold Spear', 'Gold Crossbow', 'Gold Battleaxe', 'Gold Slicer'] | |
GoldWeaponsAmount = [0, 0, 0, 0, 0, 0, 0, 0, 0,] | |
DiamondWeapons = ['Diamond Katana', 'Diamond Mace', 'Diamond Great Hammer', 'Diamond Bow & Arrow', 'Diamond Axe', 'Diamond Spear', 'Diamond Crossbow', 'Diamond Battleaxe', 'Diamond Slicer'] | |
DiamondWeaponsAmount = [0, 0, 0, 0, 0, 0, 0, 0, 0,] | |
CrystalWeapons = ['Crystal Katana', 'Crystal Ultra Mace', 'Crystal Ultra Hammer', 'Crystal Bow & Arrow', 'Crystal Heavy Axe', 'Crystal Double Circular Blade Spear', 'Crystal Crossbow', 'Crystal Double Battleaxe', 'Crystal Slicer', 'Crystal Arm-Blade', 'Crystal Scythe', 'Crystal Dual-Katana'] | |
CrystalWeaponsAmount = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] | |
LaserWeapons = ['Laser Katana', 'Laser Ultra Mace', 'Laser Ultra Hammer', 'Laser Bow & Arrow', 'Laser Heavy Axe', 'Laser Double Circular Blade Spear', 'Laser Crossbow', 'Laser Ultra Double Battleaxe', 'Laser Slicer', 'Laser Arm-Blade', 'Laser Scythe', 'Laser Dual-Katana'] | |
LaserWeaponsAmount = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,] | |
WeaponCriticalHit = random.randint(0, 0) | |
WeaponCriticalHitDamage = 0 | |
WeaponCriticalHitEnabled = False | |
IsWeaponCriticalHit = False | |
EquippedWeapon = '' | |
Armor = ['Leather Helmet', 'Leather Gauntlets', 'Leather Chestplate', 'Leather Armor', 'Leather Boots'] | |
ArmorProtection = [1.5, 1.5, 3, 1.5] | |
ArmorAmount = [1, 1, 1, 1, 1,] | |
Items = ['Rock'] | |
ItemsAmount = [1] | |
Gold = 10 | |
# Skills Section | |
DestructionSkillsNovice = ['Fire Blast', 'Ice Spike', 'Lightning Beam'] | |
DestructionSkillsNoviceEarned = [1, 0, 0] | |
DestructionSkillsApprentice = ['Fire Fist', 'Ice Spear', 'Lightning Claws'] | |
DestructionSkillsApprenticeEarned = [0, 0, 0] | |
DestructionSkillsMaster = ['Ignite!', 'Ice Crush!', 'Lightning Destructive Orb!'] | |
DestructionSkillsMasterEarned = [0, 0, 0] | |
IllusionSkillsNovice = ['Flash', 'Deflect', 'Teleport'] | |
IllusionSkillsNoviceEarned = [0, 0, 0] | |
IllusionSkillsApprentice = ['Dimension Slash', 'Dimension Surrounding', '1,000 Dimension Spears'] | |
IllusionSkillsApprenticeEarned = [0, 0, 0] | |
IllusionSkillsMaster = ['Transform into a Ice Golem', 'Transform into a Dragon', 'Transform into a Ancient Warrior'] | |
IllusionSkillsMasterEarned = [0, 0, 0] | |
SummoningSkillsNovice = ['Summon Wild Boar', 'Summon Bandit', 'Summon Wolf'] | |
SummoningSkillsNoviceEarned = [0, 0, 0] | |
SummoningSkillsApprentice = ['Summon Raptor', 'Summon Triceratops', 'Summon Mammoth', 'Summon Tyrannosaurus Rex'] | |
SummoningSkillsApprenticeEarned = [0, 0, 0, 0] | |
SummoningSkillsMaster = ['Summon Earth Golem', 'Summon Dragon', 'Summon Ancient Warrior'] | |
SummoningSkillsMasterEarned = [0, 0, 0] | |
BendingSkillsNovice = ['Earth Punch', 'Earth Wall', 'Earth Boulder'] | |
BendingSkillsNoviceEarned = [0, 0, 0] | |
BendingSkillsApprentice = ['Rock Stab', '50 Rock\'s', 'Rock Smash'] | |
BendingSkillsApprenticeEarned = [0, 0, 0] | |
BendingSkillsMaster = ['Metal Slam', '200 Metal Shurikens', 'Massive Metal Battleaxe'] | |
BendingSkillsMasterEarned = [0, 0, 0] | |
WeaponSkills = ['Strike'] | |
WeaponSkillsEarned = [1] | |
# Level up Section | |
# Player Section | |
PlayerHealth = 30 | |
PlayerMana = 10 | |
PlayerWeaponDamage = 0 | |
PlayerWeaponDamageSet = 0 | |
PlayerSkillDamage = 0 | |
AttackMode = 0 | |
PermaEquipWeapon = '' | |
PermaEquipWeaponEnabled = False | |
PermaEquipHelmet = '' | |
PermaEquipGauntlets = '' | |
PermaEquipArmor = '' | |
PermaEquipBoots = '' | |
PermaEquipShoulders = '' | |
# Enemies | |
PracticeEnemy = '<Enemy>' | |
PracticeEnemyHealth = 10 | |
PracticeEnemyDamage = 2 | |
EnemyDefeated = 0 | |
EnemyWon = 0 | |
*Section of code I'm having a problem with* | |
def Inventory(): | |
if OneTimeEvent1 == True: | |
PermaEquipWeaponEnabled = False | |
Loop = True | |
LoopBreak = False | |
while Loop == True: | |
print ("Your inventory:") | |
if IronWeaponsAmount[0] >= 1: | |
print ("(" + str(IronWeaponsAmount[0]) + ") " + IronWeapons[0]) | |
if IronWeaponsAmount[1] >= 1: | |
print ("(" + str(IronWeaponsAmount[1]) + ") " + IronWeapons[1]) | |
if IronWeaponsAmount[2] >= 1: | |
print ("(" + str(IronWeaponsAmount[2]) + ") " + IronWeapons[2]) | |
if IronWeaponsAmount[3] >= 1: | |
print ("(" + str(IronWeaponsAmount[3]) + ") " + IronWeapons[3]) | |
if IronWeaponsAmount[4] >= 1: | |
print ("(" + str(IronWeaponsAmount[4]) + ") " + IronWeapons[4]) | |
if IronWeaponsAmount[5] >= 1: | |
print ("(" + str(IronWeaponsAmount[5]) + ") " + IronWeapons[5]) | |
if ArmorAmount[0] >= 1: | |
print ("(" + str(ArmorAmount[0]) + ") " + Armor[0]) | |
if ArmorAmount[1] >= 1: | |
print ("(" + str(ArmorAmount[1]) + ") " + Armor[1]) | |
if ArmorAmount[2] >= 1: | |
print ("(" + str(ArmorAmount[2]) + ") " + Armor[2]) | |
if ArmorAmount[3] >= 1: | |
print ("(" + str(ArmorAmount[3]) + ") " + Armor[3]) | |
if ArmorAmount[4] >= 1: | |
print ("(" + str(ArmorAmount[4]) + ") " + Armor[4]) | |
if ItemsAmount[0] >= 1: | |
print ("(" + str(ItemsAmount[0]) + ") " + Items[0]) | |
print ("A) Choose which weapon you want to equip.") | |
print ("B) Choose which armor you want to equip.") | |
print ("E) Exit") | |
print ("Enter in the item you wish to view.") | |
# The first section of the contents displayed when you enter the inventory | |
basicAnswerStr = input() | |
if basicAnswerStr.lower() == A.lower(): | |
if PermaEquipWeaponEnabled == False: | |
PermaEquipWeapon = '' | |
#Objectives | |
#1. List all the weapons | |
#1.5. Display which weapon is currently equipped | |
#2. Choose which weapon to assign the perma equip to | |
#3. Allow the player to exit | |
if IronWeaponsAmount[0] >= 1: | |
print (IronWeapons[0]) | |
if IronWeaponsAmount[1] >= 1: | |
print (IronWeapons[1]) | |
if IronWeaponsAmount[2] >= 1: | |
print (IronWeapons[2]) | |
if IronWeaponsAmount[3] >= 1: | |
print (IronWeapons[3]) | |
if IronWeaponsAmount[4] >= 1: | |
print (IronWeapons[4]) | |
if IronWeaponsAmount[5] >= 1: | |
print (IronWeapons[5]) | |
print ("") | |
print ("Equipped weapon: " + PermaEquipWeapon) | |
print ("") | |
print ("A) Change Equipped Weapon.") | |
print ("E) Exit") | |
while Loop == True: | |
if LoopBreak == True: | |
LoopBreak = False | |
break | |
basicAnswerStr = '' | |
basicAnswerStr = input() | |
if basicAnswerStr.lower() == A.lower(): | |
print ("What would you like your equipped weapon to be?") | |
if IronWeaponsAmount[0] >= 1: | |
print (IronWeapons[0]) | |
if IronWeaponsAmount[1] >= 1: | |
print (IronWeapons[1]) | |
if IronWeaponsAmount[2] >= 1: | |
print (IronWeapons[2]) | |
if IronWeaponsAmount[3] >= 1: | |
print (IronWeapons[3]) | |
if IronWeaponsAmount[4] >= 1: | |
print (IronWeapons[4]) | |
if IronWeaponsAmount[5] >= 1: | |
print (IronWeapons[5]) | |
print ("E) Exit") | |
while Loop == True: | |
basicAnswerStr = input() | |
if basicAnswerStr.lower() == IronWeapons[0]: | |
if IronWeaponsAmount[0] >= 1: | |
PermaEquipWeapon = IronWeapons[0] | |
return PermaEquipWeapon | |
PlayerWeaponDamage = IronWeaponsDamage[0] | |
return PlayerWeaponDamage | |
PermaEquipWeaponEnabled = True | |
return PermaEquipWeaponEnabled | |
LoopBreak = True | |
break | |
if basicAnswerStr.lower() == IronWeapons[1]: | |
if IronWeaponsAmount[1] >= 1: | |
PermaEquipWeapon = IronWeapons[1] | |
return PermaEquipWeapon | |
PlayerWeaponDamage = IronWeaponsDamage[1] | |
return PlayerWeaponDamage | |
IsWeaponCriticalHit = True | |
return IsWeaponCriticalHit | |
PermaEquipWeaponEnabled = True | |
return PermaEquipWeaponEnabled | |
LoopBreak = True | |
break | |
if basicAnswerStr.lower() == IronWeapons[2]: | |
if IronWeaponsAmount[2] >= 1: | |
PermaEquipWeapon = IronWeapons[2] | |
return PermaEquipWeapon | |
PlayerWeaponDamage = IronWeaponsDamage[2] | |
return PlayerWeaponDamage | |
LoopBreak = True | |
break | |
if basicAnswerStr.lower() == IronWeapons[3]: | |
if IronWeaponsAmount[3] >= 1: | |
PermaEquipWeapon = IronWeapons[3] | |
return PermaEquipWeapon | |
PlayerWeaponDamage = IronWeapons[3] | |
return PlayerWeaponDamage | |
IsWeaponCriticalHit = True | |
return IsWeaponCriticalHit | |
PermaEquipWeaponEnabled = True | |
return PermaEquipWeaponEnabled | |
LoopBreak = True | |
break | |
if basicAnswerStr.lower() == IronWeapons[4]: | |
if IronWeaponsAmount[4] >= 1: | |
PermaEquipWeapon = IronWeapons[4] | |
return PermaEquipWeapon | |
PlayerWeaponDamage = IronWeapons[4] | |
return PlayerWeaponDamage | |
PermaEquipWeaponEnabled = True | |
return PermaEquipWeaponEnabled | |
LoopBreak = True | |
break | |
if basicAnswerStr.lower() == IronWeapons[5]: | |
if IronWeaponsAmount[5] >= 1: | |
PermaEquipWeapon = IronWeapons[5] | |
return PermaEquipWeapon | |
PlayerWeaponDamage = IronWeaponsDamage[5] | |
return PlayerWeaponDamage | |
IsWeaponCriticalHit = True | |
return IsWeaponCriticalHit | |
PermaEquipWeaponEnabled = True | |
return PermaEquipWeaponEnabled | |
LoopBreak = True | |
break | |
if basicAnswerStr.lower() == E.lower(): | |
LoopBreak = True | |
break | |
if basicAnswerStr.lower() == Exit.lower(): | |
LoopBreak = True | |
break | |
if basicAnswerStr.lower() == E.lower(): | |
LoopBreak = True | |
basicAnswerStr = '' | |
break | |
if basicAnswerStr.lower() == Exit.lower(): | |
LoopBreak = True | |
basicAnswerStr = '' | |
break | |
if basicAnswerStr.lower() == B.lower(): | |
print ("") | |
if basicAnswerStr.lower() == Exit.lower(): | |
break | |
if basicAnswerStr.lower() == E.lower(): | |
break | |
if basicAnswerStr.lower() == IronWeapons[0].lower(): | |
if IronWeaponsAmount[0] >= 1: | |
print ("Iron Sword:") | |
print ("") | |
print ("Description: A sword made out of iron with a leather handle.") | |
print ("") | |
print ("Stats: 2 Damage.") | |
print ("") | |
if basicAnswerStr.lower() == IronWeapons[1].lower(): | |
if IronWeaponsAmount[1] >= 1: | |
print ("Iron Mace:") | |
print ("") | |
print ("Description: A mace made out of iron with a leather handle. ") | |
print ("") | |
print ("Stats: 1 Damage (With a 50% chance of doing 3 Damage).") | |
print ("") | |
if basicAnswerStr.lower() == IronWeapons[2].lower(): | |
if IronWeaponsAmount[2] >= 1: | |
print ("Iron Hammer:") | |
print ("") | |
print ("Description: A heavy hammer made out of iron with a leather handle.") | |
print ("") | |
print ("Stats: 2.5 Damage.") | |
print ("") | |
if basicAnswerStr.lower() == IronWeapons[3].lower(): | |
if IronWeaponsAmount[3] >= 1: | |
print ("Iron Bow & Arrow:") | |
print ("") | |
print ("Description: A bow made out of iron, the arrows are wooden with the arrowhead also being made with iron.") | |
print ("") | |
print ("Stats: 2 Damage (With a 20% chance of dealing 4 damage.)") | |
print ("") | |
if basicAnswerStr.lower() == IronWeapons[4].lower(): | |
if IronWeaponsAmount[4] >= 1: | |
print ("Iron Axe:") | |
print ("") | |
print ("Description: A axe with a wooden handle with the blade being made out of iron.") | |
print ("") | |
print ("Stats: 2 Damage.") | |
print ("") | |
if basicAnswerStr.lower() == IronWeapons[5].lower(): | |
if IronWeaponsAmount[5] >= 1: | |
print ("Iron Spear") | |
print ("") | |
print ("Description: A spear with a wooden handle with the blade being made out of iron.") | |
print ("") | |
print ("Stats: 1.5 Damage (With a 30% chance of dealing 3 damage).") | |
print ("") | |
if basicAnswerStr.lower() == Armor[0].lower(): | |
if ArmorAmount[0] >= 1: | |
print ("Leather Helmet:") | |
print ("") | |
print ("Description: A helmet covered in leather to provide extra protection.") | |
print ("") | |
print ("Stats: 1.5% Less damage taken.") | |
print ("") | |
if basicAnswerStr.lower() == Armor[1].lower(): | |
if ArmorAmount[1] >= 1: | |
print ("Leather Gauntlets:") | |
print ("") | |
print ("Description: Gauntlets covered in leather to provide extra protection.") | |
print ("") | |
print ("Stats: 1.5% Less damage taken.") | |
print ("") | |
if basicAnswerStr.lower() == Armor[2].lower(): | |
if ArmorAmount[2] >= 1: | |
print ("Leather Chestplate:") | |
print ("") | |
print ("Description: A chestplate covered in leather to provide extra protection.") | |
print ("") | |
print ("Stats: 3% Less damage taken.") | |
print ("") | |
if basicAnswerStr.lower() == Armor[3].lower(): | |
if ArmorAmount[3] >= 1: | |
print ("Leather Armor:") | |
print ("") | |
print ("Description: Leather armor, this covers the arms and legs with a thin form of leather.") | |
print ("") | |
print ("Stats: 2% Less damage taken.") | |
print ("") | |
if basicAnswerStr.lower() == Armor[4].lower(): | |
if ArmorAmount[4] >= 1: | |
print ("Leather Boots:") | |
print ("") | |
print ("Description: Boots covered in leather to provide extra protection.") | |
print ("") | |
print ("Stats: 1.5% Less damage taken.") | |
print ("") | |
if basicAnswerStr.lower() == Items[0].lower(): | |
if Items[0] >= 1: | |
print ("Rock:") | |
print ("") | |
print ("Description: Just a normal sized rock.") | |
print ("") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment