- [NEW] Cat's Life

This commit is contained in:
2024-07-25 10:16:57 +02:00
parent 1f6ce61ee2
commit 8c8449fb16
10 changed files with 107 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ namespace actor
static bool room_changed = false;
int brilli_brilli=0;
draw::surface *brilli;
int current_tag = 0;
void resetTag()
@@ -1567,10 +1567,12 @@ namespace actor
int partsCollected = 0;
bool roomVisited[MAX_ROOMS];
int livesLost = 0;
int catsLifeOdds = 5;
void reset()
{
partsCollected = livesLost = 0;
catsLifeOdds = 5;
for (int i=0; i<MAX_ROOMS; ++i) roomVisited[i] = false;
}
@@ -1587,6 +1589,17 @@ namespace actor
}
int getLivesLost() { return livesLost; }
bool catsLife()
{
if ( (rand()%catsLifeOdds) == 0) {
catsLifeOdds *= 2;
return true;
} else {
return false;
}
}
}
}