Continues #2 completed impl of DAGGER_RECOVERY

This commit is contained in:
Linus Probert 2018-08-09 16:15:22 +02:00
parent 19e7583f3e
commit ba1d09ad51
2 changed files with 2 additions and 3 deletions

View File

@ -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);
}

View File

@ -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);