import { CotycPlugin } from '../core/plugin' import { installCoreSystems } from './clocks' import { EVENTS } from '../data/events' import { DEFAULT_PACK } from '../data/registry' /** 内置插件一:镇族基石(12 能力卡与时轮钩子) */ export function makeCoreSystemsPlugin(): CotycPlugin { let unsubs: Array<() => void> = [] return { id: 'core-systems', name: '镇族基石', version: '0.1.8', kind: 'system', protected: true, description: '十二能力卡与时轮钩子:生产/寿元/修炼/探秘/事件/外交/婚育/岁簿/大比/渡劫/寄读/时节。', install(ctx) { unsubs = installCoreSystems(ctx) }, uninstall(ctx) { void ctx unsubs.forEach((u) => u()) unsubs = [] } } } /** 内置插件二:经典数据包(默认平衡表) */ export function makeCoreDataPlugin(): CotycPlugin { return { id: 'core-data', name: '经典数据包', version: '0.1.8', kind: 'data', protected: true, description: '平衡表默认包:境界/物品/功法/建筑/秘境/势力/性格/职事。', install(ctx) { ctx.resetPack() }, uninstall() { void DEFAULT_PACK } } } /** 内置插件三:内建事件池(日常/家国/际遇) */ export function makeCoreEventsPlugin(): CotycPlugin { return { id: 'core-events', name: '内建事件池', version: '0.1.8', kind: 'events', protected: true, description: '命运事件主池:日常/重大/乾坤三层选支事件。', install(ctx) { ctx.addEventPool('core', EVENTS) } } } export const CORE_PLUGINS: CotycPlugin[] = [ makeCoreSystemsPlugin(), makeCoreDataPlugin(), makeCoreEventsPlugin() ]