Added easteregg monsters and a funny achievement

This commit is contained in:
Linus Probert 2018-09-03 16:49:45 +02:00
parent f4f874c3ed
commit 07d7d6e58b
4 changed files with 24 additions and 2 deletions

View File

@ -258,6 +258,20 @@ bosses[1] = concat({ texturePaths.dog0, texturePaths.dog1 }, bosses[1])
bosses[2] = concat({ texturePaths.humanoid0, texturePaths.humanoid1 }, bosses[2])
bosses[3] = concat({ texturePaths.undead0, texturePaths.undead1 }, bosses[3])
local eastereggs = {
{ stats.misc, 6*16, 1*16, "Linus, the Developer", behaviour.passive },
{ stats.misc, 4*16, 1*16, "Scanlan, the Bard", behaviour.passive },
{ stats.misc, 2*16, 4*16, "Vax, the Twin", behaviour.passive },
{ stats.misc, 2*16, 3*16, "Vex, the Twin", behaviour.passive },
{ stats.misc, 0*16,10*16, "Grog, the Barbarian", behaviour.passive },
{ stats.misc, 3*16, 4*16, "Percy, the Gunslinger", behaviour.passive },
{ stats.misc, 4*16, 0*16, "Pike, the Cleric", behaviour.passive },
{ stats.misc, 6*16, 7*16, "Keyleth, the Druid", behaviour.passive },
}
for i=1,#eastereggs do
eastereggs[i] = concat({ texturePaths.player0, texturePaths.player1 }, eastereggs[i])
end
local platino = {
{
texturePaths.reptile0,
@ -313,6 +327,10 @@ if(CURRENT_LEVEL > 0) then
end
end
if random(100) == 1 then
enemies[#enemies+1] = eastereggs[random(#eastereggs)]
end
if random(100) == 1 then
enemies = concat(enemies, platino)
end

View File

@ -895,7 +895,7 @@ run_game(void)
hiscore_register(gPlayer, cLevel);
#ifdef STEAM_BUILD
uint8_t details[4] = { (uint8_t) gPlayer->stats.lvl, (uint8_t) cLevel, 0, 0 };
steam_register_score((int) gPlayer->gold, &details, 1);
steam_register_score((int) gPlayer->gold, (int32_t*) &details, 1);
steam_register_kills((int) gPlayer->stat_data.kills, (int32_t*) &details, 1);
#endif // STEAM_BUILD

View File

@ -521,6 +521,9 @@ player_monster_kill_check(Player *player, Monster *monster)
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) {

View File

@ -9,7 +9,8 @@ typedef enum EAchievement
THE_DOCTOR_IS_OUT = 1,
LIGHTS_ON = 2,
BACK_TO_WORK = 5,
DRAGON_SLAYER = 6
DRAGON_SLAYER = 6,
BUGGFIXER = 7
} EAchievement;