aboutsummaryrefslogtreecommitdiff
path: root/plugins/cherry/cherry.c
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-06-14 21:37:10 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-06-14 21:37:10 +0200
commite1be7203f4c3366a9d278c9bb625a9c678c2ef24 (patch)
tree0753b9c68ffaada23f2602aebc613c3c7d1eaae2 /plugins/cherry/cherry.c
parent9d3ecc266d2e06f6cc8f2a310543b16edb8cbd56 (diff)
downloaddungeon_game-e1be7203f4c3366a9d278c9bb625a9c678c2ef24.tar.xz
Add loot boxes
Diffstat (limited to 'plugins/cherry/cherry.c')
-rw-r--r--plugins/cherry/cherry.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/cherry/cherry.c b/plugins/cherry/cherry.c
index 1b0ac8a..96f0a2a 100644
--- a/plugins/cherry/cherry.c
+++ b/plugins/cherry/cherry.c
@@ -3,6 +3,7 @@
#include "../game/game.h"
#include "../score/score.h"
#include "../inventory/inventory.h"
+#include "../loot/loot.h"
static bool use_cherry(struct itemstack *stack)
{
@@ -66,5 +67,12 @@ __attribute__((constructor)) static void init()
.room_chance = 100,
.callback = &spawn_cherry,
});
+
+ register_loot((struct loot) {
+ .item = &cherry_item,
+ .chance = 2,
+ .min = 3,
+ .max = 10,
+ });
}