feedback5 WK: a placeable 自选 summon works end to end — the client finds data/backups.json tokens where it looks up a summon (game lookups, detail card, renderer), the match harness's legacy checks read the player's data view; a test slots 凯尔希 (kit list widened for the test): her Mon3tr stack comes to the hand when she is deployed, places, and the battle fields it as her variant
Golden unchanged.
This commit is contained in:
1 parent
01d5fa3e94
commit
476b926da3
5 files changed
+52
-7
No files matched your search
@@ -26,6 +26,12 @@ export function useGameData() {
|
||||
return useMemo(() => makeLookups(ready), [ready]);
|
||||
}
|
||||
|
||||
/** A 自选 operator's summon record (data/backups.json `tokens`, 0.2.0), or null. */
|
||||
export function diyToken(id) {
|
||||
const t = typeof id === 'string' ? data.get('backups')?.tokens : null;
|
||||
return t && Object.hasOwn(t, id) ? t[id] : null;
|
||||
}
|
||||
|
||||
/** Non-hook lookups (for event handlers). */
|
||||
export function makeLookups(ready = true) {
|
||||
return {
|
||||
@@ -39,7 +45,8 @@ export function makeLookups(ready = true) {
|
||||
enemy: (k) => data.lookup('enemies', k),
|
||||
boss: (id) => data.lookup('bosses', id),
|
||||
stage: (id) => data.lookup('stages', id),
|
||||
token: (id) => data.lookup('tokens', id),
|
||||
// (a 自选 operator's summons are data/backups.json tokens — 0.2.0, the hand piece of a placeable one)
|
||||
token: (id) => data.lookup('tokens', id) || diyToken(id),
|
||||
effect: (id) => data.lookup('effects', id),
|
||||
garrison: (id) => data.lookup('garrisons', id),
|
||||
factions: data.get('factions'),
|
||||
|
||||
Reference in new issue
Block a user