I'm trying to compute the probability of getting a given value with the following rules :
- Roll one 4 sided dice + one 6 sided dice + one 8 sided dice + one 10 sided dice.
- Pick the 3 largest results.
- Choose a value by selecting one dice, assembling 2 dice or even summing all 3 dice.
Example:
- I roll 2 on the 4 sided dice
- I roll 1 on the 6 sided dice
- I roll 6 on the 8 sided dice
- I roll 5 on the 10 sided dice
- I pick the 3 largest results : 2,6,5
- Then, I can choose any of the following values: 2, 6, 5, 2+6=8, 2+5=7, 6+5=11, 2+6+5=13
What is the probability of getting a 2 or a 15 or even a 24 with this rules?
In fact, I am searching for a way to generalize this problem so that I can change the number of dice or the number of sides of each dice or even the number of top dice to keep. I created a computer program to obtain this probabilities using brute force, but I would like a more elegant and faster solution.

too long for a comment apparently:
just by examining sums of dice you can come up with a lot of restrictions:
anyways I'll let you do the actual math.