# Aeshnidae.CombatWindow

A wider evade and resist window (Tom, 2026-09-19: "an extra 10 skill you go from
resisting nothing to everything; it makes content after retail either you survive it
or you don't").

ACE decides every evade and every resist with one curve, `SkillCheck.GetSkillChance`:

    chance to land = 1 / (1 + e^(-slope x (attack - defense)))

with the slope **0.03**. That number is the window: 73 skill points under and one hit
in ten lands, 73 over and nine in ten, ten points around even swings the outcome by
7.5%. Against monsters scaled by tier the gap opens fast and past it nothing lands or
nothing misses. Two knobs widen it:

| slope | 10%-90% spans | +10 skill at even | 100 under |
| --- | --- | --- | --- |
| 0.03 (retail) | +-73 | 7.4% | 5% |
| **0.02** (ours) | +-110 | 5.0% | 12% |
| 0.015 | +-146 | 3.7% | 18% |

and a **floor and ceiling** on the chance - 5% and 95% - so however wide the gap, a
hit still lands and still misses some of the time. Combat only: melee and missile
evasion, and spell resistance. Lockpicking, healing, mana conversion and the rest keep
retail's curve. Players and monsters alike; the curve has no side.

```
/combatwindow            the terms in force, with a table against retail
/combatwindow <gap>      the chance at that skill gap, e.g. /combatwindow -50
/combatwindow-reload     admin: re-read Settings.json
```

## How

`Patches.cs` takes over the two callers - `DamageEvent.GetEvadeChance` and
`WorldObject.TryResistSpell` - with ACE's bodies and one line changed, rather than
patching `SkillCheck.GetSkillChance` itself: that method is two lines and the JIT
inlines it into every caller, so a patch on it is not reached by code compiled before
the patch went in, which on a hot reload is all of it (learned the hard way the same
day, in InstancesNoDat's generator swap). Both replacements fall through to ACE when
the mod is off or anything throws.

## Settings

`EvadeSlope` (0.02), `ResistSlope` (0.02), `MinLandChance`/`MaxLandChance` (0.05/0.95),
`MinSpellLandChance`/`MaxSpellLandChance` (0.05/0.95), `Enabled`.

| File | |
| --- | --- |
| `Settings.cs` | The numbers and the curve. |
| `Patches.cs` | The two take-overs. |
| `Commands.cs` | `/combatwindow`. |
