Combat
This is the core math of Grinweld. Every formula here runs server-side on a seeded RNG — the client just shows you the result. The constants below are the launch defaults; admins can retune them.
Every round resolves the same way whether your character is fighting on Auto (the default) or you're pressing Attack (weapons) / Cast (spells) yourself in manual play: you act with every relevant slot, doublehit may add extra actions, then the monster acts (possibly several times). Here's each step.
1. Hit chance
Whether an attack lands is a ratio of the relevant offensive stat to the defender's matching defensive stat, scaled by mastery:
melee_hit% = (attacker.DEX / defender.DEX) * 55 * (1 + weaponMastery/100) − shieldPenalty
spell_hit% = (attacker.WIS / defender.WIS) * 50 * (1 + spellMastery/100) − shieldPenalty
shieldPenalty = (defender's shield IC) / 6 // per equipped shield
roll = random(1..100); the attack LANDS if hit% > roll
- A hit% over 100 is a guaranteed hit — there's no miss floor once you're past 100%.
- DEX vs DEX (melee) and WIS vs WIS (spells) — this is why those defensive stats matter (see Stats).
- Mastery linearly boosts your hit chance: at weapon mastery 100 your melee accuracy is doubled (×2 on the base term).
- A defender's shield subtracts a flat penalty from your hit% — tanks with big shields are genuinely harder to land on.
Defaults: hit.melee_base = 55, hit.spell_base = 50, hit.shield_penalty_divisor = 6.
2. The damage curve — Class vs. Armour
This is the single most important relationship in the game. Your attack class (Weapon Class WC for melee, Spell Class SC for spells) is compared to the defender's effective Armour Class:
effectiveAC = defender.AC + defender.armourMastery / 5 // + 0.1 AC per shield IC
multiplier = 1.2 ^ (attackerClass − round(effectiveAC))
Read that carefully: every class point you have above the defender's effective AC multiplies your damage by 1.2; every point you're below divides it by 1.2.
| Class − effective AC | Damage multiplier |
|---|---|
| +10 | ×6.19 |
| +5 | ×2.49 |
| +1 | ×1.20 |
| 0 | ×1.00 |
| −1 | ×0.83 |
| −5 | ×0.40 |
| −10 | ×0.16 |
The curve is exponential in both directions. Consequences:
- A few class points are worth more than a lot of raw stats. Gear that bumps WC / SC (and gems like Dragonfang / Demonfang) is disproportionately strong.
- Out-classed = useless. Hitting a monster whose AC is 10 above your WC means you do ~1/6 damage. This is why you fight near your level/tier, not above it.
- Armour mastery is a real defence. It adds AC at a 1:5 rate — 100 Armour
mastery = +20 effective AC, which divides incoming damage by
1.2^20 ≈ ×38.
Defaults: damage.class_base = 1.2, armour.mastery_divisor = 5,
armour.shield_ic_bonus = 0.1 (the summed shield AC bonus is floored).
3. Damage & heal magnitude
Once an attack lands and the multiplier is known, the raw roll is:
melee_damage = round( random(STR/8, STR/1.7) * multiplier )
spell_damage = round( random(NTL/7, NTL/1.4) * multiplier )
heal_amount = round( random(NTL/10, NTL) * multiplier ) // capped at missing HP
drain_damage = spell_damage; you heal drain_damage × 0.25 // lifesteal
- Final damage is clamped to [1, defender's current HP] — you always do at least 1, and never "overkill" for reward purposes.
- Heals can't overheal past your max HP.
- Drain spells deal spell damage and heal you for 25% of it — the sustain engine of Veilborn and any drain build.
Default: drain.lifesteal = 0.25.
4. Critical hits
crit if random(1 .. 20 + mastery/10) > 19
P(crit) = (1 + mastery/10) / (20 + mastery/10)
weapon crit damage ×5 spell crit damage ×4.5
Crit chance rises with mastery:
| Mastery | Crit chance |
|---|---|
| 0 | ~5% |
| 100 | ~37% |
| 200 | ~53% |
Weapons crit harder (×5) than spells (×4.5), but spells crit just as often at the same mastery. The Azurite gem adds flat crit chance on top.
Defaults: crit.threshold = 19, crit.weapon_mult = 5, crit.spell_mult = 4.5.
5. Doublehit
Per equipped weapon/spell slot, per round, there's a chance that slot resolves a second full action:
that slot fires again if doublehitMastery ≥ random(1..100)
So doublehit mastery is effectively a percentage chance (capped at 100 = always). With two weapon slots both at high doublehit, a single Attack can land up to four swings. The Jade gem adds flat doublehit. Doublehit can't be trained by one-shotting things (see Masteries).
6. The monster's turn — Speed & Power
Monsters don't use the five stats; they use {health, speed, power} plus {ac, wc, sc} (see Monsters):
- Power substitutes for STR/NTL in the damage formula above.
- Speed gives extra strikes. The chance of a bonus attack each round is:
extraStrikeChance = max(0, speed / health − 1)
A "fast" monster with speed = 1.67 × health has a 67% chance of a second
strike every round. Tank/training monsters have low speed and rarely double up;
fast-archetype zones (like Gallowfen Deep) hit you more often.
Putting a round together
- You act with each filled weapon slot (Attack) or spell slot (Cast): roll hit → roll crit → roll damage/heal → apply.
- Doublehit may re-run any slot.
- The monster acts once, plus a possible speed-based extra strike, against your DEX/WIS and effective AC.
- Apply gem effects (lifesteal, stat steal, bonus damage, etc.), update HP, and if the monster died, pay out XP/gold/drops and roll mastery gains.
Theorycrafter's summary
- Class beats stats at the margin — chase WC/SC/AC.
- Don't fight out of your tier — the 1.2^Δ curve punishes it brutally.
- Mastery is a force multiplier on hit %, crit %, and (Armour) defence.
- A heal/drain slot turns survivability from a stat problem into a non-problem.
Next: Masteries → Monsters → Build Guide