I am having some difficulty doing opposed rolls over multiple rounds.
I am looking for a character vs. character statistics. I call them "Rookie" and "Enemy" respectively. I want to know what the chances the Rookie wins over the Enemy over X amount of rounds. I'm trying to see how modifiers affect two characters fighting each other over many rounds/turns of play.
Example:
- Rookie Rolls 1d20+0
- Enemy Rolls 1d20+2
- If Rookie > Enemy, Rookie Success
- If Rookie < Enemy, Rookie Loss
- If Rookie = Enemy, Tie - Must have Success or Loss, so roll again
- Best 3 out of 5 rounds makes a set
- If the Rookie gets 3 successes, they win the set
- If the Enemy gets 3 successes, the Rookie loses the set
- These do not have to happen in a row
I want to know the success chances of the Rookie winning a 3 out of 5 set. I ended up brute forcing this in C# with 1 million rolls - barring no errors, I am seeing the Rookie win sets about 28.8% 31.8% of the time.
Any ideas? Thanks!
X: 5
MODFORROOKIE: 0
MODFORENEMY: 2
output 1d20+MODFORROOKIE > 1d20+MODFORENEMY named "d20: Rookies Success in 1 Round"
output 1d20+MODFORROOKIE = 1d20+MODFORENEMY named "d20: Rookies Tie in 1 Round"
output [count 1d20+MODFORROOKIE > 1d20+MODFORENEMY in Xd20] named "d20: Rookies # of Successes in X Rounds"
output [count 1d20+MODFORROOKIE = 1d20+MODFORENEMY in Xd20] named "d20: Rookies # of Ties in X Rounds"
