diff --git a/Pathfinder Playtest/PFPlaytest.html b/Pathfinder Playtest/PFPlaytest.html index 0f63157f5f..907e2056c7 100644 --- a/Pathfinder Playtest/PFPlaytest.html +++ b/Pathfinder Playtest/PFPlaytest.html @@ -32,8 +32,8 @@ This pattern can be found at https://regexr.com/3mi9v
-

DISPLAY MODE

@@ -45,7 +45,7 @@ This pattern can be found at https://regexr.com/3mi9v
- --> +
@@ -74,108 +74,6 @@ This pattern can be found at https://regexr.com/3mi9v
-
@@ -783,7 +681,7 @@ This pattern can be found at https://regexr.com/3mi9v WEAKNESS - +
@@ -836,7 +734,7 @@ This pattern can be found at https://regexr.com/3mi9v WIS - +
@@ -4517,1379 +4415,2408 @@ This pattern can be found at https://regexr.com/3mi9v
+
- +
-
- -
-
- PERCEPTION - - SENSES - -
-
- LANGUAGES - -
-
- -
-
- STR - - DEX - - CON - - INT - - WIS - - CHA - -
-
- Items -
-
- -
-
- -
-
-
-
- AC - - KAC - - -
-
- - - - - - - -
-
- HP - - / - - -
-
- DEFENSIVE ABILITIES - -
-
-
- IMMUNITIES +
+ +
+ + + SENSES + +
+
+ LANGUAGES + +
+
+ SKILLS +
- Immunities + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ Skill Notes + +
+
+
+ STR + + DEX + + CON + + INT + + WIS + + CHA + +
+
+ Items +
+
+ +
+
+ Interaction Abilities +
+
+
+ + + ACTIONS +
+ + 0 +
+
+ + Reaction +
+
+ + 1 +
+
+ + 2 +
+
+ + 3 +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ Bonus + + ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ DC + + +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+
+ AC + + TAC + + +
+
+ + + + + + + +
+
+ HP + +
+ + +
+
+ IMMUNITIES +
+ Immunities
- RESISTANCES + RESISTANCES
- Resistances + Resistances
- WEAKNESSES + WEAKNESSES
- Weaknesses + Weaknesses
- DEFENSIVE OR REACTIONARY ABILITIES -
+
+
+ 10th +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 10th +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 10th +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 10th +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 10th +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 10th +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 10th +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 10th +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 1th +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ cantrips +
(/)
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ + INNATE SPELLS +
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+ DC + + Attack + +
+
+ 10th +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 9th +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 8th +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 7th +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 6th +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 5th +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 4th +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 3rd +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 2nd +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ 1st +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ Cantrips +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ AT WILL +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ CONSTANT +
+ + + LEVEL + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ CLASS POWERS + DC + + Attack + + spell points + + / + +
+
+
+ + + PREPARED + / + ACTIONS +
+ + Verbal +
+
+ + Somatic +
+
+ + Material +
+ spell point cost + +
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ RITUALS +
+
+
+ + + + Casting Time + + Cost + +
+ y +
+ +
+ Secondary Casters + + Proficiency + +
+
+ RANGE + + Area + + TARGETS + + Duration + +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
+
+ OFFENSIVE OR PROACTIVE ABILITIES +
+
+
+ + + ACTIONS +
+ + 0 +
+
+ + Reaction +
+
+ + 1 +
+
+ + 2 +
+
+ + 3 +
+
+ y +
+ +
+ RANGE + + TARGETS + +
+ + ATTACK + + DAMAGE + + SAVES +
+ Bonus + + ADDITIONAL ATTACK PENALTY + + +
+
+ + +
+
+ DC + + +
+
+ Critical Success + Success + Failure + Critical Failure +
+
+ + + + +
+ +
+
© 2018. Pathfinder Playtest, the Pathfinder Playtest logo, the Paizo golem, all Paizo titles, the Pathfinder Playtest Roleplaying Game rules, and Paizo’s character names and distinctive likenesses are property and copyright of Paizo, Inc. in the United States and other countries. @@ -6411,15 +7338,75 @@ This pattern can be found at https://regexr.com/3mi9v
{{/leftbanner}}
-
{{#activation}} -
+ {{#actionflag}} +
- ACTIVATION + Actions
- {{activation}} + {{#verbal}}{{verbal}}{{/verbal}}{{#somatic}}{{somatic}}{{/somatic}}{{#material}}{{material}}{{/material}}
+ {{/actionflag}} + {{#noaction}} +
+
+ Actions +
+
+ Free Action +
+
+ {{/noaction}} + {{#reaction}} +
+
+ Actions +
+
+ Reaction +
+
+ {{/reaction}} + {{#singleaction}} +
+
+ Actions +
+
+ Single Action +
+
+ {{/singleaction}} + {{#doubleaction}} +
+
+ Actions +
+
+ Double Action +
+
+ {{/doubleaction}} + {{#tripleaction}} +
+
+ Actions +
+
+ Triple Action +
+
+ {{/tripleaction}} + {{#activation}} +
+
+ ACTIVATION +
+
+ {{activation}} +
+
{{/activation}}{{#duration}}
@@ -6447,24 +7434,7 @@ This pattern can be found at https://regexr.com/3mi9v {{range}}
- {{/range}}{{#rollGreater() saveflag 0}} -
- FULL EFFECT: {{effect}} -
-
-
- {{savetype}} SAVE -
-
- DC {{savedc}} -
-
-
- SAVE EFFECT: {{saveeffect}} -
- {{/rollGreater() saveflag 0}}{{#rollGreater() attackflag 0}} - {{#r1}} - 1st ATTACK + {{/range}}{{#r1}}
{{#r1name}} @@ -6478,12 +7448,16 @@ This pattern can be found at https://regexr.com/3mi9v {{r1}}
- {{/r1}} - {{/rollGreater() attackflag 0}}{{#rollGreater() damageflag 0}} - {{#^rollGreater() attackflag 0}} - 1st ATTACK - {{/^rollGreater() attackflag 0}} - {{#damage1}} + {{/r1}}{{#effect}} +
+
+ Effect +
+
+ {{effect}} +
+
+ {{/effect}}{{#damage1}}
{{#damage1type}} @@ -6497,272 +7471,44 @@ This pattern can be found at https://regexr.com/3mi9v {{damage1}}
- {{#rollWasCrit() r1}} - {{#rollGreater() attackflag 0}} - {{#crit1effect}} -
-
- CRIT EFFECT -
-
- {{crit1effect}} -
-
- {{/crit1effect}} - {{#crit1damage}} -
-
- CRIT DAMAGE -
-
- {{crit1damage}} -
-
- {{/crit1damage}} - {{/rollGreater() attackflag 0}} - {{/rollWasCrit() r1}} - {{/damage1}} - {{/rollGreater() damageflag 0}}{{#rollGreater() fullattack 1}} - {{#rollGreater() attackflag 0}} - {{#r2}} - 2nd ATTACK -
-
- {{#r2name}} - {{r2name}} - {{/r2name}} - {{^r2name}} - ATTACK - {{/r2name}} -
-
- {{r2}} -
-
- {{/r2}} - {{/rollGreater() attackflag 0}} - {{#rollGreater() damageflag 0}} - {{#damage2}} -
-
- {{#damage2type}} - {{damage2type}} - {{/damage2type}} - {{^damage2type}} - DAMAGE - {{/damage2type}} -
-
- {{damage2}} -
+ {{/damage1}}{{#dc}} +
+
+ {{#savetype}}{{savetype}} {{/savetype}}{{^savetype}}SAVE{{/savetype}}
- {{#rollWasCrit() r2}} - {{#rollGreater() attackflag 0}} - {{#crit2effect}} -
-
- CRIT EFFECT -
-
- {{crit2effect}} -
-
- {{/crit2effect}} - {{#crit2damage}} -
-
- CRIT DAMAGE -
-
- {{crit2damage}} -
-
- {{/crit2damage}} - {{/rollGreater() attackflag 0}} - {{/rollWasCrit() r2}} - {{/damage2}} - {{/rollGreater() damageflag 0}} - {{/rollGreater() fullattack 1}}{{#rollGreater() fullattack 2}} - {{#rollGreater() attackflag 0}} - {{#r3}} - 3rd ATTACK -
-
- {{#r3name}} - {{r3name}} - {{/r3name}} - {{^r3name}} - ATTACK - {{/r3name}} -
-
- {{r3}} -
+
+ DC {{dc}}
- {{/r3}} - {{/rollGreater() attackflag 0}} - {{#rollGreater() damageflag 0}} - {{#damage3}} -
-
- {{#damage3type}} - {{damage3type}} - {{/damage3type}} - {{^damage3type}} - DAMAGE - {{/damage3type}} -
-
- {{damage3}} -
-
- {{#rollWasCrit() r3}} - {{#rollGreater() attackflag 0}} - {{#crit3effect}} -
-
- CRIT EFFECT -
-
- {{crit3effect}} -
-
- {{/crit3effect}} - {{#crit3damage}} -
-
- CRIT DAMAGE -
-
- {{crit3damage}} -
-
- {{/crit3damage}} - {{/rollGreater() attackflag 0}} - {{/rollWasCrit() r3}} - {{/damage3}} - {{/rollGreater() damageflag 0}} - {{/rollGreater() fullattack 2}}{{#rollGreater() fullattack 3}} - {{#rollGreater() attackflag 0}} - {{#r4}} - 4th ATTACK -
-
- {{#r4name}} - {{r4name}} - {{/r4name}} - {{^r4name}} - ATTACK - {{/r4name}} -
-
- {{r4}} -
-
- {{/r4}} - {{/rollGreater() attackflag 0}} - {{#rollGreater() damageflag 0}} - {{#damage4}} -
-
- {{#damage4type}} - {{damage4type}} - {{/damage4type}} - {{^damage4type}} - DAMAGE - {{/damage4type}} -
-
- {{damage4}} -
-
- {{#rollWasCrit() r4}} - {{#rollGreater() attackflag 0}} - {{#crit4effect}} -
-
- CRIT EFFECT -
-
- {{crit4effect}} -
-
- {{/crit4effect}} - {{#crit4damage}} -
-
- CRIT DAMAGE -
-
- {{crit4damage}} -
-
- {{/crit4damage}} - {{/rollGreater() attackflag 0}} - {{/rollWasCrit() r4}} - {{/damage4}} - {{/rollGreater() damageflag 0}} - {{/rollGreater() fullattack 3}}{{#rollGreater() fullattack 4}} - {{#rollGreater() attackflag 0}} - {{#r5}} - 5th ATTACK -
-
- {{#r5name}} - {{r5name}} - {{/r5name}} - {{^r5name}} - ATTACK - {{/r5name}} -
-
- {{r5}} -
-
- {{/r5}} - {{/rollGreater() attackflag 0}} - {{#rollGreater() damageflag 0}} - {{#damage5}} -
-
- {{#damage5type}} - {{damage5type}} - {{/damage5type}} - {{^damage5type}} - DAMAGE - {{/damage5type}} -
-
- {{damage5}} -
-
- {{#rollWasCrit() r5}} - {{#rollGreater() attackflag 0}} - {{#crit5effect}} -
-
- CRIT EFFECT -
-
- {{crit5effect}} -
-
- {{/crit5effect}} - {{#crit5damage}} -
-
- CRIT DAMAGE -
-
- {{crit5damage}} -
-
- {{/crit5damage}} - {{/rollGreater() attackflag 0}} - {{/rollWasCrit() r5}} - {{/damage5}} - {{/rollGreater() damageflag 0}} - {{/rollGreater() fullattack 4}}{{#notes}} +
+ {{/dc}}{{#savecritsuccess}} +
+ **

Critical Success

** +
+
+

{{savecritsuccess}}

+
+ {{/savecritsuccess}}{{#savesuccess}} +
+ **Success** +
+
+

{{savesuccess}}

+
+ {{/savesuccess}}{{#savefailure}} +
+ **Failure** +
+
+

{{savefailure}}

+
+ {{/savefailure}}{{#savecritfailure}} +
+ **Critical Failure** +
+
+

{{savecritfailure}}

+
+ {{/savecritfailure}}{{#notes}}
NOTES: {{notes}}
@@ -7044,7 +7790,7 @@ This pattern can be found at https://regexr.com/3mi9v /*start starfinder.js*/ var sheet = sheet || (function(){ 'use strict'; - const version = '0.011537880400',//The sheet's current version. This is put into the character_sheet attribute when a sheet is opened. I've been doing version numbering as 0.0Xyyyyyyyyyy where X represents the state of the sheet (currently in stage 4, or open beta) and y is the UNIX epoch timestamp for when I finished that build + const version = '0.011539090000',//The sheet's current version. This is put into the character_sheet attribute when a sheet is opened. I've been doing version numbering as 0.0Xyyyyyyyyyy where X represents the state of the sheet (currently in stage 4, or open beta) and y is the UNIX epoch timestamp for when I finished that build pilotingRanks={}, sheetAttributes = [/*An array of all the non-repeating sheet attributes that could potentially be used in the calculations performed by the script This array is used in the getAttrs call in accessStarfinder()*/ @@ -7688,6 +8434,7 @@ This pattern can be found at https://regexr.com/3mi9v attributes = ['character_sheet']; TAS.log('Updating Sheet'); getID(JSON.parse(JSON.stringify(repeatingAttributes)),(sectionAggregate)=>{ + TAS.log(`sectionAggregate:${JSON.stringify(sectionAggregate)}`); _.each(sectionAggregate,(section)=>{ _.each(section.id,(sid)=>{ _.each(section.fields,(f)=>{ @@ -7713,15 +8460,15 @@ This pattern can be found at https://regexr.com/3mi9v updateBuildDateTo = buildDate*1||0; }); TAS.log(`oldVersion: ${oldVersion} | oldBuildDate: ${oldBuildDate} | updateVersionTo: ${updateVersionTo} | updateBuildDateTo: ${updateBuildDateTo}`); - if(updateAttrs.class_name!=='' && ((oldVersion <=0.01 && oldBuildDate <= 1535374800)||!oldVersion)){ + if(updateAttrs.class_name!=='' && oldVersion <=0.01 && oldBuildDate <= 1535374800&&oldVersion && updateAttrs.sheet_type !== 'npc'){ firstUpgrade(updateAttrs,setObj); } TAS.log(`pre sep10 if | ${oldBuildDate} <= 1535374800: ${(oldBuildDate < 1536670800)}`); - if(oldBuildDate < 1536670800 || !oldVersion){ + if(oldBuildDate < 1536670800 && oldVersion && updateAttrs.sheet_type !== 'npc'){ TAS.log('here'); upgradeSep10(updateAttrs,setObj); } - if(oldBuildDate < 1537880400){ + if(oldBuildDate < 1537880400 && oldVersion && updateAttrs.sheet_type !== 'npc'){ TAS.log('updating to v0.11537880400'); upgradeTo1537880400(updateAttrs,setObj); } @@ -7731,8 +8478,6 @@ This pattern can be found at https://regexr.com/3mi9v upgradeTo1537880400 = function(attributes,setObj){ let profKeys = _.filter(_.keys(attributes),(key)=>{return /proficiency/.test(key)}); - TAS.log(`profKeys: ${JSON.stringify(profKeys)}`); - TAS.log(`arcana_proficiency:${attributes.arcana_proficiency}`); _.each(profKeys,(key)=>{ if(attributes[key]*1<0){ setObj[key]=-4; @@ -7742,6 +8487,11 @@ This pattern can be found at https://regexr.com/3mi9v setAttrs(setObj); }, + upgradeSep10 = function(attributes,setObj){ + accessSheet({sourceAttribute:'dexterity_base',newValue:attributes.dexterity_base,previousValue:attributes.dexterity_base}); + accessSheet({sourceAttribute:'charisma_base',newValue:attributes.charisma_base,previousValue:attributes.charisma_base}); + }, + firstUpgrade = function(attributes,setObj){ let profAttrs = _.filter(_.keys(attributes),(attr)=>{ return /proficiency/.test(attr); @@ -7767,11 +8517,6 @@ This pattern can be found at https://regexr.com/3mi9v }); }, - upgradeSep10 = function(attributes,setObj){ - accessSheet({sourceAttribute:'dexterity_base',newValue:attributes.dexterity_base,previousValue:attributes.dexterity_base}); - accessSheet({sourceAttribute:'charisma_base',newValue:attributes.charisma_base,previousValue:attributes.charisma_base}); - }, - transferSpell = function(attributes,attribute,setObj){ let id = attribute.replace(/(repeating_[^_]+_[^_]+_).+/,'$1'), level = attributes[`${id}level`], @@ -7801,8 +8546,10 @@ This pattern can be found at https://regexr.com/3mi9v */ getID = function(cloneRepAttr,callback,sectionAggregate,event,attribute){ const currSection=cloneRepAttr.shift(); + TAS.log(`currSection:${JSON.stringify(currSection)}`); sectionAggregate = sectionAggregate || []; - getSectionIDs('repeating_'+currSection.section,(itemIDArr)=>{ + getSectionIDs(`repeating_${currSection.section}`,(itemIDArr)=>{ + TAS.log(`itemIDArr:${JSON.stringify(itemIDArr)}`); sectionAggregate.push({ section:currSection.section, id:itemIDArr, @@ -7829,7 +8576,13 @@ This pattern can be found at https://regexr.com/3mi9v }); attributesToGet = attributesToGet.concat(sheetAttributes); getAttrs(attributesToGet,(objs)=>{ - if(/repeating_(?:cantrip|spell[1-9]0?)_[^_]+_level/.test(attribute)){ + if(objs.sheet_type==='npc'){ + setObj.attack_query_translation=getTranslationByKey('attack number'); + if(/repeating_attack/.test(event.triggerName)){ + setObj[`${event.triggerName}_id`]=event.triggerName.replace(/repeating_attack_/,''); + } + setAttrs(setObj,{silent:true}); + }else if(/repeating_(?:cantrip|spell[1-9]0?)_[^_]+_level/.test(attribute)){ transferSpell(objs,attribute,setObj); _.each(_.keys(setObj),(key)=>{ TAS.log(`setObj[${key}]: ${setObj[key]}`);