This commit is contained in:
2026-04-28 19:36:39 +08:00
parent a9febe7678
commit f0471a4f8d
206 changed files with 18456 additions and 10133 deletions

View File

@@ -1,5 +1,5 @@
import { AnimationState } from '../../../types';
import type { StateFunctionSource } from '../types';
import type { StateFunctionRuntimeSource } from '../types';
/**
* idle_rest_focus
@@ -7,7 +7,7 @@ import type { StateFunctionSource } from '../types';
* 空闲状态下的原地恢复动作。它不会推进遭遇,而是给玩家一个
* 在非战斗场景里回收少量血蓝的缓冲回合。
*/
export const IDLE_REST_FOCUS_FUNCTION_SOURCE: StateFunctionSource = {
export const IDLE_REST_FOCUS_FUNCTION_SOURCE: StateFunctionRuntimeSource = {
definition: {
id: 'idle_rest_focus',
state: 'idle',
@@ -46,5 +46,21 @@ export const IDLE_REST_FOCUS_FUNCTION_SOURCE: StateFunctionSource = {
category: 'recovery',
active: true,
},
runtime: {
buildSuggestedActionText({ metrics }) {
if (metrics.playerHpRatio <= 0.35) {
return '原地打坐恢复气血';
}
if (metrics.playerManaRatio <= 0.35) {
return '盘坐调息恢复灵力';
}
return '原地调息整理状态';
},
getPriority({ metrics }) {
return metrics.playerHpRatio <= 0.35 || metrics.playerManaRatio <= 0.35
? 8
: 2;
},
},
};