Phillip K. said: Kurt J. said: Phillip K. said: Hello. I am brand new to the Roll20 API and Power Card. I have created a simple macro to make an attack roll, compare it to the target's AC and calculate damage. !power {{ --name|Handaxe --leftsub|Melee Weapon Attack --rightsub|Reach 5 ft. --tokenid|@{selected|token_id} --emote|@{selected|character_name} attacks with his Handaxe! --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{strength_mod} + @{pb} ]] vs AC @{target|npc_ac} --?? $Atk.base > 1 AND $Atk >= @{target|npc_ac} AND $Atk.base < 20 ?? Hit!| Target takes [[ [$Dmg] 1d6 + @{strength_mod} ]] slashing damage! --?? $Atk.base == 20 ?? Critical Hit!| Target takes [[ [$CritDmg] 2d6 + @{strength_mod} ]] slashing damage! }} My question: Is there a way to account for the target's Damage Vulnerabilities or Resistances? Those values look like they are stored in the npc_vulnerabilities and npc_resistances attributes on the NPC's character sheet. The problem is, if a creature has multiple immunities, they are stored as a single list separated by commas. Is it possible to parse the list and compare it to the type of damage the weapon is doing and then make the adjustments? I have tried searching for a solution to this, but haven't had any luck. Any help with this would be greatly appreciated. At the moment, there is no way to do this with PowerCards. I'll ponder some possible methods and see if it is something I can add (not specifically vulnerabilities/resistances, but a generic "contains" function for conditionals. Thanks, Kurt. That would be awesome if you could add that functionality. I do have a new question, however. I've figured out how to use TokenMod with PowerCards to apply a status condition marker to a token, but is there a way to check a selected token to see if a particular status condition marker has been applied? My intent is to create two macros. First, a player casts Hunter's Mark and the macro will apply a 'marked' status condition marker to the target token. Second, when the player attacks the marked target with their weapon attack script, it will have a condition to see if the marked status is in effect and apply the extra 1d6 damage. Hopefully what I'm trying to do makes sense. Thanks in advance for any help. hello, here's my hunter's mark macro !power {{
--tokenid|@{selected|token_id}
--emote|**@{selected|token_name}** lance sa marque sur @{target|character_name}
--name|Marque du chasseur
--leftsub|Action bonus
--rightsub|Dist: 27m
--Ecole :|Divination
--Composants :|V
--Niveau d'origine|[[1]]
--!SlotUsed|**Slot Utilisé : **[[ [$SlotUsedValue] ?{Sort de niveau 1 - Choix du slot :|1, 1|2, 2|3, 3|4, 4|5, 5|6, 6|7, 7} + 0d0]]
--?? $SlotUsedValue <= 2 ?? !infolong*1|**Durée : **Concentration, jusqu'a 1 heure
--?? $SlotUsedValue > 2 AND $SlotUsedValue <= 4 ?? !infolong*2|**Durée : **Concentration, jusqu'a 8 heures
--?? $SlotUsedValue >= 5 ?? !infolong*3|**Durée : **Concentration, jusqu'a 24 heures
--?? $SlotUsedValue == 1 AND @{selected|lvl1_slots_expended} == 0 ?? !cancel*1|$$#98111D|Pas assez de slots niveau 1 $$
--?? $SlotUsedValue == 1 AND @{selected|lvl1_slots_expended} == 0 ?? skipto*1|EndofCard
--?? $SlotUsedValue == 2 AND @{selected|lvl2_slots_expended} == 0 ?? !cancel*2|$$#98111D|Pas assez de slots niveau 2 $$
--?? $SlotUsedValue == 2 AND @{selected|lvl2_slots_expended} == 0 ?? skipto*2|EndofCard
--?? $SlotUsedValue == 3 AND @{selected|lvl3_slots_expended} == 0 ?? !cancel*3|$$#98111D|Pas assez de slots niveau 3 $$
--?? $SlotUsedValue == 3 AND @{selected|lvl3_slots_expended} == 0 ?? skipto*3|EndofCard
--?? $SlotUsedValue == 4 AND @{selected|lvl4_slots_expended} == 0 ?? !cancel*4|$$#98111D|Pas assez de slots niveau 4 $$
--?? $SlotUsedValue == 4 AND @{selected|lvl4_slots_expended} == 0 ?? skipto*4|EndofCard
--?? $SlotUsedValue == 5 AND @{selected|lvl5_slots_expended} == 0 ?? !cancel*5|$$#98111D|Pas assez de slots niveau 5 $$
--?? $SlotUsedValue == 5 AND @{selected|lvl5_slots_expended} == 0 ?? skipto*5|EndofCard
--?? $SlotUsedValue == 6 AND @{selected|lvl6_slots_expended} == 0 ?? !cancel*6|$$#98111D|Pas assez de slots niveau 6 $$
--?? $SlotUsedValue == 6 AND @{selected|lvl6_slots_expended} == 0 ?? skipto*6|EndofCard
--?? $SlotUsedValue == 7 AND @{selected|lvl7_slots_expended} == 0 ?? !cancel*7|$$#98111D|Pas assez de slots niveau 7 $$
--?? $SlotUsedValue == 7 AND @{selected|lvl7_slots_expended} == 0 ?? skipto*7|EndofCard
--!Description1|**Description : ** Vous choisissez une créature située dans votre champ de vision et à portée et lui apposez une marque mystique la désignant comme votre proie. Jusqu'à la fin du sort, vous lui infligez [! 1d6 !] dégâts supplémentaires à chaque fois que vous réussissez à lui infliger des dégâts avec une arme et vous avez **l'avantage sur les éventuels tests de Sagesse (Perception) ou Sagesse (Survie) que vous faites pour la retrouver**. Si la cible tombe à 0 point de vie avant que ce sort se termine, vous pouvez utiliser une action bonus lors d'un tour ultérieur pour marquer une nouvelle créature.
--!Description2|**A plus haut niveau : **Si vous lancez ce sort en utilisant un emplacement de niveau 3 ou 4, vous pouvez vous concentrer sur le sort pendant 8 heures. Si vous utilisez un emplacement de niveau 5 ou supérieur, vous pouvez maintenir votre concentration sur le sort jusqu'à 24 heures.
--api_token-mod*1|_ids @{target|token_id} _ignore-selected _set statusmarkers|archery-target
--api_token-mod*2|_ids @{selected|token_id} _ignore-selected _set statusmarkers|blue
--hroll|[[ [$infolvl1] 0d0 + @{selected|lvl1_slots_expended} -1 ]][[ [$infolvl2] 0d0 + @{selected|lvl2_slots_expended} -1 ]][[ [$infolvl3] 0d0 + @{selected|lvl3_slots_expended} -1 ]][[ [$infolvl4] 0d0 + @{selected|lvl4_slots_expended} -1 ]][[ [$infolvl5] 0d0 + @{selected|lvl5_slots_expended} -1 ]][[ [$infolvl6] 0d0 + @{selected|lvl6_slots_expended} -1 ]][[ [$infolvl7] 0d0 + @{selected|lvl7_slots_expended} -1 ]]
--?? $SlotUsedValue == 1 ?? api_setattr*1| _modb _charid @{selected|character_id} _lvl1_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 1 _fb-content Il reste [! [^infolvl1] !] slot(s) LVL1 sur [! @{selected|lvl1_slots_total} !] !!!
--?? $SlotUsedValue == 2 ?? api_setattr*2| _modb _charid @{selected|character_id} _lvl2_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 2 _fb-content Il reste [! [^infolvl2] !] slot(s) LVL2 sur [! @{selected|lvl2_slots_total} !] !!!
--?? $SlotUsedValue == 3 ?? api_setattr*3| _modb _charid @{selected|character_id} _lvl3_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 3 _fb-content Il reste [! [^infolvl3] !] slot(s) LVL3 sur [! @{selected|lvl3_slots_total} !] !!!
--?? $SlotUsedValue == 4 ?? api_setattr*4| _modb _charid @{selected|character_id} _lvl4_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 4 _fb-content Il reste [! [^infolvl4] !] slot(s) LVL4 sur [! @{selected|lvl4_slots_total} !] !!!
--?? $SlotUsedValue == 5 ?? api_setattr*5| _modb _charid @{selected|character_id} _lvl5_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 5 _fb-content Il reste [! [^infolvl5] !] slot(s) LVL5 sur [! @{selected|lvl5_slots_total} !] !!!
--?? $SlotUsedValue == 6 ?? api_setattr*6| _modb _charid @{selected|character_id} _lvl6_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 6 _fb-content Il reste [! [^infolvl6] !] slot(s) LVL6 sur [! @{selected|lvl6_slots_total} !] !!!
--?? $SlotUsedValue == 7 ?? api_setattr*7| _modb _charid @{selected|character_id} _lvl7_slots_expended|-1 _fb-public _fb-from @{selected|character_name} _fb-header Utilisation d'un slot LVL 7 _fb-content Il reste [! [^infolvl7] !] slot(s) LVL7 sur [! @{selected|lvl7_slots_total} !] !!!
--soundfx|_audio,play,nomenu|Roots
--:EndofCard|
}} for this i'm using these API : Powercard (of course) Token mod Chatsetattr The script chek the lvl slot and put blue marker on caster (concetration) and archery on the target token mod doesn't permit to verify if a marker is already on a token (or i didn't have found yet how) so the 1d6 must be done manually Or (but i haven't tested) you can use Chatsetattr to set a new attribute with a value to the target taht can be check via conditionnal @{taget|marked} == 1 to add 1d6