Take into account that when you pass 2d10 to Anydice, it automatically sums it.
Trying to simulate what you wanted the easiest way I found, here's the code:
function: highestsum A:n B:n C:n {
result: {1,2} @ [sort {A, B, C}]
}
function: lowestsum A:n B:n C:n {
result: {2,3} @ [sort {A, B, C}]
}
output [highestsum 1d10 1d10 1d8]
output [lowestsum 1d10 1d10 1d8]
You can test it here.
What both functions do, is sum the three dices and then take out the highest or the lowest. Take into account that it's important to use three dices in this code, splitting the two 2d10 in 1d10 and 1d10.
Edit: Improved thanks to Ilmari Karonen
This is actually fairly simple to implement in AnyDice:
function: highest N:n of A:s and B:s {
result: {1..N} @ [sort {A, B}]
}
function: lowest N:n of A:s and B:s {
LEN: #A + #B
result: {LEN-N+1 .. LEN} @ [sort {A, B}]
}
These functions assume that you haven't changed the sorting order, which is highest-to-lowest by default. If you reverse it, the "highest" function will start returning the lowest rolls, and vice versa.
You can also easily modify these functions to handle more than two types of dice, as in:
function: highest N:n of A:s and B:s and C:s {
result: {1..N} @ [sort {A, B, C}]
}
function: lowest N:n of A:s and B:s and C:s {
LEN: #A + #B + #C
result: {LEN-N+1 .. LEN} @ [sort {A, B, C}]
}
Now for the bad news: these functions can get very slow for large dice pools, because they enumerate all the possible rolls by brute force. The built-in "highest/lowest N of DICE" functions are optimized using clever math to run very quickly even for large numbers of dice, but these aren't. If you try to compute something like [highest 2 of 10d6 and 10d8]
using these functions, you'll almost certainly get a time-out error.
Also, it's worth noting that, just like the built-ins, these functions return a single biased die describing the sum of the highest / lowest N values. Thus, for example, [highest 1 of [highest 2 of 1d6 and 1d8]]
is not the same as [highest 1 of 1d6 and 1d8]
! As far as I know, actually combining e.g. a d6 and a d8 into a single dice pool in AnyDice is simply not possible; you can have biased dice representing any probability distribution you want, and you can have pools of several identical dice, but you can't have different types of dice in the same pool.
On the plus side, unlike the built-ins, these functions work "as expected" also for sequence inputs: for example, [highest 2 of {1,2} and {3,4}]
returns 7 = 3+4 as expected, not 10 = 1+2+3+4 like the corresponding built-in [highest 2 of {1,2,3,4}]
would(!). (This happens because the built-ins are defined to take a die as their input, not a sequence, and so AnyDice will auto-convert a sequence to a die by summing its values before the function even sees it. I kind of consider that a bug in AnyDice, even if it's technically working exactly as documented.)
Best Answer
You can't merge two separate dice into one pool in AnyDice. However, the built-in
[highest of NUMBER and NUMBER]
function will work just fine on two dice:Ps. If you happened to have more than two separate dice that you wanted to take the highest of, you could either nest the functions, e.g. like this:
or write your own function, e.g. like in one of these earlier answers of mine. The last one of those gives a particularly general solution, which works just like the AnyDice
@
operator except that it can take multiple pools of dice as parameters:(If you need more than three different dice pools, just add more parameters to the function. If you want to use the same function for fewer pools than the number of parameters it takes, you can use
{}
as a placeholder to represent a pool of zero dice.)