Belly churns after gurgles
This commit is contained in:
1 parent
430e076b44
commit
9172d63b97
3 files changed
+11
-2
No files matched your search
+1
-1
@@ -150,7 +150,7 @@ The areas which will expand based on how full the character is and their progres
|
||||
| `null` | The null that will expand. |
|
||||
| `scaleMax` | The scale (in percent) that will be added at maximum. Know that a scale of 100 is the normal scale of an animation. |
|
||||
|
||||
The first expand area is treated as the belly: it breathes, jiggles when smacked, rubbed or fed, and is where stage-up effects and gained weight come from.
|
||||
The first expand area is treated as the belly: it breathes, jiggles when smacked, rubbed or fed, churns when it gurgles, and is where stage-up effects and gained weight come from.
|
||||
|
||||
### interactTypes, interactAreas
|
||||
`interactTypes` is an object of interaction types by name, giving each type's defaults. Rub, Smack, Kiss and Turn Around come from common. A type gets a button on the taskbar only if one of the character's areas uses it. `interactAreas` is a list of the concrete areas on a character which can be interacted with; usually for belly rubs, kisses, etc. Each area names its `type` and takes all of that type's settings, changing whichever it gives itself.
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
constexpr float BREATH_AMPLITUDE = 1.5f;
|
||||
constexpr float BREATH_SPEED = 2.2f;
|
||||
constexpr float CHURN_JIGGLE = 0.8f;
|
||||
constexpr float CHURN_TIME = 0.75f;
|
||||
constexpr float JIGGLE_DAMPING = 0.12f;
|
||||
constexpr float JIGGLE_STIFFNESS = 0.18f;
|
||||
constexpr float SWAP_STEP = 0.5f;
|
||||
@@ -250,7 +252,12 @@ void Body::update(std::vector<Event>& events)
|
||||
}
|
||||
values_clamp();
|
||||
if (is_chance(traits.gurgleChance * capacity_percent_get() * traits.gurgleCapacityMultiplier))
|
||||
{
|
||||
audio->play(character->sounds[SOUND_GURGLE]);
|
||||
churn = (int)(CHURN_TIME * TICK_RATE);
|
||||
}
|
||||
if (churn > 0)
|
||||
jiggle_add(random_get(-CHURN_JIGGLE, CHURN_JIGGLE) * churn-- / (CHURN_TIME * TICK_RATE));
|
||||
if (int current = stage_get(stats.weight); current != stage)
|
||||
stage_set(current);
|
||||
|
||||
|
||||
+3
-1
@@ -75,7 +75,8 @@ struct Toast
|
||||
class Play;
|
||||
|
||||
// The character's body: its stats, digestion and stages, and the animations they choose. The belly (the first expand
|
||||
// area) breathes and jiggles on a spring, and freeze holds the body still for a hit's few ticks.
|
||||
// area) breathes and jiggles on a spring, churning for a while after each gurgle, and freeze holds the body still for
|
||||
// a hit's few ticks.
|
||||
class Body
|
||||
{
|
||||
public:
|
||||
@@ -90,6 +91,7 @@ public:
|
||||
float jiggle = 0;
|
||||
float jiggleVelocity = 0;
|
||||
float talkTime = 0;
|
||||
int churn = 0;
|
||||
int freeze = 0;
|
||||
int stage = 0;
|
||||
bool isBlinking = false;
|
||||
|
||||
Reference in new issue
Block a user