Created
January 13, 2011 01:15
-
-
Save MisterPhoton/777239 to your computer and use it in GitHub Desktop.
D&D AnyDice Two-Fanged Strike
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MISS: 0 | |
HIT: 1 | |
CRITICALHIT: 2 | |
function: attack ROLL:n vs DEFENSE:n { | |
if ROLL = 1 { result: MISS } | |
if ROLL = 20 { | |
if ROLL + ATTACK >= DEFENSE { result: CRITICALHIT } | |
result: HIT | |
} | |
if ROLL + ATTACK >= DEFENSE { result: HIT } | |
result: MISS | |
} | |
function: damage for ATTACKS:s { | |
D: 0 | |
loop A over {1..#ATTACKS} { | |
if A@ATTACKS = CRITICALHIT { D: D + CRITICAL } | |
else if A@ATTACKS = HIT { D: D + DAMAGE } | |
} | |
result: D + [extra damage for ATTACKS] | |
} | |
function: extra damage for ATTACKS:s{ | |
if [ATTACKS contains CRITICALHIT] { D: [maximum of QUARRY] } | |
else if [ATTACKS contains HIT] { D: QUARRY } | |
else { D: 0 } | |
if ![ATTACKS contains MISS] { | |
result: D + 4 | |
} | |
result: D | |
} | |
function: twofanged strike { | |
result: [damage for 2d[attack d20 vs DEFENSE]] | |
} | |
DEFENSE: d{12..22} | |
QUARRY: d6 | |
ATTACK : 6 + 2 | |
DAMAGE : d12 + 6 | |
CRITICAL: 18 | |
output [twofanged strike] named "Greatbow" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment