Skip to content

Instantly share code, notes, and snippets.

View Silvyre's full-sized avatar
👨‍💻

Rafi Ungar Silvyre

👨‍💻
View GitHub Profile
/em rolls ?{d|1|2|3}d vs. Ability ?{A|1|2|3|4|5|6|7|8|9|10|11|12}:
/r {[[ d12cs?{A}cf>[[?{A}+1]] % (?{A}+11) % (?{A}+10) % (?{A}+9) % (?{A}+8) % (?{A}+7) % (?{A}+6) % (?{A}+5) % (?{A}+4) % (?{A}+3) % (?{A}+2) % (?{A}+1) ]], [[ (?{d}/4)d12cs?{A}cf>[[?{A}+1]] % (?{A}+11) % (?{A}+10) % (?{A}+9) % (?{A}+8) % (?{A}+7) % (?{A}+6) % (?{A}+5) % (?{A}+4) % (?{A}+3) % (?{A}+2) % (?{A}+1) ]], [[ (?{d}/6)d12cs?{A}cf>[[?{A}+1]] % (?{A}+11) % (?{A}+10) % (?{A}+9) % (?{A}+8) % (?{A}+7) % (?{A}+6) % (?{A}+5) % (?{A}+4) % (?{A}+3) % (?{A}+2) % (?{A}+1) ]]}kh1
[[ 1d6cs0cf<[[ {1e2 - 6 + {1e3,105}<@{selected|SPD} + 5 * {115,265}<@{selected|SPD} - 1e2 * {1,3,57}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 4 + 3 * {85,235}<@{selected|SPD} + 2 * {235,275}<@{selected|SPD} - 1e2 * {1,3,5,7,11,15,45,51}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 6 + {35,95}<@{selected|SPD} + 2 * {145,275}<@{selected|SPD} + 3 * {145,295}<@{selected|SPD} - 1e2 * {1,3,9,11,15,21,27}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 3 + 5 * {1e3,175}<@{selected|SPD} - 1e2 * {1,3,5,7,9,13,33}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 3 + 5 * {1e3,205}<@{selected|SPD} - 1e2 * {1,3,5,7,9,39}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 6 + floor(@{selected|SPD} / 30 - 1/2) - 1e2 * {1,2}=[[(floor(@{selected|SPD} / 10 + 1/2) * 2 - 1) % 3]], 1e2 - 5 + floor(@{selected|SPD} / 30) + {-1e3,0}=[[(floor(@{selected|SPD} / 10 + 1/2) * 2 - 1) % 3]] - {-1e3,24}>@{selected|SPD}}>[[@{selected|HC} + (?{HC mods|0}) + 1e2]] ]] ]]
To hit: [[ 3 + {@{ws}, @{ws} * 2 + 1}<@{target|ws} ]]
To wound: [[ 2 + {{@{target|tns} - @{str} + 2, 0}kh1, {4}}kl1 ]]
&{template:5e-shaped} {{title=Animate Objects}} {{subheader=*?{Size|Tiny, [Tiny](-2)|Small, [Small](0)|Medium, [Medium](1)|Large, [Large](2)|Huge, [Huge](4)} objects attack!*
}} {{[1](#).=[[ ?{Roll|Normal, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} + [[abs(?{Size} - 1) + 5]] + {0} ]] vs. AC for [[ [[1 + ceil(?{Size} / 4)]]d[[floor((?{Size} - 2 * {0, 3}=[[2 + ?{Size}]]) / 2) * 2 + 8]] + [[abs(?{Size} - 1) + 1]] ]] damage (if crit, +[[ [[1 + ceil(?{Size} / 4)]]d[[floor((?{Size} - 2 * {0, 3}=[[2 + ?{Size}]]) / 2) * 2 + 8]] ]])
}} {{[[[{?{Number of attacks|1|2|3|4|5|6|7|8|9|10}, 2}kl1]]](#).=[[ ?{Roll} + [[abs(?{Size} - 1) + 5]] + {0} ]] vs. AC for [[ [[1 + ceil(?{Size} / 4)]]d[[floor((?{Size} - 2 * {0, 3}=[[2 + ?{Size}]]) / 2) * 2 + 8]] + [[abs(?{Size} - 1) + 1]] ]] damage (if crit, +[[ [[1 + ceil(?{Size} / 4)]]d[[floor((?{Size} - 2 * {0, 3}=[[2 + ?{Size}]]) / 2) * 2 + 8]] ]])
}} {{[[[{?{Number of attacks}, 3}kl1]]](#).=[[ ?{Roll} + [[abs(?{Size} - 1) + 5]] + {0} ]] vs. AC for [[ [[1 + ceil(?{Size} / 4)]]d[[
/r [[ {{ceil((?{Skill Check|15} - d20cs<?{Skill Check}cf<?{Focus|5}cf>20 + 1e-2) / (?{Skill Check} - ?{Focus})), {2}}kl1, {0}}kh1 ]] + [[ {{ceil((?{Skill Check} - d20cs<?{Skill Check}cf<?{Focus}cf>20 + 1e-2) / (?{Skill Check} - ?{Focus})), {2}}kl1, {0}}kh1 ]] ?{Dice Pool|
2d20, |
3d20, + [[ {{ceil((?{Skill Check&#125; - d20cs<?{Skill Check&#125;cf<?{Focus&#125;cf>20 + 1e-2) / (?{Skill Check&#125; - ?{Focus&#125;))&#44; {2&#125;&#125;kl1&#44; {0&#125;&#125;kh1 ]] |
4d20, + [[ {{ceil((?{Skill Check&#125; - d20cs<?{Skill Check&#125;cf<?{Focus&#125;cf>20 + 1e-2) / (?{Skill Check&#125; - ?{Focus&#125;))&#44; {2&#125;&#125;kl1&#44; {0&#125;&#125;kh1 ]] + [[ {{ceil((?{Skill Check&#125; - d20cs<?{Skill Check&#125;cf<?{Focus&#125;cf>20 + 1e-2) / (?{Skill Check&#125; - ?{Focus&#125;))&#44; {2&#125;&#125;kl1&#44; {0&#125;&#125;kh1 ]] |
5d20, + [[ {{ceil((?{Skill Check&#125; - d20cs<?{Skill Check&#125;cf<?{Focus&#125;cf>20 + 1e-2) / (?{Skill Check&#125; - ?{Focus&#125;))&#44; {2&#125;&#125;kl1&#44; {0&#125;&#
@Silvyre
Silvyre / [MSHRPG] FEAT Roll
Last active December 18, 2017 20:20
Please see comments below.
&{template:default} {{name=FEAT Roll
}} {{=**Rank ?{Rank|0}**
**Column [[ [[{{?{CS|0}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] ]]** *(?{CS}CS)*
}} {{Result:=[[ 1d100cf>[[100 - ({0,3,5,7}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] * ({0,3,5,7}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] + 1) - 2) / 2 - 5 * {9,11,13,15,16,17}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]]]]cf<[[{65 - 5 * [[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] + ({12,13,14}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] * ({12,13,14}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] + 1)) / 2, 1+{0,0}>1}kh1]]cs<[[{95 - 5 * ([[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {
Attacker's Weapon Class roll: [[ 1d20>[[20 - {3,10,10,11,14,14,16,16}<?{AWC} - 4 * {4,5,7,13}=?{AWC} - 3 * {6,0}=?{AWC} - 2 * {5,0}=?{AWC} - {1,2,3,7,8,9,10}=?{AWC} * ?{DAC} - {1,9,16}=?{AWC} * {2, 11 - [[{16,0}=?{AWC}]]}<?{DAC} - {2,0}=?{AWC} * {3,4,11}<?{DAC} - {4,5,6,13}=?{AWC} * {2, 3 + 4 * [[{7,0}=?{AWC}]], 3 + 4 * [[{7,0}=?{AWC}]], 10 - 7 * [[{13,0}=?{AWC}]]}<?{DAC} - 6 * {9,11}<?{DAC} * {6,0}=?{AWC} + 7 * {4,0}=?{DAC} * {16,0}=?{AWC} - {2,5,6,6,6,7,8,9,9,10}<?{DAC} * {11,0}=?{AWC} - {2,7,7,7,7,8,8,9,9,9,10}<?{DAC} * {12,0}=?{AWC} - {2,3,4,6,8,9}<?{DAC} * {14,0}=?{AWC} - {2,9,9,9,9,9}<?{DAC} * {15,0}=?{AWC}]] ]]
Attacker's Hit Dice roll: [[ 1d20>[[21 - ?{DAC} - {6,11}<?{DAC} - {2,4,6,9,11,15}<?{AHD}]] ]]
Attacker's Mental Strength roll: [[ 1d20>[[{10 + ?{DMS} - ?{AMS}, 1}kh1]] ]]
[[ [[floor({?{Level|1+1} - 3, 0}kh1 / 10)]]d20! + 1d[[(({?{Level}, 1}kh1 - 3 + 2 * [[{abs((?{Level} - 10) % 10 - 4.5) + {1/2}, {3} }<2]]) % 4 + 3) * 2 + [[{abs((?{Level} - 5) % 10 - 4.5) + {1/2}, {4} }<3]] * ((floor(({?{Level}, 1}kh1 - 7) / 10) % 2 * 4 - 2 * floor(({?{Level}, 1}kh1 - 7) % 10 / 2)) * (1 - 2 * (1 - floor(({?{Level}, 1}kh1 - 7) / 2) % 2)) * (1 - floor(({?{Level}, 1}kh1 - 7) / 10) % 2 * 2))]]! + [[{abs((?{Level} - 5) % 10 - 4.5) + {1/2}, {4} }<3]]d[[{(floor(({?{Level}, 1}kh1 - 7) % 10 / 2) + 4) * 2, {12} }kl1]]! ]]
@Silvyre
Silvyre / [Pendragon] Degrees of Success
Last active September 14, 2018 08:40
Please see comments below.
/em rolls [[ 1d20cs<[[ {?{Stat|10} + ?{Mod|0}, 0}kh1 ]]cf=[[ {?{Stat} + ?{Mod}, 0}kh1 ]]cf>[[ {20 - (?{Stat} + ?{Mod} - 20), 20}kl1 ]] + [[ {?{Stat} + ?{Mod} - 20, 0}kh1 ]] ]] vs. [[ {?{Stat} + ?{Mod}, 20}kl1 ]]+[[ {?{Stat} + ?{Mod} - 20, 0}kh1 ]]
@Silvyre
Silvyre / [Tampermonkey] dominion.games Automated Table Setup
Last active July 27, 2020 08:20
Automates Dominion Online table configuration. To be used via Tampermonkey. Please see: https://greasyfork.org/en/scripts/407793-dominion-games-automated-table-setup
// ==UserScript==
// @name dominion.games Automated Table Setup
// @description Click on the 'New Table' button to trigger the script
// @version 0.2
// @author Rafi_
// @match https://dominion.games/
// @namespace http://tampermonkey.net/
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
// @require https://greasyfork.org/scripts/6250-waitforkeyelements/code/waitForKeyElements.js?version=23756
// @grant GM_addStyle