Prevents kill achievments from being granted on first hit.
This commit is contained in:
parent
a19a13e054
commit
280b073a8c
27
src/player.c
27
src/player.c
|
@ -512,20 +512,6 @@ player_monster_kill_check(Player *player, Monster *monster)
|
||||||
if (!monster)
|
if (!monster)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef STEAM_BUILD
|
|
||||||
if (strcmp("The Shadow", monster->label) == 0)
|
|
||||||
steam_set_achievement(LIGHTS_ON);
|
|
||||||
else if (strcmp("The Hell Hound", monster->label) == 0)
|
|
||||||
steam_set_achievement(BAD_DOG);
|
|
||||||
else if (strcmp("Platino", monster->label) == 0)
|
|
||||||
steam_set_achievement(DRAGON_SLAYER);
|
|
||||||
else if (strcmp("The Cleric", monster->label) == 0)
|
|
||||||
steam_set_achievement(THE_DOCTOR_IS_OUT);
|
|
||||||
else if (strcmp("Linus, the Developer", monster->label) == 0)
|
|
||||||
steam_set_achievement(BUGGFIXER);
|
|
||||||
|
|
||||||
#endif // STEAM_BUILD
|
|
||||||
|
|
||||||
if (monster->stats.hp <= 0) {
|
if (monster->stats.hp <= 0) {
|
||||||
unsigned int gained_xp = 5 * monster->stats.lvl;
|
unsigned int gained_xp = 5 * monster->stats.lvl;
|
||||||
player->stat_data.kills += 1;
|
player->stat_data.kills += 1;
|
||||||
|
@ -533,6 +519,19 @@ player_monster_kill_check(Player *player, Monster *monster)
|
||||||
gui_log("You killed %s and gained %d xp",
|
gui_log("You killed %s and gained %d xp",
|
||||||
monster->lclabel, gained_xp);
|
monster->lclabel, gained_xp);
|
||||||
player_gain_xp(player, gained_xp);
|
player_gain_xp(player, gained_xp);
|
||||||
|
|
||||||
|
#ifdef STEAM_BUILD
|
||||||
|
if (strcmp("The Shadow", monster->label) == 0)
|
||||||
|
steam_set_achievement(LIGHTS_ON);
|
||||||
|
else if (strcmp("The Hell Hound", monster->label) == 0)
|
||||||
|
steam_set_achievement(BAD_DOG);
|
||||||
|
else if (strcmp("Platino", monster->label) == 0)
|
||||||
|
steam_set_achievement(DRAGON_SLAYER);
|
||||||
|
else if (strcmp("The Cleric", monster->label) == 0)
|
||||||
|
steam_set_achievement(THE_DOCTOR_IS_OUT);
|
||||||
|
else if (strcmp("Linus, the Developer", monster->label) == 0)
|
||||||
|
steam_set_achievement(BUGGFIXER);
|
||||||
|
#endif // STEAM_BUILD
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue