# msw-combat-system

Reference guide for the 2D combat pipeline in MSW. Helps implement attack collision, damage calculation, hit reactions, and monster AI.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 9800 installs · ★ 38
- Author: MSW-Git
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/MSW-Git/msw-ai-coding-plugins-official/tree/HEAD/plugins/msw-maker-base-skill/skills/msw-combat-system/SKILL.md
- Updated: 2026-10-06
- HTML: https://affpapa.org/en/nevibecode/skills/msw-combat-system

## What it does

This skill supplies the native API surface for MapleStory Worlds 2D combat built on `mlua`. It details the interaction between `AttackComponent` and `HitComponent`, handling Box, Circle, and Polygon hitboxes. It covers damage resolution hooks like `CalcDamage` and `CalcCritical`, along with camera shake, knockback, and sprite flash.

Monster logic integrates `StateComponent` finite state machines and `AIComponent` behavior trees. Certain mechanics like piercing strikes and hit count limits lack native engine support. You must track them manually inside custom script tables.

Never append `@ExecSpace` annotations when overriding `IsAttackTarget` or `IsHitTarget`. Doing so triggers runtime error `LEA-3014 SignatureMismatch` because the parent method leaves the execution space unspecified.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add MSW-Git/msw-ai-coding-plugins-official --skill msw-combat-system -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/msw-combat-system/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/msw-combat-system/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add MSW-Git/msw-ai-coding-plugins-official --skill msw-combat-system -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/msw-combat-system/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add MSW-Git/msw-ai-coding-plugins-official --skill msw-combat-system -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/msw-combat-system/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install MSW-Git/msw-ai-coding-plugins-official msw-combat-system
```

2. **Manually: put the files in place**
- File: `.github/skills/msw-combat-system/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add MSW-Git/msw-ai-coding-plugins-official --skill msw-combat-system -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/MSW-Git/msw-ai-coding-plugins-official --path plugins/msw-maker-base-skill/skills/msw-combat-system
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/msw-combat-system/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add MSW-Git/msw-ai-coding-plugins-official --skill msw-combat-system -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/MSW-Git/msw-ai-coding-plugins-official/tree/HEAD/plugins/msw-maker-base-skill/skills/msw-combat-system/SKILL.md

## When to use it
- resolve melee and ranged attacks with AttackComponent shapes
- hook custom damage formulas into CalcDamage and CalcCritical
- build monster decision trees with AIComponent and FSM states
- trigger hit stop, screen shake, and hit effects natively

## Example prompts
- How do I set up a BoxShape melee strike using AttackComponent in MSW?
- Show how to override IsAttackTarget without triggering LEA-3014
- Explain the setup for an AIComponent behavior tree in MSW

## Similar
- [Vector-Based Space Combat System](https://affpapa.org/en/nevibecode/prompts/vector-based-space-combat-system.md) — prompt · ★ 174597
- [godot-combat-system](https://affpapa.org/en/nevibecode/skills/godot-combat-system.md) — skill · 507 installs
- [msw](https://affpapa.org/en/nevibecode/skills/msw.md) — skill · 842 installs
- [design-action-combat](https://affpapa.org/en/nevibecode/skills/design-action-combat.md) — skill · 1300 installs
- [team-combat](https://affpapa.org/en/nevibecode/skills/team-combat.md) — skill · 443 installs
- [roblox-luau](https://affpapa.org/en/nevibecode/skills/roblox-luau.md) — skill · 6100 installs

From the same set: [msw-git/msw-ai-coding-plugins-official](https://affpapa.org/en/nevibecode/by/msw-git/msw-ai-coding-plugins-official.md) — 14 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
