npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fangu-wenxian

v0.7.2

Published

《凡骨问仙》——终端文字修仙冒险游戏:测灵根、拜宗门、修功法、历奇遇,逆天改命,渡劫飞升。

Readme

《凡骨问仙》终端文字冒险游戏

一个凡人,从山村走出,测灵根、拜宗门、炼气筑基、结丹化神,历经机缘与劫难, 在红颜知己的相伴下,最终渡劫飞升……

TypeScript 编写,核心逻辑与 UI 分离,当前跑在终端,已预留网页迁移路径。

快速开始

npm install        # 安装开发依赖(typescript / @types/node / tsx)
npm run dev        # 开发模式直接运行(tsx)
# 或
npm run build      # 编译到 dist/
npm start          # 运行编译产物
npm run playtest   # 自动通关一局(文案 QA 用,可跟 1-4 指定剧本)

玩法

  • 开局三选:命运剧本(4 种,各带贯穿全程的专属主线)→ 觅长生式天赋点加点(出身/资质/灵根/体质/经历)→ 宗门(10 大门派,剑/道/佛/魔/丹/器/符/阵/双修/散修全覆盖)。
  • 世界纪年:玄启纪元,世界大事挂在绝对年份上——青崖英杰会(5 年一届,限筑基以下)、四海拍卖大会(10 年)、甲子灵潮(60 年)、玄阴魔乱/沉星海眼/天门虚影等一次性大事,过窗即永久错过,状态栏常驻「下一大事」提示。
  • 主线剧情:4 剧本共 53 个剧情节点铺满炼气→渡劫九大境界;触发看年龄窗/境界窗/前置 flag;抉择写 flag、几百年后仍有回响;冲太快或走太慢都会错过内容(配错过反馈);渡劫期按一生抉择收束出不同终章。
  • 传音投递:红颜家书与求援、宗门嘉勉、亡命暗信、江湖战书……条件满足后延迟送达,剧情主动找上门。
  • 修炼养成:闭关(1/3/5/10 年)→ 突破小/大境界;功法 51 门(凡/灵/仙三品)、熟练度四阶、残篇参悟;丹毒系统(深了会触发走火剧情)。
  • 宗门系统:任务(三层文案+冷却+境界窗,失败扣贡献)/捐献 → 晋升职阶 → 宗门大比(按纪年 3 年一届)→ 挑战宗主 → 宗门战争;叛宗有追杀(也有专属剧情与求和路)。
  • 四艺副业:炼丹/炼器/阵法/符箓,拜师、奇遇或拜入对应宗门解锁。
  • 红颜系统:主线专属女主 + 游历邂逅;八种性格各有整套对白(交谈/论道/赠礼/重逢/来信全场景查表),好感 40/70 各有一段专属小剧情,好感≥80 结为道侣(双修/护关/共渡天劫)。
  • 人生大事记:机缘、抉择、错过、突破全程自动立传;结局(飞升/殒身/寿尽)输出整部年表,飞升成功率与结语按一生 flag 结算。

项目结构

src/
  index.ts          入口:装配终端 IO 与引擎
  io.ts             GameIO 接口(核心逻辑只依赖这个抽象)
  terminal.ts       终端版 GameIO(Node readline + ANSI)
  colors.ts         ANSI 颜色(渲染层)
  store.ts          存档持久化(含旧档字段迁移)
  types.ts          核心类型与状态定义(含 flag/大事记/传音/纪年)
  content.ts        静态数值数据 + 属性推导
  content/          内容层(文案与数据,可独立增删)
    story.ts        主线节点库(4 剧本 + 共用系统节点)
    world.ts        纪元/起始年/地点池
    dialogue.ts     性格×场景对白矩阵(8 性格 × 13 场景)
    letters.ts      传音信件库
    tasks.ts        宗门任务库(三层文案)
    spells.ts       神通库(71 式:五行/品阶/灵气消耗/效果组合/画面描写)
  core/             调度与逻辑层(不依赖终端)
    storyline.ts    主线调度器(触发窗/flag/错过反馈)
    chronicle.ts    世界纪事 + 传音投递管道
    text.ts         占位符填充/高亮/纪年/大事记
    rng.ts          随机工具
    character.ts    角色生成、测灵根
    cultivate.ts    修炼、小境界自动晋升、大境界突破(金丹/元婴/入道)、渡劫与结局收束
    combat.ts       战斗引擎(灵气/后继无力/五行三乘区/效果组合/规则开关/面板)
    explore.ts      游历、随机事件调度
    events.ts       游历事件表(61 个事件,剧本/flag 感知)
    market.ts       坊市
    crafts.ts       四艺副业
    sect.ts         宗门系统
    romance.ts      女主/道侣(对白矩阵接入)
    engine.ts       主循环、菜单、编排
docs/
  剧情引擎与文案设计.md   调度层设计、文案规范与扩展指南
  战斗与数值设计.md       成长曲线、五行、神通库、战斗引擎与三层境界机制
playtest.ts         自动通关驱动器(文案 QA)

架构:如何迁移到网页

核心逻辑(src/core/、src/content*、src/types.ts)不依赖终端,只依赖 GameIO 接口。 迁移网页时只需替换三个适配层,其余代码一行不改:

| 适配层 | 终端实现 | 网页替换 | | --- | --- | --- | | I/O | terminal.ts(readline) | 写一个 WebIO(DOM 按钮/输入框)实现 GameIO | | 颜色 | colors.ts(ANSI 转义) | 让 c() 返回 HTML <span> 或纯文本 | | 存档 | store.ts(fs 文件) | 换成 localStorage |

扩展方向

  • 数值层:每个大境界一层新机制(丹品/灵机引擎/入道)、神通「后继无力」、渡劫战斗化、闭关绑定洞府
  • 更多世界大事、红颜专属剧情线、宗门存亡线
  • 存档版本迁移与校验