Skip to content

Instantly share code, notes, and snippets.

@acook
Created October 15, 2015 00:59
Show Gist options
  • Save acook/392e438827df499f2f05 to your computer and use it in GitHub Desktop.
Save acook/392e438827df499f2f05 to your computer and use it in GitHub Desktop.
This will calculate a Pathfinder Sorcerer's spells per day including bonus uses. CL is "Caster Level", MOD is "Ability Modifier", and SPELL is "Spell Level".
=if(
SPELL=0,
"∞",
max(
0,
if(
or(
SPELL=1,
gt(CL+1-SPELL*2, 0)
),
roundup((MOD-SPELL+1)/4,0),
0
)
)+
min(
6,
if(
or(
SPELL=1,
gt(CL+1-SPELL*2, 0)
),
max(0,(CL-(SPELL*2-1))+2)+
if( or(SPELL=1,and(SPELL=9,CL=20)), 1, 0),
0
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment