Okay, tell me the odds - what your chances are when you roll an attack vs defense

Do you want to know if it was worthwhile to aim that flack cannon, or if you should spend those attack +1 tokens? Or even aiming an omni cannon is overkill? Well if you have any of those questions but the last one, check this link out.

This links you to an anydice program which can calculate an attack with automisses against a given size defense and know what your odds are for a given damage.
I’m going to break it down so hopefully even people who are code savvy can use this

function: attack ATTACK:s at RANGE:n against DEFENSE:s{
 A: [sort ATTACK]
 D: [sort DEFENSE]
 DAM:0
 DEF:1
 loop N over A{
  if N >= RANGE {
   if N > DEF@D{
    DAM:DAM+1
   }else{
    DEF: DEF +1
   }
  }
 }
 result: DAM
}
function: aimed ATTACK:s at RANGE:n against DEFENSE:s{
 A: [sort ATTACK]
 D: [sort DEFENSE]
 AV: 1@A
 DAM:0
 DEF:1
 loop N over {1..#A}{
  if AV >= RANGE {
   if AV > DEF@D{
    DAM:DAM+1
   }else{
    DEF: DEF +1
   }
  }
 }
 result: DAM
}

function: attack ATTACK:s at RANGE:n dodged DEFENSE:s{
 A: [sort ATTACK]
 D: [sort DEFENSE]
 DV: 1@D
 DAM:0
 DEF:1
 loop N over A{
  if N >= RANGE {
   if N > DV | DEF > #D{
    DAM:DAM+1
   }else{
    DEF: DEF +1
   }
  }
 }
 result: DAM
}

function: aimed ATTACK:s at RANGE:n dodged DEFENSE:s{
 A: [sort ATTACK]
 D: [sort DEFENSE]
 AV: 1@A
 DV: 1@D
 DAM:0
 DEF:1
 loop N over {1..#A}{
  if AV >= RANGE {
   if AV > DV | DEF > #D{
    DAM:DAM+1
   }else{
    DEF: DEF +1
   }
  }
 }
 result: DAM
}

This is the text that you ignore, as this handles the actual function building and the like and has to be included first. Just skip down until you reach the lines starting with output at the bottom.

output [attack 5d{1,0,3,4,0,6} at 1 against 3d6] named "Ra flame burst"

Here is the basic format of the function. The 5d tells it how may dice it to roll (unfortunately it caps around 7 dice due to limitations in the website). The { } enclose the auto misses array, replacing any number with a 0 to represent an automiss. the number after the “at” is the min value the attack die has to roll to make range. And finally the against 3d6 is the number of defense die it’s rolling against.

output [aimed 5d{1,0,3,4,0,6} at 1 against 3d6] named "Aimed Ra flame burst" 

Replacing the word ‘attack’ with ‘aimed’ will make the attack as though it spent an Aim token

output [attack 5d{1,0,3,4,0,6} at 1 dodged 3d6] named "Dodged Ra flame burst" 

likewise, replace ‘against’ with ‘dodged’ to simulate a dodge token

output [aimed 5d{1,0,3,4,0,6} at 1 dodged 3d6] named "Aimed and Dodged Ra flame burst"  

and of course the two may be combined.

Finally, their are some modifers to the resolts
At - least tells the odds of rolling it or better results
At - most is the reverse, telling odds of rolling it or lower
and summery can tell you stuff like the average damage per roll and how much deviation their would be in the scenario

This is amazing.

Such...wrong....OCD...driving...me...to...murder...

Craig… I… You…

Don’t do that. I think you broke a few of us…

I'm missing one bit of wrongness: who has middle initial "L"?

Luc?