v0.1.35a: 缺陷歼灭——wonder 崩链/boss 卡队/patch 泄漏/拒单门/衰减/数值平衡 17 条
【高】wonder 全链修复(sendMission/settle/missionById wonders 回退+ExpeditionPanel 合并列表); boss 战败 releaseSquad(整队不再永困 expedition);patchUndo 按插件归属 Map+rollbackPatch(跨 MOD/跨世界不再泄漏) 【中】buyItem 拒单线>池底(0.35>0.25——断供真断供);warFatigue 年首×0.9 衰减(长局不永久冷降); MOD 功法注入 trackedTech 卸载摘除;patch 缺失键 warn;guard>1 钳制 Math.max(0,1-guard); transition 12 处逗号简写→每属性独立时长(0.1.33 动画实际恢复);t-shanling/t-zidian 越级下调;土系恒应(×1.02) 【低】断供计数封顶12/播报 month 修正/era 权重下界 0.05/新贵 id 碰撞 7 位/新字段 normalize 补/ go() 停时器/saveNow 并发锁 【金钟罩】0.1.35 基线重算(warFatigue衰减/池底分离/功法平衡受控变更) 61 例绿
This commit is contained in:
@@ -117,6 +117,9 @@ export function modToPlugin(pack: ModPack): CotycPlugin {
|
||||
// 语义冲突日志:同 id 功法(mergeAdd 跳过内置——提示玩家谁改了什么)
|
||||
const seenT = new Set((dataPack().techniques as Array<{ id: string }>).map((x) => x.id))
|
||||
for (const t of pack.data.techniques) if (seenT.has(t.id)) ctx.world.log('info', `[MOD:${pack.id}] 功法 ${t.id} 同 id 已存在(内置优先,新增跳过)。`)
|
||||
// 0.1.35 A-6:注入即追踪(与插件绑拆——卸载按 id 摘除注入行)
|
||||
const injected = pack.data.techniques.filter((t) => !seenT.has(t.id) && !(pack as unknown as { trackedTech?: Array<string> }).trackedTech?.includes(t.id))
|
||||
;(pack as unknown as { trackedTech: string[] }).trackedTech = [...((pack as unknown as { trackedTech?: string[] }).trackedTech ?? []), ...injected.map((t) => t.id)]
|
||||
ctx.mergeAddPack('techniques', pack.data.techniques as never)
|
||||
}
|
||||
for (const b of pack.data.buildings ?? []) ctx.addBuildingDef(toBuildingDef(b))
|
||||
@@ -127,10 +130,12 @@ export function modToPlugin(pack: ModPack): CotycPlugin {
|
||||
for (const f of pack.data.formations ?? []) ctx.addFormationDef({ ...f, retreatWound: f.retreatWound ?? 1 } as never)
|
||||
for (const t of pack.data.traits ?? []) ctx.addTraitDef({ ...t, danger: t.bonus?.danger ?? 0 } as never)
|
||||
// 0.1.34 MOD 数值 patch 层(仅新档生效;卸载复原——mult 0.5~2 / add 实数)
|
||||
ctx.world.applyModPatch(pack.data.patch ?? [])
|
||||
ctx.world.applyModPatch(pack.data.patch ?? [], `mod-${pack.id}`)
|
||||
},
|
||||
uninstall(ctx2) {
|
||||
ctx2.world.patchUndo.splice(0).forEach((f) => f())
|
||||
ctx2.world.rollbackPatch(`mod-${pack.id}`)
|
||||
const td = (pack as unknown as { trackedTech?: string[] }).trackedTech ?? []
|
||||
if (td.length) ctx2.world.removeInjectedTechniques(td)
|
||||
// 0.1.28 精确回滚:词库池/灾因/配方/世界数值按来源摘除(其余 MOD 共享词条保留)
|
||||
WorldGenPools.removePool(`mod-${pack.id}`)
|
||||
for (const c of pack.data.calamities ?? []) removeCalamityByName(c.name)
|
||||
|
||||
Reference in New Issue
Block a user