p
This commit is contained in:
parent
d14550dad6
commit
63e10af865
86 changed files with 5400 additions and 1209 deletions
|
|
@ -242,6 +242,10 @@
|
|||
if (typeof applyNeedShock === "function") applyNeedShock(o, { safety: 12, health: 6 });
|
||||
const damageToThis = fightHeadbuttDamage(o, this, this.world, "to-this");
|
||||
const damageToOther = fightHeadbuttDamage(this, o, this.world, "to-other");
|
||||
this._achievementLastFightAttackerId = o.id;
|
||||
this._achievementLastFightDamageAt = this.world.time || 0;
|
||||
o._achievementLastFightAttackerId = this.id;
|
||||
o._achievementLastFightDamageAt = this.world.time || 0;
|
||||
this.damage(damageToThis, "\u55a7\u5629");
|
||||
o.damage(damageToOther, "\u55a7\u5629");
|
||||
this.world.maybeDefeatFromFightDamage?.(this, o, damageToThis);
|
||||
|
|
@ -567,7 +571,10 @@
|
|||
const aggression = Math.max(0, this.currentPersonality?.aggression || 0);
|
||||
if ((this.world.time || 0) >= (this.nextAntAttackAt || 0)) {
|
||||
this.nextAntAttackAt = (this.world.time || 0) + 0.34;
|
||||
if (Number.isFinite(this.target.hp)) this.target.hp = Math.max(0, this.target.hp - (this.outgoingDamage ? this.outgoingDamage(4.6 + aggression * 3.4) : (4.6 + aggression * 3.4)));
|
||||
if (Number.isFinite(this.target.hp)) {
|
||||
globalThis.TarinaiAchievements?.recordAntDamageSource?.(this.target, this, { world: this.world, reason: "tarinai_attack" });
|
||||
this.target.hp = Math.max(0, this.target.hp - (this.outgoingDamage ? this.outgoingDamage(4.6 + aggression * 3.4) : (4.6 + aggression * 3.4)));
|
||||
}
|
||||
this.fearTimer = Math.max(this.fearTimer, 0.12);
|
||||
this.thought = "\u30a2\u30ea\u3092\u653b\u6483\u3057\u3066\u3044\u308b";
|
||||
if (deterministicChance(this.world, "ant-attack-bubble", 0.55, this, this.target)) this.bubble("!", 0.8, "rgba(145,68,52,0.76)");
|
||||
|
|
@ -698,6 +705,7 @@
|
|||
this.dead = true;
|
||||
this.deathReason = finalReason;
|
||||
this.world.deadCount += 1;
|
||||
globalThis.TarinaiAchievements?.recordDeath?.({ world: this.world, tarinai: this, reason: finalReason, fromDamage: Boolean(opts.fromDamage), achievementDangerKill: Boolean(opts.achievementDangerKill) });
|
||||
this.world.lastDeathAt = this.world.time || 0;
|
||||
if (!Array.isArray(this.world.recentDeathTimes)) this.world.recentDeathTimes = [];
|
||||
this.world.recentDeathTimes.push(this.world.lastDeathAt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue