- [NEW] Cat's Life
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user