I have a situation where I will be making four attacks that do different amounts of damage over the course of a round. I have the average damage of each of them(including the likelihood of missing with the attack) modelled as a separate output on AnyDice, using a modified function I found through this youtube video but I'm wondering if I can make a fifth output that models the average damage for the entire round.
https://anydice.com/program/2fb41 <- what I have so far
\the first attack is a guaranteed critical hit due to some time shenanigans, so no chance of getting 0 damage\
output 8d6 + 2d8 + 5 named "First Attack"
function: attackroll ROLL:n vs AC:n {
if ROLL >= CRITROLL { result: CRITDAMAGE }
if ROLL = 1 { result: 0 }
if ROLL + PROFICIENCY + ATTACKMOD >= AC { result: DAMAGE }
result: 0
}
ENEMYAC: 14
ATTACKMOD: 5
PROFICIENCY: 3
CRITROLL: 20
DAMAGE: 1d6 + ATTACKMOD
CRITDAMAGE: 2d6 + ATTACKMOD
output [attackroll d20 vs ENEMYAC] named "Offhand Attack"
ATTACKMOD: 5
PROFICIENCY: 3
CRITROLL: 20
DAMAGE: 4d6 + 1d8 + ATTACKMOD
CRITDAMAGE: 4d6 + 2d8 + ATTACKMOD
output [attackroll d20 vs ENEMYAC] named "Attack of Opportunity"
output 2d8 named "Booming Blade damage if he lives long enough to move"