]> git.lizzy.rs Git - dungeon_game.git/blobdiff - plugins/fireball/fireball.c
Add loot boxes
[dungeon_game.git] / plugins / fireball / fireball.c
index a0e9a13fa8aa9d73b7ca7bd8d2cd285806fdad66..e771d08b1cf89c922a75b8c5eff341bb76d9441a 100644 (file)
@@ -3,6 +3,7 @@
 #include "../game/game.h"
 #include "../movement/movement.h"
 #include "../inventory/inventory.h"
+#include "../loot/loot.h"
 
 struct fireball_data
 {
@@ -113,4 +114,11 @@ __attribute__((constructor)) static void init()
                .count = 7,
                .meta = NULL,
        });
+
+       register_loot((struct loot) {
+               .item = &fireball_item,
+               .chance = 3,
+               .min = 4,
+               .max = 7,
+       });
 }