Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Combat math

A random number is rolled for each time a figure attacks (for each attack type), defends, etc
Plus, the new AI code simulates expected attack results, so each time the AI wants to move it will roll the dice like 20 times per enemy unit just to decide which to attack.
Various effects like Blur, Immolation or Cloak of Fear add even more rolls to it.
Reply

As an example (this is not in exact order, this is just to demonstrate how many rolls happen): my unit of semi buffed bezerkers attacks a hydra in a chaos node. The hydra has cloak of fear cast on it, and the hydra has blur cast in the background.

The bezerkers have 13 resistance against the cloak of fear. Despite being immune to it, the game still makes 6 rolls to verify that.

Each bezerker figure than rolls 6 times for the thrown attack (36 rolls). Each of those 36 then check against blur (36 more rolls). The first hydra figure then rolls armor 7 against probably the first 4 figures (28 rolls). Eventually the first hydra figure dies probably against the fifth figure (but still gets its 7 armor rolls) so the second hydra figure rolls armor against the fifth and sixth bezerkers figures (14 more rolls).

Then the 6 bezerkers figures melee (13 each, 78 more rolls, plus 78 blur rolls), and the 8 remaining hydra figures counterattack (96 rolls).

The hydra probably loses 2 more figures, so 3 figures get to roll armor. And at least two of those figures probably gets to roll armor against two figures - 56 more rolls.

The bezerkers also roll armor against the hydras, probably losing 4 figures. So 4 hydra figures get armor against them twice, so probably 140 more rolls.

Total rolls made by the game from 'one' attack: ~568.
Reply

General hero I'll use solo and expect to dominate things: 20 armor, lucky, endurance.

Against something with +1 to hit and 8 attack and 6 figures, so the attacker has 40% chance to hit.

40% chance to hit and 8 opportunities to hit against 50% chance to defend and 15 opportunities to defend plus 30% chance to defend and 5 opportunities to defend.

That's putting my hero closer to 100% than 99% expected chance to take 0 damage, so that even with 6 figures, it's still above 99% (I think), and even with 9 units, I'm still at a fair number (probably above 92%) to take 0 damage.

You can get away with maybe 16 defense and only endurance but no lucky, but any lower than that I wouldn't consider particularly invulnerable.
Reply

So, 95% chance of taking zero damage from 1 figure?

About rolls: doesn't matter, all I wanted to know if MoM rerolls everything (attack/defense in each stage for each figure) -- i.e. there is no reuse of previous roll results.
Reply

I wouldn't consider 95% from one figure to be good enough. When against 54 figures, that's still way too much damage. 99% at minimum.
Reply

you'll end up with unachievable defense values
Reply

Wait, what's the probability for the hero example I have? I haven't ran it through Wolfram. My phone has issues setting up the queries.
Reply

Wait, what's the probability for the hero example I have? I haven't ran it through Wolfram. My phone has issues setting up the queries.

Input: 1 attacker with 8 melee and +1 to-hit vs defender with 20 defense and +0 to-def

Code:
(* Distribution of "number of successull rolls after n attempts"; p is probability of success of each roll *)
rolld[n_Integer, p_] = BinomialDistribution[n,p];

(* Distribution of "damage made by attack (atk, pa) to defense (def, pd)"; pa is to-hit, pd is to-def (including base 0.3) *)
damaged[atk_Integer, pa_, def_Integer, pd_] := Module[{a,d},
  TransformedDistribution[Max[a - d, 0], {a\[Distributed]rolld[atk,pa], d\[Distributed]rolld[def,pd]}]
];

(* lets run a test *)
Probability[x ==0, x\[Distributed]damaged[8, 0.4, 20, 0.3]]
Probability[x ==1, x\[Distributed]damaged[8, 0.4, 20, 0.3]]

(* lets look at whole picture *)
PDF[damaged[8, 0.4, 20, 0.3]]

Results:
   

I.e. you have 91.1676% chance of getting 0 dam.

Note: careful with PDF[] function -- it seems to be broken for non-trivial discrete distributions (either takes very long time to compute or simply fails).

P.S. you need 31 defense to reach 99% smile
Reply

My hero in the example has +2 to defend (endurance and lucky). Diminishing returns means that any armor past 15 ignores any bonuses to defend. So he has 15, 0.5 AND 5, 0.3.
Reply

Same calc, +2 to-def:
   

Same calc, +2 to-def, armor reduced to 15:
   
Reply



Forum Jump: