Equipment-driven combat: weapon influences damage, swing time & attack animation #26

Closed
opened 2026-07-17 14:18:50 +02:00 by marco · 1 comment
Owner

Combat v1 uses fixed, per-attacker stats seeded from config, and the client always plays the bare-hand swing (UO people action 9 — a punch). The design intent has always been that the equipped weapon drives combat feel. This issue tracks wiring the equipped weapon into all three combat dimensions.

Depends on an equip/inventory layer existing first (no inventory yet — drop/pickup are stubs). Related: #10 (M8 melee combat umbrella), #18 (show equipped items on other players).

Scope

  • Weapon defines melee damage, swing cooldown (swing time), and melee range — override the per-Mobile MeleeDamage/SwingCooldownTicks already seeded from CombatOptions (the seams exist for exactly this).
  • Weapon selects the attack animation action (1H swing, 2H swing, bow, bare-hand punch as the unarmed default) — client-side, driven by what the mobile has equipped.
  • Server stays authoritative: damage/cooldown/range are resolved server-side from the equipped weapon, never trusted from the client. Only the animation choice is client-side.
  • Unarmed remains the fallback everywhere (current behaviour).

Out of scope

  • Weapon stats balancing / a real item catalogue (separate content work).
  • Showing the weapon on other players' sprites — that is #18.

Definition of Done

  • Equipping a weapon with a different damage value changes hits-to-kill in a World/CombatSystem unit test (unarmed vs armed produce different AttackOutcome.Damage for the same attacker).
  • Equipping a weapon with a different swing cooldown changes how many ticks elapse between resolved swings in a unit test (armed slower/faster than the unarmed baseline).
  • Swapping the equipped weapon at runtime changes the client attack animation action (bare-hand → 1H/2H/bow), demonstrable in-game and asserted in a HumanArtLayout/animation-selection unit test where the logic is engine-independent.
  • Removing/​unequipping the weapon reverts damage, swing time, and animation to the unarmed baseline.
  • A client with no weapon equipped behaves exactly as today (punch animation, config-seeded stats) — no regression.
Combat v1 uses fixed, per-attacker stats seeded from config, and the client always plays the bare-hand swing (UO people action 9 — a punch). The design intent has always been that the **equipped weapon** drives combat feel. This issue tracks wiring the equipped weapon into all three combat dimensions. Depends on an equip/inventory layer existing first (no inventory yet — drop/pickup are stubs). Related: #10 (M8 melee combat umbrella), #18 (show equipped items on other players). ## Scope - Weapon defines **melee damage**, **swing cooldown** (swing time), and **melee range** — override the per-`Mobile` `MeleeDamage`/`SwingCooldownTicks` already seeded from `CombatOptions` (the seams exist for exactly this). - Weapon selects the **attack animation action** (1H swing, 2H swing, bow, bare-hand punch as the unarmed default) — client-side, driven by what the mobile has equipped. - Server stays authoritative: damage/cooldown/range are resolved server-side from the equipped weapon, never trusted from the client. Only the *animation choice* is client-side. - Unarmed remains the fallback everywhere (current behaviour). ## Out of scope - Weapon stats balancing / a real item catalogue (separate content work). - Showing the weapon *on other players'* sprites — that is #18. ## Definition of Done - Equipping a weapon with a different damage value changes hits-to-kill in a `World`/`CombatSystem` unit test (unarmed vs armed produce different `AttackOutcome.Damage` for the same attacker). - Equipping a weapon with a different swing cooldown changes how many ticks elapse between resolved swings in a unit test (armed slower/faster than the unarmed baseline). - Swapping the equipped weapon at runtime changes the client attack animation action (bare-hand → 1H/2H/bow), demonstrable in-game and asserted in a `HumanArtLayout`/animation-selection unit test where the logic is engine-independent. - Removing/​unequipping the weapon reverts damage, swing time, and animation to the unarmed baseline. - A client with no weapon equipped behaves exactly as today (punch animation, config-seeded stats) — no regression.
Author
Owner

Gameplay half shipped in #27: the equipped weapon drives melee damage and swing time (WeaponStats/ItemCatalog, sword = 10 dmg / 8-tick swing). The remaining visual piece — the weapon shown on the body / weapon-specific attack pose — is layered equipment, tracked in #18 (a 1H sword shares the unarmed body action, so the difference is the overlaid weapon sprite). Nothing unique left here. Closing.

Gameplay half shipped in #27: the equipped weapon drives melee **damage** and **swing time** (`WeaponStats`/`ItemCatalog`, sword = 10 dmg / 8-tick swing). The remaining visual piece — the weapon shown on the body / weapon-specific attack pose — is layered equipment, tracked in **#18** (a 1H sword shares the unarmed body action, so the difference is the overlaid weapon sprite). Nothing unique left here. Closing.
marco closed this issue 2026-07-17 16:39:11 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo#26
No description provided.