Hero Equipment and Attributes
Overview
The Hero Combat System integrates hero attributes, weapons, armor, and ammunition into the battle royale combat mechanics. This system provides meaningful character progression and strategic depth while maintaining the fast-paced nature of SoulWars battles.
Core Mechanics
Hero Attributes
Each hero has six primary attributes that affect combat performance:
Strength (Red): Affects melee damage output and health bonus
Endurance (Green): Affects maximum health, stamina, and armor requirements
Coordination (Blue): Affects ranged weapon accuracy, defense, and finesse weapons
Quickness (Purple): Affects movement speed and attack speed
Focus (Yellow): Affects mana and magic damage (future use)
Self (Cyan): Affects mana and magic defense (future use)
Combat Formulas
Health Calculation
Health = 200 + (Endurance × 2) + (Strength × 1)Movement Speed
Move Speed = 20 + (Quickness × 0.5)Melee Damage
Damage = (Weapon Min to Weapon Max) × (1 + (Strength - 10) × 0.5%) + Flat BonusesDamage Reduction
Reduction = (Coordination - 10) × 0.5% + Armor Defense + Defense Bonuses
Final Damage = Incoming Damage × (1 - Reduction) [capped at 75% reduction]Attack Speed
Cooldown = (1000ms / Weapon Speed) × (1 - ((Quickness - 10) × 0.5% + Speed Bonuses))
[Speed reduction capped at 50%]Equipment System
Weapons
Weapons are categorized by type and have different stat requirements:
Melee Weapons
Swords: Require Strength, balanced damage and speed
Daggers: Require Coordination, high speed, lower damage
Axes: Require Strength, high damage, slower speed
Ranged Weapons
Bows: Require Coordination, use arrows as ammunition
Crossbows: Require Coordination + Strength, use bolts as ammunition
Armor
Armor provides flat defense bonuses and may have speed penalties:
Armor Types
Leather: Low defense, no speed penalty, low endurance requirement
Iron: Medium defense, small speed penalty, medium endurance requirement
Plate: High defense, significant speed penalty, high endurance requirement
Armor Slots
Head: Helmet protection
Chest: Chestplate protection (highest defense)
Legs: Greaves protection
Ammunition
Ranged weapons require compatible ammunition:
Arrows: For bows, various materials (wood, iron, steel)
Bolts: For crossbows, various materials (iron, steel)
Damage Modifiers: Higher quality ammunition adds flat damage
Stat Modifiers
The system supports temporary stat modifications from:
Potions: Temporary attribute boosts
Equipment: Permanent stat bonuses
Effects: Environmental or magical effects
Modifier Management
Modifiers stack additively
Temporary modifiers have duration timers
All modifiers are cleared on player death
Inventory System
Database Schema
User Inventory
Shared items not equipped to any hero
Slot-based system for UI management
Supports stackable items (ammunition, consumables)
Hero Inventory
Items equipped to specific heroes
Equipment slots: mainhand, offhand, head, chest, legs, ammo
Durability tracking for equipment
Equipment Slots
mainhand: Primary weapon
offhand: Secondary weapon or shield (future)
head: Helmet
chest: Chestplate
legs: Greaves
ammo: Ammunition (can stack multiple types)
Implementation Details
Player Object Extensions
// Hero attributes
this.strength = 10;
this.endurance = 10;
this.coordination = 10;
this.quickness = 10;
this.focus = 10;
this.self = 10;
// Equipment
this.equippedWeapon = null;
this.equippedArmor = { head: null, chest: null, legs: null };
// Stat modifiers
this.statModifiers = {
strength: 0, endurance: 0, coordination: 0,
quickness: 0, focus: 0, self: 0,
damage: 0, defense: 0, attackSpeed: 0
};Combat Integration
Balance Considerations
Attribute Scaling
Each attribute point provides meaningful but not overwhelming benefits
Diminishing returns prevent single-attribute dominance
Caps on damage reduction and speed bonuses maintain balance
Equipment Progression
Higher-tier equipment requires significant attribute investment
Speed penalties on heavy armor create meaningful trade-offs
Weapon requirements encourage diverse builds
Build Diversity
Tank: High Endurance + Coordination, heavy armor
Glass Cannon: High Strength + Quickness, light armor
Ranger: High Coordination, ranged weapons
Balanced: Moderate investment in multiple attributes
Future Enhancements
Testing Guidelines
Base Case Testing
Heroes with all attributes at 10 should match original combat behavior
Basic sword should provide standard damage range
Attribute Testing
High strength heroes should deal significantly more damage
High coordination heroes should take less damage
High quickness heroes should attack faster
Equipment Testing
Weapon stats should properly affect damage and attack speed
Armor should provide appropriate defense bonuses
Speed penalties should be noticeable but not crippling
Integration Testing
Stat modifiers should stack correctly
Temporary effects should expire properly
Equipment changes should immediately affect combat stats
