This is an odd request, but I am having trouble figuring out what I am asking in title. Let me explain.
The system uses a dice pool of d4s (don't judge me) of up to 3 dice (3d4 is the maximum number of dice you can roll).
If at least a 4 comes up in the pool, thatsthat's a success, if. If the highest number is a 3, itsit's a partial success. If the highest is lower than 3 it's a failure.
Output [count {3..4} in 3d4]
I was able to calculate that with ease, but here's the part I am stuck with:
If you get any number of 1s in your pool, the highest die is rerolled if it's a 3 or a 4. The second result is kept.
Example 1 Examples: You roll 2d4 and get 4, 1. Since you got a 1, you reroll the 4 and keep the second result. We get a 3, which means the result is a partial success instead of a success.
Example 2: You roll 3d4 and get 3, 1, 1. Since there's a 1, you reroll the 3 and get 4. Lucky you, you got a success instead of a partial.
You roll 2d4 and get 4, 1. Since you got a 1, you reroll the 4 and keep the second result. We get a 3, which means the result is a partial success instead of a success.
You roll 3d4 and get 3, 1, 1. Since there's a 1, you reroll the 3 and get 4. Lucky you, you got a success instead of a partial.
How can I code this in AnyDice to accuretlyaccurately calculate a player's chance of success, partial success, or failure?