Commit 070c9a9d by krkane

Update Baaskood.c

parent fa1fb5bd
Showing with 10 additions and 0 deletions
...@@ -92,6 +92,16 @@ int Move(int defeated_enemies) ...@@ -92,6 +92,16 @@ int Move(int defeated_enemies)
} }
} }
void handleTrap(Player *player) {
player->health -= 10; // Subtract 10 from player's max health
if (player->health <= 0) {
printf("Kahjuks, sa kaotasid.\n");
exit(0); // Player lost the game
} else {
printf("Sul on alles %d elu.\n", player->health);
}
}
int fight(Player *p, Enemy *e) { int fight(Player *p, Enemy *e) {
int playerHp = p->health; int playerHp = p->health;
int enemyHp = e->health; int enemyHp = e->health;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment