Hi all
This is a macro I have to manage attack and damage rolls for Shotguns in Call of Cthulhu (in this case a particular model of shotgun). It is based on a macro created by someone that I just tampered with (apologies, not sure who the original author was, but not me).
The macro runs nicely: it first displays a menu to select the range (10m, 20m, 50m), and based on the range the damage roll is calculated accordingly (4d6, 2d6, and 1d6 respectively).
The issue is the damage calculation for extreme attack rolls. You may not be familiar with CoC, but when you roll 1/5th or less of the attack skill roll needed to it you deal extra damage. For shotguns as non-impaling weapons this is the maximum damage, no roll needed. This will then be 24hp at 10m, 12hp at 20m and 6hp at 50m
The issue is that I have no clue on how to configure extreme damage to be dependant on the initial range selected. Probably the range selection only applies to the normal damage section. The macro just defines an extreme damage of 24, irrespectively of the range selected.
Probably it is easy to solve, but I'm afraid my programming skills are limited.
if anyone could help that would be appreciated
This is the macro:
@{selected|token_name}
@{selected|roll_whisper} &{template:callofcthulhu} {{name=@{selected|character_name}}} {{title=shotgun}} @{selected|roll_option} {{roll=[[1d100cs<1cf>100]]}},{{roll_type=[[1]]}},{{roll_target=[[floor(@{selected|rifle_shotgun}/@{selected|dice_toggle}}},{{roll_half=[[floor(@{selected|rifle_shotgun}/2)]]}},{{roll_fifth=[[floor(@{selected|rifle_shotgun}/5)]]}},{{roll_fifth_1=[[floor(@{selected|rifle_shotgun}/5)+1]]}},{{roll_malfunction=[[100]]}} {{weapon_name=12 gauge Shotgun 2 barrels}} {{weapon_damage=[[?{distance|10m, 4d6| 20m, 2d6| 50m, 1d6}]]}} {{weapon_damage_extreme=[[ 24 ]]}}{{weapon_range=10m | 20m | 50m}} {{weapon_attacks=1|2}} {{text=}} {{roll_bonus=[@{selected|translation_bonuspenalty}](~@{selected|character_id}|bonus)}}