The forums moved on March 1, 2021. Please read this page for more information.

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

7 posts / 0 new
Last post
kitmehsu
kitmehsu's picture
Offline
Last seen: 2 months 1 week ago
Playtester
Joined: Jun 05, 2014
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.
http://anydice.com/program/6765
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

Bowie
Bowie's picture
Offline
Last seen: 1 year 11 months ago
Playtester
Joined: Feb 25, 2015

This is amazing.


Bowie S, pronounced like David, not like Knife, can be found in Minneapolis and has Monomaniacal Reverse Engineer d10
Death and the dice level all distinctions. -Samuel Foote
 

Craig
Craig's picture
Offline
Last seen: 2 years 5 months ago
Admin
Joined: Apr 18, 2012


Twitter: imprimis5. Follow away!

Donner
Donner's picture
Offline
Last seen: 2 months 2 weeks ago
Playtester
Joined: Mar 30, 2013

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


"Deja-fu? You've heard of that?"
- Lu Tze, Sweeper, Thief of Time by Terry Pratchett

Rabit
Rabit's picture
Offline
Last seen: 2 months 1 week ago
ModeratorPlaytester
Joined: Aug 08, 2011

Craig... I... You...

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


"See, this is another sign of your tragic space dementia, all paranoid and crotchety. Breaks the heart." - Mal

Unicode U+24BD gets us Ⓗ. (Thanks, Godai!)

dpt
dpt's picture
Offline
Last seen: 2 months 2 weeks ago
Playtester
Joined: Aug 06, 2013

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

Matchstickman
Matchstickman's picture
Offline
Last seen: 2 months 1 week ago
Playtester
Joined: Apr 10, 2012

Luc?


Stop lurking, it makes you look like a villain target
When you do things right, people won’t be sure you’ve done anything at all

Temporary image until an H emoticon is added!