Add Spell tags to rolltemplate and Gear Qty

This commit is contained in:
Jeffrey Lamb
2017-09-25 22:40:12 -04:00
parent 66999173e3
commit 5b8e1e7c02
4 changed files with 31 additions and 12 deletions
+22 -3
View File
@@ -500,6 +500,7 @@
<input type="hidden" name="attr_calc_gear_dmg" value="0">
<input type="hidden" name="attr_calc_gear_armor" value="0">
<input type="hidden" name="attr_calc_gear_armormod" value="0">
<input type="hidden" name="attr_calc_gear_weight" value="0">
<input type="hidden" name="attr_gear_doroll" value="0">
<input class="expander expand-gear" type="checkbox" name="attr_expand_gear" value="1" title="Details" checked="checked" />
<span> </span>
@@ -512,6 +513,9 @@
<span>
<span class="label" data-i18n="value:">Value:</span><input type="number" name="attr_gear_value" value="0" accept="Value" />
</span>
<span>
<span class="label" data-i18n="qty:">Qty:</span><input type="number" name="attr_gear_quantity" value="1" />
</span>
<span>
<span class="label" data-i18n="weight:">Weight:</span><input type="number" name="attr_gear_weight" accept="Weight" \>
</span>
@@ -571,7 +575,7 @@
<div class="mid-content spells">
<fieldset class="repeating_spells">
<div class="spell-main compendium-drop-target">
<button type="roll" name="roll_spell" value="&{template:spell} {{charname=@{character_name}}} {{spellname=@{spellname_base}}} {{doroll=[[@{spell_doroll}]]}} {{result=[[@{spell_diecount}@{spell_die} + @{spellmod}]]}} {{level=[[@{spell_level}]]}} {{details=@{spelldetails}}}">
<button type="roll" name="roll_spell" value="&{template:spell} {{charname=@{character_name}}} {{spellname=@{spellname_base}}} {{doroll=[[@{spell_doroll}]]}} {{tags=@{spell_tags}}} {{result=[[@{spell_diecount}@{spell_die} + @{spellmod}]]}} {{level=[[@{spell_level}]]}} {{details=@{spelldetails}}}">
<span class="rolltext" name="attr_spell_name" value="@{spell_name}"></span>
</button>
<input type="hidden" name="attr_comp_spell_level" value="-1" accept="Level">
@@ -769,6 +773,9 @@
{{#rollGreater() level 0}}
<div class="rt-header rt-header-minor"><span class="rt-text" data-i18n="level:">Level: </span>{{level}}</div>
{{/rollGreater() level 0}}
{{#tags}}
<div class="rt-header rt-header-minor"><span class="rt-text">{{tags}}</span></div>
{{/tags}}
<div class="rt-content">
{{#modifiers}}
<div class="rt-row">
@@ -2529,11 +2536,23 @@ on("change:repeating_gear:gear_type", function() {
});
});
on("change:repeating_gear:gear_weight remove:repeating_gear", function() {
on("change:repeating_gear:gear_weight change:repeating_gear:gear_quantity", function() {
getAttrs(["repeating_gear_gear_weight", "repeating_gear_gear_quantity"], function(v) {
var weight = v.repeating_gear_gear_weight;
var quantity = v.repeating_gear_gear_quantity;
if (isNaN(weight)) weight = 0;
if (isNaN(quantity)) quantity = 0;
setAttrs({
repeating_gear_calc_gear_weight: +weight * +quantity
});
})
})
on("change:repeating_gear:calc_gear_weight remove:repeating_gear", function() {
getSectionIDs("repeating_gear", function(ids) {
var gearWeights = [];
for(var i=0; i < ids.length; i++) {
gearWeights.push("repeating_gear_" + ids[i] + "_gear_weight");
gearWeights.push("repeating_gear_" + ids[i] + "_calc_gear_weight");
}
getAttrs(gearWeights, function(v) {
var newLoad = 0;
+1 -1
View File
@@ -5,5 +5,5 @@
"roll20userid": "1464775",
"preview": "Dungeon World.png",
"compendium": "dw",
"instructions": "Designed for use with Dungeon World, an Apocalypse World Engine game.\n\n* Fully Compatible with the Dungeon World Compendium. Import Moves, Spells, and entire Classes straight from the tabletop.\n* Designed after the official Dungeon World Play Sheets for a streamlined, comfortable play experience."
"instructions": "Designed for use with Dungeon World, an Apocalypse World Engine game.\n\n* Fully Compatible with the [Dungeon World Compendium](https://roll20.net/compendium/dw). Import Moves, Spells, and entire Classes straight from the tabletop.\n* Designed after the official Dungeon World Play Sheets for a streamlined, comfortable play experience."
}
+4 -4
View File
@@ -70,6 +70,7 @@
"load-u": "LOAD",
"gear-name": "Gear Name:",
"value:": "Value:",
"qty:": "Qty:",
"weight:": "Weight:",
"equipped": "Equipped",
"item": "Item",
@@ -103,10 +104,9 @@
"none": "None",
"spellcasting": "<h3>Spellcasting</h3>",
"level-0-spell-type": "Level 0 Spell Type",
"rolls": "rolls",
"name-makes-move": "makes a Move",
"move-effect": "Effect:",
"rolls": "rolls",
"displays": "displays",
"name-makes-spell": "casts a spell",
"level:": "Level: ",
"displays": "displays"
"level:": "Level: "
}
+4 -4
View File
@@ -70,6 +70,7 @@
"load-u": "LOAD",
"gear-name": "Gear Name:",
"value:": "Value:",
"qty:": "Qty:",
"weight:": "Weight:",
"equipped": "Equipped",
"item": "Item",
@@ -103,10 +104,9 @@
"none": "None",
"spellcasting": "<h3>Spellcasting</h3>",
"level-0-spell-type": "Level 0 Spell Type",
"rolls": "rolls",
"name-makes-move": "makes a Move",
"move-effect": "Effect:",
"rolls": "rolls",
"displays": "displays",
"name-makes-spell": "casts a spell",
"level:": "Level: ",
"displays": "displays"
"level:": "Level: "
}