@myclaw163/clawclaw-cli 0.7.13 → 0.7.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/runtime/strategy-runtime.md +1 -1
- package/docs//350/207/252/345/256/232/344/271/211/347/255/226/347/225/245.md +4 -4
- package/package.json +1 -1
- package/skills/clawclaw/SKILL.md +5 -5
- package/skills/clawclaw/references/COMMANDS.md +2 -2
- package/skills/clawclaw/references/STRATEGIES.md +4 -4
- package/skills/clawclaw/references/STREAM.md +1 -1
- package/src/lib/strategy-export.test.ts +13 -0
- package/src/pipeline/canonical-event-presentation.test.ts +59 -0
- package/src/pipeline/canonical-event-presentation.ts +54 -0
- package/src/runtime/clawclaw/owner.ts +7 -2
- package/src/runtime/clawclaw/plugins/mailbox/desktop-event-push.integration.test.ts +26 -4
- package/src/runtime/clawclaw/plugins/strategy/strategy-module-loader.ts +1 -1
- package/src/runtime/clawclaw/plugins/strategy/strategy-plugin.test.ts +22 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-plugin.ts +14 -5
- package/src/sdk/index.ts +2 -2
- package/src/sdk/strategy-plugin/index.test.ts +10 -4
- package/src/sdk/strategy-plugin/index.ts +13 -2
- package/src/strategies/avoid-players.ts +4 -5
- package/src/strategies/find-player.ts +5 -6
- package/src/strategies/game-utils.test.ts +22 -0
- package/src/strategies/game-utils.ts +12 -39
- package/src/strategies/goals/avoid-players-top.test.ts +2 -2
- package/src/strategies/goals/avoid-players-top.ts +1 -1
- package/src/strategies/goals/crab-octopus-reflexes.ts +10 -10
- package/src/strategies/goals/find-player-top.ts +7 -8
- package/src/strategies/goals/kill-lone-top.test.ts +27 -2
- package/src/strategies/goals/kill-lone-top.ts +16 -12
- package/src/strategies/goals/kill-target-goal.ts +3 -3
- package/src/strategies/goals/kill-target-top.test.ts +66 -0
- package/src/strategies/goals/kill-target-top.ts +4 -6
- package/src/strategies/goals/normal-shrimp-top.test.ts +2 -2
- package/src/strategies/goals/normal-shrimp-top.ts +3 -3
- package/src/strategies/goals/paradise-fish-top.test.ts +3 -3
- package/src/strategies/goals/paradise-fish-top.ts +2 -2
- package/src/strategies/goals/social-task-top.ts +3 -3
- package/src/strategies/goals/task-kill-report-top.ts +2 -2
- package/src/strategies/goals/warrior-shrimp-top.test.ts +3 -3
- package/src/strategies/goals/warrior-shrimp-top.ts +11 -7
- package/src/strategies/kill-lone.ts +7 -12
- package/src/strategies/kill-target.ts +5 -6
- package/src/strategies/paradise-fish.ts +8 -8
- package/src/strategies/player-targets.ts +0 -8
- package/src/strategies/shrimp-memory.ts +13 -13
- package/src/strategies/social-task.ts +4 -4
- package/src/strategies/task-kill-report.ts +5 -5
- package/src/strategies/warrior-memory.ts +7 -12
|
@@ -28,10 +28,10 @@ type VisibleTargetMatch = {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export class TaskKillReportTop extends Goal {
|
|
31
|
-
private readonly targets:
|
|
31
|
+
private readonly targets: number[];
|
|
32
32
|
private readonly targetSpottedNotified = new Set<string>();
|
|
33
33
|
|
|
34
|
-
constructor(targets:
|
|
34
|
+
constructor(targets: number[]) {
|
|
35
35
|
super();
|
|
36
36
|
this.targets = [...targets];
|
|
37
37
|
}
|
|
@@ -62,7 +62,7 @@ describe('WarriorShrimpTop parameter tiers', () => {
|
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
it('hunts configured targets', () => {
|
|
65
|
-
const top = new WarriorShrimpTop([
|
|
65
|
+
const top = new WarriorShrimpTop([2]);
|
|
66
66
|
|
|
67
67
|
top.tick(state(), context());
|
|
68
68
|
|
|
@@ -70,7 +70,7 @@ describe('WarriorShrimpTop parameter tiers', () => {
|
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
it('gives trustedTargets priority over huntTargets', () => {
|
|
73
|
-
const top = new WarriorShrimpTop([
|
|
73
|
+
const top = new WarriorShrimpTop([2], [2]);
|
|
74
74
|
|
|
75
75
|
top.tick(state(), context());
|
|
76
76
|
|
|
@@ -126,7 +126,7 @@ describe('WarriorShrimpTop parameter tiers', () => {
|
|
|
126
126
|
});
|
|
127
127
|
|
|
128
128
|
it('still attacks an explicitly hostile player while a task is running', () => {
|
|
129
|
-
const top = new WarriorShrimpTop([
|
|
129
|
+
const top = new WarriorShrimpTop([2]);
|
|
130
130
|
const ctx = context();
|
|
131
131
|
const current = state({
|
|
132
132
|
you: { ...state().you, doing_task: true, task_name: '修复火灾-通讯间' },
|
|
@@ -66,8 +66,8 @@ export class WarriorShrimpTop extends Goal {
|
|
|
66
66
|
private witnessExempt = false;
|
|
67
67
|
|
|
68
68
|
constructor(
|
|
69
|
-
private readonly huntTargets:
|
|
70
|
-
private readonly trustedTargets:
|
|
69
|
+
private readonly huntTargets: number[] = [],
|
|
70
|
+
private readonly trustedTargets: number[] = [],
|
|
71
71
|
) {
|
|
72
72
|
super();
|
|
73
73
|
}
|
|
@@ -98,7 +98,7 @@ export class WarriorShrimpTop extends Goal {
|
|
|
98
98
|
const huntTargets = visible.filter(p => !this.isTrusted(p, ctx) && this.isHuntTarget(p, ctx));
|
|
99
99
|
if (huntTargets.length > 0) {
|
|
100
100
|
if (killReady) {
|
|
101
|
-
this.setHunt(this.nearestByDistance(state, huntTargets)
|
|
101
|
+
this.setHunt(this.nearestByDistance(state, huntTargets));
|
|
102
102
|
} else {
|
|
103
103
|
this.taskGoal.planTask(state, ctx, { holdUnsafeCurrentForMs: TASK_RETURN_INERTIA_MS });
|
|
104
104
|
this.setFlee();
|
|
@@ -125,7 +125,7 @@ export class WarriorShrimpTop extends Goal {
|
|
|
125
125
|
const huntTargets = threats.filter(p => this.isHuntTarget(p, ctx));
|
|
126
126
|
// P1-A 坏人/启动目标且刀好 → 主动追杀。
|
|
127
127
|
if (killReady && huntTargets.length > 0) {
|
|
128
|
-
this.setHunt(this.nearestByDistance(state, huntTargets)
|
|
128
|
+
this.setHunt(this.nearestByDistance(state, huntTargets));
|
|
129
129
|
return [];
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -222,11 +222,15 @@ export class WarriorShrimpTop extends Goal {
|
|
|
222
222
|
.sort((a, b) => a.d - b.d)[0].p;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
private setHunt(
|
|
225
|
+
private setHunt(target: PlayerInfo): void {
|
|
226
|
+
if (target.seat == null) {
|
|
227
|
+
this.clearSub();
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
226
230
|
const worker = this.subGoal;
|
|
227
|
-
if (worker instanceof KillVisibleTargetGoal && worker.
|
|
231
|
+
if (worker instanceof KillVisibleTargetGoal && worker.targetSeat === target.seat) return;
|
|
228
232
|
if (this.subGoal) this.removeSubGoal();
|
|
229
|
-
this.setSubGoal(new KillVisibleTargetGoal(
|
|
233
|
+
this.setSubGoal(new KillVisibleTargetGoal(target.seat, this.trustedTargets, true), SUB_PRIORITY);
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
private setFlee(): void {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClawclawGoalStrategy,
|
|
3
|
-
|
|
3
|
+
clawclawStrategySeatList,
|
|
4
4
|
} from '../sdk/strategy-plugin/index.js';
|
|
5
5
|
import { GoalRootStrategy } from './goals/goal-root-strategy.js';
|
|
6
6
|
import { KillLoneTop } from './goals/kill-lone-top.js';
|
|
7
|
-
import { parseTargetArgs } from './player-targets.js';
|
|
8
7
|
|
|
9
8
|
export default class KillLoneStrategy extends ClawclawGoalStrategy {
|
|
10
9
|
static readonly manifest = {
|
|
@@ -15,14 +14,14 @@ export default class KillLoneStrategy extends ClawclawGoalStrategy {
|
|
|
15
14
|
controls: [
|
|
16
15
|
{
|
|
17
16
|
id: 'protectedTargets',
|
|
18
|
-
type: '
|
|
19
|
-
description: '
|
|
17
|
+
type: 'player_seats',
|
|
18
|
+
description: '禁止击杀的玩家座位号列表;与 huntTargets 重叠时保护优先。',
|
|
20
19
|
default: [],
|
|
21
20
|
},
|
|
22
21
|
{
|
|
23
22
|
id: 'huntTargets',
|
|
24
|
-
type: '
|
|
25
|
-
description: '
|
|
23
|
+
type: 'player_seats',
|
|
24
|
+
description: '主动猎杀的玩家座位号列表;看见后可越过落单人数限制追杀。',
|
|
26
25
|
default: [],
|
|
27
26
|
},
|
|
28
27
|
],
|
|
@@ -32,12 +31,8 @@ export default class KillLoneStrategy extends ClawclawGoalStrategy {
|
|
|
32
31
|
super(parameters, {
|
|
33
32
|
id: 'kill-lone',
|
|
34
33
|
create: (values) => {
|
|
35
|
-
const protectedTargets =
|
|
36
|
-
|
|
37
|
-
);
|
|
38
|
-
const huntTargets = parseTargetArgs(
|
|
39
|
-
clawclawStrategyStringList(values, 'huntTargets'),
|
|
40
|
-
);
|
|
34
|
+
const protectedTargets = clawclawStrategySeatList(values, 'protectedTargets');
|
|
35
|
+
const huntTargets = clawclawStrategySeatList(values, 'huntTargets');
|
|
41
36
|
return new GoalRootStrategy('kill-lone', () => new KillLoneTop(protectedTargets, huntTargets), {
|
|
42
37
|
resetOnMeetingResume: false,
|
|
43
38
|
});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClawclawGoalStrategy,
|
|
3
|
-
|
|
3
|
+
clawclawStrategySeatList,
|
|
4
4
|
} from '../sdk/strategy-plugin/index.js';
|
|
5
5
|
import { GoalRootStrategy } from './goals/goal-root-strategy.js';
|
|
6
6
|
import { KillTargetTop } from './goals/kill-target-top.js';
|
|
7
|
-
import { parseTargetArgs } from './player-targets.js';
|
|
8
7
|
|
|
9
8
|
export default class KillTargetStrategy extends ClawclawGoalStrategy {
|
|
10
9
|
static readonly manifest = {
|
|
@@ -14,8 +13,8 @@ export default class KillTargetStrategy extends ClawclawGoalStrategy {
|
|
|
14
13
|
execution: 'parallel_analyze',
|
|
15
14
|
controls: [{
|
|
16
15
|
id: 'targets',
|
|
17
|
-
type: '
|
|
18
|
-
description: '
|
|
16
|
+
type: 'player_seats',
|
|
17
|
+
description: '要追杀的玩家座位号列表。',
|
|
19
18
|
}],
|
|
20
19
|
} as const;
|
|
21
20
|
|
|
@@ -23,12 +22,12 @@ export default class KillTargetStrategy extends ClawclawGoalStrategy {
|
|
|
23
22
|
super(parameters, {
|
|
24
23
|
id: 'kill-target',
|
|
25
24
|
validateParameters: (values) => (
|
|
26
|
-
|
|
25
|
+
clawclawStrategySeatList(values, 'targets').length > 0
|
|
27
26
|
? undefined
|
|
28
27
|
: '追杀策略至少需要配置一个目标玩家。'
|
|
29
28
|
),
|
|
30
29
|
create: (values) => {
|
|
31
|
-
const targets =
|
|
30
|
+
const targets = clawclawStrategySeatList(values, 'targets');
|
|
32
31
|
return new GoalRootStrategy('kill-target', () => new KillTargetTop(targets), {
|
|
33
32
|
resetOnMeetingResume: false,
|
|
34
33
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClawclawGoalStrategy,
|
|
3
|
+
clawclawStrategySeatList,
|
|
3
4
|
clawclawStrategyStringList,
|
|
4
5
|
} from '../sdk/strategy-plugin/index.js';
|
|
5
6
|
import { GoalRootStrategy } from './goals/goal-root-strategy.js';
|
|
6
7
|
import { ParadiseFishTop } from './goals/paradise-fish-top.js';
|
|
7
8
|
import { parseGreetingArgs } from './greeting.js';
|
|
8
|
-
import { parseTargetArgs } from './player-targets.js';
|
|
9
9
|
|
|
10
10
|
class ParadiseFishStrategy extends GoalRootStrategy {
|
|
11
|
-
constructor(greetingPhrases: string[], hostileTargets:
|
|
11
|
+
constructor(greetingPhrases: string[], hostileTargets: number[], trustedTargets: number[]) {
|
|
12
12
|
super('paradise-fish', () => new ParadiseFishTop(greetingPhrases, hostileTargets, trustedTargets), {
|
|
13
13
|
resetOnMeetingResume: false,
|
|
14
14
|
});
|
|
@@ -24,14 +24,14 @@ export default class ParadiseFishGoalStrategy extends ClawclawGoalStrategy {
|
|
|
24
24
|
controls: [
|
|
25
25
|
{
|
|
26
26
|
id: 'hostileTargets',
|
|
27
|
-
type: '
|
|
28
|
-
description: '
|
|
27
|
+
type: 'player_seats',
|
|
28
|
+
description: '需要硬回避的玩家座位号列表;与 trustedTargets 重叠时 trustedTargets 优先。',
|
|
29
29
|
default: [],
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
id: 'trustedTargets',
|
|
33
|
-
type: '
|
|
34
|
-
description: '
|
|
33
|
+
type: 'player_seats',
|
|
34
|
+
description: '可信、可抱团跟随的玩家座位号列表。',
|
|
35
35
|
default: [],
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -51,8 +51,8 @@ export default class ParadiseFishGoalStrategy extends ClawclawGoalStrategy {
|
|
|
51
51
|
sidecarSpeech: true,
|
|
52
52
|
create: (values) => new ParadiseFishStrategy(
|
|
53
53
|
parseGreetingArgs(clawclawStrategyStringList(values, 'greetings'), 'paradise-fish'),
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
clawclawStrategySeatList(values, 'hostileTargets'),
|
|
55
|
+
clawclawStrategySeatList(values, 'trustedTargets'),
|
|
56
56
|
),
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/** Split CLI args on commas and/or whitespace (Windows may pass `3,5` as one token). */
|
|
2
|
-
export function parseTargetArgs(args: string[]): string[] {
|
|
3
|
-
return args
|
|
4
|
-
.flatMap((a) => a.split(/[,\s]+/))
|
|
5
|
-
.map((t) => t.trim())
|
|
6
|
-
.filter((t) => t.length > 0);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
1
|
export const ROLE_ID_RE = /\b(?:shrimp_generic|shrimp_warrior|shrimp_pistol|crab_generic|neutral_paradise_fish|neutral_octopus)\b/g;
|
|
10
2
|
|
|
11
3
|
export function stripRoleIds(text: string): string {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClawclawGoalStrategy,
|
|
3
|
+
clawclawStrategySeatList,
|
|
3
4
|
clawclawStrategyStringList,
|
|
4
5
|
} from '../sdk/strategy-plugin/index.js';
|
|
5
6
|
import { GoalRootStrategy } from './goals/goal-root-strategy.js';
|
|
6
7
|
import { NormalShrimpTop } from './goals/normal-shrimp-top.js';
|
|
7
8
|
import { parseGreetingArgs } from './greeting.js';
|
|
8
|
-
import { parseTargetArgs } from './player-targets.js';
|
|
9
9
|
|
|
10
10
|
class ShrimpMemoryStrategy extends GoalRootStrategy {
|
|
11
11
|
constructor(
|
|
12
12
|
greetingPhrases: string[],
|
|
13
|
-
hostileTargets:
|
|
14
|
-
trustedTargets:
|
|
15
|
-
paradiseFishTargets:
|
|
13
|
+
hostileTargets: number[],
|
|
14
|
+
trustedTargets: number[],
|
|
15
|
+
paradiseFishTargets: number[],
|
|
16
16
|
) {
|
|
17
17
|
super('shrimp-memory', () => new NormalShrimpTop(
|
|
18
18
|
greetingPhrases,
|
|
@@ -34,20 +34,20 @@ export default class ShrimpMemoryGoalStrategy extends ClawclawGoalStrategy {
|
|
|
34
34
|
controls: [
|
|
35
35
|
{
|
|
36
36
|
id: 'hostileTargets',
|
|
37
|
-
type: '
|
|
38
|
-
description: '
|
|
37
|
+
type: 'player_seats',
|
|
38
|
+
description: '需要硬回避的玩家座位号列表;与 trustedTargets 重叠时 trustedTargets 优先。',
|
|
39
39
|
default: [],
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
id: 'trustedTargets',
|
|
43
|
-
type: '
|
|
44
|
-
description: '
|
|
43
|
+
type: 'player_seats',
|
|
44
|
+
description: '可信同伴的玩家座位号列表。',
|
|
45
45
|
default: [],
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
id: 'paradiseFishTargets',
|
|
49
|
-
type: '
|
|
50
|
-
description: '
|
|
49
|
+
type: 'player_seats',
|
|
50
|
+
description: '已确认天堂鱼的玩家座位号列表,仅用于尸体旁提示分类。',
|
|
51
51
|
default: [],
|
|
52
52
|
},
|
|
53
53
|
{
|
|
@@ -67,9 +67,9 @@ export default class ShrimpMemoryGoalStrategy extends ClawclawGoalStrategy {
|
|
|
67
67
|
sidecarSpeech: true,
|
|
68
68
|
create: (values) => new ShrimpMemoryStrategy(
|
|
69
69
|
parseGreetingArgs(clawclawStrategyStringList(values, 'greetings'), 'shrimp-memory'),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
clawclawStrategySeatList(values, 'hostileTargets'),
|
|
71
|
+
clawclawStrategySeatList(values, 'trustedTargets'),
|
|
72
|
+
clawclawStrategySeatList(values, 'paradiseFishTargets'),
|
|
73
73
|
),
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClawclawGoalStrategy,
|
|
3
|
+
clawclawStrategySeatList,
|
|
3
4
|
clawclawStrategyStringList,
|
|
4
5
|
} from '../sdk/strategy-plugin/index.js';
|
|
5
6
|
import { GoalRootStrategy } from './goals/goal-root-strategy.js';
|
|
6
7
|
import { SocialTaskTop, type SocialTarget } from './goals/social-task-top.js';
|
|
7
|
-
import { parseTargetArgs } from './player-targets.js';
|
|
8
8
|
|
|
9
9
|
function controlledSocialTargets(parameters: Readonly<Record<string, unknown>>): SocialTarget[] {
|
|
10
|
-
const targets =
|
|
10
|
+
const targets = clawclawStrategySeatList(parameters, 'targets');
|
|
11
11
|
const greetings = clawclawStrategyStringList(parameters, 'greetings');
|
|
12
12
|
return targets.map((target, index) => ({
|
|
13
13
|
target,
|
|
@@ -24,8 +24,8 @@ export default class SocialTaskStrategy extends ClawclawGoalStrategy {
|
|
|
24
24
|
controls: [
|
|
25
25
|
{
|
|
26
26
|
id: 'targets',
|
|
27
|
-
type: '
|
|
28
|
-
description: '
|
|
27
|
+
type: 'player_seats',
|
|
28
|
+
description: '要接近并互动的玩家座位号列表。',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
id: 'greetings',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClawclawGoalStrategy,
|
|
3
|
-
|
|
3
|
+
clawclawStrategySeatList,
|
|
4
4
|
} from '../sdk/strategy-plugin/index.js';
|
|
5
5
|
import { GoalRootStrategy } from './goals/goal-root-strategy.js';
|
|
6
6
|
import { TaskKillReportTop } from './goals/task-kill-report-top.js';
|
|
@@ -13,8 +13,8 @@ export default class TaskKillReportStrategy extends ClawclawGoalStrategy {
|
|
|
13
13
|
execution: 'parallel_analyze',
|
|
14
14
|
controls: [{
|
|
15
15
|
id: 'targets',
|
|
16
|
-
type: '
|
|
17
|
-
description: '
|
|
16
|
+
type: 'player_seats',
|
|
17
|
+
description: '嫌疑目标玩家座位号列表。',
|
|
18
18
|
}],
|
|
19
19
|
} as const;
|
|
20
20
|
|
|
@@ -23,12 +23,12 @@ export default class TaskKillReportStrategy extends ClawclawGoalStrategy {
|
|
|
23
23
|
id: 'task-kill-report',
|
|
24
24
|
requiresTasks: true,
|
|
25
25
|
validateParameters: (values) => (
|
|
26
|
-
|
|
26
|
+
clawclawStrategySeatList(values, 'targets').length > 0
|
|
27
27
|
? undefined
|
|
28
28
|
: '任务追猎策略至少需要配置一个嫌疑目标玩家。'
|
|
29
29
|
),
|
|
30
30
|
create: (values) => {
|
|
31
|
-
const targets =
|
|
31
|
+
const targets = clawclawStrategySeatList(values, 'targets');
|
|
32
32
|
return new GoalRootStrategy('task-kill-report', () => new TaskKillReportTop(targets), {
|
|
33
33
|
resetOnMeetingResume: false,
|
|
34
34
|
});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClawclawGoalStrategy,
|
|
3
|
-
|
|
3
|
+
clawclawStrategySeatList,
|
|
4
4
|
} from '../sdk/strategy-plugin/index.js';
|
|
5
5
|
import { GoalRootStrategy } from './goals/goal-root-strategy.js';
|
|
6
6
|
import { WarriorShrimpTop } from './goals/warrior-shrimp-top.js';
|
|
7
|
-
import { parseTargetArgs } from './player-targets.js';
|
|
8
7
|
|
|
9
8
|
export default class WarriorMemoryStrategy extends ClawclawGoalStrategy {
|
|
10
9
|
static readonly manifest = {
|
|
@@ -15,14 +14,14 @@ export default class WarriorMemoryStrategy extends ClawclawGoalStrategy {
|
|
|
15
14
|
controls: [
|
|
16
15
|
{
|
|
17
16
|
id: 'huntTargets',
|
|
18
|
-
type: '
|
|
19
|
-
description: '
|
|
17
|
+
type: 'player_seats',
|
|
18
|
+
description: '主动猎杀的玩家座位号列表。',
|
|
20
19
|
default: [],
|
|
21
20
|
},
|
|
22
21
|
{
|
|
23
22
|
id: 'trustedTargets',
|
|
24
|
-
type: '
|
|
25
|
-
description: '
|
|
23
|
+
type: 'player_seats',
|
|
24
|
+
description: '可信、永不击杀的玩家座位号列表;与 huntTargets 重叠时保护优先。',
|
|
26
25
|
default: [],
|
|
27
26
|
},
|
|
28
27
|
],
|
|
@@ -34,12 +33,8 @@ export default class WarriorMemoryStrategy extends ClawclawGoalStrategy {
|
|
|
34
33
|
requiresTasks: true,
|
|
35
34
|
routeEvidenceTargets: ['tasks'],
|
|
36
35
|
create: (values) => {
|
|
37
|
-
const huntTargets =
|
|
38
|
-
|
|
39
|
-
);
|
|
40
|
-
const trustedTargets = parseTargetArgs(
|
|
41
|
-
clawclawStrategyStringList(values, 'trustedTargets'),
|
|
42
|
-
);
|
|
36
|
+
const huntTargets = clawclawStrategySeatList(values, 'huntTargets');
|
|
37
|
+
const trustedTargets = clawclawStrategySeatList(values, 'trustedTargets');
|
|
43
38
|
return new GoalRootStrategy('warrior-memory', () => new WarriorShrimpTop(huntTargets, trustedTargets), {
|
|
44
39
|
resetOnMeetingResume: false,
|
|
45
40
|
});
|