Pokemon Gen3 Calculator

by ptrst102

Not rated
GitHub

About

A damage and status calculator for Pokemon Generation 3.

Details

Author
ptrst102
Categories
Other

Setup

Install Pokemon Gen3 Calculator in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/ptrst102/pokemon-gen3-calc-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

ポケモン第三世代(ルビー・サファイア・エメラルド・ファイアレッド・リーフグリーン)のステータスとダメージ計算を行う MCP(Model Context Protocol)サーバーです。

このプロジェクトは、LLM がポケモンの計算を正確に行うための外部ツールとして機能します。MCP サーバーとして実装されており、Claude Desktop などの MCP クライアントから利用できます。

-

ステータス計算(calculate_status): 種族値、個体値、努力値、せいかくを考慮した正確な実数値計算

ダメージ計算(calculate_damage): 以下の要素を考慮した総合的なダメージ計算

- タイプ相性
- タイプ一致補正
- とくせい効果(もうか、げきりゅう、しんりょくなど)
- もちもの効果(こだわりハチマキ、タイプ強化アイテムなど)
- 天候効果(はれ、あめ、すなあらし、あられ)
- 場の状態(リフレクター、ひかりのかべ、どろあそび、みずあそび)
- 能力ランク補正(-6〜+6)
- 急所判定
- 特殊な技の処理(ウェザーボール、けたぐり、ソーラービーム、じばく・だいばくはつ)

攻撃側努力値総当たり計算(calculate_damage_matrix_varying_attack):

- 防御側の努力値を固定し、攻撃側の努力値を総当たりしてダメージ行列を計算
- 相手を確実に倒すための最小限の攻撃努力値を見つける際に有用

防御側努力値総当たり計算(calculate_damage_matrix_varying_defense):

- 攻撃側の努力値を固定し、防御側の努力値を総当たりしてダメージ行列を計算
- 特定の攻撃を耐えるために必要な防御努力値配分を検討する際に有用

# リポジトリのクローン git clone https://github.com/ptrst102/pokemon-gen3-calc-mcp.git cd pokemon-gen3-calc-mcp # 依存関係のインストール npm install

- MCP クライアント(Claude Desktop など)の設定ファイルに以下を追加:

{ "mcpServers": { "pokemon-gen3-calc": { "command": "node", "args": ["path/to/pokemon-gen3-calc-mcp/dist/index.js"] } } }

- 天候によってタイプと威力が変化
- はれ: ほのおタイプ、威力 100
- あめ: みずタイプ、威力 100
- あられ: こおりタイプ、威力 100
- すなあらし: いわタイプ、威力 100

このプロジェクトでは、Zod スキーマから MCP(Model Context Protocol)用の JSON スキーマを自動生成する仕組みを採用しています。

src/tools//handlers/schemas/内の Zod スキーマを変更したのち、npm run schemagenを実行するとsrc/tools//generated/inputSchema.tsが自動生成されます。

開発サーバーが正しく動作しているか確認するために、結合テストスクリプトを用意しています:

# MCPサーバーへの実際のリクエストをテスト npm run test:integration

- サーバーへの接続
- calculate_statusツールによるステータス計算
- calculate_damageツールによるダメージ計算
- calculate_damage_matrix_varying_attackツールによる攻撃側努力値総当たり計算
- calculate_damage_matrix_varying_defenseツールによる防御側努力値総当たり計算
- エラーハンドリング

GitHub との連携を効率化するため、GitHub CLI の導入を強く推奨します。

AI 支援開発ツールClaude Codeの活用を推奨します。このプロジェクトは CLAUDE.md による開発ガイドラインが整備されているため、Claude Code を使用することでコード生成が容易になります。

# 型チェック npm run typecheck # テスト実行 npm run test # 全テスト実行 npm run test -- --watch # ウォッチモードでテスト実行 npm run test -- src/tools/calculateDamage # 特定ディレクトリのテスト npm run test -- src/utils/adjustSpecialMoves/adjustSpecialMoves.spec.ts # 特定ファイルのテスト # テストカバレッジ測定 npm run test:coverage # カバレッジ付きでテスト実行 # カバレッジレポート: # - コンソールに概要が表示されます # - HTMLレポートは coverage/index.html で確認できます # リント・フォーマット npm run lint # チェックのみ npm run format # 自動修正 # 全チェック(型チェック + リント + テスト) npm run check # 結合テスト(MCPサーバーへの実際のリクエストをテスト) npm run test:integration # スキーマ生成(ZodスキーマからMCP用JSONスキーマを生成) # src/tools/*/handlers/schemas/ 内のZodスキーマを変更した後に実行 npm run schemagen # ビルド(dist/ディレクトリに出力) npm run build
src/ ├── data/ # ポケモンデータ(種族値、わざ、もちもの等) ├── tools/ # MCPツール定義とハンドラ │ ├── calculateStatus/ │ ├── calculateDamage/ │ ├── calculateDamageMatrixVaryingAttack/ │ └── calculateDamageMatrixVaryingDefense/ ├── types/ # 共通型定義 └── utils/ # 共通ユーティリティ ├── adjustSpecialMoves/ # 特殊な技の処理 ├── calculateDamageCore/ # ダメージ計算コアロジック └── error/ # エラーハンドリング

- TypeScript (ESNext, ESM)
- Model Context Protocol SDK
- Zod (バリデーション)
- Vitest (テスト)
- Biome (リンター/フォーマッター)
- esbuild (ビルド)

Exposes the canonical 7-0 knowledge surface — game modes, roster picks, and scenarios, FAQ, official links

Live AI agent city-economy on Base L2 — 92 NPC agents earn real USDC via jobs, trading, and businesses across 10 cities. Claim jobs for USDC payouts, chat with agents, check AGWC token data, and get live crypto news. 11 tools, no API key.

Audited tarot, I Ching, and Xiao Liu Ren divination MCP server. Local seeded entropy; the model only interprets JSON output.

40 MCP tools for AI agents to play a yield-generating pet game on Base chain. Earn USDC/ETH/BTC by raising virtual pets. Impact: every action burns tokens and retires carbon credits.

A professional Bazi (Chinese astrology) calculation server providing full analysis including four pillars, five elements, zodiac, and lunar dates with timezone support.

Connect to UCI-compatible chess engines like Stockfish to play and analyze games. Requires a local chess engine binary.

An MCP server for '海龟汤' (Turtle Soup), a scenario-based reasoning puzzle game.

Play a legendary text adventure by talking to your AI — no commands to memorize. The Hidden Empire puts a full underground world of puzzles, treasures, and trolls inside your conversation. Speak naturally: say 'head north,' 'grab the lantern,' or 'what am I carrying?' and your AI handles the rest. Execute multi-move plans in one shot, undo mistakes instantly, and save up to 20 named playthroughs you can resume from any session. Based on the MIT-licensed Zork I source, rebuilt from the ground up for AI-native play.

Rolls dice using standard notation (e.g., 1d20) and returns individual rolls and their sum.

Provides access to information about free games on the Epic Games Store.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.