Merge pull request #4 from coreyhickson/anatomy-changes

wip: anatomy changes and broken roll tables
This commit is contained in:
Corey Hickson
2024-08-10 17:31:19 -06:00
committed by GitHub
45 changed files with 8521 additions and 12418 deletions
+4 -9
View File
@@ -5,13 +5,8 @@ Use `npm install` to download dependancies and `npm install pug-cli -g` to downl
Start compiling for SCSS & PUG with `npm start` from the Torchbearer 2E directory.
## Feature Log
## Future Work
- Make the sheet responsive
- Add wises help text
## Known Bugs
- Spacing on invocations is funky
- Background isn't responsive
- New skills start with full BL track
- Hidable relics & spells
- Condition reminders
- Auto upgrade ratings
+467 -485
View File
@@ -1,522 +1,504 @@
const tablist = ["anatomy", "kit", "magic", "relationships", "levels", "options"];
tablist.forEach(button => {
on(`clicked:${button}`, function () {
setAttrs({
tab: button
});
});
});
const modeList = ["editing", "playing"];
modeList.forEach(button => {
on(`clicked:${button}`, function () {
setAttrs({
edit: button
});
});
});
// Old code
// --------
on("sheet:opened", function (eventinfo) {
initialize();
});
// on("sheet:opened", function (eventinfo) {
// initialize();
// });
const scrubAdvancement = attribute_base => {
const update = {};
update[attribute_base + "_pass"] = 0;
update[attribute_base + "_fail"] = 0;
update[attribute_base + "_bl"] = 0;
update[attribute_base + "_show_advancement"] = 0;
setAttrs(update, { silent: true });
};
// const initialize = () => {
// const attributes_to_fetch = ["initialized"];
// getAttrs(attributes_to_fetch, attributes => {
// const { initialized } = attributes;
// if (initialized) {
// return;
// }
// updateConditions("fresh");
// activateComplexRollModal("resources", true);
// setAttrs({ initialized: "true" });
// });
// }
const checkAdvancement = attribute_base => {
const attributes_to_fetch = [attribute_base, attribute_base + "_pass", attribute_base + "_fail", attribute_base + "_show_advancement"];
getAttrs(attributes_to_fetch, attributes => {
const update = {};
const base = parseInt(attributes[attribute_base], 10);
const pass = parseInt(attributes[attribute_base + "_pass"], 10);
const fail = parseInt(attributes[attribute_base + "_fail"], 10);
const show = parseInt(attributes[attribute_base + "_show_advancement"], 10);
if (pass === base && fail === base - 1) {
update[attribute_base + "_show_advancement"] = 1;
} else if (["resources", "circles"].includes(attribute_base) && base === 0 && pass === 1) {
update[attribute_base + "_show_advancement"] = 1;
} else if (show === 1) {
update[attribute_base + "_show_advancement"] = 0;
};
setAttrs(update, { silent: true });
});
};
// const scrubAdvancement = attribute_base => {
// const update = {};
// update[attribute_base + "_pass"] = 0;
// update[attribute_base + "_fail"] = 0;
// update[attribute_base + "_bl"] = 0;
// update[attribute_base + "_show_advancement"] = 0;
// setAttrs(update, { silent: true });
// };
const doAdvancement = attribute_base => {
const attributes_to_fetch = [attribute_base];
getAttrs(attributes_to_fetch, attributes => {
const update = {};
const base = parseInt(attributes[attribute_base], 10);
update[attribute_base] = base === 0 && !["resources", "circles"].includes(attribute_base) ? 2 : base + 1;
update[attribute_base + "_advancement"] = 0;
setAttrs(update, { silent: true });
scrubAdvancement(attribute_base);
});
};
// const checkAdvancement = attribute_base => {
// const attributes_to_fetch = [attribute_base, attribute_base + "_pass", attribute_base + "_fail", attribute_base + "_show_advancement"];
// getAttrs(attributes_to_fetch, attributes => {
// const update = {};
// const base = parseInt(attributes[attribute_base], 10);
// const pass = parseInt(attributes[attribute_base + "_pass"], 10);
// const fail = parseInt(attributes[attribute_base + "_fail"], 10);
// const show = parseInt(attributes[attribute_base + "_show_advancement"], 10);
// if (pass === base && fail === base - 1) {
// update[attribute_base + "_show_advancement"] = 1;
// } else if (["resources", "circles"].includes(attribute_base) && base === 0 && pass === 1) {
// update[attribute_base + "_show_advancement"] = 1;
// } else if (show === 1) {
// update[attribute_base + "_show_advancement"] = 0;
// };
// setAttrs(update, { silent: true });
// });
// };
const checkBeginnersLuck = attribute_base => {
const attributes_to_fetch = [attribute_base + "_bl", attribute_base + "_show_advancement", "nature"];
getAttrs(attributes_to_fetch, attributes => {
const update = {};
const nature = attributes["nature"];
const bl = attributes[attribute_base + "_bl"];
const show = parseInt(attributes[attribute_base + "_show_advancement"], 10);
if (nature === bl) {
update[attribute_base + "_show_advancement"] = 1;
} else if (show === 1) {
update[attribute_base + "_show_advancement"] = 0;
};
setAttrs(update, { silent: true });
});
};
// const doAdvancement = attribute_base => {
// const attributes_to_fetch = [attribute_base];
// getAttrs(attributes_to_fetch, attributes => {
// const update = {};
// const base = parseInt(attributes[attribute_base], 10);
// update[attribute_base] = base === 0 && !["resources", "circles"].includes(attribute_base) ? 2 : base + 1;
// update[attribute_base + "_advancement"] = 0;
// setAttrs(update, { silent: true });
// scrubAdvancement(attribute_base);
// });
// };
const updateConditions = trigger_attribute => {
const attributes_to_fetch = ["fresh", "hungry_and_thirsty", "angry", "afraid", "exhausted", "injured", "sick", "dead", "bl_suffix"];
getAttrs(attributes_to_fetch, attributes => {
const update = {};
const conditions = [];
const { fresh, hungry_and_thirsty, angry, afraid, exhausted, injured, sick, dead, bl_suffix } = attributes;
const bl = bl_suffix && bl_suffix !== "" ? true : false;
let town_conditions_modifier = ""; let conditions_modifier = ""; let conflict_conditions_modifier = "";
// const checkBeginnersLuck = attribute_base => {
// const attributes_to_fetch = [attribute_base + "_bl", attribute_base + "_show_advancement", "nature"];
// getAttrs(attributes_to_fetch, attributes => {
// const update = {};
// const nature = attributes["nature"];
// const bl = attributes[attribute_base + "_bl"];
// const show = parseInt(attributes[attribute_base + "_show_advancement"], 10);
// if (nature === bl) {
// update[attribute_base + "_show_advancement"] = 1;
// } else if (show === 1) {
// update[attribute_base + "_show_advancement"] = 0;
// };
// setAttrs(update, { silent: true });
// });
// };
if (trigger_attribute === "fresh" && fresh && fresh !== "0") {
update["hungry_and_thirsty"] = 0; update["angry"] = 0; update["afraid"] = 0; update["exhausted"] = 0; update["injured"] = 0; update["sick"] = 0; update["dead"] = 0;
conditions_modifier = bl ? "+2[Fresh]" : "+1[Fresh]";
town_conditions_modifier = bl ? "+2[Fresh]" : "+1[Fresh]";
conflict_conditions_modifier = bl ? "+2[Fresh]" : "+1[Fresh]";
conditions.push("Fresh");
} else {
update["fresh"] = 0;
if (hungry_and_thirsty && hungry_and_thirsty !== "0") {
// conflict_conditions_modifier = conflict_conditions_modifier + "-1[Hungry and Thirsty]";
conditions.push("Hungry and Thirsty");
};
if (angry && angry !== "0") {
conditions.push("Angry");
};
if (afraid && afraid !== "0") {
conditions.push("Afraid");
};
if (exhausted && exhausted !== "0") {
// conflict_conditions_modifier = conflict_conditions_modifier + "-1[Exhausted]";
conditions.push("Exhausted");
};
if (injured && injured !== "0") {
conditions_modifier = conditions_modifier + "-1[Injured]";
conflict_conditions_modifier = conflict_conditions_modifier + "-1[Injured]";
conditions.push("Injured");
};
if (sick && sick !== "0") {
conditions_modifier = conditions_modifier + "-1[Sick]";
conflict_conditions_modifier = conflict_conditions_modifier + "-1[Sick]";
conditions.push("Sick");
};
if (dead && dead !== "0") {
conditions.push("Dead");
};
};
let display_conditions = ""
if (conditions.length) {
display_conditions = "{{conditions=" + conditions.join(", ") + "}}";
if (dead && dead !== "0") {
display_conditions = display_conditions + " {{dead=true}}";
}
}
// const updateConditions = trigger_attribute => {
// const attributes_to_fetch = ["fresh", "hungry_and_thirsty", "angry", "afraid", "exhausted", "injured", "sick", "dead", "bl_suffix"];
// getAttrs(attributes_to_fetch, attributes => {
// const update = {};
// const conditions = [];
// const { fresh, hungry_and_thirsty, angry, afraid, exhausted, injured, sick, dead, bl_suffix } = attributes;
// const bl = bl_suffix && bl_suffix !== "" ? true : false;
// let town_conditions_modifier = ""; let conditions_modifier = ""; let conflict_conditions_modifier = "";
update["roll_template_conditions"] = display_conditions;
update["town_conditions_modifier"] = town_conditions_modifier;
update["conflict_conditions_modifier"] = conflict_conditions_modifier;
update["conditions_modifier"] = conditions_modifier;
setAttrs(update, { silent: true });
});
};
// if (trigger_attribute === "fresh" && fresh && fresh !== "0") {
// update["hungry_and_thirsty"] = 0; update["angry"] = 0; update["afraid"] = 0; update["exhausted"] = 0; update["injured"] = 0; update["sick"] = 0; update["dead"] = 0;
// conditions_modifier = bl ? "+2[Fresh]" : "+1[Fresh]";
// town_conditions_modifier = bl ? "+2[Fresh]" : "+1[Fresh]";
// conflict_conditions_modifier = bl ? "+2[Fresh]" : "+1[Fresh]";
// conditions.push("Fresh");
// } else {
// update["fresh"] = 0;
// if (hungry_and_thirsty && hungry_and_thirsty !== "0") {
// // conflict_conditions_modifier = conflict_conditions_modifier + "-1[Hungry and Thirsty]";
// conditions.push("Hungry and Thirsty");
// };
// if (angry && angry !== "0") {
// conditions.push("Angry");
// };
// if (afraid && afraid !== "0") {
// conditions.push("Afraid");
// };
// if (exhausted && exhausted !== "0") {
// // conflict_conditions_modifier = conflict_conditions_modifier + "-1[Exhausted]";
// conditions.push("Exhausted");
// };
// if (injured && injured !== "0") {
// conditions_modifier = conditions_modifier + "-1[Injured]";
// conflict_conditions_modifier = conflict_conditions_modifier + "-1[Injured]";
// conditions.push("Injured");
// };
// if (sick && sick !== "0") {
// conditions_modifier = conditions_modifier + "-1[Sick]";
// conflict_conditions_modifier = conflict_conditions_modifier + "-1[Sick]";
// conditions.push("Sick");
// };
// if (dead && dead !== "0") {
// conditions.push("Dead");
// };
// };
// let display_conditions = ""
// if (conditions.length) {
// display_conditions = "{{conditions=" + conditions.join(", ") + "}}";
// if (dead && dead !== "0") {
// display_conditions = display_conditions + " {{dead=true}}";
// }
// }
const updateModifiers = trigger_attribute => {
const attributes_to_fetch = ["trait_mod", "trait_mod_type", "complex_trigger", "persona_mod", "persona_mod_number", "nature_mod", "taxed_nature", "help_mod", "help_mod_number", "gear_mod", "gear_mod_number", "party_hungry_and_thirsty_mod", "home_town_mod", "enchanted_item_mod", "invocation_mod", "spell_mod", "level_benefit_mod", "dim_light_mod", "evil_gm_factor_mod", "other_mod", "other_mod_number", "other_successes", "backpack_mod", "bl_suffix", "fresh"];
getAttrs(attributes_to_fetch, attributes => {
const update = {};
const modifiers = [];
let complex_mods = ""; let roll_template_complex_mods = "";
const { trait_mod, trait_mod_type, complex_trigger, persona_mod, persona_mod_number, nature_mod, taxed_nature, help_mod, help_mod_number, gear_mod, gear_mod_number, party_hungry_and_thirsty_mod, home_town_mod, enchanted_item_mod, invocation_mod, spell_mod, level_benefit_mod, dim_light_mod, evil_gm_factor_mod, other_mod, other_mod_number, other_successes, backpack_mod, bl_suffix, fresh } = attributes;
const bl = bl_suffix && bl_suffix !== "" ? true : false;
if (trait_mod && trait_mod !== "0") {
complex_mods = complex_mods + "+" + trait_mod_type + "[Trait]";
modifiers.push("Trait " + trait_mod_type);
};
if (persona_mod && persona_mod !== "0") {
complex_mods = complex_mods + "+" + (bl ? persona_mod_number * 2 : persona_mod_number) + "[Persona]";
modifiers.push("Persona +" + persona_mod_number);
};
if (nature_mod && nature_mod !== "0") {
complex_mods = complex_mods + "+" + (bl ? taxed_nature * 2 : taxed_nature) + "[Nature]";
modifiers.push("Nature +" + taxed_nature);
};
if (help_mod && help_mod !== "0") {
complex_mods = complex_mods + "+" + help_mod_number + "[Help]";
modifiers.push("Help +" + help_mod_number);
};
if (gear_mod && gear_mod !== "0") {
complex_mods = complex_mods + "+" + gear_mod_number + "[Gear]";
modifiers.push("Gear +" + gear_mod_number);
};
if (party_hungry_and_thirsty_mod && party_hungry_and_thirsty_mod !== "0") {
// complex_mods = complex_mods + "-1[Party Hungry and Thirsty]";
modifiers.push("Party Hungry or Thirsty");
};
if (home_town_mod && home_town_mod !== "0") {
complex_mods = complex_mods + "+1[Home Town Advantage]";
modifiers.push("Home Town Advantage");
};
if (enchanted_item_mod && enchanted_item_mod !== "0") {
complex_mods = complex_mods + "+" + (bl ? 2 : 1) + "[Enchanted Item]";
modifiers.push("Enchanted Item");
};
if (invocation_mod && invocation_mod !== "0") {
complex_mods = complex_mods + "+" + (bl ? 2 : 1) + "[Invocation]";
modifiers.push("Invocation Effect");
};
if (spell_mod && spell_mod !== "0") {
complex_mods = complex_mods + "+" + (bl ? 2 : 1) + "[Spell Effect]";
modifiers.push("Spell Effect");
};
if (level_benefit_mod && level_benefit_mod !== "0") {
complex_mods = complex_mods + "+1[Level Benefit]";
modifiers.push("Level Benefit");
};
if (dim_light_mod && dim_light_mod !== "0") {
// complex_mods = complex_mods + "-1[Dim Light]";
modifiers.push("Dim Light");
};
if (evil_gm_factor_mod && evil_gm_factor_mod !== "0") {
// complex_mods = complex_mods + "-1[Evil GM Factor]";
modifiers.push("Evil GM Factor");
};
if (backpack_mod && backpack_mod !== "0") {
// complex_mods = complex_mods + "-1[Wearing Backpack]";
modifiers.push("Wearing a Backpack -1S");
};
if (other_mod && other_mod !== "0" && ((other_mod_number && other_mod_number !== "0") || (other_successes && other_successes !== "0"))) {
complex_mods = complex_mods + "+" + other_mod_number + "[Other]";
const dice_mod_operator = other_mod_number < 0 ? "" : "+";
update["other_mod_operator"] = dice_mod_operator;
const success_mod_operator = other_successes < 0 ? "" : "+";
update["other_successes_operator"] = success_mod_operator;
modifiers.push("Other Modifiers " + dice_mod_operator + other_mod_number + "D/" + success_mod_operator + other_successes + "S");
};
// update["roll_template_conditions"] = display_conditions;
// update["town_conditions_modifier"] = town_conditions_modifier;
// update["conflict_conditions_modifier"] = conflict_conditions_modifier;
// update["conditions_modifier"] = conditions_modifier;
// setAttrs(update, { silent: true });
// });
// };
update["complex_mods"] = complex_mods;
update["roll_template_complex_mods"] = modifiers.length ? "{{modifiers=" + modifiers.join(", ") + "}}" : "";
setAttrs(update, { silent: true });
});
};
// const updateModifiers = trigger_attribute => {
// const attributes_to_fetch = ["trait_mod", "trait_mod_type", "complex_trigger", "persona_mod", "persona_mod_number", "nature_mod", "taxed_nature", "help_mod", "help_mod_number", "gear_mod", "gear_mod_number", "party_hungry_and_thirsty_mod", "home_town_mod", "enchanted_item_mod", "invocation_mod", "spell_mod", "level_benefit_mod", "dim_light_mod", "evil_gm_factor_mod", "other_mod", "other_mod_number", "other_successes", "backpack_mod", "bl_suffix", "fresh"];
// getAttrs(attributes_to_fetch, attributes => {
// const update = {};
// const modifiers = [];
// let complex_mods = ""; let roll_template_complex_mods = "";
// const { trait_mod, trait_mod_type, complex_trigger, persona_mod, persona_mod_number, nature_mod, taxed_nature, help_mod, help_mod_number, gear_mod, gear_mod_number, party_hungry_and_thirsty_mod, home_town_mod, enchanted_item_mod, invocation_mod, spell_mod, level_benefit_mod, dim_light_mod, evil_gm_factor_mod, other_mod, other_mod_number, other_successes, backpack_mod, bl_suffix, fresh } = attributes;
// const bl = bl_suffix && bl_suffix !== "" ? true : false;
// if (trait_mod && trait_mod !== "0") {
// complex_mods = complex_mods + "+" + trait_mod_type + "[Trait]";
// modifiers.push("Trait " + trait_mod_type);
// };
// if (persona_mod && persona_mod !== "0") {
// complex_mods = complex_mods + "+" + (bl ? persona_mod_number * 2 : persona_mod_number) + "[Persona]";
// modifiers.push("Persona +" + persona_mod_number);
// };
// if (nature_mod && nature_mod !== "0") {
// complex_mods = complex_mods + "+" + (bl ? taxed_nature * 2 : taxed_nature) + "[Nature]";
// modifiers.push("Nature +" + taxed_nature);
// };
// if (help_mod && help_mod !== "0") {
// complex_mods = complex_mods + "+" + help_mod_number + "[Help]";
// modifiers.push("Help +" + help_mod_number);
// };
// if (gear_mod && gear_mod !== "0") {
// complex_mods = complex_mods + "+" + gear_mod_number + "[Gear]";
// modifiers.push("Gear +" + gear_mod_number);
// };
// if (party_hungry_and_thirsty_mod && party_hungry_and_thirsty_mod !== "0") {
// // complex_mods = complex_mods + "-1[Party Hungry and Thirsty]";
// modifiers.push("Party Hungry or Thirsty");
// };
// if (home_town_mod && home_town_mod !== "0") {
// complex_mods = complex_mods + "+1[Home Town Advantage]";
// modifiers.push("Home Town Advantage");
// };
// if (enchanted_item_mod && enchanted_item_mod !== "0") {
// complex_mods = complex_mods + "+" + (bl ? 2 : 1) + "[Enchanted Item]";
// modifiers.push("Enchanted Item");
// };
// if (invocation_mod && invocation_mod !== "0") {
// complex_mods = complex_mods + "+" + (bl ? 2 : 1) + "[Invocation]";
// modifiers.push("Invocation Effect");
// };
// if (spell_mod && spell_mod !== "0") {
// complex_mods = complex_mods + "+" + (bl ? 2 : 1) + "[Spell Effect]";
// modifiers.push("Spell Effect");
// };
// if (level_benefit_mod && level_benefit_mod !== "0") {
// complex_mods = complex_mods + "+1[Level Benefit]";
// modifiers.push("Level Benefit");
// };
// if (dim_light_mod && dim_light_mod !== "0") {
// // complex_mods = complex_mods + "-1[Dim Light]";
// modifiers.push("Dim Light");
// };
// if (evil_gm_factor_mod && evil_gm_factor_mod !== "0") {
// // complex_mods = complex_mods + "-1[Evil GM Factor]";
// modifiers.push("Evil GM Factor");
// };
// if (backpack_mod && backpack_mod !== "0") {
// // complex_mods = complex_mods + "-1[Wearing Backpack]";
// modifiers.push("Wearing a Backpack -1S");
// };
// if (other_mod && other_mod !== "0" && ((other_mod_number && other_mod_number !== "0") || (other_successes && other_successes !== "0"))) {
// complex_mods = complex_mods + "+" + other_mod_number + "[Other]";
// const dice_mod_operator = other_mod_number < 0 ? "" : "+";
// update["other_mod_operator"] = dice_mod_operator;
// const success_mod_operator = other_successes < 0 ? "" : "+";
// update["other_successes_operator"] = success_mod_operator;
// modifiers.push("Other Modifiers " + dice_mod_operator + other_mod_number + "D/" + success_mod_operator + other_successes + "S");
// };
const activateComplexRollModal = (roll_trigger, initialize_request) => {
const update = { show_roll_modal: 1 };
update[roll_trigger] = 0;
const trigger = roll_trigger.replace(/_trigger/g, '');
update["complex_trigger"] = trigger;
update["complex_trigger_display"] = trigger.charAt(0).toUpperCase() + trigger.slice(1);
update["trigger_is_not_town"] = ["circles", "resources", "recovery_angry", "recovery_afraid", "recovery_exhausted", "recovery_injured", "recovery_sick"].includes(trigger) ? "0" : "1";
update["bl_prefix"] = "";
update["bl_suffix"] = "";
const attributes_to_fetch = [trigger, "health", "will", "skill1_bl_d", "skill2_bl_d", "skill3_bl_d", "skill4_bl_d", "skill5_bl_d", "fresh", "persona_mod", "nature_mod", "spell_effect_mod", "invocation_effect_mod", "enchanted_item_mod"];
if (trigger.includes("skill")) {
attributes_to_fetch.push(trigger + "_name");
}
getAttrs(attributes_to_fetch, attributes => {
const { health, will, fresh, persona_mod, nature_mod, spell_effect_mod, invocation_effect_mod, enchanted_item_mod } = attributes;
if (trigger.includes("skill")) {
update["complex_trigger_display"] = attributes[trigger + "_name"];
}
if (trigger === "loremaster") {
update["complex_trigger_display"] = "Lore Master";
}
if (trigger.substr(0, 9) === "recovery_") {
const recovery_name_array = trigger.split("_");
recovery_name_array[0] = recovery_name_array[0].charAt(0).toUpperCase() + recovery_name_array[0].slice(1);
recovery_name_array[1] = recovery_name_array[1].charAt(0).toUpperCase() + recovery_name_array[1].slice(1);
update["complex_trigger_display"] = recovery_name_array.join(" from ");
update["ob_type"] = "independent";
if (trigger === "recovery_angry") {
update["ob"] = 2;
} else if (trigger === "recovery_injured") {
update["ob"] = 4;
} else {
update["ob"] = 3;
}
}
let base_mod = parseInt(attributes[trigger], 10);
if (["recovery_exhausted", "recovery_injured"].includes(trigger)) {
base_mod = parseInt(health, 10);
}
if (["recovery_angry", "recovery_afraid", "recovery_sick"].includes(trigger)) {
base_mod = parseInt(will, 10);
}
if (base_mod === 0 && trigger != "resources") {
let bl_type = "will";
if (trigger.includes("skill")) {
bl_type = attributes[trigger + "_bl_d"] === 'w' ? "will" : "health";
} else {
bl_type = bl_map[trigger];
}
base_mod = parseInt(attributes[bl_type], 10);
update["bl_prefix"] = "ceil((";
update["bl_suffix"] = ")/2)";
}
update["complex_trigger_mod"] = base_mod;
setAttrs(update, { silent: true }, () => {
updateObType();
updateBackpackMod();
if (initialize_request) {
closeComplexRollModal();
}
if (update["bl_suffix"] && update["bl_suffix"] === ")/2)") {
updateModifiers();
}
});
});
};
// update["complex_mods"] = complex_mods;
// update["roll_template_complex_mods"] = modifiers.length ? "{{modifiers=" + modifiers.join(", ") + "}}" : "";
// setAttrs(update, { silent: true });
// });
// };
const closeComplexRollModal = () => {
const update = {
show_roll_modal: 0,
trait_mod: 0,
trait_mod_type: 1,
persona_mod: 0,
persona_mod_number: 1,
nature_mod: 0,
nature_in_or_out: "inside",
help_mod: 0,
help_mod_number: 1,
gear_mod: 0,
gear_mod_number: 1,
party_hungry_and_thirsty_mod: 0,
home_town_mod: 0,
enchanted_item_mod: 0,
invocation_mod: 0,
spell_mod: 0,
level_benefit_mod: 0,
dim_light_mod: 0,
evil_gm_factor_mod: 0,
other_mod: 0,
other_mod_number: 1,
complex_mods: "",
};
setAttrs(update, { silent: true });
};
// const activateComplexRollModal = (roll_trigger, initialize_request) => {
// const update = { show_roll_modal: 1 };
// update[roll_trigger] = 0;
// const trigger = roll_trigger.replace(/_trigger/g, '');
// update["complex_trigger"] = trigger;
// update["complex_trigger_display"] = trigger.charAt(0).toUpperCase() + trigger.slice(1);
// update["trigger_is_not_town"] = ["circles", "resources", "recovery_angry", "recovery_afraid", "recovery_exhausted", "recovery_injured", "recovery_sick"].includes(trigger) ? "0" : "1";
// update["bl_prefix"] = "";
// update["bl_suffix"] = "";
// const attributes_to_fetch = [trigger, "health", "will", "skill1_bl_d", "skill2_bl_d", "skill3_bl_d", "skill4_bl_d", "skill5_bl_d", "fresh", "persona_mod", "nature_mod", "spell_effect_mod", "invocation_effect_mod", "enchanted_item_mod"];
// if (trigger.includes("skill")) {
// attributes_to_fetch.push(trigger + "_name");
// }
// getAttrs(attributes_to_fetch, attributes => {
// const { health, will, fresh, persona_mod, nature_mod, spell_effect_mod, invocation_effect_mod, enchanted_item_mod } = attributes;
// if (trigger.includes("skill")) {
// update["complex_trigger_display"] = attributes[trigger + "_name"];
// }
// if (trigger === "loremaster") {
// update["complex_trigger_display"] = "Lore Master";
// }
// if (trigger.substr(0, 9) === "recovery_") {
// const recovery_name_array = trigger.split("_");
// recovery_name_array[0] = recovery_name_array[0].charAt(0).toUpperCase() + recovery_name_array[0].slice(1);
// recovery_name_array[1] = recovery_name_array[1].charAt(0).toUpperCase() + recovery_name_array[1].slice(1);
// update["complex_trigger_display"] = recovery_name_array.join(" from ");
// update["ob_type"] = "independent";
// if (trigger === "recovery_angry") {
// update["ob"] = 2;
// } else if (trigger === "recovery_injured") {
// update["ob"] = 4;
// } else {
// update["ob"] = 3;
// }
// }
// let base_mod = parseInt(attributes[trigger], 10);
// if (["recovery_exhausted", "recovery_injured"].includes(trigger)) {
// base_mod = parseInt(health, 10);
// }
// if (["recovery_angry", "recovery_afraid", "recovery_sick"].includes(trigger)) {
// base_mod = parseInt(will, 10);
// }
// if (base_mod === 0 && trigger != "resources") {
// let bl_type = "will";
// if (trigger.includes("skill")) {
// bl_type = attributes[trigger + "_bl_d"] === 'w' ? "will" : "health";
// } else {
// bl_type = bl_map[trigger];
// }
// base_mod = parseInt(attributes[bl_type], 10);
// update["bl_prefix"] = "ceil((";
// update["bl_suffix"] = ")/2)";
// }
// update["complex_trigger_mod"] = base_mod;
// setAttrs(update, { silent: true }, () => {
// updateObType();
// updateBackpackMod();
// if (initialize_request) {
// closeComplexRollModal();
// }
// if (update["bl_suffix"] && update["bl_suffix"] === ")/2)") {
// updateModifiers();
// }
// });
// });
// };
const bl_map = {
"alchemist": "will",
"arcanist": "will",
"armorer": "health",
"cartographer": "will",
"commander": "will",
"cook": "will",
"criminal": "health",
"dungeoneer": "health",
"fighter": "health",
"haggler": "will",
"healer": "will",
"hunter": "health",
"laborer": "health",
"loremaster": "will",
"manipulator": "will",
"mentor": "will",
"orator": "will",
"pathfinder": "health",
"peasant": "health",
"persuader": "will",
"rider": "health",
"ritualist": "will",
"sapper": "health",
"scavenger": "health",
"scholar": "will",
"scout": "will",
"survivalist": "health",
"theologian": "will",
}
// const closeComplexRollModal = () => {
// const update = {
// show_roll_modal: 0,
// trait_mod: 0,
// trait_mod_type: 1,
// persona_mod: 0,
// persona_mod_number: 1,
// nature_mod: 0,
// nature_in_or_out: "inside",
// help_mod: 0,
// help_mod_number: 1,
// gear_mod: 0,
// gear_mod_number: 1,
// party_hungry_and_thirsty_mod: 0,
// home_town_mod: 0,
// enchanted_item_mod: 0,
// invocation_mod: 0,
// spell_mod: 0,
// level_benefit_mod: 0,
// dim_light_mod: 0,
// evil_gm_factor_mod: 0,
// other_mod: 0,
// other_mod_number: 1,
// complex_mods: "",
// };
// setAttrs(update, { silent: true });
// };
const updateSuccessMod = trigger_attribute => {
const attributes_to_fetch = ["hungry_and_thirsty", "exhausted", "party_hungry_and_thirsty_mod", "dim_light_mod", "evil_gm_factor_mod", "other_mod", "other_successes", "backpack_mod"];
getAttrs(attributes_to_fetch, attributes => {
const update = {};
const modifiers = [];
const { hungry_and_thirsty, exhausted, party_hungry_and_thirsty_mod, dim_light_mod, evil_gm_factor_mod, other_mod, other_successes, backpack_mod } = attributes;
if (party_hungry_and_thirsty_mod && party_hungry_and_thirsty_mod !== "0") {
modifiers.push("-1[Party Hungry or Thirsty]");
};
if (dim_light_mod && dim_light_mod !== "0") {
modifiers.push("-1[Dim Light]");
};
if (evil_gm_factor_mod && evil_gm_factor_mod !== "0") {
modifiers.push("-1[Evil GM Factor]");
};
if (hungry_and_thirsty && hungry_and_thirsty !== "0") {
modifiers.push("-1[Hungry and Thirsty]");
};
if (exhausted && exhausted !== "0") {
modifiers.push("-1[Exhausted]");
};
if (backpack_mod && backpack_mod !== "0") {
modifiers.push("-1[Backpack]");
};
if (other_mod && other_mod !== "0" && other_successes && other_successes !== "0") {
const val = parseInt(other_successes, 10) > -1 ? "+" + other_successes : other_successes;
modifiers.push(val + "[Other Modifiers]");
};
update["success_mod"] = modifiers.length ? "[[" + modifiers.join(" ") + "]]" : "0";
update["success_mod_rolltemplate"] = "{{disposition=[[@{success_mod_base}]]}}";
setAttrs(update, { silent: true });
});
}
// const bl_map = {
// "alchemist": "will",
// "arcanist": "will",
// "armorer": "health",
// "cartographer": "will",
// "commander": "will",
// "cook": "will",
// "criminal": "health",
// "dungeoneer": "health",
// "fighter": "health",
// "haggler": "will",
// "healer": "will",
// "hunter": "health",
// "laborer": "health",
// "loremaster": "will",
// "manipulator": "will",
// "mentor": "will",
// "orator": "will",
// "pathfinder": "health",
// "peasant": "health",
// "persuader": "will",
// "rider": "health",
// "ritualist": "will",
// "sapper": "health",
// "scavenger": "health",
// "scholar": "will",
// "scout": "will",
// "survivalist": "health",
// "theologian": "will",
// }
const updateObType = () => {
const attributes_to_fetch = ["complex_trigger", "ob_type"];
getAttrs(attributes_to_fetch, attributes => {
const trigger = attributes.complex_trigger;
const ob_type = attributes.ob_type;
const update = {};
// const updateSuccessMod = trigger_attribute => {
// const attributes_to_fetch = ["hungry_and_thirsty", "exhausted", "party_hungry_and_thirsty_mod", "dim_light_mod", "evil_gm_factor_mod", "other_mod", "other_successes", "backpack_mod"];
// getAttrs(attributes_to_fetch, attributes => {
// const update = {};
// const modifiers = [];
// const { hungry_and_thirsty, exhausted, party_hungry_and_thirsty_mod, dim_light_mod, evil_gm_factor_mod, other_mod, other_successes, backpack_mod } = attributes;
// if (party_hungry_and_thirsty_mod && party_hungry_and_thirsty_mod !== "0") {
// modifiers.push("-1[Party Hungry or Thirsty]");
// };
// if (dim_light_mod && dim_light_mod !== "0") {
// modifiers.push("-1[Dim Light]");
// };
// if (evil_gm_factor_mod && evil_gm_factor_mod !== "0") {
// modifiers.push("-1[Evil GM Factor]");
// };
// if (hungry_and_thirsty && hungry_and_thirsty !== "0") {
// modifiers.push("-1[Hungry and Thirsty]");
// };
// if (exhausted && exhausted !== "0") {
// modifiers.push("-1[Exhausted]");
// };
// if (backpack_mod && backpack_mod !== "0") {
// modifiers.push("-1[Backpack]");
// };
// if (other_mod && other_mod !== "0" && other_successes && other_successes !== "0") {
// const val = parseInt(other_successes, 10) > -1 ? "+" + other_successes : other_successes;
// modifiers.push(val + "[Other Modifiers]");
// };
// update["success_mod"] = modifiers.length ? "[[" + modifiers.join(" ") + "]]" : "0";
// update["success_mod_rolltemplate"] = "{{disposition=[[@{success_mod_base}]]}}";
// setAttrs(update, { silent: true });
// });
// }
if (["circles", "resources", "recovery_angry", "recovery_afraid", "recovery_exhausted", "recovery_injured", "recovery_sick"].includes(trigger)) {
update["complex_conditions_modifier"] = "@{town_conditions_modifier}";
} else if (ob_type === "conflict") {
update["complex_conditions_modifier"] = "@{conflict_conditions_modifier}";
} else {
update["complex_conditions_modifier"] = "@{conditions_modifier}";
};
// const updateObType = () => {
// const attributes_to_fetch = ["complex_trigger", "ob_type"];
// getAttrs(attributes_to_fetch, attributes => {
// const trigger = attributes.complex_trigger;
// const ob_type = attributes.ob_type;
// const update = {};
update["complex_ob_formula"] = "";
if (ob_type === "versus") {
update["complex_ob_formula"] = "d6>4";
}
if (ob_type === "conflict") {
update["complex_ob_formula"] = "*0";
update["conflict_sub_type"] = "{{might=@{might}}} ";
} else {
update["conflict_sub_type"] = " ";
}
// if (["circles", "resources", "recovery_angry", "recovery_afraid", "recovery_exhausted", "recovery_injured", "recovery_sick"].includes(trigger)) {
// update["complex_conditions_modifier"] = "@{town_conditions_modifier}";
// } else if (ob_type === "conflict") {
// update["complex_conditions_modifier"] = "@{conflict_conditions_modifier}";
// } else {
// update["complex_conditions_modifier"] = "@{conditions_modifier}";
// };
if (ob_type === "simple") {
update["ob_type_template"] = "{{simple=true}}";
} else if (ob_type === "independent") {
update["ob_type_template"] = "{{independent=true}}";
} else if (ob_type === "versus") {
update["ob_type_template"] = "{{versus=true}}";
} else if (ob_type === "conflict") {
update["ob_type_template"] = "{{conflict=true}}";
};
// update["complex_ob_formula"] = "";
// if (ob_type === "versus") {
// update["complex_ob_formula"] = "d6>4";
// }
// if (ob_type === "conflict") {
// update["complex_ob_formula"] = "*0";
// update["conflict_sub_type"] = "{{might=@{might}}} ";
// } else {
// update["conflict_sub_type"] = " ";
// }
setAttrs(update, { silent: true });
});
}
// if (ob_type === "simple") {
// update["ob_type_template"] = "{{simple=true}}";
// } else if (ob_type === "independent") {
// update["ob_type_template"] = "{{independent=true}}";
// } else if (ob_type === "versus") {
// update["ob_type_template"] = "{{versus=true}}";
// } else if (ob_type === "conflict") {
// update["ob_type_template"] = "{{conflict=true}}";
// };
const updateBackpackMod = () => {
const attributes_to_fetch = ["complex_trigger", "backpack_type"];
getAttrs(attributes_to_fetch, attributes => {
const update = {};
const { complex_trigger, backpack_type } = attributes;
update["backpack_mod"] = "0";
if (backpack_type === "backpack" && (complex_trigger === "fighter" || complex_trigger === "dungeoneer")) {
update["backpack_mod"] = "-1[Backpack]";
}
setAttrs(update, { silent: true });
});
}
// setAttrs(update, { silent: true });
// });
// }
const checkStigmata = () => {
const attributes_to_fetch = ["urdr", "burden"];
getAttrs(attributes_to_fetch, attributes => {
const update = {};
const { urdr, burden } = attributes;
update["stigmata_flag"] = "0";
if (urdr < burden) {
update["stigmata_flag"] = "1";
}
setAttrs(update, { silent: true });
});
}
// const updateBackpackMod = () => {
// const attributes_to_fetch = ["complex_trigger", "backpack_type"];
// getAttrs(attributes_to_fetch, attributes => {
// const update = {};
// const { complex_trigger, backpack_type } = attributes;
// update["backpack_mod"] = "0";
// if (backpack_type === "backpack" && (complex_trigger === "fighter" || complex_trigger === "dungeoneer")) {
// update["backpack_mod"] = "-1[Backpack]";
// }
// setAttrs(update, { silent: true });
// });
// }
const initialize = () => {
const attributes_to_fetch = ["initialized"];
getAttrs(attributes_to_fetch, attributes => {
const { initialized } = attributes;
if (initialized) {
return;
}
updateConditions("fresh");
activateComplexRollModal("resources", true);
setAttrs({ initialized: "true" });
});
}
// const checkStigmata = () => {
// const attributes_to_fetch = ["urdr", "burden"];
// getAttrs(attributes_to_fetch, attributes => {
// const update = {};
// const { urdr, burden } = attributes;
// update["stigmata_flag"] = "0";
// if (urdr < burden) {
// update["stigmata_flag"] = "1";
// }
// setAttrs(update, { silent: true });
// });
// }
on("change:will change:health change:nature change:resources change:circles change:alchemist change:arcanist change:armorer change:cartographer change:commander change:cook change:criminal change:dungeoneer change:fighter change:haggler change:healer change:hunter change:loremaster change:manipulator change:mentor change:orator change:pathfinder change:persuader change:rider change:ritualist change:scavenger change:scholar change:survivalist change:theologian change:skill1 change:skill2 change:skill3 change:skill4 change:skill5 change:scout change:laborer change:peasant change:sapper", function (eventinfo) {
const attribute_base = eventinfo.sourceAttribute;
scrubAdvancement(attribute_base);
});
// on("change:will change:health change:nature change:resources change:circles change:alchemist change:arcanist change:armorer change:cartographer change:commander change:cook change:criminal change:dungeoneer change:fighter change:haggler change:healer change:hunter change:loremaster change:manipulator change:mentor change:orator change:pathfinder change:persuader change:rider change:ritualist change:scavenger change:scholar change:survivalist change:theologian change:skill1 change:skill2 change:skill3 change:skill4 change:skill5 change:scout change:laborer change:peasant change:sapper", function (eventinfo) {
// const attribute_base = eventinfo.sourceAttribute;
// scrubAdvancement(attribute_base);
// });
on("change:will_pass change:will_fail change:health_pass change:health_fail change:nature_pass change:nature_fail change:resources_pass change:resources_fail change:circles_pass change:circles_fail change:alchemist_pass change:arcanist_pass change:armorer_pass change:cartographer_pass change:commander_pass change:cook_pass change:criminal_pass change:dungeoneer_pass change:fighter_pass change:haggler_pass change:healer_pass change:hunter_pass change:loremaster_pass change:manipulator_pass change:mentor_pass change:orator_pass change:pathfinder_pass change:persuader_pass change:rider_pass change:ritualist_pass change:scavenger_pass change:scholar_pass change:survivalist_pass change:theologian_pass change:skill1_pass change:skill2_pass change:skill3_pass change:skill4_pass change:skill5_pass change:alchemist_fail change:arcanist_fail change:armorer_fail change:cartographer_fail change:commander_fail change:cook_fail change:criminal_fail change:dungeoneer_fail change:fighter_fail change:haggler_fail change:healer_fail change:hunter_fail change:loremaster_fail change:manipulator_fail change:mentor_fail change:orator_fail change:pathfinder_fail change:persuader_fail change:rider_fail change:ritualist_fail change:scavenger_fail change:scholar_fail change:survivalist_fail change:theologian_fail change:skill1_fail change:skill2_fail change:skill3_fail change:skill4_fail change:skill5_fail change:scout_pass change:scout_fail change:laborer_pass change:laborer_fail change:peasant_pass change:peasant_fail change:sapper_pass change:sapper_fail", function (eventinfo) {
const attribute_base = eventinfo.sourceAttribute.replace(/_pass|_fail/g, '');
checkAdvancement(attribute_base);
});
// on("change:will_pass change:will_fail change:health_pass change:health_fail change:nature_pass change:nature_fail change:resources_pass change:resources_fail change:circles_pass change:circles_fail change:alchemist_pass change:arcanist_pass change:armorer_pass change:cartographer_pass change:commander_pass change:cook_pass change:criminal_pass change:dungeoneer_pass change:fighter_pass change:haggler_pass change:healer_pass change:hunter_pass change:loremaster_pass change:manipulator_pass change:mentor_pass change:orator_pass change:pathfinder_pass change:persuader_pass change:rider_pass change:ritualist_pass change:scavenger_pass change:scholar_pass change:survivalist_pass change:theologian_pass change:skill1_pass change:skill2_pass change:skill3_pass change:skill4_pass change:skill5_pass change:alchemist_fail change:arcanist_fail change:armorer_fail change:cartographer_fail change:commander_fail change:cook_fail change:criminal_fail change:dungeoneer_fail change:fighter_fail change:haggler_fail change:healer_fail change:hunter_fail change:loremaster_fail change:manipulator_fail change:mentor_fail change:orator_fail change:pathfinder_fail change:persuader_fail change:rider_fail change:ritualist_fail change:scavenger_fail change:scholar_fail change:survivalist_fail change:theologian_fail change:skill1_fail change:skill2_fail change:skill3_fail change:skill4_fail change:skill5_fail change:scout_pass change:scout_fail change:laborer_pass change:laborer_fail change:peasant_pass change:peasant_fail change:sapper_pass change:sapper_fail", function (eventinfo) {
// const attribute_base = eventinfo.sourceAttribute.replace(/_pass|_fail/g, '');
// checkAdvancement(attribute_base);
// });
on("change:will_advancement change:health_advancement change:nature_advancement change:resources_advancement change:circles_advancement change:alchemist_advancement change:arcanist_advancement change:armorer_advancement change:cartographer_advancement change:commander_advancement change:cook_advancement change:criminal_advancement change:dungeoneer_advancement change:fighter_advancement change:haggler_advancement change:healer_advancement change:hunter_advancement change:loremaster_advancement change:manipulator_advancement change:mentor_advancement change:orator_advancement change:pathfinder_advancement change:persuader_advancement change:rider_advancement change:ritualist_advancement change:scavenger_advancement change:scholar_advancement change:survivalist_advancement change:theologian_advancement change:skill1_advancement change:skill2_advancement change:skill3_advancement change:skill4_advancement change:skill5_advancement change:scout_advancement change:laborer_advancement change:peasant_advancement change:sapper_advancement", function (eventinfo) {
const attribute_base = eventinfo.sourceAttribute.replace(/_advancement/g, '');
doAdvancement(attribute_base);
});
// on("change:will_advancement change:health_advancement change:nature_advancement change:resources_advancement change:circles_advancement change:alchemist_advancement change:arcanist_advancement change:armorer_advancement change:cartographer_advancement change:commander_advancement change:cook_advancement change:criminal_advancement change:dungeoneer_advancement change:fighter_advancement change:haggler_advancement change:healer_advancement change:hunter_advancement change:loremaster_advancement change:manipulator_advancement change:mentor_advancement change:orator_advancement change:pathfinder_advancement change:persuader_advancement change:rider_advancement change:ritualist_advancement change:scavenger_advancement change:scholar_advancement change:survivalist_advancement change:theologian_advancement change:skill1_advancement change:skill2_advancement change:skill3_advancement change:skill4_advancement change:skill5_advancement change:scout_advancement change:laborer_advancement change:peasant_advancement change:sapper_advancement", function (eventinfo) {
// const attribute_base = eventinfo.sourceAttribute.replace(/_advancement/g, '');
// doAdvancement(attribute_base);
// });
on("change:alchemist_bl change:arcanist_bl change:armorer_bl change:cartographer_bl change:commander_bl change:cook_bl change:criminal_bl change:dungeoneer_bl change:fighter_bl change:haggler_bl change:healer_bl change:hunter_bl change:loremaster_bl change:manipulator_bl change:mentor_bl change:orator_bl change:pathfinder_bl change:persuader_bl change:rider_bl change:ritualist_bl change:scavenger_bl change:scholar_bl change:survivalist_bl change:theologian_bl change:skill1_bl change:skill2_bl change:skill3_bl change:skill4_bl change:skill5_bl change:scout_bl change:laborer_bl change:peasant_bl change:sapper_bl", function (eventinfo) {
const attribute_base = eventinfo.sourceAttribute.replace(/_bl/g, '');;
checkBeginnersLuck(attribute_base);
});
// on("change:alchemist_bl change:arcanist_bl change:armorer_bl change:cartographer_bl change:commander_bl change:cook_bl change:criminal_bl change:dungeoneer_bl change:fighter_bl change:haggler_bl change:healer_bl change:hunter_bl change:loremaster_bl change:manipulator_bl change:mentor_bl change:orator_bl change:pathfinder_bl change:persuader_bl change:rider_bl change:ritualist_bl change:scavenger_bl change:scholar_bl change:survivalist_bl change:theologian_bl change:skill1_bl change:skill2_bl change:skill3_bl change:skill4_bl change:skill5_bl change:scout_bl change:laborer_bl change:peasant_bl change:sapper_bl", function (eventinfo) {
// const attribute_base = eventinfo.sourceAttribute.replace(/_bl/g, '');;
// checkBeginnersLuck(attribute_base);
// });
on("change:fresh change:hungry_and_thirsty change:angry change:afraid change:exhausted change:injured change:sick change:dead", function (eventinfo) {
updateConditions(eventinfo.sourceAttribute);
});
// on("change:fresh change:hungry_and_thirsty change:angry change:afraid change:exhausted change:injured change:sick change:dead", function (eventinfo) {
// updateConditions(eventinfo.sourceAttribute);
// });
on("change:will_trigger change:health_trigger change:nature_trigger change:resources_trigger change:circles_trigger change:alchemist_trigger change:arcanist_trigger change:armorer_trigger change:cartographer_trigger change:commander_trigger change:cook_trigger change:criminal_trigger change:dungeoneer_trigger change:fighter_trigger change:haggler_trigger change:healer_trigger change:hunter_trigger change:loremaster_trigger change:manipulator_trigger change:mentor_trigger change:orator_trigger change:pathfinder_trigger change:persuader_trigger change:rider_trigger change:ritualist_trigger change:sapper_trigger change:scavenger_trigger change:scholar_trigger change:scout_trigger change:survivalist_trigger change:theologian_trigger change:skill1_trigger change:skill2_trigger change:skill3_trigger change:skill4_trigger change:skill5_trigger change:laborer_trigger change:peasant_trigger change:recovery_angry_trigger change:recovery_afraid_trigger change:recovery_exhausted_trigger change:recovery_injured_trigger change:recovery_sick_trigger ", function (eventinfo) {
activateComplexRollModal(eventinfo.sourceAttribute)
});
// on("change:will_trigger change:health_trigger change:nature_trigger change:resources_trigger change:circles_trigger change:alchemist_trigger change:arcanist_trigger change:armorer_trigger change:cartographer_trigger change:commander_trigger change:cook_trigger change:criminal_trigger change:dungeoneer_trigger change:fighter_trigger change:haggler_trigger change:healer_trigger change:hunter_trigger change:loremaster_trigger change:manipulator_trigger change:mentor_trigger change:orator_trigger change:pathfinder_trigger change:persuader_trigger change:rider_trigger change:ritualist_trigger change:sapper_trigger change:scavenger_trigger change:scholar_trigger change:scout_trigger change:survivalist_trigger change:theologian_trigger change:skill1_trigger change:skill2_trigger change:skill3_trigger change:skill4_trigger change:skill5_trigger change:laborer_trigger change:peasant_trigger change:recovery_angry_trigger change:recovery_afraid_trigger change:recovery_exhausted_trigger change:recovery_injured_trigger change:recovery_sick_trigger ", function (eventinfo) {
// activateComplexRollModal(eventinfo.sourceAttribute)
// });
on("change:close_complex_modal", eventinfo => {
closeComplexRollModal();
})
// on("change:close_complex_modal", eventinfo => {
// closeComplexRollModal();
// })
on("change:skill1_bl change:skill2_bl change:skill3_bl change:skill4_bl change:skill5_bl", eventinfo => {
const update = {};
if (eventinfo.newValue === "[[round(@{will}/2)]][Will]") {
update[eventinfo.sourceAttribute + "_d"] = "w";
} else if (eventinfo.newValue === "[[round(@{health}/2)]][Health]") {
update[eventinfo.sourceAttribute + "_d"] = "h";
}
setAttrs(update, { silent: true });
});
// on("change:skill1_bl change:skill2_bl change:skill3_bl change:skill4_bl change:skill5_bl", eventinfo => {
// const update = {};
// if (eventinfo.newValue === "[[round(@{will}/2)]][Will]") {
// update[eventinfo.sourceAttribute + "_d"] = "w";
// } else if (eventinfo.newValue === "[[round(@{health}/2)]][Health]") {
// update[eventinfo.sourceAttribute + "_d"] = "h";
// }
// setAttrs(update, { silent: true });
// });
on("change:trait_mod change:trait_mod_type change:persona_mod change:persona_mod_number change:nature_mod change:help_mod change:help_mod_number change:gear_mod change:gear_mod_number change:party_hungry_and_thirsty_mod change:home_town_mod change:enchanted_item_mod change:invocation_mod change:spell_mod change:level_benefit_mod change:dim_light_mod change:evil_gm_factor_mod change:other_mod change:other_mod_number change:backpack_type", eventinfo => {
updateModifiers(eventinfo.sourceAttribute);
});
// on("change:trait_mod change:trait_mod_type change:persona_mod change:persona_mod_number change:nature_mod change:help_mod change:help_mod_number change:gear_mod change:gear_mod_number change:party_hungry_and_thirsty_mod change:home_town_mod change:enchanted_item_mod change:invocation_mod change:spell_mod change:level_benefit_mod change:dim_light_mod change:evil_gm_factor_mod change:other_mod change:other_mod_number change:backpack_type", eventinfo => {
// updateModifiers(eventinfo.sourceAttribute);
// });
on("change:exhausted change:hungry_and_thirsty change:party_hungry_and_thirsty_mod change:dim_light_mod change:evil_gm_factor_mod change:other_mod change:other_successes", eventinfo => {
updateSuccessMod(eventinfo.sourceAttribute);
updateModifiers(eventinfo.sourceAttribute);
});
// on("change:exhausted change:hungry_and_thirsty change:party_hungry_and_thirsty_mod change:dim_light_mod change:evil_gm_factor_mod change:other_mod change:other_successes", eventinfo => {
// updateSuccessMod(eventinfo.sourceAttribute);
// updateModifiers(eventinfo.sourceAttribute);
// });
on("change:ob_type", eventinfo => {
updateObType();
});
// on("change:ob_type", eventinfo => {
// updateObType();
// });
on("change:backpack_type", eventinfo => {
updateBackpackMod();
});
// on("change:backpack_type", eventinfo => {
// updateBackpackMod();
// });
on("change:urdr change:burden", eventinfo => {
checkStigmata();
})
// on("change:urdr change:burden", eventinfo => {
// checkStigmata();
// })
+17
View File
@@ -0,0 +1,17 @@
const tablist = ["anatomy", "kit", "magic", "relationships", "levels", "roll"];
tablist.forEach(button => {
on(`clicked:${button}`, function () {
setAttrs({
tab: button
});
});
});
const modeList = ["editing", "playing"];
modeList.forEach(button => {
on(`clicked:${button}`, function () {
setAttrs({
edit: button
});
});
});
@@ -2,7 +2,7 @@
include ./../pages/tabs.pug
// PAGE 1 - ANATOMY
include ./../pages/anatomy.pug
include ./../pages/anatomy/anatomy.pug
// PAGE 2 - KIT
include ./../pages/kit.pug
@@ -16,8 +16,8 @@
// PAGE 5 - LEVEL REQUIREMENTS & BENEFITS
include ./../pages/levels.pug
// PAGE 6 - OPTIONS
include ./../pages/options.pug
// PAGE 5 - LEVEL REQUIREMENTS & BENEFITS
include ./../pages/roll.pug
// HIDDEN FIELDS
include ./../pages/hidden.pug
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,100 @@
.sheet-abilities
.sheet-section-header Abilities
.sheet-abilities-section
// Raw Abilities
.sheet-raw-abilities
.sheet-table-header
.sheet-skill-name Raw Abilities
.sheet-rating Rating
.sheet-advancement Advancement
.sheet-table-body
.sheet-table-row
+ability("Will", "will", 6)
.sheet-table-row
+ability("Health", "health", 6)
.sheet-table-row
.sheet-skill-name.sheet-nature-name Nature
.sheet-nature-rating
input.sheet-edit(
value!="1"
name="attr_taxed_nature"
type="number"
)
span.sheet-play.sheet-handwritten(name="attr_taxed_nature")
.sheet-slash /
input.sheet-edit(
value!="1"
name="attr_nature"
type="number"
)
span.sheet-play.sheet-handwritten(name="attr_nature")
.sheet-advancement
input.sheet-advancement-flag(
name="attr_nature"
type="hidden"
)
.sheet-pass
div <strong>P</strong>:
+zeroPip("nature_pass")
each _, i in Array(7)
+pip("nature_pass", i).sheet-hidden
.sheet-fail
div <strong>F</strong>:
+zeroPip("nature_fail")
each _, i in Array(7)
+pip("nature_fail", i).sheet-hidden
// Town Abilities
.sheet-town-abilities
.sheet-table-header
.sheet-skill-name Town Abilities
.sheet-rating Rating
.sheet-advancement Advancement
.sheet-table-body
.sheet-table-row
+ability("Resources", "resources", 9)
.sheet-table-row
+ability("Circles", "circles", 9)
.sheet-table-row
.sheet-skill-name Precedence
.sheet-rating
input.sheet-edit(
value!="0"
name="attr_precedence"
type="number"
)
span.sheet-play.sheet-handwritten(name="attr_precedence")
.sheet-skill-name Might
.sheet-rating
input.sheet-edit(
value!="3"
name="attr_might"
type="number"
)
span.sheet-play.sheet-handwritten(name="attr_might")
// Nature
.sheet-nature-section
.sheet-descriptors-label Nature Descriptors:
.sheet-descriptors
.sheet-nature-descriptor
input.sheet-edit(
name="attr_nature_descriptor_1"
type="text"
)
span.sheet-play.sheet-handwritten(name="attr_nature_descriptor_1")
.sheet-nature-descriptor
input.sheet-edit(
name="attr_nature_descriptor_2"
type="text"
)
span.sheet-play.sheet-handwritten(name="attr_nature_descriptor_2")
.sheet-nature-descriptor
input.sheet-edit(
name="attr_nature_descriptor_3"
type="text"
)
span.sheet-play.sheet-handwritten(name="attr_nature_descriptor_3")
@@ -0,0 +1,16 @@
.sheet-anatomy-tab
.sheet-anatomy-columns
.sheet-column-left
include who_you_are.pug
include what_you_fight_for.pug
include traits.pug
.sheet-column-center
include fate.pug
include conditions.pug
include checks.pug
.sheet-column-right
include abilities.pug
include skills.pug
include wises.pug
@@ -0,0 +1,124 @@
mixin zeroPip(attr)
label.sheet-pip.sheet-pip-zero&attributes(attributes) X
input(
checked="checked"
value="0"
name="attr_" + attr
type="radio"
)
mixin pip(attr, index)
label.sheet-pip(class="sheet-" + index)&attributes(attributes)
input(
value=index
name="attr_" + attr
type="radio"
)
mixin ability(label, attr, max)
.sheet-skill-name #{label}
.sheet-rating
input.sheet-edit(
value!="0"
name="attr_" + attr
type="number"
)
span.sheet-play.sheet-handwritten(name="attr_" + attr)
.sheet-advancement
input.sheet-advancement-flag(
name="attr_" + attr
type="hidden"
)
.sheet-pass
div <strong>P</strong>:
+zeroPip(attr + "_pass")
each _, i in Array(max)
+pip(attr + "_pass", i).sheet-hidden
.sheet-fail
div <strong>F</strong>:
+zeroPip(attr + "_fail")
each _, i in Array(max)
+pip(attr + "_fail", i).sheet-hidden
mixin skill(label, attr, bl)
.sheet-skill-name #{label}
.sheet-rating
input.sheet-edit(
value!="0"
name="attr_" + attr
type="number"
)
span.sheet-play.sheet-handwritten(name="attr_" + attr)
.sheet-advancement
input.sheet-advancement-flag(
name="attr_" + attr
type="hidden"
)
input.sheet-nature-flag(
name="attr_nature"
type="hidden"
)
.sheet-pass
div <strong>P</strong>:
+zeroPip(attr + "_pass")
each _, i in Array(7)
+pip(attr + "_pass", i).sheet-hidden
.sheet-fail
div <strong>F</strong>:
+zeroPip(attr + "_fail")
each _, i in Array(7)
+pip(attr + "_fail", i).sheet-hidden
.sheet-bl
div <strong>BL</strong>:
+zeroPip(attr + "_bl")
each _, i in Array(7)
+pip(attr + "_bl", i).sheet-hidden
.sheet-bl-root #{bl}
mixin customSkill(skillNum)
.sheet-skill-name
input.sheet-edit(
name="attr_skill" + skillNum + "_name"
placeholder="Skill..."
type="text"
)
span.sheet-play(name="attr_skill" + skillNum + "_name")
.sheet-rating
input.sheet-edit(
value!="0"
name="attr_skill" + skillNum
type="number"
)
span.sheet-play.sheet-handwritten(name="attr_skill" + skillNum)
.sheet-advancement
input.sheet-advancement-flag(
name="attr_skill" + skillNum
type="hidden"
)
input.sheet-nature-flag(
name="attr_nature"
type="hidden"
)
.sheet-pass
div <strong>P</strong>:
+zeroPip("skill" + skillNum)
each _, i in Array(7)
+pip("skill" + skillNum + "_pass", i).sheet-hidden
.sheet-fail
div <strong>F</strong>:
+zeroPip("skill" + skillNum + "_fail")
each _, i in Array(7)
+pip("skill" + skillNum + "_fail", i).sheet-hidden
.sheet-bl
div <strong>BL</strong>:
+zeroPip("skill" + skillNum + "_bl")
each _, i in Array(7)
+pip("skill" + skillNum + "_bl", i).sheet-hidden
.sheet-bl-root
span.sheet-play(name="attr_skill" + skillNum + "_bl_d")
select(name="attr_skill" + skillNum + "_bl_d").sheet-edit
option(
selected="selected"
value!="W"
) W
option(value!="H") H
@@ -0,0 +1,11 @@
.sheet-checks
.sheet-sub-header Earning Checks
.sheet-checks-content <strong>1</strong>: -1D to your ind. or versus test
.sheet-checks-content <strong>2</strong>: +2D to opponent's versus test
.sheet-checks-content <strong>2</strong>: Break versus test tie in opponent's favor
.sheet-sub-header Spending Checks
.sheet-checks-content <strong>1</strong>: One test or conflict during camp phase
.sheet-checks-content <strong>1</strong>: Recover when entering town
.sheet-footer www.TorchbearerRPG.com
@@ -0,0 +1,26 @@
mixin condition(attr, name, desc, recovery)
.sheet-condition-row
.sheet-condition-row-top
input(
name="attr_" + attr
type="checkbox"
)
.sheet-condition-name #{name}
.sheet-condition-recovery #{recovery}
.sheet-condition-row-bottom
.sheet-condition-effect #{desc}
.sheet-conditions
.sheet-section-header Conditions
.sheet-body
.sheet-conditions-labels
.sheet-condition-label Condition
.sheet-recovery-label Recovery
+condition("fresh", "Fresh", "+1D all tests until other condition.")
+condition("hungry_and_thirsty", "Hungry and Thirsty", "-1S to disposition to any conflict.")
+condition("angry", "Angry", "No wises or beneficial traits.", "Will Ob 2")
+condition("afraid", "Afraid", "No help or use Beginner's Luck.", "Will Ob 3")
+condition("exhausted", "Exhausted", "-1S to disposition to any conflict; may not use instinct for free.", "Health Ob 3")
+condition("injured", "Injured", "1D to skills, Nature, Will, and Health (but not recovery).", "Health Ob 4")
+condition("sick", "Angry", "-1D to skills, Nature, Will, and Health (but not recovery); cannot practice, learn, or advance.", "Will Ob 3")
+condition("dead", "Dead", "May not test, help, or use wises.")
@@ -0,0 +1,44 @@
.sheet-fate
.sheet-logo
.sheet-fate-section
.sheet-sub-header Fate
.sheet-fate-titles
div Current Total
div Total Spent
.sheet-fate-totals
.sheet-box
input.sheet-fate-input(
min="0"
name="attr_fate_current"
type="number"
value="0"
)
.sheet-box
input.sheet-fate-input(
min="0"
name="attr_fate_spent"
type="number"
value="0"
)
.sheet-fate-details Spend one point to reroll all 6s as new dice, use a wise or learn from help.
.sheet-persona-section
.sheet-sub-header Persona
.sheet-fate-titles
div Current Total
div Total Spent
.sheet-fate-totals
.sheet-box
input.sheet-fate-input(
min="0"
name="attr_persona_current"
type="number"
value="0"
)
.sheet-box
input.sheet-fate-input(
min="0"
name="attr_persona_spent"
type="number"
value="0"
)
.sheet-fate-details Spend one point to add 1D, tap nature, or use a wise. You may spend up to three points to add up to 3D per roll.
@@ -0,0 +1,86 @@
.sheet-skills
.sheet-section-header Skills
.sheet-skills-section
.sheet-skills-column
.sheet-table-header
.sheet-skill-name Skill
.sheet-rating Rating
.sheet-advancement Advancement
.sheet-bl-root BL
.sheet-table-body
.sheet-table-row
+skill("Alchemist", "alchemist", "W")
.sheet-table-row
+skill("Arcanist", "arcanist", "W")
.sheet-table-row
+skill("Armorer", "armorer", "H")
.sheet-table-row
+skill("Cartographer", "cartographer", "W")
.sheet-table-row
+skill("Commander", "commander", "W")
.sheet-table-row
+skill("Cook", "cook", "W")
.sheet-table-row
+skill("Criminal", "criminal", "H")
.sheet-table-row
+skill("Dungeoneer", "dungeoneer", "H")
.sheet-table-row
+skill("Fighter", "fighter", "H")
.sheet-table-row
+skill("Haggler", "haggler", "W")
.sheet-table-row
+skill("Healer", "healer", "W")
.sheet-table-row
+skill("Hunter", "hunter", "H")
.sheet-table-row
+skill("Laborer", "laborer", "H")
.sheet-table-row
+skill("Lore Master", "lore_master", "W")
.sheet-table-row
+skill("Manipulator", "manipulator", "W")
.sheet-table-row
+skill("Mentor", "mentor", "W")
.sheet-table-row
+skill("Orator", "orator", "W")
.sheet-skills-column
.sheet-table-header
.sheet-skill-name Skill
.sheet-rating Rating
.sheet-advancement Advancement
.sheet-bl-root BL
.sheet-table-body
.sheet-table-row
+skill("Pathfinder", "pathfinder", "H")
.sheet-table-row
+skill("Peasant", "peasant", "H")
.sheet-table-row
+skill("Persuader", "persuader", "W")
.sheet-table-row
+skill("Rider", "rider", "H")
.sheet-table-row
+skill("Ritualist", "ritualist", "W")
.sheet-table-row
+skill("Sapper", "sapper", "H")
.sheet-table-row
+skill("Scavenger", "scavenger", "H")
.sheet-table-row
+skill("Scholar", "scholar", "W")
.sheet-table-row
+skill("Scout", "scout", "W")
.sheet-table-row
+skill("Survivalist", "survivalist", "H")
.sheet-table-row
+skill("Theologian", "theologian", "W")
each i in [1, 2, 3, 4, 5]
.sheet-table-row
+customSkill(i)
.sheet-skills-footer
.sheet-footer-left
.sheet-footer-pass <strong>P</strong>= Pass; successful tests
.sheet-footer-fail <strong>F</strong>= Fail; failed tests
.sheet-footer-right <strong>Advancement requires</strong>: Passed tests equal to the skill rank and failed tests equal to one less than the rank. <strong>Learning a new skill requires</strong>: tests equal to untaxed Nature rank.
@@ -0,0 +1,58 @@
include anatomy_mixins
.sheet-traits
.sheet-section-header Traits
.sheet-section-body
.sheet-table-header
.sheet-trait-name-header Trait name
.sheet-trait-level-header Trait level
.sheet-trait-uses-and-checks
.sheet-trait-uses-header Beneficial uses
.sheet-trait-check-header Checks
.sheet-table-body
each i in [1, 2, 3, 4]
.sheet-trait
.sheet-trait-name-body
input.sheet-edit(
name="attr_trait" + i + "_name"
type="text"
placeholder="Trait..."
)
span.sheet-play.sheet-handwritten(name="attr_trait" + i + "_name")
.sheet-trait-level-body
select.sheet-edit(name="attr_trait" + i + "_level")
option(value!="0") No trait
option(value!="1") 1. +1D per session
option(value!="2") 2. +1D twice per session
option(value!="3") 3. +1s on suc/tie roll
input.sheet-traits-flag(
value!="0"
name="attr_trait" + i + "_level"
type="hidden"
)
.sheet-play.sheet-hidden.sheet-trait-level-1 <strong>1</strong> +1D per session
.sheet-play.sheet-hidden.sheet-trait-level-2 <strong>2</strong> +1D twice per session
.sheet-play.sheet-hidden.sheet-trait-level-3 <strong>3</strong> +1s on suc/tie roll
.sheet-trait-uses-and-checks
.sheet-trait-uses-body
input.sheet-traits-flag(
value!="0"
name="attr_trait" + i + "_level"
type="hidden"
)
+zeroPip("trait" + i + "_uses").sheet-hidden.sheet-trait-level-1.sheet-trait-level-2
+pip("trait" + i + "_uses", "1").sheet-hidden.sheet-trait-level-1.sheet-trait-level-2
+pip("trait" + i + "_uses", "2").sheet-hidden.sheet-trait-level-2
.sheet-hidden.sheet-trait-level-3 All appropriate tests
.sheet-trait-check-body
input.sheet-traits-flag(
value!="0"
name="attr_trait" + i + "_level"
type="hidden"
)
+zeroPip("trait" + i + "_checks").sheet-hidden.sheet-trait-level-1.sheet-trait-level-2.sheet-trait-level-3
+pip("trait" + i + "_checks", "1").sheet-hidden.sheet-trait-level-1.sheet-trait-level-2.sheet-trait-level-3
+pip("trait" + i + "_checks", "2").sheet-hidden.sheet-trait-level-1.sheet-trait-level-2.sheet-trait-level-3
+pip("trait" + i + "_checks", "3").sheet-hidden.sheet-trait-level-1.sheet-trait-level-2.sheet-trait-level-3
.sheet-footer © 2020 Luke Crane, Thor Olavsrud.
@@ -0,0 +1,46 @@
.sheet-what-you-fight-for
.sheet-section-header What You Fight For
.sheet-section-body
// Belief
.sheet-subsection
.sheet-sub-header Belief
.sheet-sub-text Uphold your belief in your actions and earn a fate point
textarea.sheet-edit(
name="attr_belief"
type="text"
placeholder="Belief..."
)
span.sheet-handwritten.sheet-play(name="attr_belief")
// Creed
.sheet-subsection
.sheet-sub-header Creed
.sheet-sub-text Uphold your belief in your actions and earn a fate point
textarea.sheet-edit(
name="attr_creed"
type="text"
placeholder="Opens at 3rd level..."
)
span.sheet-handwritten.sheet-play(name="attr_creed")
// Goal
.sheet-subsection
.sheet-sub-header Goal
.sheet-sub-text Accomplish a goal to earn a persona point
textarea.sheet-edit(
name="attr_goal"
type="text"
placeholder="Goal..."
)
span.sheet-handwritten.sheet-play(name="attr_goal")
// Instinct
.sheet-subsection
.sheet-sub-header Instinct
.sheet-sub-text Use an instinct to aid the group and earn a fate point
textarea.sheet-edit(
name="attr_instinct"
type="text"
placeholder="Instinct..."
)
span.sheet-handwritten.sheet-play(name="attr_instinct")
@@ -0,0 +1,33 @@
mixin whoYouAre(prefix, attribute)
.sheet-field
.sheet-prefix #{prefix}:
input.sheet-edit(
name="attr_" + attribute
type="text"
placeholder= prefix + "..."
)
span.sheet-play.sheet-handwritten(name="attr_" + attribute)
.sheet-who-you-are
.sheet-section-header Who You Are
.sheet-section-body
.sheet-section-column
+whoYouAre("Name", "character_name")
+whoYouAre("Stock", "stock")
+whoYouAre("Class", "class")
+whoYouAre("Age", "age")
+whoYouAre("Home", "home")
.sheet-section-column
+whoYouAre("Parents", "parents")
+whoYouAre("Mentor", "mentor_person")
+whoYouAre("Friend", "friend")
+whoYouAre("Enemy", "enemy")
.sheet-field
.sheet-prefix Level:
input.sheet-edit(
name="attr_level"
type="number"
placeholder="1"
)
span.sheet-play.sheet-handwritten(name="attr_level")
+whoYouAre("Raiment", "raiment")
@@ -0,0 +1,49 @@
mixin wise(i)
.sheet-wise
.sheet-wise-name
input.sheet-textinput.sheet-edit(
name="attr_wise" + i + "_name"
type="text"
placeholder="Wise..."
)
span.sheet-play.sheet-handwritten(name="attr_wise" + i + "_name")
.sheet-wise-xp
.sheet-wise-xp-section
input(
value!="1"
name="attr_wise" + i + "_pass"
type="checkbox"
)
.sheet-wise-label Pass
.sheet-wise-xp-section
input(
value!="1"
name="attr_wise" + i + "_fail"
type="checkbox"
)
.sheet-wise-label Fail
.sheet-wise-xp-section
input(
value!="1"
name="attr_wise" + i + "_fate"
type="checkbox"
)
.sheet-wise-label Fate
.sheet-wise-xp-section
input(
value!="1"
name="attr_wise" + i + "_perspna"
type="checkbox"
)
.sheet-wise-label Persona
.sheet-wises
.sheet-section-header Wises
.sheet-wises-body
+wise(1)
+wise(2)
.sheet-wises-body
+wise(3)
+wise(4)
+93 -93
View File
@@ -1,93 +1,93 @@
input(
name="attr_roll_template_conditions"
type="hidden"
)
input(
name="attr_conditions_modifier"
type="hidden"
)
input(
name="attr_town_conditions_modifier"
type="hidden"
)
input(
name="attr_conflict_conditions_modifier"
type="hidden"
)
input(
name="attr_complex_trigger"
type="hidden"
)
input(
value="0"
name="attr_complex_trigger_mod"
type="hidden"
)
input(
name="attr_complex_trigger_display"
type="hidden"
)
input(
value=""
name="attr_complex_mods"
type="hidden"
)
input(
value="@{conditions_modifier}"
name="attr_complex_conditions_modifier"
type="hidden"
)
input(
name="attr_roll_template_complex_mods"
type="hidden"
)
input(
value=""
name="attr_complex_ob_formula"
type="hidden"
)
input(
value=""
name="attr_ob_type_template"
type="hidden"
)
input(
value="0"
name="attr_success_mod"
type="hidden"
)
input(
value="{{disposition=[[@{success_mod_base}]]}}"
name="attr_success_mod_rolltemplate"
type="hidden"
)
input(
value="0"
name="attr_backpack_mod"
type="hidden"
)
input(
value=""
name="attr_bl_prefix"
type="hidden"
)
input(
value=""
name="attr_bl_suffix"
type="hidden"
)
input(
value="false"
name="attr_initialized"
type="hidden"
)
input(
value=""
name="attr_other_mod_operator"
type="hidden"
)
input(
value=""
name="attr_other_successes_operator"
type="hidden"
)
//- input(
//- name="attr_roll_template_conditions"
//- type="hidden"
//- )
//- input(
//- name="attr_conditions_modifier"
//- type="hidden"
//- )
//- input(
//- name="attr_town_conditions_modifier"
//- type="hidden"
//- )
//- input(
//- name="attr_conflict_conditions_modifier"
//- type="hidden"
//- )
//- input(
//- name="attr_complex_trigger"
//- type="hidden"
//- )
//- input(
//- value="0"
//- name="attr_complex_trigger_mod"
//- type="hidden"
//- )
//- input(
//- name="attr_complex_trigger_display"
//- type="hidden"
//- )
//- input(
//- value=""
//- name="attr_complex_mods"
//- type="hidden"
//- )
//- input(
//- value="@{conditions_modifier}"
//- name="attr_complex_conditions_modifier"
//- type="hidden"
//- )
//- input(
//- name="attr_roll_template_complex_mods"
//- type="hidden"
//- )
//- input(
//- value=""
//- name="attr_complex_ob_formula"
//- type="hidden"
//- )
//- input(
//- value=""
//- name="attr_ob_type_template"
//- type="hidden"
//- )
//- input(
//- value="0"
//- name="attr_success_mod"
//- type="hidden"
//- )
//- input(
//- value="{{disposition=[[@{success_mod_base}]]}}"
//- name="attr_success_mod_rolltemplate"
//- type="hidden"
//- )
//- input(
//- value="0"
//- name="attr_backpack_mod"
//- type="hidden"
//- )
//- input(
//- value=""
//- name="attr_bl_prefix"
//- type="hidden"
//- )
//- input(
//- value=""
//- name="attr_bl_suffix"
//- type="hidden"
//- )
//- input(
//- value="false"
//- name="attr_initialized"
//- type="hidden"
//- )
//- input(
//- value=""
//- name="attr_other_mod_operator"
//- type="hidden"
//- )
//- input(
//- value=""
//- name="attr_other_successes_operator"
//- type="hidden"
//- )
+99 -96
View File
@@ -1,19 +1,14 @@
include ./kit_mixin.pug
include kit_mixin.pug
.sheet-kit-tab
.sheet-section-header Inventory
.sheet-section-body
// FIRST COLUMN
.sheet-kit-column
// Head & Hands
.sheet-kit-inventory-group
// Head
.sheet-kit-group
.sheet-kit-header Head
+kit_item("head1", "Head", "Worn")
// Neck
.sheet-kit-group
.sheet-kit-header Neck
+kit_item("neck1", "Neck", "Worn")
// Hands
.sheet-kit-group
.sheet-kit-header Hands
@@ -21,13 +16,27 @@ include ./kit_mixin.pug
+kit_item("hands2", "Hands", "Worn")
+kit_item("hands3", "Hands", "Carried")
+kit_item("hands4", "Hands", "Carried")
// Feet
// Neck & Belt
.sheet-kit-inventory-group
// Neck
.sheet-kit-group
.sheet-kit-header Feet
+kit_item("feet1", "Feet", "Worn")
// SECOND COLUMN
.sheet-kit-column
.sheet-kit-header Neck
+kit_item("neck1", "Neck", "Worn")
// Belt
.sheet-kit-header Belt
+kit_item("belt1", "Belt", "1")
+kit_item("belt2", "Belt", "2")
+kit_item("belt3", "Belt", "3")
.sheet-kit-subtext <strong>Belt items</strong>: belt 1, pack 1, or weapon 1. Bundled pack items must be kept in a purse or pouch.
// Pouch & Torso & Feet
.sheet-kit-inventory-group
// Pouch
.sheet-kit-group
.sheet-kit-header Pouch
+kit_item("pocket1", "Pouch", "Trinkets")
// Torso
.sheet-kit-group
.sheet-kit-header Torso
input.sheet-flag.sheet-backpack-flag(
@@ -51,92 +60,86 @@ include ./kit_mixin.pug
.sheet-hidden.sheet-none.sheet-satchel
+kit_item("torso2", "Torso", "Worn")
+kit_item("torso3", "Torso", "Worn")
// Feet
.sheet-kit-group
.sheet-kit-header Belt
+kit_item("belt1", "Belt", "1")
+kit_item("belt2", "Belt", "2")
+kit_item("belt3", "Belt", "3")
.sheet-kit-subtext <strong>Belt items</strong>: belt 1, pack 1, or weapon 1. Bundled pack items must be kept in a purse or pouch.
.sheet-kit-group
.sheet-kit-header Pouch
+kit_item("pocket1", "Pouch", "Trinkets")
.sheet-kit-header Feet
+kit_item("feet1", "Feet", "Worn")
// THIRD COLUMN
.sheet-kit-column
.sheet-kit-group
// Backpack selector
input.sheet-flag.sheet-backpack-flag(
value="none"
name="attr_backpack_type"
type="hidden"
)
.sheet-hidden.sheet-none.sheet-kit-header No bag
.sheet-hidden.sheet-satchel.sheet-kit-header Satchel
.sheet-hidden.sheet-backpack.sheet-kit-header Backpack
.sheet-bag-options.sheet-edit
.sheet-bag-option
input(
checked=""
value="none"
name="attr_backpack_type"
type="radio"
)
.sheet-kit-subtext No bag
.sheet-bag-option
input(
value="satchel"
name="attr_backpack_type"
type="radio"
)
.sheet-kit-subtext Satchel
.sheet-bag-option
input(
value="backpack"
name="attr_backpack_type"
type="radio"
)
.sheet-kit-subtext Backpack
.sheet-hidden.sheet-satchel.sheet-kit-subtext <strong>Satchel</strong>: torso/worn 1
.sheet-hidden.sheet-backpack.sheet-kit-subtext <strong>Backpack</strong>: torse/worn 2. <em>Factor for Dungeoneer and Fighter</em>.
.sheet-carried-options
.sheet-carried-option
input(
value="carried"
name="attr_backpack_carry_option"
type="radio"
)
.sheet-kit-subtext Carried
.sheet-carried-option
input(
value="dropped"
name="attr_backpack_carry_option"
type="radio"
)
.sheet-kit-subtext Dropped
.sheet-carried-option
input(
value="lost"
name="attr_backpack_carry_option"
type="radio"
)
.sheet-kit-subtext Lost
// Backpack
.sheet-kit-group
// Backpack selector
input.sheet-flag.sheet-backpack-flag(
value="none"
name="attr_backpack_type"
type="hidden"
)
.sheet-hidden.sheet-none.sheet-kit-header No bag
.sheet-hidden.sheet-satchel.sheet-kit-header Satchel
.sheet-hidden.sheet-backpack.sheet-kit-header Backpack
.sheet-bag-options.sheet-edit
.sheet-bag-option
input(
checked=""
value="none"
name="attr_backpack_type"
type="radio"
)
.sheet-kit-subtext No bag
.sheet-bag-option
input(
value="satchel"
name="attr_backpack_type"
type="radio"
)
.sheet-kit-subtext Satchel
.sheet-bag-option
input(
value="backpack"
name="attr_backpack_type"
type="radio"
)
.sheet-kit-subtext Backpack
.sheet-hidden.sheet-satchel.sheet-kit-subtext <strong>Satchel</strong>: torso/worn 1
.sheet-hidden.sheet-backpack.sheet-kit-subtext <strong>Backpack</strong>: torse/worn 2. <em>Factor for Dungeoneer and Fighter</em>.
.sheet-carried-options
.sheet-carried-option
input(
value="carried"
name="attr_backpack_carry_option"
type="radio"
)
.sheet-kit-subtext Carried
.sheet-carried-option
input(
value="dropped"
name="attr_backpack_carry_option"
type="radio"
)
.sheet-kit-subtext Dropped
.sheet-carried-option
input(
value="lost"
name="attr_backpack_carry_option"
type="radio"
)
.sheet-kit-subtext Lost
// Satchel/backpack
.sheet-hidden.sheet-satchel
+kit_item("backpack1", "Item", "1")
+kit_item("backpack2", "Item", "2")
+kit_item("backpack3", "Item", "3")
// Satchel/backpack
.sheet-hidden.sheet-satchel
+kit_item("backpack1", "Item", "1")
+kit_item("backpack2", "Item", "2")
+kit_item("backpack3", "Item", "3")
.sheet-hidden.sheet-backpack
+kit_item("backpack1", "Item", "1")
+kit_item("backpack2", "Item", "2")
+kit_item("backpack3", "Item", "3")
+kit_item("backpack4", "Item", "4")
+kit_item("backpack5", "Item", "5")
+kit_item("backpack6", "Item", "6")
// Fourth Column
.sheet-kit-column.sheet-containers-column
.sheet-hidden.sheet-backpack
+kit_item("backpack1", "Item", "1")
+kit_item("backpack2", "Item", "2")
+kit_item("backpack3", "Item", "3")
+kit_item("backpack4", "Item", "4")
+kit_item("backpack5", "Item", "5")
+kit_item("backpack6", "Item", "6")
// Containers
.sheet-kit-group.sheet-kit-containers
fieldset(class="repeating_container")
input.sheet-container-flag(
value="small"
+2 -2
View File
@@ -1,4 +1,4 @@
.sheet-magic-tab
include ./relics.pug
include relics.pug
include ./spells.pug
include spells.pug
-26
View File
@@ -1,26 +0,0 @@
.sheet-options-tab
// SHEET SETTINGS
#settings.sheet-section.sheet-levels
.sheet-header
span Sheet Settings
.sheet-section
span.sheet-row.sheet-font-bigger.sheet-bold Roll Style
.sheet-relative
input.sheet-underlined(
checked="checked"
value="complex"
name="attr_roll_type"
type="radio"
)
span
span.sheet-font-small.sheet-status.sheet-bold Complex
span.sheet-font-small.sheet-status.sheet-faint - Uses advanced roll modal
.sheet-relative
input.sheet-underlined(
value="simple"
name="attr_roll_type"
type="radio"
)
span
span.sheet-font-small.sheet-status.sheet-bold Simple
span.sheet-font-small.sheet-status.sheet-faint - Roll directly to chat
+7
View File
@@ -0,0 +1,7 @@
.sheet-roll-tab
.sheet-section-header Roll
.sheet-section-body
.sheet-column-left Left
.sheet-column-center Center
.sheet-column-right Right
+3 -3
View File
@@ -31,10 +31,10 @@ input.sheet-edit-toggle(
type="action"
name="act_levels"
) Level
button.sheet-tab-options(
button.sheet-tab-roll(
type="action"
name="act_options"
) Options
name="act_roll"
) Roll
.sheet-play-edit-buttons
button.sheet-tab-playing(
@@ -1,136 +0,0 @@
/* ABILITIES AND SKILLS */
.sheet-raw-abilities,
.sheet-town-abilities {
display: inline-block;
width: 95px;
padding-right: 5px;
vertical-align: top;
position: relative;
height: 30px;
&.sheet-nature {
width: 80px;
}
input.sheet-edit {
width: 100px;
}
}
.sheet-rating {
display: inline-block;
width: 25px;
margin-right: 10px;
text-align: center;
vertical-align: top;
&.sheet-nature {
width: 40px;
.sheet-edit {
width: 12px !important;
}
}
&:not(.sheet-header-only) {
border-radius: 0;
border-bottom: 2px solid rgba(165, 165, 165, 0.8);
font-size: 1.2em;
line-height: 0.9;
}
}
.sheet-advancement {
display: inline-block;
width: 110px;
line-height: 10px;
position: relative;
.sheet-edit {
width: 68px;
position: absolute;
top: -5px;
right: 0;
select {
width: 68px;
}
}
}
.sheet-nature-descriptor {
display: inline-block;
margin-left: 5px;
&:not(:last-child) span::after {
content: ",";
}
input {
width: 120px;
}
}
.sheet-abilities .sheet-row,
.sheet-skills .sheet-row {
height: 30px;
}
.sheet-might-container {
vertical-align: top;
.sheet-might {
display: inline-block;
margin-right: 15px;
}
input[type="radio"].sheet-editing:checked ~ .sheet-tabcontainer .sheet-might + .sheet-rating {
position: relative;
min-height: 25px;
}
}
.sheet-beginner-checks .sheet-bl-label {
margin-right: -7px;
}
.sheet-skill-footer {
.sheet-footer-left,
.sheet-footer-right {
display: inline-block;
}
.sheet-footer-left {
width: 22.5%;
border-right: 1px solid black;
}
.sheet-footer-right {
width: 76%;
}
.sheet-row {
height: 12px;
}
}
.sheet-roll_type[value="simple"] ~ div .sheet-precedence {
margin-left: 9px;
}
.sheet-column-skills {
width: calc(50% - 2px);
display: inline-block;
vertical-align: top;
}
.sheet-bl-ability {
position: absolute;
right: 14px;
font-size: 0.8em;
}
.sheet-bl-ability-flag[value="w"] ~ .sheet-w,
.sheet-bl-ability-flag[value="h"] ~ .sheet-h {
display: inline-block;
}
@@ -0,0 +1,206 @@
@import '../common.scss';
@import '../variables.scss';
.ui-dialog .tab-content .charsheet .sheet-abilities,
.ui-dialog .tab-content .charsheet .sheet-skills {
@include grey-border;
padding: 4px;
.sheet-abilities-section,
.sheet-skills-section {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.sheet-raw-abilities,
.sheet-town-abilities,
.sheet-skills-column {
flex: 1;
}
.sheet-table-header {
display: flex;
align-items: center;
flex: 1;
flex-wrap: nowrap;
border: none;
}
.sheet-table-body {
display: flex;
flex-direction: column;
flex: 1;
flex-wrap: nowrap;
border: none;
}
.sheet-table-row {
display: flex;
flex-wrap: nowrap;
border: none;
}
.sheet-skill-name {
@include font-1;
font-weight: bold;
min-width: 85px;
flex: 1;
input {
width: 100%;
text-align: left;
}
}
.sheet-table-body .sheet-skill-name {
font-size: 14px;
}
.sheet-rating {
justify-content: center;
display: flex;
min-width: 50px;
}
.sheet-rating,
.sheet-nature-rating {
.sheet-handwritten {
width: 16px;
padding-left: 8px;
border-bottom: 1px solid $grey;
font-size: 16px;
}
}
.sheet-nature-rating {
min-width: 60px;
display: flex;
.sheet-slash {
margin-top: 3px;
margin-left: 3px;
}
}
.sheet-nature-name {
flex: 1;
min-width: 0;
}
input {
text-align: center;
width: 30px;
}
.sheet-advancement {
@include font-1;
min-width: 90px;
}
.sheet-pass,
.sheet-fail,
.sheet-bl {
@include font-1;
font-size: 9px;
display: flex;
gap: 1px;
}
.sheet-bl-root {
@include font-1;
font-size: 12px;
width: 18px;
select {
min-width: 0;
width: 16px;
}
}
@for $i from 1 through 5 {
@for $j from 1 through $i {
.sheet-advancement-flag[value="#{$i}"]~.sheet-pass .sheet-#{$j} {
display: inline-block;
}
}
}
@for $i from 1 through 5 {
@for $j from 1 through $i - 1 {
.sheet-advancement-flag[value="#{$i}"]~.sheet-fail .sheet-#{$j} {
display: inline-block;
}
}
}
@for $i from 1 through 7 {
@for $j from 1 through $i {
.sheet-nature-flag[value="#{$i}"]~.sheet-bl .sheet-#{$j} {
display: inline-block;
}
}
}
.sheet-advancement-flag[value="0"]~.sheet-pass,
.sheet-advancement-flag:not([value])~.sheet-pass,
.sheet-advancement-flag[value="0"]~.sheet-fail,
.sheet-advancement-flag:not([value])~.sheet-fail {
display: none;
}
.sheet-bl {
display: none;
}
.sheet-advancement-flag[value="0"]~.sheet-bl,
.sheet-advancement-flag:not([value])~.sheet-bl {
display: flex;
}
.sheet-nature-section {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.sheet-nature-descriptor input {
width: 70px;
}
.sheet-descriptors-label {
@include font-1;
color: $grey;
font-style: italic;
}
.sheet-descriptors {
display: flex;
gap: 8px;
}
.sheet-skills-section {
height: 575px;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: $background_grey transparent;
}
.sheet-skills-footer {
@include font-1;
display: flex;
font-size: 10px;
.sheet-footer-left {
flex: 1;
}
.sheet-footer-right {
flex: 3;
}
}
}
@@ -0,0 +1,22 @@
@import '../common.scss';
@import '../variables.scss';
.ui-dialog .tab-content .charsheet .sheet-anatomy-tab {
.sheet-anatomy-columns {
display: flex;
}
.sheet-column-left {
flex: 2;
}
.sheet-column-center {
flex: 1;
border-left: 1px solid $grey;
border-right: 1px solid $grey;
}
.sheet-column-right {
flex: 3;
}
}
@@ -0,0 +1,23 @@
@import '../variables.scss';
@import '../common.scss';
.ui-dialog .tab-content .charsheet .sheet-checks {
padding: 4px;
.sheet-sub-header {
font-style: italic;
font-size: 12px;
margin-bottom: 4px;
}
.sheet-checks-content {
@include font-1;
font-size: 10px;
}
.sheet-footer {
text-align: center;
margin: 36px auto 0;
font-size: 10px;
}
}
@@ -0,0 +1,41 @@
@import '../variables.scss';
@import '../common.scss';
.ui-dialog .tab-content .charsheet .sheet-conditions {
@include grey-border;
padding: 4px;
.sheet-conditions-labels {
@include font-1;
font-size: 10px;
color: $grey;
display: flex;
justify-content: space-between;
}
.sheet-condition-row {
margin: 6px 0;
}
.sheet-condition-row-top {
@include font-1;
font-weight: bold;
display: flex;
align-items: center;
gap: 8px;
}
.sheet-condition-recovery {
margin-left: auto;
order: 2;
font-weight: normal;
font-size: 10px;
}
.sheet-condition-row-bottom {
@include font-1;
margin-top: 2px;
font-style: italic;
font-size: 10px;
}
}
+63
View File
@@ -0,0 +1,63 @@
@import '../variables.scss';
@import '../common.scss';
.ui-dialog .tab-content .charsheet .sheet-fate {
@include grey-border;
padding: 4px;
text-align: center;
min-width: 175px;
.sheet-logo {
width: 158px;
height: 53px;
background: url("https://i.imgur.com/5SuVIW0.png");
background-position: center;
background-size: 100% 100%;
margin: 0 auto;
}
.sheet-sub-header {
margin: 0 auto;
}
.sheet-fate-titles, .sheet-fate-details {
@include font-1;
font-style: italic;
font-size: 10px;
margin: 4px 0 0;
}
.sheet-fate-titles {
display: flex;
justify-content: center;
gap: 8px;
padding-right: 4px;
}
.sheet-box {
padding: 4px;
padding-bottom: 6px;
outline: 2px solid $grey;
width: 60px;
}
.sheet-fate-totals {
display: flex;
justify-content: center;
gap: 1px;
}
.sheet-fate-input {
@extend .sheet-handwritten;
font-size: 16px;
text-align: center;
background-color: transparent;
border: none;
border-bottom: 1px solid $grey;
border-radius: 0;
padding-left: 16px;
}
}
@@ -0,0 +1,75 @@
@import '../common.scss';
@import '../variables.scss';
.ui-dialog .tab-content .charsheet .sheet-traits {
margin-right: 4px;
.sheet-table-header {
font-size: 10px;
border-bottom: none;
flex-wrap: wrap;
gap: 0;
}
.sheet-trait {
display: flex;
flex-wrap: wrap;
padding-bottom: 4px;
}
.sheet-trait-name-header, .sheet-trait-name-body {
min-width: 100px;
flex: 1;
}
.sheet-trait-level-header, .sheet-trait-level-body {
min-width: 100px;
flex: 1;
}
.sheet-trait-uses-and-checks {
min-width: 100px;
flex: 1;
display: flex;
}
.sheet-trait-uses-header, .sheet-trait-uses-body {
min-width: 50px;
flex: 1;
}
.sheet-trait-check-header, .sheet-trait-check-body {
min-width: 50px;
flex: 1;
}
.sheet-footer {
margin-top: 32px;
font-size: 10px;
}
// Where is needed for getting the right specificity
:where(.sheet-traits-flag[value="0"]~ .sheet-trait-level-0),
:where(.sheet-traits-flag[value="1"]~ .sheet-trait-level-1),
:where(.sheet-traits-flag[value="2"]~ .sheet-trait-level-2),
:where(.sheet-traits-flag[value="3"]~ .sheet-trait-level-3) {
@include font-1;
display: inline-block;
font-size: 10px;
}
select {
width: 100%;
text-overflow: ellipsis;
height: 18px;
margin: 0;
}
.sheet-trait-name-body input {
width: 100%;
}
.sheet-trait-uses-body, .sheet-trait-check-body {
display: flex;
gap: 1px;
padding-top: 2px;
}
}
@@ -0,0 +1,27 @@
@import '../common.scss';
@import '../variables.scss';
.ui-dialog .tab-content .charsheet .sheet-what-you-fight-for {
@include grey-border;
.sheet-subsection {
margin-bottom: 4px;
}
.sheet-sub-header {
@include font-1;
font-weight: bold;
font-size: 14px;
}
.sheet-sub-text {
@include font-1;
font-style: italic;
font-size: 10px;
color: $grey;
}
.sheet-edit {
height: 50px;
}
}
@@ -0,0 +1,35 @@
@import '../common.scss';
.ui-dialog .tab-content .charsheet .sheet-who-you-are {
@include grey-border;
padding-right: 4px;
.sheet-section-body {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 4px;
}
.sheet-section-column {
min-width: 160px;
}
.sheet-field {
flex: 1;
display: flex;
flex-direction: row;
gap: 8px;
& > input {
flex: 1;
width: 100%;
}
}
.sheet-prefix {
@include font-1;
font-size: 14px;
font-weight: bold;
}
}
@@ -0,0 +1,34 @@
@import '../common.scss';
@import '../variables.scss';
.ui-dialog .tab-content .charsheet .sheet-wises {
@include font-1;
padding: 4px;
.sheet-wise {
flex: 1;
margin: 2px 4px;
}
.sheet-wises-body {
display: flex;
}
.sheet-wise-xp {
display: flex;
gap: 8px;
}
.sheet-wise-xp-section {
font-size: 12px;
display: flex;
gap: 4px;
}
.sheet-wise-name {
@include grey-border;
height: 20px;
}
}
-25
View File
@@ -1,25 +0,0 @@
@import 'variables.scss';
/* Fate Styling */
.sheet-fate {
.sheet-box {
display: inline-block;
padding: 5px;
border: 2px solid $grey;
margin-right: -5px;
width: 60px;
position: relative;
}
.sheet-name-header {
margin-top: 10px;
}
.sheet-compact {
margin-top: 3px;
}
}
.sheet-check-info .sheet-compact {
margin-top: 3px;
}
+72 -1
View File
@@ -20,7 +20,7 @@
background-image: linear-gradient(to right, rgba(216, 216, 216, 0.6), rgba(238, 222, 222, 0));
border-radius: 25px;
padding-left: 8px;
margin: 10px 0 5px;
margin: 8px 0 4px;
}
.sheet-header-2 {
@@ -73,4 +73,75 @@
.sheet-checkbox {
transform: scale(1.2);
}
.sheet-hidden {
display: none;
}
.sheet-edit,
.sheet-edit>select {
background-color: inherit;
padding: 0;
text-indent: 4px;
}
input {
min-width: 0;
}
.sheet-sub-header {
@include font-1;
font-weight: bold;
font-size: 16px;
}
.sheet-sub-header-small {
@include font-1;
font-weight: bold;
font-size: 12px;
}
// These are the buttons used for checks and skills
.sheet-pip {
width: 9px;
height: 9px;
margin: 0;
padding: 0;
background-color: $grey;
order: 1;
z-index: 1;
border: 1px solid black;
border-radius: 100%;
&.sheet-pip-zero {
order: 0;
background-color: white !important;
border: none;
padding-left: 2px;
font-size: 12px;
font-weight: normal;
font-family: $font_family_2;
position: relative;
top: -2px;
text-align: center;
cursor: pointer;
}
&:has(input:checked) {
z-index: 0;
}
&:has(input:checked)~.sheet-pip {
order: 3;
background-color: transparent;
}
input {
position: absolute;
opacity: 0;
width: 9px;
height: 9px;
}
}
}
-91
View File
@@ -1,91 +0,0 @@
@import 'variables.scss';
/* Condition Checkbox Styling */
.sheet-conditions {
.sheet-body {
.sheet-condition {
position: relative;
.sheet-bold {
margin-left: 3px;
}
}
.sheet-leftside {
height: 19px;
display: inline-block;
width: 70%;
}
.sheet-rightside {
height: 19px;
display: inline-block;
width: 27%;
position: relative;
.sheet-complex_roll {
top: 7px;
}
.sheet-simple_roll {
vertical-align: bottom;
}
}
.sheet-right {
text-align: right;
.sheet-complex_roll,
.sheet-complex_roll + span {
width: 60px;
}
}
}
}
.sheet-hidden.sheet-condition-display {
display: none !important;
}
input.sheet-condition-flag[value="1"] + .sheet-condition-display {
display: block !important;
}
.sheet-warning {
background-color: $background_yellow;
border: 1px solid rgba(165, 165, 165, 0.8);
border-radius: 5px;
padding: 5px;
margin: 5px 0;
.sheet-skills {
.sheet-row {
height: 18px;
}
input.sheet-afraid-flag.sheet-condition-flag[value="1"] ~ .sheet-column-skills {
input.sheet-beginner_luck_flag[value="0"] {
~ button,
~ input,
~ input + span {
cursor: not-allowed;
pointer-events: none;
color: $grey;
}
}
}
input.sheet-sick-flag.sheet-condition-flag[value="1"] ~ .sheet-column-skills {
input[type="radio"],
input[type="radio"] + span {
cursor: not-allowed;
pointer-events: none;
color: $grey;
&::before {
background: radial-gradient($grey, $grey);
border: 1px solid $grey;
}
}
}
}
}
+6 -22
View File
@@ -2,29 +2,13 @@
.ui-dialog .tab-content .charsheet .sheet-kit-tab {
.sheet-section-body {
display: flex;
flex-wrap: wrap;
gap: 12px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
gap: 8px;
}
.sheet-kit-column {
min-width: 190px;
max-width: 230px;
.repcontainer {
display: flex;
gap: 12px;
}
.repitem {
min-width: 190px;
max-width: 230px;
}
}
.sheet-containers-column {
flex: 1;
max-width: none;
.repcontainer, .sheet-kit-containers {
display: contents;
}
.sheet-kit-header {
@@ -113,4 +97,4 @@
.sheet-inventory-notes-display {
@include font-1;
}
}
}
+2 -319
View File
@@ -1,5 +1,3 @@
@import 'variables.scss';
// General changes
.nav {
margin-bottom: 0;
@@ -10,324 +8,9 @@
position: relative;
}
/* Layout Styling */
.sheet-container {
width: 100%;
// TODO See if we can reduce this when the page is more responsive
min-width: 1075px;
min-height: 935px;
// min-width: 1075px;
// min-height: 935px;
}
.sheet-edit,
.sheet-edit>select {
background-color: inherit;
padding: 0;
text-indent: 4px;
}
.sheet-hidden {
display: none;
}
// Old Styles
// ----------
/* General Styling */
.sheet-bold {
font-weight: bold;
}
.sheet-italic {
font-style: italic;
}
.sheet-center {
text-align: center;
}
.sheet-font-smallest {
font-size: 0.75em;
}
.sheet-font-smaller {
font-size: 0.8em;
}
.sheet-font-small {
font-size: 0.9em;
}
.sheet-font-big {
font-size: 1.1em;
}
.sheet-font-bigger {
font-size: 1.2em;
}
.sheet-font-biggest {
font-size: 1.4em;
}
span {
font-family: $font_family_1;
letter-spacing: -1px;
}
.sheet-column-2 {
width: calc(49% - 5px);
display: inline-block;
vertical-align: top;
padding-right: 5px;
}
.sheet-column-3 {
width: calc(32% - 5px);
display: inline-block;
vertical-align: top;
padding-right: 5px;
}
.sheet-compact {
display: block;
line-height: 1.2;
}
.sheet-left {
float: left;
}
.sheet-right {
float: right;
}
.sheet-faint {
color: $grey;
}
.sheet-footer {
bottom: 0;
left: 0;
position: absolute;
text-align: center;
width: 100%;
}
.sheet-danger {
color: $red;
}
.sheet-relative {
position: relative;
}
/* Button Styling */
button[type="roll"] {
background-color: $background_transparent;
color: $dark_grey;
border: none;
font-size: 1em !important;
text-align: left;
background-image: none;
text-shadow: none;
box-shadow: none;
padding: 0px;
margin: 0px;
width: 100%;
overflow: hidden;
}
button[type="roll"]::before {
content: "" !important;
}
button[type="roll"]:hover,
input[type="checkbox"].sheet-complex_roll:hover+span.sheet-complex_roll {
color: $blue;
}
.sheet-complex_roll {
position: absolute;
right: 0;
top: 0;
width: 100%;
height: 100%;
}
input[type="checkbox"].sheet-complex_roll {
opacity: 0;
cursor: pointer;
z-index: 10;
height: 100%;
width: 100%;
}
input[type="checkbox"].sheet-underlined,
input[type="radio"].sheet-underlined {
position: absolute;
opacity: 0;
width: 30px;
cursor: pointer;
z-index: 10;
&:checked+span::before {
content: "x";
position: absolute;
top: -4px;
left: 11px;
}
}
/* Header Styling */
.sheet-header {
color: $blue;
font-family: $font_family_1;
font-size: 1.6em;
font-weight: 700;
font-variant: small-caps;
letter-spacing: -2px;
text-shadow: 0 0 2px #bac6e0, 0 0 2px #bac6e0, 0 0 2px #bac6e0,
0 0 2px #bac6e0, 0 0 2px #bac6e0, 0 0 2px #bac6e0, 0 0 2px #bac6e0,
0 0 2px #bac6e0, 0 0 2px #bac6e0, 0 0 2px #bac6e0, 0 0 2px #bac6e0,
0 0 2px #bac6e0, 0 0 2px #bac6e0, 0 0 2px #bac6e0;
background-image: linear-gradient(to right,
rgba(216, 216, 216, 0.6),
rgba(238, 222, 222, 0));
border-radius: 25px;
padding-left: 8px;
margin-top: 5px;
}
.sheet-center-column .sheet-header {
text-align: center;
padding: 0px;
}
/* Handwritten Styling */
.sheet-handwritten {
font-family: $font_family_2;
color: $blue;
font-weight: bold;
text-transform: uppercase;
-webkit-text-stroke-width: 0.3px;
-webkit-text-stroke-color: $blue;
letter-spacing: normal;
}
.sheet-underlined-input,
input[type="checkbox"].sheet-underlined+span,
input[type="radio"].sheet-underlined+span,
.sheet-persona-input {
font-family: $font_family_2;
color: $blue;
font-weight: bold;
text-transform: uppercase;
-webkit-text-stroke-width: 0.3px;
-webkit-text-stroke-color: $blue;
letter-spacing: normal;
background: none;
border-top: none;
border-left: none;
border-right: none;
border-radius: 0px;
border-bottom: 1px solid rgba(165, 165, 165, 0.8);
width: 30px !important;
-webkit-appearance: textfield;
margin: 0;
-moz-appearance: textfield;
text-align: center;
padding: 0px;
font-size: 1.2em;
display: inline-block;
}
.sheet-underlined-input::-webkit-outer-spin-button,
.sheet-underlined-input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
.sheet-persona-input::-webkit-outer-spin-button,
.sheet-persona-input::-webkit-inner-spin-button {
opacity: 1;
}
.sheet-persona-input {
width: 45px !important;
-moz-appearance: number-input;
}
.sheet-persona-input.sheet-edit,
.sheet-underlined-input.sheet-edit {
border: none;
background-color: $background_yellow;
}
.sheet-underlined-select {
font-family: $font_family_2;
color: $blue;
font-weight: bold;
text-transform: uppercase;
-webkit-text-stroke-width: 0.3px;
-webkit-text-stroke-color: $blue;
letter-spacing: normal;
background: none;
border-top: none;
border-left: none;
border-right: none;
border-radius: 0px;
border-bottom: 1px solid rgba(165, 165, 165, 0.8);
padding: 0px;
font-size: 1.2em;
height: 20px;
}
.sheet-left-column {
display: inline-block;
vertical-align: top;
width: 355px;
height: 100%;
border-right: 1px solid rgba(165, 165, 165, 0.8);
position: relative;
}
.sheet-center-column {
display: inline-block;
vertical-align: top;
width: 188px;
margin-left: -5px;
margin-right: -5px;
height: 100%;
position: relative;
}
.sheet-right-column {
display: inline-block;
vertical-align: top;
width: 530px;
height: 100%;
border-left: 1px solid rgba(165, 165, 165, 0.8);
position: relative;
}
.sheet-section {
margin-top: -1px;
border-top: 1px solid rgba(165, 165, 165, 0.8);
padding: 10px;
}
.sheet-traits,
.sheet-fate,
.sheet-check-info {
position: relative;
}
.sheet-logo {
background: url("https://i.imgur.com/5SuVIW0.png");
background-size: 100% 100%;
height: 53px;
width: 98%;
position: absolute;
top: 0;
left: 1%;
}
+3 -3
View File
@@ -42,7 +42,7 @@
.sheet-magic-tab,
.sheet-relationships-tab,
.sheet-levels-tab,
.sheet-options-tab {
.sheet-roll-tab {
display: none;
}
@@ -51,7 +51,7 @@
.sheet-tab-toggle[value="magic"]~.sheet-magic-tab,
.sheet-tab-toggle[value="relationships"]~.sheet-relationships-tab,
.sheet-tab-toggle[value="levels"]~.sheet-levels-tab,
.sheet-tab-toggle[value="options"]~.sheet-options-tab {
.sheet-tab-toggle[value="roll"]~.sheet-roll-tab {
display: block;
}
@@ -60,7 +60,7 @@
.sheet-tab-toggle[value="magic"]~ .sheet-tabs .sheet-tab-magic,
.sheet-tab-toggle[value="relationships"]~ .sheet-tabs .sheet-tab-relationships,
.sheet-tab-toggle[value="levels"]~ .sheet-tabs .sheet-tab-levels,
.sheet-tab-toggle[value="options"]~ .sheet-tabs .sheet-tab-options,
.sheet-tab-toggle[value="roll"]~ .sheet-tabs .sheet-tab-roll,
.sheet-edit-toggle[value="editing"]~ .sheet-tabs .sheet-tab-editing,
.sheet-edit-toggle[value="playing"]~ .sheet-tabs .sheet-tab-playing {
color: $dark_grey;
-43
View File
@@ -1,43 +0,0 @@
/* Traits */
.sheet-trait {
margin-bottom: 10px;
min-height: 40px;
}
.sheet-trait div {
vertical-align: top;
}
.sheet-trait-name {
width: 120px;
display: inline-block;
}
.sheet-trait-level {
width: 80px;
display: inline-block;
}
.sheet-trait-uses {
width: 90px;
display: inline-block;
}
.sheet-trait-checks {
width: 28px;
display: inline-block;
}
.sheet-traits-flag[value="1"]~div .sheet-1,
.sheet-traits-flag[value="2"]~div .sheet-2,
.sheet-traits-flag[value="3"]~div .sheet-3 {
display: inline-block;
}
.sheet-trait-name input {
width: 115px;
}
.sheet-trait-level select {
width: 80px;
}
-28
View File
@@ -1,28 +0,0 @@
/* Who You Are Styling */
.sheet-who-you-are .sheet-column-2 .sheet-row span:first-of-type {
margin-right: 5px;
}
/* Who You Are & What You Fight For Styling */
.sheet-who-you-are .sheet-row,
.sheet-what-you-fight-for .sheet-body>.sheet-row {
margin-top: 6px;
}
.sheet-conditions .sheet-body>.sheet-row {
margin-top: 12px;
}
.sheet-who-you-are .sheet-row {
min-height: 25px;
}
.sheet-what-you-fight-for .sheet-body>.sheet-row {
min-height: 75px;
}
.sheet-what-you-fight-for textarea {
width: calc(100% - 15px);
resize: vertical;
height: 40px;
}
-49
View File
@@ -1,49 +0,0 @@
/* Wises Styling */
.sheet-wise-check-container {
position: relative;
display: inline-block;
.sheet-wise-check-value {
margin-left: 3px;
}
&:not(:last-child) {
border-right: 1px solid black;
padding-right: 5px;
}
}
.sheet-wise-check-container input[type="checkbox"].sheet-underlined,
.sheet-wise-check-container input[type="radio"].sheet-underlined {
width: 15px !important;
+span {
width: 15px !important; // Ensure consistency
&:before {
left: 3px;
}
}
}
.sheet-wises {
.sheet-name-container {
min-height: 20px;
border-bottom: 1px solid black;
margin-bottom: 5px;
}
.sheet-row {
margin-bottom: 10px;
}
.sheet-wises-left,
.sheet-wises-right {
width: 45%;
display: inline-block;
&:first-child {
margin-right: 5%; // Add margin only to the first child
}
}
}
+1
View File
@@ -9,4 +9,5 @@ include pug/containers/rolltemplates.pug
//- SCRIPTS
script(type="text/worker")
include js/tabs.js
include js/scripts.js
+10 -6
View File
@@ -1,14 +1,18 @@
@import 'scss/sheet.scss';
@import 'scss/tabs.scss';
@import 'scss/advancement.scss';
@import 'scss/conditions.scss';
@import 'scss/who_you_are.scss';
@import 'scss/kits.scss';
@import 'scss/traits.scss';
@import 'scss/abilities_and_skills.scss';
@import 'scss/artha.scss';
@import 'scss/wises.scss';
@import 'scss/rolls.scss';
@import 'scss/magic.scss';
@import 'scss/relationships.scss';
@import 'scss/levels.scss';
@import 'scss/anatomy/wises.scss';
@import 'scss/anatomy/abilities_and_skills.scss';
@import 'scss/anatomy/checks.scss';
@import 'scss/anatomy/conditions.scss';
@import 'scss/anatomy/fate.scss';
@import 'scss/anatomy/anatomy.scss';
@import 'scss/anatomy/who_you_are.scss';
@import 'scss/anatomy/what_you_fight_for.scss';
@import 'scss/anatomy/traits.scss';
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff