Skip to content

Instantly share code, notes, and snippets.

@dubzilla1
Last active Dec 16, 2021
Embed
What would you like to do?
Roll20 - [PF2] [Script Cards] Treat Wounds macro
!scriptcard {{
--#emoteBackground|#F4E5D3
--#emoteFontColor|#644012
--#titleCardBackground|#0B2066
--#titleCardFontColor|#FFFFFF
--#titleFontFace|Helvetica
--#titleFontSize|1.35em
--#subtitleFontColor|#FFFFFF
--#subtitleFontFace|Helvetica
--#subtitleFontSize|0.9em
--#oddRowBackground|#97513F
--#oddRowFontColor|#FDF6EC
--#evenRowBackground|#FDF6EC
--#evenRowFontColor|#5A1211
--#bodyFontSize|1.1em
--#rollhilightcolornormal|#FFFFFF
--=illegal_bit|0
--=DC|?{Treat Wounds|Trained,15|Expert,20|Master,30|Legendary,40}
--=crit_DC|[$DC] + 10
--=fumble_DC|[$DC] - 10
--=TreatRoll|1d20 + @{selected|medicine}
--C[$DC]|15:>T_sub|20:>E_sub|30:>M_sub|40:>L_sub
--#title|Treat Wounds
--#rightsub| ([&diff_str])
--#emoteText|@{selected|token_name} treats @{target|token_name}'s wounds
--#sourceToken|@{selected|token_id}
--#targetToken|@{target|token_id}
--?[$threshold] -gt @{selected|medicine_proficiency} |>Err_sub
--?[$illegal_bit] -eq 1 |>Invalid_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -ge [$DC] -and [$TreatRoll.Base] -ne 1 -and [$TreatRoll.Base] -ne 20 -and [$TreatRoll.Total] -lt [$crit_DC] |>Success_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -lt [$DC] -and [$TreatRoll.Total] -gt [$fumble_DC] -and [$TreatRoll.Base] -eq 20 |>Success_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -ge [$crit_DC] -and [$TreatRoll.Base] -eq 1 |>Success_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -ge [$crit_DC] -and [$TreatRoll.Base] -ne 1 |>CritSuccess_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -lt [$crit_DC] -and [$TreatRoll.Total] -ge [$DC] -and [$TreatRoll.Base] -eq 20 |>CritSuccess_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -lt [$DC] -and [$TreatRoll.Base] -ne 1 -and [$TreatRoll.Base] -ne 20 -and [$TreatRoll.Total] -gt [$fumble_DC] |>Fail_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -ge [$DC] -and [$TreatRoll.Total] -lt [$crit_DC] -and [$TreatRoll.Base] -eq 1 |>Fail_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -le [$fumble_DC] -and [$TreatRoll.Base] -eq 20 |>Fail_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -le [$fumble_DC] -and [$TreatRoll.Base] -ne 20 |>Fumble_sub
--?[$illegal_bit] -eq 0 -and [$TreatRoll.Total] -gt [$fumble_DC] -and [$TreatRoll.Total] -lt [$DC] -and [$TreatRoll.Base] -eq 1 |>Fumble_sub
--X|
--:T_sub| --=bonus_amt|0 --&diff_str|Trained --=threshold|3 --<|
--:E_sub| --=bonus_amt|10 --&diff_str|Expert --=threshold|5 --<|
--:M_sub| --=bonus_amt|30 --&diff_str|Master --=threshold|7 --<|
--:L_sub| --=bonus_amt|50 --&diff_str|Legendary --=threshold|9 --<|
--:Err_sub| --=illegal_bit|1 --<|
--:Invalid_sub|
--#emoteText|
--#sourceToken|
--#targetToken|
--#subtitleFontColor|#FC1312
--#whisper|self
--+Invalid selection|@{selected|token_name} is not [&diff_str] in Medicine. Try again!
--<|
--:Success_sub|
--=cure_amt|2d8
--+Roll|[$TreatRoll.Total] vs DC [$DC]
--=total_amt|[$cure_amt] + [$bonus_amt]
--+Result|Success - Heals for [$total_amt] HP
--vbetweentokens|@{selected|token_id} @{target|token_id} beam-holy
--vtoken|@{target|token_id} burn-holy
--<|
--:CritSuccess_sub|
--=cure_amt|2d8
--=crit_amt|2d8
--+Roll|[$TreatRoll.Total] vs DC [$DC]
--=total_amt|[$cure_amt] + [$crit_amt] + [$bonus_amt]
--+Result|Crit Success - Heals for [$total_amt] HP
--vbetweentokens|@{selected|token_id} @{target|token_id} breath-magic
--vtoken|@{target|token_id} nova-magic
--<|
--:Fail_sub|
--+Roll|[$TreatRoll.Total] vs DC [$DC]
--+Result|Fail - No effect
--vbetweentokens|@{selected|token_id} @{target|token_id} splatter-smoke
--<|
--:Fumble_sub|
--=damage_amt|1d8
--+Roll|[$TreatRoll.Total] vs DC [$DC]
--+Result|Fumble - Deals [$damage_amt] damage
--vbetweentokens|@{selected|token_id} @{target|token_id} beam-death
--vtoken|@{target|token_id} burn-death
--<|
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment