mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-09-11 09:32:33 +00:00
BESM4eExtras v1.4.5
Ranged Defense attribute (Personal or Movement) now apply to DCV Roll when the respective button is depressed.
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<div class="row padt padb"><h3 class="col-1 center border"><span>Sheet Options</span></h3></div>
|
||||
<div class="row center padb">
|
||||
<div class="col-1-5 padr"><h4 class="center border"><span>Sheet Version
|
||||
<input type="text" class="center" name="attr_version" value="1.4.4" readonly />
|
||||
<input type="text" class="center" name="attr_version" value="1.4.5" readonly />
|
||||
</span></h4></div>
|
||||
<div class="col-1-5 padr"><h4 class="center border"><span>Sheet Type
|
||||
<select class="border"><option value="Sheet">Character</option><!--<option value="NPC Sheet">NPC</option><option value="Thing Sheet">Thing</option><option value="GM Sheet">GM</option>--></select>
|
||||
@@ -9233,11 +9233,32 @@
|
||||
base = cv;
|
||||
break;
|
||||
case 'dcv':
|
||||
cv = getCV(debug, value, attrdb, setObj, sourceAttr, 'dcv');
|
||||
const defensetype =
|
||||
parseInt(setObj.static_button_movement_defense) ?
|
||||
'movement' :
|
||||
parseInt(setObj.static_button_personal_defense) ?
|
||||
'personal' :
|
||||
parseInt(value.static_button_movement_defense) ?
|
||||
'movement' :
|
||||
parseInt(value.static_button_personal_defense) ?
|
||||
'personal' :
|
||||
'';
|
||||
console.log(`[setCombatRoll(TEST)] defensetype = ${defensetype}`);
|
||||
|
||||
const bonus = defensetype != '' ?
|
||||
getSumOfActiveAttrLevels(attrdb, 'rangeddefense', defensetype) * 2 :
|
||||
0;
|
||||
console.log(`[setCombatRoll(TEST)] bonus = ${bonus}`);
|
||||
|
||||
cv = getCV(debug, value, attrdb, setObj, sourceAttr, 'dcv') + bonus;
|
||||
console.log(`[setCombatRoll(TEST)] cv = ${cv}`);
|
||||
|
||||
type = '{{dcvroll=1}}';
|
||||
title = '{{title=Roll DCV}}';
|
||||
stat = `{{dcv=${cv}}}`;
|
||||
base = cv;
|
||||
console.log(`[setCombatRoll(TEST)] base = ${base}`);
|
||||
|
||||
result = `${result} ${buildProtectionsString(debug, value)}`;
|
||||
break;
|
||||
case 'initiative':
|
||||
|
||||
Reference in New Issue
Block a user