Ok, I found an old Sleep scriptcard and modified it for color spray. Unfortunately it currently requires the potentially affected tokens to be selected, since cones with scriptcards are much trickier than squares. One possibility is to use SmartAoE to generate the cone and position it, then manually select the targets within the AoE prior to running the macro below. I limited the chat output to only show the HP rolled and the number of targets actually affected by the spell to avoid name/hp spoilers. It also checks to ensure targets are not immune to blindness. Affected targets get bleeding-eye status markers placed on them (from lowest hp target on up). It also requires token-mod right now, but I could modify this with more current scriptcard functionality if you don't want to enable players-can-use-ids for token-mod. !script {{
--#title|Color Spray
--#leftsub|Level ?{Cast at what level?|1|2|3|4|5|6|7|8|9}
--=numDice|?{Cast at what level?} - 1 * 2 + 6
--&damageStr|[$numDice.Raw]d10
--#rightsub|[&damageStr]
--~tokID|getselected
--?[$tokIDCount] -lt 1|[
--+Error|You must select at least one token to continue!
--X| End Macro
--]|
--%i|1;[$tokIDCount];1
--:TOKEN MUST NOT IMMUNE TO BLINDNESS|
--?"X[*[&tokID[&i]]:npc_condition_immunities]" -inc "blind"|NextToken
--:ADD TO THE "ARRAYS" OF VARIABLES|
--&validTokID[&i]|[&tokID[&i]]
--=hp[&i]|[*[&validTokID[&i]]:t-bar1_value]
--=numValidToks|[$numValidToks] + 1
--:NextToken|
--%|
--=hpRemaining|[&damageStr]
--+HP Affected|[$hpRemaining]
--:SORT ALL "ARRAY" VARIABLES BY HP VALUE WITH A BUBBLE SORT|
--=max_i|[$numValidToks]
--=i|0
--:OuterLoop|
--=i|[$i]+1
--=j|[$i]
--:InnerLoop|
--=j|[$j]+1
--?[$hp[$i.Raw]] -gt [$hp[$j.Raw]] |>BubbleUp;[$i.Raw];[$j.Raw]
--?[$j.Raw] -lt [$max_i.Raw]|InnerLoop
--?[$i.Raw] -lt [$max_i.Raw]|OuterLoop
--:APPLY SLEEP DAMAGE TO SORTED TOKENS|
--=i|0
--:ApplyLoop|
--=i|[$i]+1
--=ThisHP|[$hp[$i.Raw]]
--?[$ThisHP.Raw] -le [$hpRemaining.Raw]|>ApplyEffect;[&validTokID[$i.Raw]];bleeding-eye;[$ThisHP.Raw]
--?[$i.Raw] -lt [$numValidToks.Raw]|ApplyLoop
--+Number of targets affected|[$numAffected]
--:End|
--X|
--:PROCEDURES|
--:BubbleUp| accepts i, j as parameters. Swaps var[i] & var[j] for two variables
--=Temp|[$hp[%2%]]
--=hp[%2%]|[$hp[%1%]]
--=hp[%1%]|[$Temp]
--&Temp|[&validTokID[%2%]]
--&validTokID[%2%]|[&validTokID[%1%]]
--&validTokID[%1%]|[&Temp]
--<|
--:ApplyEffect| accepts tokenID, condition marker, and hp to subtract as parameters
--@token-mod|_ignore-selected _ids [%1%] _set statusmarkers|[%2%]
--=hpRemaining|[$hpRemaining]-[%3%]
--=numAffected|[$numAffected]+1
--<|
}}