diff options
Diffstat (limited to 'plugins/fireball')
-rw-r--r-- | plugins/fireball/Makefile | 2 | ||||
-rw-r--r-- | plugins/fireball/dependencies.txt | 1 | ||||
-rw-r--r-- | plugins/fireball/fireball.c | 8 |
3 files changed, 10 insertions, 1 deletions
diff --git a/plugins/fireball/Makefile b/plugins/fireball/Makefile index 117c092..24b068e 100644 --- a/plugins/fireball/Makefile +++ b/plugins/fireball/Makefile @@ -1,4 +1,4 @@ -plugins/fireball/fireball.so: plugins/fireball/fireball.c plugins/game/game.h plugins/movement/movement.h plugins/inventory/inventory.h +plugins/fireball/fireball.so: plugins/fireball/fireball.c plugins/game/game.h plugins/movement/movement.h plugins/inventory/inventory.h plugins/loot/loot.h cc -g -shared -fpic -o plugins/fireball/fireball.so plugins/fireball/fireball.c PLUGINS := ${PLUGINS} plugins/fireball/fireball.so diff --git a/plugins/fireball/dependencies.txt b/plugins/fireball/dependencies.txt index b19003b..32ba50f 100644 --- a/plugins/fireball/dependencies.txt +++ b/plugins/fireball/dependencies.txt @@ -1,3 +1,4 @@ game movement inventory +loot diff --git a/plugins/fireball/fireball.c b/plugins/fireball/fireball.c index a0e9a13..e771d08 100644 --- a/plugins/fireball/fireball.c +++ b/plugins/fireball/fireball.c @@ -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, + }); } |