搜索

PythonReactSEOPDF
GitHub Skill

diplomacy-skill

Diplomacy system work for civ-game (foreign economy/development/military simulation, treaties, alliances/organizations, relations like colony or subject, diplomatic actions, and diplomacy UI or events). Use when implementing or modifying diplomacy logic, diplomatic AI, treaties or agreements, nation relations/organization systems, foreign market calculations, or DiplomacyTab UX in this repo.

HkingAuditore☆ 10 仓库 Stars1 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Diplomacy Skill

Overview

Implement and extend the game's diplomacy system: nation relations, treaties, alliances or organizations, foreign economy development and military simulation, plus diplomacy UI and events.

Workflow

  1. Clarify the feature scope: treaties, relations, organizations, foreign market simulation, or AI behavior.
  2. Review existing diplomacy logic and configs; load references/diplomacy-files.md.
  3. Define or adjust the data model for relations, treaties, organizations, and foreign markets.
  4. Implement logic in src/logic/diplomacy and related economy or military modules.
  5. Update configs, events, and UI to surface new actions and effects.
  6. Ensure exports are wired through src/logic/index.js or src/components/index.js when needed.
  7. Validate with lint or build when feasible.

Design Rules

  • Follow repo conventions: 4-space indent, semicolons, React 19 + Vite + Tailwind.
  • Keep diplomacy logic in src/logic/diplomacy; shared helpers in src/utils.
  • Prefer config-driven definitions for treaties, actions, or organizations.
  • Add short Chinese comments only for non-obvious logic.

Core Capabilities

Treaties and agreements
  • Model treaty types (non-aggression, investment, free trade) with terms, duration, and effects.
  • Gate player actions and AI evaluation in aiDiplomacy and the diplomacy UI.
Relations and statuses
  • Represent relation states (ally, rival, colony, subject) with clear transitions and modifiers.
  • Centralize relation math and validation in nations.js or utils.
Organizations and blocs
  • Support membership rules, shared effects, and triggers (e.g., alliances or free trade zones).
  • Keep organization effects composable so multiple blocs can stack.
Foreign simulation
  • Track foreign market supply and demand, industry development, and military capacity.
  • Separate deterministic simulation from UI; keep AI decisions in aiDiplomacy, aiEconomy, and aiWar.

Resources

references/
  • references/diplomacy-files.md: map of relevant files and where to make changes.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!