msw-combat-system

Implements 2D combat pipelines in MapleStory Worlds using native mLua APIs.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/yoongang02/MapleFist --skill msw-combat-system-yoongang02
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: msw-combat-system
Source: https://github.com/yoongang02/MapleFist/tree/main/.agents/skills/msw-combat-system
Command: npx skills add https://github.com/yoongang02/MapleFist --skill msw-combat-system-yoongang02

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building combat in MapleStory Worlds (MSW) requires wiring together many native APIs — attack resolution, damage calculation, knockback, hit stop, death/revive, and AI — and getting any of them wrong produces silent failures like missing damage numbers, broken hit reactions, or choppy movement. This Skill provides the complete, verified combat integration guide so AI agents and developers implement the full Attack→Hit pipeline correctly the first time. ## Core Features & Use Cases - Full combat pipeline reference: Covers AttackComponent/HitComponent shapes, CalcDamage/CalcCritical hooks, HitEvent payloads, i-frames, per-Body knockback, hit stop, camera shake, sprite flash, SFX, damage skins, and avatar combat motion — all mapped to native MSW APIs. - AI implementation patterns: Documents three native-compatible approaches — FSM via StateComponent, Behaviour Trees via AIComponent with 4 Composite node types, and custom-script AI — with full reference implementations for monsters, bosses, and projectiles. - Antipattern warnings: Flags common failure modes such as direct HP subtraction bypassing HitEvent, timer-based movement, @ExecSpace override mismatches (LEA-3014), and unregistered FSM states (LEA-3005). - Use Case: You are building a 2D roguelike in MapleStory Worlds and need a monster with chase AI, contact damage, an overhead HP bar, knockback on hit, and death handling — follow the monster setup reference and combat pipeline to assemble the .model components and scripts correctly. ## Quick Start Ask the AI to implement a combat-capable monster in MapleStory Worlds with chase AI, hit reactions, and an HP bar using the msw-combat-system guide.

Frequently Asked Questions about msw-combat-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement attack and hit detection in MapleStory Worlds?

Use AttackComponent:Attack with a BoxShape, CircleShape, or PolygonShape plus a CollisionGroup, and place a HitComponent with IsLegacy=false on the defender. Damage flows through CalcDamage hooks and the HitEvent pipeline, which drives damage skins and hit effects automatically.

How do I build monster AI in MapleStory Worlds?

Choose between three native patterns: FSM via StateComponent for simple enemies, Behaviour Trees via AIComponent with Sequence/Selector/RandomSelector/Parallel nodes for complex bosses, or a custom script for behaviors that do not fit AIChase/AIWander. Remove AIChaseComponent and AIWanderComponent from the model when using custom AI.

Why does my MapleStory Worlds monster take damage but show no hit reaction?

Directly subtracting HP bypasses HitEvent, so damage skins, hit effects, IsHitTarget immunity, and OnHit overrides all silently skip. Route damage through AttackComponent so HitEvent fires, or manually call StateComponent:ChangeState("HIT") if bypassing is unavoidable.

Does MapleStory Worlds support projectiles natively?

There is no dedicated projectile system. Implement projectiles as Body-less entities with SpriteRenderer and Transform, move them via TransformComponent:Translate in OnUpdate, and resolve hits through an AttackComponent-derived script calling AttackFrom so the normal HitEvent pipeline applies.

Why does ChangeState fail with LEA-3005 in MapleStory Worlds?

StateComponent only auto-registers IDLE, DEAD, HIT, and MOVE; all other states must be registered via AddState in OnBeginPlay, and names must be uppercase. Calling ChangeState("ATTACK") without prior AddState("ATTACK", AttackStateType) triggers the LEA-3005 InvalidArgument error.

How do I add knockback and hit stop to MSW combat?

Knockback depends on Body type: use AddForce for Rigidbody, MoveVelocity for Kinematicbody and Sideviewbody. Hit stop uses _UtilLogic:SetClientTimeScale for global slow-down or renderer.PlayRate = 0 for individual targets, paired with camera shake via ShakeCamera.