ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
GitHub 儲存庫 · 發布者 XD3an

pachincode

Claude 撰寫長篇回答與程式碼時會裝滿彈珠的彈珠機:大當たり、右打ち、確変。

已翻譯

關於這個 mod

Claude 撰寫長篇回答與程式碼時玩彈珠機。

PachinCode 是一個 Claude Code mod,會在終端機放入像素風格的彈珠機。Claude 每寫幾個字,就會有一顆彈珠落進你的上皿。hold 燈裝滿後,停止射擊並閱讀回覆。打中大當たり,切換到右打ち來累積分數,下一個問題可以在確変中執行。

功能包括跟隨回覆移動的彈珠、真實的彈珠機物理、holds 與止め打ち、LCD 演出、三種大當たり、右打ち與 PachinPoints、金色回覆、持久化狀態,以及 15 個合成音效片段。

需求:Claude Code 2.1.288 或更新版本、真彩色終端機,以及平台特定的音效支援。

透過外掛 marketplace 安裝:

/plugin marketplace add xd3an/pachincode
/plugin install pachincode@pachincode

也可以從原始碼安裝:git clone https://github.com/XD3an/pachincode.git,接著執行 claude --plugin-dir ./pachincode。命令:/pachinko、/pachinko off、/pachinko mute|unmute、/pachinko stats。MIT 授權。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add XD3an/PachinCode
claude plugin install pachincode
原文 / README

PachinCode

Play pachinko while Claude writes your long answers and code.

License: MIT Claude Code Platform

PachinCode demo

PachinCode is a Claude Code mod. It puts a pixel-art pachinko machine in your terminal. Every few characters Claude writes drop another ball into your tray (上皿). When the hold lamps fill up, you stop shooting and read the reply. Hit a 大当たり, switch to 右打ち to rack up points, and your next question can run in 確変.

Features

  • Balls that follow the reply: every prompt loads 30 balls, and every 4 characters Claude generates adds one more.

  • Real pachinko physics: balls climb the launch rail, clear the top and bounce down through brass pins. A shot too weak to clear the rail rolls back (戻り球) and costs nothing.

  • Holds and 止め打ち: four hold lamps (保留). Once they are full, any ball that goes in is lost, so stop shooting and use the spin to read what Claude just wrote.

  • LCD performances: the central screen has its own scenes for normal play, 予告 (premonitions), リーチ and 大当たり, plus a day–night cycle and changing weather.

  • Three kinds of 大当たり:

    | Kind | Digits | Rounds | Afterwards | |---|---|---|---| | プレミアム | 7-7-7 | 10 | 確変 | | 確変大当たり | odd | 8 | 確変 | | 通常大当たり | even | 5 | back to normal |

    Overall jackpot odds are 1/99, ten times better during 確変 (1/9.9).

  • 右打ち and PachinPoints: during a 大当たり the attacker (大入賞口) opens. Every ball you shoot right into it earns 15 points. Shooting right at any other time does nothing, and the machine tells you to go back to 左打ち.

  • Gold replies: any reply Claude writes during a 大当たり gets a gold frame and a rainbow banner that stay with it for good.

  • Persistent state: PachinPoints, 確変 and gold replies carry over between sessions.

  • Sound: 15 synthesized WAV clips for launches, pins, spins, リーチ, 大当たり and more.

Requirements

  • Claude Code 2.1.288 or later. Function hooks are in early access and the API may change between releases.
  • A terminal with true color (24-bit). Fullscreen mode at 110 columns or wider docks the machine beside the conversation.
  • Sound:
    • Windows: Windows PowerShell 5.1 (built in)
    • macOS: Claude Code's own playback
    • Linux: no sound in the terminal yet

Installation

From the plugin marketplace

/plugin marketplace add xd3an/pachincode
/plugin install pachincode@pachincode

Restart Claude Code. The machine opens after your first prompt, or with /pachinko.

From source

git clone https://github.com/XD3an/pachincode.git
claude --plugin-dir ./pachincode

Loaded this way, Claude Code watches the folder and reloads the plugin whenever you save.

Usage

Controls

| Action | How | |---|---| | Shoot | Hold the left mouse button on the machine, or click the machine once and press Space (tap for one ball, hold for continuous fire) | | Power | ← →, or the 「力−」「力+」 buttons | | 左打ち / 右打ち | L (30%) / R (95%) | | Auto-fire on/off | S |

If your terminal does not report mouse clicks:

  1. Press ctrl+x then tab in the prompt to hand the keyboard to the machine pane.
  2. Use S, F (shoot), A, D, L, R, or click the buttons below the machine.
  3. Press Esc to give the keyboard back to the prompt.

Commands

| Command | What it does | |---|---| | /pachinko or /pachinko on | Open the machine | | /pachinko off | Close the machine | | /pachinko mute / unmute | Turn sound off / on | | /pachinko stats | Show PachinPoints, balls fired and jackpots hit |

Development

Checks and tests

# Check the manifest and the hooks module
claude plugin validate .

# Type-check (.claude-plugin/types is written by Claude Code when it loads the plugin)
npx -p typescript tsc -p .

# Run the tests
claude plugin test .

Regenerating sounds

node tools/make-sounds.mjs          # all clips
node tools/make-sounds.mjs pin warn # only the clips you name

On Windows the running player keeps the loaded WAV files open. Close the machine or quit Claude Code before overwriting them.

Previewing without a terminal

npx esbuild hooks/game/index.ts --bundle --format=esm --outfile=/tmp/machine.mjs
MACHINE=file:///tmp/machine.mjs node tools/preview.mjs ./out 70 36

Contributing

Issues and pull requests are welcome. Please run claude plugin validate . and claude plugin test . before opening a PR.

License

MIT

更多類似作品