CodeCritter : That is what I took was your first try at fixing the "bug" (it is more a misfeature than a bug, but still), Frogboy comment made me think that you tried again.
This is where I think that your solution fails:
- Against only 1 type of weapon, X on-type defense is exactly equal to X^2 off-type defense (like in DL).
Let take a totally unbalanced example (which will still happens, mostly with super dominator corvettes) :
Attacker : B: 0 M: 0 MD: 10x2 (10 corvettes)
Defender : B:25 M: 0 MD: 0
To simplify the calculation, assume that both attack and defense always roll the average value (allowing fraction). This will underestimate damage because there won't be any unlucky defense rolls, but it will correctly account for defense degradation.
Your system :
Corvettes always roll 1 attack.
1st one : Defender has 5 effective defense (sqrt(25)), get 2.5, no damage. Defense degrade to 24.
2d-10th ones : Defender has 4 effective defense (sqrt(24 to 16)), get 2, no damage. Defense degrade up to 15.
So the defender is undamaged.
Under my first goal, this battle should have been equivalent to this one :
Attacker : B: 0 M: 0 MD: 10x2 (10 corvettes)
Defender : B: 0 M: 0 MD: 5
1st one : Defender has 5 defense, get 2.5, no damage. Defense degrade to 4.
2d one : Defender has 4 defense, get 2, no damage. Defense degrade to 3.
3th one : Defender has 3 defense, get 1.5, no damage. Defense degrade to 2.
4th one : Defender has 2 defense, get 1, no damage. Defense degrade to 1.
5th one : Defender has 1 defense, get 0.5, 0.5 damage. Defense degrade to 0.
6th-10th ones : Defender has 0 defense, get 1 damage each time.
So the defender got 5.5 damage.
This would be the exact result under my system for the first situation since the defender would get for their protection : B:20 M: 0 MD: 0 Off: 5.
The main difference between both system is when the defender has a lot of off-type defense (more than the half of the total enemy attack). In this situation, the defense degradation is not quick enough since you degrade it in the same way as if it was on-type defense.
I will code some simulator, with both my understanding of the actual code, and my solution.
There is still a nontrivial detail regarding how to implement defense rolls under Ephafn's system, which we can discuss if you're interested. But that's not as high-priority as making off-type defenses square-rooted.
I just put P = On-type Protection + Off-type Protection
Defense roll = rng(0, P)
Unlike the actual system, there is only one roll (not one per defense type).