So, here's an example with MathOps, Plugger, and ZeroFrame installed. I used a roll template just to help with the layout: !&{template:default}{{name=Roll Example}}{{Base Roll=[[?{number of dice|10}d10>?{difficulty|7}f1]]}}{{Final Adjusted=[\][\]$[[0]].value + {& math min({&eval} getDiceByVal($[[0]] 1 all count){&/eval},{&eval} getDiceByVal($[[0]] 10 all count){&/eval})}\]\] }}{&simple} Or, with line-breaks, just for readability: !&{template:default} {{name=Roll Example}} {{Base Roll=[[?{number of dice|10}d10>?{difficulty|7}f1]]}} {{Final Adjusted=[\][\]$[[0]].value + {& math min({&eval} getDiceByVal($[[0]] 1 all count){&/eval},{&eval} getDiceByVal($[[0]] 10 all count){&/eval})}\]\] }} {&simple} The Final Adjusted section is doing the work. That starts by deferring an inline roll: [\][\] ... \]\] ...so that it isn't detected until we let our other constructions shake out to their values. By default, Plugger's eval block runs first, left to right. get all 1s from the 0th roll: {&eval} getDiceByVal($[[0]] 1 all count){&/eval} get all 10s from the 0th roll: {&eval} getDiceByVal($[[0]] 10 all count){&/eval} Those reduce to a number. Next, MathOps runs a min function: {& math min( ... ) } ...to return the lesser of the two die sides retrieved: 10s, or 1s. The 1s have already been subtracted out of the successes of the base roll. The number of successes you get back will always be the lesser of the number of 1s or 10s. Again, lots of things become possible with the API, but that is a Pro perk. =/