# Divergence Declarations

**Enforcement:** implementation discipline — this file owns no evidence row; the resolved conflict is recorded in the progress ledger.

Where this project's skill pipeline intentionally diverges from guidance that arrives from outside this package — `msw-combat-system`'s generic defaults, another external skill, or the target project's own documented conventions. See [../../SKILL.md](../../SKILL.md) for the Reference Catalog.

Two precedence directions live here and they are not the same rule. Against a generic external skill, this package wins. Against the target project's own documented and approved procedure, the project wins. Record either resolution in the progress ledger with the source that was inspected.

## ⚠ Absolute Precedence Rule

**If there is any overlap, similarity, or conflict between the guidelines of `msw-combat-system` and this skill (`maplestory-skill-maker`), you MUST strictly follow this file and this skill's `SKILL.md`**. They represent project-specific overrides that take absolute precedence over general engine-native guidelines.

- **Player attack skills bypass `AttackComponent:Attack()`/`HitComponent`/`HitEvent` entirely — manual overlap detection + manual damage application instead.**
  - **Shape**: the Player Adapter Component `extends Component` (not `AttackComponent`), and the Registry Logic's type handler uses `CollisionSimulator:OverlapBoxAll(...)` as the sole detection mechanism, with no `Attack()`/`AttackFast()` call. Damage is applied immediately through `target.Monster:TakeDamage(attacker, totalDamage, hitCount, damageSkinInterval, skinId, presentationDelay)` instead of `HitEvent`/`HandleHitEvent`; the final argument delays presentation, not HP judgment. `skinId` defaults to the attacker's own `DamageSkinSettingComponent.DamageSkinId.DataId` (see [../combat/damage-presentation.md](../combat/damage-presentation.md)'s Manual Damage & Damage-Skin Rule).
  - **Related consequences**:
    - `_DamageSkinService:Play(...)` is the primary damage-skin path for every player attack skill, not a fallback (see [../combat/damage-presentation.md](../combat/damage-presentation.md)'s Manual Damage & Damage-Skin Rule).
    - The judgment step applies damage via the direct `TakeDamage` call, not `Attack()` (see [../combat/targeting.md](../combat/targeting.md)'s Runtime Sequence).
    - There are no `IsAttackTarget`/`CalcDamage`/`CalcCritical`/`GetDisplayHitCount` overrides on the attacker — each staggered timer callback acts on exactly one captured target, so there is no shared native judgment call to isolate.
    - Hit-reaction avatar animation and any `IsHitTarget`-based immunity that the native `HitEvent`/`HitComponent` path would have driven need an explicit manual trigger if a skill needs them (per `msw-combat-system` §2-3's own warning about bypassing `HitEvent`) — note this before assuming parity with the native path.
  - **Why (design, independent of the bug)**: even if the `CollisionGroup` pairing were fixed, the native path caps how much per-skill control is possible over damage-skin timing. `GetDisplayHitCount`'s pop-to-pop stagger is driven by the **attacker's** `DamageSkinSettingComponent.DelayPerAttack` — a single property on the player entity, shared by every attack that entity makes, not a per-skill field. With multiple skills coexisting on one attacker, they would all be forced to share one `DelayPerAttack` value — one skill could not pop at `0.08s` intervals while another pops at `0.2s`, since both write the same shared property. Calling `_DamageSkinService:Play(...)` manually from the skill's own timers removes this ceiling entirely: each skill's pop interval is just its own `damageSkinInterval` property, fully independent of every other skill's. This reason holds even in a hypothetical world where the `CollisionGroup` bug didn't exist — it is why manual dispatch is the better design, not just a workaround.
  - **Why (bug)**: a skill's damage failing to land on monsters traces back to the fact that `AttackComponent:Attack(shape, attackInfo, cg)` (per `Environment/NativeScripts/Component/AttackComponent.d.mlua`) only registers a hit against a target whose **`HitComponent.CollisionGroup`** equals the passed `cg` — and `HitComponent.CollisionGroup` defaults to `CollisionGroups.HitBox` (per `HitComponent.d.mlua`), not `CollisionGroups.Monster`. No `.mlua` script in this project ever sets a monster's `HitComponent.CollisionGroup`, so `Attack(shape, attackInfo, CollisionGroups.Monster)` silently found zero hits even when `CollisionSimulator:OverlapBoxAll("Monster", ...)` (used for the earlier candidate/targeting pass) correctly found candidates in range — two different collision-group namespaces that only coincidentally share the human-readable name "Monster". The user decided to stop depending on this pairing being correctly configured (in the `.model`/map JSON, outside script reach) and instead make the whole hit pipeline self-contained in script.
  - **Scope**: this reversal is about the **player's own attack-skill damage pipeline** (the Player Adapter's request relay + the Registry Logic's type handlers — see [framework.md](framework.md)). The monster's own contact attack against the player (`CollisionGroups.Player`) has the same CollisionGroup-pairing risk but is a separate system this decision does not cover — do not silently apply this reversal there without the user confirming it too.

- **Knockback API — `SetForce`, not `AddForce`.** `msw-combat-system` §3-1 lists `body:AddForce(...)` as the ★recommended Rigidbody knockback call. This project's [Knockback Direction & API Rule](../combat/hit-reaction.md) mandates `RigidbodyComponent:SetForce(...)` instead, specifically so a knockback pulse is never compounded by residual force from the target's own movement/AI — the opposite tradeoff `AddForce` is meant for. Do not "fix" this back to `AddForce` when reading the general skill's guidance; it is a deliberate project-specific reversal, not an oversight.

- **Hit effect — manual dispatch, not `HitEffectSpawnerComponent` auto mode.** `msw-combat-system` §12 documents attaching `HitEffectSpawnerComponent` to the defender as the zero-code standard path. This project bypasses it and calls `_EffectService:PlayEffectAttached` manually because the native path cannot express per-skill `hitDelay` and the current `hitEffectPolicy` count choices (`"once"` / `"per_hit"`). `"custom"` is extension-only and must not appear in current rows. Do not attach `HitEffectSpawnerComponent` expecting it to combine with this pipeline; it would double-present.

- **No i-frame on monsters.** `msw-combat-system` §3-2 documents the `HitComponent:IsHitTarget` + `_UtilLogic.ElapsedSeconds` deadline pattern (as implemented on the player's `PlayerHit.mlua`) as the standard i-frame approach. `Monster.mlua` does not implement this — monsters can be hit on every frame a skill's judgment lands, with no immunity window. This is intentional for the current skill set (single consolidated judgment per cast, not a rapid multi-attack spam), not a gap to silently "fix" by porting `PlayerHit`'s pattern over — ask the user first if a future skill's rapid-fire timing means monsters actually need one.

Everything else this file documents (`CalcDamage`/`CalcCritical`/`IsAttackTarget` override conventions, no-`@ExecSpace`-on-override) matches `msw-combat-system`'s own guidance — these four are the only known deliberate reversals. Add to this list whenever a new skill's requirements force another one.

## ⚠ Project Convention Precedence Rule

The rules above override a *generic external skill*. The opposite direction applies when the conflict is with the **target project's own documented procedure**: a platform default in this package is a safe fallback for a project that has not defined one, not a veto over a project that has.

**When the target project documents an approved procedure for an operation this package restricts, follow the project.** Discover the source first — the project's `AGENTS.md`/`CLAUDE.md`, a project skill, or a workspace convention referenced by them — then record in the progress ledger which source was inspected, the exact approved procedure, and the artifact it touches. Absent such a documented procedure, this package's default stands unchanged.

- **`Global/` model editing.** [../platform/maker-pitfalls.md](../platform/maker-pitfalls.md) defaults to treating `Global/` models as read-only and routes the agent to an authored user model or a user-performed Maker step. A project that documents an approved in-place workflow for those models — for example a `ModelBuilder` plus Maker-refresh procedure defined in its `AGENTS.md` or `msw-general` — supersedes that default for the models it names. This matters because attaching a player-side movement or attack component may have no other working path; a blocked attachment is a blocked skill, so resolve the precedence before reporting the work as impossible.
- Do not generalize one approved procedure into blanket permission. The project source authorizes the specific operation it describes on the artifacts it names, and every other platform default in this package still applies.
