Files
roll20-character-sheets-tester/Troika/templates/_mixins.pug
T
morgdalaine d528a226d9 Add translation support
Some roll template text is dynamic and was not included
2023-01-20 13:33:32 -06:00

88 lines
3.5 KiB
Plaintext

//- Roll Buttons
//- -- Damage
mixin buttonDamage(attribute)
button.button.button--roll(
type="roll",
name=`roll_${attribute}`,
value!="&{template:troika} {{title=Damage}} {{subTitle=@{weapon}}} {{attribute=@{weapon}}} {{rollModifier=@{repDamageRollModifier}}} {{damageRoll=[[[[1d6]] + @{repDamageRollModifier}]]}} {{r1=$[[0]]}} {{wD1=@{weaponDamage1}}} {{wD2=@{weaponDamage2}}} {{wD3=@{weaponDamage3}}} {{wD4=@{weaponDamage4}}} {{wD5=@{weaponDamage5}}} {{wD6=@{weaponDamage6}}} {{wD7=@{weaponDamage7}}}"
)
span.button-title Damage
//- -- Luck
mixin buttonLuck(attribute)
button.button.button--roll.u-bg-luck(
type="roll",
name=`roll_${attribute}`,
value!=`&{template:troika} {{title=Roll Equal Or Under}} {{subTitle=Luck [@{${attribute}}]}} {{attribute=[[@{${attribute}}]]}} {{attributeBase=@{${attribute}}}} {{luckRoll=[[ [[1d6]] + [[1d6]] ]]}} {{r1=$[[1]]}} {{r2=$[[2]]}}`
)
span.button-title Test Luck
//- -- Skill Under
mixin buttonSkillUnder(title, rollType, buttonTitle)
button.button.button--roll(
type="roll",
name=`roll_${buttonTitle}`,
value!=`&{template:troika} {{title=${title}}} {{subTitle=@{skillName} [@{skillTotal}]}} {{rollModifier=@{skillRollModifier}}} {{attribute=[[@{skillTotal}]]}} {{rollSkillUnder=true}} {{${rollType}=[[ [[1d6]] + [[1d6]] ]]}} {{r1=$[[1]]}} {{r2=$[[2]]}}`
)
span.button-title= buttonTitle
//- -- Skill Versus
mixin buttonSkillOver(title, rollType, buttonTitle)
button.button.button--roll(
type="roll",
name=`roll_${buttonTitle}`,
value!=`&{template:troika} {{title=${title}}} {{subTitle=@{skillName} [@{skillTotal}]}} {{rollModifier=@{skillRollModifier}}} {{attribute=[[@{skillTotal}]]}} {{rollSkillVersus=true}} {{${rollType}=[[ [[1d6]] + [[1d6]] + @{skillRank} + @{skillValue}]]}} {{r1=$[[1]]}} {{r2=$[[2]]}}`
)
span.button-title= buttonTitle
//- Action Buttons
mixin buttonsAddSub(buttonName)
button.button.button--mod.button--mod-add(type="action", name=`act_add${buttonName}`)
span +
button.button.button--mod.button--mod-sub(type="action", name=`act_sub${buttonName}`)
span -
mixin buttonsGridAdd(buttonName)
button.grid-modifier-add.button.button--grid-mod.button--grid-mod-add(
type="action",
name=`act_add${buttonName}`
)
span +
mixin buttonsGridSub(buttonName)
button.grid-modifier-sub.button.button--grid-mod.button--grid-mod-sub(
type="action",
name=`act_sub${buttonName}`
)
span -
mixin buttonsInvGrab(inventoryIndex)
button.button.button--inv(
type="roll",
name="roll_inventory",
value!=`&{template:troika} {{title=Grabbing}} {{subTitle=@{inventory${inventoryIndex}}[${inventoryIndex}]}} {{inventoryIndex=[[${inventoryIndex}]]}} {{rollInventory=[[ [[1d6]] + [[1d6]] ]]}} {{r1=$[[1]]}} {{r2=$[[2]]}}`
)
span.sheet-button-title Grab
mixin buttonsInvMoveDown(inventoryIndex)
button.button.button--inv.button--inv-move(
type="action",
name=`act_inventoryDown${inventoryIndex}`
)
span.u-font-icon }
mixin buttonsInvMoveUp(inventoryIndex)
button.button.button--inv.button--inv-move(
type="action",
name=`act_inventoryUp${inventoryIndex}`
)
span.u-font-icon {
mixin buttonsProvision(provisionIndex)
button.button.button--provision(type="action", name=`act_provision${provisionIndex}`)
span.checked.u-font-icon 3
//- Input (Attribute)
mixin attrInput(txtClass, txtType, txtName, boolReadonly, value)
input(class=txtClass, type=txtType, name="attr_" + txtName, readonly=boolReadonly, value=value)