Weapons & Armor Design

This document details the categories, stats, and mathematical formulas governing weapons, armor, and weight mechanics in CROSS.


⚔️ Weapon Types & Categories

Weapons dictate a character’s base attack style, range, speed, and scaling attributes. They are crafted in the Blacksmith Forge or Fletcher Workshop.

graph TD
    subgraph Weapons
        M[Melee] --- R[Ranged]
        R --- MG[Magical]
    end

    subgraph Melee Subtypes
        M1[One-Handed: Sword/Ax]
        M2[Two-Handed: Greatsword]
        M3[Dagger]
    end

    subgraph Ranged Subtypes
        R1[Longbow]
        R2[Crossbow]
    end

    subgraph Magical Subtypes
        MG1[Staff]
        MG2[Wand + Tome]
    end

1. Melee Weapons

  • 🗡️ One-Handed Sword/Ax:
    • Role: Balanced melee. Allows equipping a Shield or Off-hand Tome.
    • Base Speed: interval.
    • Scaling: Primarily Strength (STR) with minor Agility (AGI).
  • 🪓 Two-Handed Greatsword/Greatax:
    • Role: High raw physical burst damage. Occupies both hand slots.
    • Base Speed: Slow ( interval). High weight.
    • Scaling: Pure Strength (STR).
  • 🔪 Dagger:
    • Role: Rapid attacks, high critical damage. Rogue favorite.
    • Base Speed: Extremely fast ( interval). Very low weight.
    • Scaling: Pure Agility (AGI).

2. Ranged Weapons

  • 🏹 Longbow:
    • Role: Standard physical ranged DPS. Occupies both hand slots.
    • Base Speed: Moderate ( interval).
    • Scaling: Agility (AGI).
  • 🏹 Crossbow:
    • Role: Heavy ranged physical pierce damage. Slow reload.
    • Base Speed: Very slow ( interval). High weight.
    • Scaling: Agility (AGI) with minor Strength (STR).

3. Magical Weapons

  • 🧙 Wizard Staff:
    • Role: Two-handed magical scaling. Boosts spell range and power.
    • Base Speed: Slow ( interval).
    • Scaling: Pure Intelligence (INT).
  • 🪄 Wand & Catalyst/Tome:
    • Role: One-handed casting. High utility, speeds up spellcasting.
    • Base Speed: Fast ( interval).
    • Scaling: Intelligence (INT) and Agility (AGI).

🛡️ Armor Categories & Slots

Characters have three core armor slots: Head (Hat/Helmet), Chest (Armor/Robe/Coat), and Lower (Pants/Boots/Greaves as a single visual slot). Armor comes in three classes, affecting defense, weight, and stat orientations.

Armor ClassEligible ClassesCore Stat FocusMitigation ProfileWeight
ClothMage, PriestIntelligence (INT)Low physical defense, high spell warding.Very Light
LeatherRogue, ArcherAgility (AGI)Moderate physical defense, moderate spell ward.Light
PlateWarrior, DefenderVitality (VIT)Extremely high physical defense, low spell ward.Heavy

📊 Core Equipment Stats

Every weapon and armor piece possesses the following parameters stored in the master database:

Weapon Properties

  • weapon_type: Enum (Sword, Greatsword, Dagger, Bow, Crossbow, Staff, Wand).
  • min_dmg / max_dmg: The base physical or magical damage range before stat modifiers.
  • base_speed: Attack frequency interval (seconds).
  • weight: Floating-point value affecting swing speed.
  • attributes: Key-value map of base stat bonuses (e.g. {"str": 5, "vit": 3}).
  • quality: Enum (Common, Uncommon, Rare, Epic, Legendary).
  • is_hacked: Silent boolean flag (anti-cheat trigger).

Armor Properties

  • armor_class: Enum (Cloth, Leather, Plate).
  • armor_slot: Enum (Head, Chest, Lower, Shield).
  • defense_value: Flat physical mitigation points.
  • magic_ward: Flat magical mitigation points.
  • weight: Weight value contributing to total body weight.
  • attributes: Key-value map of base stat bonuses.
  • quality: Enum (Common to Legendary).

📐 Weight & Damage Math

To prevent players from wearing heavy plate armor on Mages or executing fast attacks with heavy axes, weight interacts with attributes:

1. The Weapon Swing Penalty

A heavy weapon slows down the attack interval unless the character has high Agility. Strength reduces weight burden, but Agility determines hand speed.

  • If AGI is low, the weapon weight penalty term bloats the attack interval, making heavy axes slow.
  • If STR is high, it offsets the base speed slightly, but AGI remains the primary weight mitigation stat.

2. The Body Weight Penalty (Stamina Drain)

A character’s total equipped armor weight determines their Stamina Drain when performing active skills or running:

  • If a player wears full heavy plate (high weight) but has low Vitality (VIT), active abilities consume double the stamina, causing them to tire out and go to sleep (AFK state) much faster.

3. Damage Types & Mitigation Math

We define four distinct damage types in the combat loop. Each type interacts differently with player Defense (Armor) and Magic Ward (Magic Resist) values:

  1. Physical Damage (Melee hits, arrows, traps):
    • Mitigation: Reduced by the target’s total equipped Defense (Armor).
    • Formula:
    • Curve: Capped by diminishing returns ( Defense = reduction, Defense = reduction). High-level hits remain threatening.
  2. Elemental Magic Damage (Mage spells like Fireball and Blizzard):
    • Mitigation: Reduced by the target’s total equipped Magic Ward.
    • Formula:
  3. Holy Damage (Priest healing/damaging spells):
    • Mitigation: Reduced by the target’s total equipped Magic Ward.
    • Type Specific Rule: Deals bonus damage against Undead and Demon type enemies, and heals friendly targets instead of damaging them.
  4. Shadow / Direct Damage (Rogue Assassin’s Death Mark, Priest Apostate’s Vampiric Touch):
    • Mitigation: Bypasses all Armor and Magic Ward.
    • Rule: Deals flat, unmitigated damage directly to the health pool. This serves as “True Damage” in combat math, making it highly effective against heavily armored tanks or high-ward magical bosses.