Monday, July 25, 2011

Failed attempt at Lot5R odds calculator.

function: limitedex DICENUM with SIDES for NUMEX{
STORE: 0
loop COUNT over {1..DICENUM}{
STORE : STORE + ( NUMEXdSIDES = NUMEX * SIDES)
}
result: STORE
}
function: A lotfrdice B{
TE: [limitedex A with 10 for 3]
DICELEFT: A - TE
DE: [limitedex DICELEFT with 10 for 2]
DICELEFT: DICELEFT - DE
SE: [limitedex DICELEFT with 10 for 1]
DICELEFT: DICELEFT - SE
TECOUNTED: [lower of TE and B]
DECOUNTED: [lower of DE and B-TE]
SECOUNTED: [lower of SE with B-TE-DE]
RES: 30 * TECOUNTED + [highest TECOUNTED of TEd10]
RES: RES + 20 * DECOUNTED + [highest DECOUNTED of DEd10]
RES: RES + 10 * SECOUNTED + [highest SECOUNTED of SEd10]
RES: RES + [highest [B-TE-DE-SE] of [A-TE-DE-SE]d10]
result: RES
}
output [3 lotfrdice 2]