Appearance
Combat System
Overview
Combat is tick-based at 4 ticks per second (250ms per tick). Actions span multiple ticks, making attack speed a meaningful stat. The prototype uses auto-attacks only, with no abilities or special attacks. Multiple enemies can engage the player at the same time.
Attack Resolution
Each combatant (the player and all engaged enemies) runs an independent attack timer. When a timer completes, damage resolves immediately. The player attacks one target at a time but can be attacked by multiple enemies at once. Both sides can hit on the same tick or on completely different ticks depending on their attack speeds.
Weapon Stats
Weapons affect three things: attack speed, attack range, and stat bonuses. Equipment augments skill values for damage calculations only, not the actual skill levels or XP. Weapons add to Attack (accuracy) and Strength (damage). Armor adds to Defence (evasion/damage reduction).
| Weapon Type | Ticks per Attack | Real Time | Range | Bonuses |
|---|---|---|---|---|
| Dagger | ~3 ticks | 0.75s | 1 hex | +1 attack, +1 strength |
| Sword | ~5 ticks | 1.25s | 1 hex | +2 attack, +3 strength |
| Greatsword | ~8 ticks | 2.0s | 2 hex | +1 attack, +5 strength |
Enemy attack speeds vary the same way. A goblin swings fast, a troll winds up slow.
Damage Formula
Damage resolves in two steps: an accuracy check followed by a damage roll.
Step 1: Hit check
hit = roll(0, attacker.attack) > roll(0, defender.defence)
If miss: 0 damage, attack timer resets
Step 2: Damage roll (on hit)
damage = max(1, weapon.baseDamage + attacker.strength - defender.defence)
Roll between weapon.minHit and weapon.maxHit, scaled by StrengthAttack vs Defence determines whether a hit lands. On hit, damage is rolled between the weapon's min and max hit values, scaled by the attacker's Strength and reduced by the defender's Defence. Every landed hit does at least 1 damage. Exact formula to be finalized during development.
Aggro and Targeting
- Aggro radius: 2 hex tiles from the enemy's position. Enemies engage when the player enters this radius.
- Attack range: Determined by weapon type (see Weapon Stats table). The hero must be within weapon range to attack. Enemies also have individual attack ranges.
- Max simultaneous attackers: 32 enemies can engage the player at once.
- Leashing: Enemies deaggro and return to their spawn point when the player moves a set distance from the enemy's spawn position.
- Kiting: The player can move during combat to avoid or thin out engagements. Positioning matters even with auto-attacks.
- Auto-target selection: In auto-battle, the player attacks the nearest engaged enemy within weapon range.
Open Questions
Exact leash distance. Should auto-target prioritize nearest, lowest HP, or be player-configurable?
Sustain
Two layers keep the hero alive across multiple fights.
Passive HP regeneration. HP regenerates out of combat only. After all engaged enemies are dead, the hero recovers HP while traveling to the next target. Regen rate can scale with skills or gear.
Consumables (food/potions). Auto-used during combat based on player-configurable settings. The player sets an HP threshold (e.g., "eat food when below 40% HP") or toggles consumable use off entirely. Consumables are a direct resource sink that connects gathering skills to combat survivability.
Fight Flow
- Hero follows the main path (auto-battle) or moves freely (active play)
- Enemies within 2 hex tiles aggro and engage
- All combatants start running independent attack timers
- When any attack timer fires: roll accuracy (Attack vs Defence), then roll weapon damage scaled by Strength on hit
- Player auto-targets the nearest engaged enemy
- Consumables trigger based on the player's HP threshold setting
- Enemy dies: hero gains XP and gold, remaining enemies keep fighting
- All enemies dead: hero continues along the path, passive HP regen ticks while walking
- Boss (last chunk): same combat rules, tougher stats. Defeating the boss completes the level
- Hero dies: the level seed is randomized and a new level generates. All XP and inventory are preserved
Death
There is no penalty for dying. The player keeps all XP earned and all items in their inventory. On death, the level seed is randomized and a fresh level is generated for the next attempt. The only cost of death is time.
Prototype Scope
In scope:
- Auto-attacks with independent tick timers
- Multi-combat (up to 32 enemies at once)
- Accuracy and damage formulas
- Aggro, leashing, and kiting
- Consumable auto-use
- Passive HP regen
Out of scope:
- Abilities, special attacks, area of effect
- Manual target switching
- Aggro management / threat tables
- Boss encounters with unique mechanics
Open Questions
Exact accuracy formula tuning at high levels? Boss encounter mechanics at depth tier boundaries?