Tech optimisation and some bug fixes
Technical optimisations of some sheet workers with the new eventinfo.newvalue, and somes bug fixes for Antika, Cahiers du Vastemonde, Cypher System (english and french), Dungeon World (french), Mordiou, Portes Montres Trésors, Savage Worlds (french), SIG the city between, Swords & Wizardry and White Lies.
This commit is contained in:
@@ -1,3 +1,45 @@
|
||||
<!-- ******* SHEET WORKERS **************** -->
|
||||
<script type="text/worker">
|
||||
on("change:sheetusebonus", function(eventinfo) {
|
||||
if(eventinfo.newValue == "1"){
|
||||
setAttrs({
|
||||
rollQstBonus: "?{Bonus|0|1|2|-1|-2}",
|
||||
rollVarBonus: 0
|
||||
});
|
||||
} else {
|
||||
setAttrs({
|
||||
rollQstBonus: 0,
|
||||
rollVarBonus: 0
|
||||
});
|
||||
};
|
||||
});
|
||||
on("change:sheetusecost", function(eventinfo) {
|
||||
if(eventinfo.newValue == "1"){
|
||||
setAttrs({
|
||||
rollQstCost: "?{Cost|0}",
|
||||
rollVarCost: 0
|
||||
});
|
||||
} else {
|
||||
setAttrs({
|
||||
rollQstCost: 0,
|
||||
rollVarCost: 0
|
||||
});
|
||||
};
|
||||
});
|
||||
on("change:sheetuseasset", function(eventinfo) {
|
||||
if(eventinfo.newValue == "1"){
|
||||
setAttrs({
|
||||
rollQstAsset: "?{Asset|0|1|2}",
|
||||
rollVarAsset: 0
|
||||
});
|
||||
} else {
|
||||
setAttrs({
|
||||
rollQstAsset: 0,
|
||||
rollVarAsset: 0
|
||||
});
|
||||
};
|
||||
});
|
||||
</script>
|
||||
<!-- ******* PC **************** -->
|
||||
<div style="display:inline-block;font-size:11px;color: #888888;text-align:left;font-weight: bold;">Style:</div>
|
||||
<input type="radio" name="attr_sheetStyle" value="0" class="sheet-styleCypher" checked="checked" title="Cypher System" /><span>Cypher System</span>
|
||||
@@ -9,56 +51,9 @@
|
||||
<input type="radio" name="attr_sheetRolls" value="1" class="sheet-macroRoll" title="Roll using roll queries for parameters" /><span>Roll Queries</span>
|
||||
<div style="display:inline-block;font-size:11px;color: #888888;text-align:left;font-weight: bold;margin-left:0px;">- Use:</div>
|
||||
<input type="checkbox" name="attr_sheetUseAsset" value="1" class="sheet-chkUseAsset" title="Ask for/Use assets in attributes, skills and attacks rolls" /><span>Assets</span>
|
||||
<input type="checkbox" name="attr_sheetUseBonus" value="1" class="sheet-chkUseBonus" title="Ask for/Use roll bonus in attributes, skills and attacks rolls" /><span>bonus</span>
|
||||
<input type="checkbox" name="attr_sheetUseBonus" value="1" class="sheet-chkUseBonus" title="Ask for/Use roll bonus in attributes, skills and attacks rolls" /><span>Bonus</span>
|
||||
<input type="checkbox" name="attr_sheetUseCost" value="1" class="sheet-chkUseCost" title="Ask for/Use cost in attributes and skills rolls" /><span>Costs</span>
|
||||
<div style="display:inline-block;font-size:11px;color: #888888;text-align:left;margin-left:0px;">- v1.6 (2016-02-21)</div>
|
||||
<script type="text/worker">
|
||||
on("change:sheetusebonus", function() {
|
||||
getAttrs(["sheetUseBonus"], function(values) {
|
||||
if(values.sheetUseBonus == "1"){
|
||||
setAttrs({
|
||||
rollQstBonus: "?{Bonus|0|1|2|-1|-2}",
|
||||
rollVarBonus: 0
|
||||
});
|
||||
} else {
|
||||
setAttrs({
|
||||
rollQstBonus: 0,
|
||||
rollVarBonus: 0
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
on("change:sheetusecost", function() {
|
||||
getAttrs(["sheetUseCost"], function(values) {
|
||||
if(values.sheetUseCost == "1"){
|
||||
setAttrs({
|
||||
rollQstCost: "?{Cost|0}",
|
||||
rollVarCost: 0
|
||||
});
|
||||
} else {
|
||||
setAttrs({
|
||||
rollQstCost: 0,
|
||||
rollVarCost: 0
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
on("change:sheetuseasset", function() {
|
||||
getAttrs(["sheetUseAsset"], function(values) {
|
||||
if(values.sheetUseAsset == "1"){
|
||||
setAttrs({
|
||||
rollQstAsset: "?{Asset|0|1|2}",
|
||||
rollVarAsset: 0
|
||||
});
|
||||
} else {
|
||||
setAttrs({
|
||||
rollQstAsset: 0,
|
||||
rollVarAsset: 0
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div style="display:inline-block;font-size:11px;color: #888888;text-align:left;margin-left:0px;">- v1.7 (2017-09-17)</div>
|
||||
<div class="sheet-main">
|
||||
<div style="display: none;"> <!-- HIDDEN Rolls and Calculations -->
|
||||
<!-- Using the Action Section -->
|
||||
@@ -621,7 +616,7 @@
|
||||
value="&{template:cyphBasicRoll} {{charid=@{character_id}}} {{stat=intellect}} {{diceRoll=[[1d20cs>17cf1]]}} {{attribute=@{atkintelname}}} {{attrEdge=@{intellectedge}}} {{difficulty=[[@{rollQstDiff}]]}} {{effortRoll=[[@{rollQstRollEff}]]}} {{assets=[[@{rollQstAsset}]]}} {{bonusToRoll=[[@{rollQstBonus}]]}} {{statExpense=[[@{atkintelcost}]]}} {{effortDmg=[[@{rollQstRollDmg}]]}} {{targNum=[[@{targNumQst}]]}} {{finalDiff=[[@{rollQstDiff}-(1*@{rollQstAsset})-(1*@{rollQstRollEff})-(1*@{atkintellvl})-(1*@{atkintelmod})]]}} {{targNumRoll=[[(3*@{rollQstDiff})-(3*@{rollQstAsset})-(3*@{rollQstRollEff})-(3*@{atkintellvl})-(3*@{atkintelmod})-(1*@{rollQstBonus})]]}} {{totalCost=[[@{effortCostQst}+@{atkintelcost}-@{intellectedge}]]}} {{effortCost=[[@{effortCostQst}]]}} {{bonusDmg=[[@{atkinteldmg}+@{rollQstRollDmg}*3]]}} {{skilled=[[@{atkintellvl}]]}} {{atkmod=[[@{atkintelmod}]]}}"
|
||||
name="roll_macroIntelAttack"></button>
|
||||
<input type="text" style="width: 305px;font-weight: bold;" name="attr_atkintelname" title="Attack: weapon or power/ability name" placeholder="Attack" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="sheet-text2" style="text-align: right;margin-bottom: 2px;">
|
||||
<button type="roll" name="ShowIntelAttack" class="sheet-btDesc" title="Show in chat" value="&{template:cyphDesc} {{name=@{atkintelname}}} {{type=Attack}} {{description=Mod:@{atkintelmod}, Damage:@{atkinteldmg}, Skilled:@{atkintellvl}, Cost:@{atkintelcost}}}"><img src="https://s3.amazonaws.com/files.d20.io/images/13924213/_SbpEpVjj9V7Dow_GKKYhQ/med.png?1448153028" style="width: 16px;height:16px;"/></button>
|
||||
Mod:
|
||||
|
||||
Reference in New Issue
Block a user