ewrogers/megadev-skills

megadev-combat

Implement attack resolution, directional guards, damage, invulnerability and knockback in Megadev Sega CD games.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/ewrogers/megadev-skills --skill megadev-combat

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Megadev combat

Start with the game's rules: who can damage whom, active windows, guard direction, interruptions, repeated contacts, simultaneous hits and what death removes. The Lab's court, sword, shields, opponents, controls, music and balance are illustrations. Do not copy them into a different game unless its brief calls for them.

co_* is portable application code, not a Megadev combat API. Inspect the selected ewrogers/megadev:latest headers before using SDK or BIOS services. Keep the game's existing simulation clock, animation owner, collision geometry and rendering/audio services; combat consumes their state and emits outcomes.

guards, interruption and deterministic simultaneous outcomes.

knockback, Main/Sub boundaries and VBlank publication.

  • Validation: executable cases, target checks and the

limits of emulator evidence.

Essential contracts:

  • Use simulation poses/events for active hitboxes; never advance combat from

rendering or sound callbacks. A visible weapon and its active reach should agree.

  • Assign an attack instance a lifetime. Track which targets it has contacted;

define whether a block or invulnerable contact consumes that instance's hit. Slot reuse needs a generation or an equivalent retirement rule.

  • Specify resolution ordering before optimizing. A stable gather/apply pass can

permit mutual hits without making actor iteration order decide the winner. Decide explicitly whether multiple simultaneous sources stack or coalesce.

  • Distinguish hit stun, invulnerability, knockback and guard recovery. Define

whether hurt/death interrupts an attack and clears its future events.

  • Test directional blocks with incoming projectile velocity, not just the

owner's current position. Reuse swept collision for fast projectiles; this Lab's four-pixel step and six-pixel bolt are a bounded discrete example.

  • Bound total candidates, pools, catch-up and event storage. On pool exhaustion,

use the game's explicit policy rather than allocating in a hot loop.

Combat Lab is self-contained and supports a second configured pad. Install no competing controller scanner or interrupt handler into an existing game. megadev-animation owns poses/events; megadev-collision owns sweeps/rays/sliding; megadev-ai owns decisions; megadev-gameplay owns clocks, movement and pools. This skill owns how combat contacts become outcomes.

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills