Summary up front:
There are only three interpretations of the rules, with only two unique mathematical results among them, that:
- Aren't obviously violating the letter of the rules (no interpretation is truly unambiguous, but they each resolve ambiguity and contradictions in grammar without inventing rules or contradicting/ignoring rules without justification)
- Preserve the behaviors of Silvery Barbs in the "normal" case in a way that makes sense when advantage or disadvantage is applied (advantage is often better, and never worse, than normal; disadvantage is usually worse, and never better, than normal)
The three valid interpretations are:
PJRZ's answer: Because Silvery Barbs triggers only after success or failure has been determined, the 2d20 rolled for advantage or disadvantage are resolved to a single die (the higher for advantage, the lower for disadvantage) before Silvery Barbs can be cast, so only one die is involved in the reroll.
This is by far the simplest solution; you ignore the rules about rerolling in the general case, because those rules apply to cases where the roll has not resolved yet, so multiple dice are still in play. The wording of Silvery Barbs referring to "the d20" can be read to imply this outcome; it assumes there is only one d20 involved when it is cast.
The mathematics of this case are covered in scenario #1 below.
Both d20s survive to Silvery Barbs being evaluated, and either:
The caster chooses the d20 to reroll (invariably choosing the highest one), interpreting the clause in the reroll rules to use "you" in two potentially different ways, one referring to the person with advantage/disadvantage who is making the roll, and one referring to the person who "lets" (read: has control over) the reroll happen.
The die that was "responsible" for the success is rerolled (the lower die for disadvantage, the higher die for advantage), and replace it with the reroll if the reroll is lower.
While the order of operations and the values consider differ slightly between case 2.1 and case 2.2, the mathematical end result is always the same for both the disadvantage and advantage cases.
The mathematics of this case (both 2.1 and 2.2) are covered in scenario #4 below.
All other interpretations either:
Violate clearly written rules (e.g. Thomas's answer does not keep the lower of the rerolled die's original value and its rerolled value, instead replacing the original value with the rerolled value unconditionally, then taking the lower of the rerolled value and the value of the other die, when Silvery Barbs says nothing about other d20s that might be involved, and therefore, if anything, the normal advantage rules should apply)
Lead to significant violations of the general expectations of the spell (e.g. fixing Thomas's answer by properly replacing the die with the lower of the original value or the reroll, then applying advantage/disadvantage using the new value and the other die, where the victim of Silvery Barbs chooses the rerolled die, leads to Silvery Barbs being completely ineffective when advantage applies, as in firedraco's answer).
Both
If that's enough for you, stop here. If not, get ready for a data dump with all the math.
The long version:
There are multiple ways to interpret the rules, and the original example doesn't let you distinguish between them, so I'm going to exhaustively enumerate the possibilities, then provide an example scenario that allows them to be fully differentiated:
Is the second d20 in a roll with advantage discarded by the time you've determined the roll is a success (and therefore by the time Silvery Barbs gets involved)?
- If yes, then PJRZ's answer is the only possible interpretation.
- If no, do the rules for when you have advantage/disadvantage and a rule "lets you" reroll a die (which imply you have a choice to reroll) still apply when you're forced to reroll the die? And even if they do, does "you" mean the same thing in both clauses; the rule that triggers the reroll is a rule associated with the caster of Silvery Barbs (the only person in charge of whether a reroll is "permitted", so if they're the only one with a rule that "lets [them cause a] reroll"), so arguably, the "you" with advantage/disadvantage is not the same as the "you" who chooses the die to reroll. Practically, since each side reliably wants to reroll the higher or the lower die, whichever line of argument you pursue, all that matters is whether the high die or the low die is rerolled.
Lastly, assuming you have not discarded the second die before Silvery Barbs occurs, when does the selection of the "lower" die it requires occur, and which dice are considered? Thomas Markov's answer replaces the rerolled die with the new roll, then takes the lower of the new die roll and the die that was never rerolled, ignoring the original value of the rerolled die, but this makes no sense when comparing to the case without advantage, where you're keeping the lower of a rolled die and its own reroll. With advantage, you should still be doing the same thing, not taking the lower of the reroll and an unrelated die and ignoring the original value of the rerolled die. The rerolled die should almost certainly replace its original die only if it ends up lower, per the spell wording, and it's not clear (and I think incorrect) to infer that the selection of the lower value continues to the comparison with the die that was not rerolled (doing so could turn advantage into super-disadvantage, or make Silvery Barbs do nothing against a roll with advantage, depending on the set of interpretations chosen).
For the purposes of making a complete comparison, I'm going to change the scenario a bit, and have three variant scenarios. In all cases, we have the original Die A, Die B rolled for the attack with advantage, then possible rerolls of Die Sbad, Smid or Sgood where:
- Die A: Rolls a 15
- Die B: Rolls a 5
- Die Sbad: Rolls a 1 (below both rolls)
- Die Smid: Rolls a 10 (between the initial rolls)
- Die Sgood: Rolls a 20 (above both rolls)
Dice A & B are the original roll with advantage; A being the higher roll, B being the lower roll. The various versions of Die S* exist to explore what happens with each ruling; one of them is the result of rolling the third die Silvery Barbs that calls for.
The scenarios are (each preceded by a simple pseudocode formula for computing the answer for advantage):
min(max(A, B), S)
(simplifies to min(A, S)
since A is defined as higher than B) - Die B is discarded before Silvery Barbs occurs, per PJRZ's answer. Die A is rerolled, and the lower of Die A's original roll (15) and the reroll is the result. For each possible S*, the final result is:
- Sbad: 1 (reroll lower than A's 15, use reroll)
- Smid: 10 (same)
- Sgood: 15 (reroll higher than A's 15, use A)
For disadvantage, the formula is min(min(A, B), S)
(simplifying to min(B, S)
since B is lower than A), so the results are:
- Sbad: 1 (S is lowest, so it's used)
- Smid: 5 (S is higher, so we keep the lower B originally selected)
- Sgood: 5 (same as Smid)
These numbers look fine; Silvery Barbs is never worse for advantage than if you hadn't had advantage, and disadvantage is never better than not having disadvantage.
min(max(A, S), S)
, (also simplifies to min(A, S)
, and therefore the same, mathematically, as scenario #1, but by wildly different reasoning) - Both d20s are still "live", the Die B (lower) is rerolled, and the lower of S* and Die A is the result, per Thomas Markov's answer; Die B is not considered (or it is considered, but since B is definitionally lower than A, it doesn't matter; Thomas's answer is written implying it's not considered, the rules are very clear it would be considered in the non-advantage case of just one die, but for advantage):
- Sbad: 1 (reroll lower than A's 15, use reroll)
- Smid: 10 (same)
- Sgood: 15 (reroll higher than A's 15, use A)
Disadvantage behaves weirdly though, since the target would obviously choose to reroll the lower die, making the formula min(A, S)
(according to Thomas's approach, where S replaces B, rather than A, B and S all being considered), so the results are:
- Sbad: 1 (S is lower, so it's used)
- Smid: 10 (B is replaced by S, and new S smaller than A; this is weird, but it mostly doesn't matter, because we know B was enough to succeed, so this still succeeds, just with a higher final roll)
- Sgood: 15 (B replaced by S, new S is larger than A, so A is kept; also extremely weird for similar reasons)
If not for the fact that Silvery Barbs only triggers on success, it would be very weird that the final rolls are the same for both advantage and disadvantage. You're less likely to have succeeded in the first place with disadvantage, and normally succeeding by more doesn't matter. But for attacks it can matter: If you rolled with disadvantage and one of the rolls was 20, while the other was a non-20 that still hit, this interpretation allows Silvery Barbs to potentially change a hit into a crit, something it can't do under any other circumstances. If you use degrees of success for some ability checks, attempting to foil a success with Silvery Barbs could make it more successful if, and only if, the original roll had Disadvantage. Beyond the order of operations being wrong to my mind, this fact makes me consider this an invalid interpretation; there should not be a circumstance where you already have disadvantage, and a spell that attempts to penalize you further, and can never improve things when you don't have disadvantage, leads to greater success thanks to disadvantage.
max(A, min(B, S))
- Same as #2, Thomas's answer, but reading Silvery Barbs strictly, using the same logic as firedraco's answer, so it's only rerolling "the d20" (chosen by the target) and using "the lower roll" (the lower of the original d20's roll and the reroll's d20), then advantage selects between A and the lower of B and S, which gets a ridiculous result where successes with advantage never change:
- Sbad: 15 (choosing lower of B and S gets 1, A is higher, use A)
- Smid: 15 (choosing lower of B and S gets 5, A is higher, use A)
- Sgood: 15 (choosing lower of B and S gets 5, A is higher, use A)
Can probably discard this one as being nonsensical (unless there was an intent that Silvery Barbs can't harm rolls with advantage). Disadvantage at least looks sane, with formula min(A, min(B, S))
producing the same results as case #1.
max(B, min(A, S))
(Same as #3, but interpreting the "you" who chooses the rerolled die to be the character who has the rule allowing the reroll (so it agrees with whoever "lets" a reroll occur), so A is rerolled, not B, A is replaced with S if S is lower, then advantage is resolved normally, taking B if it's higher than the lower of A and S:
- Sbad: 5 (S lower than A, so A replaced by S, but B is higher, so B taken)
- Smid: 10 (S lower than A, so A replaced by S, and S is higher than B, so S taken)
- Sgood: 15 (S higher than A, so A kept, remains higher than B, use A)
So a little different from the other sane results; having advantage means a lower bound on how low the roll can go (never lower than the lower of the two original rolls). Disadvantage is similar to case #1 though, formula min(B, min(A, S))
, which also simplifies to min(B, S)
since B is defined to be lower than A, so the results are identical to case #1.
Even if you change it from "always reroll highest" to "always reroll die responsible for the success" (so, the lower die for disadvantage), nothing changes; min(A, min(B, S))
also simplifies to min(B, S)
.
Of the four possibilities, the only two that come up with mathematically reasonable results (where it's not worse to have initially had advantage than disadvantage, Silvery Barbs reliably does something most of the time, and Silvery Barbs can't make things worse due to advantage or disadvantage, e.g. causing a non-crit to become a crit) are scenario #1 and #4.
Both #1 and #4 are reasonable interpretations of the rules, so I see no strong reason to prefer one or the other based on the rules as written, so this is a judgement call.
- If you apply scenario #1 (which is simpler and doesn't require the discarded die from the original advantage/disadvantage roll to be kept/remembered), then Silvery Barbs trumps advantage; it doesn't matter whether your original success involved advantage or not, Silvery Barbs just acts like you didn't have advantage and you're now retroactively applying straight disadvantage. If you want spells to trump circumstances, choose this interpretation.
- If you apply scenario #4, then advantage still means something with Silvery Barbs; the two dice rolled initially set both a high bound and a low bound for what Silvery Barbs can do; if the low roll is still high enough to hit, then Silvery Barbs can't undo the hit (and if both dice came up with the same number, Silvery Barbs can't change a thing, including being unable to undo a crit caused by rolling two 20s). Silvery Barbs can usually change things, but circumstances still matter; having advantage is fundamentally superior to not having it at all stages of the roll's resolution. If you want circumstances to provide a meaningful benefit even when spells get involved, choose this interpretation.
TL;DR: There are two legitimate ways to interpret the wording, each of which produces results that keep Silvery Barbs mathematically and logically consistent with its behavior without advantage/disadvantage (advantage >= normal >= disadvantage), and it's a judgement call which one to choose.