1.6
This commit is contained in:
parent
ee22e1a929
commit
88f618cadf
55 changed files with 1299 additions and 447 deletions
|
|
@ -243,6 +243,15 @@ function createTemperatureComfortActionSpec() {
|
|||
if (!target) return false;
|
||||
t.target = target;
|
||||
if (distXY(t.x, t.y, target.x, target.y) < Math.max(24, (t.radius || 20) * 0.9)) {
|
||||
const shelter = target.shelterItem && !target.shelterItem.dead
|
||||
? target.shelterItem
|
||||
: ((target.type === "nest_box" || target.type === "pipe") ? target : null);
|
||||
if (shelter && (shelter.type === "nest_box" || shelter.type === "pipe")) {
|
||||
if (typeof t.enterNestBox === "function" && t.enterNestBox(shelter, dt, { purpose: "temperature" })) {
|
||||
t.thought = shelter.type === "pipe" ? "土管の中で気温をしのいでいる" : "巣箱の中で気温をしのいでいる";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
const next = this.selectTarget(t, world, { force: true, requireComfort: true });
|
||||
if (!next || distXY(t.x, t.y, next.x, next.y) < Math.max(28, (t.radius || 20))) return "finished";
|
||||
t.target = next;
|
||||
|
|
@ -439,7 +448,7 @@ function createIntimidateEnemyActionSpec() {
|
|||
const rival = ctx.target ?? this.selectTarget(t, world, ctx);
|
||||
if (!isLiveTarinaiEntity(rival) || rival === t || rival.isTarinaiChampion) return false;
|
||||
t.setActionState?.("intimidate", { target: rival, reason: this.label, sleeping: false });
|
||||
t.intimidateTimer = Math.max(t.intimidateTimer || 0, 0.85);
|
||||
t.intimidateTimer = Math.max(t.intimidateTimer || 0, 0.42);
|
||||
return true;
|
||||
},
|
||||
tick(t, world) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue