home · contact · privacy
Add stimulants, which boost energy.
[plomrogue2] / plomrogue / things.py
index dbec52f57a329b826d1300642b08c378e3973165..6dbe8ef7eee4ccd2d4bb17354895edc0cc584044 100644 (file)
@@ -28,6 +28,7 @@ class Thing(ThingBase):
     commandable = False
     cookable = False
     carried = False
+    consumable = False
 
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
@@ -208,6 +209,7 @@ class Thing_Psychedelic(Thing):
     symbol_hint = 'P'
     portable = True
     cookable = True
+    consumable = True
 
 
 
@@ -224,6 +226,7 @@ class Thing_Bottle(Thing):
     thing_char = '~'
     spinnable = True
     cookable = True
+    consumable = True
 
     def empty(self):
         self.thing_char = '_'
@@ -435,9 +438,24 @@ class Thing_BottleDeposit(Thing):
 
 
 
+class Thing_Stimulant(Thing):
+    symbol_hint = 'e'
+    cookable = True
+    portable = True
+    consumable = True
+
+
+
+class Thing_StimulantSpawner(ThingSpawner):
+    symbol_hint = 'e'
+    child_type = 'Stimulant'
+
+
+
 class Thing_Cookie(Thing):
     symbol_hint = 'c'
     portable = True
+    consumable = True
 
     def __init__(self, *args, **kwargs):
         import string
@@ -678,7 +696,7 @@ class Thing_Player(ThingAnimate):
         if 1000000 * random.random() < self.energy:
             self.send_msg('CHAT "Your body tries to '
                           'dance off its energy surplus."')
-            self.dancing = 50
+            self.dancing += 50
             self.game.changed = True
 
     def send_msg(self, msg):