Added upgrades

This commit is contained in:
wincent
2024-06-02 15:43:35 +02:00
parent d5b2278dc5
commit 364bcf822a
17 changed files with 531 additions and 14 deletions

View File

@@ -973,7 +973,7 @@ void GameMessages::SendResurrect(Entity* entity) {
if (levelComponent) {
int32_t healthToRestore = levelComponent->GetLevel() >= 45 ? 8 : 4;
if (healthToRestore > destroyableComponent->GetMaxHealth()) healthToRestore = destroyableComponent->GetMaxHealth();
destroyableComponent->SetHealth(healthToRestore);
destroyableComponent->SetHealth(destroyableComponent->GetMaxHealth());
int32_t imaginationToRestore = levelComponent->GetLevel() >= 45 ? 20 : 6;
if (imaginationToRestore > destroyableComponent->GetMaxImagination()) imaginationToRestore = destroyableComponent->GetMaxImagination();