a
This commit is contained in:
parent
d163ceb291
commit
f6d7412744
94 changed files with 3836 additions and 1226 deletions
|
|
@ -894,6 +894,7 @@ function resolveNeedsCore(dt) {
|
|||
if (this.dead) return this.variantSprite("fear");
|
||||
if (this.state === "sunbath" || (this.sunbathTimer || 0) > 0.04) return this.sunbathSpriteId ? this.sunbathSpriteId() : "sunbath_1";
|
||||
if (this.sleepDisease) return this.variantSprite("sleep");
|
||||
if (Number(this._bearTrapHoldUntil || 0) > Number(this.world?.time || 0)) return this.variantSprite("hurt");
|
||||
if (this.isZunchiSlave) return this.zunchiSlaveSpriteId();
|
||||
const low = this.lowHealthSprite();
|
||||
if (low) return low;
|
||||
|
|
@ -945,7 +946,8 @@ function resolveNeedsCore(dt) {
|
|||
const next = this.rawSpriteId();
|
||||
const isCurrentIntimidator = this.state === "intimidate" || this.state === "ant_intimidate" || this.intimidateTimer > 0.04;
|
||||
const isCurrentIntimidated = !isCurrentIntimidator && this.intimidatedTimer > 0.04;
|
||||
const forceImmediate = String(next || "").startsWith("zunchi_slave") || next === "birth_ritual" || next === "intimidate" || isCurrentIntimidator || isCurrentIntimidated || (this.visibleSpriteId === "intimidate" && next !== "intimidate");
|
||||
const trappedNow = Number(this._bearTrapHoldUntil || 0) > now;
|
||||
const forceImmediate = trappedNow || String(next || "").startsWith("zunchi_slave") || next === "birth_ritual" || next === "intimidate" || isCurrentIntimidator || isCurrentIntimidated || (this.visibleSpriteId === "intimidate" && next !== "intimidate");
|
||||
if (!this.visibleSpriteId || forceImmediate) {
|
||||
this.visibleSpriteId = next;
|
||||
this.spriteLockUntil = forceImmediate ? now : now + 1.0;
|
||||
|
|
@ -1124,8 +1126,9 @@ function resolveNeedsCore(dt) {
|
|||
|
||||
bubble(text, cooldown = 2.4, color = "rgba(42,36,29,0.78)", options = {}) {
|
||||
if (!options.force && this.world.time < this.nextBubbleAt) return false;
|
||||
const spawned = this.world.spawnBubble(this.x, this.y - this.radius * 1.35, text, color);
|
||||
if (!spawned) return false;
|
||||
this.nextBubbleAt = this.world.time + cooldown;
|
||||
this.world.spawnBubble(this.x, this.y - this.radius * 1.35, text, color);
|
||||
return true;
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue