Closed caryoscelus closed 7 years ago
You're right in that it is a very crude happiness mechanic. Right now the situation is:
then
then
then
which essentially means you can have an immediate happiness dip that's not reported causing you to lose.
A crude fix would be to make the 'you lose' threshold lower, like 15 or 20. A more robust fix would be to revamp the whole system to make it more obvious why people are unhappy. What would you suggest?
I've included the relevant code. This is lines 397:436 of app/src/state/Main.ts
.
private updateHappiness() {
this.demand.calculateSatisfaction();
this.satisfactionHistory.push(this.demand.satisfaction);
if(this.satisfactionHistory.length > 3){
this.satisfactionHistory.shift();
}
let unconnectedSum = 0;
for(let satisfaction of this.satisfactionHistory){
unconnectedSum += satisfaction.unconnected;
}
let unconnectedAverage = unconnectedSum/this.satisfactionHistory.length;
if(this.demand.satisfaction.unconnected < unconnectedAverage){
this.happiness += 15;
}
for(let event of this.lastEvents){
if(event.outage){
this.happiness -= 15;
}
}
this.happiness -= Math.floor(this.demand.satisfaction.unreliable / 10);
this.happiness = this.happiness * 0.75 + 35.0 * 0.25;
this.happinessHistory.push(this.happiness);
if(this.happinessHistory.length > 5){
this.happinessHistory.shift();
}
let sum = this.happinessHistory.reduce(function(a, b){return a+b});
let average = sum / this.happinessHistory.length;
if(average < 38.0){
this.gameOver("People were unhappy with you for too long.");
return true;
}
return false;
}
I would suggest if(average < 38.0 && this.happinessHistory[3] < HAPPINESS_NEUTRAL && this.happinessHistory[4] < HAPPINESS_NEUTRAL)
and also show final happiness level on game over screen.
Great suggestion! Included in 'must-fix-before-judging'.
Not sure if it's fixed in post-jam version, but it seems to be true for jam.
Perhaps it can be left for hard mode, but i wonder if it's even playable at this point.