How to stack probabilities to compare total outcomes A forum RPG I'm part of is working on a scaled/weighted rolling system for combat and other competitive skill checks, to prevent god-modding (a practice where players say their characters always win/succeed just because they want to). The idea is that based on an individual character's "level" they are assigned a specific HP value and a specific range for randomly generated scores, and various characters can roll against each other to determine a victor. These score ranges function as singular die rolls, and therefore have an equal chance of "rolling" any number within a given range.
For example,
Players A and B have decided to duel each other. Player A has 2 HP (meaning if they get "hit" twice, they lose) and has a score range of 1-20. Player B has 4 HP, and has a score range of 6-25. Both characters take turns "rolling" attack and defense (they randomly generate a number from within their individual score ranges, using a computer number generator) and those numbers are then compared against each other. So if A rolls a 15 attack and B rolls a 13 defense, B is "hit" and loses 1 HP. Since B has a range of 6-25, they are capable of rolling attacks that A is not capable of defending against, and likewise, A is capable of rolling attacks too low to succeed even if B rolls their minimum. Matching attack and defense rolls result in the attacker's favor. This continues until one character has 0 HP left.
I know how to calculate the odds of any given roll being successful from either side, but not how to calculate out the odds of a full game going either way. How do I calculate what the chances are that A makes 4 successful attacks before B makes 2 successful attacks? 
Once I know how to solve this problem with one set of numbers, I can apply the process to the rest of the various lineups. I basically just want to see how balanced and smooth the current scaling system is.
What I have so far:
If A rolls a 1 on their attack, there are 0 out of B's 25 possible rolls that result in B getting hit, for a 0% success chance. If A rolls a 6, there is a 1/25 chance that B gets hit. And so on. Since each of A's possible rolls has a 1/20 (5%) chance of occurring, I added all of the possible hit chances together and divided by 20 for an overall 24% chance to hit B on any given round. Doing the same process with B's possible rolls, they get a 79% chance to hit A on any given round.
I'm just not sure what to do to find the odds of an indefinite number of rounds that continues until someone has been hit a specific number of times.
 A: First, work out the probabilities of A hitting B, and of B hitting A. You said you know how to calculate these probabilities, so we'll skip calculating them. The important point is that these probabilities are the same each turn.
A attacks on every odd turn and B attacks on every even turn. We can pretend that the game continues forever, so even if A dies, play continues (pointlessly, since A can no longer win). By adopting this perspective the math becomes fairly simple. The game is seen to be equivalent to a game in which A and B go into separate rooms and roll attack rolls, and each sees how many rolls it takes them before they "would have" killed the other player (i.e. if my opponent has 5 HP, I keep rolling until I score 5 hits). Then they meet up and reveal how many rolls they took to "win". The winner of the fight is whoever got the lowest number of rolls.
If I have a probability of hitting $p$ times, then the number of rolls taken to score one hit is modeled by a geometric random variable with parameter $p$. If I have to score $n$ hits (my opponent has $n$ HP) then my total number of rolls will be the sum of $n$ independent geometric random variables of parameter $p$, will be given by a negative binomial distribution with parameters $n$ and $p$.
So we have two negative binomials with parameters $(n_B, p_A)$ and $(n_A, p_B)$, where $n_i$ is player $i$'s initial HP and $p_i$ is player $i$'s chance to hit when they attack. Referring to these negative binomials as $X$ and $Y$ respectively, the question is, what is the probability that $X\leq Y$? This corresponds to the event that A wins. (Notice that A attacks first, so when $X=Y$, A wins)
So your problem is equivalent to the question:

If $X$ and $Y$ are two independent negative binomial variables, what is the probability that $X\leq Y$?

I don't know if this problem can be solved cleanly. You could try writing it out as an infinite sum and seeing if it can be computed algebraically.
A: If a 'fights' b. If we call each dice roll a round then for each round the proabaility of a 'winning' that round is A and b winning is B = 1-A.
if a has 2 HP and b has 4 HP then we want to know what is the probability of a scoring 4 hits before b scores 2. Or equivalently what is the probability that a gets at least 4 hits in the first 5 rounds. (I know the fight might not last the whole 5 rounds but for our purposes we can assume it always does as the winner would never be affected). This equals the probability of a getting 4 hits + the probability of a getting 5 hits or:
${5\choose4} A^4 B + {5\choose5} A^5B^0$
