So basically im creating this python adventure text game. And so far its good. But i have this problem with class instances(Is that the right term?) Say for example i have this class, class monster(object): def __init__(self,health,attack): self.damage = damage self.health = health So then I create a class object(again, is that the right term?) goblin = monster(5,30) skeleton = monster(10,20) so now, i have this piece of code for the fighting mechanic between the player and the monster. (I just copy past this so the indentation might be messed up) if char.location.war == True: while death == False: #check …

Member Avatar
Member Avatar
+0 forum 2

The End.