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

clown-card-cli

v1.0.1

Published

A command-line Balatro-like card game

Readme

🃏 小丑牌 CLI

一个命令行版的 Balatro 风格扑克牌 Roguelike 游戏!

npm version npm license

功能特性

  • 🎴 完整的扑克牌系统
  • ♠ 各种牌型判断(对子、顺子、同花、炸弹等)
  • 🎭 30 种不同的小丑牌,具有各种加成效果
  • 🏪 商店系统,可以购买和出售小丑牌
  • 📈 难度递进系统(盲注)
  • 💾 存档系统

快速开始

全局安装(推荐)

npm install -g clown-card-cli
clown-card

使用 npx 直接运行

npx clown-card-cli

本地开发

git clone https://github.com/gyxiaoz/clown-card-cli.git
cd clown-card-cli
npm install
npm start

游戏玩法

  1. 出牌:选择 1-5 张牌来组成一个牌型
  2. 弃牌:丢弃不需要的牌,换取新牌
  3. 收集小丑牌:在商店购买各种具有特殊效果的小丑牌
  4. 出售小丑牌:在商店出售不需要的小丑牌(售价为原价的 1/3)
  5. 达到分数目标:在回合结束前达到所需分数即可进入下一轮

计分规则

最终得分 =(牌面筹码 + 牌型基础筹码 + 小丑牌 chipBonus)×(牌型基础倍率 + 小丑牌 multBonus)

牌面筹码

  • 2–10:牌面数字(2=2、3=3…10=10)
  • J/Q/K/A:都是 10
  • 只计算构成牌型的牌,不计算所有打出的牌

牌型说明

| 牌型 | 分数基准 | 倍率 | |------|---------|------| | 高牌 | 5 | x1 | | 对子 | 10 | x2 | | 两对 | 20 | x2 | | 三条 | 30 | x3 | | 顺子 | 30 | x4 | | 同花 | 35 | x4 | | 葫芦 | 40 | x4 | | 炸弹 | 60 | x7 | | 同花顺 | 100 | x8 | | 皇家同花顺 | 100 | x8 | | 五同 | 120 | x12 |

小丑牌稀有度

  • 普通 - 灰色(16 张)
  • 稀有 - 绿色(8 张)
  • 史诗 - 蓝色(4 张)
  • 传说 - 金色(2 张)

项目结构

clown-card-cli/
├── src/
│   ├── index.js          # 游戏入口
│   ├── game.js           # 游戏状态管理
│   ├── cards.js          # 扑克牌核心逻辑
│   ├── handEvaluator.js  # 牌型判断
│   ├── jokers.js         # 小丑牌系统
│   ├── ui.js             # 命令行界面
│   └── save.js           # 存档系统
├── package.json
└── README.md

技术栈

  • Node.js (ES Modules)
  • chalk - 终端颜色
  • inquirer - 交互式命令行界面

License

MIT