Continues #2 completed impl of DAGGER_RECOVERY
This commit is contained in:
parent
19e7583f3e
commit
ba1d09ad51
|
@ -559,7 +559,7 @@ monster_drop_loot(Monster *monster, Map *map, Player *player)
|
||||||
|
|
||||||
// TODO: This should not occur every time
|
// TODO: This should not occur every time
|
||||||
// Debug code.
|
// Debug code.
|
||||||
Artifact *a = artifact_create(FEAR_INDUCING);
|
Artifact *a = artifact_create(DAGGER_RECOVERY);
|
||||||
a->sprite->pos = monster->sprite->pos;
|
a->sprite->pos = monster->sprite->pos;
|
||||||
linkedlist_append(&map->artifacts, a);
|
linkedlist_append(&map->artifacts, a);
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,8 +114,7 @@ projectile_update(Projectile *p, UpdateData *data)
|
||||||
monster_hit(space->monster, dmg);
|
monster_hit(space->monster, dmg);
|
||||||
player_monster_kill_check(data->player, space->monster);
|
player_monster_kill_check(data->player, space->monster);
|
||||||
alive = player_has_artifact(data->player, PIERCING_DAGGERS) > p->collisionCount;
|
alive = player_has_artifact(data->player, PIERCING_DAGGERS) > p->collisionCount;
|
||||||
if (!alive && (get_random(5) == 0
|
if (!alive && get_random(5) <= player_has_artifact(data->player, DAGGER_RECOVERY)) {
|
||||||
|| get_random(5) < player_has_artifact(data->player, DAGGER_RECOVERY))) {
|
|
||||||
Item *item = item_builder_build_item(DAGGER, 1);
|
Item *item = item_builder_build_item(DAGGER, 1);
|
||||||
item->sprite->pos = space->monster->sprite->pos;
|
item->sprite->pos = space->monster->sprite->pos;
|
||||||
linkedlist_append(&data->map->items, item);
|
linkedlist_append(&data->map->items, item);
|
||||||
|
|
Loading…
Reference in New Issue