A better way?
Posted: Sat Oct 28, 2017 6:34 pm
I have implemented a macro for one of my players at his request. This has resulted in other players liking it after seeing it and wanting their own. While it wasn't difficult to make, I was wondering if there is a better way to make variations of this macro:
My player's are actually all in the same room, so we use character sheets for their stats, not their tokens. Their tokens have notes for me (the DM), so drawing from their token isn't really viable.
Always looking to improve so any suggestions are welcome! Thanks in advance!
[EDIT] I thought I maybe should put some insight into the source for numbers, so: - then X=Attack Bonus
- Then Y=20+Attack Bonus-Crit Range (So in this case, the critical hit range is 16 to 20, or 5 (16 is 1, 17 is 2, 18 is 3, 19 is 4, 20 is 5)
- Displays the number rolled to gain a Possible Crit and then rolls a new attack roll for the Confirmation roll.
The last part just shows the roll if it was not a possible crit.
Code: Select all
[h:attack = 1d20+24]
[r,if(attack >= 40),CODE:
{
Rolls a <b><font color="red">[attack-24]</color></b> for a Possible Crit with <b>[1d20+24]</b> to Confirm on First Attack
};
{
Gets <b>[attack]</b> to Hit on First Attack
}]
[h:attack = 1d20+19]
[r,if(attack >= 35),CODE:
{
, Rolls a <b><font color="red">[attack-19]</color></b> for a Possible Crit with <b>[1d20+19]</b> to Confirm on Second Attack
};
{
, Gets <b>[attack]</b> to Hit on Second Attack
}]
[h:attack = 1d20+14]
[r,if(attack >= 30),CODE:
{
, Rolls a <b><font color="red">[attack-14]</color></b> for a Possible Crit with <b>[1d20+14]</b> to Confirm on Third Attack
};
{
, Gets <b>[attack]</b> to Hit on Third Attack
}]
[h:attack = 1d20+24]
[r,if(attack >= 40),CODE:
{
, Rolls a <b><font color="red">[attack-24]</color></b> for a Possible Crit with <b>[1d20+24]</b> to Confirm on Bonus Attack
};
{
, Gets <b>[attack]</b> to Hit on Bonus Attack
}]
[h:attack = 1d20+19]
[r,if(attack >= 35),CODE:
{
, Rolls a <b><font color="red">[attack-19]</color></b> for a Possible Crit with <b>[1d20+19]</b> to Confirm on First Off-Hand Attack
};
{
, Gets <b>[attack]</b> to Hit on First Off-Hand Attack
}]
[h:attack = 1d20+14]
[r,if(attack >= 30),CODE:
{
, Rolls a <b><font color="red">[attack-14]</color></b> for a Possible Crit with <b>[1d20+14]</b> to Confirm on Second Off-Hand Attack
};
{
, Gets <b>[attack]</b> to Hit on Second Off-Hand Attack
}]
[h:attack = 1d20+9]
[r,if(attack >= 25),CODE:
{
, and Rolls a <b><font color="red">[attack-9]</color></b> for a Possible Crit with <b>[1d20+9]</b> to Confirm on Third Off-Hand Attack.
};
{
, and Gets <b>[attack]</b> to Hit on Third Off-Hand Attack.
}]
Always looking to improve so any suggestions are welcome! Thanks in advance!
[EDIT] I thought I maybe should put some insight into the source for numbers, so:
Code: Select all
1d20+X
Code: Select all
if(attack >= Y)
Code: Select all
and Rolls a <b><font color="red">[attack-9]</color></b> for a Possible Crit
The last part just shows the roll if it was not a possible crit.