Add a butter knife to level 1.
authorSimon Cross <hodgestar@gmail.com>
Sat, 5 Mar 2016 18:29:55 +0000 (20:29 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 5 Mar 2016 18:29:55 +0000 (20:29 +0200)
koperkapel/gamelib/items.py
koperkapel/levels/level1.json

index 837ccc61a58886f3ffa062b1e0870c669bc18592..b125d444b1362f547ad8797fc7944cc7c18c2400 100644 (file)
@@ -1,6 +1,7 @@
 # Item utilities
 
 from ..serums import default_serums
+from ..weapons import default_weapons
 
 
 def build_serum(item):
@@ -8,8 +9,14 @@ def build_serum(item):
     return actor
 
 
+def build_weapon(item):
+    actor = default_weapons.assemble(item["weapon"])
+    return actor
+
+
 ITEM_TYPES = {
     "serum": build_serum,
+    "weapon": build_weapon,
 }
 
 
index c5e59621134080545375d4bb2ac641b53d0ce975..782ec6562d11c4a12f0d2e21597b2d0311f5dd37 100644 (file)
         "type": "serum",
         "serum": "strong",
         "pos": [2, 12]
+      },
+      {
+        "type": "weapon",
+        "weapon": "butter_knife",
+        "pos": [9, 12]
       }
    ],
    "friendly roaches": [