mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-09-05 14:42:31 +00:00
better support weapon bonus (keen, fell, grievous)
This commit is contained in:
@@ -4,6 +4,12 @@ This is a rewrite based on the early 2e (basic) and 1e edition that also include
|
||||
|
||||
# Release History
|
||||
|
||||
## 02.12.00 (Build 15)
|
||||
|
||||
### Features
|
||||
|
||||
- changed keen, grievieous, fell weapon spec from checkbox into selectable valued options
|
||||
|
||||
## 02.11.00 (Build 14)
|
||||
|
||||
### Features
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
border-radius: 0;
|
||||
border-bottom: 2px solid rgba(0, 0, 0, .15);
|
||||
text-align: left;
|
||||
margin-bottom: 5px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.charsheet input[type="text"] {
|
||||
@@ -159,7 +159,7 @@
|
||||
border-right: 0;
|
||||
border-top: 0;
|
||||
line-height: 18px;
|
||||
height: 17px;
|
||||
height: 20px;
|
||||
padding: 0px 4px 0px 4px;
|
||||
}
|
||||
|
||||
@@ -743,11 +743,19 @@
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.charsheet #war-gear-nested input[type="checkbox"] {
|
||||
.charsheet #war-gear-nested input[type="checkbox"],
|
||||
.charsheet #armour-nested input[type="checkbox"] {
|
||||
text-align: center;
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
.charsheet #war-gear-nested select,
|
||||
.charsheet #armour-nested select {
|
||||
appearance: none;
|
||||
justify-self: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.charsheet #armour {
|
||||
grid-area: armo;
|
||||
z-index: 1;
|
||||
|
||||
+227
-58
@@ -1,4 +1,4 @@
|
||||
<input type="hidden" name="attr_version" value="02-11-00" />
|
||||
<input type="hidden" name="attr_version" value="02-12-00" />
|
||||
<input type="hidden" class="sheet-tabstoggle" name="attr_sheetTab" />
|
||||
<input type="checkbox" name="attr_parsedrolls" value="1" class="hidden config-parsed-rolls" checked="checked" hidden
|
||||
readonly />
|
||||
@@ -749,8 +749,8 @@
|
||||
<label class="center" data-i18n="weapon-injury">Inj.</label>
|
||||
<label class="center" data-i18n="weapon-load">Load</label>
|
||||
<label class="center" data-i18n="weapon-fell" data-i18n-title="weapon-fell-description">F</label>
|
||||
<label class="center" data-i18n="weapon-grievieous"
|
||||
data-i18n-title="weapon-grievieous-description">G</label>
|
||||
<label class="center" data-i18n="weapon-grievous"
|
||||
data-i18n-title="weapon-grievous-description">G</label>
|
||||
<label class="center" data-i18n="weapon-keen" data-i18n-title="weapon-keen-description">K</label>
|
||||
<label data-i18n="notes">Notes</label>
|
||||
<span class="table-rolls" />
|
||||
@@ -780,9 +780,26 @@
|
||||
<input name="attr_weapon_damage_1" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_injury_1" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_load_1" value="0" class="center number" type="number">
|
||||
<input type="checkbox" class="center" value="1" name="attr_weapon_fell_1">
|
||||
<input type="checkbox" class="center" value="1" name="attr_weapon_grievous_1">
|
||||
<input type="checkbox" class="center" value="1" name="attr_weapon_keen_1">
|
||||
<input type="hidden" value="1" name="attr_weapon_fell_1">
|
||||
<select name="attr_weapon_fell_val_1">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
<option value="3">+3</option>
|
||||
<option value="4">+4</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_grievous_1">
|
||||
<select name="attr_weapon_grievous_val_1">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_keen_1">
|
||||
<select name="attr_weapon_keen_val_1">
|
||||
<option value="10" selected default></option>
|
||||
<option value="9">9+</option>
|
||||
<option value="8">8+</option>
|
||||
</select>
|
||||
<input name="attr_weapon_note_1" type="text">
|
||||
<span class="table-rolls" />
|
||||
<span class="parsed-rolls">
|
||||
@@ -811,9 +828,26 @@
|
||||
<input name="attr_weapon_damage_2" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_injury_2" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_load_2" value="0" class="center number" type="number">
|
||||
<input type="checkbox" class="center" name="attr_weapon_fell_2">
|
||||
<input type="checkbox" class="center" name="attr_weapon_grievous_2">
|
||||
<input type="checkbox" class="center" name="attr_weapon_keen_2">
|
||||
<input type="hidden" value="1" name="attr_weapon_fell_2">
|
||||
<select name="attr_weapon_fell_val_2">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
<option value="3">+3</option>
|
||||
<option value="4">+4</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_grievous_2">
|
||||
<select name="attr_weapon_grievous_val_2">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_keen_2">
|
||||
<select name="attr_weapon_keen_val_2">
|
||||
<option value="10" selected default></option>
|
||||
<option value="9">9+</option>
|
||||
<option value="8">8+</option>
|
||||
</select>
|
||||
<input name="attr_weapon_note_2" type="text">
|
||||
<span class="table-rolls" />
|
||||
<span class="parsed-rolls">
|
||||
@@ -842,9 +876,26 @@
|
||||
<input name="attr_weapon_damage_3" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_injury_3" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_load_3" value="0" class="center number" type="number">
|
||||
<input type="checkbox" class="center" name="attr_weapon_fell_3">
|
||||
<input type="checkbox" class="center" name="attr_weapon_grievous_3">
|
||||
<input type="checkbox" class="center" name="attr_weapon_keen_3">
|
||||
<input type="hidden" value="1" name="attr_weapon_fell_3">
|
||||
<select name="attr_weapon_fell_val_3">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
<option value="3">+3</option>
|
||||
<option value="4">+4</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_grievous_3">
|
||||
<select name="attr_weapon_grievous_val_3">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_keen_3">
|
||||
<select name="attr_weapon_keen_val_3">
|
||||
<option value="10" selected default></option>
|
||||
<option value="9">9+</option>
|
||||
<option value="8">8+</option>
|
||||
</select>
|
||||
<input name="attr_weapon_note_3" type="text">
|
||||
<span class="table-rolls" />
|
||||
<span class="parsed-rolls">
|
||||
@@ -873,9 +924,26 @@
|
||||
<input name="attr_weapon_damage_4" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_injury_4" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_load_4" value="0" class="center number" type="number">
|
||||
<input type="checkbox" class="center" name="attr_weapon_fell_4">
|
||||
<input type="checkbox" class="center" name="attr_weapon_grievous_4">
|
||||
<input type="checkbox" class="center" name="attr_weapon_keen_4">
|
||||
<input type="hidden" value="1" name="attr_weapon_fell_4">
|
||||
<select name="attr_weapon_fell_val_4">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
<option value="3">+3</option>
|
||||
<option value="4">+4</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_grievous_4">
|
||||
<select name="attr_weapon_grievous_val_4">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_keen_4">
|
||||
<select name="attr_weapon_keen_val_4">
|
||||
<option value="10" selected default></option>
|
||||
<option value="9">9+</option>
|
||||
<option value="8">8+</option>
|
||||
</select>
|
||||
<input name="attr_weapon_note_4" type="text">
|
||||
<span class="table-rolls" />
|
||||
<span class="parsed-rolls">
|
||||
@@ -904,9 +972,26 @@
|
||||
<input name="attr_weapon_damage_5" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_injury_5" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_load_5" value="0" class="center number" type="number">
|
||||
<input type="checkbox" class="center" value="1" name="attr_weapon_fell_5">
|
||||
<input type="checkbox" class="center" value="1" name="attr_weapon_grievous_5">
|
||||
<input type="checkbox" class="center" value="1" name="attr_weapon_keen_5">
|
||||
<input type="hidden" value="1" name="attr_weapon_fell_5">
|
||||
<select name="attr_weapon_fell_val_5">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
<option value="3">+3</option>
|
||||
<option value="4">+4</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_grievous_5">
|
||||
<select name="attr_weapon_grievous_val_5">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_keen_5">
|
||||
<select name="attr_weapon_keen_val_5">
|
||||
<option value="10" selected default></option>
|
||||
<option value="9">9+</option>
|
||||
<option value="8">8+</option>
|
||||
</select>
|
||||
<input name="attr_weapon_note_5" type="text">
|
||||
<span class="table-rolls" />
|
||||
<span class="parsed-rolls">
|
||||
@@ -935,9 +1020,26 @@
|
||||
<input name="attr_weapon_damage_6" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_injury_6" value="0" class="center number" type="number">
|
||||
<input name="attr_weapon_load_6" value="0" class="center number" type="number">
|
||||
<input type="checkbox" class="center" value="1" name="attr_weapon_fell_6">
|
||||
<input type="checkbox" class="center" value="1" name="attr_weapon_grievous_6">
|
||||
<input type="checkbox" class="center" value="1" name="attr_weapon_keen_6">
|
||||
<input type="hidden" value="1" name="attr_weapon_fell_6">
|
||||
<select name="attr_weapon_fell_val_6">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
<option value="3">+3</option>
|
||||
<option value="4">+4</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_grievous_6">
|
||||
<select name="attr_weapon_grievous_val_6">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">+1</option>
|
||||
<option value="2">+2</option>
|
||||
</select>
|
||||
<input type="hidden" value="1" name="attr_weapon_keen_6">
|
||||
<select name="attr_weapon_keen_val_6">
|
||||
<option value="10" selected default></option>
|
||||
<option value="9">9+</option>
|
||||
<option value="8">8+</option>
|
||||
</select>
|
||||
<input name="attr_weapon_note_6" type="text">
|
||||
</div>
|
||||
</div>
|
||||
@@ -958,16 +1060,36 @@
|
||||
data-i18n-placeholder="armour-placeholder" name="attr_armour">
|
||||
<input class="center number" type="number" name="attr_armourprot" value="0">
|
||||
<input class="center number" type="number" name="attr_armourload" value="0">
|
||||
<input type="checkbox" class="center gridcol4" value="1" name="attr_armourcf"></checkbox>
|
||||
<input type="checkbox" class="center gridcol5" value="1" name="attr_armourcm"></checkbox>
|
||||
<input type="hidden" class="center gridcol4" value="1" name="attr_armourcf"></checkbox>
|
||||
<select name="attr_armourcf_val" class="center gridcol4">
|
||||
<option value="0" selected default></option>
|
||||
<option value="2">+2</option>
|
||||
<option value="3">+3</option>
|
||||
</select>
|
||||
<input type="hidden" class="center gridcol5" value="1" name="attr_armourcm"></checkbox>
|
||||
<select name="attr_armourcm_val" class="center gridcol5">
|
||||
<option value="0" selected default></option>
|
||||
<option value="-2">-2</option>
|
||||
<option value="-3">-3</option>
|
||||
</select>
|
||||
|
||||
<input type="checkbox" name="attr_helmprot_active" value=1 checked="checked">
|
||||
<input class="text" type="text" placeholder="Helm" title="Helm" data-i18n-title="helm"
|
||||
data-i18n-placeholder="helm-placeholder" name="attr_helm">
|
||||
<input class="center number" type="number" name="attr_helmprot" value="0">
|
||||
<input class="center number" type="number" name="attr_helmload" value="0">
|
||||
<input type="checkbox" class="center gridcol4" value="1" name="attr_helmetcf"></checkbox>
|
||||
<input type="checkbox" class="center gridcol5" value="1" name="attr_helmetcm"></checkbox>
|
||||
<input type="hidden" class="center gridcol4" value="1" name="attr_helmetcf"></checkbox>
|
||||
<select name="attr_helmetcf_val" class="center gridcol4">
|
||||
<option value="0" selected default></option>
|
||||
<option value="2">+2</option>
|
||||
<option value="3">+3</option>
|
||||
</select>
|
||||
<input type="hidden" class="center gridcol5" value="1" name="attr_helmetcm"></checkbox>
|
||||
<select name="attr_helmetcm_val" class="center gridcol5">
|
||||
<option value="0" selected default></option>
|
||||
<option value="-2">-2</option>
|
||||
<option value="-3">-3</option>
|
||||
</select>
|
||||
|
||||
<input type="checkbox" name="attr_otherprot_active" value=1 checked="checked">
|
||||
<input type="text" class="text" name="attr_otherprot_name" placeholder="Other"
|
||||
@@ -975,8 +1097,18 @@
|
||||
data-i18n-placeholder="other-placeholder">
|
||||
<input class="center number" type="number" name="attr_otherprot" value="0">
|
||||
<input class="center number" type="number" name="attr_otherload" value="0">
|
||||
<input type="checkbox" class="center gridcol4" value="1" name="attr_othercf"></checkbox>
|
||||
<input type="checkbox" class="center gridcol5" value="1" name="attr_othercm"></checkbox>
|
||||
<input type="hidden" class="center gridcol4" value="1" name="attr_othercf"></checkbox>
|
||||
<select name="attr_othercf_val" class="center gridcol4">
|
||||
<option value="0" selected default></option>
|
||||
<option value="2">+2</option>
|
||||
<option value="3">+3</option>
|
||||
</select>
|
||||
<input type="hidden" class="center gridcol5" value="1" name="attr_othercm"></checkbox>
|
||||
<select name="attr_othercm_val" class="center gridcol5">
|
||||
<option value="0" selected default></option>
|
||||
<option value="-2">-2</option>
|
||||
<option value="-3">-3</option>
|
||||
</select>
|
||||
|
||||
<span></span>
|
||||
<label data-i18n="shield">Shield</label>
|
||||
@@ -991,8 +1123,18 @@
|
||||
data-i18n-placeholder="shield-placeholder" name="attr_shield">
|
||||
<input class="center number" type="number" name="attr_shieldparry" value="0">
|
||||
<input class="center number" type="number" name="attr_shieldload" value="0">
|
||||
<input type="checkbox" class="center gridcol4" value="1" name="attr_shieldreinf"></checkbox>
|
||||
<input type="checkbox" class="center gridcol5" value="1" name="attr_shieldcm"></checkbox>
|
||||
<input type="hidden" class="center gridcol4" value="1" name="attr_shieldreinf"></checkbox>
|
||||
<select name="attr_shieldreinf_val" class="center gridcol4">
|
||||
<option value="0" selected default></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
</select>
|
||||
<input type="hidden" class="center gridcol5" value="1" name="attr_shieldcm"></checkbox>
|
||||
<select name="attr_shieldcm_val" class="center gridcol5">
|
||||
<option value="0" selected default></option>
|
||||
<option value="-2">-2</option>
|
||||
<option value="-3">-3</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mount">
|
||||
@@ -1410,7 +1552,11 @@
|
||||
parrymodStr = "",
|
||||
stanceattackmodStr = "",
|
||||
targetnameStr = "",
|
||||
target;
|
||||
target,
|
||||
closefit="",
|
||||
closefitStr="",
|
||||
keen="",
|
||||
match=[];
|
||||
|
||||
act = capitalize(act);
|
||||
act = (act === "Wisdom" || act === "Valour") ? "Shadow test: "+act : act;
|
||||
@@ -1492,10 +1638,12 @@
|
||||
favouredStr = favId == 2 ? "{{favoured=Favoured}}" : ( favId == 0 ? "{{favoured=Ill-favoured}}" : "" );
|
||||
|
||||
// REWARDS, KEEN WEAPONS AND CLOSE FITTING ARMOUR
|
||||
keen = (additional.match(/Keen/g) || []).length;
|
||||
if( keen > 0 ) { clog("Weapon is keen!"); }
|
||||
closefit = int((additional.match(/Close fitting/g) || []).length)*2;
|
||||
let closefitStr = "";
|
||||
match = additional.match(/keen='(.*)';/);
|
||||
keen = match ? match[1] : 10;
|
||||
if( keen < 10 ) { clog(`Weapon is keen: ${keen}`); }
|
||||
match = additional.match(/closefit='(.*)';/);
|
||||
closefit = match ? match[1] : 0;
|
||||
closefitStr = "";
|
||||
if( closefit > 0 ) {
|
||||
clog(`Armour is close fitting: ${closefit}`);
|
||||
closefitStr = `+${closefit}[Close fit]`;
|
||||
@@ -1555,7 +1703,10 @@
|
||||
if (weary === 1) {
|
||||
// remove the 1, 2, 3, results, still add any closefitting bonus for protection rolls (already done)
|
||||
// Weary condition affects protections rolls, see discussion here: https://boardgamegeek.com/thread/2031462/protection-tests-when-weary
|
||||
rollSuccess = (_.reduce(rollresult.results.r1.dice, (memo, num) => { if(num <= 3) {return memo} else {return memo+num} }, 0));
|
||||
// Headsup: rollresult.results.r1.dice only includes the dice (excluding a bonus e.g. for closefit)
|
||||
let wearydice = (_.reduce(rollresult.results.r1.dice, (memo, num) => { if(num <= 3) {return memo} else {return memo+num} }, 0));
|
||||
let nonwearydice = (_.reduce(rollresult.results.r1.dice, (memo, num) => {return memo+num}, 0));
|
||||
rollSuccess = rollSuccess - (nonwearydice - wearydice);
|
||||
clog(`Weary successes: ${rollSuccess}`);
|
||||
} else {
|
||||
clog(`Normal successes: ${rollSuccess}`);
|
||||
@@ -1590,12 +1741,12 @@
|
||||
}
|
||||
|
||||
// GREATNESS & FEAT DIE
|
||||
// Test for piercing blow on crit success or 10
|
||||
outcome = (rolltype === "combat") && (outcome === 1 || outcome === 2) && (rollFeat === crit || rollFeat === 10) ? 3 : outcome;
|
||||
clog(`Outcome after Piercing: ${outcome}`);
|
||||
// Piercing blow also at 9 if the weapon used is keen
|
||||
outcome = rolltype === "combat" && (outcome === 1 || outcome === 2) && rollFeat === 9 && keen > 0 ? 3 : outcome;
|
||||
clog(`Outcome after Keen: ${outcome}`);
|
||||
// Test for piercing blow on crit success
|
||||
outcome = rolltype === "combat" && (outcome === 2) ? 3 : outcome;
|
||||
clog(`Outcome after Crit: ${outcome}`);
|
||||
// Piercing blow also at 10 or 8/9 if the used weapon is keen
|
||||
outcome = rolltype === "combat" && (outcome === 1) && (rollFeat >= keen && rollFeat <= 10) ? 3 : outcome;
|
||||
clog(`Outcome after Piercing or Keen: ${outcome}`);
|
||||
// count number of 6s in success, great or extraordinary success
|
||||
// Count the number of sixes rolled, to report degree of success
|
||||
clog(`Roll r1 : ${JSON.stringify(rollresult.results.r1.dice)}`);
|
||||
@@ -1950,20 +2101,28 @@
|
||||
on('clicked:protection_action', async (ev) => {
|
||||
clog(`Starting first roll`);
|
||||
let action = 'protection',
|
||||
data = await asw.getAttrs(['character_name', action, 'protection', 'armourcf', 'armourcm', 'helmetcf', 'helmetcm', 'othercf', 'othercm', 'sheetTab', 'protection_favoured']),
|
||||
data = await asw.getAttrs(['character_name', action, 'protection',
|
||||
'armourcf', 'armourcm', 'helmetcf', 'helmetcm', 'othercf', 'othercm',
|
||||
'armourcf_val', 'armourcm_val', 'helmetcf_val', 'helmetcm_val', 'othercf_val', 'othercm_val',
|
||||
'armourprot_active', 'helmprot_active', 'otherprot_active',
|
||||
'sheetTab', 'protection_favoured']),
|
||||
actdice = int(data.protection),
|
||||
actfav = data.protection_favoured,
|
||||
lm = data.sheetTab ==="isAdversary" ? true : false;
|
||||
let additionalStr = "";
|
||||
additionalStr = additionalStr + ((data.armourcf == "1") ? "Close fitting armour, " : "");
|
||||
additionalStr = additionalStr + ((data.helmetcf == "1") ? "Close fitting helm, " : "");
|
||||
additionalStr = additionalStr + ((data.othercf == "1") ? "Close fitting other, " : "");
|
||||
additionalStr = additionalStr + ((data.armourcm == "1") ? "Cunning made armour, " : "");
|
||||
additionalStr = additionalStr + ((data.helmetcm == "1") ? "Cunning made helm, " : "");
|
||||
additionalStr = additionalStr + ((data.helmetcm == "1") ? "Other Cunning made, " : "");
|
||||
additionalStr = additionalStr + ((data.armourcf_val != "0" && data.armourprot_active) ? "Close fitting armour, " : "");
|
||||
additionalStr = additionalStr + ((data.helmetcf_val != "0" && data.helmprot_active) ? "Close fitting helm, " : "");
|
||||
additionalStr = additionalStr + ((data.othercf_val != "0" && data.otherprot_active) ? "Close fitting other, " : "");
|
||||
additionalStr = additionalStr + ((data.armourcm_val != "0" && data.armourprot_active) ? "Cunning made armour, " : "");
|
||||
additionalStr = additionalStr + ((data.helmetcm_val != "0" && data.helmprot_active) ? "Cunning made helm, " : "");
|
||||
additionalStr = additionalStr + ((data.helmetcm_val != "0" && data.otherprot_active) ? "Other Cunning made, " : "");
|
||||
additionalStr = additionalStr.slice(0,-2);
|
||||
clog(`First roll: ${JSON.stringify(data)}, Action : ${action}, protection value: ${actdice}, Additional: ${additionalStr}, Favoured: ${actfav}`);
|
||||
await rollFirst(data.character_name, action, actdice, "0", actfav, "protection", `additional='${additionalStr}';`, lm);
|
||||
let closefit =
|
||||
int(data.armourprot_active) * int(data.armourcf_val)
|
||||
+ int(data.helmprot_active) * int(data.helmetcf_val)
|
||||
+ int(data.otherprot_active) * int(data.othercf_val);
|
||||
clog(`First roll: ${JSON.stringify(data)}, Action : ${action}, Protection value: ${actdice}, Closefit: ${closefit}, Additional: ${additionalStr}, Favoured: ${actfav}`);
|
||||
await rollFirst(data.character_name, action, actdice, "0", actfav, "protection", `additional='${additionalStr}';closefit='${closefit}';`, lm);
|
||||
clog(`Completed first roll`);
|
||||
});
|
||||
|
||||
@@ -2132,7 +2291,11 @@
|
||||
let options = stripaction((ev.triggerName).slice(18)).split("_"),
|
||||
index = options[0],
|
||||
target = options[1] || "",
|
||||
data = await asw.getAttrs(['character_name', `weapon_skill_name_${index}`,`weapon_rating_${index}`, `weapon_damage_${index}`, `weapon_injury_${index}`, 'favorill', 'favourill_id']),
|
||||
data = await asw.getAttrs([
|
||||
'character_name', `weapon_skill_name_${index}`,
|
||||
`weapon_rating_${index}`, `weapon_damage_${index}`,
|
||||
`weapon_injury_${index}`, 'favorill', 'favourill_id']
|
||||
),
|
||||
action = data[`weapon_skill_name_${index}`],
|
||||
actdice = data[`weapon_rating_${index}`],
|
||||
damage = data[`weapon_damage_${index}`],
|
||||
@@ -2180,7 +2343,9 @@
|
||||
clog(`Starting first roll: weapon_${index}, target: ${target}`);
|
||||
let data = await asw.getAttrs([
|
||||
'character_name', 'strengthtn', `weapon_skill_name_${index}`, `weapon_combat_prof_${index}`, `weapon_damage_${index}`,
|
||||
`weapon_injury_${index}`, `weapon_note_${index}`, `weapon_fell_${index}`, `weapon_grievous_${index}`, `weapon_keen_${index}`,
|
||||
`weapon_injury_${index}`, `weapon_note_${index}`,
|
||||
`weapon_fell_${index}`, `weapon_grievous_${index}`, `weapon_keen_${index}`,
|
||||
`weapon_fell_val_${index}`, `weapon_grievous_val_${index}`, `weapon_keen_val_${index}`,
|
||||
'stanceattack_active', 'stanceattackbonus', 'stancedamagebonus',
|
||||
'axes', 'bows', 'spears', 'swords']),
|
||||
action = data[`weapon_skill_name_${index}`],
|
||||
@@ -2188,16 +2353,20 @@
|
||||
damage = data[`weapon_damage_${index}`],
|
||||
injury = data[`weapon_injury_${index}`],
|
||||
note = data[`weapon_note_${index}`],
|
||||
keen = int(data[`weapon_keen_${index}`],0) === 0 ? "" : "Keen, ",
|
||||
fell = int(data[`weapon_fell_${index}`],0) === 0 ? "" : "Fell, ",
|
||||
grievous = int(data[`weapon_grievous_${index}`],0) === 0 ? "" : "Grievous, ",
|
||||
fell_val = int(data[`weapon_fell_val_${index}`],0),
|
||||
grievous_val = int(data[`weapon_grievous_val_${index}`],0),
|
||||
keen_val = int(data[`weapon_keen_val_${index}`],0),
|
||||
fell = fell_val === 0 ? "" : "Fell, ",
|
||||
grievous = grievous_val === 0 ? "" : "Grievous, ",
|
||||
keen = keen_val === 10 ? "" : "Keen, ",
|
||||
actdice = int(data[`${combatprof}`]),
|
||||
stanceattack_active = int(data['stanceattack_active']),
|
||||
stanceattackbonus = int(data['stanceattackbonus']),
|
||||
stancedamagebonus = int(data['stancedamagebonus']);
|
||||
damage = (stanceattack_active == 1) ? `${damage} + ${stancedamagebonus}` : damage;
|
||||
clog(`First roll: ${JSON.stringify(data)}, Action: ${action}, Dice: ${actdice}, Keen: ${keen}, tn: ${data.strengthtn}`);
|
||||
await rollFirst(data.character_name, action, actdice, data.strengthtn, 0, "combat"+target, `weapon='${keen}${fell}${grievous}Damage: ${damage}, Injury: ${injury}'; additional='Notes: ${note}';`);
|
||||
damage = (stanceattack_active == 1 || grievous_val > 0) ? `${damage}+${stancedamagebonus + grievous_val}` : damage;
|
||||
injury = (fell_val > 0) ? `${injury}+${fell_val}` : injury;
|
||||
clog(`First roll: ${JSON.stringify(data)}, Action: ${action}, Dice: ${actdice}, tn: ${data.strengthtn}`);
|
||||
await rollFirst(data.character_name, action, actdice, data.strengthtn, 0, "combat"+target, `weapon='${keen}${fell}${grievous}Damage:${damage}, Injury:${injury}'; additional='Notes: ${note}';keen='${keen_val}';`, false);
|
||||
clog(`Completed first roll: weapon_${index}`);
|
||||
});
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
"weapon-load": "Load",
|
||||
"weapon-injury": "Inj.",
|
||||
"weapon-fell": "F",
|
||||
"weapon-fell-description": "Fell: Add 2 to the Injury rating of the selected weapon",
|
||||
"weapon-grievieous": "G",
|
||||
"weapon-grievieous-description": "Grievious: Add 1 to the damage rating of the weapon",
|
||||
"weapon-fell-description": "Fell: Add 2 (Superior: 4) to the Injury rating of the selected weapon",
|
||||
"weapon-grievous": "G",
|
||||
"weapon-grievous-description": "Grievous: Add 1 (Superior: 4) to the damage rating of the weapon",
|
||||
"weapon-keen": "K",
|
||||
"weapon-keen-description": "Keen: Attack rolls made with a Keen weapon score a Piercing Blow also on a result of 9 on the Feat die",
|
||||
"weapon-keen-description": "Keen: Attack rolls made with a Keen weapon score a Piercing Blow on a result of 9+ (Superior: 8+) on the Feat die",
|
||||
"weapon-called-shot": "Called Shot",
|
||||
"special-abilities": "Special Abilities",
|
||||
"hope": "Hope",
|
||||
|
||||
Reference in New Issue
Block a user