Ovinomancer
No flips for you!
Cool. Of course you can. My point was that you didn't.[MENTION=16814]Ovinomancer[/MENTION], by the way I can account for multiple enemies etc in my formulas. The only thing I can't implement yet is variable damage dice.
Can you make changes to target hp, PC damage, PC hit chance, PC number of attacks, and also adapt to changes from those to the number of rounds needed to kill? The PC1/PC2 sheets are pretty easy to do if you're limiting the range of possible inputs so that you can hard code things. It's when you have to create the probabilities density functions for variable inputs that it becomes a challenge. For example, for a given round on PC 2 with variable inputs, I needed to figure out:My formula is surisingly easy to use. Simply list rounds out. Find first round enemy can be killed and then copy paste my formula in every cell.
Number of hits needed to kill (HTK), then,
Chance no hits have yet occurred times chance HTK occurs this round (not a given) PLUS Chance 1 hit has yet occured times chance at least HTK-1 occurs this round PLUS ... PLUS chance HTK-1 hits have occurred yet times chance at least 1 hit occurs this round.
A number of these end up as zeros in my equations depending on the PC numbers for a given scenario, so error correction is also needed.
The formula for determining chance to kill for no previous hits is:
1. iferror(binom.dist(0,#att*(N-1),hitchance,false),0) x iferror(1-(binom.dist(,@att, hitchance, true),0)
This gives the probability mass function (ie, chance that in N trials you have exactly r results) for no successes in all previous rounds (accounting for attacks per round) at the given hit chance, and returns 0 if binom,dist fails due to improper numbers (if it's round 1, then you have 0 trials, and this fails). This is then multiplied by the formula to determine the chance to hit with all attacks, up to the number of attacks in this round. This uses the cumulative probability function to find the cumulative probability for all hit combos up to HTK and subtract from 1 to find the probability for HTK hits. Error correction catches if HTK exceeds current attacks per round and returns 0.
This then happens for each scenarios from 1 hit to HTK-1 hits. I'm currently using 6 iterations (meaning up to 6 hits needed to kill) but can easily C&P to more (the joys of named cells making formula easier and of relative references).
I know, I know, I'm weird. But, I can generate the weighted average of the probability to kill on round X for up to six hits needed to kill for Y attacks per round at P chance to hit. (Turns out damage dealt and target hp are feed in variables to the one that matters -- how many hits to kill.)