项目会自动检测环境:
- npm 安装的 Claude Code → 使用 Node.js FNV-1a 哈希
- Native/Bun 安装 → 使用 Bun.hash
无论哪种环境,配置文件路径都是 ~/.claude.json。
bun scripts/find-buddy.js [参数...]
# 参数
--species <值> 物种(必选至少一个条件)
--rarity <值> 稀有度
--eye <值> 眼睛
--hat <值> 帽子
--shiny 金色闪光版
--not-shiny 非闪光版
--limit <数字> 最大搜索次数(默认500万)
--count <数字> 返回结果数(默认1)# 传奇金色龙王
bun scripts/find-buddy.js --species dragon --rarity legendary --shiny
# 史诗企鹅 + 光环
bun scripts/find-buddy.js --species penguin --rarity epic --hat halo
# 稀有幽灵 + 巫师帽 + 返回10个结果
bun scripts/find-buddy.js --species ghost --rarity rare --hat wizard --count 10编辑 scripts/buddy-max.js 顶部的筛选条件:
const TARGET_EYE = '◉' // 眼睛
const TARGET_HAT = 'crown' // 帽子
const TARGET_SHINY = true // 是否闪光(true/false)
const TARGET_SPECIES = 'capybara' // 物种
const MAX_CHAOS = 89 // CHAOS 上限(调低=更安静乖巧)
const MAX_SNARK = 89 // SNARK 上限(调低=嘴更甜)然后运行:
node scripts/buddy-max.js该脚本会搜索符合条件的最佳结果,属性总分最高者胜出。
node scripts/verify.js <UID>输出示例:
========== Buddy 验证结果 ==========
UID: 91fb92d017b6afe0dc6cc1343d31679010dc37b4188c56f7d9d047998df2334e
稀有度: ★★★★★ legendary
物种: capybara
眼睛: ◉ 帽子: crown ✨
属性:
DEBUGGING ██████████ 100
PATIENCE ████████░░ 81
CHAOS ████████░░ 76
WISDOM ███████░░░ 74
SNARK ████░░░░░░ 40
总分: 371/421
| 条件组合 | 建议次数 | 概率估算 |
|---|---|---|
| legendary + capybara | 500 万 | 约 5% |
| legendary + shiny + capybara | 5000 万 | 约 0.05% |
| legendary + shiny + capybara + ◉ + crown | 5 亿+ | 约 0.00005% |
条件越多越慢,建议从简单条件开始。
宠物属性由以下公式决定:
seed = hashString(userID + "friend-2026-401")
rng = mulberry32(seed)
rarity = rollRarity(rng) // legendary 概率 1%
species = pick(rng, SPECIES) // 18 选 1
eye = pick(rng, EYES) // 6 选 1
hat = rarity === 'common' ? 'none' : pick(rng, HATS) // 8 选 1
shiny = rng() < 0.01 // 1% 概率
stats = rollStats(rng, rarity) // 峰值/低谷随机分配
所有属性由 hash(userID + SALT) 确定性生成,同一 UID 永远相同。