Well, I took everyone's advice and used classes. It does work a lot better. I even added a gang war to the demo, but, your gang wins with one turn. I am including the code for the gangfight() function and all necessary classes so if anyone sees the problem, let me know so I can fix it.
# player class
class player():
hp = 25
cash = 500
dealers = 2
gang = 5
guns = 0
ganghp = 20
class hawksgang():
ganghp = 25
members = random.randrange(4, 10)
def gangfight():
charhp = player.ganghp * player.gang
thughp = hawksgang.ganghp * hawksgang.members
print "The Hawks gang is attacking you!"
print "Your gang: ", player.gang
print "Hawks gang: ", hawksgang.members
# player gang attacks
chardmg = random.randrange(2) + 1
attack = chardmg * player.gang
print "Your gang attacks the Hawks!"
print "You deal ", attack, "damage!"
thughp -= attack
print
print "Your gangs HP: ", charhp
print "Hawks HP: ", thughp
# hawks attack
thugdmg = random.randrange(1) + 1
attack = thugdmg * hawksgang.members
print "The Hawks attack you!"
print "They deal ", attack, "damage to your gang!"
charhp -= attack
print "Your gangs HP: ", charhp
print "Hawks HP: ", thughp
raw_input()
if charhp < 1:
print "The hawks have defeated your gang."
print "Game Over."
gameover()
else:
print "Your gang has defeated the Hawks!"
cearn = random.randrange(10, 25)
income = cearn * hawksgang.members
print "You earned $", income ,"!\n"
player.cash += income
return
Now, I am a …