This commit is contained in:
33333-33333 2026-06-29 21:02:04 +09:00
commit e00bfd8879
51 changed files with 1203 additions and 833 deletions

View file

@ -277,25 +277,6 @@ function createPanicEscapeActionSpec() {
};
}
function createFleeActionSpec() {
return {
id: "flee",
need: "safety",
subNeed: "avoid",
state: "flee",
label: "\u5371\u306a\u3044\u3082\u306e\u304b\u3089\u96e2\u308c\u3066\u3044\u308b",
phrase: "\u96e2\u308c\u305f",
weight: 40,
selectTarget(t, world) { return findNearbyDanger(world, t, 220); },
canStart: basicCanStartWithTarget,
start(t, world, ctx = {}) {
const danger = ctx.target ?? this.selectTarget(t, world, ctx);
t.setActionState?.("flee", { target: t.panicDestination?.(danger), reason: this.label, wake: true, sleeping: false });
return true;
},
tick: updatePanicBehavior,
};
}
function createApproachFriendActionSpec() {
return {
@ -473,7 +454,6 @@ const TARINAI_ACTION_DEFINITIONS = [
createRestActionSpec(),
createSunbathActionSpec(),
createPanicEscapeActionSpec(),
createFleeActionSpec(),
{
id: "hide_at_owned_structure",
need: "safety",