Skip to content

Commit

Permalink
Merge pull request #12991 from Capycat-Games/skyfall-new-charactersheet
Browse files Browse the repository at this point in the history
[BugFix][Skyfall] Critical Damage roll and some CSS in charactersheet
  • Loading branch information
kfroll20 authored Jun 11, 2024
2 parents 86aabe1 + f05b9fb commit 9f15a26
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
26 changes: 16 additions & 10 deletions Skyfall/ficha.html
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@
<option value="@{spellcasting_attribute}">MAGIA</option>
<option value="0">-</option>
</select><span class="sheet-atk-plus">+</span>
<input class="num" type="text" name="attr_atkmod" placeholder="0" >
<input class="sheet-num" type="text" name="attr_atkmod" placeholder="0" >
<span class="sheet-atk-plus">+</span>
<input type="checkbox" name="attr_atkprofflag" value="(@{proficient_bonus})" checked="checked" class="sheet-atk-mod">
<span class="sheet-atk-input-flag">PROFICIENCIA</span>
Expand All @@ -581,9 +581,9 @@
<span class="sheet-atk-span-name">DISTÂNCIA:</span>
<input type="text" name="attr_atkrange" class="sheet-style-width-hundred-seventy">
<span class="sheet-atk-input-flag">BÔNUS MÁGICO:</span>
<input class="num" type="text" name="attr_atkmagic" placeholder="0" class="sheet-style-width-thirty">
<input class="sheet-num" type="text" name="attr_atkmagic" placeholder="0" class="sheet-style-width-thirty">
<span class="sheet-atk-input-flag">CRÍTICO:</span>
<input class="num" type="text" name="attr_atkcritrange" value="20" placeholder="20" class="sheet-style-width-thirty">
<input class="sheet-num" type="text" name="attr_atkcritrange" value="20" placeholder="20" class="sheet-style-width-thirty">
</div>
<div class="sheet-row">
<input type="checkbox" name="attr_dmgflag" value="{{damage=1}} {{dmg1flag=1}}" checked="checked">
Expand All @@ -601,7 +601,7 @@
<option value="0">-</option>
</select>
<span class="sheet-font-size-twenty">+</span>
<input class="num" type="text" name="attr_dmgmod" placeholder="0" class="sheet-style-width-thirty">
<input class="sheet-num" type="text" name="attr_dmgmod" placeholder="0" class="sheet-style-width-thirty">

<span class="sheet-font-size-seventeen">TIPO:</span>
<input type="text" name="attr_dmgtype" placeholder="Corte" class="sheet-style-width-hundred">
Expand All @@ -623,7 +623,7 @@
<option value="0">-</option>
</select>
<span class="sheet-font-size-twenty">+</span>
<input class="num" type="text" name="attr_dmg2mod" placeholder="0" class="sheet-style-width-thirty">
<input class="sheet-num" type="text" name="attr_dmg2mod" placeholder="0" class="sheet-style-width-thirty">
<span class="sheet-font-size-seventeen">TIPO:</span>
<input type="text" name="attr_dmg2type" placeholder="Slashing" class="sheet-style-width-hundred">
<span>CRIT:</span>
Expand Down Expand Up @@ -1917,6 +1917,12 @@
update_spell_card(eventinfo);
});
});

["atkflag","atkname","atkattr_base","atkmod","atkprofflag","atkmagic","dmgflag","dmgbase","dmgattr","dmgmod","dmgtype","dmg2flag","dmg2base","dmg2attr","dmg2mod","dmg2type","dmgcustcrit","dmg2custcrit","saveflag","savedc","saveeffect","saveflat","hldmg","spellid","spelllevel","atkrange","itemid","ammo",].forEach((atb) => {
on(`change:repeating_attacks:${atb}`, function(eventinfo){
update_attacks("all");
})
});

const update_attacks = (update_id, source) => {
if (update_id.substring(0,1) === "-" && update_id.length === 20) {
Expand Down Expand Up @@ -2344,7 +2350,7 @@
<span>
{{globaldamage}}
{{#attack}}
{{#rollGreater() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollGreater() r1}}
{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}
{{/attack}}
</span>
<span class="sublabel">{{globaldamagetype}}</span>
Expand All @@ -2361,7 +2367,7 @@
<span class="damage">
{{dmg1}}
{{#attack}}
{{#rollGreater() r1}}+ {{crit1}}{{/rollGreater() r1}}
{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}
{{/attack}}
</span>
<span class="sublabel">{{dmg1type}}</span>
Expand All @@ -2375,7 +2381,7 @@
<span class="damage">
{{dmg2}}
{{#attack}}
{{#rollGreater() r1}}+ {{crit2}}{{/rollGreater() r1}}
{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}
{{/attack}}
</span>
<span class="sublabel">{{dmg2type}}</span>
Expand All @@ -2388,7 +2394,7 @@
<span class="damage">
{{dmg1}}
{{#attack}}
{{#rollGreater() r1}}+ {{crit1}}{{/rollGreater() r1}}
{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}
{{/attack}}
</span>
<span class="sublabel">{{dmg1type}}</span>
Expand All @@ -2398,7 +2404,7 @@
<span>
{{dmg2}}
{{#attack}}
{{#rollGreater() r1}}+ {{crit2}}{{/rollGreater() r1}}
{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}
{{/attack}}
</span>
<span class="sublabel">{{dmg2type}}</span>
Expand Down
2 changes: 1 addition & 1 deletion Skyfall/skyfall.css
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@
}

.sheet-attacksgrid .sheet-options span{
width: initial;
width: initial !important;
display: inline-block;
}

Expand Down

0 comments on commit 9f15a26

Please sign in to comment.