v0.1.8: 万物皆是插件 + 全应用审计修复(60+ 缺陷歼灭)
插件协议:
- CotycPlugin Manifest(dependencies/conflicts/protected/install/uninstall)
- PluginManager:安装序确定性/依赖拒绝/异常回滚/追踪型上下文(卸载全摘钩子)
- 三核心插件常驻(Systems/Data/Events);插件清单/安装移除/启停广播
- EventPoolRegistry 多池合并;facade about/query('plugins')/plugin 订阅
- 设置页插件清单(含卸载按钮、核心保护);examplePlugin 开发范本入仓
全应用审计修复(引擎 39 + UI/主进程 40 双路清单,P0→P2 歼灭):
- P0:单亲 rollRoots 崩/插件事件软锁(findEvent 查池)/fire 覆盖幸存事件/
facade 未赋值(act 目录 6/24 生效→全量接通)/packOverride 死实现真接管/
4 能力卡无接线(trib/apprentice/tournament/season)/读档 rowid 方言崩溃/
buildApprentice 空候选崩/插件安装无回滚/trait 加成从未消费/DEV 双跑破坏时序
- P1:定时器幸存/advance in-flight 闸/battle 暂停/tournament 点将真传/
史书 memo 依赖/面板 hooks 顺序违规/远征 squad 残留 id/跨档状态残留/
toast 自清除/读档错误提示/导入后重载世界/pendingEvent 读档回填
- P2:版本三处统一/NewGame 随机收编/学费错误文案/姓氏池去重/
功法品阶错位(凡阶哨兵)/功法定价对齐/market 白名单校验/
战利功法去重/回声漏封缄/clock 迭代快照/core 事件池保护/
渡劫陨落走真突破/寄读 desc 诚实化/doas 死代码清理等 30 项
测试 239→256;金钟罩复验(防御批零漂移)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Element } from '../types/domain'
|
||||
import { Character } from '../types/domain'
|
||||
import { Element, type Character } from '../types/domain'
|
||||
import { techniqueById } from './techniques'
|
||||
|
||||
export type AspirationEffectType = 'cult' | 'battle' | 'market' | 'field' | 'offspring' | 'rep'
|
||||
@@ -58,7 +57,7 @@ export const ASPIRATIONS: Record<string, AspirationDef> = {
|
||||
yun: {
|
||||
id: 'yun',
|
||||
name: '云游',
|
||||
desc: '天地为庐:修炼 -3%,但多见奇景(际遇更频)。',
|
||||
desc: '天地为庐:修炼 -3%,所见所闻略广。',
|
||||
icon: '云',
|
||||
effect: { type: 'cult', value: -0.03 }
|
||||
}
|
||||
@@ -71,15 +70,6 @@ export function aspirationById(id: string | undefined): AspirationDef | null {
|
||||
return ASPIRATIONS[id] ?? null
|
||||
}
|
||||
|
||||
export function countAspiration(type: AspirationEffectType, members: Character[]): number {
|
||||
let n = 0
|
||||
for (const c of members) {
|
||||
const def = aspirationById(c.aspiration)
|
||||
if (def?.effect.type === type) n++
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
export function fitBonusOf(c: Character): { cult: boolean; battle: boolean } {
|
||||
const tech = techniqueById(c.techniqueId)
|
||||
if (!tech) return { cult: false, battle: false }
|
||||
|
||||
@@ -15,7 +15,7 @@ export interface NpcFamilyDef {
|
||||
|
||||
export const NPCS: NpcFamilyDef[] = [
|
||||
{
|
||||
id: 'n-xuanying', name: '玄影沈氏', region: '北岳玄影峰', style: '剑修世家', desc: '隐于北岳的剑修吕氏,剑意凛冽,最为孤傲。',
|
||||
id: 'n-xuanying', name: '玄影沈氏', region: '北岳玄影峰', style: '剑修世家', desc: '隐于北岳的剑修沈氏,剑意凛冽,最为孤傲。',
|
||||
leaderRealm: 'foundation', initialPower: 240, powerGrowth: [4, 10],
|
||||
sells: ['weapon-qi', 'weapon-ling'], buys: ['lingcao', 'lingkuang']
|
||||
},
|
||||
|
||||
@@ -116,4 +116,8 @@ export interface TechniqueDef {
|
||||
desc: string
|
||||
}
|
||||
|
||||
export const TECHNIQUE_GRADE_NAMES = ['黄阶', '玄阶', '地阶', '天阶', '仙阶']
|
||||
export const TECHNIQUE_GRADE_NAMES = ['凡阶', '黄阶', '玄阶', '地阶', '天阶', '仙阶']
|
||||
|
||||
export function techniqueGradeName(grade: number): string {
|
||||
return TECHNIQUE_GRADE_NAMES[grade] ?? '?'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user