mirror of
https://github.com/zyllian/zyllian.github.io.git
synced 2025-01-18 03:32:30 -08:00
pets being unhappy will now drop behavior
This commit is contained in:
parent
5cc0c80444
commit
0e444ec503
2 changed files with 7 additions and 0 deletions
|
@ -80,6 +80,7 @@ embed:
|
||||||
<summary>06/25/2024</summary>
|
<summary>06/25/2024</summary>
|
||||||
<ul>
|
<ul>
|
||||||
<li>pets now are simulated even if the page is unloaded</li>
|
<li>pets now are simulated even if the page is unloaded</li>
|
||||||
|
<li>when pets are unhappy <redacted><!-- their hidden behavior stat drops --></li>
|
||||||
</p>
|
</p>
|
||||||
</details>
|
</details>
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
const HAPPINESS_EMPTY_STOMACH_MODIFIER = -10 / UPDATES_PER_HOUR;
|
const HAPPINESS_EMPTY_STOMACH_MODIFIER = -10 / UPDATES_PER_HOUR;
|
||||||
/** how quickly a pet's happiness will be reduced by when their space is messy, per piece of mess */
|
/** how quickly a pet's happiness will be reduced by when their space is messy, per piece of mess */
|
||||||
const HAPPINESS_MESS_MODIFIER = -5 / UPDATES_PER_HOUR;
|
const HAPPINESS_MESS_MODIFIER = -5 / UPDATES_PER_HOUR;
|
||||||
|
/** how quickly a pet's behavior drops when unhappy */
|
||||||
|
const BEHAVIOR_UNHAPPY_MODIFIER = -5 / UPDATES_PER_HOUR;
|
||||||
|
|
||||||
/** the amount of happiness gained when the pet is fed (excluding when the pet doesn't yet need food) */
|
/** the amount of happiness gained when the pet is fed (excluding when the pet doesn't yet need food) */
|
||||||
const FEED_HAPPINESS = 5;
|
const FEED_HAPPINESS = 5;
|
||||||
|
@ -192,6 +194,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.happiness <= 0) {
|
||||||
|
this.behavior -= BEHAVIOR_UNHAPPY_MODIFIER;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.pottyTimer < 0) {
|
if (this.pottyTimer < 0) {
|
||||||
this.goPotty();
|
this.goPotty();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue