Anonymous avatar 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)
     char2.say("Harr! You won't be the one to kill me!")
     - 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{}
     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=[]):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.