Commits

Anonymous committed 74f2b10

Now chars can also be given experience via char.get_exp(amount).

Comments (0)

Files changed (2)

 
 if won:
     char1.say("So much for 'you survive'!")
-    give_exp(char1, 1)
+    char1.get_exp(1)
 else:
     char2.say("Harr! You won't be the one to kill me!")
 
 
 Ideas: 
     - Lazy loading modules, to be able to print stuff at once without having to print before the imports.
+    - Add getting experience for groups and show the chars together (only one experience header instead of one per char). 
 
 The code for the TextRPG can be found at U{http://dreehg.org/ArneBab/textrpg}
 
     def battle(self, other): 
         """Fight a dadly battle."""
         return battle(self, other)
+    
+    def get_exp(self, amount=0): 
+        """Get experience and show it."""
+        return give_exp(self, amount)
         
         
     def fight_round(self,  other, styles_self=[], styles_other=[]):