From 76f34080ddc9feafd188c83c24eee5c71af59a10 Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 5 Mar 2016 20:29:55 +0200 Subject: [PATCH] Add a butter knife to level 1. --- koperkapel/gamelib/items.py | 7 +++++++ koperkapel/levels/level1.json | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/koperkapel/gamelib/items.py b/koperkapel/gamelib/items.py index 837ccc6..b125d44 100644 --- a/koperkapel/gamelib/items.py +++ b/koperkapel/gamelib/items.py @@ -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, } diff --git a/koperkapel/levels/level1.json b/koperkapel/levels/level1.json index c5e5962..782ec65 100644 --- a/koperkapel/levels/level1.json +++ b/koperkapel/levels/level1.json @@ -4357,6 +4357,11 @@ "type": "serum", "serum": "strong", "pos": [2, 12] + }, + { + "type": "weapon", + "weapon": "butter_knife", + "pos": [9, 12] } ], "friendly roaches": [ -- 2.34.1