Combat occurs whenever a zombie and a hero occupy the same space. The base combat rules have the zombie rolling 1 die and the hero 2. If any of the hero's die are greater than any of the zombie's die, the hero "defends" against the zombie. If any of the zombie die are higher than all of the hero's die, then the hero takes a "wound". Finally, if the hero rolls doubles AND any die is higher than the zombie's, the hero "kills" the zombie. The possible outcomes of this type of combat are described with this R function.
To simulate the combat as described above, we simply use fight(1, 2).
> fight(1, 2)
$counts
results
defend kill wound
110 15 91
$ratios
results
defend kill wound
0.50925926 0.06944444 0.42129630
>
So, roughly, a single zombie has a 42% chance to inflict a wound on the hero. The odds are in the hero's favor, but just barely and the hero has a dismal chance to kill the zombie. Now, one of the things that makes the combat so interesting is that player's can add extra die to their rolls using event or weapon cards like Faith. In this example, the hero is now rolling 3 fight die instead of 2 while the zombie is still only rolling 1.
> fight(1, 3)
$counts
results
defend kill wound
510 345 441
$ratios
results
defend kill wound
0.3935185 0.2662037 0.3402778
>
The zombie's chance of inflicting a wound is reduced to 1:3 and the hero gains a much greater chance to kill the zombie. Clearly, the hero getting that extra fight die makes combat a bit more rational for the hero. But what about when the zombie gains an extra die.
> fight(2, 2)
$counts
results
defend kill wound
450 55 791
$ratios
results
defend kill wound
0.34722222 0.04243827 0.61033951
The extra die increases a zombie's chances to inflict a wound by 50% over just one die. Big difference. One zombie attacking the player is now very dangerous. How about +1 die for each.
> fight(2, 3)
$counts
results
defend kill wound
2262 1405 4109
$ratios
results
defend kill wound
0.2908951 0.1806842 0.5284208
Still very much in the zombie's favor. So, essentially that 1 extra die is much more powerful to a zombie than the hero.
Now we have a good idea of the probabilities for simple combat, but let's see about making that generalized rule I mentioned at the start. The question I want to know most is how many zombies should I concentrate on a hero to pressure them. Its rare than the zombie has an extra die, at least without the expansions, but common for the player to have 1 or more extra die. So in this example, I'm going to calculate the outcomes of the zombie(s) inflicting at least one wound to the hero with a varying number of combat die. To do this, I'm going to use this function to calculate probability of at least one wound using a varying number of zombies and varying number of hero combat die.
> df <- expand.grid(numZombie = 1:6, heroDie = 2:4)
> df$woundChance <- apply(df, 1, function(x) { cumProb(1, x[[1]], fight(1, x[[2]])$ratios[[3]])})
> head(df)
numZombie heroDie woundChance
1 1 2 0.4212963
2 2 2 0.6651020
3 3 2 0.8061933
4 4 2 0.8878433
5 5 2 0.9350945
6 6 2 0.9624390
>
Numbers are sometimes hard to read and that's where charts serve us nicely.
Pretty, but let's make it even easier. A simple linear model should net us a nice easy to remember rule, much like the 2/4 rule in hold em.
lm <- lm(woundChance ~ numZombie + heroDie, data=df)
> summary(lm)
Call:
lm(formula = woundChance ~ numZombie + heroDie, data = df)
Residuals:
Min 1Q Median 3Q Max
-0.09623 -0.06060 0.01660 0.05243 0.08463
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.525251 0.065099 8.068 7.75e-07 ***
numZombie 0.109486 0.008815 12.421 2.70e-09 ***
heroDie -0.066075 0.018437 -3.584 0.00271 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.06387 on 15 degrees of freedom
Multiple R-squared: 0.9176, Adjusted R-squared: 0.9067
F-statistic: 83.56 on 2 and 15 DF, p-value: 7.379e-09
After all this, what do we have?
In combat, there is a 50-50 chance of wounding the hero. Each zombie in the fight increases the odds by 10%. Each hero die reduces it by ~6%.
Using this simplified rule, 2 zombies attacking a hero with 2 die has a (50% + (2 * 10%) - (2 * 6%)) 58% chance. Our table above states the chance to be 66%. Looking at the residual plot clearly illustrates the exponential nature of our model, but I want easy math to make the calculations on the fly. Adding +/- 5% will help me to generally consider the odds and while not perfect, it's better than what I had to start with.
No comments:
Post a Comment