A first quick look revealed a number of things. Give attention to my comments marked with "!!!!". Here is code that should work, so you can improve on it:
# this is supposed to be simple
# I am trying to simulate combat
# As easy as I can
# "Untitled"
# By Franki
# You find the crystals to destroy the Solomon Terminal
import random # needed for random.randrange(2) or other random thingies
crystals = 0
"""
# declare global variables inside functions only!!!!
global gotCrystal_1
global gotCrystal_2
global gotCrystal_3
global gotCrystal_4
global gotGold_1
global gotGold_2
global gotGold_3
global gotGold_4
"""
# use False, later set to True, is more readable
gotCrystal_area1 = False
gotCrystal_area2 = False
gotCrystal_area3 = False
gotCrystal_area4 = False
gotGold_area1 = False
gotGold_area2 = False
gotGold_area3 = False
gotgold_area4 = False
gold = 0
# I am using Classes to make monsters (I don't know why)
# so you can later refer to as bad_warrior.level, should be 3
# or bad_hunter.name which is 'Cavernian Hunter'
# you can also define some action within the class
class Monster(object):
"""Monster"""
def __init__(self,name,level):
self.name = name
self.level = level
# The Monsters
bad_hunter = Monster("Cavernian Hunter","1")
bad_scout = Monster("Cavernian Scout","2")
bad_warrior = Monster("Cavernian Warrior","3")
bad_commander = Monster("Cavernian Troop Commander","4")
def place_monster():
# the integer 1 places Monster, all others place nothing
Monster_in = random.randrange(2) # replaced MOnster_in with Monster_in spelling!!!!!
if Monster_in == (0 or 2):
return 0
Monster = random.randrange(4)
if Monster == 0:
Monster = …