`
+ newEntry += `
`
newEntry += `${getIcon("icons", iconName)}`
newEntry += `
`;
newEntry += `
${header}
`
@@ -15403,8 +15479,10 @@ function autoEffectTranslateMessage(message) {
}
/* Whispers an error message to the user detailing an AutoEffect error */
-function autoEffectErrorMessage(errorString, autoEffect) {
- console.log(errorString + autoEffect)
+function autoEffectErrorMessage(errorType, errorString, AutoEffect) {
+ AutoEffect = AutoEffect.join(" ").replace("Unknown: ","");
+ errorMessage = `(${AutoEffect}) - ${errorString}`
+ return { errorType: errorType, errorMessage: errorMessage, error: true};
}
/* Creates a new conditional button*/
@@ -15426,6 +15504,7 @@ function resetConditionals() {
}
function autoEffectCustomMessage(AutoEffect, messageValues = {}) {
+ if (AutoEffect.length > 2) { AutoEffect.slice(3).forEach(option => { if (!["checksuccess", "checkfailure", "checkignore"].includes(option.toLowerCase())) { return autoEffectErrorMessage("Invalid Option", `Option "${option}" is not a valid option`, AutoEffect); } }); }
let messageFormat = "";
let checkResultOption = "success";
@@ -15463,8 +15542,11 @@ function autoEffectCustomMessage(AutoEffect, messageValues = {}) {
}
function autoEffectRequire(AutoEffect, ailmentList, barList, barDamageList) {
+ let returnValues = {};
+
/* Check format */
- if (AutoEffect.length < 3 || AutoEffect.length > 5) { autoEffectErrorMessage(`Expected format: (Require N #Ailment/#Bar/#BarDamage #Scaling(optional) #Silent(optional))`, AutoEffect); return {error: true}; }
+ if (AutoEffect.length < 3 || AutoEffect.length > 5) { return autoEffectErrorMessage("Format Error", `Expected format: (Require N #Ailment/#Bar/#BarDamage #Scaling(optional) #Silent(optional))`, AutoEffect); }
+ if (AutoEffect.length > 3) { AutoEffect.slice(3).forEach(option => { if (!["scaling", "silent"].includes(option.toLowerCase())) { returnValues = autoEffectErrorMessage("Invalid Option", `Option "${option}" is not a valid option`, AutoEffect); } }); }
/* Get target count */
let effectName = AutoEffect[2];
@@ -15475,7 +15557,7 @@ function autoEffectRequire(AutoEffect, ailmentList, barList, barDamageList) {
else if (barList.hasOwnProperty(effectName)) { count = barList[effectName]; }
/* Handle bar damage count */
else if (barDamageList.hasOwnProperty("-" + effectName)) { count = barDamageList[effectName]; }
- else { autoEffectErrorMessage(`Ailment, Bar or BarDamage "${effectName}" does not exist`, AutoEffect); return {error: true}; }
+ else { return autoEffectErrorMessage("Invalid Target", `Ailment, Bar or BarDamage "${effectName}" does not exist`, AutoEffect); }
/* Get required value. Recalculate count if percentage */
let effectVal = AutoEffect[1];
@@ -15494,11 +15576,10 @@ function autoEffectRequire(AutoEffect, ailmentList, barList, barDamageList) {
}
effectVal = barMax*percentage;
}
- else { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number or percentage`, AutoEffect); return {error: true}; }
+ else { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number or percentage`, AutoEffect); }
/* Handle the optional scaling property */
let scaling = 1;
- let returnValues = {};
if (AutoEffect[3] != undefined) {
if (AutoEffect[3].toLowerCase() == "scaling") {
scaling = Math.floor(count/effectVal);
@@ -15532,12 +15613,15 @@ function autoEffectRequire(AutoEffect, ailmentList, barList, barDamageList) {
}
function autoEffectConsume(AutoEffect, ailmentList, barList) {
- /* Check format */
- if (AutoEffect.length < 3 || AutoEffect.length > 5) { autoEffectErrorMessage(`Expected format: (Consume N #Ailment/#Bar #Scaling(optional) #Silent(optional))`, AutoEffect); return {error: true}; }
+ let returnValues = {};
+ /* Check format */
+ if (AutoEffect.length < 3 || AutoEffect.length > 5) { return autoEffectErrorMessage("Format Error", `Expected format: (Consume N #Ailment/#Bar #Scaling(optional) #Silent(optional))`, AutoEffect); }
+ if (AutoEffect.length > 3) { AutoEffect.slice(3).forEach(option => { if (!["scaling", "silent"].includes(option.toLowerCase())) { returnValues = autoEffectErrorMessage("Invalid Option", `Option "${option}" is not a valid option`, AutoEffect); } }); }
+
/* Get consumed value */
let effectVal = parseInt(Math.abs(AutoEffect[1]));
- if (isNaN(effectVal) == true) { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number`, AutoEffect); return {error: true}; }
+ if (isNaN(effectVal) == true) { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number`, AutoEffect); }
let count = 0;
/* Get target */
@@ -15555,11 +15639,10 @@ function autoEffectConsume(AutoEffect, ailmentList, barList) {
effectTarget = effectName;
count = barList[effectName];
}
- else { autoEffectErrorMessage(`Ailment or Bar "${effectName}" does not exist`, AutoEffect); return {error: true}; }
+ else { return autoEffectErrorMessage("Invalid Target", `Ailment or Bar "${effectName}" does not exist`, AutoEffect); }
/* Handle the optional scaling property */
let scaling = 1;
- let returnValues = {};
if (AutoEffect[3] != undefined) {
if (AutoEffect[3].toLowerCase() == "scaling") {
scaling = Math.floor(count/effectVal);
@@ -15600,29 +15683,32 @@ function autoEffectConsume(AutoEffect, ailmentList, barList) {
}
function autoEffectAilment(AutoEffect, ailmentList, scaling, settingLimbusStyle) {
+ let returnValues = {};
+
/* Check if Gain, Inflict or Give */
let autoEffectVariant = "";
switch (AutoEffect[0]) {
case "Gain": autoEffectVariant = "Gain"; break;
case "Inflict": autoEffectVariant = "Inflict"; break;
case "Give": autoEffectVariant = "Give"; break;
- default: autoEffectErrorMessage(`${AutoEffect[0]} is not a valid AutoEffect`, AutoEffect); return {error: true}
+ default: return autoEffectErrorMessage("Invalid AutoEffect", `${AutoEffect[0]} is not a valid AutoEffect`, AutoEffect);
}
/* Check format */
- if (AutoEffect.length < 3 || AutoEffect.length > 6) { autoEffectErrorMessage(`Expected format: (${autoEffectVariant} N #Ailment #Round(optional) #Silent(optional))`, AutoEffect); return {error: true}; }
-
+ if (AutoEffect.length < 3 || AutoEffect.length > 6) { return autoEffectErrorMessage("Format Error", `Expected format: (${autoEffectVariant} N #Ailment #Round(optional) #Silent(optional))`, AutoEffect); }
+ if (AutoEffect.length > 3) { AutoEffect.slice(3).forEach(option => { if (!["this", "next", "thisround", "nextround", "thisturn", "nextturn", "turn", "round", "silent"].includes(option.toLowerCase())) { returnValues = autoEffectErrorMessage("Invalid Option", `Option "${option}" is not a valid option`, AutoEffect); } }); }
+
/* Handle scaling */
AutoEffect[1] *= scaling;
if (scaling == 0) { return {}; }
/* Get ailment name */
let effectAilment = AutoEffect[2];
- if (!ailmentList.hasOwnProperty(effectAilment)) { autoEffectErrorMessage(`Ailment "${effectAilment}" does not exist`, AutoEffect); return {error: true}; }
+ if (!ailmentList.hasOwnProperty(effectAilment)) { return autoEffectErrorMessage("Invalid Target", `Ailment "${effectAilment}" does not exist`, AutoEffect); }
/* Get values */
let effectVal = parseInt(Math.abs(AutoEffect[1]));
- if (isNaN(effectVal) == true) { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number`, AutoEffect); return {error: true}; }
+ if (isNaN(effectVal) == true) { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number`, AutoEffect); }
let count = ailmentList[effectAilment][1];
/* Handle the optional turn override */
@@ -15665,14 +15751,15 @@ function autoEffectAilment(AutoEffect, ailmentList, scaling, settingLimbusStyle)
messageValues = { effectTarget: effectIcon, effectVal: effectVal/scaling, effectCount: count, scaling: scaling, checkResult: "success", settingLimbusStyle: settingLimbusStyle }
/* Execute AutoEffect */
- let returnValues = { message: message, messageValues: messageValues };
+ returnValues = {...returnValues, message: message, messageValues: messageValues };
if (autoEffectVariant == "Gain") { returnValues = { ...returnValues, [effectTarget]: parseInt(effectVal), count: parseInt(count) } }
return returnValues;
}
function autoEffectSetBar(AutoEffect, barList, scaling) {
/* Check format */
- if (AutoEffect.length < 3 || AutoEffect.length > 4) { autoEffectErrorMessage(`Expected format: (Set N #Bar #Silent(optional))`, AutoEffect); return {error: true}; }
+ if (AutoEffect.length < 3 || AutoEffect.length > 4) { return autoEffectErrorMessage("Format Error", `Expected format: (Set N #Bar #Silent(optional))`, AutoEffect); }
+ if (AutoEffect.length > 3) { if (AutoEffect[3].toLowerCase() != "silent") { return autoEffectErrorMessage("Invalid Option", `Option "${AutoEffect[3]}" is not a valid option`, AutoEffect); } }
/* Handle scaling */
AutoEffect[1] *= scaling;
@@ -15680,7 +15767,7 @@ function autoEffectSetBar(AutoEffect, barList, scaling) {
/* Get value */
let effectVal = parseInt(Math.abs(AutoEffect[1]));
- if (isNaN(effectVal) == true) { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number`, AutoEffect); return {error: true}; }
+ if (isNaN(effectVal) == true) { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number`, AutoEffect); }
let count = 0;
/* Get target */
@@ -15690,7 +15777,7 @@ function autoEffectSetBar(AutoEffect, barList, scaling) {
effectTarget = effectBar.replace("ST", "StagRes");
count = barList[effectBar];
}
- else { autoEffectErrorMessage(`Bar "${effectBar}" does not exist`, AutoEffect); return {error: true}; }
+ else { return autoEffectErrorMessage("Invalid Target", `Bar "${effectBar}" does not exist`, AutoEffect); }
/* Handle message */
let message = "";
@@ -15707,7 +15794,8 @@ function autoEffectSetBar(AutoEffect, barList, scaling) {
}
function autoEffectAddBar(AutoEffect, barList, scaling) {
/* Check format */
- if (AutoEffect.length < 3 || AutoEffect.length > 4) { autoEffectErrorMessage(`Expected format: (Add N #Bar #Silent(optional))`, AutoEffect); return {error: true}; }
+ if (AutoEffect.length < 3 || AutoEffect.length > 4) { return autoEffectErrorMessage("Format Error", `Expected format: (Add N #Bar #Silent(optional))`, AutoEffect); }
+ if (AutoEffect.length > 3) { if (AutoEffect[3].toLowerCase() != "silent") { return autoEffectErrorMessage("Invalid Option", `Option "${AutoEffect[3]}" is not a valid option`, AutoEffect); } }
/* Handle scaling */
AutoEffect[1] *= scaling;
@@ -15715,7 +15803,7 @@ function autoEffectAddBar(AutoEffect, barList, scaling) {
/* Get value */
let effectVal = parseInt(AutoEffect[1]);
- if (isNaN(effectVal) == true) { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number`, AutoEffect); return {error: true}; }
+ if (isNaN(effectVal) == true) { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number`, AutoEffect); }
let count = 0;
/* Get target */
@@ -15725,7 +15813,7 @@ function autoEffectAddBar(AutoEffect, barList, scaling) {
effectTarget = effectBar.replace("ST", "StagRes");
count = barList[effectBar];
}
- else { autoEffectErrorMessage(`Bar "${effectBar}" does not exist`, AutoEffect); return {error: true}; }
+ else { return autoEffectErrorMessage("Invalid Target", `Bar "${effectBar}" does not exist`, AutoEffect); }
/* Handle message */
let message = "";
@@ -15743,7 +15831,8 @@ function autoEffectAddBar(AutoEffect, barList, scaling) {
}
function autoEffectMultiBar(AutoEffect, barList, scaling) {
/* Check format */
- if (AutoEffect.length < 3 || AutoEffect.length > 4) { autoEffectErrorMessage(`Expected format: (Multi N #Bar #Silent(optional))`, AutoEffect); return {error: true}; }
+ if (AutoEffect.length < 3 || AutoEffect.length > 4) { return autoEffectErrorMessage("Format Error", `Expected format: (Multi N #Bar #Silent(optional))`, AutoEffect); }
+ if (AutoEffect.length > 3) { if (AutoEffect[3].toLowerCase() != "silent") { return autoEffectErrorMessage("Invalid Option", `Option "${AutoEffect[3]}" is not a valid option`, AutoEffect); } }
/* Handle scaling */
AutoEffect[1] *= scaling;
@@ -15751,7 +15840,7 @@ function autoEffectMultiBar(AutoEffect, barList, scaling) {
/* Get value */
let effectVal = parseFloat(Math.abs(AutoEffect[1]));
- if (isNaN(effectVal) == true) { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number`, AutoEffect); return {error: true}; }
+ if (isNaN(effectVal) == true) { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number`, AutoEffect); }
/* Get target */
let effectBar = AutoEffect[2];
@@ -15760,7 +15849,7 @@ function autoEffectMultiBar(AutoEffect, barList, scaling) {
effectTarget = effectBar.replace("ST", "StagRes");
count = barList[effectBar];
}
- else { autoEffectErrorMessage(`Bar "${effectBar}" does not exist`, AutoEffect); return {error: true}; }
+ else { return autoEffectErrorMessage("Invalid Target", `Bar "${effectBar}" does not exist`, AutoEffect); }
/* Handle message */
let message = "";
@@ -15783,11 +15872,12 @@ function autoEffectDice(AutoEffect, scaling) {
case "DicePower": autoEffectVariant = "DicePower"; break;
case "DiceMax": autoEffectVariant = "DiceMax"; break;
case "DiceCount": autoEffectVariant = "DiceCount"; break;
- default: autoEffectErrorMessage(`${AutoEffect[0]} is not a valid AutoEffect`, AutoEffect); return {error: true}
+ default: return autoEffectErrorMessage("Invalid AutoEffect", `${AutoEffect[0]} is not a valid AutoEffect`, AutoEffect);
}
/* Check format */
- if (AutoEffect.length < 2 || AutoEffect.length > 3) { autoEffectErrorMessage(`Expected format: (${autoEffectVariant} N #Silent(optional))`, AutoEffect); return {error: true}; }
+ if (AutoEffect.length < 2 || AutoEffect.length > 3) { return autoEffectErrorMessage("Format Error", `Expected format: (${autoEffectVariant} N #Silent(optional))`, AutoEffect); }
+ if (AutoEffect.length > 2) { if (AutoEffect[2].toLowerCase() != "silent") { return autoEffectErrorMessage("Invalid Option", `Option "${AutoEffect[2]}" is not a valid option`, AutoEffect); } }
/* Handle scaling */
AutoEffect[1] *= scaling;
@@ -15795,7 +15885,7 @@ function autoEffectDice(AutoEffect, scaling) {
/* Get values */
let effectVal = parseInt(AutoEffect[1]);
- if (isNaN(effectVal) == true) { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number`, AutoEffect); return {error: true}; }
+ if (isNaN(effectVal) == true) { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number`, AutoEffect); }
/* Handle message */
let message = "";
@@ -15814,7 +15904,8 @@ function autoEffectDice(AutoEffect, scaling) {
function autoEffectChallengeRoll(AutoEffect, scaling) {
/* Check format */
- if (AutoEffect.length < 3 || AutoEffect.length > 3 ) { autoEffectErrorMessage(`Expected format: (ChallengeRoll #Stat N #Silent(optional))`, AutoEffect); return {error: true}; }
+ if (AutoEffect.length < 3 || AutoEffect.length > 3 ) { return autoEffectErrorMessage("Format Error", `Expected format: (ChallengeRoll #Stat N #Silent(optional))`, AutoEffect); }
+ if (AutoEffect.length > 3) { if (AutoEffect[3].toLowerCase() != "silent") { return autoEffectErrorMessage("Invalid Option", `Option "${AutoEffect[3]}" is not a valid option`, AutoEffect); } }
/* Handle scaling */
AutoEffect[2] *= scaling;
@@ -15822,14 +15913,14 @@ function autoEffectChallengeRoll(AutoEffect, scaling) {
/* Get values */
let effectVal = parseInt(AutoEffect[2]);
- if (isNaN(effectVal) == true) { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number`, AutoEffect); return {error: true}; }
+ if (isNaN(effectVal) == true) { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number`, AutoEffect); }
/* Get target stat */
let statTarget = "";
if (["fortitude", "instinct", "prudence", "wisdom", "justice", "charm", "insight", "temperance"].includes(AutoEffect[1].toLowerCase())) {
statTarget = AutoEffect[1].toLowerCase();
}
- else { autoEffectErrorMessage(`Stat "${AutoEffect[1]}" does not exist.`, AutoEffect); return {error: true}; }
+ else { return autoEffectErrorMessage("Invalid Stat", `Stat "${AutoEffect[1]}" does not exist.`, AutoEffect); }
/* Handle message */
let message = "";
@@ -15848,7 +15939,7 @@ function autoEffectChallengeRoll(AutoEffect, scaling) {
function autoEffectSpeed(AutoEffect, scaling, prevThisRoundSpeed, prevNextRoundSpeed) {
/* Check format */
- if (AutoEffect.length < 3 || AutoEffect.length > 5) { autoEffectErrorMessage(`Expected format: (Speed N #Duration #Silent(optional))`, AutoEffect); return {error: true}; }
+ if (AutoEffect.length < 3 || AutoEffect.length > 5) { return autoEffectErrorMessage("Format Error", `Expected format: (Speed N #Duration #Silent(optional))`, AutoEffect); }
/* Handle scaling */
AutoEffect[1] *= scaling;
@@ -15856,14 +15947,14 @@ function autoEffectSpeed(AutoEffect, scaling, prevThisRoundSpeed, prevNextRoundS
/* Get values */
let effectVal = parseInt(AutoEffect[1]);
- if (isNaN(effectVal) == true) { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number`, AutoEffect); return {error: true}; }
+ if (isNaN(effectVal) == true) { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number`, AutoEffect); }
/* Get duration */
let effectDuration = "";
- if (AutoEffect[2].toLowerCase() == "this combat") { effectDuration = "Combat"; }
+ if (["thiscombat"].includes(AutoEffect[2].toLowerCase()) || AutoEffect[3].toLowerCase() == "combat" ) { effectDuration = "Combat"; }
else if (["this", "thisround", "this round, thisturn, this turn"].includes(AutoEffect[2].toLowerCase())) { effectDuration = "ThisRound"; }
else if (["next", "nextround", "next round, nextturn, next turn"].includes(AutoEffect[2].toLowerCase())) { effectDuration = "NextRound"; }
- else { autoEffectErrorMessage(`Duration "${AutoEffect[2]}" does not exist. Expected "Combat", "This round" or "Next round"`, AutoEffect); return {error: true}; }
+ else { return autoEffectErrorMessage("Invalid Option", `Duration "${AutoEffect.slice(2).join(" ")}" does not exist. Expected "This Combat", "This round" or "Next round"`, AutoEffect); }
/* Handle message */
let message = "";
@@ -15895,11 +15986,12 @@ function autoEffectDamage(AutoEffect, barList, scaling) {
switch (AutoEffect[0]) {
case "BaseDamage": autoEffectVariant = "BaseDamage"; break;
case "FlatDamage": autoEffectVariant = "FlatDamage"; break;
- default: autoEffectErrorMessage(`${AutoEffect[0]} is not a valid AutoEffect`, AutoEffect); return {error: true}
+ default: return autoEffectErrorMessage("Invalid AutoEffect", `${AutoEffect[0]} is not a valid AutoEffect`, AutoEffect);
}
/* Check format */
- if (AutoEffect.length < 3 || AutoEffect.length > 4) { autoEffectErrorMessage(`Expected format: (${autoEffectVariant} N #Bar #Silent(optional))`, AutoEffect); return {error: true}; }
+ if (AutoEffect.length < 3 || AutoEffect.length > 4) { return autoEffectErrorMessage("Format Error", `Expected format: (${autoEffectVariant} N #Bar #Silent(optional))`, AutoEffect); }
+ if (AutoEffect.length > 3) { if (AutoEffect[3].toLowerCase() != "silent") { return autoEffectErrorMessage("Invalid Option", `Option "${AutoEffect[3]}" is not a valid option`, AutoEffect); } }
/* Handle scaling */
AutoEffect[1] *= scaling;
@@ -15907,7 +15999,7 @@ function autoEffectDamage(AutoEffect, barList, scaling) {
/* Get value */
let effectVal = parseInt(Math.abs(AutoEffect[1]));
- if (isNaN(effectVal) == true) { autoEffectErrorMessage(`Value "${AutoEffect[1]}" is not a number`, AutoEffect); return {error: true}; }
+ if (isNaN(effectVal) == true) { return autoEffectErrorMessage("Invalid Value", `Value "${AutoEffect[1]}" is not a number`, AutoEffect); }
let count = 0;
/* Get target */
@@ -15917,7 +16009,7 @@ function autoEffectDamage(AutoEffect, barList, scaling) {
effectTarget = effectBar.replace("ST", "StagRes");
count = barList[effectBar];
}
- else { autoEffectErrorMessage(`Bar "${effectBar}" does not exist`, AutoEffect); return {error: true}; }
+ else { return autoEffectErrorMessage("Invalid Target", `Bar "${effectBar}" does not exist`, AutoEffect); }
/* Handle message */
let message = "";
@@ -17075,7 +17167,7 @@ function getAutoEffectFromTranslation(autoEffect) {
if (getTranslationByKey("autoeffect-dicecount") == autoEffect) { return "DiceCount"; }
if (getTranslationByKey("autoeffect-challengeroll") == autoEffect) { return "ChallengeRoll"; }
if (getTranslationByKey("autoeffect-speed") == autoEffect) { return "Speed"; }
- return "Unknown AutoEffect: " + autoEffect;
+ return "Unknown: " + autoEffect;
}
/* Inputs a trigger written in the current language and returns it back to English */
@@ -17095,7 +17187,7 @@ function getTriggerFromTranslation(trigger) {
if (getTranslationByKey("autoeffect-trigger-defensive") == trigger) { return "Defensive"; }
if (getTranslationByKey("autoeffect-trigger-block") == trigger) { return "Block"; }
if (getTranslationByKey("autoeffect-trigger-evade") == trigger) { return "Evade"; }
- return "Unknown Trigger"
+ return "Unknown: " + trigger;
}
/* Inputs an ailment written in the current language and returns it back to English */
@@ -17128,11 +17220,11 @@ function getBarFromTranslation(bar) {
if ("-" + getTranslationByKey("bar-sanity-shortened") == bar) { return "-SP"; }
if (getTranslationByKey("bar-health-temp-shortened") == bar) { return "THP"; }
if (getTranslationByKey("bar-stagres-temp-shortened") == bar) { return "TST"; }
- return "Unknown Bar";
+ return "Unknown: " + bar;
}
function getAilmentOrBarFromTranslation(input) {
- if (getBarFromTranslation(input) != "Unknown Bar") { return getBarFromTranslation(input); }
+ if (getBarFromTranslation(input) != "Unknown: " + input) { return getBarFromTranslation(input); }
return getAilmentFromTranslation(input);
}
@@ -17143,7 +17235,7 @@ function getStatFromTranslation(stat) {
if (getTranslationByKey("stats-charm") == stat) { return "Charm"; }
if (getTranslationByKey("stats-insight") == stat) { return "Insight"; }
if (getTranslationByKey("stats-temperance") == stat) { return "Temperance"; }
- return "Unknown Stat";
+ return "Unknown: " + stat;
}
function getOptionFromTranslation(option) {
@@ -17155,7 +17247,7 @@ function getOptionFromTranslation(option) {
if (getTranslationByKey("autoeffect-option-checksuccess") == option) { return "CheckSuccess"; }
if (getTranslationByKey("autoeffect-option-checkfailure") == option) { return "CheckFailure"; }
if (getTranslationByKey("autoeffect-option-checkignore") == option) { return "CheckIgnore"; }
- return "Unknown Option";
+ return "Unknown: " + option;
}
diff --git a/ProjectMoonTRPG/ProjectMoonTRPGStyle.css b/ProjectMoonTRPG/ProjectMoonTRPGStyle.css
index b9c7deaa4a..fc1ebc179c 100644
--- a/ProjectMoonTRPG/ProjectMoonTRPGStyle.css
+++ b/ProjectMoonTRPG/ProjectMoonTRPGStyle.css
@@ -2598,7 +2598,7 @@ justify-content: center;
/* Assorted buttons */
-.shareButton, .editButton, .autoScriptButton, .closeAutoScriptButton, .saveAutoScriptButton, .copyButton, .displayButton, .lockButton {
+.shareButton, .editButton, .autoScriptButton, .closeAutoScriptButton, .saveAutoScriptButton, .styleAutoScriptButton, .copyButton, .displayButton, .lockButton {
position: absolute;
height: 25px;
width: 25px;
@@ -2613,7 +2613,7 @@ justify-content: center;
}
-:is(.closeAutoScriptButton, .saveAutoScriptButton):hover {
+:is(.closeAutoScriptButton, .saveAutoScriptButton, .styleAutoScriptButton):hover {
background-color: #000 !important;
}
@@ -2655,6 +2655,15 @@ justify-content: center;
width: auto;
}
+.styleAutoScriptButton {
+ top: 4px;
+ right: 80px;
+ z-index: 20;
+ padding-left: 4px;
+ padding-right: 4px;
+ width: auto;
+}
+
:is(.augmentBlock, .specialBlock, .skillBlock) .autoScriptButton {
right: 35px;
}
diff --git a/ProjectMoonTRPG/images/icons/lose.png b/ProjectMoonTRPG/images/icons/lose.png
new file mode 100644
index 0000000000..3c73848acf
Binary files /dev/null and b/ProjectMoonTRPG/images/icons/lose.png differ
diff --git a/ProjectMoonTRPG/images/icons/win.png b/ProjectMoonTRPG/images/icons/win.png
new file mode 100644
index 0000000000..6dfc48cb24
Binary files /dev/null and b/ProjectMoonTRPG/images/icons/win.png differ
diff --git a/ProjectMoonTRPG/imagesResized/icons/lose.png b/ProjectMoonTRPG/imagesResized/icons/lose.png
new file mode 100644
index 0000000000..1b993b0abe
Binary files /dev/null and b/ProjectMoonTRPG/imagesResized/icons/lose.png differ
diff --git a/ProjectMoonTRPG/imagesResized/icons/win.png b/ProjectMoonTRPG/imagesResized/icons/win.png
new file mode 100644
index 0000000000..a5c5d43fb5
Binary files /dev/null and b/ProjectMoonTRPG/imagesResized/icons/win.png differ
diff --git a/ProjectMoonTRPG/translation.json b/ProjectMoonTRPG/translation.json
index 4582101806..51627281d4 100644
--- a/ProjectMoonTRPG/translation.json
+++ b/ProjectMoonTRPG/translation.json
@@ -246,7 +246,9 @@
"autoscript-edit":"Edit AutoScript",
"autoscript-editor":"AutoScript Editor",
"autoscript-close-editor":"Save and close AutoScript Editor",
- "autoscript-save-changes":"Save AutoScript changes",
+ "autoscript-save-changes":"Save",
+ "autoscript-save-changes-title":"Save AutoScript changes",
+ "autoscript-open-style-editor":"Open AutoScript Styling Editor",
"autoeffect-title": "AutoEffects",
"autoeffect-option-scaling": "Scaling",
"autoeffect-option-silent": "Silent",