VActionResolver Component

Interactive playground - adjust the controls to see live updates

<v-action-resolver
dice="{{ playground.dice }}"
:modifiers="modifiers"
:target="{{ playground.target }}"
comparison="{{ playground.comparison }}"
advantage
disadvantage
show-breakdown
show-roll-details
/>

Use Cases

Attack Roll
Roll d20 + modifiers vs enemy AC
<v-action-resolver dice="d20" :modifiers="attackMods" :target="enemyAC" />
Skill Check
Athletics check with advantage
<v-action-resolver dice="d20" :modifiers="skillMods" :target="15" advantage />
Saving Throw
Constitution save vs spell DC
<v-action-resolver dice="d20" :modifiers="saveMods" :target="spellDC" />

Game Systems

D&D 5e
Standard d20 + modifiers, meet or beat DC
Call of Cthulhu
Roll d100 under skill value
Initiative
Auto-roll initiative on mount

Available Props

dice - Dice notation (default: 'd20')
modifiers - Array of ModifierSource objects
target - Target number/DC to beat
comparison - 'meet-or-beat' | 'beat' | 'under' | 'under-or-equal'
advantage - Roll with advantage (2d20, take higher)
disadvantage - Roll with disadvantage (2d20, take lower)
autoRoll - Automatically roll on mount
showBreakdown - Display detailed breakdown
showRollDetails - Show individual die rolls
showHistory - Show roll history
historyLimit - Maximum history items (default: 10)
rollButtonText - Button text (default: 'Roll')
compact - Compact display mode
disabled - Disable rolling
systemConfig - Game system configuration

Available Events

@roll - Emitted on every roll with ActionResult
@success - Emitted on successful roll
@failure - Emitted on failed roll
@critical - Emitted on critical success
@fumble - Emitted on critical failure