Subject: goblins
From: "Barrett Brown" <barriticus@gmail.com>
Date: 7/20/08, 15:24
To: "Joshua Hawkins" <josh.r.hawk@gmail.com>

health = 10
money = 1
population = 0

def goblinshot(dmg): # An action whereby a goblin attacks the "player," reducing global health and printing out its new value.
    global health
    health = health - dmg
    print "You're now down to", health,"health!"

def goblinheal(healing): # An action whereby a goblin heals the "player," increasing global health and printing out its new value.
    global health
    health = health + healing
    print "You now have", health,"health! Hooray!"

class Character:
   
    def addPop(self):
        global population
        population = population + 1
   
    def howMany(self):
        global population
        if population == 1:
            print "'It's just me and you!' he exclaims."
        else:
            print "'I'm here with", population - 1,"other characters.'"
       
    def regAttack(self):
        print "Attack"
       
    def healsYou(self):
        print "Heals"
              
class Goblin(Character):
   
    def __init__(self):
        self.hitPoints = 5
        self.name = goblinList[0]
        print "Someone new shows up!"
        print "He says, 'Hi, I'm", self.name,"'"
        goblinList[0:1] = []
        print goblinList
        print "'I have", self.hitPoints,"hit points left!', he says."
           
    def regattack(self):
        print "The goblin punches you!"
        goblinshot(1)

class GoodGoblin(Goblin):
    money = 5
   
    def _init_(self):
        self.hitPoints = 3
        print "I have",money,"money!"
   
    def healsyou(self):
        print "The goblin heals you a little bit!"
        goblinheal(1)
    def giveMoney(self):
        print "The goblin drops a dollar!"
        self.money = self.money - 1
        print "He now has",
        print self.money, "dollars!"
        global money
        money = money + 1
        print "You pick up the dollar!"
        print "You now have", money,"dollars!"
       
class NigerianGoblin(Goblin):
   
    def goChoppa(self):
        print "The goblin go choppa your dolla!"
        global money
        money = money - 1
        print "You now have", money,"dollars!"
   

goblinList = ['Grandmaster Flash', 'Thuggy McPicklephile', 'Bob Deathstrike', 'Loki Lackluster', 'Cyberviking X', 'Chuck D', 'Osama bin Smokin']