@zekel/warble-way-galaxy 0.1.0 → 0.1.2
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/dist/dev/index.d.ts +2 -0
- package/dist/dev/index.js +43 -0
- package/dist/dev/index.js.map +1 -0
- package/package.json +18 -3
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Dev hooks for warble-way-galaxy: what the development tools need to know about this
|
|
2
|
+
// game beyond the Game itself (@zekel/dev, harness/devHooks.ts).
|
|
3
|
+
import { moveType } from '@zekel/dev/harness/analysis';
|
|
4
|
+
// ---- Warble Way Galaxy (SOLO RPG on the RPG server) ----
|
|
5
|
+
// One seat → the whole game segments as a single "turn", so per-turn dead/real
|
|
6
|
+
// metrics are degenerate; the meaningful temporal read is the score_trace.
|
|
7
|
+
// leaderScalar mirrors the game's progressScore (../ai.ts) — keep the
|
|
8
|
+
// formulas in sync.
|
|
9
|
+
const warbleWayGalaxyAnalysis = {
|
|
10
|
+
// A11 objective dimension (runbook §0.5): which of the five endings won —
|
|
11
|
+
// per-ending achievement is the health metric for a multi-win-condition game.
|
|
12
|
+
playerFeatures(record) {
|
|
13
|
+
if ((record.result?.winners?.length ?? 0) === 0)
|
|
14
|
+
return [];
|
|
15
|
+
const summary = record.result?.summary ?? '';
|
|
16
|
+
const m = summary.match(/^(FORTUNE|LEGEND|PLUNDER|BOUNTY)/);
|
|
17
|
+
return [`ending:${m ? m[1].toLowerCase() : 'conquest'}`];
|
|
18
|
+
},
|
|
19
|
+
leaderScalar: (row) => (row.credits ?? 0) +
|
|
20
|
+
150 * Math.max(0, (row.level ?? 1) - 1) +
|
|
21
|
+
25 * (row.xp ?? 0) +
|
|
22
|
+
40 * (row.crew ?? 0) +
|
|
23
|
+
300 * Math.max(0, (row.habitat ?? 1) - 1) +
|
|
24
|
+
50 * (row.ship_damage_level ?? 0),
|
|
25
|
+
// A "real turn" contains at least one DECISION (not pure physical reporting).
|
|
26
|
+
isRealTurn(moves) {
|
|
27
|
+
return moves.some((m) => !['report_roll', 'report_card_draw', 'report_res_discard'].includes(moveType(m)));
|
|
28
|
+
},
|
|
29
|
+
// A dead segment made no progress: nothing taken/bought/fought/moved/looted.
|
|
30
|
+
isDeadTurn(moves) {
|
|
31
|
+
const progress = new Set([
|
|
32
|
+
'take_mission', 'accept_mission', 'buy_item', 'attempt_recruit', 'attempt_repair', 'attempt_reduce_unrest',
|
|
33
|
+
'depart_for_next_habitat', 'fight_round', 'attempt_hack', 'attempt_escape', 'board_ship', 'take_ship',
|
|
34
|
+
'enter_ruin', 'setup_encounter', 'move_being', 'attack', 'collect_item', 'recruit_at', 'convert_attacker',
|
|
35
|
+
'level_up', 'use_item', 'report_card_draw',
|
|
36
|
+
]);
|
|
37
|
+
return !moves.some((m) => progress.has(moveType(m)));
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
export const devHooks = {
|
|
41
|
+
analysis: warbleWayGalaxyAnalysis,
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dev/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,iEAAiE;AAIjE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,2DAA2D;AAC3D,+EAA+E;AAC/E,2EAA2E;AAC3E,sEAAsE;AACtE,oBAAoB;AACpB,MAAM,uBAAuB,GAAqB;IAChD,0EAA0E;IAC1E,8EAA8E;IAC9E,cAAc,CAAC,MAAM;QACnB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAC3D,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC;QAC7C,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,kCAAkC,C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U,EAAE,UAAU,EAAE,kBAAkB;SAC3C,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAiB;IACpC,QAAQ,EAAE,uBAAuB;CAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zekel/warble-way-galaxy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Warble Way Galaxy, a Zekel Games board game, as a game module for the zekel MCP server.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./dev": {
|
|
21
|
+
"types": "./dist/dev/index.d.ts",
|
|
22
|
+
"default": "./dist/dev/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./*": {
|
|
25
|
+
"types": "./dist/*.d.ts",
|
|
26
|
+
"default": "./dist/*.js"
|
|
19
27
|
}
|
|
20
28
|
},
|
|
21
29
|
"files": [
|
|
@@ -27,10 +35,17 @@
|
|
|
27
35
|
"access": "public"
|
|
28
36
|
},
|
|
29
37
|
"peerDependencies": {
|
|
30
|
-
"@zekel/game-kit": "^0.1.0"
|
|
38
|
+
"@zekel/game-kit": "^0.1.0",
|
|
39
|
+
"@zekel/dev": "^0.1.1"
|
|
40
|
+
},
|
|
41
|
+
"peerDependenciesMeta": {
|
|
42
|
+
"@zekel/dev": {
|
|
43
|
+
"optional": true
|
|
44
|
+
}
|
|
31
45
|
},
|
|
32
46
|
"devDependencies": {
|
|
33
|
-
"@zekel/game-kit": "^0.1.0"
|
|
47
|
+
"@zekel/game-kit": "^0.1.0",
|
|
48
|
+
"@zekel/dev": "^0.1.1"
|
|
34
49
|
},
|
|
35
50
|
"engines": {
|
|
36
51
|
"node": ">=22.13.0"
|