diff --git a/BESM4eExtras/BESM4eExtras.html b/BESM4eExtras/BESM4eExtras.html index 4ad282ac76..88a4df28df 100644 --- a/BESM4eExtras/BESM4eExtras.html +++ b/BESM4eExtras/BESM4eExtras.html @@ -30,7 +30,7 @@

Sheet Options

Sheet Version - +

Sheet Type @@ -3980,7 +3980,7 @@

-
+
@@ -4074,7 +4074,7 @@
-
+
@@ -4106,7 +4106,7 @@
-
+
@@ -4493,7 +4493,7 @@
-
+
@@ -4505,7 +4505,7 @@
-
+
@@ -4565,7 +4565,7 @@
-
+
@@ -4585,11 +4585,11 @@
-
+
-
+
@@ -4597,7 +4597,7 @@
-
+
@@ -4609,7 +4609,7 @@
-
+
@@ -4617,7 +4617,7 @@
-
+
@@ -5150,7 +5150,7 @@
-
+
@@ -5728,8 +5728,270 @@
{{damage12}}
{{/rollTotal() roll 12}}
- - {{/attack}} {{#defense}} + {{/attack}} {{#area}} +
+
Area
+
{{radius}} m radius
+
+ {{/area}} {{#duration}} +
+
Duration
+
{{time}}
+
+ {{/duration}} {{#range}} +
+
Range
+
{{distance}} {{kilometers}}m
+
+ {{/range}} {{#autofire}} +
+
Autofire - Attack
+
Number of Hits
+
+
+
>1-3
+
1
+
+
+
>4-6
+
2
+
+
+
>7-9
+
3
+
+
+
>10-12
+
4
+
+ {{/autofire}} {{#blight}} +
+
Blight
+
Body vs TN{{blight}}
+
+ {{/blight}} {{#contact}} +
+
Contact
+
+
+ {{/contact}} {{#contagious}} +
+
Contagious
+
+
+ {{/contagious}} {{#continuing}} +
+
Continuing Damage
+ {{#rollTotal() roll 2}} +
{{continuing2}}
+ {{/rollTotal() roll 2}} {{#rollTotal() roll 3}} +
{{continuing3}}
+ {{/rollTotal() roll 3}} {{#rollTotal() roll 4}} +
{{continuing4}}
+ {{/rollTotal() roll 4}} {{#rollTotal() roll 5}} +
{{continuing5}}
+ {{/rollTotal() roll 5}} {{#rollTotal() roll 6}} +
{{continuing6}}
+ {{/rollTotal() roll 6}} {{#rollTotal() roll 7}} +
{{continuing7}}
+ {{/rollTotal() roll 7}} {{#rollTotal() roll 8}} +
{{continuing8}}
+ {{/rollTotal() roll 8}} {{#rollTotal() roll 9}} +
{{continuing9}}
+ {{/rollTotal() roll 9}} {{#rollTotal() roll 10}} +
{{continuing10}}
+ {{/rollTotal() roll 10}} {{#rollTotal() roll 11}} +
{{continuing11}}
+ {{/rollTotal() roll 11}} {{#rollTotal() roll 12}} +
{{continuing12}}
+ {{/rollTotal() roll 12}} +
+ {{/continuing}} {{#drain}} +
+
Drain
+
{{draintype}} -{{drain}}
+
+ {{/drain}} {{#enervation}} +
+
Enervation
+
Energy -{{enervation}}
+
+ {{/enervation}} {{#flare}} +
+
Flare ({{sense}})
+
{{obstacle}} Obstacle vs. TN 12
+
+ {{/flare}} {{#flexible}} +
+
Flexible
+
+
+ {{/flexible}} {{#helper}} +
+
Helper
+
+
+ {{/helper}} {{#homing}} +
+
Homing
+
+
+ {{/homing}} {{#incapacitating}} +
+
Incapacitating
+
{{obstacle}} vs. TN 12
+
+ {{/incapacitating}} {{#inconspicuous}} +
+
Inconspicuous
+
+
+ {{/inconspicuous}} {{#incurable}} +
+
Incurable
+
{{recovery}}
+
+ {{/incurable}} {{#irritant}} +
+
Irritant
+
{{obstacle}} vs. TN 12
+
+ {{/irritant}} {{#knockback}} +
+
Knockback
+
x{{kb}}
+
+ {{/knockback}} {{#multidimensional}} +
+
Multidimensional
+
+
+ {{/multidimensional}} {{#pen}} +
+
{{penname}}
+
{{pentype}} -{{pen}}
+
+ {{/pen}} {{#psychic}} +
+
Psychic
+
+
+ {{/psychic}} {{#quake}} +
+
Quake
+
{{fissure}} m deep fissure
+
+ {{/quake}} {{#reach}} +
+
Reach
+
+
+ {{/reach}} {{#selective}} +
+
Selective
+
+
+ {{/selective}} {{#spreading}} +
+
Spreading
+
{{spreading}} additional target
+
+ {{/spreading}} {{#stunonly}} +
+
Stun Only
+
+
+ {{/stunonly}} {{#tangle}} +
+
Tangle
+
{{tangle}} HP
+
+ {{/tangle}} {{#targeted}} +
+
Targeted
+
x2 vs {{hasenemy}}
+
+ {{/targeted}} {{#vampiric}} +
+
Vampiric
+
{{stolenhealth}} health
+
+ {{/vampiric}} {{#ammo}} +
+
Ammo
+
{{ammunition}}
+
+ {{/ammo}} {{#backblast}} +
+
Backblast Affects
+
{{bystander}}
+
+
+
Backblast Damage
+ {{#rollTotal() roll 2}} +
{{continuing2}}
+ {{/rollTotal() roll 2}} {{#rollTotal() roll 3}} +
{{continuing3}}
+ {{/rollTotal() roll 3}} {{#rollTotal() roll 4}} +
{{continuing4}}
+ {{/rollTotal() roll 4}} {{#rollTotal() roll 5}} +
{{continuing5}}
+ {{/rollTotal() roll 5}} {{#rollTotal() roll 6}} +
{{continuing6}}
+ {{/rollTotal() roll 6}} {{#rollTotal() roll 7}} +
{{continuing7}}
+ {{/rollTotal() roll 7}} {{#rollTotal() roll 8}} +
{{continuing8}}
+ {{/rollTotal() roll 8}} {{#rollTotal() roll 9}} +
{{continuing9}}
+ {{/rollTotal() roll 9}} {{#rollTotal() roll 10}} +
{{continuing10}}
+ {{/rollTotal() roll 10}} {{#rollTotal() roll 11}} +
{{continuing11}}
+ {{/rollTotal() roll 11}} {{#rollTotal() roll 12}} +
{{continuing12}}
+ {{/rollTotal() roll 12}} +
+ {{/backblast}} {{#exclusive}} +
+
Exclusive
+
{{hasenemy}}
+
+ {{/exclusive}} {{#fieldless}} +
+
Fieldless
+
+
+ {{/fieldless}} {{#nostun}} +
+
No Stun
+
+
+ {{/nostun}} {{#nonpenetrating}} +
+
Non-penetrating
+
AR +{{wontpenetrate}}
+
+ {{/nonpenetrating}} {{#stoppable}} +
+
Stoppable
+
{{timetostop}}
+
+
+
Stoppable
+
{{stopdamage}}
+
+ {{/stoppable}} {{#toxic}} +
+
Toxic
+
{{escapable}}
+
+ {{/toxic}} {{#unreliable}} +
+
Unreliable
+
Die roll of {{failure}}
+
+ {{/unreliable}} {{#defense}}
{{character_name}} defends{{#target_name}} {{target_name}}{{/target_name}} with {{pronoun}} {{weapon_name}}!
Maneuver
@@ -5747,8 +6009,103 @@
Total
{{total}}
+ {{#forcefield}} +
+
Forcefield
+
{{forcefield}}
+
+ {{/forcefield}} {{#armor1}} +
+
Primary Armor
+
{{armor1}}
+
+ {{/armor1}} {{#armor2}} +
+
Secondary Armor
+
{{armor2}}
+
+ {{/armor2}} {{#armor3}} +
+
Tertiary Armor
+
{{armor3}}
+
+ {{/armor3}} {{#mindshield}} +
+
Mind Shield
+
{{mindshield}}
+
+ {{/mindshield}} {{#absorption1}} +
+
Absorption - Health
+
{{absorption1}}
+
+ {{/absorption1}} {{#absorption2}} +
+
Absorption - Energy
+
{{absorption2}}
+
+ {{/absorption2}} {{#conversion}} +
+
Conversion
+
{{conversion}}
+
+ {{/conversion}} +
+
Shock Value
+
{{shock}}
+
{{/defense}} {{#doesnothing}}
{{character_name}} does nothing...
+ {{#forcefield}} +
+
Forcefield
+
{{forcefield}}
+
+ {{/forcefield}} {{#shield}} +
+
Shield
+
{{shield}}
+
+ {{/shield}} {{#armor1}} +
+
Primary Armor
+
{{armor1}}
+
+ {{/armor1}} {{#armor2}} +
+
Secondary Armor
+
{{armor2}}
+
+ {{/armor2}} {{#armor3}} +
+
Tertiary Armor
+
{{armor3}}
+
+ {{/armor3}} {{#mindshield}} +
+
Mind Shield
+
{{mindshield}}
+
+ {{/mindshield}} {{#absorption1}} +
+
Absorption - Health
+
{{absorption1}}
+
+ {{/absorption1}} {{#absorption2}} +
+
Absorption - Energy
+
{{absorption2}}
+
+ {{/absorption2}} {{#conversion}} +
+
Conversion
+
{{conversion}}
+
+ {{/conversion}} +
+
Shock Value
+
{{shock}}
+
{{/doesnothing}} {{#twodsix}}
{{character_name}} rolls 2d6...
@@ -5886,7 +6243,7 @@ const major_obstacle_maneuvers_regex = /(bypassarmor|vitalspot)/i; const weapon_customizations_array = ['accurate', 'area', 'duration', 'range', 'aura', 'autofire', 'blight', 'contact', 'contageous', 'continuing', 'drain', 'enervation', 'flare', 'flexible', 'homing', 'inaccurate', 'incapacitating', 'incurable', 'insidious', 'irritant', 'knockback', 'multidimensional', 'penetrating', 'piercing', 'psychic', 'quake', 'reach', 'selective', 'spreading', 'stun', 'tangle', 'trap', 'vampiric']; const combattechniques_array = ['blackout', 'blindfighting', 'blindshooting', 'criticalstrike', 'enhancedknockback', 'extendedrange', 'farshot', 'lethalblow', 'multipletargets', 'perciseaim', 'rushattack', 'twoweapons']; - const stats_array = ['static_stat_type_set', 'static_stat_temp_energy', 'static_stat_temp_health', 'stat_total_social', 'static_stat_total_shame', 'stat_total_sanity', 'static_stat_total_maddness', 'stat_total_energy', 'static_stat_total_fatigue', 'stat_total_health', 'static_stat_total_wounds', 'static_character_points_spent', 'bodystate', 'mindstate', 'soulstate', 'static_stat_base_body', 'static_stat_base_mind', 'static_stat_base_soul', 'stat_total_body', 'stat_total_mind', 'stat_total_soul', 'stat_total_acv', 'stat_total_dcv', 'stat_total_str', 'stat_total_cre', 'stat_total_com', 'stat_total_awa', 'stat_total_dex', 'stat_total_agi', 'stat_total_con', 'stat_total_int', 'stat_total_per', 'stat_total_rea', 'stat_total_wil', 'stat_total_cha', 'strstate', 'agistate', 'dexstate', 'constate', 'intstate', 'reastate', 'perstate', 'crestate', 'wilstate', 'chastate', 'awastate', 'comstate']; + const stats_array = ['static_stat_type_set', 'static_stat_temp_energy', 'static_stat_temp_health', 'stat_total_social', 'static_stat_total_shame', 'stat_total_sanity', 'static_stat_total_maddness', 'stat_total_energy', 'static_stat_total_fatigue', 'stat_total_health', 'static_stat_total_wounds', 'stat_total_shock', 'static_character_points_spent', 'bodystate', 'mindstate', 'soulstate', 'static_stat_base_body', 'static_stat_base_mind', 'static_stat_base_soul', 'stat_total_body', 'stat_total_mind', 'stat_total_soul', 'stat_total_acv', 'stat_total_dcv', 'stat_total_str', 'stat_total_cre', 'stat_total_com', 'stat_total_awa', 'stat_total_dex', 'stat_total_agi', 'stat_total_con', 'stat_total_int', 'stat_total_per', 'stat_total_rea', 'stat_total_wil', 'stat_total_cha', 'strstate', 'agistate', 'dexstate', 'constate', 'intstate', 'reastate', 'perstate', 'crestate', 'wilstate', 'chastate', 'awastate', 'comstate']; const rolls_array = ['static_roll_type_selection','static_button_personal_defense','static_button_movement_defense']; const combat_stats_array = ['mainhand_state', 'offhand_state', 'mainhand_source', 'offhand_source', 'extraarms', 'extraarms_inuse', 'attrdb', 'static_button_targeted_damage', 'static_button_targeted_attack', 'static_button_targeted_defense', 'massivedamage_targeted', 'massivedamage', 'enemyattack', 'enemydefense']; const size_template_values_array = ['size', 'height', 'mass', 'size_lift', 'size_strdmg', 'size_ar', 'size_extradmg', 'size_rnghitdef', 'size_rngspd']; @@ -6036,7 +6393,7 @@ result[result.length] = `protection_${protection}_state`; result[result.length] = `protection_${protection}_source`; result[result.length] = `protection_${protection}_name`; - result[result.length] = `protection_${protection}_rank`; + result[result.length] = `protection_${protection}_ar`; }); return result; } @@ -8362,7 +8719,7 @@ if (/(attrsrc|objects|uniquephenomena)/i.test(characteristic)) { fetch = capital(value[`repeating_attr_${rowID}_${characteristic}`]); } else if (characteristic == "unique") { - fetch = capital(getCustomizationVale(debug, value, rowID, characteristic)); + fetch = capital(getCustomizationValue(debug, value, rowID, 'type', characteristic)); } else { fetch = capital(getCustomizationValue(debug, value, rowID, 'name', characteristic)); } @@ -8752,7 +9109,6 @@ case attribute == 'regeneration' && setting == 'showcollectiontype': set = 1; break; case attribute == 'resilient' && setting == 'showconditions': set = 1; break; case attribute == 'skill' && setting == 'showskillgroup': set = 1; break; - case attribute == 'skill' && setting == 'showskillgroup': set = 1; break; case attribute == 'supersense' && setting == 'showsupersense': set = 1; break; case attribute == 'transmute' && setting == 'showvariablestat': set = 1; break; case attribute == 'weapon' && setting == 'showdamagetype': set = 1; break; @@ -8781,6 +9137,7 @@ case `focuseddamage`: result = 'showweaponclass'; break; case `objects`: result = 'showobject'; break; case `specialized`: result = 'showdamagetype'; break; + case `targeted`: result = 'showenemy'; break; case `targeteddamage`: result = 'showenemy'; break; case `uniquephenomena`: result = 'showuniquephenomena'; break; case `unpredictable`: result = `showvariablestat`; break; @@ -10083,6 +10440,17 @@ const superstrength = getSumOfActiveAttrLevels(attrdb, 'superstrength') || 0; console.log(`[setCombatRoll()] superstrength = ${superstrength}`); + const shockvalue = parseInt(value.stat_total_shock) || 0; + console.log(`[setCombatRoll()] shockvalue = ${shockvalue}`); + const forcefield = parseInt(value.protection_forcefield_ar) || 0; + const shield = parseInt(value.protection_shield_ar) || 0; + const armor1 = parseInt(value.protection_armor1_ar) || 0; + const armor2 = parseInt(value.protection_armor2_ar) || 0; + const armor3 = parseInt(value.protection_armor3_ar) || 0; + const mindshield = parseInt(value.protection_mindshield_ar) || 0; + const absorption1 = parseInt(value.protection_absorption1_ar) || 0; + const absorption2 = parseInt(value.protection_absorption2_ar) || 0; + const conversion = parseInt(value.protection_conversion_ar) || 0; let maneuver = setObj.static_activity_maneuver_name || value.static_activity_maneuver_name; maneuver = @@ -10126,12 +10494,64 @@ maneuver == 'weakpoint' ? `{{weakpoint=[[ [[?{Weak Point is|Large, ${setDice(rollmod, -2)}|Small, ${setDice(rollmod, -1)}|Tiny, ${setDice(rollmod, -1)}}]] ]] }}` : ''; - var result = `&{template:besmDefault} {{ismelee=${isMelee}}} {{character_name=@{name}}} {{pronoun=@{pronoun}}} {{maneuver=${maneuver}}} {{weapon_name=${name}}}`; + var result = `&{template:besmDefault} {{ismelee=${isMelee}}} {{character_name=@{name}}} {{pronoun=@{pronoun}}} {{maneuver=${maneuver}}} {{weapon_name=${name}}} {{shock=${shockvalue}}}`; if (acv > 0) { result = `${result} {{title=Attack}} {{attack=1}} {{target_name=@{target|name}}} {{acv=${acv}}} {{damage_type=${damagetype}}} {{damage2=${Math.round(damage * 0.25)}}} {{damage3=${Math.round(damage * 0.35)}}} {{damage4=${Math.round(damage * 0.45)}}} {{damage5=${Math.round(damage * 0.55)}}} {{damage6=${Math.round(damage * 0.65)}}} {{damage7=${Math.round(damage * 0.75)}}} {{damage8=${Math.round(damage * 0.9)}}} {{damage9=${Math.round(damage * 1.05)}}} {{damage10=${Math.round(damage * 1.2)}}} {{damage11=${Math.round(damage * 1.35)}}} {{damage12=${Math.round(damage * 1.5)}}}`; if (isWeapon > 0){ _.each(weapon.customizations, customization => { switch (customization.name) { + case 'ammo': + const ammunition = parseInt(value[`repeating_attr_${rowID}_ammo`]) || 0; + result = `${result} {{${customization.name}=${customization.rank}}} {{ammunition=${ammunition}}}`; + break; + case 'area': + const radius = get1or3(customization.rank, 3) * (10 ** (Math.ceil((customization.rank) / 2))); + result = `${result} {{${customization.name}=${customization.rank}}} {{radius=${radius}}}`; + break; + case 'backblast': + const bystander = customization.rank > 1 ? 'User and bystanders' : + customization.rank > 0 ? 'Bystanders only' : ''; + result = `${result} {{bystander=${bystander}}} {{${customization.name}=${customization.rank}}} {{continuing2=${Math.round((damage * 0.25)/5)}}} {{continuing3=${Math.round((damage * 0.35)/5)}}} {{continuing4=${Math.round((damage * 0.45)/5)}}} {{continuing5=${Math.round((damage * 0.55)/5)}}} {{continuing6=${Math.round((damage * 0.65)/5)}}} {{continuing7=${Math.round((damage * 0.75)/5)}}} {{continuing8=${Math.round((damage * 0.9)/5)}}} {{continuing9=${Math.round((damage * 1.05)/5)}}} {{continuing10=${Math.round((damage * 1.2)/5)}}} {{continuing11=${Math.round((damage * 1.35)/5)}}} {{continuing12=${Math.round((damage * 1.5)/5)}}}`; + break; + case 'blight': + const blightrank = customization.rank > 2 ? 18 : + customization.rank > 1 ? 15 : + customization.rank > 0 ? 12 : 0; + result = `${result} {{${customization.name}=${blightrank}}}`; + break; + case 'continuing': + result = `${result} {{${customization.name}=${customization.rank}}} {{continuing2=${Math.round((damage * 0.25)/5)}}} {{continuing3=${Math.round((damage * 0.35)/5)}}} {{continuing4=${Math.round((damage * 0.45)/5)}}} {{continuing5=${Math.round((damage * 0.55)/5)}}} {{continuing6=${Math.round((damage * 0.65)/5)}}} {{continuing7=${Math.round((damage * 0.75)/5)}}} {{continuing8=${Math.round((damage * 0.9)/5)}}} {{continuing9=${Math.round((damage * 1.05)/5)}}} {{continuing10=${Math.round((damage * 1.2)/5)}}} {{continuing11=${Math.round((damage * 1.35)/5)}}} {{continuing12=${Math.round((damage * 1.5)/5)}}}`; + break; + case 'drain': + const draintype = value[`repeating_attr_${rowID}_draintype`] || ''; + result = `${result} {{${customization.name}=${customization.rank}}} {{draintype=${draintype}}}`; + break; + case 'duration': + const timeobj = { + 1:"2 rounds", + 2:"5 rounds", + 3:"10 rounds", + 4:"1 minute", + 5:"1 hour", + 6:"1 day", + 10:"Permanent" + }; + const time = timeobj[customization.rank] || "0"; + result = `${result} {{${customization.name}=${customization.rank}}} {{time=${time}}}`; + break; + case 'enervation': + result = `${result} {{${customization.name}=${customization.rank * 5}}}`; + break; + case 'flareaudible': + case 'flarescent': + case 'flaretactile': + case 'flaretaste': + case 'flarevisual': + const sense = customization.name.replace(/flare/g, ''); + const obstacle = customization.rank > 2 ? 'Major' : + customization.rank > 1 ? 'Minor' : 'No'; + result = `${result} {{flare=${customization.rank}}} {{sense=${sense}}} {{obstacle=${obstacle}}}`; + break; case `flexible`: rollmod = (getIsGrappling(maneuver)) ? rollmod - customization.rank : rollmod; result = `${result} {{${customization.name}=${customization.rank}}}`; @@ -10144,6 +10564,105 @@ rollmod = rollmod - 1; result = `${result} {{${customization.name}=${customization.rank}}}`; break; + case 'incapacitating': + case 'irritant': + const hasobstacle = customization.rank > 2 ? 'major' : + customization.rank > 1 ? 'minor' : 'none'; + result = `${result} {{${customization.name}=${customization.rank}}} {{obstacle=${hasobstacle}}}`; + break; + case 'incurable': + const recovery = customization.rank > 2 ? 'special' : + customization.rank > 1 ? 'slow' : 'normal'; + result = `${result} {{${customization.name}=${customization.rank}}} {{recovery=${recovery}}}`; + break; + case 'knockback': + const kb = 1 << customization.rank -1; + result = `${result} {{${customization.name}=${customization.rank}}} {{kb=${kb}}}`; + break; + case 'nonpenetrating': + const wontpenetrate = parseInt(customization.rank * 10); + result = `${result} {{${customization.name}=${customization.rank}}} {{wontpenetrate=${wontpenetrate}}}`; + break; + case 'penetrating': + case 'piercing': + const penname = customization.name == 'penetrating' ? 'Armor' : + customization.name == 'piercing' ? 'Forcefield' : ''; + const pen = customization.rank * 10; + const pentype = capital(customization.name); + result = `${result} {{penname=${penname}}} {{pentype=${pentype}}} {{pen=${pen}}}`; + break; + case 'quake': + const fissureobj = { + 1:"2", + 2:"5", + 3:"10", + 4:"30", + 5:"100", + 6:"300" + }; + const fissure = fissureobj[customization.rank] || "0"; + result = `${result} {{${customization.name}=${customization.rank}}} {{fissure=${fissure}}}`; + break; + case 'range': + const extended = getSumOfActiveSubAttrRanks(attrdb, 'combattechnique', 'extendedrange') || 0; + const distanceobj = { + 1:3, + 2:10, + 3:100, + 4:1, + 5:10, + 6:100 + }; + const distance = distanceobj[customization.rank] * (extended + 1) || "0"; + const kilometers = customization.rank > 3 ? 'k' : ''; + result = `${result} {{${customization.name}=${customization.rank}}} {{distance=${distance}}} {{kilometers=${kilometers}}}`; + break; + case 'stoppable': + const stopdamage = parseInt(value[`repeating_attr_${rowID}_level`]) * 10; + const timetostop = customization.rank > 3 ? '1 hour' : + customization.rank > 2 ? '1 minute' : + customization.rank > 1 ? '5 rounds' : + customization.rank > 0 ? '1 round' : ''; + result = `${result} {{${customization.name}=${customization.rank}}} {{timetostop=${timetostop}}} {{stopdamage=${stopdamage}}}`; + break; + case 'tangle': + result = `${result} {{${customization.name}=${customization.rank * 5}}}`; + break; + case 'exclusive': + case 'targeted': + const hasenemy = value[`repeating_attr_${rowID}_enemy`] || ''; + result = `${result} {{${customization.name}=${customization.rank}}} {{hasenemy=${hasenemy}}}`; + break; + case 'toxic': + const escapable = customization.rank > 1 ? 'Escapable' : + customization.rank > 0 ? 'Non-escapable' : ''; + result = `${result} {{${customization.name}=${customization.rank}}} {{escapable=${escapable}}}`; + break; + case 'unreliable': + const failure = customization.rank > 1 ? `${customization.rank + 1} or less` : + customization.rank > 0 ? '2' : ''; + result = `${result} {{${customization.name}=${customization.rank}}} {{failure=${failure}}}`; + break; + case 'vampiric': + const stolenhealth = customization.rank > 2 ? 'Increase' : + customization.rank > 0 ? 'Restore' : ''; + result = `${result} {{${customization.name}=${customization.rank}}} {{stolenhealth=${stolenhealth}}}`; + break; + case 'autofire': + case 'contact': + case 'contagious': + case 'fieldless': + case 'helper': + case 'inconspicuous': + case 'insidious': + case 'multidimensional': + case 'nostun': + case 'psychic': + case 'reach': + case 'selective': + case 'spreading': + case 'stunonly': + result = `${result} {{${customization.name}=${customization.rank}}}`; } }); } @@ -10151,8 +10670,25 @@ } else if (dcv > 0) { if (maneuver == 'defendother') result = `${result} {{target_name=@{target|name}}}`; result = `${result} {{dcv=${dcv}}} {{title=Defend}} {{defense=1}} {{total=[[[[?{Roll is|Normal, ${setDice(rollmod)}|Minor Edge, ${setDice(rollmod, 1)}|Minor Obstacle, ${setDice(rollmod, -1)}|Major Edge, ${setDice(rollmod, 2)}|Major Obstacle, ${setDice(rollmod, -2)}}]]+[[${dcv}]]]]}} {{roll=$[[0]]}}`; + if(forcefield > 0) result = `${result} {{forcefield=${forcefield}}}`; + if(armor1 > 0) result = `${result} {{armor1=${armor1}}}`; + if(armor2 > 0) result = `${result} {{armor2=${armor2}}}`; + if(armor3 > 0) result = `${result} {{armor3=${armor3}}}`; + if(mindshield > 0) result = `${result} {{mindshield=${mindshield}}}`; + if(absorption1 > 0) result = `${result} {{absorption1=${absorption1}}}`; + if(absorption2 > 0) result = `${result} {{absorption2=${absorption2}}}`; + if(conversion > 0) result = `${result} {{conversion=${conversion}}}`; } else { result = `&{template:besmDefault} {{character_name=@{name}}} {{maneuver=${sourceAttr}}} {{doesnothing=1}} {{title=Does Nothing}}`; + if(forcefield > 0) result = `${result} {{forcefield=${forcefield}}}`; + if(shield > 0) result = `${result} {{shield=${shield}}}`; + if(armor1 > 0) result = `${result} {{armor1=${armor1}}}`; + if(armor2 > 0) result = `${result} {{armor2=${armor2}}}`; + if(armor3 > 0) result = `${result} {{armor3=${armor3}}}`; + if(mindshield > 0) result = `${result} {{mindshield=${mindshield}}}`; + if(absorption1 > 0) result = `${result} {{absorption1=${absorption1}}}`; + if(absorption2 > 0) result = `${result} {{absorption2=${absorption2}}}`; + if(conversion > 0) result = `${result} {{conversion=${conversion}}}`; } if (debug) console.log(`[setCombatRoll()] result = ${result}`); setObj.maneuverroll = result; @@ -10676,6 +11212,8 @@ getAttrs(getAttrsString, (value) => { + console.log(`[Captured Attributes] value:`); console.log(value); + const debug = parseInt(value[`show_debug_messages`]) || 0; var attrdb = JSON.parse(value.attrdb); diff --git a/BESM4eExtras/preview.jpg b/BESM4eExtras/preview.jpg index 2cd6f061c4..cdb5cf73d5 100644 Binary files a/BESM4eExtras/preview.jpg and b/BESM4eExtras/preview.jpg differ