balatro-cli
v1.1.0
Published
CLI poker roguelike (Balatro-style) with server-log aesthetic
Maintainers
Readme
Poker Roguelike CLI
Command-line poker roguelike inspired by Balatro (小丑牌). All output is styled as server logs so it looks like monitoring output.
Requirements
- Node.js 18+
Install & Run
全局安装后一键启动:
npm install -g balatro-cli
balatro-cli本地开发运行:
node bin/start.js
# or
npm startHow to play
- Goal: Each round (blind) has a target score. Play 5-card poker hands to reach it before you run out of hands (4) and discards (4).
- Flow: 8 Antes; each Ante has Small Blind, Big Blind, and Boss Blind. Beat the target in a blind to get money and enter the shop. Win Ante 8 Boss to win.
- Shop: Buy Jokers (passive effects), Planet cards (upgrade a hand type), Vouchers (+1 joker slot, etc.), or refresh. Jokers apply in order: +chips left, +mult middle, ×mult right.
- Input:
- During a round: type 5 card positions (1–8), e.g.
1 3 5 6 8to play those cards, ordiscard 2 5to discard cards 2 and 5. - Small/Big blind:
fto fight,sto skip (get a tag, no money/shop). - Shop:
1/2buy joker,pplanet,vvoucher,rrefresh,qleave.
- During a round: type 5 card positions (1–8), e.g.
- 关闭提示: 启动时设置环境变量
POKER_HIDE_HINTS=1可关闭操作提示;或在出牌阶段输入/hint(或hint、/提示)随时切换提示开关。
Test
npm test测试覆盖:牌堆与手牌、牌型判定、计分与小丑牌效果(加筹码/加倍率/乘倍率、对子加成、未弃牌、每张小丑)、星球牌等级、商店(购买/出售小丑、星球牌、优惠券、刷新)、盲注配置、回合出牌与弃牌、CLI 解析。塔罗牌/幻灵牌当前未实现,故无对应单测。
Project layout
src/logStyle.js– log-style formattersrc/deck.js– deck, deal, play, discardsrc/handRank.js– 5-card hand detectionsrc/scoring.js– score = chips × mult, joker ordersrc/jokers.js– joker definitions and effectssrc/blinds.js– ante/blind targets and debuffssrc/round.js– single blind round loopsrc/shop.js– shop and purchasessrc/cli.js– readline inputsrc/index.js– main game loop
