Tweaked the template to display number of dice rolled and excess next to task and threat die subheaders

This commit is contained in:
Christoph
2020-06-15 09:41:58 -07:00
parent b170a71485
commit ff598e4e30
2 changed files with 41 additions and 42 deletions
+28 -28
View File
@@ -499,7 +499,7 @@ select.sheet-typeSelector
{
display: grid;
grid-template-columns: repeat(12, 20px);
grid-template-rows: repeat(11,21px);
grid-template-rows: repeat(10,21px);
background-color: #353635;
border: none;
font-family: 'Myriad Pro';
@@ -695,36 +695,36 @@ select.sheet-typeSelector
{
grid-column: 11/12;
}
/*Excess Dice*/
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-excessDice
/*Dice Count*/
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-templateDiceCount .inlinerollresult
{
grid-row: 8/9;
background-color: #414241;
}
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-excessDice .inlinerollresult
{
border: none;
font-weight: 400;
padding: 0;
}
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-autoHits
{
grid-column: 5/8;
padding-top: 2px;
font-weight: 400;
}
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-autoMisses
{
grid-column: 9/-1;
padding-top: 2px;
border: none;
font-weight: 400;
padding: 0;
}
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-threatDiceCount
{
grid-row: 6/7;
}
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-taskDiceCount
{
grid-row: 4/5;
}
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-templateExcessDice
{
grid-column: 5/-1;
padding-top: 2px;
font-weight: 400;
}
/*Charge*/
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-templateCharge
{
grid-row: 9/10;
background-color: #353635;
grid-row: 8/9;
background-color: #414241;
}
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-templateChargeTotal
@@ -738,8 +738,8 @@ select.sheet-typeSelector
/*Results*/
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-templateResults
{
grid-row: 10/11;
background-color: #414241;
grid-row: 9/10;
background-color: #353635;
}
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-templateResultTotal
{
@@ -757,8 +757,8 @@ select.sheet-typeSelector
/*Outcome*/
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-templateOutcome
{
grid-row: 11/12;
background-color: #353635;
grid-row: 10/11;
background-color: #414241;
}
.sheet-rolltemplate-FS .sheet-rolltemplateContainer .sheet-templateOutcomeDisplay
{
+13 -14
View File
@@ -8030,6 +8030,12 @@
<!--Task Dice-->
<div class="taskDiceSubheader templateSubheader">Task Dice//</div>
<div class="templateDiceCount taskDiceCount templateExcessDice">
{{taskDice}}
{{#rollGreater() autoHits 0}}
<span> + {{autoHits}} auto-hits</span>
{{/rollGreater() autoHits 0}}
</div>
<div class="taskDice dice die0">{{task0}}</div>
<div class="taskDice dice die1">{{task1}}</div>
<div class="taskDice dice die2">{{task2}}</div>
@@ -8043,6 +8049,12 @@
<!--Threat Dice-->
<div class="threatDiceSubheader templateSubheader">Threat Dice//</div>
<div class="templateDiceCount threatDiceCount templateExcessDice">
{{threatDice}}
{{#rollGreater() autoMisses 0}}
<span> + {{autoMisses}} auto-misses</span>
{{/rollGreater() autoMisses 0}}
</div>
<div class="threatDice dice die0">{{threat0}}</div>
<div class="threatDice dice die1">{{threat1}}</div>
<div class="threatDice dice die2">{{threat2}}</div>
@@ -8054,19 +8066,6 @@
<div class="threatDice dice die8">{{threat8}}</div>
<div class="threatDice dice die9">{{threat9}}</div>
<!--Excess Dice-->
<div class="templateSubheader excessDice">Excess Dice//</div>
<div class="autoHits excessDice">
{{#rollGreater() autoHits 0}}
<span>add {{autoHits}} Hits</span>
{{/rollGreater() autoHits 0}}
</div>
<div class="autoMisses excessDice">
{{#rollGreater() autoMisses 0}}
<span>add {{autoMisses}} Misses</span>
{{/rollGreater() autoMisses 0}}
</div>
<!--Charge-->
<div class="templateSubheader templateCharge"> Charge//</div> <div class="templateChargeTotal templateCharge">{{salvoCharge}}</div>
@@ -9695,7 +9694,7 @@
return `{{threat${num}=$[[${(num + taskDice) * 2}]]}}`;
}).join(' ');
setObj.salvoMacro = `&{template:FS} {{salvoSkill=${values.salvoSkill}}} {{salvoSkillRating=${values.salvoSkillRating}}} {{salvoSpecialty=${values.salvoSpecialty}}} {{salvoSpecialtyRating=${values.salvoSpecialtyRating}}} {{salvoTool=${values.salvoTool}}} {{salvoToolRating=${values.salvoToolRating}}} {{salvoCharge=${values.salvoCharge}}} {{salvoAdvantage=${values.salvoAdvantage}}} {{total=${wholeRoll}}} ${taskFields} ${threatFields} ${autoHits} ${autoMisses}`;
setObj.salvoMacro = `&{template:FS} {{salvoSkill=${values.salvoSkill}}} {{salvoSkillRating=${values.salvoSkillRating}}} {{salvoSpecialty=${values.salvoSpecialty}}} {{salvoSpecialtyRating=${values.salvoSpecialtyRating}}} {{salvoTool=${values.salvoTool}}} {{salvoToolRating=${values.salvoToolRating}}} {{salvoCharge=${values.salvoCharge}}} {{salvoAdvantage=${values.salvoAdvantage}}} {{taskDice=${taskDice}}} {{threatDice=${threatDice}}} {{total=${wholeRoll}}} ${taskFields} ${threatFields} ${autoHits} ${autoMisses}`;
console.log(setObj);
setAttrs(setObj);