From 50f836c389d3fd5fa08653d151b9124b10be5375 Mon Sep 17 00:00:00 2001
From: Jiboux <72362918+Jiboux@users.noreply.github.com>
Date: Sun, 16 Feb 2025 17:35:55 -0500
Subject: [PATCH 1/3] ED V343
---
Earthdawn (FASA Official)/Earthdawn.css | 6 +-
Earthdawn (FASA Official)/Earthdawn.html | 827 +++++++++--------------
2 files changed, 305 insertions(+), 528 deletions(-)
diff --git a/Earthdawn (FASA Official)/Earthdawn.css b/Earthdawn (FASA Official)/Earthdawn.css
index f306b59b83..bd5fe3c428 100644
--- a/Earthdawn (FASA Official)/Earthdawn.css
+++ b/Earthdawn (FASA Official)/Earthdawn.css
@@ -1066,11 +1066,7 @@ flex-direction: column;
padding-right: 5em;
}
-.sheet-w7 {
- display: inline-block;
- min-width: 7em;
- padding-right: 0em;
-}
+
/*JBF */
.sheet-numShorter { width: 2em !important }
diff --git a/Earthdawn (FASA Official)/Earthdawn.html b/Earthdawn (FASA Official)/Earthdawn.html
index 778500c766..5a217e3160 100644
--- a/Earthdawn (FASA Official)/Earthdawn.html
+++ b/Earthdawn (FASA Official)/Earthdawn.html
@@ -3,12 +3,10 @@
@@ -881,16 +879,16 @@ Version of my code are prefixed JBF, usually with YYMMDD for me to remember the
Warning - Character is set to expect API but API is not responding. Temporarily displaying NoAPI version !
-
- To ignore this warning and keep this character in NoAPI mode (for example a character imported from an API game to a NoAPI Game) :
+
- To set definitely this sheet to not expect the API press the following button :
- To set all new characters to not expect the API, go to the Game default sheet settings.
-
- If you think the API is running, you can try the following button to try again communicating to the API (note that due to a roll20 restriction, on any new character, you need to initialize the communication by either hitting this button or closing/reopening the sheet)
+
- You can try the following button to reconnect to the API (note that due to a roll20 restriction, on any new character, you need to initialize the communication by either hitting this button or closing/reopening the sheet)
+ title="Click this button if you confirm using the API.">Reconnect to API
- If the above doesn't work, the API may be crashed. Ask the GM to go in the API Console to restart the API.
@@ -9381,7 +9379,7 @@ Version of my code are prefixed JBF, usually with YYMMDD for me to remember the
-
+
@@ -9512,11 +9510,11 @@ Version of my code are prefixed JBF, usually with YYMMDD for me to remember the
6- Racial & Karma Abilities
Automatically Determined by your Race and Discipline.
-
+
-
+
@@ -9976,7 +9974,7 @@ Version of my code are prefixed JBF, usually with YYMMDD for me to remember the
-
+
@@ -10866,7 +10864,7 @@ Version of my code are prefixed JBF, usually with YYMMDD for me to remember the
-
+
@@ -13274,7 +13272,7 @@ Version of my code are prefixed JBF, usually with YYMMDD for me to remember the
From 4045efbe0f95aaf66372d6c6a85541dc75ed8256 Mon Sep 17 00:00:00 2001
From: Jiboux <72362918+Jiboux@users.noreply.github.com>
Date: Mon, 17 Feb 2025 19:07:42 -0500
Subject: [PATCH 2/3] Add files via upload
---
Earthdawn (FASA Official)/Earthdawn.html | 95 +++++++++++-------------
1 file changed, 45 insertions(+), 50 deletions(-)
diff --git a/Earthdawn (FASA Official)/Earthdawn.html b/Earthdawn (FASA Official)/Earthdawn.html
index 5a217e3160..c2b2ffd197 100644
--- a/Earthdawn (FASA Official)/Earthdawn.html
+++ b/Earthdawn (FASA Official)/Earthdawn.html
@@ -10033,7 +10033,7 @@ Largerly using material from the work on the Official FASA version of Chris Dick
In order for those functions to work properly, you need to link the character sheet with a token on the map, by selecting this token, and pressing the button below
@@ -13638,7 +13638,7 @@ var ConditionHealth = function fnConditionHealth(eventInfo) { // If Damage excee
if(eventInfo && eventInfo.sourceType=="API") return; //API updates itself the conditions and markers because there is no chain trigger from sheetworker to API for the update of the token markers
getAttrs([ "Damage", "Damage-Unc-Rating", "Damage-Death-Rating", "Damage-Stun","CreationMode"], function gaConditionHealth(values) {
'use strict';
- log ( "EarthDawn : ConditionHealth() " +JSON.stringify(eventInfo));
+ //log( "EarthDawn : ConditionHealth() " +JSON.stringify(eventInfo));
logvalues( values);
let att=getAttrib(eventInfo).toLowerCase();
if ( values[ "CreationMode" ] == "0" ) {
@@ -13686,7 +13686,7 @@ on("change:race-resistpain change:special-resistpain change:creature-resistpain"
var UpdateAdjustGlobalModifiers = function fnUpdateAdjustGlobalModifiers(eventInfo) {
'use strict';
try{
- // log ( "EarthDawn : UpdateAdjustGlobalModifiers()");
+ //log( "EarthDawn : UpdateAdjustGlobalModifiers()");
getAttrs([ "condition-Darkness" , "Adjust-Effect-Tests-Auto", "effectIsAction", "Wounds",
"Creature-Fury", "Total-ResistPain", "Adjust-Effect-Tests-Misc" , "Adjust-Effect-Tests-Total", "combatOption-TailAttack", "condition-Harried",
"combatOption-DefensiveStance", "Misc-DefStance-Penalty", "Misc-DefStance-Bonus", "condition-KnockedDown", "Adjust-All-Tests-Auto",
@@ -13820,7 +13820,7 @@ on("change:combatoption-aggressiveattack change:combatoption-defensivestance", f
var updateAdjustTN = function fnUpdateAdjustTN() {
'use strict';
try{
- // log ( "EarthDawn : UpdateAdjustTN()");
+ //log( "EarthDawn : UpdateAdjustTN()");
getAttrs([ "combatOption-Reserved", "Adjust-TN-Misc" ], function gaUpdateAdjustTN(values) {
'use strict';
logvalues( values);
@@ -13839,7 +13839,7 @@ on("change:combatoption-reserved change:adjust-tn-misc", fn(updateAdjustTN) );
var updateEffectIsAction = function fnUpdateEffectIsAction( eventInfo ) {
'use strict';
try{
- // log ( "EarthDawn : UpdateEffectIsAction()");
+ //log( "EarthDawn : UpdateEffectIsAction()");
setAttrsLog({ "Dex-ActnEfct": "1", "Str-ActnEfct": "1", "Tou-ActnEfct": "1", "Per-ActnEfct": "1", "Wil-ActnEfct": "1", "Cha-ActnEfct": "1", "Test-Trigger-3": "1" });
} catch( err ) { errlog( "Earthdawn:updateEffectIsAction() error caught: " + err + " eventInfo: " + JSON.stringify(eventInfo) ); }
}; // End updateEffectIsAction()
@@ -13892,7 +13892,7 @@ on("change:attrib-dex-orig change:attrib-str-orig change:attrib-tou-orig change:
var updateAttribCurr = function fnUpdateAttribCurr( attrib) {
'use strict';
try{
- // log ( "EarthDawn : UpdateAttribCurr( " + attrib +" ) " );
+ //log( "EarthDawn : UpdateAttribCurr( " + attrib +" ) " );
var curr = "Attrib-" + attrib + "-Curr";
var orig = "Attrib-" + attrib + "-Orig";
var race = "Attrib-" + attrib + "-Race";
@@ -13926,7 +13926,7 @@ on("change:attrib-cha-orig change:attrib-cha-race change:attrib-cha-increases ch
var backfillOrigAttrib = function fnBackfillOrigAttrib( attrib ) {
'use strict';
try{
- // log ( "EarthDawn : BackfillOrigAttrib( "+ attrib + " )");
+ //log( "EarthDawn : BackfillOrigAttrib( "+ attrib + " )");
var step = attrib + "-Step";
var orig = "Attrib-" + attrib + "-Orig";
var race = "Attrib-" + attrib + "-Race";
@@ -13954,7 +13954,7 @@ var backfillOrigAttrib = function fnBackfillOrigAttrib( attrib ) {
var updateAttribStep = function fnUpdateAttribStep( attrib ) {
'use strict';
try{
- // log ( "EarthDawn : updateAttribStep( "+ attrib + " )");
+ //log( "EarthDawn : updateAttribStep( "+ attrib + " )");
var step = attrib + "-Step";
var curr = "Attrib-" + attrib + "-Curr";
var adjust= attrib + "-Adjust";
@@ -13975,7 +13975,7 @@ var updateAttribStep = function fnUpdateAttribStep( attrib ) {
var updateAttribFinal = function fnUpdateAttribFinal( base ) { //calculate Action Test Step for the attribute
'use strict';
try{
- // log ( "EarthDawn : updateAttribFinal( "+ base + " )");
+ //log( "EarthDawn : updateAttribFinal( "+ base + " )");
let bs = _.isString( base ) ? base : (base[ "sourceAttribute"].slice(0, 1).toUpperCase() + base[ "sourceAttribute"].slice(1, 3)),
efct = bs + "-Effect";
getAttrs( [ bs + "-Step", bs + "-Mods", efct, bs, "Adjust-Effect-Tests-Total",
@@ -14151,7 +14151,7 @@ var repEquipped = function fnrepEquipped( eventInfo ) {
vals={"Armor-Phys":0 ,"Armor-Myst" : 0, "Armor-IP":0 , "Shield-Phys":0, "Shield-Myst":0, "Shield-IP":0}, //If we don't find any better values, we will reset
nb=[0,0,0,0], // [nb shield, nb shield equipped, nb armor, nb full armor equipped
n=0;
- // log("eq " + eq + " pre3 "+ pre3);
+ //log("eq " + eq + " pre3 "+ pre3);
for(let i=0; i < idarray.length; i++){
@@ -14194,7 +14194,7 @@ var repEquipped = function fnrepEquipped( eventInfo ) {
if(eq==2){ //Finally deal with initialization of a new line...
if((!p && n==0 ) || (p && nb[3]==0) ){ //there is no line equipped, equip
- // log("equipping because first time")
+ //log("equipping because first time")
vals[pre+"Type_max"]="1";
eq=1;
}
@@ -14365,7 +14365,7 @@ on("change:recovery-tests_max change:wound-threshold change:damage-death-rating
var updateKnockdown = function fnUpdateKnockdown(eventInfo,cb) {
'use strict';
try{
- // log ( "EarthDawn : updateInitiative() ");
+ //log( "EarthDawn : updateInitiative() ");
getAttrs([ "Str-Step", "Knockdown-Adjust", "Knockdown" , "Knockdown-addSR" , "SrRating"], function gaUpdateKnockdown(values) {
'use strict';
logvalues( values);
@@ -14394,7 +14394,7 @@ on("change:knockdown change:knockdown-addsr" , fn(updateKnockdown) );
var updateInitiative = function fnUpdateInitiative(eventInfo,cb) {
'use strict';
try{
- // log ( "EarthDawn : updateInitiative() ");
+ //log( "EarthDawn : updateInitiative() ");
getAttrs([ "Initiative", "Initiative-Step", "Initiative-addSR","SrRating", "Initiative-Mod-Auto", "Dex-Step", "Dex-Mods", "Adjust-Effect-Tests-Total", "Initiative-Adjust","Initiative-Auto-Adjust", "Initiative-Mods", "IP", "Creature-Ambushing_max", "Creature-Ambushing" ], function gaUpdateInitiative(values) {
'use strict';
logvalues( values);
@@ -14431,7 +14431,7 @@ on("change:initiative-step change:initiative-addsr" , fn(updateInitiative) );
var updateIP = function fnUpdateIP() {
'use strict';
try{
- // log ( "EarthDawn : updateIP() ");
+ //log( "EarthDawn : updateIP() ");
getAttrs([ "Armor-IP", "Shield-IP", "Misc-IP-Mod", "Misc-IP-Adjust" ], function gaUpdateIP(values) { //, "condition-NoShield"
'use strict';
logvalues( values);
@@ -14458,7 +14458,7 @@ var updateKarma = function fnUpdateKarma(eventInfo,cb) {
let currval= getInt(values,"Karma_max");
// if ( getEdition( values ) == 4 && getInt( values, "Karma-Modifier" ) != 0) { // NB : Prior to 4th edition, Karma depends on Karmic Ritual rank, so is entered manually in those versions of the sheet. Also, if karma modifier is zero (because race is not selected or is "Other", don't set anything since for Dragons we directly enter values we don't want overwritten.
let val = ((getInt( values, "Karma-Modifier")+getInt( values, "Karma-Modifier-Adjust")) * getInt( values, "working-Circle")) + getInt( values, "Misc-Karma-max-Adjust") + getInt( values, "Attrib-Karma-Orig") ;
- //log ( "currval " + currval + " val "+ val + val)
+ //log( "currval " + currval + " val "+ val + val)
if( val < 0 )
val = 0;
if( !backfill && val != currval) //Normal case, we want to adjust Karma_max
@@ -14483,7 +14483,7 @@ on("change:karma_max change:karma-modifier change:karma-modifier-adjust change:w
var updateLpStatus = function fnUpdateLpStatus() {
'use strict';
try{
- // log ( "EarthDawn : updateLpStatus() ");
+ //log( "EarthDawn : updateLpStatus() ");
getAttrs([ "LP-Total", "LP-Status" , "LP-Reputation"], function gaUpdateLpStatus(values) {
'use strict';
logvalues( values);
@@ -14509,7 +14509,7 @@ on("change:lp-total", fn(updateLpStatus) );
var updateMaBase = function fnupdateMaBase(eventInfo,cb) {
'use strict';
try{
- //log ( "EarthDawn : updateMaBase() ");
+ //log( "EarthDawn : updateMaBase() ");
getAttrs([ "Attrib-Wil-Curr", "MA-Base", "edition" ], function gaupdateMaBase(values) {
'use strict';
logvalues( values);
@@ -14548,7 +14548,7 @@ var calcED3Defense = function fnCalcED3Defense(value) { // function used to calc
var updateMD = function fnUpdateMD() {
'use strict';
try{
- // log ( "EarthDawn : updateMD() ");
+ //log( "EarthDawn : updateMD() ");
getAttrs([ "MD-Nat", "MD-Buff", "Defense-Myst-Adjust", "Shield-Myst", "Shield-Myst-Buff", "condition-Blindsided", "Adjust-Defenses-Total", "edition", "MD" ], function gaUpdateMD(values) { //"condition-NoShield",
'use strict';
logvalues( values);
@@ -14576,7 +14576,7 @@ on("change:md-nat change:defense-myst-adjust change:md-buff change:shield-myst c
var updateMovement = function fnUpdateMovement() {
'use strict';
try{
- // log ( "EarthDawn : updateMovement() ");
+ //log( "EarthDawn : updateMovement() ");
getAttrs([ "Fly-Movement", "Fly-Movement-Race", "Misc-Fly-Movement-Adjust", "Movement", "Movement-Race", "Misc-Movement-Adjust", "Movement-Buff", "condition-ImpairedMovement",
"condition-KnockedDown" ], function gaUpdateMovement(values) {
'use strict';
@@ -14613,7 +14613,7 @@ on("change:fly-movement-race change:misc-fly-movement-adjust change:movement-rac
var updateMysticArmor = function fnUpdateMysticArmor() {
'use strict';
try{
- // log ( "EarthDawn : updateMysticArmor() ");
+ //log( "EarthDawn : updateMysticArmor() ");
getAttrs([ "Armor-Myst", "MA-Buff", "Armor-Myst-Adjust", "MA-Nat", "condition-Blindsided", "Shield-Myst", "edition" , "Mystic-Armor", "Shield-Myst-Buff"], function gaUpdateMysticArmor(values) { //, "condition-NoShield"
'use strict';
logvalues( values);
@@ -14634,7 +14634,7 @@ on("change:armor-myst change:ma-buff change:armor-myst-adjust change:ma-nat chan
var updateDefensebase = function fnUpdateDefensebase( attr, def,cb) {
'use strict';
try{
- //log ( "EarthDawn : updateDefensebase( " + attr + " , " + def + " )");
+ //log( "EarthDawn : updateDefensebase( " + attr + " , " + def + " )");
let attrib = "Attrib-" + attr + "-Curr",
defense = def + "-Base";
let vals = {};
@@ -14667,7 +14667,7 @@ var updateDefenseNatural = function fnUpdateDefenseNatural( eventInfo , cb) {
try{
let att =getAttrib(eventInfo).toLowerCase();
let vals = {};
- //log ( "EarthDawn : updateDefenseNatural( " + att + " )");
+ //log( "EarthDawn : updateDefenseNatural( " + att + " )");
let att2, att3, att4, att5,backfill, defAdjust = 0;
if(safeString( att ).endsWith("-nat")) { //This is a potentially a backfill
if(eventInfo && !_.isString(eventInfo) && eventInfo.sourceType=="player") backfill=true;
@@ -14705,7 +14705,7 @@ var updateDefenseNatural = function fnUpdateDefenseNatural( eventInfo , cb) {
else vals[ att4 ] = getInt(values, att4 ) + getInt(values, att3 + "-Nat") - val;
}
setAttrsLog( vals, null , function(){
- // log ( "EarthDawn : updateDefenseNatural( " + att + " )" + " returning " +JSON.stringify(vals));
+ //log( "EarthDawn : updateDefenseNatural( " + att + " )" + " returning " +JSON.stringify(vals));
if(cb) cb();
});
});
@@ -14726,7 +14726,7 @@ on("change:pd-nat-addsr change:md-nat-addsr change:sd-nat-addsr change:pa-nat-ad
var updatePD = function fnUpdatePD() {
'use strict';
try{
- // log ( "EarthDawn : updatePD() ");
+ //log( "EarthDawn : updatePD() ");
getAttrs([ "PD-Nat", "PD-Buff","Adjust-Defenses-Total", "Defense-Phys-Adjust", "Shield-Phys", "Shield-Phys-Buff", "condition-Blindsided", "edition", "PD" ], function gaUpdatePD(values) { //"condition-NoShield",
'use strict';
logvalues( values);
@@ -14754,7 +14754,7 @@ on("change:pd-nat change:pd-buff change:defense-phys-adjust change:shield-phys c
var updatePhysicalArmor = function fnUpdatePhysicalArmor() {
'use strict';
try{
- // log ( "EarthDawn : updatePhysicalArmor() ");
+ //log( "EarthDawn : updatePhysicalArmor() ");
getAttrs([ "Armor-Phys", "PA-Buff", "Armor-Phys-Adjust", "PA-Nat", "condition-Blindsided", "Shield-Phys", "Shield-Phys-Buff", "edition", "Physical-Armor" ], function gaUpdatePhysicalArmor(values) { //, "condition-NoShield"
'use strict';
logvalues( values);
@@ -14797,7 +14797,7 @@ var updateRace = function fnUpdateRace(eventInfo,data,cb) { // Race based modifi
//singleAttr was useful for an unknown roll20 bug, but it doesn't seem to happen in this function. Left as a backup
function singleAttr( key, val) {
//let vals={};
- // log("setting key " + key + " to " + val);
+ //log("setting key " + key + " to " + val);
vals[ key ] = val;
//setAttrsLog( vals );
}
@@ -14940,7 +14940,7 @@ on("change:race change:npc", fn(updateRace) );
var updateRecovery = function fnUpdateRecovery(eventInfo,cb) {
'use strict';
try{
- // log ( "EarthDawn : updateRecovery() ");
+ //log( "EarthDawn : updateRecovery() ");
getAttrs([ "Recovery-Step", "Tou-Step","Tou-Mods","Adjust-Effect-Tests-Total", "Recovery-Adjust", "Recovery-Buff", "Wounds", "Creature-Fury", "Total-ResistPain" ], function gaUpdateRecovery(values) {
'use strict';
logvalues( values);
@@ -14965,7 +14965,7 @@ on("change:tou-effect change:recovery-adjust change:recovery-buff", fn(updateRec
var updateSD = function fnUpdateSD() {
'use strict';
try{
- // log ( "EarthDawn : updateSD() ");
+ //log( "EarthDawn : updateSD() ");
getAttrs([ "SD-Nat","Defense-Soc-Adjust", "SD-Buff", "SD" ], function gaUpdateSD(values) {
'use strict';
logvalues( values);
@@ -15041,7 +15041,7 @@ var updateTalentSummary = function fnupdateTalentSummary() {
'use strict';
try{
var attarray = ["uatta","edition"];
- // log ( "EarthDawn : updateTalentSummary() ");
+ //log( "EarthDawn : updateTalentSummary() ");
getSectionIDs("repeating_matrix", function gsIdRepeatingMatrix(marray) {
for( let i = 0; i < marray.length; i++) {
attarray.push( buildPre( "SPM", marray[ i ] ) + "Rank");
@@ -15251,7 +15251,7 @@ on("change:combatoption-splitmovement", fn(CoSplitMovement) );
var updateDurability = function fnupdateDurability(eventInfo,cb) {
'use strict';
try{
- //log ( "EarthDawn : updateDurability() " + JSON.stringify(eventInfo));
+ //log( "EarthDawn : updateDurability() " + JSON.stringify(eventInfo));
// Go through all the discipline ranks and calculate durability.
getSectionIDs("repeating_discipline", function gsIdRepeatingDiscipline(darray) {
let i;
@@ -17537,7 +17537,7 @@ on("clicked:settalentdefault", fn(function ocSetTalentDefault() {
pre=buildPre("NAC",values[prev+"RowID"]); //non vandalized
let links = values[prev+"Linked"];
if (links){ // This section is for importing links. Up to v2, only Knacks had links and links were unidirectional
- log ("links before sanitizing" + links) ;
+ //log("links before sanitizing" + links) ;
links = safeString( links ).replace( /[\{|\(|\)|\@|\}]/gi, ""); //Sanitizing.links if it exists is in the form of an autocalc i.e (@{fully_qualifiedname}+@{fully_qualifiedname}). After sanitizing they will be fully_qualifiedname+fully_qualifiedname
linkArray=safeString( links ).split("+");// Now we split the list by +, so we get an array [ fully_qualifiedname,fully_qualifiedname]
for(j=0;j= 2 && cmin<=1 && ddata.Type=="Discipline") { //This way of counting the multidisciplining is discontinued
- // log("recording multidisciplining");
+ //log("recording multidisciplining");
// vals["LP-D"+nbdisc+"-Talents"]=multinb;
// vals["LP-D"+nbdisc+"-Circle"]=mincircle;
// }
@@ -20493,7 +20493,7 @@ var updateLPSummary = function fnupdateLPSummary() {
let statarray = ["Dex","Str","Tou","Per","Wil","Cha"];
let attarray = ["Attrib-Dex-Increases","Attrib-Str-Increases","Attrib-Tou-Increases","Attrib-Per-Increases","Attrib-Wil-Increases","Attrib-Cha-Increases","LP-CreationOffset","LP-CreationOffset-Spells","LS-Speak-Rank","LS-ReadWrite-Rank","LP-Current","LP-Total", "LP-SpellsOption","Per-Step","NbDisc","LP-AttribOption","LP-Extra-Cost","LP-D2-Circle","LP-D3-Circle","LP-D4-Circle","LP-D2-Talents","LP-D3-Talents","LP-D4-Talents"];
- //log ( "EarthDawn : updateLPSummary() ");
+ //log( "EarthDawn : updateLPSummary() ");
getSectionIDs("repeating_matrix", function gsIdRepeatingMatrix(marray) {
for( let i = 0; i < marray.length; i++) {
attarray.push( buildPre( "SPM", marray[ i ] ) + "Rank");
@@ -21092,7 +21092,6 @@ var AutoFill = function fnAutoFill(eventInfo,trigger,nm,data,comp_data) {
if(!found) { //Using the local database
if(trigger2=="player") vals[ pre+"buttonInfo"]= ""; //If there was a button info, reset it.
- //if(nm && safeString( nm ).toLowerCase().includes("thread")) log("Autofill "+nm+ "no match in compendium" )
// if (att==="" || eventInfo["sourceType"] !=="player") return;
@@ -22033,13 +22032,10 @@ var AutoFill = function fnAutoFill(eventInfo,trigger,nm,data,comp_data) {
}
if(found) {
//log("Earthdawn Autofill found it in local database" + JSON.stringify(entry));
- //if(nm && safeString( nm ).toLowerCase().includes("thread")) log("Autofill "+nm+ " found match in local database" )
entry=mergeJSON(data,entry); //merge the JSON with priority on the import
source="local";
}
- //if(nm && safeString( nm ).toLowerCase().includes("thread")) log("Autofill "+nm+ " testing the Abilityadd " + found + " trigger "+trigger + " data "+JSON.stringify(data));
-
if(!found && trigger=="AbilityAdd" && data) //For an add ability, fall back to the JSON if not found somewhere else {
{
entry=data;
@@ -22297,7 +22293,8 @@ var AutoFill = function fnAutoFill(eventInfo,trigger,nm,data,comp_data) {
if( entry.roll20_Attribute) val-= getInt(values, (safeString( entry.roll20_Attribute ).trim() + "-Step"));
if( code=="WPN" ) val-= getInt(values,"Str-Step");
//log("addSR " +entry.Name + " val "+ val + " data " +JSON.stringify(entry));
- //if( entry.roll20_Attribute) log("Attribute " +entry.Name + " Attribute name is "+(entry.roll20_Attribute.trim() + "-Step")+ " "+getInt(values, (entry.roll20_Attribute + "-Step")));
+ //if( entry.roll20_Attribute)
+ //log("Attribute " +entry.Name + " Attribute name is "+(entry.roll20_Attribute.trim() + "-Step")+ " "+getInt(values, (entry.roll20_Attribute + "-Step")));
singleAttr( "Rank", val);
} else if(safeString( tf ).match( new RegExp(rgMove,"i"))){
//log("Move "+tname);
@@ -22335,8 +22332,6 @@ var AutoFill = function fnAutoFill(eventInfo,trigger,nm,data,comp_data) {
let val=getInt(entry,"Step");
if( entry.roll20_Attribute && !stepisrank) val-= getInt(values, (safeString( entry.roll20_Attribute ).trim() + "-Step"));
if( code=="WPN" ) val-= getInt(values,"Str-Step");
- //if( code=="WPN" ) log("Step Calculation for Damage, Step was " + getInt(entry,"Step") + " substracting Str " + getInt(values,"Str-Step"));
- //if( entry.roll20_Attribute) log("Attribute " +entry.Name + " Attribute name is "+(entry.roll20_Attribute.trim() + "-Step")+ " "+getInt(values, (entry.roll20_Attribute + "-Step")));
if(entry.Rank) singleAttr("Rank-Adjust",val - getInt(entry,"Rank")); //We were given a Rank, let's use it
else if(entry.roll20_Rank_Adjust) singleAttr("Rank",val - getInt(entry,"roll20_Rank_Adjust")); //There is a rank adjustment, potentially from the Talent/Power description
@@ -22491,7 +22486,7 @@ var updateKnackSummary = function fnupdateKnackSummary() {
vals=[],
dfltrk,dflt,
maxvalue=0,filtered,knackn,knacklist,entry;
- // log ( "EarthDawn : updateKnackSummary() ");
+ //log( "EarthDawn : updateKnackSummary() ");
let knarray=[]; // All the knacks already known
let talentarray=[],spellarray=[]; //List of all that will have to be tested for knacks
@@ -25623,7 +25618,7 @@ var CompendiumDropMgt = function fnCompendiumDropMgt(eventInfo) {
if(fnd && fnd[1]) entry.Step=safeString( fnd[1] ).trim();
entry.Rank=dmgrk;
wpnArray.push( entry);
- log ("fnd " + JSON.stringify(fnd));
+ //log("fnd " + JSON.stringify(fnd));
} else
errlog( "ED.textImport.Damage: unable to parse: '" + dmgarr[ i ] + "' of " + t);
}
@@ -25989,7 +25984,7 @@ var CompendiumDropMgt = function fnCompendiumDropMgt(eventInfo) {
if( l != -1 ) nm = toCheck.slice( 0, l);
if( nm.search( /\(.*?Opponent.*?\)/i ) !== -1) opponent = true; // The word Opponent anywhere inside of parentheses.
//nm = safeString( nm ).replace( /Opponent\,*/gi, "" ); // remove the word Opponent
- //log ("Opponent " + (opponent ? "-1" : "1"));
+ //log("Opponent " + (opponent ? "-1" : "1"));
mandata={Name:nm , Type: (opponent ? "-1" : "1")}
if(l != -1 ) mandata.Description=toCheck.slice( l+1);
//nm = safeString( nm ).replace( new RegExp( "(" + safeString( name ).replace(",", "|" ).replace( /\s+/g, "") + ")+"+"[\s\,]*", "gi" ), ""); // remove creature name
@@ -27231,9 +27226,9 @@ on("clicked:tab clicked:tab-spells clicked:tab-grim clicked:tab-adjust clicked:t
}
} else { //A couple of masks add tranmple with the damage max
if(mult>0) { // We need to deal with a very special case where it is referred as highest attack and highest damage
- // log("processing exceptional attack " + atkmax + " dmg " + dmgmax);
- // log("details dmg " + dmgmax + " " + getInt(arr[j],"Dmg_Step"));
- // log("details atk " + atkmax + " " + getInt(arr[j],"Atk_Step"));
+ //log("processing exceptional attack " + atkmax + " dmg " + dmgmax);
+ //log("details dmg " + dmgmax + " " + getInt(arr[j],"Dmg_Step"));
+ //log("details atk " + atkmax + " " + getInt(arr[j],"Atk_Step"));
let nm=safeString( arr[j]["Name"] ).trim();
let datacopy={},datacopy2={};
@@ -27664,7 +27659,7 @@ on("clicked:transacupdateall", fn(function ocTransacUpdateAll() {
var updateLPTransac = function fnupdateLPTransac(eventInfo) {
'use strict';
try{
- //log ( "updateLPTransac() " + JSON.stringify(eventInfo));
+ //log( "updateLPTransac() " + JSON.stringify(eventInfo));
let att = getAttrib(eventInfo)||"";
let attlc=att.toLowerCase();
@@ -28707,7 +28702,7 @@ var updateTalentNameFilter = function fnupdateTalentNameFilter() {
'use strict';
try{
var attarray = ["TalentNameFilter"];
- //log ( "EarthDawn : updateTalentNameFilter() ");
+ //log( "EarthDawn : updateTalentNameFilter() ");
getSectionIDs("repeating_talents", function gsIdRepeatingTalents(tarray) {
for( let i = 0; i < tarray.length; i++) attarray.push( buildPre( "T", tarray[ i ] ) + "Name");
@@ -28753,7 +28748,7 @@ var updateSpellNameFilter = function fnupdateSpellNameFilter() {
'use strict';
try{
var attarray = ["SpellNameFilter"];
- //log ( "EarthDawn : updateTalentNameFilter() ");
+ //log( "EarthDawn : updateTalentNameFilter() ");
getSectionIDs("repeating_spell", function gsIdRepeatingSpells(nacarray) {
for( let i = 0; i < nacarray.length; i++){
From 560edc46924d86bbc4fddc7710a8cc864920bb7c Mon Sep 17 00:00:00 2001
From: Jiboux <72362918+Jiboux@users.noreply.github.com>
Date: Mon, 17 Feb 2025 21:28:40 -0500
Subject: [PATCH 3/3] EDV343
---
Earthdawn (FASA Official)/Earthdawn.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Earthdawn (FASA Official)/Earthdawn.html b/Earthdawn (FASA Official)/Earthdawn.html
index c2b2ffd197..310f5d2db9 100644
--- a/Earthdawn (FASA Official)/Earthdawn.html
+++ b/Earthdawn (FASA Official)/Earthdawn.html
@@ -3559,7 +3559,7 @@ Largerly using material from the work on the Official FASA version of Chris Dick