From b9b95d9427e412d94bf4d2163e75a8ff1851b390 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 16:56:05 +0000 Subject: [PATCH 1/4] Initial plan From 38b7b43b6fb08504cb88c9a729c64d1bbbc65761 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 17:14:08 +0000 Subject: [PATCH 2/4] remove armor subtype and filter etc action in soldoros doll mod --- mods/soldoros_doll/src/index.test.ts | 3 +++ mods/soldoros_doll/src/index.ts | 33 ++++++++++++++++++++++++++-- packages/pvf-mod/src/equ.ts | 12 ++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/mods/soldoros_doll/src/index.test.ts b/mods/soldoros_doll/src/index.test.ts index f758e0f..bd35d59 100644 --- a/mods/soldoros_doll/src/index.test.ts +++ b/mods/soldoros_doll/src/index.test.ts @@ -63,6 +63,9 @@ test("soldoros mod creates a doll APC overlay and list entry", async () => { assert.ok(aiCharacterListOverlay); assert.match(String(summonApcOverlay.content), /\[minimum info\][\s\S]*索德罗斯/u); assert.match(String(summonApcOverlay.content), /\[attack damage rate\]\r?\n1\.0/u); + assert.doesNotMatch(String(summonApcOverlay.content), /\[armor subtype\]/u); + assert.match(String(summonApcOverlay.content), /\[etc action\][\s\S]*action\/ex\.act/u); + assert.doesNotMatch(String(summonApcOverlay.content), /ex2\.act/u); assert.match( String(aiCharacterListOverlay.content), /1520\t`_jojochan\/swordman\/soldoros\/soldoros_doll\.aic`/u, diff --git a/mods/soldoros_doll/src/index.ts b/mods/soldoros_doll/src/index.ts index fa7e39c..2262c6c 100644 --- a/mods/soldoros_doll/src/index.ts +++ b/mods/soldoros_doll/src/index.ts @@ -7,6 +7,7 @@ import { isStatement, loadListedPathById, readEquDocument, + removeTopLevelSection, replaceTopLevelSection, updateListedPathDocument, } from "@pvf/pvf-mod"; @@ -80,13 +81,41 @@ function replaceMinimumInfoName( export function buildSupportSummonDollDocument( sourceDocument: EquDocument, ): EquDocument { - return replaceTopLevelSection( - replaceMinimumInfoName(sourceDocument, SUPPORT_SUMMON_DOLL_NAME), + const withName = replaceMinimumInfoName(sourceDocument, SUPPORT_SUMMON_DOLL_NAME); + const withDamageRate = replaceTopLevelSection( + withName, createSingleFloatLiteralSection( "attack damage rate", SUPPORT_SUMMON_ATTACK_DAMAGE_RATE, ), ); + const withoutArmorSubtype = removeTopLevelSection(withDamageRate, "armor subtype"); + return filterEtcAction(withoutArmorSubtype); +} + +function filterEtcAction(document: EquDocument): EquDocument { + const etcActionSection = getFirstSection(document.children, "etc action"); + + if (!etcActionSection) { + return document; + } + + const filteredSection: EquSectionNode = { + ...etcActionSection, + children: etcActionSection.children.filter((child) => { + if (!isStatement(child)) { + return true; + } + + return !child.tokens.some( + (token) => + (token.kind === "string" || token.kind === "identifier") && + token.value.endsWith("ex2.act"), + ); + }), + }; + + return replaceTopLevelSection(document, filteredSection); } export async function tryFindAiCharacterByName( diff --git a/packages/pvf-mod/src/equ.ts b/packages/pvf-mod/src/equ.ts index bf8caf9..ef605cb 100644 --- a/packages/pvf-mod/src/equ.ts +++ b/packages/pvf-mod/src/equ.ts @@ -103,6 +103,18 @@ export function replaceTopLevelSection( }; } +export function removeTopLevelSection( + document: EquDocument, + name: string, +): EquDocument { + return { + ...document, + children: document.children.filter( + (node) => !isSection(node) || node.name !== name, + ), + }; +} + export function createSingleStringSection(name: string, value: string): EquSectionNode { return createSection(name, [createStatement([createStringToken(value)])]); } From e6c518879deed5cb5bbb97d7b7e3d34af12d98b1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 17:15:31 +0000 Subject: [PATCH 3/4] use exact path match for ex2.act filter --- mods/soldoros_doll/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/soldoros_doll/src/index.ts b/mods/soldoros_doll/src/index.ts index 2262c6c..e5e4f80 100644 --- a/mods/soldoros_doll/src/index.ts +++ b/mods/soldoros_doll/src/index.ts @@ -110,7 +110,7 @@ function filterEtcAction(document: EquDocument): EquDocument { return !child.tokens.some( (token) => (token.kind === "string" || token.kind === "identifier") && - token.value.endsWith("ex2.act"), + token.value === "action/ex2.act", ); }), }; From 487041369304e1cce2a0d92522ef662bf456eab9 Mon Sep 17 00:00:00 2001 From: hzy <28915578+hzy@users.noreply.github.com> Date: Fri, 10 Apr 2026 20:56:11 +0800 Subject: [PATCH 4/4] Fix format issue --- mods/soldoros_doll/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/soldoros_doll/src/index.ts b/mods/soldoros_doll/src/index.ts index e5e4f80..9f2c47c 100644 --- a/mods/soldoros_doll/src/index.ts +++ b/mods/soldoros_doll/src/index.ts @@ -109,8 +109,8 @@ function filterEtcAction(document: EquDocument): EquDocument { return !child.tokens.some( (token) => - (token.kind === "string" || token.kind === "identifier") && - token.value === "action/ex2.act", + (token.kind === "string" || token.kind === "identifier") + && token.value === "action/ex2.act", ); }), };