Official Savage Worlds v1.00.22
Fixed issues with Spells Damage Rolls
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
<script type="text/worker">
|
||||
const sheetVersionPrefix = "Official Savage Worlds v";
|
||||
const sheetVersion = "1.00.21";
|
||||
const sheetVersion = "1.00.22";
|
||||
|
||||
// Define colors for Logs
|
||||
const r20color = "#E948C9";
|
||||
@@ -474,6 +474,12 @@ const upgradeSheet = function(
|
||||
setattrvals["newcontent"] = "unread";
|
||||
setattrvals["newdocumentation"] = "unread";
|
||||
}
|
||||
if (versionthree < 0.22) {
|
||||
// Will want to faux swap HBRaiseRule so the multiple dice bonus stuff works for spells
|
||||
fauxChange("RaiseHBRule", "3")
|
||||
setattrvals["newcontent"] = "unread";
|
||||
setattrvals["newdocumentation"] = "unread";
|
||||
}
|
||||
else {
|
||||
log(
|
||||
"Upgrade",
|
||||
@@ -2310,8 +2316,6 @@ const weaponfields = [
|
||||
"dmgnumdice",
|
||||
"dmgdietype",
|
||||
"dmgbonusnum",
|
||||
"weaponsbdtnum",
|
||||
"weaponsbdt",
|
||||
"weaponnotes",
|
||||
"weaponweight",
|
||||
"weaponminstrength",
|
||||
@@ -2389,6 +2393,7 @@ const armorfields = [
|
||||
"armorstack",
|
||||
"ArmorTypeWeight",
|
||||
"ArmorNotes",
|
||||
"embeddedtoughness"
|
||||
];
|
||||
const shieldfields = [
|
||||
"ShieldType",
|
||||
@@ -3933,11 +3938,11 @@ function getBonusFields(repSection, setField) {
|
||||
log(`Key`,`repeating_${repSection}_${idArray[i]}_${preBonusDmg}bonusdmg`,"yellow");
|
||||
log(`Value`,`@{${setField}}`,"yellow");
|
||||
//Made change here on 12/17/2021
|
||||
setField === "weaponsbdt" ? fieldlist[
|
||||
`repeating_${repSection}_${idArray[i]}_${preBonusDmg}bonusdmg`
|
||||
] = "@{weaponsbdtnum}@{" + setField + "}" : fieldlist[
|
||||
`repeating_${repSection}_${idArray[i]}_${preBonusDmg}bonusdmg`
|
||||
] = "@{" + setField + "}";
|
||||
setField === "weaponsbdt"
|
||||
? fieldlist[`repeating_${repSection}_${idArray[i]}_${preBonusDmg}bonusdmg`] = "@{weaponsbdtnum}@{" + setField + "}"
|
||||
: setField === "spellsbdt"
|
||||
? fieldlist[`repeating_${repSection}_${idArray[i]}_${preBonusDmg}bonusdmg`] = "@{spellssbdtnum}@{" + setField + "}"
|
||||
: fieldlist[`repeating_${repSection}_${idArray[i]}_${preBonusDmg}bonusdmg`] = "@{" + setField + "}";
|
||||
}
|
||||
log("fieldlist", JSON.stringify(fieldlist), "yellow");
|
||||
setAttrs(fieldlist);
|
||||
@@ -4033,7 +4038,7 @@ function setBonusAutoroll(autoRollSetting, repSection) {
|
||||
}
|
||||
|
||||
on(
|
||||
"change:autorollbonusdmg change:repeating_weapons:weapon change:repeating_weapons:weapondamage change:repeating_weapons:weaponsbdt change:repeating_weapons:weaponsbdtnum change:repeating_spells:power change:repeating_spells:powerdamage change:repeating_spells:spellsbdt change:repeating_paweapons:weapon change:repeating_paweapons:weapondamage change:repeating_paweapons:weaponsbdt change:repeating_paweapons:weaponsbdtnum change:repeating_raweapons:weapon change:repeating_raweapons:weapondamage change:repeating_raweapons:weaponsbdtchange:repeating_raweapons:weaponsbdtnum",
|
||||
"change:autorollbonusdmg change:repeating_weapons:weapon change:repeating_weapons:weapondamage change:repeating_weapons:weaponsbdt change:repeating_weapons:weaponsbdtnum change:repeating_spells:power change:repeating_spells:powerdamage change:repeating_spells:spellsbdt change:repeating_spells:spellsbdtnum change:repeating_paweapons:weapon change:repeating_paweapons:weapondamage change:repeating_paweapons:weaponsbdt change:repeating_paweapons:weaponsbdtnum change:repeating_raweapons:weapon change:repeating_raweapons:weapondamage change:repeating_raweapons:weaponsbdtchange:repeating_raweapons:weaponsbdtnum",
|
||||
function(eventInfo) {
|
||||
//If a new weapon or spell is created, need to configure the Bonus Damage roll appropriately
|
||||
//Get which repeating section the change is from
|
||||
@@ -4067,7 +4072,7 @@ on(
|
||||
vbonusRoll
|
||||
? valueString[`repeating_${rSection}_${preBonusDmg}bonusdmg`] = `@{${raiseRule}}`
|
||||
// : valueString[`repeating_${rSection}_${preBonusDmg}bonusdmg`] = `@{dmgbonusnum}@{${raiseRule}}`;
|
||||
: valueString[`repeating_${rSection}_${preBonusDmg}bonusdmg`] = `@{weaponsbdtnum}@{${raiseRule}}`;
|
||||
: valueString[`repeating_${rSection}_${preBonusDmg}bonusdmg`] = `@{${preBonusDmg}bdtnum}@{${raiseRule}}`;
|
||||
console.log(valueString);
|
||||
setAttrs(valueString);
|
||||
});
|
||||
@@ -6401,7 +6406,7 @@ on(
|
||||
</script>
|
||||
<!-- Necessary Mixins-->
|
||||
<!-- Hidden inputs for character sheet versioning, etc-->
|
||||
<input type="hidden" name="attr_character_sheet" value="Official Savage Worlds v1.00.21"/>
|
||||
<input type="hidden" name="attr_character_sheet" value="Official Savage Worlds v1.00.22"/>
|
||||
<input type="hidden" name="attr_firstInit" value="0"/>
|
||||
<input type="hidden" name="attr_namelength" value="0"/>
|
||||
<input type="hidden" name="attr_wdNum" value="1"/>
|
||||
@@ -7635,6 +7640,10 @@ on(
|
||||
</div>
|
||||
<div class="vbonusdamage">
|
||||
<label class="configlabels" data-i18n="bonus-damage-die-type">Bonus Damage Die Type</label>
|
||||
<div class="numOfBonusDice">
|
||||
<input type="number" name="attr_spellsbdtnum" value="1"/>
|
||||
<label class="underLabel" data-i18n="number-of-dice-abbr"># of dice</label>
|
||||
</div>
|
||||
<select class="dtype" name="attr_spellsbdt" title="@{repeating_spells_$#_spellsbdt}">
|
||||
<option value="d4" data-i18n="d4">d4</option>
|
||||
<option value="d6" selected="selected" data-i18n="d6">d6</option>
|
||||
@@ -13590,6 +13599,10 @@ on(
|
||||
</div>
|
||||
<div class="vbonusdamage">
|
||||
<label class="configlabels" data-i18n="bonus-damage-die-type">Bonus Damage Die Type</label>
|
||||
<div class="numOfBonusDice">
|
||||
<input type="number" name="attr_spellsbdtnum" value="1"/>
|
||||
<label class="underLabel" data-i18n="number-of-dice-abbr"># of dice</label>
|
||||
</div>
|
||||
<select class="dtype" name="attr_spellsbdt" title="@{repeating_spells_$#_spellsbdt}">
|
||||
<option value="d4" data-i18n="d4">d4</option>
|
||||
<option value="d6" selected="selected" data-i18n="d6">d6</option>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"compendium": "SWADE",
|
||||
"preview": "OfficialSavageWorldsCharacterSheet.jpg",
|
||||
"legacy": false,
|
||||
"instructions": "# Official Savage Worlds Character Sheet\r\r### version 1.00.21\r\r## Character Sheet\r\r* This is the Official Savage Worlds Character Sheet.\r* Supports Wild Cards and Extras\r* Dice rolling\r* various setting rules\r\r## Custom Configuration\r\rTo configure the sheet to meet your needs, click the crossed hammer and wrench.\r\r## Skills\r\r* All skills from the SWADE rules are available, with the ability to change their names. To pick your skills, click the crossed hammer and wrench next to the Skills heading and place a check mark next to each skill you'd like to use.\r* If you need to make a skill an Unskilled roll, you can either use the Unskilled \"skill\" OR place a -2 in the skill modifier field.\r\r## Additional Notes\r\r* More info about individual sections can be found in the Documentation wiki.\r* If there's something you want added, or you'd like to report a bug, feel free to join the Official Savage Worlds Character Sheet Game (https://app.roll20.net/join/8109876/l20ASw). That game has forums for Bug Reports and Enhancement Requests.\r\r---",
|
||||
"instructions": "# Official Savage Worlds Character Sheet\r\r### version 1.00.22\r\r## Character Sheet\r\r* This is the Official Savage Worlds Character Sheet.\r* Supports Wild Cards and Extras\r* Dice rolling\r* various setting rules\r\r## Custom Configuration\r\rTo configure the sheet to meet your needs, click the crossed hammer and wrench.\r\r## Skills\r\r* All skills from the SWADE rules are available, with the ability to change their names. To pick your skills, click the crossed hammer and wrench next to the Skills heading and place a check mark next to each skill you'd like to use.\r* If you need to make a skill an Unskilled roll, you can either use the Unskilled \"skill\" OR place a -2 in the skill modifier field.\r\r## Additional Notes\r\r* More info about individual sections can be found in the Documentation wiki.\r* If there's something you want added, or you'd like to report a bug, feel free to join the Official Savage Worlds Character Sheet Game (https://app.roll20.net/join/8109876/l20ASw). That game has forums for Bug Reports and Enhancement Requests.\r\r---",
|
||||
"useroptions":[
|
||||
{
|
||||
"attribute":"WCI",
|
||||
|
||||
Reference in New Issue
Block a user