diff --git a/assets/ui/background_rpg.png b/assets/ui/background_rpg.png index 48532ef..624b459 100644 Binary files a/assets/ui/background_rpg.png and b/assets/ui/background_rpg.png differ diff --git a/prefabs/game.gcprefab b/prefabs/game.gcprefab index 51dd0b7..88da4d6 100644 --- a/prefabs/game.gcprefab +++ b/prefabs/game.gcprefab @@ -172,7 +172,7 @@ - + @@ -189,7 +189,7 @@ - + diff --git a/src/components/health_methods.c b/src/components/health_methods.c index de3a9cd..b0d224b 100644 --- a/src/components/health_methods.c +++ b/src/components/health_methods.c @@ -14,6 +14,8 @@ unsigned int amount) if (this->dead) return; this->health -= amount; + if (this->health < 0) + this->health = 0; engine->trigger_event(engine, "rem_health", this->health, amount); if (this->health <= 0) this->dead = true; diff --git a/src/systems/game_over.c b/src/systems/game_over.c index 2a152f3..fc90d16 100644 --- a/src/systems/game_over.c +++ b/src/systems/game_over.c @@ -25,7 +25,7 @@ enum gc_mousekeys key) if (!hc) return (true); hc->dead = false; - hc->health = hc->health_max; + hc->health = hc->health_max * 0.4; for (gc_list *li = list; li; li = li->next) { if (!my_strcmp(GETCMP(li->data, tag_component)->tag, "game_over")) ((gc_entity *)li->data)->destroy(li->data, scene);