From ba1d09ad51aafb7aff798d3ed8d62edc0901998d Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Thu, 9 Aug 2018 16:15:22 +0200 Subject: [PATCH] Continues #2 completed impl of DAGGER_RECOVERY --- src/monster.c | 2 +- src/projectile.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/monster.c b/src/monster.c index 4c995bf..a92e89b 100644 --- a/src/monster.c +++ b/src/monster.c @@ -559,7 +559,7 @@ monster_drop_loot(Monster *monster, Map *map, Player *player) // TODO: This should not occur every time // Debug code. - Artifact *a = artifact_create(FEAR_INDUCING); + Artifact *a = artifact_create(DAGGER_RECOVERY); a->sprite->pos = monster->sprite->pos; linkedlist_append(&map->artifacts, a); } diff --git a/src/projectile.c b/src/projectile.c index 4aa1d59..5977061 100644 --- a/src/projectile.c +++ b/src/projectile.c @@ -114,8 +114,7 @@ projectile_update(Projectile *p, UpdateData *data) monster_hit(space->monster, dmg); player_monster_kill_check(data->player, space->monster); alive = player_has_artifact(data->player, PIERCING_DAGGERS) > p->collisionCount; - if (!alive && (get_random(5) == 0 - || get_random(5) < player_has_artifact(data->player, DAGGER_RECOVERY))) { + if (!alive && get_random(5) <= player_has_artifact(data->player, DAGGER_RECOVERY)) { Item *item = item_builder_build_item(DAGGER, 1); item->sprite->pos = space->monster->sprite->pos; linkedlist_append(&data->map->items, item);