Skip to content

Instantly share code, notes, and snippets.

@SteveKoontz
Last active July 21, 2021 16:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SteveKoontz/7dce834b2285734d8f557f03489531c2 to your computer and use it in GitHub Desktop.
Save SteveKoontz/7dce834b2285734d8f557f03489531c2 to your computer and use it in GitHub Desktop.
// 5th Edition OGL by Roll20 Companion Script
// API Commands:
// !5ehelp - Gives a list of the script's API commands in the chat tab.
// !5estatus - Lists the current status of the script's features in the chat tab.
// !ammotracking on/off/quiet - Automatically expends linked resource when attack is made
// !autonpctoken on/off - Automatically generates a NPC token on the GM's screen based on the default token when an NPC's health calculation is rolled
// !deathsavetracking on/off/quiet - Automatically ticks off successes and failures when death saves are rolled, clearing on death, stabilization, or hp recovery
// !spelltracking on/off/quiet - Automatically expends spell charges as cast, factoring in higher level casting
// !longrest <character name> - If spelltracking is on, this command will reset all of the character's spell slots to unspent.
// !npchp <character name> - Rolls randomly NPC hit point totals using their formula. If no character name is provided it will roll the selected tokens.
//
// Options:
// on - Toggles the functionality on (default)
// off - Disables the functionality
// quiet - Maintains functionality while preventing results from being output to the chat.
on('chat:message', function(msg) {
// HANDLE API COMMANDS
if(msg.type === "api" && !msg.rolltemplate) {
var params = msg.content.substring(1).split(" ");
var command = params[0].toLowerCase();
var option = params[1] ? params[1].toLowerCase() : false;
var validcommands = ["ammotracking","autonpctoken","deathsavetracking","spelltracking","longrest","npchp"];
if(command === "5ehelp") {
outputhelp(msg);
}
else if(command === "5estatus") {
outputstatus(msg);
}
else if(validcommands.indexOf(command) > -1) {
handleapicommand(msg,command,option);
}
}
// ROLL LISTENERS
else if(msg.playerid.toLowerCase() != "api" && msg.rolltemplate) {
var cnamebase = msg.content.split("charname=")[1];
var cname = cnamebase ? cnamebase.replace('}}','').trim() : (msg.content.split("{{name=")[1]||'').split("}}")[0].trim();
var character = cname ? findObjs({name: cname, type: 'character'})[0] : undefined;
var player = getObj("player", msg.playerid);
if(["simple","npc"].indexOf(msg.rolltemplate) > -1) {
if(_.has(msg,'inlinerolls') && msg.content.indexOf("^{death-save-u}") > -1 && character && state.FifthEditionOGLbyRoll20.deathsavetracking != "off") {
handledeathsave(msg,character);
}
if(_.has(msg,'inlinerolls') && msg.content.indexOf("^{hp}") > -1 && character && msg.rolltemplate && msg.rolltemplate === "npc" && state.FifthEditionOGLbyRoll20.autonpctoken != "off") {
handlenpctoken(msg,character,player);
}
}
if(["dmg","atkdmg"].indexOf(msg.rolltemplate) > -1) {
if(_.has(msg,'inlinerolls') && msg.content.indexOf("{{spelllevel=") > -1 && msg.content.indexOf("{{spelllevel=}}") === -1 && character && state.FifthEditionOGLbyRoll20.spelltracking != "off") {
handleslotattack(msg,character,player);
}
}
if(["spell"].indexOf(msg.rolltemplate) > -1) {
if(msg.content.indexOf("{{level=") > -1 && character && state.FifthEditionOGLbyRoll20.spelltracking != "off") {
handleslotspell(msg,character,player);
}
}
if(["atk","atkdmg","dmg"].indexOf(msg.rolltemplate) > -1) {
if(_.has(msg,'inlinerolls') && msg.content.indexOf("ammo= ") === -1 && character && state.FifthEditionOGLbyRoll20.ammotracking != "off") {
handleammo(msg,character,player);
}
}
}
});
// API COMMAND RESOLUTION
var handleapicommand = function(msg,command,option) {
// MAKE SURE OUR NAME SPACE EXISTS
if(!state.FifthEditionOGLbyRoll20) {
state.FifthEditionOGLbyRoll20 = {};
}
if(command === "longrest") {
if(state.FifthEditionOGLbyRoll20["spelltracking"] === "on") {
longrest(msg);
return;
}
else {
log("SPELL TRACKING IS NOT ENABLED");
return;
}
}
else if(command === "npchp") {
npchp(msg);
return;
}
// RESOLVE COMMAND WITH OPTION
else if(option && (option === "on" || option === "off" || option === "quiet")) {
state.FifthEditionOGLbyRoll20[command] = option;
}
// ELSE TOGGLE WITHOUT OPTION
else {
state.FifthEditionOGLbyRoll20[command] = !state.FifthEditionOGLbyRoll20[command] || state.FifthEditionOGLbyRoll20[command] != "on" ? "on" : "off";
}
sendChat(msg.who, "<div class='sheet-rolltemplate-desc'><div class='sheet-desc'><div class='sheet-label' style='margin-top:5px;'><span style='display:block;'>" + command + ": " + state.FifthEditionOGLbyRoll20[command] + "</span></div></div></div>");
};
var outputstatus = function(msg) {
if(!state.FifthEditionOGLbyRoll20) {
state.FifthEditionOGLbyRoll20 = {};
}
var ammotrackingstatus = !state.FifthEditionOGLbyRoll20.ammotracking || state.FifthEditionOGLbyRoll20.ammotracking === "on" ? "on" : state.FifthEditionOGLbyRoll20.ammotracking;
var autonpctokenstatus = !state.FifthEditionOGLbyRoll20.autonpctoken || state.FifthEditionOGLbyRoll20.autonpctoken === "on" ? "on" : state.FifthEditionOGLbyRoll20.autonpctoken;
var deathsavetrackingstatus = !state.FifthEditionOGLbyRoll20.deathsavetracking || state.FifthEditionOGLbyRoll20.deathsavetracking === "on" ? "on" : state.FifthEditionOGLbyRoll20.deathsavetracking;
var spelltrackingstatus = !state.FifthEditionOGLbyRoll20.spelltracking || state.FifthEditionOGLbyRoll20.spelltracking === "on" ? "on" : state.FifthEditionOGLbyRoll20.spelltracking;
sendChat(msg.who, "<div class='sheet-rolltemplate-desc'><div class='sheet-desc'><div class='sheet-label' style='margin-top:5px;'><span style='display:block;'>ammotracking: " + ammotrackingstatus + "</span><span style='display:block;'>autonpctoken: " + autonpctokenstatus + "</span><span style='display:block;'>deathsavetracking: " + deathsavetrackingstatus + "</span><span style='display:block;'>spelltracking: " + spelltrackingstatus + "</span><span style='display:block; margin-top:5px;'>5th Edition OGL by Roll20</span></div></div></div>");
};
var outputhelp = function(msg) {
sendChat(msg.who, "<div class='sheet-rolltemplate-desc'><div class='sheet-desc'><div class='sheet-label' style='margin-top:5px;'><span style='display:block;'>!5estatus</span><span style='display:block;'>!ammotracking on/off/quiet</span><span style='display:block;'>!autonpctoken on/off</span><span style='display:block;'>!deathsavetracking on/off/quiet</span><span style='display:block;'>!spelltracking on/off/quiet</span><span style='display:block;'>!longrest \<character name\></span><span style='display:block; margin-top:5px;'>5th Edition OGL by Roll20</span></div></div></div>");
};
// AUTOMATICALLY APPLY DEATH SAVE RESULTS
var handledeathsave = function(msg,character) {
var result = msg.inlinerolls[0].results.total ? msg.inlinerolls[0].results.total : false;
var resultbase = msg.inlinerolls[0].results.rolls[0].results[0].v ? msg.inlinerolls[0].results.rolls[0].results[0].v : false;
var resultoutput = "";
if(result === false) {
log("FAILED TO FIND DEATH SAVE ROLL RESULT");
}
else if(resultbase === 20) {
resultoutput = "CRITICAL SUCCESS: 1HP";
var hp = findObjs({type: 'attribute', characterid: character.id, name: "hp"}, {caseInsensitive: true})[0];
if(!hp) {
createObj("attribute", {name: "hp", current: 1, max: "", characterid: character.id});
}
else {
hp.set({current:1});
}
cleardeathsaves(character);
}
else if(result < 10 || resultbase === 1) {
var fail1 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_fail1"}, {caseInsensitive: true})[0];
var fail2 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_fail2"}, {caseInsensitive: true})[0];
var fail3 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_fail3"}, {caseInsensitive: true})[0];
if(!fail1) {
fail1 = createObj("attribute", {name: "deathsave_fail1", current: "0", max: "", characterid: character.id});
//var fail1 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_fail1"}, {caseInsensitive: true})[0];
}
if(!fail2) {
fail2 = createObj("attribute", {name: "deathsave_fail2", current: "0", max: "", characterid: character.id});
//var fail2 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_fail2"}, {caseInsensitive: true})[0];
}
if(!fail3) {
fail3 = createObj("attribute", {name: "deathsave_fail3", current: "0", max: "", characterid: character.id});
//var fail3 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_fail3"}, {caseInsensitive: true})[0];
}
if(fail2.get("current") === "on" || (fail1.get("current") === "on" && resultbase === 1)) {
fail3.set({current:"on"});
resultoutput = "DECEASED";
cleardeathsaves(character);
}
else if(fail1.get("current") === "on" || resultbase === 1) {
fail2.set({current:"on"});
resultoutput = "FAILED 2 of 3";
}
else {
fail1.set({current:"on"});
resultoutput = "FAILED 1 of 3";
}
}
else {
var succ1 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_succ1"}, {caseInsensitive: true})[0];
var succ2 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_succ2"}, {caseInsensitive: true})[0];
var succ3 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_succ3"}, {caseInsensitive: true})[0];
if(!succ1) {
succ1 = createObj("attribute", {name: "deathsave_succ1", current: "0", max: "", characterid: character.id});
//var succ1 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_succ1"}, {caseInsensitive: true})[0];
}
if(!succ2) {
succ2 = createObj("attribute", {name: "deathsave_succ2", current: "0", max: "", characterid: character.id});
//var succ2 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_succ2"}, {caseInsensitive: true})[0];
}
if(!succ3) {
succ3 = createObj("attribute", {name: "deathsave_succ3", current: "0", max: "", characterid: character.id});
//var succ3 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_succ3"}, {caseInsensitive: true})[0];
}
if(succ2.get("current") === "on") {
succ3.set({current:"on"});
resultoutput = "STABILIZED";
cleardeathsaves(character);
}
else if(succ1.get("current") === "on") {
succ2.set({current:"on"});
resultoutput = "SUCCEEDED 2 of 3";
}
else {
succ1.set({current:"on"});
resultoutput = "SUCCEEDED 1 of 3";
}
}
if(state.FifthEditionOGLbyRoll20.deathsavetracking != "quiet") {
if(getAttrByName(character.id, "wtype") === "") {
sendChat(msg.who, "<div class='sheet-rolltemplate-simple' style='margin-top:-7px;'><div class='sheet-container'><div class='sheet-label' style='margin-top:5px;'><span>" + resultoutput + "</span></div></div></div>");
}
else {
sendChat(msg.who, "/w gm <div class='sheet-rolltemplate-desc'><div class='sheet-desc'><div class='sheet-label' style='margin-top:5px;'><span>" + resultoutput + "</span></div></div></div>");
}
}
};
var cleardeathsaves = function(character) {
var fail1 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_fail1"}, {caseInsensitive: true})[0];
var fail2 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_fail2"}, {caseInsensitive: true})[0];
var fail3 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_fail3"}, {caseInsensitive: true})[0];
var succ1 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_succ1"}, {caseInsensitive: true})[0];
var succ2 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_succ2"}, {caseInsensitive: true})[0];
var succ3 = findObjs({type: 'attribute', characterid: character.id, name: "deathsave_succ3"}, {caseInsensitive: true})[0];
if(fail1) {fail1.set({current:"0"});};
if(fail2) {fail2.set({current:"0"});};
if(fail3) {fail3.set({current:"0"});};
if(succ1) {succ1.set({current:"0"});};
if(succ2) {succ2.set({current:"0"});};
if(succ3) {succ3.set({current:"0"});};
};
// AUTOMATICALLY GENERATE NPC TOKEN WHEN HP FORMULA IS ROLLED
var handlenpctoken = function(msg,character,player) {
character.get("defaulttoken", function(token) {
var t = JSON.parse(token);
if(token === "null") {
log("NPC DOES NOT HAVE A DEFAULT TOKEN");
}
else {
var page = playerIsGM(player.id) === true && player.get("lastpage") != "" ? player.get("lastpage") : Campaign().get("playerpageid");
var hp = msg.inlinerolls[0].results.total ? msg.inlinerolls[0].results.total : 0;
var img = getCleanImgsrc(t.imgsrc);
var tokenname = t.name ? t.name : character.get("name");
var represents = t.represents ? t.represents : character.id;
createObj("graphic", {
left: 140,
top: 140,
width: t.width,
height: t.height,
imgsrc: img,
pageid: page,
layer: (_.contains(["gmlayer", "objects", "map"], t.layer) ? t.layer : 'gmlayer'),
name: tokenname,
represents: represents,
bar3_value: hp,
bar3_max: hp
});
}
});
};
var getCleanImgsrc = function (imgsrc) {
var parts = imgsrc.match(/(.*\/(?:images|marketplace)\/.*)(thumb|med|original|max)([^\?]*)(\?[^?]+)?$/);
if(parts) {
return parts[1]+'thumb'+parts[3]+(parts[4]?parts[4]:`?${Math.round(Math.random()*9999999)}`);
}
return;
};
var handleslotattack = function (msg,character,player) {
var spelllevel = (msg.content.split("{{spelllevel=")[1]||'').split("}}")[0];
var innate = msg.content.indexOf("{{innate=}}") > -1 ? false : true;
if(spelllevel === "cantrip" || spelllevel === "npc" || innate) {
return;
}
var hlinline = msg.content.split("{{hldmg=$[[")[1] || "";
hlinline = hlinline.substring(0,1);
var higherlevel = 0;
if(hlinline != "") {
higherlevel = (msg.inlinerolls[hlinline].expression.split("*")[1]||'').split(")")[0];
}
var spellslot = parseInt(spelllevel, 10) + parseInt(higherlevel,10);
resolveslot(msg,character,player,spellslot);
};
var handleslotspell = function (msg,character,player) {
var spellslot = ((msg.content.split("{{level=")[1]||'').split("}}")[0]||'').split(" ")[1];
var ritual = msg.content.indexOf("{{ritual=1}}") > -1 ? true : false;
var innate = msg.content.indexOf("{{innate=}}") > -1 ? false : true;
if(spellslot === "0" || spellslot === "cantrip" || spellslot === "npc" || ritual || innate) {
return;
}
resolveslot(msg,character,player,spellslot);
};
var resolveslot = function(msg,character,player,spellslot) {
var charslot = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + spellslot + "_slots_expended"}, {caseInsensitive: true})[0];
if(!charslot) {
charslot = createObj("attribute", {name: "lvl" + spellslot + "_slots_expended", current: "0", max: "", characterid: character.id});
//var charslot = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + spellslot + "_slots_expended"}, {caseInsensitive: true})[0];
}
var charslotmax = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + spellslot + "_slots_total"}, {caseInsensitive: true})[0];
if(!charslotmax) {
charslotmax = createObj("attribute", {name: "lvl" + spellslot + "_slots_total", current: "0", max: "", characterid: character.id});
//var charslotmax = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + spellslot + "_slots_total"}, {caseInsensitive: true})[0];
}
var spent = parseInt(charslot.get("current"), 10);
charslot.set({current: Math.max(spent - 1, 0)});
var wtype = getAttrByName(character.id, "wtype");
var wtoggle = getAttrByName(character.id, "whispertoggle");
if(spent > 0) {
if(state.FifthEditionOGLbyRoll20.spelltracking != "quiet") {
if(wtype === "" || (wtype === "@{whispertoggle}" && wtoggle === "") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" && msg.type === "general")) {
sendChat(msg.who, "<div class='sheet-rolltemplate-simple' style='margin-top:-7px;'><div class='sheet-container'><div class='sheet-label' style='margin-top:5px;'><span>SPELL SLOT LEVEL " + spellslot + "</span><span style='display:block;'>" + Math.max(spent - 1, 0) + " OF " + charslotmax.get("current") + " REMAINING</span></div></div></div>");
}
else if(wtype === "/w gm " || (wtype === "@{whispertoggle}" && wtoggle === "/w gm ") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" && msg.type === "whisper")) {
sendChat(msg.who, "/w gm <div class='sheet-rolltemplate-desc'><div class='sheet-desc'><div class='sheet-label' style='margin-top:5px;'><span>SPELL SLOT LEVEL " + spellslot + "</span><span style='display:block;'>" + Math.max(spent - 1, 0) + " OF " + charslotmax.get("current") + " REMAINING</span></div></div></div>");
}
}
}
else {
if(wtype === "" || (wtype === "@{whispertoggle}" && wtoggle === "") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" && msg.type === "general")) {
sendChat(msg.who, "<div class='sheet-rolltemplate-simple' style='margin-top:-7px;'><div class='sheet-container'><div class='sheet-label' style='margin-top:5px;'><span>SPELL SLOT LEVEL " + spellslot + "</span><span style='display:block; color:red;'>ALL SLOTS EXPENDED</span></div></div></div>");
}
else if(wtype === "/w gm " || (wtype === "@{whispertoggle}" && wtoggle === "/w gm ") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" && msg.type === "whisper")) {
sendChat(msg.who, "/w gm <div class='sheet-rolltemplate-desc'><div class='sheet-desc'><div class='sheet-label' style='margin-top:5px;'><span>SPELL SLOT LEVEL " + spellslot + "</span><span style='display:block; color:red;'>ALL SLOTS EXPENDED</span></div></div></div>");
}
}
};
var longrest = function(msg) {
charname = msg.content.substring(msg.content.indexOf(" ") + 1);
var character = findObjs({name: charname, type: "character"}, {caseInsensitive: true})[0];
if(!character) {
log("NO CHARACTER BY THAT NAME FOUND");
}
else {
// SPELL SLOTS
for (var i = 1; i < 10; i++) {
var charslotmax = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + i + "_slots_total"}, {caseInsensitive: true})[0];
if(!charslotmax) {
charslotmax = createObj("attribute", {name: "lvl" + i + "_slots_total", current: "0", max: "", characterid: character.id});
}
var charslot = findObjs({type: 'attribute', characterid: character.id, name: "lvl" + i + "_slots_expended"}, {caseInsensitive: true})[0];
if(!charslot) {
charslot = createObj("attribute", {name: "lvl" + i + "_slots_expended", current: charslotmax.get("current"), max: "", characterid: character.id});
}
else {
charslot.set({current: charslotmax.get("current")});
}
};
// HP
var maxhp = getAttrByName(character.id, "hp", "max");
var hp = findObjs({type: 'attribute', characterid: character.id, name: "hp"}, {caseInsensitive: true})[0];
if(hp && maxhp) {
hp.set({current: maxhp});
}
// HIT DICE
var hit_dice = findObjs({type: 'attribute', characterid: character.id, name: "hit_dice"}, {caseInsensitive: true})[0];
var max_hd = parseInt(hit_dice.get("max"),10);
var cur_hd = parseInt(hit_dice.get("current"),10);
if(max_hd != null && cur_hd < max_hd) {
cur_hd = Math.min(cur_hd + Math.floor(max_hd/2), max_hd);
hit_dice.set({current: cur_hd});
}
}
};
var npchp = function(msg) {
var qualifier = msg.content.substring(6).trim();
var tokens = [];
if(qualifier.length > 0) {
if ((qualifier.match(/"/g)||[]).length > 1) {
qualifier = qualifier.match( /"(.*?)"/ )[1];
}
else if ((qualifier.match(/'/g)||[]).length > 1) {
qualifier = qualifier.match( /'(.*?)'/ )[1];
}
var character = findObjs({type: 'character', name: qualifier}, {caseInsensitive: true})[0] || false;
if(!character) {
log("NO CHARACTER BY THAT NAME '" + qualifier + "' FOUND");
return;
}
var player = getObj("player", msg.playerid);
if(!player) {
log("NO PLAYER BY THAT ID:" + qualifier + " FOUND");
}
tokens = findObjs({type: 'graphic', subtype: 'token', represents: character.id, pageid: player.get("lastpage")});
}
else {
tokens = msg["selected"];
}
_.each(tokens, function(token) {
var t_obj = getObj("graphic", token.id);
if(!t_obj) {
t_obj = getObj("graphic", token["_id"]);
}
var rep_id = t_obj.get("represents");
if(t_obj && rep_id) {
var maxhp = getAttrByName(rep_id, "hp", "max");
var formula = getAttrByName(rep_id, "npc_hpformula");
var bar1 = t_obj.get("bar1_value");
var bar2 = t_obj.get("bar2_value");
var bar3 = t_obj.get("bar3_value");
if(formula) {
var f_array = formula.split(/d|\+/);
if(f_array.length > 1) {
var n_dice = parseInt(f_array[0],10);
var d_type = parseInt(f_array[1],10);
var mod = parseInt(f_array[2],10);
var hp = mod ? mod : 0;
for (var i = 0; i < n_dice; i++) {
hp = hp + randomInteger(d_type);
}
if(bar1 === maxhp) {
t_obj.set({bar1_value: hp});
}
else if(bar2 === maxhp) {
t_obj.set({bar2_value: hp});
}
else if(bar3 === maxhp) {
t_obj.set({bar3_value: hp});
}
}
}
}
});
}
var handleammo = function (msg,character,player) {
if(msg.content.indexOf("ammo=") === -1) {
// UNABLE TO FIND AMMO
return;
}
if(msg.content.indexOf("{{charname=") > -1) {
var ammofull = (msg.content.split("ammo=")[1]||'').split(" {{charname=")[0];
}
else {
var ammofull = (msg.content.split("ammo=")[1]||'').split(" charname")[0];
}
var ammoid = "";
var ammoname = "";
var ammonum = 1;
if(ammofull.substring(0,1) === "-") {
ammoid = ammofull.substring(0,20);
var ammoresource = findObjs({type: 'attribute', characterid: character.id, id: ammoid}, {caseInsensitive: true})[0];
if(ammoresource) {
ammoname = getAttrByName(character.id, ammoresource.get("name") + "_name");
}
}
else if(ammofull.indexOf("|") > -1) {
var temp = ammofull.split("|");
ammoid = temp[1];
ammoname = temp[0];
if(ammoname.indexOf(",") > -1) {
temp = ammoname.split(",");
ammoname = temp[0];
ammonum = !isNaN(parseInt(temp[1],10)) ? parseInt(temp[1],10) : 1;
};
}
else {
ammoname = ammofull;
if(ammoname.indexOf(",") > -1) {
temp = ammoname.split(",");
ammoname = temp[0];
ammonum = !isNaN(parseInt(temp[1],10)) ? parseInt(temp[1],10) : 1;
};
var resources = filterObjs(function(obj) {
if(obj.get("type") === "attribute" && obj.get("characterid") === character.id && (obj.get("current") + "").toLowerCase() === ammoname.toLowerCase() && obj.get("name").indexOf("resource") > -1) return true;
else return false;
});
if(!resources[0]) {
log("UNABLE TO FIND RESOURCE");
return;
}
resname = resources[0].get("name").replace("_name","");
ammoid = findObjs({type: 'attribute', characterid: character.id, name: resname}, {caseInsensitive: true})[0].id;
var atkid = "";
if(msg.content.indexOf("~") > -1) {
atkid = (msg.content.split("repeating_attack_")[1]||'').split("_attack_dmg")[0];
}
else {
var atkname = (msg.content.split("{{rname=")[1]||'').split("}}")[0];
var attacks = filterObjs(function(obj) {
if(obj.get("type") === "attribute" && obj.get("characterid") === character.id && obj.get("current") === atkname) return true;
else return false;
});
var reg = new RegExp(/.+?(?=_atkname)/);
_.each(attacks, function(atk) {
if(reg.test(atk.get("name"))) {
atkid = atk.get("name").replace("repeating_attack_","").replace("_atkname","");
}
});
}
if(!atkid) {
log("UNABLE TO FIND ATTACK ID");
return;
}
atkammo = findObjs({type: 'attribute', characterid: character.id, name: "repeating_attack_" + atkid + "_ammo"}, {caseInsensitive: true})[0];
atkammo.set({current: atkammo.get("current") + "|" + ammoid});
}
ammoresource = findObjs({type: 'attribute', characterid: character.id, id: ammoid}, {caseInsensitive: true})[0];
if(ammoresource) {
ammoresource.set({current: ammoresource.get("current") - ammonum});
ammoitemid = getAttrByName(character.id, ammoresource.get("name") + "_itemid");
if(ammoitemid) {
ammoitem = findObjs({type: 'attribute', characterid: character.id, name: "repeating_inventory_" + ammoitemid + "_itemcount"}, {caseInsensitive: true})[0];
if(ammoitem) {
ammoitem.set({current: ammoitem.get("current") - ammonum});
}
ammoweight = findObjs({type: 'attribute', characterid: character.id, name: "repeating_inventory_" + ammoitemid + "_itemweight"}, {caseInsensitive: true})[0];
totalweight = findObjs({type: 'attribute', characterid: character.id, name: "weighttotal"}, {caseInsensitive: true})[0];
if(ammoweight && totalweight) {
totalweight.set({current: totalweight.get("current") - ammoweight.get("current")});
}
}
var wtype = getAttrByName(character.id, "wtype");
var wtoggle = getAttrByName(character.id, "whispertoggle");
if(ammoresource.get("current") < 0) {
if(wtype === "" || (wtype === "@{whispertoggle}" && wtoggle === "") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" && msg.type === "general")) {
sendChat(msg.who, "<div class='sheet-rolltemplate-simple' style='margin-top:-7px;'><div class='sheet-container' style='border-radius: 0px;'><div class='sheet-label' style='margin-top:5px;'><span style='display:block; color:red;'>OUT OF AMMO</span></div></div></div>");
}
else if(wtype === "/w gm " || (wtype === "@{whispertoggle}" && wtoggle === "/w gm ") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" && msg.type === "whisper")) {
sendChat(msg.who, "/w gm <div class='sheet-rolltemplate-desc'><div class='sheet-desc' style='border-radius: 0px;'><div class='sheet-label' style='margin-top:5px;'><span style='display:block; color:red;'>OUT OF AMMO</span></div></div></div>");
}
}
else if(state.FifthEditionOGLbyRoll20.ammotracking != "quiet") {
if(wtype === "" || (wtype === "@{whispertoggle}" && wtoggle === "") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" && msg.type === "general")) {
sendChat(msg.who, "<div class='sheet-rolltemplate-simple' style='margin-top:-7px;'><div class='sheet-container' style='border-radius: 0px;'><div class='sheet-label' style='margin-top:5px;'><span style='display:block;'>" + ammoname + ": " + ammoresource.get("current") + " LEFT</span></div></div></div>");
}
else if(wtype === "/w gm " || (wtype === "@{whispertoggle}" && wtoggle === "/w gm ") || (wtype === "?{Whisper?|Public Roll,|Whisper Roll,/w gm }" && msg.type === "whisper")) {
sendChat(msg.who, "/w gm <div class='sheet-rolltemplate-desc'><div class='sheet-desc' style='border-radius: 0px;'><div class='sheet-label' style='margin-top:5px;'><span style='display:block;'>" + ammoname + ": " + ammoresource.get("current") + " LEFT</span></div></div></div>");
};
}
}
};
on('ready', function() {
if(!state.FifthEditionOGLbyRoll20) {
state.FifthEditionOGLbyRoll20 = {};
}
if(!state.FifthEditionOGLbyRoll20.deathsavetracking) {
state.FifthEditionOGLbyRoll20.deathsavetracking = "on";
}
if(!state.FifthEditionOGLbyRoll20.autonpctoken) {
state.FifthEditionOGLbyRoll20.autonpctoken = "on";
}
if(!state.FifthEditionOGLbyRoll20.spelltracking) {
state.FifthEditionOGLbyRoll20.spelltracking = "on";
}
if(!state.FifthEditionOGLbyRoll20.ammotracking) {
state.FifthEditionOGLbyRoll20.ammotracking = "on";
}
});
.sheet-pc,
.sheet-npc
{
display: none;
}
.sheet-npc_toggle[value="0"] ~ .sheet-pc,
.sheet-npc_toggle[value="1"] ~ .sheet-npc
{
display: block;
}
.sheet-container {
width: 750px;
background-color: white;
position: relative;
}
input[type=radio].sheet-tab-button {
opacity: 0;
position: absolute;
top: 92px;
right: 0px;
width: 18px;
height: 18px;
z-index: 2;
}
input[type=radio].sheet-tab-button + span {
position: absolute;
top: 92px;
right: 0px;
width: 17px;
height: 17px;
border: 1px solid black;
border-radius: 5px;
background-color: #E8E8E8;
color: black;
text-align: center;
font-weight: bold;
}
.sheet-advantagetoggle {
position: absolute;
top: 92px;
left: 570px;
z-index: 1;
}
.sheet-advantagetoggle input[type=radio] {
opacity: 0;
position: absolute;
top: 0px;
right: 0px;
width: 18px;
height: 18px;
z-index: 2;
}
.sheet-advantagetoggle input[type=radio] + span {
position: absolute;
top: 0px;
right: 0px;
width: 17px;
height: 17px;
border: 1px solid black;
border-radius: 5px;
background-color: #E8E8E8;
color: black;
text-align: center;
font-weight: bold;
}
.sheet-advantagetoggle input[type=radio]:checked + span,
input[type=radio].sheet-tab-button:checked + span {
color: #FFFFFF;
background-color: #EC2127;
}
.sheet-advantagetoggle input.sheet-toggle-left,
.sheet-advantagetoggle input.sheet-toggle-left + span {
right: 181px;
width: 90px;
}
.sheet-advantagetoggle input.sheet-toggle-center,
.sheet-advantagetoggle input.sheet-toggle-center + span {
right: 113px;
width: 65px;
}
.sheet-advantagetoggle input.sheet-toggle-right,
.sheet-advantagetoggle input.sheet-toggle-right + span {
right: 0px;
width: 110px;
}
.sheet-whispertoggle {
left: 270px;
}
.sheet-advantagetoggle.sheet-whispertoggle input.sheet-toggle-right,
.sheet-advantagetoggle.sheet-whispertoggle input.sheet-toggle-right + span {
width: 50px;
}
.sheet-advantagetoggle.sheet-whispertoggle input.sheet-toggle-left,
.sheet-advantagetoggle.sheet-whispertoggle input.sheet-toggle-left + span {
right: 54px;
width: 55px;
}
.sheet-npc_toggle[value="1"] ~ .sheet-advantagetoggle {
top: -10px;
left: 390px;
}
.sheet-npc_toggle[value="1"] ~ .sheet-advantagetoggle.sheet-whispertoggle {
top: -10px;
left: 120px;
}
.sheet-advantagetoggle {
display: none;
}
.sheet-toggleflag[value*="advantagetoggle"] + .sheet-advantagetoggle,
.sheet-toggleflag[value*="whispertoggle"] + .sheet-whispertoggle,
.sheet-toggleflag[value="1"] + .sheet-hidden,
.sheet-toggleflag[value="1"] + .sheet-row.sheet-hidden
{
display: block;
}
.sheet-npc_toggle[value="1"] + .sheet-npcspellcastingflag[value="1"] ~ .sheet-pc,
.sheet-npc_toggle[value="1"] + .sheet-npcspellcastingflag[value="1"] ~ .sheet-pc .sheet-page.sheet-spells .sheet-header
{
display: block;
visibility: hidden;
width: 0px;
top: -150px;
margin: 0px;
padding: 0px;
}
.sheet-npc_toggle[value="1"] + .sheet-npcspellcastingflag[value="1"] ~ .sheet-pc .sheet-page.sheet-spells {
display: block;
}
.sheet-npc_toggle[value="1"] + .sheet-npcspellcastingflag[value="1"] ~ .sheet-pc .sheet-page.sheet-core,
.sheet-npc_toggle[value="1"] + .sheet-npcspellcastingflag[value="1"] ~ .sheet-pc .sheet-page.sheet-bio,
.sheet-npc_toggle[value="1"] + .sheet-npcspellcastingflag[value="1"] ~ .sheet-pc .sheet-page.sheet-options
{
display: none;
}
.sheet-npc_toggle[value="1"] + .sheet-npcspellcastingflag[value="1"] ~ .sheet-pc .sheet-page.sheet-spells .sheet-body {
visibility: visible;
}
.sheet-npc_toggle[value="1"] + .sheet-npcspellcastingflag[value="1"] ~ .sheet-pc .sheet-page.sheet-spells .sheet-body .sheet-col {
display: block;
}
.sheet-hidden,
.sheet-options .sheet-row.sheet-hidden
{
display: none;
}
.sheet-npc_toggle[value="1"] ~ .sheet-advantagetoggle input[type=radio] + span {
text-transform: lowercase;
font-variant: small-caps;
font-weight: normal;
background: transparent;
border: none;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.sheet-npc_toggle[value="1"] ~ .sheet-advantagetoggle input[type=radio] + span:first-letter {
text-transform: uppercase;
}
.sheet-npc_toggle[value="1"] ~ .sheet-advantagetoggle input[type=radio] + span > span.togm {
text-transform: uppercase;
}
.sheet-npc_toggle[value="1"] ~ .sheet-advantagetoggle input[type=radio]:checked + span {
font-weight: bold;
color: rgb(126, 45, 64);
}
.sheet-page {
display: none;
}
input[type=radio].sheet-tab-button.sheet-core:checked ~ .sheet-page.sheet-core,
input[type=radio].sheet-tab-button.sheet-bio:checked ~ .sheet-page.sheet-bio,
input[type=radio].sheet-tab-button.sheet-spells:checked ~ .sheet-page.sheet-spells,
input[type=radio].sheet-tab-button.sheet-options:checked ~ .sheet-page.sheet-options
{
display: block;
}
input[type=radio].sheet-tab-button.sheet-core,
input[type=radio].sheet-tab-button.sheet-core + span {
right: 116px;
width: 45px;
}
input[type=radio].sheet-tab-button.sheet-bio,
input[type=radio].sheet-tab-button.sheet-bio + span {
right: 83px;
width: 30px;
}
input[type=radio].sheet-tab-button.sheet-spells,
input[type=radio].sheet-tab-button.sheet-spells + span {
right: 20px;
width: 60px;
}
.sheet-header .sheet-top {
height: 42px;
}
.sheet-header .sheet-part {
width: 157px;
display: inline-block;
text-align: center;
}
.sheet-header .sheet-part input[type=text],
.sheet-header .sheet-part select {
border: 1px solid #666;
border-radius: 5px;
height: 56px;
width: 110px;
text-align: center;
}
.sheet-header .sheet-header-info select {
padding-left: 0px;
padding-right: 0px;
}
.sheet-header .sheet-part input[type=text] {
font-size: 30px;
}
.sheet-header .sheet-part span.sheet-display {
border: 1px solid #666;
border-radius: 5px;
height: 54px;
width: 110px;
text-align: center;
margin: 0px;
display: inline-block;
line-height: 54px;
font-size: 25px;
}
.sheet-header input,
.sheet-header select {
border-bottom: 1px solid #D3D3D3;
border-top: 0px;
border-left: 0px;
border-right: 0px;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
}
.sheet-header input {
padding: 0px;
}
.sheet-header select {
margin-bottom: 0px;
}
.sheet-header input[type=number] {
text-align: center;
margin-bottom: -9px;
}
.sheet-header input[type=number]::-webkit-inner-spin-button,
.sheet-header input[type=number]::-webkit-outer-spin-button
{
-webkit-appearance: none;
margin: 0;
}
.sheet-header input[type=number] {
-moz-appearance:textfield;
}
.sheet-header span {
display: block;
font-size: 9px;
line-height: 12px;
}
.sheet-header .sheet-name-container span.sheet-label {
text-align: left;
font-weight: normal;
margin-top: 0;
}
.sheet-name-container {
width: 250px;
display: inline-block;
}
.sheet-name-container input {
font-size: 20px;
margin-top: -9px;
}
.sheet-header-info {
width: 482px;
margin-left: -2px;
display: inline-block;
border: 3px double #666;
padding: 5px;
max-height: 74px;
}
.sheet-hlabel-container {
display: inline-block;
margin-left: -4px;
}
.sheet-hlabel-container.sheet-multiclass-container {
vertical-align: top;
}
.sheet-hlabel-container:first-child {
margin-left: 0px;
}
.sheet-body {
width: 750px;
margin-top: 22px;
}
.sheet-col {
width: 32.97%;
}
.sheet-col2-3 {
width: 490px;
margin-left: 5px;
display: inline-block;
}
.sheet-attributes-container {
width: 70px;
margin-right: 5px;
display: inline-block;
vertical-align: top;
}
.sheet-attr-container {
width: 70px;
border: 1px solid #666;
border-radius: 5px;
position: relative;
padding-bottom: 10px;
margin-bottom: 19px;
height: 64px;
text-align: center;
}
.sheet-attr-container button[type=roll],
.sheet-saving-throw button[type=roll],
.sheet-skill button[type=roll],
.sheet-ac-init-speed-container button[type=roll],
.sheet-subcontainer button[type=roll],
.sheet-npc button[type=roll]
{
background-color: transparent;
color: black;
border: none;
font-size: 9px;
line-height: 12px;
background-image: none;
text-shadow: none;
box-shadow: none;
padding: 0px;
margin: 0px;
width: 100%;
font-weight: bold;
}
.sheet-attr-container button[type=roll]::before,
.sheet-saving-throw button[type=roll]::before,
.sheet-skill button[type=roll]::before,
.sheet-ac-init-speed-container button[type=roll]::before,
.sheet-subcontainer button[type=roll]::before,
.sheet-npc button[type=roll]::before
{
content: "" !important;
}
.sheet-attr-container button[type=roll] {
overflow: hidden;
}
button[type=roll]:hover,
button[type=roll]:hover *,
.sheet-spell button[type=roll]:hover input[type=text],
.sheet-action .sheet-display button[type=roll]:hover *
{
color: #EC2127;
}
button[type=roll] * {
pointer-events: none;
}
.sheet-attr-container input {
border: none;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
margin-top: 3px;
}
.sheet-attr {
font-size: 30px;
line-height: 40px;
}
.sheet-attr-mod {
width: 40px;
height: 20px;
border: 1px solid #666;
border-radius: 50%;
z-index: 2;
position: absolute;
top: 62px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
background-color: white;
}
.sheet-attr-mod input {
text-align: center;
/* width: 100%;
height: 20px;*/
font-size: 20px;
margin: 0px;
padding: 0px;
vertical-align: middle;
line-height: 22px;
}
.sheet-skills-saves-container {
width: 163px;
margin-right: 5px;
display: inline-block;
vertical-align: top;
}
.sheet-insp-prof-container {
margin-bottom: 10px;
}
.sheet-insp-prof-container .sheet-value {
display: inline-block;
border: 1px solid #666;
border-radius: 50%;
width: 35px;
height: 35px;
background-color: white;
position: relative;
}
.sheet-insp-prof-container .sheet-value input[type=checkbox] {
height: 100%;
width: 100%;
border-radius: 50%;
opacity: 0;
z-index: 2;
position: relative;
}
.sheet-insp-prof-container .sheet-value input[type=checkbox] ~ span {
height: 100%;
width: 100%;
border-radius: 50%;
background:url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/5th%20Edition%20OGL%20by%20Roll20/images/insperation.gif") left top no-repeat;
background-size: contain;
cursor: pointer;
position: absolute;
top: 0px;
display: none;
}
.sheet-insp-prof-container .sheet-value input[type=checkbox]:checked ~ span {
display: block;
}
.sheet-insp-prof-container .sheet-value span {
font-size: 20px;
font-weight: normal;
line-height: 34px;
}
.sheet-insp-prof-container .sheet-label {
width: calc(100% - 29px);
height: 30px;
margin-left: -15px;
margin-top: 3px;
display: inline-block;
border: 1px solid #666;
border-radius: 5px;
vertical-align: top;
}
.sheet-insp-prof-container span {
display: block;
font-size: 9px;
line-height: 12px;
width: 100%;
text-align: center;
line-height: 30px;
font-weight: bold;
}
.sheet-insp-prof-container .sheet-value input,
.sheet-saving-throw input[type=text],
.sheet-skill input[type=text],
.sheet-ac-init-speed-container input,
.sheet-hp input,
.sheet-hdice-dsaves-container input[type=text],
.sheet-hdice-dsaves-container input[type=number],
.sheet-attacks input,
.sheet-equipment input,
.sheet-tool input,
.sheet-proficiencies input,
.sheet-pc .sheet-traits input,
.sheet-spell input,
.sheet-options .sheet-body input,
.sheet-resources input[type=number]
{
width: 100%;
text-align: center;
font-size: 20px;
border: none;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: textfield;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
}
.sheet-resources input[type=number],
.sheet-hdice-dsaves-container input[type=number]
{
padding-right: 0px;
padding-left: 10px;
}
.sheet-saving-throw-container,
.sheet-skills-container
{
width: 165px;
border: 1px solid #666;
border-radius: 5px;
margin-bottom: 10px;
padding-top: 5px;
}
.sheet-saving-throw,
.sheet-skill
{
width: 165px;
height: 18px;
}
.sheet-saving-throw input[type=checkbox],
.sheet-skill input[type=checkbox]
{
margin-left: 5px;
}
.sheet-saving-throw input[type=text],
.sheet-skill input[type=text]
{
font-size: 12px;
width: 21px;
}
.sheet-col1 .sheet-saving-throw > span,
.sheet-col1 .sheet-skill > span
{
font-size: 12px;
display: inline-block;
text-align: center;
min-width: 21px;
}
.sheet-saving-throw button[type=roll],
.sheet-skill button[type=roll]
{
width: calc(100% - 72px);
overflow: hidden;
word-wrap: break-word;
white-space: nowrap;
text-overflow: ellipsis;
text-align: left;
}
.sheet-saving-throw-container .sheet-label span,
.sheet-skills-container .sheet-label span,
.sheet-textbox-container .sheet-label span,
.sheet-ac-init-speed-container span.sheet-label,
.sheet-hp span,
.sheet-hdice-dsaves-container span,
.sheet-attacks span,
.sheet-equipment span,
.sheet-textbox span,
.sheet-tool_proficiencies span,
.sheet-proficiencies span,
.sheet-traits span,
.sheet-spells span,
.sheet-options .sheet-body span,
.sheet-globalattack span
{
display: block;
font-size: 9px;
line-height: 12px;
width: 100%;
text-align: center;
font-weight: bold;
margin-top: 5px;
}
.sheet-skill button span,
.sheet-options .sheet-body .sheet-skill span span,
.sheet-rolltemplate-spell .sheet-grey
{
color: #A0A0A0;
font-weight: normal;
}
.sheet-textbox-container,
.sheet-tool_proficiencies
{
border: 1px solid #666;
border-radius: 5px;
width: 243px;
}
.sheet-tool_proficiencies,
.sheet-attacks
{
padding-bottom: 10px;
}
.sheet-textbox-container textarea {
width: calc(100% - 10px);
resize: vertical;
border: none;
}
.sheet-ac-init-speed-container,
.sheet-hp,
.sheet-hdice-dsaves-container,
.sheet-attacks,
.sheet-equipment
{
width: 240px;
margin-bottom: 10px;
}
.sheet-ac-init-speed-container div {
width: calc(31%);
height: 100%;
border: 1px solid #666;
border-radius: 5px;
display: inline-block;
vertical-align: top;
}
.sheet-ac-init-speed-container span.sheet-label {
margin-top: 0px;
}
.sheet-ac-init-speed-container button[type=roll] {
display: block;
}
.sheet-hp,
.sheet-subcontainer,
.sheet-attacks,
.sheet-equipment
{
border: 1px solid #666;
border-radius: 5px;
}
.sheet-hp input {
font-size: 30px;
}
.sheet-hp input[type="number"] {
width: 100%;
padding-right: 0px;
padding-left: 20px;
}
.sheet-hp span.sheet-label,
.sheet-hdice-dsaves-container span.sheet-label
{
margin-top: 0px;
}
.sheet-hp .sheet-top span,
.sheet-hdice-dsaves-container .sheet-top span,
.sheet-attacks .sheet-top span,
.sheet-tool_proficiencies .sheet-top span,
.sheet-proficiencies .sheet-top span,
.sheet-traits .sheet-top span
{
text-align: left;
margin-left: 5px;
color: #A0A0A0;
font-weight: normal;
display: inline-block;
width: initial;
}
.sheet-hp .sheet-top input,
.sheet-hdice-dsaves-container .sheet-top input[type=text]
{
border-bottom: 1px solid #D3D3D3;
border-top: 0px;
border-left: 0px;
border-right: 0px;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
width: 150px;
display: inline-block;
font-size: 12px;
padding: 0px;
}
.sheet-hdice-dsaves-container .sheet-top input[type=text] {
width: 80px;
}
.sheet-subcontainer {
width: 116px;
display: inline-block;
vertical-align: top;
height: 64px;
}
.sheet-subcontainer input[type=text].sheet-label {
display: block;
font-size: 9px;
line-height: 12px;
width: 100%;
text-align: center;
font-weight: bold;
}
.sheet-hdice-dsaves-container .sheet-row-container{
float: right;
margin-right: 5px;
margin-top: 5px;
}
.sheet-hdice-dsaves-container .sheet-row-container span {
display: inline-block;
width: inherit;
}
.sheet-money {
width: 70px;
display: inline-block;
}
.sheet-coin {
border: 1px solid #666;
border-radius: 5px;
margin-top: 10px;
background-color: white;
position: relative;
left: -5px;
}
.sheet-coin span {
display: inline-block;
color: #A0A0A0;
margin-top: 0px;
margin-left: 5px;
width: 15px;
}
.sheet-coin input {
display: inline-block;
font-size: 12px;
padding: 0px;
width: 40px;
}
.sheet-equipment {
position: relative;
min-height: 276px;
}
.sheet-equipment textarea {
width: calc(100% - 69px);
margin: 0px 0px 0px -5px;
resize: vertical;
border: none;
display: inline-block;
padding: 0px;
min-height: 264px;
}
.sheet-equipment span,
.sheet-textbox span
{
margin-top: 0px;
}
.sheet-textbox {
width: 100%;
border: 1px solid #666;
border-radius: 5px;
margin-bottom: 5px;
}
.sheet-textbox textarea {
width: calc(100% - 10px);
resize: vertical;
border: none;
margin: 0px;
padding-bottom: 0px;
min-height: 48px;
height: 48px;
}
/*.sheet-col3 {
width: 245px;
margin-left: -3px;
}*/
.sheet-footer {
-webkit-user-select: auto;
-moz-user-select: text;
font-size: 10px;
color: rgb(165, 165, 165);
margin-top: 10px;
}
.sheet-footer div {
width: 45%;
display: inline-block;
}
.sheet-attacks {
min-height: 274px;
margin-bottom: 10px;
}
.sheet-attacks .sheet-display button[type=roll],
.sheet-tool .sheet-display button[type=roll],
.sheet-proficiency .sheet-display button[type=roll]
{
background-color: transparent;
color: black;
border: none;
background-image: none;
text-shadow: none;
box-shadow: none;
padding: 0px;
margin: 0px;
width: 100%;
font-weight: bold;
}
.sheet-attacks .sheet-display button[type=roll]::before,
.sheet-tool .sheet-display button[type=roll]::before,
.sheet-proficiency .sheet-display button[type=roll]::before
{
content: "" !important;
}
.sheet-attacks .sheet-display input,
.sheet-tool .sheet-display input,
.sheet-equipment .sheet-item input,
.sheet-attacks .sheet-display span,
.sheet-tool .sheet-display span,
.sheet-equipment .sheet-item span,
.sheet-proficiencies .sheet-display span
{
font-size: 12px;
line-height: 12px;
border-top-left-radius: 5px;
border-bottom-right-radius: 5px;
background-color: #EFEFEF;
cursor: pointer;
text-align: left;
font-size: 9px;
font-weight: bold;
}
.sheet-attacks .sheet-display span,
.sheet-tool .sheet-display span,
.sheet-equipment .sheet-item span,
.sheet-proficiencies .sheet-display span
{
min-height: 12px;
display: inline-block;
margin-top: 0px;
padding: 4px;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: bottom;
white-space: nowrap;
}
.sheet-traits .sheet-display .sheet-title
{
font-family: "Times New Roman", Times, serif;
font-size: 16px;
text-transform: capitalize;
font-variant: small-caps;
font-weight: bold;
color: rgb(126, 45, 64);
}
.sheet-traits .sheet-display .sheet-subheader
{
font-style: italic;
color: #A0A0A0;
margin-top: -3px;
}
.sheet-traits .sheet-display .sheet-subheader span
{
font-size: 10px;
display: inline;
}
.sheet-attacks .sheet-options-flag,
.sheet-spell .sheet-options-flag,
.sheet-tool .sheet-options-flag,
.sheet-npc .sheet-npc_options-flag,
.sheet-pc .sheet-trait .sheet-options-flag,
.sheet-action .sheet-options-flag,
.sheet-textbox .sheet-options-flag,
.sheet-proficiencies .sheet-options-flag,
.sheet-traits .sheet-options-flag,
.sheet-equipment .sheet-inventorysubflag
{
opacity: 0;
position: absolute;
top: 0px;
right: 0px;
width: 18px;
height: 18px;
z-index: 2;
}
.sheet-attacks .sheet-options-flag + span,
.sheet-spell .sheet-options-flag + span,
.sheet-tool .sheet-options-flag + span,
.sheet-npc .sheet-npc_options-flag + span,
.sheet-trait .sheet-options-flag + span,
.sheet-action .sheet-options-flag + span,
.sheet-textbox .sheet-options-flag + span,
.sheet-proficiencies .sheet-options-flag + span,
.sheet-traits .sheet-options-flag + span,
.sheet-equipment .sheet-inventorysubflag + span
{
position: absolute;
top: 0px;
right: 0px;
white-space: nowrap;
width: 18px;
height: 18px;
font-size: 20px;
font-family: pictos;
color: #A0A0A0;
cursor: pointer;
margin-top: 0px;
display: none;
}
.sheet-attacks .sheet-options-flag:checked + span,
.sheet-spell .sheet-options-flag:checked + span,
.sheet-tool .sheet-options-flag:checked + span,
.sheet-npc .sheet-npc_options-flag:checked + span,
.sheet-trait .sheet-options-flag:checked + span,
.sheet-action .sheet-options-flag:checked + span,
.sheet-textbox .sheet-options-flag:checked + span,
.sheet-proficiencies .sheet-options-flag:checked + span,
.sheet-traits .sheet-options-flag:checked + span,
.sheet-equipment .sheet-inventorysubflag:checked + span
{
color: black;
display: block;
}
.sheet-attacks .sheet-attack:hover .sheet-options-flag + span,
.sheet-spell:hover .sheet-options-flag + span,
.sheet-tool:hover .sheet-options-flag + span,
.sheet-npc:hover > .sheet-npc_options-flag + span,
.sheet-trait:hover .sheet-options-flag + span,
.sheet-action:hover .sheet-npc_options-flag + span,
.sheet-textbox:hover > .sheet-options-flag + span,
.sheet-proficiency:hover .sheet-options-flag + span,
.sheet-item:hover .sheet-inventorysubflag + span,
.sheet-pc .sheet-trait:hover .sheet-output
{
display: block;
}
.sheet-pc .sheet-trait .sheet-display-flag {
opacity: 0;
position: absolute;
top: 0px;
right: 0px;
width: 100%;
height: 100%;
}
.sheet-pc .sheet-trait .sheet-options-flag:checked ~ .sheet-display-flag {
width: 0px;
height: 0px;
}
.sheet-pc .sheet-trait .sheet-display-flag:checked ~ .sheet-display .sheet-desc
{
display: none;
}
.sheet-pc .sheet-trait .sheet-output {
position: absolute;
top: -8px;
right: 30px;
width: 18px;
height: 18px;
z-index: 2;
background: none;
border: none;
font-family: pictos;
font-size: 20px;
display: none;
}
.sheet-pc .sheet-trait .sheet-output:before {
content: "";
}
.sheet-textbox .sheet-display .sheet-desc {
white-space: pre-wrap;
word-break: break-word;
}
.sheet-licensecontainer,
.sheet-attack,
.sheet-spell,
.sheet-tool,
.sheet-npc,
.sheet-action,
.sheet-textbox,
.sheet-proficiencies,
.sheet-traits
{
position: relative;
}
.sheet-attack .sheet-options,
.sheet-spell .sheet-options,
.sheet-tool .sheet-options,
.sheet-npc .sheet-npc_options,
.sheet-trait .sheet-options,
.sheet-action .sheet-options,
.sheet-textbox .sheet-options,
.sheet-proficiencies .sheet-options,
.sheet-trait .sheet-options
{
display: none;
border-top: 2px dashed gold;
}
.sheet-item .sheet-subitem {
display: none;
}
.sheet-textbox .sheet-display {
padding: 5px 5px 5px 10px;
}
.sheet-textbox .sheet-display span {
font-weight: normal;
font-size: 12px;
text-align: left;
line-height: 16px;
}
.sheet-textbox.sheet-pibf span{
white-space: pre-wrap;
word-break: break-word;
}
.sheet-attacks .sheet-options-flag:checked ~ .sheet-options,
.sheet-spell .sheet-options-flag:checked ~ .sheet-options,
.sheet-tool .sheet-options-flag:checked ~ .sheet-options,
.sheet-npc .sheet-npc_options-flag:checked ~ .sheet-npc_options,
.sheet-trait .sheet-options-flag:checked ~ .sheet-options,
.sheet-action .sheet-options-flag:checked ~ .sheet-options,
.sheet-textbox .sheet-options-flag:checked ~ .sheet-options,
.sheet-proficiencies .sheet-options-flag:checked ~ .sheet-options,
.sheet-traits .sheet-options-flag:checked ~ .sheet-options,
.sheet-item .sheet-inventorysubflag:checked ~ .sheet-subitem
{
display: inherit;
}
.sheet-textbox .sheet-options-flag:checked ~ .sheet-display {
display: none;
}
.sheet-spell-level {
position: relative;
margin-bottom: 5px;
}
.sheet-level {
width: 20px;
display: inline-block;
}
.sheet-level:after,
.sheet-level:before {
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-left: 20px solid #FFF;
left: 0px;
top: -6px;
content: '';
position: absolute;
}
.sheet-level:before {
border-top: 23px solid transparent;
border-bottom: 23px solid transparent;
border-left: 24px solid;
border-left-color: inherit;
left: -2px;
top: -9px;
}
.sheet-level span {
z-index: 3;
margin-left: -3px;
position: relative;
font-size: 16px;
top: 2px;
}
.sheet-cantrips {
display: inline-block;
border: 1px solid black;
height: 25px;
border-radius: 5px;
width: 238px;
text-align: center;
margin-left: -20px;
}
.sheet-cantrips span {
display: block;
font-size: 9px;
line-height: 12px;
width: 100%;
text-align: center;
font-weight: bold;
margin-top: 8px;
}
.sheet-spell-labels {
color: #A0A0A0;
}
.sheet-spell-labels span {
display: inline;
font-weight: normal;
font-size: 8px;
}
.sheet-spell-level input {
width: 100%;
text-align: center;
font-size: 20px;
border: none;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: textfield;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
padding: 0px;
margin: 2px;
height: 100%;
}
.sheet-spell-level .sheet-total,
.sheet-spell-level .sheet-expended {
display: inline-block;
border: 1px solid black;
height: 25px;
border-radius: 5px;
text-align: center;
margin-left: -20px;
background-color: white;
}
.sheet-spell-level .sheet-total {
width: 114px;
vertical-align: bottom;
}
.sheet-spell-level .sheet-total span {
font-size: 20px;
font-weight: normal;
position: relative;
top: 3px;
}
.sheet-spell-level .sheet-expended {
width: 139px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
.sheet-spell {
margin-bottom: 5px;
width: 245px;
}
.sheet-spell .sheet-display {
position: relative;
}
.sheet-spell .sheet-display button[type=roll]
{
background-color: transparent;
color: black;
border-top: none;
border-left: none;
border-right: none;
border-bottom: 1px solid #D3D3D3;
background-image: none;
text-shadow: none;
box-shadow: none;
padding: 0px;
margin: 0px;
width: 100%;
font-weight: bold;
text-align: left;
}
.sheet-spell .sheet-display button[type=roll]::before
{
content: "" !important;
}
span.sheet-spellritual,
span.sheet-spellconcentration
{
display: none;
font-size: 8px;
font-weight: normal;
margin-top: 0px;
color: white;
background-color: black;
position: absolute;
width: 10px;
height: 10px;
top: 0px;
line-height: 10px;
}
.sheet-spellicon_flag:not([value="none"]) + .sheet-body .sheet-spell .sheet-display .sheet-spellritual:not([value="0"]) ~ span.sheet-spellritual
{
display: inline-block;
right: 11px;
}
.sheet-spellicon_flag:not([value="none"]) + .sheet-body .sheet-spell .sheet-display .sheet-spellconcentration:not([value="0"]) ~ span.sheet-spellconcentration
{
border-radius: 100%;
display: inline-block;
right: 0;
}
.sheet-spell .sheet-display .sheet-componentscontainer {
position: absolute;
top: 3px;
right: 0;
width: auto;
}
.sheet-spell .sheet-display .sheet-v,
.sheet-spell .sheet-display .sheet-s,
.sheet-spell .sheet-display .sheet-m
{
display: none;
}
.sheet-spellicon_flag[value="all"] + .sheet-body .sheet-spell .sheet-display input.sheet-v:not([value="0"]) ~ .sheet-componentscontainer span.sheet-v,
.sheet-spellicon_flag[value="all"] + .sheet-body .sheet-spell .sheet-display input.sheet-s:not([value="0"]) ~ .sheet-componentscontainer span.sheet-s,
.sheet-spellicon_flag[value="all"] + .sheet-body .sheet-spell .sheet-display input.sheet-m:not([value="0"]) ~ .sheet-componentscontainer span.sheet-m
{
display: inline;
width: initial;
font-size: 8px;
}
.sheet-spell .sheet-display input[type=text]
{
font-size: 12px;
line-height: 12px;
cursor: pointer;
text-align: left;
padding: none;
margin: none;
background-color: transparent;
color: black;
border: none;
background-image: none;
text-shadow: none;
box-shadow: none;
padding: 0px;
margin: 0px;
width: 100%;
}
.sheet-spell .sheet-display span.sheet-spellname
{
font-size: 12px;
text-align: left;
font-weight: normal;
margin-right: -4px;
display: inline;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 220px;
}
.sheet-spell .sheet-display .sheet-prep ~ span.sheet-spellname
{
margin-left: 10px;
}
/*.repcontrol {
display: none;
}
.repcontrol,
.repcontrol_del {
position: relative;
z-index: 10;
}
.sheet-tool_proficiencies:hover .repcontrol,
.sheet-attacks:hover .repcontrol,
.sheet-spell-container:hover .repcontrol,
.sheet-traits:hover .repcontrol,
.sheet-actions:hover .repcontrol,
.sheet-equipment:hover .repcontrol,
.sheet-col3:hover .repcontrol
{
display: block;
}*/
.repcontrol {
min-height: 27px;
}
.repcontrol .btn {
/*visibility: hidden;*/
border: medium none;
color: white !important;
background: none;
box-shadow: none;
}
.repcontrol .btn:focus {
outline: 0;
}
.repcontrol .repcontrol_edit:after {
content: '(';
visibility: visible;
font-family: pictos;
background-color: #fff;
border: 1px solid black;
border-radius: 2px;
font-size: 12px;
height: 12px;
width: 12px;
padding: 2px 4px 2px 4px;
color: black;
}
.editmode ~ .repcontrol .repcontrol_edit:after {
content: ')';
}
.repcontrol .repcontrol_add:before {
content: '&';
visibility: visible;
font-family: pictos;
background-color: #fff;
border: 1px solid black;
border-radius: 2px;
font-size: 12px;
height: 12px;
width: 12px;
padding: 2px 4px 2px 4px;
color: black;
}
.repcontrol .repcontrol_edit:hover:after,
.repcontrol .repcontrol_add:hover:before
{
background-color: #EFEFEF;
}
.sheet-resources .repcontrol {
margin-top: -10px;
}
.itemcontrol {
z-index: 10;
}
.itemcontrol .repcontrol_del {
font-size: 10px;
margin-top: 3px;
padding: 0px;
height: 18px;
width: 18px;
}
.itemcontrol .repcontrol_move {
font-size: 10px;
margin-top: 3px;
padding: 0px;
height: 18px;
width: 18px;
}
.sheet-tool .sheet-options,
.sheet-attack .sheet-options,
.sheet-spell .sheet-options,
.sheet-proficiencies .sheet-options,
.sheet-traits .sheet-options
{
padding-left: 5px;
}
.sheet-tool .sheet-options span,
.sheet-attack .sheet-options span,
.sheet-spell .sheet-options span,
.sheet-options .sheet-body span,
.sheet-proficiencies .sheet-options span,
.sheet-traits .sheet-options span
{
width: initial;
display: inline-block;
text-align: left;
}
.sheet-tool .sheet-options input,
.sheet-attack .sheet-options input[type=text],
.sheet-spell .sheet-options input[type=text],
.sheet-options .sheet-body input[type=text],
.sheet-proficiencies .sheet-options input[type=text],
.sheet-traits .sheet-options input[type=text],
.sheet-globalattack input[type=text]
{
display: inline-block;
text-align: left;
font-size: 12px;
border-bottom: 1px solid #D3D3D3;
padding: 0px;
width: initial;
}
.sheet-tool .sheet-options select,
.sheet-attack .sheet-options select,
.sheet-spell .sheet-options select,
.sheet-options .sheet-body select,
.sheet-proficiencies .sheet-options select,
.sheet-traits .sheet-options select
{
border-bottom: 1px solid #D3D3D3;
border-top: 0px;
border-left: 0px;
border-right: 0px;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
display: inline-block;
font-size: 12px;
width: initial;
padding: 0px;
margin: 0px;
line-height: 18px;
height: 18px;
}
.sheet-tool .sheet-options input[type=checkbox],
.sheet-attack .sheet-options input[type=checkbox],
.sheet-spell .sheet-options input[type=checkbox],
.sheet-options .sheet-body input[type=checkbox],
.sheet-npc .sheet-npc_options input[type=checkbox],
.sheet-proficiencies .sheet-options input[type=checkbox],
.sheet-traits .sheet-options input[type=checkbox]
{
width: 13px;
font-size: initial;
-webkit-appearance: checkbox;
-moz-appearance: checkbox;
}
.sheet-attack .sheet-options input[type=text].sheet-num,
.sheet-options input[type=text].sheet-num
{
width: 15px;
text-align: center;
}
.sheet-spell .sheet-options textarea {
width: calc(100% - 10px);
resize: vertical;
margin-bottom: 0px;
}
.sheet-spell-container {
min-height: 60px;
margin-bottom: 1px;
}
.sheet-spell-container input[name="attr_spellcastingtime"] {
width: 168px;
}
.sheet-spell-container input[name="attr_spellrange"] {
width: 201px;
}
.sheet-spell-container input[name="attr_spelltarget"] {
width: 199px;
}
.sheet-spell-container .sheet-spell .sheet-options input[name="attr_spellcomp_materials"] {
margin-left: 17px;
width: 223px;
}
.sheet-spell-container input[name="attr_spellduration"] {
width: 186px;
}
.sheet-options .sheet-row {
display: block;
width: 100%;
}
.sheet-options .sheet-title input[type=text] {
width: 52px;
border: none;
text-align: center;
color: #A0A0A0
}
.sheet-options .sheet-title {
text-align: center;
}
.sheet-class_options,
.sheet-skill_options,
.sheet-general_options
{
border: 1px solid #666;
border-radius: 5px;
padding: 5px;
margin-bottom: 5px;
}
.sheet-general_options {
position: relative;
}
.sheet-hlabel-container .sheet-showing,
.sheet-hlabel-container .sheet-hiding
{
display: none;
}
.sheet-hlabel-container input[value="1"].sheet-flag ~ .sheet-showing,
.sheet-hlabel-container input[value="0"].sheet-flag ~ .sheet-hiding
{
display: inline-block;
}
.sheet-options .sheet-row > span {
color: black;
}
.sheet-spell .sheet-display {
position: relative;
}
.sheet-spell .sheet-prep {
width: 10px;
height: 10px;
border-radius: 50%;
position: absolute;
top: 0px;
border: 1px solid black;
}
.sheet-spell input[value="1"] ~ span.sheet-prep {
background-color: #EC2127;
}
.sheet-rolltemplates {
display: none;
}
.sheet-rolltemplate-simple .sheet-containerold
{
width: 189px;
background: url(http://i.imgur.com/53WSdhx.png) top left;
background-size: 189px 100%;
background-repeat: no-repeat;
color: black;
}
.sheet-rolltemplate-simple .sheet-container
{
width: 189px;
color: black;
border: 1px solid black;
border-radius: 10px;
background-color: white;
}
.sheet-rolltemplate-atk .sheet-containerold,
.sheet-rolltemplate-atkdmg .sheet-container.sheet-atkold,
.sheet-rolltemplate-dmg .sheet-atkold
{
width: 189px;
background: url(http://i.imgur.com/4RCRsAd.png) top left;
background-size: 189px 100%;
background-repeat: no-repeat;
color: black;
}
.sheet-rolltemplate-atk .sheet-container,
.sheet-rolltemplate-atkdmg .sheet-container.sheet-atk,
.sheet-rolltemplate-dmg .sheet-atk
{
width: 189px;
color: black;
border: 1px solid black;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
background-color: white;
}
.sheet-rolltemplate-dmg .sheet-containerold,
.sheet-rolltemplate-atkdmg .sheet-container.sheet-damagetemplateold
{
width: 189px;
background: url(http://i.imgur.com/gw9HTsq.png) top left;
background-size: 189px 100%;
background-repeat: no-repeat;
color: black;
}
.sheet-rolltemplate-dmg .sheet-container,
.sheet-rolltemplate-atkdmg .sheet-container.sheet-damagetemplate
{
width: 189px;
color: black;
border: 1px solid black;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
background-color: white;
}
.sheet-rolltemplate-simple .sheet-result,
.sheet-rolltemplate-atk .sheet-result,
.sheet-rolltemplate-atkdmg .sheet-result,
.sheet-rolltemplate-dmg .sheet-result,
.sheet-npc .sheet-subtitle .sheet-italics
{
width: 100%;
}
.sheet-rolltemplate-atkdmg .sheet-damagetemplate .sheet-result,
.sheet-rolltemplate-dmg .sheet-damagetemplate .sheet-result
{
min-height: 45px;
}
.sheet-rolltemplate-simple .sheet-adv,
.sheet-rolltemplate-atk .sheet-adv,
.sheet-rolltemplate-atkdmg .sheet-adv,
.sheet-rolltemplate-dmg .sheet-adv
{
width: 84px;
display: inline-block;
text-align: center;
vertical-align: top;
margin-top: 15px;
}
.sheet-rolltemplate-simple .sheet-adv:first-child,
.sheet-rolltemplate-atk .sheet-adv:first-child,
.sheet-rolltemplate-atkdmg .sheet-adv:first-child,
.sheet-rolltemplate-dmg .sheet-adv:first-child
{
margin-left: 8px;
margin-right: -3px;
}
.sheet-rolltemplate-simple .sheet-adv:nth-child(3),
.sheet-rolltemplate-atk .sheet-adv:nth-child(3),
.sheet-rolltemplate-atkdmg .sheet-adv:nth-child(3),
.sheet-rolltemplate-dmg .sheet-adv:nth-child(3)
{
margin-right: 8px;
margin-left: -3px;
}
.sheet-rolltemplate-simple .sheet-adv span,
.sheet-rolltemplate-simple .sheet-solo span,
.sheet-rolltemplate-atk .sheet-adv span,
.sheet-rolltemplate-atk .sheet-solo span,
.sheet-rolltemplate-atkdmg .sheet-adv span,
.sheet-rolltemplate-atkdmg .sheet-solo span,
.sheet-rolltemplate-dmg .sheet-adv span,
.sheet-rolltemplate-dmg .sheet-solo span
{
width: 30px;
font-size: 20px;
background-color: transparent;
border: 0px;
padding: 0px;
}
.sheet-rolltemplate-simple .sheet-advspacer,
.sheet-rolltemplate-atk .sheet-advspacer,
.sheet-rolltemplate-atkdmg .sheet-advspacer,
.sheet-rolltemplate-dmg .sheet-advspacer
{
width: 0px;
border: 1px solid black;
display: inline-block;
height: 35px;
}
.sheet-rolltemplate-simple .sheet-solo,
.sheet-rolltemplate-atk .sheet-solo,
.sheet-rolltemplate-atkdmg .sheet-solo,
.sheet-rolltemplate-dmg .sheet-solo
{
width: 100%;
text-align: center;
height: 23px;
padding-top: 15px;
}
.sheet-rolltemplate-simple span,
.sheet-rolltemplate-atk span,
.sheet-rolltemplate-atkdmg span,
.sheet-rolltemplate-dmg span,
.sheet-rolltemplate-desc span
{
font-size: 12px;
line-height: 12px;
text-align: center;
font-weight: bold;
}
.sheet-rolltemplate-dmg .sheet-desc span.sheet-plus,
.sheet-rolltemplate-atkdmg .sheet-desc span.sheet-plus
{
font-weight: bold;
font-size: 20px;
display: inline;
}
.sheet-rolltemplate-simple .sheet-grey,
.sheet-rolltemplate-simple .sheet-grey .inlinerollresult.fullcrit,
.sheet-rolltemplate-simple .sheet-grey .inlinerollresult.fullfail,
.sheet-rolltemplate-simple .sheet-grey .inlinerollresult.importantroll,
.sheet-rolltemplate-simple .sheet-label span span,
.sheet-rolltemplate-atk .sheet-label span span,
.sheet-rolltemplate-atk .sheet-grey,
.sheet-rolltemplate-atk .sheet-grey .inlinerollresult.fullcrit,
.sheet-rolltemplate-atk .sheet-grey .inlinerollresult.fullfail,
.sheet-rolltemplate-atk .sheet-grey .inlinerollresult.importantroll,
.sheet-rolltemplate-atkdmg .sheet-label span span,
.sheet-rolltemplate-atkdmg .sheet-grey,
.sheet-rolltemplate-atkdmg .sheet-grey .inlinerollresult.fullcrit,
.sheet-rolltemplate-atkdmg .sheet-grey .inlinerollresult.fullfail,
.sheet-rolltemplate-atkdmg .sheet-grey .inlinerollresult.importantroll,
.sheet-rolltemplate-dmg .sheet-label span span,
.sheet-rolltemplate-dmg .sheet-grey,
.sheet-rolltemplate-dmg .sheet-grey .inlinerollresult.fullcrit,
.sheet-rolltemplate-dmg .sheet-grey .inlinerollresult.fullfail,
.sheet-rolltemplate-dmg .sheet-grey .inlinerollresult.importantroll,
.sheet-rolltemplate-npc .sheet-grey,
.sheet-rolltemplate-npc .sheet-grey .inlinerollresult.fullcrit,
.sheet-rolltemplate-npc .sheet-grey .inlinerollresult.fullfail,
.sheet-rolltemplate-npc .sheet-grey .inlinerollresult.importantroll,
.sheet-rolltemplate-npcaction .sheet-grey,
.sheet-rolltemplate-npcaction .sheet-grey .inlinerollresult.fullcrit,
.sheet-rolltemplate-npcaction .sheet-grey .inlinerollresult.fullfail,
.sheet-rolltemplate-npcaction .sheet-grey .inlinerollresult.importantroll,
.sheet-rolltemplate-npcatk .sheet-grey,
.sheet-rolltemplate-npcatk .sheet-grey .inlinerollresult.fullcrit,
.sheet-rolltemplate-npcatk .sheet-grey .inlinerollresult.fullfail,
.sheet-rolltemplate-npcatk .sheet-grey .inlinerollresult.importantroll
{
color: #A0A0A0;
border: 0px;
font-weight: normal;
}
.sheet-rolltemplate-simple .sheet-label,
.sheet-rolltemplate-atk .sheet-label,
.sheet-rolltemplate-atkdmg .sheet-label,
.sheet-rolltemplate-dmg .sheet-label
{
text-align: center;
margin-top: -3px;
padding-bottom: 5px;
}
.sheet-rolltemplate-simple .sheet-label span span,
.sheet-rolltemplate-atk .sheet-label span span,
.sheet-rolltemplate-atkdmg .sheet-label span span,
.sheet-rolltemplate-dmg .sheet-label span span
{
padding: 0px;
border: 0px;
background-color: transparent;
font-size: 12px;
}
.sheet-rolltemplate-simple .inlinerollresult.fullcrit,
.sheet-rolltemplate-atk .inlinerollresult.fullcrit,
.sheet-rolltemplate-atkdmg .inlinerollresult.fullcrit,
.sheet-rolltemplate-dmg .inlinerollresult.fullcrit
{
color: #3FB315;
border: 0px;
}
.sheet-rolltemplate-simple .inlinerollresult.fullfail,
.sheet-rolltemplate-atk .inlinerollresult.fullfail,
.sheet-rolltemplate-atkdmg .inlinerollresult.fullfail,
.sheet-rolltemplate-dmg .inlinerollresult.fullfail
{
color: #B31515;
border: 0px;
}
.sheet-rolltemplate-simple .inlinerollresult.importantroll,
.sheet-rolltemplate-atk .inlinerollresult.importantroll,
.sheet-rolltemplate-atkdmg .inlinerollresult.importantroll,
.sheet-rolltemplate-dmg .inlinerollresult.importantroll
{
color: #4A57ED;
border: 0px;
}
.sheet-rolltemplate-atk .sheet-damage,
.sheet-rolltemplate-atkdmg .sheet-damage,
.sheet-rolltemplate-dmg .sheet-damage
{
text-align: center;
margin-top: -5px;
}
.sheet-rolltemplate-atkdmg .sheet-damagetemplate .inlinerollresult.fullcrit,
.sheet-rolltemplate-atkdmg .sheet-damagetemplate .inlinerollresult.fullfail,
.sheet-rolltemplate-atkdmg .sheet-damagetemplate .inlinerollresult.importantroll,
.sheet-rolltemplate-dmg .sheet-damagetemplate .inlinerollresult.fullcrit,
.sheet-rolltemplate-dmg .sheet-damagetemplate .inlinerollresult.fullfail,
.sheet-rolltemplate-dmg .sheet-damagetemplate .inlinerollresult.importantroll,
.sheet-rolltemplate-npcaction .sheet-damagetemplate .inlinerollresult.fullcrit,
.sheet-rolltemplate-npcaction .sheet-damagetemplate .inlinerollresult.fullfail,
.sheet-rolltemplate-npcaction .sheet-damagetemplate .inlinerollresult.importantroll,
.sheet-rolltemplate-npcdmg .sheet-damagetemplate .inlinerollresult.fullcrit,
.sheet-rolltemplate-npcdmg .sheet-damagetemplate .inlinerollresult.fullfail,
.sheet-rolltemplate-npcdmg .sheet-damagetemplate .inlinerollresult.importantroll,
.sheet-rolltemplate-atkdmg .sheet-desc .inlinerollresult.fullcrit,
.sheet-rolltemplate-atkdmg .sheet-desc .inlinerollresult.importantroll,
.sheet-rolltemplate-atkdmg .sheet-desc .inlinerollresult.fullfail,
.sheet-rolltemplate-dmg .sheet-desc .inlinerollresult.fullcrit,
.sheet-rolltemplate-dmg .sheet-desc .inlinerollresult.importantroll,
.sheet-rolltemplate-dmg .sheet-desc .inlinerollresult.fullfail
.sheet-rolltemplate-atk .sheet-desc .inlinerollresult.fullcrit,
.sheet-rolltemplate-atk .sheet-desc .inlinerollresult.importantroll,
.sheet-rolltemplate-atk .sheet-desc .inlinerollresult.fullfail
{
color: black;
border: 0px;
}
.sheet-rolltemplate-atk .sheet-save .sheet-savedc,
.sheet-rolltemplate-dmg .sheet-save .sheet-savedc,
.sheet-rolltemplate-atkdmg .sheet-save .sheet-savedc
{
padding-bottom: 5px;
padding-top: 15px;
text-align: center;
}
.sheet-rolltemplate-atk .sheet-save .sheet-savedc span,
.sheet-rolltemplate-dmg .sheet-save .sheet-savedc span,
.sheet-rolltemplate-atkdmg .sheet-save .sheet-savedc span
{
font-size: 15px;
font-weight: bold;
}
.sheet-rolltemplate-atk .sheet-save .sheet-label span,
.sheet-rolltemplate-dmg .sheet-save .sheet-label span,
.sheet-rolltemplate-atkdmg .sheet-save .sheet-label span
{
font-weight: bold;
}
.sheet-rolltemplate-atk .sheet-save .inlinerollresult,
.sheet-rolltemplate-dmg .sheet-save .inlinerollresult,
.sheet-rolltemplate-atkdmg .sheet-save .inlinerollresult
{
background-color: transparent;
border: 0px;
padding: 0px;
display: inline-block;
font-weight: bold;
}
.sheet-rolltemplate-dmg .sheet-desc .inlinerollresult,
.sheet-rolltemplate-atkdmg .sheet-desc .inlinerollresult,
.sheet-rolltemplate-atk .sheet-desc .inlinerollresult
{
background-color: transparent;
border: 0px;
display: inline-block;
font-weight: bold;
font-size: 20px;
padding-top: 10px;
padding-bottom: 6px;
}
.sheet-rolltemplate-dmg .sheet-desc .sheet-label span,
.sheet-rolltemplate-atkdmg .sheet-desc .sheet-label span {
font-weight: bold;
}
.sheet-rolltemplate-atk .sheet-save span,
.sheet-rolltemplate-dmg .sheet-save span,
.sheet-rolltemplate-atkdmg .sheet-save span
{
font-weight: normal;
line-height: 12px;
display: block;
}
.sheet-rolltemplate-atk .sheet-save span.sheet-bold,
.sheet-rolltemplate-dmg .sheet-save span.sheet-bold,
.sheet-rolltemplate-atkdmg .sheet-save span.sheet-bold
{
font-weight: bold;
display: inline-block;
}
.sheet-rolltemplate-atk .sheet-sublabel,
.sheet-rolltemplate-atkdmg .sheet-sublabel,
.sheet-rolltemplate-dmg .sheet-sublabel
{
text-align: center;
font-style: italic;
margin-top: -2px;
min-height: 17px;
}
.sheet-rolltemplate-atk .sheet-descold,
.sheet-rolltemplate-atkdmg .sheet-descold,
.sheet-rolltemplate-dmg .sheet-descold
{
width: 189px;
background: url(http://i.imgur.com/4988JS0.png) top left;
background-size: 189px 100%;
background-repeat: no-repeat;
color: black;
text-align: center;
padding-top: 5px;
padding-bottom: 5px;
}
.sheet-rolltemplate-atk .sheet-desc,
.sheet-rolltemplate-atkdmg .sheet-desc,
.sheet-rolltemplate-dmg .sheet-desc,
.sheet-rolltemplate-desc .sheet-desc
{
width: 189px;
border: 1px solid black;
color: black;
text-align: center;
padding-top: 5px;
padding-bottom: 5px;
background-color: white;
}
.sheet-rolltemplate-atk .sheet-desc span,
.sheet-rolltemplate-atkdmg .sheet-desc span,
.sheet-rolltemplate-dmg .sheet-desc span,
.sheet-rolltemplate-desc .sheet-desc span
{
font-weight: normal;
line-height: 12px;
display: block;
}
.sheet-rolltemplate-atk .sheet-info span,
.sheet-rolltemplate-atkdmg .sheet-info span,
.sheet-rolltemplate-dmg .sheet-info span
{
text-align: left;
padding: 0px 5px 0px 5px;
}
.sheet-rolltemplate-atk .sheet-info .inlinerollresult,
.sheet-rolltemplate-atkdmg .sheet-info .inlinerollresult,
.sheet-rolltemplate-dmg .sheet-info .inlinerollresult
{
font-size: inherit;
padding: 0px;
}
.sheet-rolltemplate-atkdmg .sheet-damagetemplate .sheet-sublabel,
.sheet-rolltemplate-dmg .sheet-damagetemplate .sheet-sublabel,
.sheet-rolltemplate-atkdmg .sheet-desc .sheet-sublabel,
.sheet-rolltemplate-dmg .sheet-desc .sheet-sublabel
{
display: block;
width: 100%;
font-size: 10px;
font-weight: normal;
margin-top: -5px;
color: #A0A0A0;
}
.sheet-rolltemplate-atk .sheet-sublabel span,
.sheet-rolltemplate-atkdmg .sheet-sublabel span,
.sheet-rolltemplate-dmg .sheet-sublabel span,
{
font-weight: normal;
color: black;
}
.sheet-rolltemplate-atk .sheet-spacer,
.sheet-rolltemplate-atkdmg .sheet-spacer,
.sheet-rolltemplate-dmg .sheet-spacer
{
height: 10px;
}
.sheet-rolltemplate-dmg {
margin-top: -7px;
position: relative;
}
.sheet-rolltemplate-atk a[href^="~"] {
background-color: transparent;
padding: 0px;
color: black;
border: 0px;
}
.sheet-rolltemplate-atk a:hover {
color: #EC2127;
}
.sheet-rolltemplate-atk a[href^="~"]:visited {
pointer-events: none;
}
.sheet-rolltemplate-spell .sheet-container {
width: 263px;
background: url(https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/5th%20Edition%20OGL%20by%20Roll20/images/spellbg.jpg) center center;
background-size: auto;
background-repeat: repeat;
color: black;
font-family: "Times New Roman", Times, serif;
padding: 10px;
margin-left: -45px;
border: 1px solid black;
}
.withoutavatars .sheet-rolltemplate-spell .sheet-container {
margin-left: -15px;
}
.sheet-rolltemplate-spell .sheet-row {
display: block;
}
.sheet-rolltemplate-spell .sheet-title {
color: rgb(126, 45, 64);
font-size: 1.2em;
}
.sheet-rolltemplate-spell .sheet-italics,
.sheet-npc .sheet-italics
{
font-style: italic;
}
.sheet-rolltemplate-spell .sheet-bold,
.sheet-actions .sheet-bold
{
font-weight: bold;
}
.sheet-rolltemplate-spell .sheet-spacer {
height: 5px;
}
.sheet-triangleold {
border-top: 3px solid transparent;
border-bottom: 3px solid transparent;
border-left: 360px solid rgb(126, 45, 64);
margin-top: 5px;
margin-bottom: 5px;
}
.sheet-triangle {
border: 1px solid rgb(126, 45, 64);
margin-top: 5px;
margin-bottom: 5px;
}
.sheet-red,
.sheet-npc .sheet-display .sheet-red input,
.sheet-npc .sheet-display .sheet-red span
{
color: rgb(126, 45, 64);
}
.sheet-npc .sheet-npc_options input
{
border-bottom: 1px solid #D3D3D3;
border-top: 0px;
border-left: 0px;
border-right: 0px;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
width: 200px;
display: inline-block;
font-size: 12px;
padding: 0px;
}
.sheet-npc .sheet-npc_options span
{
display: inline-block;
font-size: 9px;
line-height: 12px;
text-align: left;
font-weight: bold;
}
.sheet-npc .sheet-npc_options .sheet-title span {
text-align: center;
font-size: 14px;
display: block;
margin-top: 5px;
}
.sheet-npc .sheet-npc_options {
border-bottom: 2px dashed gold;
}
.sheet-npc input[type=text].sheet-num {
width: 20px;
text-align: center;
}
.sheet-npc .sheet-col {
width: calc(33% - 5px);
}
.sheet-npc .sheet-spacer {
height: 5px;
}
.sheet-npc select {
border-bottom: 1px solid #D3D3D3;
border-top: 0px;
border-left: 0px;
border-right: 0px;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
line-height: inherit;
}
.sheet-npc .sheet-display input,
.sheet-npc .sheet-reaction input
{
border: none;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
margin: 0px;
pointer-events: none;
padding: 0px;
height: 16px;
line-height: 16px;
margin-top: -2px;
}
.sheet-npc .sheet-display .sheet-title span {
font-family: "Times New Roman", Times, serif;
font-size: 24px;
width: 100%;
text-transform: capitalize;
font-variant: small-caps;
font-weight: bold;
display: block;
text-align: left;
line-height: 27px;
}
.sheet-npc .sheet-display .sheet-subtitle span {
font-size: 12px;
}
.sheet-npc .sheet-display .sheet-num3 {
width: 27px;
text-align: center;
}
.sheet-npc .sheet-display .sheet-actype + .sheet-parens {
display: none;
}
.sheet-npc .sheet-display .sheet-actype:not([value=""]) + .sheet-parens {
display: inline;
}
.sheet-npc .sheet-display .sheet-parens {
margin-left: -2px;
}
.sheet-npc .sheet-display .sheet-parens:before {
content: "(";
}
.sheet-npc .sheet-display .sheet-parens:after {
content: ")";
}
.sheet-npc .sheet-display .sheet-parens.sheet-xp:after {
content: " XP)";
}
.sheet-npc .sheet-display span.sheet-npc-init-die
{
font-family: "dicefontd20";
font-size: 16px;
display: block;
}
.sheet-npc .sheet-attr-container {
width: 55px;
border: 0px;
border-radius: 0px;
position: relative;
padding: 5px 0px 5px 0px;
margin: 0px;
height: inherit;
display: inline-block;
text-align: center;
}
.sheet-npc .sheet-attr-container span {
font-size: 13px;
font-weight: normal;
display: inline;
margin-bottom: 2px;
}
.sheet-npc .sheet-attr-container span.sheet-bold {
display: block;
}
.sheet-npc span.sheet-bold,
.sheet-npc .sheet-action button span.sheet-bold {
font-weight: bold;
}
.sheet-npc .sheet-attr-container input {
width: 20px;
text-align: center;
}
.sheet-npc .sheet-attr-container input:nth-child(3) {
width: 30px;
margin-left: -5px;
}
.sheet-npc .sheet-display .sheet-flag[value="0"] + button,
.sheet-npc .sheet-display .sheet-flag[value="0"] + div,
.sheet-npc .sheet-display .sheet-flag[value=""] + button,
.sheet-npc .sheet-display .sheet-flag[value=""] + div,
.sheet-npc .sheet-display .sheet-status
{
display: none;
}
.sheet-npc .sheet-display .sheet-flag[value]:not([value=""]) + div,
{
display: block;
}
.sheet-npc button[type=roll] input {
border: none;
background: none;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-border-radius: 0px;
border-radius: 0px;
color: black;
margin: 0px;
pointer-events: none;
padding: 0px;
height: 16px;
line-height: 16px;
}
.sheet-npc button[type=roll]
{
width: auto;
white-space: nowrap;
}
.sheet-npc .sheet-saving button[type=roll] span,
.sheet-npc .sheet-skills button[type=roll] span,
{
font-size: 13px;
font-weight: normal;
width: auto;
display: inline-block;
line-height: 16px;
height: 16px;
vertical-align: bottom;
}
.sheet-npc .sheet-display .sheet-flag[value="1"] + button .sheet-spacer,
.sheet-npc .sheet-display .sheet-flag[value="2"] + button .sheet-spacer,
{
display: none;
}
.sheet-npc .sheet-display button input {
width: 14px;
text-align: center;
}
.sheet-npc .sheet-display .sheet-flag[value="1"] + button .sheet-stat::before,
.sheet-npc .sheet-display .sheet-flag[value="2"] + button .sheet-stat::before
{
content: "+";
}
.sheet-npc .sheet-display .sheet-flag[value="1"] + button .sheet-stat::after,
.sheet-npc .sheet-display .sheet-flag[value="3"] + button .sheet-stat::after
{
content: ", ";
}
.sheet-negativeflag[value="1"] + .sheet-npcattr::before,
{
content: "(";
}
.sheet-negativeflag[value="0"] +.sheet-npcattr::before {
content: "(+";
}
.sheet-npcattr::after {
content: ")";
}
.sheet-traits {
min-height: 20px;
}
.sheet-npc .sheet-display .sheet-traits .sheet-trait,
.sheet-npc .sheet-reaction .sheet-trait
{
position: relative;
}
.sheet-npc .sheet-display .sheet-traits input,
.sheet-npc .sheet-reaction input
{
pointer-events: initial;
font-weight: bold;
width: 100%;
}
.sheet-npc .sheet-display .sheet-traits textarea,
.sheet-npc .sheet-reaction textarea,
.sheet-attack textarea
{
resize: vertical;
height: 36px;
min-height: 36px;
border: none;
padding: 0px;
box-shadow: none;
}
.sheet-npc .sheet-actiontitle {
border-bottom: 1px solid rgb(126, 45, 64);
width: 100%;
margin-bottom: 5px;
}
.sheet-npc .sheet-actions .sheet-title {
font-size: 18px;
text-transform: capitalize;
font-variant: small-caps;
line-height: inherit;
height: inherit;
margin: 0px;
}
.sheet-npc .sheet-actions {
min-height: 40px;
}
.sheet-npc .sheet-description_flag[value="0"] + textarea,
.sheet-npc .sheet-description_flag[value=""] + textarea
{
display: none;
height: 36px;
min-height: 36px;
}
.sheet-npc .sheet-attack_option {
display: none;
}
.sheet-npc .sheet-attack_options[value="on"] ~ .sheet-attack_option,
.sheet-npc .sheet-attack_options[value="{{attack=1}}"] ~ .sheet-attack_option
{
display: block;
}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="3"] + textarea {height: 54px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="4"] + textarea {height: 72px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="5"] + textarea {height: 90px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="6"] + textarea {height: 108px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="7"] + textarea {height: 126px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="8"] + textarea {height: 144px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="9"] + textarea {height: 162px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="10"] + textarea {height: 180px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="11"] + textarea {height: 196px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="12"] + textarea {height: 216px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="13"] + textarea {height: 234px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="14"] + textarea {height: 252px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="15"] + textarea {height: 270px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="16"] + textarea {height: 288px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="17"] + textarea {height: 306px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="18"] + textarea {height: 324px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="19"] + textarea {height: 342px;}
.sheet-npc .sheet-action .sheet-display .sheet-description_flag[value="20"] + textarea {height: 360px;}
.sheet-npc .sheet-actions select {
width: auto;
margin: 0px;
padding: 0px;
height: 13px;
line-height: 13px;
font-size: 13px;
}
.sheet-npc .sheet-action button[type=roll] {
width: 100%;
text-align: left;
margin-bottom: 10px;
}
.sheet-npc .sheet-action button span {
font-size: 13px;
font-weight: normal;
}
.sheet-npc .sheet-actions .sheet-wide {
width: 100%;
text-align: left;
}
.sheet-npc .sheet-actions .sheet-wide span:after {
content: ".";
}
.sheet-npc .sheet-action .sheet-display .sheet-description {
white-space: normal;
color: #555555;
line-height: 18px;
}
.sheet-npc .sheet-action .sheet-display textarea,
.sheet-legendaryactions
{
border: none;
margin-bottom: 0px;
padding: 0px;
text-shadow: none;
box-shadow: none;
height: 36px;
min-height: 36px;
resize: none;
overflow: hidden;
}
.sheet-legendaryactions {
height: 90px;
pointer-events: none;
margin-bottom: 15px;
color: #555555;
}
.sheet-npcspelloptions {
display: inline-block;
margin-left: 17px;
}
.sheet-container.sheet-npc .sheet-legendary,
.sheet-container.sheet-npc .sheet-reaction,
.sheet-npcspell_flag[value="0"] ~ .sheet-npcspell,
.sheet-npcspellcastingflag:not(:checked) ~ .sheet-npcspelloptions
{
display: none;
}
.sheet-legendary_flag:not([value="0"]) ~ .sheet-legendary,
.sheet-reaction_flag[value="1"] ~ .sheet-reaction
{
display: block;
}
.sheet-npc .sheet-action textarea,
.sheet-pc .sheet-globalattack textarea
{
resize: vertical;
}
.sheet-rolltemplate-npc,
.sheet-rolltemplate-npcaction .sheet-container,
.sheet-rolltemplate-npcatk,
.sheet-rolltemplate-npcdmg,
.sheet-rolltemplate-traits
{
width: 188px;
border: 1px solid;
background-color: #ffffff;
padding: 5px;
}
.sheet-rolltemplate-npcaction .sheet-container.sheet-dmgcontainer
{
margin-top: 5px;
}
.sheet-rolltemplate-npcdmg {
margin-top: -8px;
}
.sheet-rolltemplate-npc .sheet-header,
.sheet-rolltemplate-npcaction .sheet-header,
.sheet-rolltemplate-npcatk .sheet-header,
.sheet-rolltemplate-npcdmg .sheet-header
{
color: rgb(126, 45, 64);
font-size: 18px;
text-align: left;
font-family: "Times New Roman", Times, serif;
font-variant: small-caps;
}
.sheet-rolltemplate-traits .sheet-header {
font-family: "Times New Roman", Times, serif;
font-size: 16px;
text-transform: capitalize;
font-variant: small-caps;
font-weight: bold;
color: rgb(126, 45, 64);
}
.sheet-rolltemplate-npc .sheet-italics,
.sheet-rolltemplate-npcaction .sheet-italics,
.sheet-rolltemplate-npcatk .sheet-italics,
.sheet-rolltemplate-npcdmg .sheet-italics,
.sheet-rolltemplate-traits .sheet-italics
{
font-style: italic;
}
.sheet-rolltemplate-npc .sheet-subheader,
.sheet-rolltemplate-npcaction .sheet-subheader,
.sheet-rolltemplate-npcatk .sheet-subheader,
.sheet-rolltemplate-npcdmg .sheet-subheader
{
line-height: 13px;
margin-top: -3px;
}
.sheet-rolltemplate-traits .sheet-subheader
{
font-style: italic;
color: #A0A0A0;
margin-top: -5px;
}
.sheet-rolltemplate-npc .sheet-subheader span,
.sheet-rolltemplate-npcaction .sheet-subheader span,
.sheet-rolltemplate-npcatk .sheet-subheader span,
.sheet-rolltemplate-npcdmg .sheet-subheader span
{
font-size: 11px;
line-height: 11px;
}
.sheet-rolltemplate-traits .sheet-subheader span {
font-weight: normal;
font-size: 10px;
text-align: left;
line-height: 16px;
}
.sheet-rolltemplate-traits .sheet-desc {
font-weight: normal;
font-size: 12px;
text-align: left;
line-height: 16px;
}
.sheet-rolltemplate-npc .sheet-arrow-rightold,
.sheet-rolltemplate-npcaction .sheet-arrow-rightold,
.sheet-rolltemplate-npcatk .sheet-arrow-rightold,
.sheet-rolltemplate-npcdmg .sheet-arrow-rightold
{
border-top: 3px solid transparent;
border-bottom: 3px solid transparent;
border-left: 195px solid rgb(126, 45, 64);
}
.sheet-rolltemplate-npc .sheet-arrow-right,
.sheet-rolltemplate-npcaction .sheet-arrow-right,
.sheet-rolltemplate-npcatk .sheet-arrow-right,
.sheet-rolltemplate-npcdmg .sheet-arrow-right
{
border: 1px solid rgb(126, 45, 64);
margin-bottom: 2px;
margin-top: 2px;
}
.sheet-rolltemplate-npc .inlinerollresult,
.sheet-rolltemplate-npcaction .inlinerollresult,
.sheet-rolltemplate-npcatk .inlinerollresult,
.sheet-rolltemplate-npcdmg .inlinerollresult,
.sheet-rolltemplate-traits .inlinerollresult
{
background-color: #ffffff;
border: none;
}
.sheet-rolltemplate-npc .inlinerollresult.fullcrit,
.sheet-rolltemplate-npcaction .inlinerollresult.fullcrit,
.sheet-rolltemplate-npcatk .inlinerollresult.fullcrit,
.sheet-rolltemplate-npcdmg .inlinerollresult.fullcrit
{
color: #3FB315;
border: none;
}
.sheet-rolltemplate-npc .inlinerollresult.fullfail,
.sheet-rolltemplate-npcaction .inlinerollresult.fullfail,
.sheet-rolltemplate-npcatk .inlinerollresult.fullfail,
.sheet-rolltemplate-npcdmg .inlinerollresult.fullfail
{
color: #B31515;
border: none;
}
.sheet-rolltemplate-npc .inlinerollresult.importantroll,
.sheet-rolltemplate-npcaction .inlinerollresult.importantroll,
.sheet-rolltemplate-npcatk .inlinerollresult.importantroll,
.sheet-rolltemplate-npcdmg .inlinerollresult.importantroll
{
color: #4A57ED;
border: none;
}
.sheet-rolltemplate-npcatk a[href^="~"] {
background-color: transparent;
padding: 0px;
color: black;
border: 0px;
}
.sheet-rolltemplate-npcatk .sheet-header a[href^="~"] {
color: rgb(126, 45, 64);
}
.sheet-rolltemplate-npcatk a[href^="~"]:hover {
color: #EC2127;
}
.sheet-equipment .sheet-complex,
.sheet-equipment .sheet-simple,
.sheet-proficiencies .sheet-complex,
.sheet-proficiencies .sheet-simple,
.sheet-traits .sheet-complex,
.sheet-traits .sheet-simple,
{
display: none;
}
.sheet-equipment .sheet-inventoryflag[value="complex"] ~ .sheet-complex,
.sheet-equipment .sheet-inventoryflag[value="simple"] ~ .sheet-simple,
.sheet-proficiencies .sheet-inventoryflag[value="complex"] ~ .sheet-complex,
.sheet-proficiencies .sheet-inventoryflag[value="simple"] ~ .sheet-simple,
.sheet-traits .sheet-inventoryflag[value="complex"] ~ .sheet-complex,
.sheet-traits .sheet-inventoryflag[value="simple"] ~ .sheet-simple
{
display: inline-block;
}
.sheet-equipment .sheet-inventorysubflag
{
height: 10px;
width: 10px;
top: 10px;
right: 0px;
}
.sheet-equipment .sheet-inventorysubflag + span
{
height: 10px;
width: 10px;
top: 10px;
right: 0px;
font-size: 10px;
padding: 0px;
}
.sheet-equipment .sheet-complex {
width: 160px;
vertical-align: top;
padding-top: 5px;
margin-bottom: 15px;
}
.sheet-proficiencies .sheet-complex,
.sheet-traits .sheet-complex
{
width: 240px;
vertical-align: top;
padding-top: 5px;
margin-bottom: 15px;
}
.sheet-pictos {
font-family: pictos;
}
.sheet-equipment .sheet-header span {
display: inline-block;
}
.sheet-item {
margin-bottom: 2px;
}
.sheet-item .sheet-name {
width: 100px;
}
.sheet-item input[type="text"].sheet-weight {
width: 25px;
text-align: center;
}
.sheet-item .sheet-subitem .sheet-subfield {
font-weight: normal;
background-color: transparent;
padding: 0px;
width: 112px;
}
.sheet-item .sheet-subitem .sheet-subtextarea {
width: calc(100% - 20px);
font-size: 9px;
padding: 0px 5px 0px 15px;
min-height: 32px;
height: 32px;
margin: 0px;
}
.sheet-equipment .sheet-weighttotal {
position: absolute;
left: 0px;
top: 160px;
width: 70px;
}
.sheet-equipment .sheet-weighttotal input {
pointer-events: none;
}
.sheet-item .sheet-subitem span {
width: 32px;
padding: 0px 0px 0px 10px;
display: inline-block;
}
.sheet-equipment .sheet-warning {
display: none;
}
.sheet-equipment .sheet-warningflag[value="show"] ~ .sheet-warning {
display: block;
}
.sheet-equipment .sheet-warning span,
.sheet-equipment .sheet-encumb
{
color: red;
}
.sheet-equipment .sheet-encumb
{
display: none;
font-size: 9px;
}
.sheet-npc .sheet-warning {
color: red;
font-size: 9px;
}
.sheet-equipment .sheet-encumberance[value="IMMOBILE"] ~ .sheet-immobile,
.sheet-equipment .sheet-encumberance[value="HEAVILY ENCUMBERED"] ~ .sheet-heavily,
.sheet-equipment .sheet-encumberance[value="ENCUMBERED"] ~ .sheet-encumbered,
.sheet-equipment .sheet-encumberance[value="OVER CARRYING CAPACITY"] ~ .sheet-over,
{
display: block;
}
.sheet-equipment .sheet-warning input[type="checkbox"] {
-webkit-appearance: checkbox;
-moz-appearance: checkbox;
width: auto;
}
.sheet-equipment .sheet-item .sheet-subitem .sheet-equipped {
-webkit-appearance: checkbox;
-moz-appearance: checkbox;
width: initial;
margin-left: 15px;
}
.sheet-equipment .sheet-item .sheet-subitem .sheet-equippedlabel {
width: calc(100% - 50px);
text-align: left;
padding-left: 5px;
}
.sheet-equipment .sheet-equippedflag[value="0"] ~ .sheet-item > .sheet-name {
color: #999;
}
.sheet-version {
position: absolute;
top: 0px;
right: 0px;
pointer-events: none;
}
.charsheet .sheet-options .sheet-body .sheet-version input[type="text"] {
border-bottom: none;
width: 20px;
}
.sheet-spellattackinfo {
display: none;
}
.charsheet .sheet-spells .sheet-spellattackinfoflag[value="ATTACK"] ~ .sheet-spellattackinfo,
.charsheet .sheet-npc .sheet-spellattackinfoflag[value="ATTACK"] ~ .sheet-spellattackinfo,
{
display: block;
}
.sheet-attack input[type=text].sheet-flat {
display: none;
}
.sheet-attack .sheet-flatflag[value*="saveflat"] ~ input[type=text].sheet-flat {
display: inline-block;
}
.sheet-rolltemplate-simple .sheet-charname,
.sheet-rolltemplate-atk .sheet-charname,
.sheet-rolltemplate-dmg .sheet-charname,
.sheet-rolltemplate-atkdmg .sheet-charname
{
text-align: center;
margin-top: -10px;
}
.sheet-rolltemplate-simple .sheet-charname span,
.sheet-rolltemplate-atk .sheet-charname span,
.sheet-rolltemplate-dmg .sheet-charname span,
.sheet-rolltemplate-atkdmg .sheet-charname span
{
font-size: 11px;
font-weight: normal;
color: #A0A0A0;
}
.sheet-npc .sheet-display .sheet-info {
font-weight: normal;
}
.sheet-attacks .sheet-ammo {
display: none;
}
.sheet-ammoflag[value="on"] + .sheet-attacks .sheet-ammo {
display: block;
}
.sheet-hlabel-container [name="attr_race"] {
width: 200px;
}
.sheet-hlabel-container [name="attr_alignment"] {
width: 180px;
}
.sheet-hlabel-container [name="attr_experience"] {
width: 100px;
}
.sheet-class {
width: 64px;
}
.charsheet .sheet-hlabel-container .sheet-multiclass-display {
width: 57px;
font-size: 13px;
border-bottom: 1px solid #D3D3D3;
line-height: 35px;
height: 27px;
margin-right: -4px;
overflow: hidden;
text-overflow: ellipsis;
}
.charsheet .sheet-hlabel-container .sheet-multiclass-display-level {
width: 31px;
text-align: center;
font-size: 13px;
border-bottom: 1px solid #D3D3D3;
line-height: 35px;
height: 27px;
overflow: hidden;
}
.charsheet .sheet-hlabel-container input.sheet-class-level{
margin-left: -6px;
width: 34px;
}
.sheet-rolltemplate-dmg .sheet-label .sheet-rolltemplate-inline,
.sheet-rolltemplate-dmg .sheet-savedc .sheet-rolltemplate-inline,
.sheet-rolltemplate-atkdmg .sheet-savedc .sheet-rolltemplate-inline,
.sheet-rolltemplate-atkdmg .sheet-label .sheet-rolltemplate-inline {
display: inline-block;
}
.sheet-options .sheet-body input[type=text].sheet-pb_custom {
display: none;
}
.sheet-options .sheet-body input[value="custom"] + input[type=text].sheet-pb_custom {
display: inline-block;
}
.sheet-attr-mod .sheet-baseattr {
/*display: none;*/
opacity: 0;
height: 0px;
width: 0px;
pointer-events: none;
display: inline;
position: absolute;
}
.sheet-finalattr {
font-size: 20px;
line-height: 20px;
}
.sheet-attr-mod:hover .sheet-baseattr,
.sheet-attr-mod .sheet-baseattr:focus
{
/*display: inline;*/
opacity: 1;
height: 20px;
width: 40px;
pointer-events: auto;
position: static;
}
.sheet-attr-mod:hover .sheet-finalattr,
.sheet-attr-mod .sheet-baseattr:focus ~ .sheet-finalattr
{
display: none;
}
.sheet-attr-mod .sheet-attr-flag[value="1"] + .sheet-finalattr
{
color: #3e99e8;
}
.sheet-attr-mod .sheet-attr-flag[value="1"] + .sheet-finalattr:after
{
content: '*';
font-size: 15px;
position: absolute;
}
.sheet-spell_slot_mods .sheet-column {
width: 32%;
display: inline-block;
}
.sheet-spell_slot_mods .sheet-num_plus {
margin-left: 2px;
}
.sheet-licensecontainer.active-drop-target.dropping,
.sheet-monster_confirm_flag[value="1"] ~ .sheet-licensecontainer
{
opacity: 0.5;
transition: opacity .15s ease-in-out;
-moz-transition: opacity .15s ease-in-out;
-webkit-transition: opacity .15s ease-in-out;
background-color: transparent;
}
.sheet-compendium_warning,
.sheet-monster_confirm
{
display: none;
}
.sheet-licensecontainer.active-drop-target.dropping ~ .sheet-compendium_warning,
.sheet-monster_confirm_flag[value="1"] ~ .sheet-monster_confirm
{
display: block;
position: absolute;
top: 100px;
background: white;
left: 100px;
z-index: 100;
border: 2px solid black;
width: 300px;
height: 100px;
text-align: center;
}
.sheet-monster_confirm input[type=checkbox] {
height: 34px;
border-radius: 50%;
opacity: 0;
z-index: 2;
position: relative;
}
.sheet-monster_confirm input[type=checkbox] + span {
font-size: 20px;
font-weight: normal;
line-height: 34px;
position: absolute;
left: 0px;
border-radius: 5px;
border: 1px solid black;
}
.sheet-monster_confirm .sheet-yes {
width: 44px;
}
.sheet-monster_confirm .sheet-cancel {
width: 75px;
}
.sheet-licensecontainer.active-drop-target.dropping ~ .sheet-compendium_warning span {
line-height: 100px;
}
.sheet-init {
text-align: center;
}
.sheet-init span {
font-size: 20px;
line-height: 31px;
}
/* TRANSITION SCRIPT */
.sheet-class_options,
.sheet-skill_options,
.sheet-attribute_options,
.sheet-save_options,
.sheet-general_options,
.sheet-transition_options
{
border: 1px solid #666;
border-radius: 5px;
padding: 5px;
margin-bottom: 5px;
}
.sheet-transition_options {
display: none;
}
.sheet-already_transitioned[value="0"] ~ .sheet-transition_options {
display: block;
}
.sheet-sheet_select img {
padding: 5px;
border: 1px solid #BBB;
border-radius: 5px;
}
.sheet-sheet_select img:hover {
background-color: #DDD;
cursor: pointer!important;
}
.charsheet .sheet-options .sheet-row span.sheet-transition_text {
color: #A0A0A0;
}
.charsheet .sheet-options .sheet-row span.sheet-transition_text_highlight {
color: #F00;
}
.sheet-globalattack input[type="checkbox"] {
display: inline;
height: 12px;
width: 12px;
-webkit-appearance: checkbox;
-moz-appearance: checkbox;
margin-left: 5px;
margin-top: 10px;
}
.sheet-globalattack textarea {
width: 200px;
display: inline;
height: 25px;
margin: 0px;
}
.sheet-globalattack .sheet-label {
color: #A0A0A0;
margin-top: -12px;
margin-bottom: 5px;
}
.sheet-missing-info {
margin-bottom: 100px;
display: none;
}
.sheet-missing-info-flag[value="1"] + .sheet-missing-info,
.sheet-missing-info:hover .sheet-missing-info-desc,
.sheet-missing-info-desc:hover
{
display: block;
}
.sheet-actions.sheet-npcspell.sheet-spells,
.sheet-missing-info-desc
{
display: none;
}
.sheet-npcspell_flag[value="1"] + .sheet-actions.sheet-npcspell.sheet-spells {
display: block;
}
.sheet-spells .sheet-innate {
color: #A0A0A0;
display: none;
font-size: 12px;
font-weight: normal;
}
.sheet-innate:before {
content: ", "
}
.sheet-innate_flag:not([value=""]) + .sheet-innate {
display: inline;
}
/* Translation Overrides */
/* Spanish */
.lang-es .sheet-spell-container input[name="attr_spellcastingtime"] {
width: 115px;
}
.lang-es .sheet-spell-container input[name="attr_spellrange"] {
width: 200px;
}
.lang-es .sheet-spell-container input[name="attr_spelltarget"] {
width: 188px;
}
.lang-es .sheet-spell-container input[name="attr_spellduration"] {
width: 184px;
}
.lang-es .sheet-ac-init-speed-container div {
position: relative;
height: 56px;
}
.lang-es .sheet-ac-init-speed-container button,
.lang-es .sheet-ac-init-speed-container .sheet-label {
position: absolute;
bottom: 0;
}
.lang-es .sheet-hdice-dsaves-container div.sheet-subcontainer {
position: relative;
height: 71px;
}
.lang-es .sheet-hdice-dsaves-container button {
position: absolute;
bottom: 0;
}
.lang-es .sheet-hp .sheet-top input[name="attr_hp_max"] {
width: 121px;
}
.lang-es .sheet-hlabel-container input[name="attr_race"] {
width: 190px;
}
.lang-es .sheet-hlabel-container input[name="attr_alignment"] {
width: 170px;
}
.lang-es .sheet-hlabel-container input[name="attr_experience"] {
width: 120px;
}
.lang-es .sheet-npc .sheet-npc_options input[name="attr_npc_actype"] {
width: 175px;
}
.lang-es .sheet-npc .sheet-npc_options input[name="attr_npc_hpformula"] {
width: 175px;
}
.lang-es .sheet-advantagetoggle input.sheet-toggle-left,
.lang-es .sheet-advantagetoggle input.sheet-toggle-left + span {
right: 214px;
width: 67px;
}
.lang-es .sheet-advantagetoggle input.sheet-toggle-center,
.lang-es .sheet-advantagetoggle input.sheet-toggle-center + span {
right: 145px;
width: 65px;
}
.lang-es .sheet-advantagetoggle input.sheet-toggle-right,
.lang-es .sheet-advantagetoggle input.sheet-toggle-right + span {
right: 50px;
width: 91px;
}
.lang-es input[type=radio].sheet-tab-button.sheet-core,
.lang-es input[type=radio].sheet-tab-button.sheet-core + span {
right: 137px;
width: 76px;
}
.lang-es input[type=radio].sheet-tab-button.sheet-bio,
.lang-es input[type=radio].sheet-tab-button.sheet-bio + span {
right: 103px;
width: 30px;
}
.lang-es input[type=radio].sheet-tab-button.sheet-spells,
.lang-es input[type=radio].sheet-tab-button.sheet-spells + span {
right: 21px;
width: 78px;
}
/* Czech */
.charsheet.lang-cs input[type=radio].sheet-tab-button.sheet-core,
.charsheet.lang-cs input[type=radio].sheet-tab-button.sheet-core + span {
width: 53px;
}
.charsheet.lang-cs select[name=attr_cust_spellslots] {
font-size: 9px;
}
.charsheet.lang-cs .sheet-spell .sheet-options span[data-i18n="at-higher-lvl-dmg:-u"],
.charsheet.lang-cs .sheet-spell .sheet-options span[data-i18n="add-ability-mod-u"],
.charsheet.lang-cs .sheet-spell .sheet-options span[data-i18n="saving-throw:-u"],
.charsheet.lang-cs .sheet-spell .sheet-options span[data-i18n="effect:-u"],
.charsheet.lang-cs .sheet-ac-init-speed-container .sheet-ac > span {
font-size: 8px;
}
.charsheet.lang-cs .sheet-subcontainer .sheet-top span[data-i18n="total"] + input {
width: 75px;
}
.charsheet.lang-cs .sheet-row span[data-i18n="senses-u"] + input,
.charsheet.lang-cs .sheet-row span[data-i18n="npc-type-u"] + input {
width: 220px;
}
.charsheet.lang-cs .sheet-class {
width: 79px;
}
.charsheet.lang-cs .sheet-hlabel-container .sheet-multiclass-display {
width: 62px;
}
.charsheet.lang-cs .sheet-hlabel-container .sheet-multiclass-display-level {
width: 23px;
}
.charsheet.lang-cs .sheet-hlabel-container input.sheet-class-level {
width: 28px;
}
<input class="monster_confirm_flag" type="hidden" name="attr_monster_confirm_flag">
<div class="licensecontainer compendium-drop-target monsters">
<input class="npc_toggle" name="attr_npc" type="hidden" value="0">
<input type="hidden" class="npcspellcastingflag" name="attr_npcspellcastingflag">
<input type="hidden" class="toggleflag" name="attr_rtype">
<div class="advantagetoggle">
<input type="radio" class="toggle-left" name="attr_advantagetoggle" value="{{query=1}} {{advantage=1}} {{r2=[[@{d20}"><span data-i18n="adv-u">ADVANTAGE</span>
<input type="radio" class="toggle-center" name="attr_advantagetoggle" value="{{query=1}} {{normal=1}} {{r2=[[0d20" checked="checked"><span data-i18n="norm-u">NORMAL</span>
<input type="radio" class="toggle-right" name="attr_advantagetoggle" value="{{query=1}} {{disadvantage=1}} {{r2=[[@{d20}"><span data-i18n="disadv-u">DISADVANTAGE</span>
</div>
<input type="hidden" class="toggleflag" name="attr_wtype">
<div class="advantagetoggle whispertoggle">
<input type="radio" class="toggle-left" name="attr_whispertoggle" value="" checked="checked"><span data-i18n="public:-u">PUBLIC</span>
<input type="radio" class="toggle-right" name="attr_whispertoggle" value="/w gm "><span data-i18n="to-gm:-u">TO <span class="togm">GM</span></span>
</div>
<div class="container npc" style="width: 350px;">
<input class="npc_options-flag" type="checkbox" name="attr_npc_options-flag" checked="checked"><span>y</span>
<div class="npc_options">
<div class="row title">
<span data-i18n="npc-options-u">NPC OPTIONS</span>
</div>
<div class="row">
<span data-i18n="name-u">NAME</span>
<input type="text" name="attr_npc_name">
</div>
<div class="row">
<span data-i18n="npc-type-u">NPC TYPE</span>
<input type="text" name="attr_npc_type" placeholder="Medium fiend, any evil alignment" data-i18n-placeholder="npc-type-place">
</div>
<div class="row">
<span data-i18n="armor-class-u">ARMOR CLASS</span>
<input class="num" type="text" name="attr_npc_ac" placeholder="10">
<span data-i18n="type-u">TYPE</span>
<input type="text" name="attr_npc_actype" placeholder="scale mail" data-i18n-placeholder="npc-armor-place" value="">
</div>
<div class="row">
<span data-i18n="hit-points-u">HIT POINTS</span>
<input class="num" type="text" name="attr_hp_max" placeholder="82">
<span data-i18n="formula-u">FORMULA</span>
<input type="text" name="attr_npc_hpformula" placeholder="11d8 + 33">
</div>
<div class="row">
<span data-i18n="speed-u">SPEED</span>
<input type="text" name="attr_npc_speed" placeholder="30 ft., fly 60ft." data-i18n-placeholder="npc-speed-place">
</div>
<div class="spacer"></div>
<div class="row">
<span data-i18n="attributes-u">ATTRIBUTES</span>
</div>
<div class="row">
<span data-i18n="str-u">STR</span>
<input class="num" type="text" name="attr_strength_base" value="10">
<span data-i18n="dex-u">DEX</span>
<input class="num" type="text" name="attr_dexterity_base" value="10">
<span data-i18n="con-u">CON</span>
<input class="num" type="text" name="attr_constitution_base" value="10">
<span data-i18n="int-u">INT</span>
<input class="num" type="text" name="attr_intelligence_base" value="10">
<span data-i18n="wis-u">WIS</span>
<input class="num" type="text" name="attr_wisdom_base" value="10">
<span data-i18n="cha-u">CHA</span>
<input class="num" type="text" name="attr_charisma_base" value="10">
</div>
<div class="spacer"></div>
<div class="row">
<span data-i18n="saves-u">SAVES</span>
</div>
<div class="row">
<span data-i18n="str-u">STR</span>
<input class="num" type="text" name="attr_npc_str_save_base" placeholder="0">
<span data-i18n="dex-u">DEX</span>
<input class="num" type="text" name="attr_npc_dex_save_base" placeholder="0">
<span data-i18n="con-u">CON</span>
<input class="num" type="text" name="attr_npc_con_save_base" placeholder="0">
<span data-i18n="int-u">INT</span>
<input class="num" type="text" name="attr_npc_int_save_base" placeholder="0">
<span data-i18n="wis-u">WIS</span>
<input class="num" type="text" name="attr_npc_wis_save_base" placeholder="0">
<span data-i18n="cha-u">CHA</span>
<input class="num" type="text" name="attr_npc_cha_save_base" placeholder="0">
<input type="hidden" name="attr_npc_str_save" value="@{strength_mod}">
<input type="hidden" name="attr_npc_dex_save" value="@{dexterity_mod}">
<input type="hidden" name="attr_npc_con_save" value="@{constitution_mod}">
<input type="hidden" name="attr_npc_int_save" value="@{intelligence_mod}">
<input type="hidden" name="attr_npc_wis_save" value="@{wisdom_mod}">
<input type="hidden" name="attr_npc_cha_save" value="@{charisma_mod}">
</div>
<div class="spacer"></div>
<div class="row">
<span data-i18n="skills-u">SKILLS</span>
</div>
<div class="row skills-list" data-i18n-list="skills-list">
<div class="col">
<div class="row" data-i18n-list-item="acrobatics">
<span data-i18n="acrobatics-u">ACROBATICS</span>
<input class="num" type="text" name="attr_npc_acrobatics_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="animal_handling">
<span data-i18n="animal_handling-u">ANIMAL HANDLING</span>
<input class="num" type="text" name="attr_npc_animal_handling_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="arcana">
<span data-i18n="arcana-u">ARCANA</span>
<input class="num" type="text" name="attr_npc_arcana_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="athletics">
<span data-i18n="athletics-u">ATHLETICS</span>
<input class="num" type="text" name="attr_npc_athletics_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="deception">
<span data-i18n="deception-u">DECEPTION</span>
<input class="num" type="text" name="attr_npc_deception_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="history">
<span data-i18n="history-u">HISTORY</span>
<input class="num" type="text" name="attr_npc_history_base" placeholder="0">
</div>
</div>
<div class="col" data-i18n-list-sublist>
<div class="row" data-i18n-list-item="insight">
<span data-i18n="insight-u">INSIGHT</span>
<input class="num" type="text" name="attr_npc_insight_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="intimidation">
<span data-i18n="intimidation-u">INTIMIDATION</span>
<input class="num" type="text" name="attr_npc_intimidation_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="investigation">
<span data-i18n="investigation-u">INVESTIGATION</span>
<input class="num" type="text" name="attr_npc_investigation_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="medicine">
<span data-i18n="medicine-u">MEDICINE</span>
<input class="num" type="text" name="attr_npc_medicine_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="nature">
<span data-i18n="nature-u">NATURE</span>
<input class="num" type="text" name="attr_npc_nature_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="perception">
<span data-i18n="perception-u">PERCEPTION</span>
<input class="num" type="text" name="attr_npc_perception_base" placeholder="0">
</div>
</div>
<div class="col" data-i18n-list-sublist>
<div class="row" data-i18n-list-item="performance">
<span data-i18n="performance-u">PERFORMANCE</span>
<input class="num" type="text" name="attr_npc_performance_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="persuasion">
<span data-i18n="persuasion-u">PERSUASION</span>
<input class="num" type="text" name="attr_npc_persuasion_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="religion">
<span data-i18n="religion-u">RELIGION</span>
<input class="num" type="text" name="attr_npc_religion_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="sleight_of_hand">
<span data-i18n="sleight_of_hand-u">SLEIGHT OF HAND</span>
<input class="num" type="text" name="attr_npc_sleight_of_hand_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="stealth">
<span data-i18n="stealth-u">STEALTH</span>
<input class="num" type="text" name="attr_npc_stealth_base" placeholder="0">
</div>
<div class="row" data-i18n-list-item="survival">
<span data-i18n="survival-u">SURVIVAL</span>
<input class="num" type="text" name="attr_npc_survival_base" placeholder="0">
</div>
</div>
<input type="hidden" name="attr_npc_acrobatics" value="@{dexterity_mod}">
<input type="hidden" name="attr_npc_animal_handling" value="@{wisdom_mod}">
<input type="hidden" name="attr_npc_arcana" value="@{intelligence_mod}">
<input type="hidden" name="attr_npc_athletics" value="@{strength_mod}">
<input type="hidden" name="attr_npc_deception" value="@{charisma_mod}">
<input type="hidden" name="attr_npc_history" value="@{intelligence_mod}">
<input type="hidden" name="attr_npc_insight" value="@{wisdom_mod}">
<input type="hidden" name="attr_npc_intimidation" value="@{charisma_mod}">
<input type="hidden" name="attr_npc_investigation" value="@{intelligence_mod}">
<input type="hidden" name="attr_npc_medicine" value="@{wisdom_mod}">
<input type="hidden" name="attr_npc_nature" value="@{intelligence_mod}">
<input type="hidden" name="attr_npc_perception" value="@{wisdom_mod}">
<input type="hidden" name="attr_npc_performance" value="@{charisma_mod}">
<input type="hidden" name="attr_npc_persuasion" value="@{charisma_mod}">
<input type="hidden" name="attr_npc_religion" value="@{intelligence_mod}">
<input type="hidden" name="attr_npc_sleight_of_hand" value="@{dexterity_mod}">
<input type="hidden" name="attr_npc_stealth" value="@{dexterity_mod}">
<input type="hidden" name="attr_npc_survival" value="@{wisdom_mod}">
</div>
<div class="row">
<span data-i18n="damage-vuln-u">DAMAGE VULNERABILITIES</span>
<input type="text" name="attr_npc_vulnerabilities" placeholder="fire" data-i18n-placeholder="npc-dmg-vuln-place">
</div>
<div class="row">
<span data-i18n="damage-res-u">DAMAGE RESISTANCES</span>
<input type="text" name="attr_npc_resistances" placeholder="cold" data-i18n-placeholder="npc-dmg-res-place">
</div>
<div class="row">
<span data-i18n="damage-imm-u">DAMAGE IMMUNITIES</span>
<input type="text" name="attr_npc_immunities" placeholder="lighting, thunder" data-i18n-placeholder="npc-dmg-imm-place">
</div>
<div class="row">
<span data-i18n="cond-imm-u">CONDITION IMMUNITIES</span>
<input type="text" name="attr_npc_condition_immunities" placeholder="charmed" data-i18n-placeholder="npc-cond-imm-place">
</div>
<div class="row">
<span data-i18n="senses-u">SENSES</span>
<input type="text" name="attr_npc_senses" placeholder="darkvision 120ft., passive Perception 16" data-i18n-placeholder="npc-senses-place">
</div>
<div class="row">
<span data-i18n="langs-u">LANGUAGES</span>
<input type="text" name="attr_npc_languages" placeholder="Abyssal, Common, Infernal" value="—" data-i18n-placeholder="npc-langs-place">
</div>
<div class="row">
<span data-i18n="challenge-u">CHALLENGE</span>
<input class="num" type="text" name="attr_npc_challenge" placeholder="1">
<span data-i18n="xp-u">XP</span>
<input type="text" name="attr_npc_xp" placeholder="250">
</div>
<div class="row">
<span data-i18n="token_size-u">TOKEN SIZE</span>
<input class="text" name="attr_token_size" value="1" placeholder="1">
</div>
<div class="row">
<input class="npcspellcastingflag" type="checkbox" name="attr_npcspellcastingflag" value="1">
<span data-i18n="spellcast-npc-u">SPELLCASTING NPC</span>
<div class="npcspelloptions">
<span data-i18n="spell-ability-u">SPELLCASTING ABILITY</span>
<select name="attr_spellcasting_ability" style="margin: 0px; width: auto; padding: 0px; height: 15px;">
<option value="0*" data-i18n="none-u">NONE</option>
<option value="@{strength_mod}+" data-i18n="strength-u">STRENGTH</option>
<option value="@{dexterity_mod}+" data-i18n="dexterity-u">DEXTERITY</option>
<option value="@{constitution_mod}+" data-i18n="constitution-u">CONSTITUTION</option>
<option value="@{intelligence_mod}+" data-i18n="intelligence-u">INTELLIGENCE</option>
<option value="@{wisdom_mod}+" data-i18n="wisdom-u">WISDOM</option>
<option value="@{charisma_mod}+" data-i18n="charisma-u">CHARISMA</option>
</select>
</div>
<div class="npcspelloptions">
<div class="row">
<span data-i18n="glob-atk-mod:-u">GLOBAL MAGIC ATTACK MODIFIER:</span>
<input type="text" class="num" name="attr_globalmagicmod" placeholder="0" value="0">
</div>
<div class="row">
<span data-i18n="magic-caster-lvl:-u">MAGIC CASTER LEVEL:</span>
<input type="text" class="num" name="attr_caster_level">
</div>
<div class="row">
<span data-i18n="spell_dc_mod:-u">SPELL SAVE DC MOD:</span>
<input type="text" class="num" name="attr_spell_dc_mod" placeholde="0" value="0">
</div>
</div>
</div>
<div class="row">
<input type="checkbox" name="attr_npcreactionsflag" value="1">
<span data-i18n="has-reaction-u">HAS REACTIONS</span>
</div>
<div class="row">
<span data-i18n="leg-actions:-u">LEGENDARY ACTIONS:</span>
<input class="num" type="text" name="attr_npc_legendary_actions" value="0" placeholder="0">
</div>
<div class="row title">
<span data-i18n="gen-opts-u">GENERAL OPTIONS</span>
</div>
<div class="row">
<input type="checkbox" name="attr_npc" value="1">
<span data-i18n="npc-u">NPC</span>
</div>
<div class="row">
<span data-i18n="roll-queries:-u">ROLL QUERIES:</span>
<select name="attr_rtype">
<option value="{{always=1}} {{r2=[[@{d20}" data-i18n="always-adv">Always Roll Advantage</option>
<option value="@{advantagetoggle}" data-i18n="adv-toggle">Advantage Toggle</option>
<option value="{{query=1}} ?{Advantage?|Normal Roll,&#123&#123normal=1&#125&#125 &#123&#123r2=[[0d20|Advantage,&#123&#123advantage=1&#125&#125 &#123&#123r2=[[@{d20}|Disadvantage,&#123&#123disadvantage=1&#125&#125 &#123&#123r2=[[@{d20}}" data-i18n="query-adv">Query Advantage</option>
<option value="{{normal=1}} {{r2=[[0d20" data-i18n="never-adv">Never Roll Advantage</option>
</select>
</div>
<div class="row">
<span data-i18n="whisp-rolls-gm:-u">WHISPER ROLLS TO GM:</span>
<select name="attr_wtype">
<option value="" data-i18n="never-whisper-roll">Never Whisper Rolls</option>
<option value="@{whispertoggle}" data-i18n="toggle-roll-whisper">Whisper Toggle</option>
<option value="?{Whisper?|Public Roll,|Whisper Roll,/w gm }" data-i18n="query-whisper-roll">Query Whisper</option>
<option value="/w gm " data-i18n="always-whisper-roll">Always Whisper Rolls</option>
</select>
</div>
<div class="row">
<span data-i18n="auto-dmg-roll:-u">AUTO DAMAGE ROLL:</span>
<select class="dtype" name="attr_dtype">
<option value="pick" data-i18n="never-dmg">Don't Auto Roll Damage</option>
<option value="full" data-i18n="always-dmg">Auto Roll Damage & Crit</option>
</select>
</div>
<div class="row">
<span data-i18n="npc-name-in-rolls:-u">NPC NAME IN ROLLS:</span>
<select name="attr_npc_name_flag">
<option value="{{name=@{npc_name}}}" data-i18n="show">Show</option>
<option value="0" data-i18n="hide">Hide</option>
</select>
</div>
<div class="row">
<input type="checkbox" name="attr_init_tiebreaker" value="@{dexterity}/100">
<span data-i18n="add-dex-tiebreaker-u">ADD DEX TIEBREAKER TO INITIATIVE</span>
</div>
</div>
<div class="display">
<div class="row title red">
<button type="roll" name="roll_npc_init" style="width: 100%;" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{init}}} {{mod=[[[[@{initiative_bonus}]][DEX]]]}} {{r1=[[@{d20}+[[@{initiative_bonus}]][DEX] &{tracker}]]}} {{normal=1}} {{type=Initiative}}">
<span name="attr_npc_name"></span>
</button>
</div>
<div class="row subtitle" style="margin-top: -5px;">
<span class="italics" name="attr_npc_type"></span>
</div>
<div class="triangle"></div>
<div class="row red" style="position:relative;">
<span data-i18n="ac" class="bold">Armor Class</span>
<span class="num" name="attr_npc_ac"></span>
<input class="actype" type="hidden" name="attr_npc_actype" value="">
<span class="parens" name="attr_npc_actype"></span>
<button type="roll" name="roll_npc_init" style="position: absolute; right: 5px; height: 30px; width: 20px;" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{init}}} {{mod=[[[[@{initiative_bonus}]][DEX]]]}} {{r1=[[@{d20}+[[@{initiative_bonus}]][DEX] &{tracker}]]}} {{normal=1}} {{type=Initiative}}">
<span class="npc-init-die">t</span>
<span style="display: block;">INIT</span>
</button>
</div>
<div class="row red">
<span data-i18n="hp" class="bold">Hit Points</span>
<span class="num3" name="attr_hp_max"></span>
<button type="roll" name="roll_npc_hpformula" value="@{wtype}&{template:npc} {{type=Hit Points}} {{normal=1}} @{npc_name_flag} {{rname=^{hp}}} {{mod=@{npc_hpformula}}} {{r1=[[@{npc_hpformula}]]}} charname=@{character_name}">
<span class="parens" name="attr_npc_hpformula" style="font-size: 12px; font-weight: normal;"></span>
</button>
</div>
<div class="row red">
<span data-i18n="speed" class="bold">Speed</span>
<span name="attr_npc_speed"></span>
</div>
<div class="triangle"></div>
<div class="row red">
<div class="attr-container">
<button type="roll" name="roll_npc_str" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{strength}}} {{mod=[[[[@{strength_mod}]][STR]]]}} {{r1=[[@{d20}+[[@{strength_mod}]][STR]]]}} @{rtype}+[[@{strength_mod}]][STR]]]}} {{type=Ability}}">
<span class="bold" data-i18n="str-u">STR</span>
<span name="attr_strength"></span>
<input class="negativeflag" type="hidden" name="attr_npc_str_negative" value="0">
<span class="npcattr" name="attr_strength_mod"></span>
</button>
</div>
<div class="attr-container">
<button type="roll" name="roll_npc_dex" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{dexterity}}} {{mod=[[[[@{dexterity_mod}]][DEX]]]}} {{r1=[[@{d20}+[[@{dexterity_mod}]][DEX]]]}} @{rtype}+[[@{dexterity_mod}]][DEX]]]}} {{type=Ability}}">
<span class="bold" data-i18n="dex-u">DEX</span>
<span name="attr_dexterity"></span>
<input class="negativeflag" type="hidden" name="attr_npc_dex_negative" value="0">
<span class="npcattr" name="attr_dexterity_mod"></span>
</button>
</div>
<div class="attr-container">
<button type="roll" name="roll_npc_con" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{constitution}}} {{mod=[[[[@{constitution_mod}]][CON]]]}} {{r1=[[@{d20}+[[@{constitution_mod}]][CON]]]}} @{rtype}+[[@{constitution_mod}]][CON]]]}} {{type=Ability}}">
<span class="bold" data-i18n="con-u">CON</span>
<span name="attr_constitution"></span>
<input class="negativeflag" type="hidden" name="attr_npc_con_negative" value="0">
<span class="npcattr" name="attr_constitution_mod"></span>
</button>
</div>
<div class="attr-container">
<button type="roll" name="roll_npc_int" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{intelligence}}} {{mod=[[[[@{intelligence_mod}]][INT]]]}} {{r1=[[@{d20}+[[@{intelligence_mod}]][INT]]]}} @{rtype}+[[@{intelligence_mod}]][INT]]]}} {{type=Ability}}">
<span class="bold" data-i18n="int-u">INT</span>
<span name="attr_intelligence"></span>
<input class="negativeflag" type="hidden" name="attr_npc_int_negative" value="0">
<span class="npcattr" name="attr_intelligence_mod"></span>
</button>
</div>
<div class="attr-container">
<button type="roll" name="roll_npc_wis" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{wisdom}}} {{mod=[[[[@{wisdom_mod}]][WIS]]]}} {{r1=[[@{d20}+[[@{wisdom_mod}]][WIS]]]}} @{rtype}+[[@{wisdom_mod}]][WIS]]]}} {{type=Ability}}">
<span class="bold" data-i18n="wis-u">WIS</span>
<span name="attr_wisdom"></span>
<input class="negativeflag" type="hidden" name="attr_npc_wis_negative" value="0">
<span class="npcattr" name="attr_wisdom_mod"></span>
</button>
</div>
<div class="attr-container">
<button type="roll" name="roll_npc_cha" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{charisma}}} {{mod=[[[[@{charisma_mod}]][CHA]]]}} {{r1=[[@{d20}+[[@{charisma_mod}]][CHA]]]}} @{rtype}+[[@{charisma_mod}]][CHA]]]}} {{type=Ability}}">
<span class="bold" data-i18n="cha-u">CHA</span>
<span name="attr_charisma"></span>
<input class="negativeflag" type="hidden" name="attr_npc_cha_negative" value="0">
<span class="npcattr" name="attr_charisma_mod"></span>
</button>
</div>
</div>
<div class="triangle"></div>
<input class="flag" type="hidden" name="attr_npc_saving_flag" value="">
<div class="row saving red">
<span class="bold" data-i18n="saving-throw">Saving Throws</span>
<input class="flag" type="hidden" name="attr_npc_str_save_flag" value="0">
<button type="roll" name="roll_npc_str_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{strength-save}}} {{mod=[[[[@{npc_str_save}]][STR SAVE]]]}} {{r1=[[@{d20}+[[@{npc_str_save}]][STR SAVE]]]}} @{rtype}+[[@{npc_str_save}]][STR SAVE]]]}} {{type=Save}}">
<span data-i18n="str">Str</span>
<span class="stat" name="attr_npc_str_save"></span>
</button>
<input class="flag" type="hidden" name="attr_npc_dex_save_flag" value="0">
<button type="roll" name="roll_npc_dex_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{dexterity-save}}} {{mod=[[[[@{npc_dex_save}]][DEX SAVE]]]}} {{r1=[[@{d20}+[[@{npc_dex_save}]][DEX SAVE]]]}} @{rtype}+[[@{npc_dex_save}]][DEX SAVE]]]}} {{type=Save}}">
<span data-i18n="dex">Dex</span>
<span class="stat" name="attr_npc_dex_save"></span>
</button>
<input class="flag" type="hidden" name="attr_npc_con_save_flag" value="0">
<button type="roll" name="roll_npc_con_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{constitution-save}}} {{mod=[[[[@{npc_con_save}]][CON SAVE]]]}} {{r1=[[@{d20}+[[@{npc_con_save}]][CON SAVE]]]}} @{rtype}+[[@{npc_con_save}]][CON SAVE]]]}} {{type=Save}}">
<span data-i18n="con">Con</span>
<span class="stat" name="attr_npc_con_save"></span>
</button>
<input class="flag" type="hidden" name="attr_npc_int_save_flag" value="0">
<button type="roll" name="roll_npc_int_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{intelligence-save}}} {{mod=[[[[@{npc_int_save}]][INT SAVE]]]}} {{r1=[[@{d20}+[[@{npc_int_save}]][INT SAVE]]]}} @{rtype}+[[@{npc_int_save}]][INT SAVE]]]}} {{type=Save}}">
<span data-i18n="int">Int</span>
<span class="stat" name="attr_npc_int_save"></span>
</button>
<input class="flag" type="hidden" name="attr_npc_wis_save_flag" value="0">
<button type="roll" name="roll_npc_wis_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{wisdom-save}}} {{mod=[[[[@{npc_wis_save}]][WIS SAVE]]]}} {{r1=[[@{d20}+[[@{npc_wis_save}]][WIS SAVE]]]}} @{rtype}+[[@{npc_wis_save}]][WIS SAVE]]]}} {{type=Save}}">
<span data-i18n="wis">Wis</span>
<span class="stat" name="attr_npc_wis_save"></span>
</button>
<input class="flag" type="hidden" name="attr_npc_cha_save_flag" value="0">
<button type="roll" name="roll_npc_cha_save" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{charisma-save}}} {{mod=[[[[@{npc_cha_save}]][CHA SAVE]]]}} {{r1=[[@{d20}+[[@{npc_cha_save}]][CHA SAVE]]]}} @{rtype}+[[@{npc_cha_save}]][CHA SAVE]]]}} {{type=Save}}">
<span data-i18n="cha">Cha</span>
<span class="stat" name="attr_npc_cha_save"></span>
</button>
</div>
<input class="flag" type="hidden" name="attr_npc_skills_flag" value="">
<div class="row skills skills-list red" data-i18n-list="skills-list">
<span class="bold" data-i18n="skills">Skills</span>
<span data-i18n-list-item="acrobatics">
<input class="flag" type="hidden" name="attr_npc_acrobatics_flag" value="0">
<button type="roll" name="roll_npc_acrobatics" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{acrobatics}}} {{mod=@{npc_acrobatics}}} {{r1=[[@{d20}+@{npc_acrobatics}]]}} @{rtype}+@{npc_acrobatics}]]}} {{type=Skill}}">
<span data-i18n="acrobatics">Acrobatics</span>
<span class="stat" name="attr_npc_acrobatics"></span>
</button>
</span>
<span data-i18n-list-item="animal_handling">
<input class="flag" type="hidden" name="attr_npc_animal_handling_flag" value="0">
<button type="roll" name="roll_npc_animal_handling" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{animal_handling}}} {{mod=@{npc_animal_handling}}} {{r1=[[@{d20}+@{npc_animal_handling}]]}} @{rtype}+@{npc_animal_handling}]]}} {{type=Skill}}">
<span data-i18n="animal_handling">Animal Handling</span>
<span class="stat" name="attr_npc_animal_handling"></span>
</button>
</span>
<span data-i18n-list-item="arcana">
<input class="flag" type="hidden" name="attr_npc_arcana_flag" value="0">
<button type="roll" name="roll_npc_arcana" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{arcana}}} {{mod=@{npc_arcana}}} {{r1=[[@{d20}+@{npc_arcana}]]}} @{rtype}+@{npc_arcana}]]}} {{type=Skill}}">
<span data-i18n="arcana">Arcana</span>
<span class="stat" name="attr_npc_arcana"></span>
</button>
</span>
<span data-i18n-list-item="athletics">
<input class="flag" type="hidden" name="attr_npc_athletics_flag" value="0">
<button type="roll" name="roll_npc_athletics" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{athletics}}} {{mod=@{npc_athletics}}} {{r1=[[@{d20}+@{npc_athletics}]]}} @{rtype}+@{npc_athletics}]]}} {{type=Skill}}">
<span data-i18n="athletics">Athletics</span>
<span class="stat" name="attr_npc_athletics"></span>
</button>
</span>
<span data-i18n-list-item="deception">
<input class="flag" type="hidden" name="attr_npc_deception_flag" value="0">
<button type="roll" name="roll_npc_deception" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{deception}}} {{mod=@{npc_deception}}} {{r1=[[@{d20}+@{npc_deception}]]}} @{rtype}+@{npc_deception}]]}} {{type=Skill}}">
<span data-i18n="deception">Deception</span>
<span class="stat" name="attr_npc_deception"></span>
</button>
</span>
<span data-i18n-list-item="history">
<input class="flag" type="hidden" name="attr_npc_history_flag" value="0">
<button type="roll" name="roll_npc_history" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{history}}} {{mod=@{npc_history}}} {{r1=[[@{d20}+@{npc_history}]]}} @{rtype}+@{npc_history}]]}} {{type=Skill}}">
<span data-i18n="history">History</span>
<span class="stat" name="attr_npc_history"></span>
</button>
</span>
<span data-i18n-list-item="insight">
<input class="flag" type="hidden" name="attr_npc_insight_flag" value="0">
<button type="roll" name="roll_npc_insight" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{insight}}} {{mod=@{npc_insight}}} {{r1=[[@{d20}+@{npc_insight}]]}} @{rtype}+@{npc_insight}]]}} {{type=Skill}}">
<span data-i18n="insight">Insight</span>
<span class="stat" name="attr_npc_insight"></span>
</button>
</span>
<span data-i18n-list-item="intimidation">
<input class="flag" type="hidden" name="attr_npc_intimidation_flag" value="0">
<button type="roll" name="roll_npc_intimidation" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{intimidation}}} {{mod=@{npc_intimidation}}} {{r1=[[@{d20}+@{npc_intimidation}]]}} @{rtype}+@{npc_intimidation}]]}} {{type=Skill}}">
<span data-i18n="intimidation">Intimidation</span>
<span class="stat" name="attr_npc_intimidation"></span>
</button>
</span>
<span data-i18n-list-item="investigation">
<input class="flag" type="hidden" name="attr_npc_investigation_flag" value="0">
<button type="roll" name="roll_npc_investigation" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{investigation}}} {{mod=@{npc_investigation}}} {{r1=[[@{d20}+@{npc_investigation}]]}} @{rtype}+@{npc_investigation}]]}} {{type=Skill}}">
<span data-i18n="investigation">Investigation</span>
<span class="stat" name="attr_npc_investigation"></span>
</button>
</span>
<span data-i18n-list-item="medicine">
<input class="flag" type="hidden" name="attr_npc_medicine_flag" value="0">
<button type="roll" name="roll_npc_medicine" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{medicine}}} {{mod=@{npc_medicine}}} {{r1=[[@{d20}+@{npc_medicine}]]}} @{rtype}+@{npc_medicine}]]}} {{type=Skill}}">
<span data-i18n="medicine">Medicine</span>
<span class="stat" name="attr_npc_medicine"></span>
</button>
</span>
<span data-i18n-list-item="nature">
<input class="flag" type="hidden" name="attr_npc_nature_flag" value="0">
<button type="roll" name="roll_npc_nature" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{nature}}} {{mod=@{npc_nature}}} {{r1=[[@{d20}+@{npc_nature}]]}} @{rtype}+@{npc_nature}]]}} {{type=Skill}}">
<span data-i18n="nature">Nature</span>
<span class="stat" name="attr_npc_nature"></span>
</button>
</span>
<span data-i18n-list-item="perception">
<input class="flag" type="hidden" name="attr_npc_perception_flag" value="0">
<button type="roll" name="roll_npc_perception" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{perception}}} {{mod=@{npc_perception}}} {{r1=[[@{d20}+@{npc_perception}]]}} @{rtype}+@{npc_perception}]]}} {{type=Skill}}">
<span data-i18n="perception">Perception</span>
<span class="stat" name="attr_npc_perception"></span>
</button>
</span>
<span data-i18n-list-item="performance">
<input class="flag" type="hidden" name="attr_npc_performance_flag" value="0">
<button type="roll" name="roll_npc_performance" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{performance}}} {{mod=@{npc_performance}}} {{r1=[[@{d20}+@{npc_performance}]]}} @{rtype}+@{npc_performance}]]}} {{type=Skill}}">
<span data-i18n="performance">Performance</span>
<span class="stat" name="attr_npc_performance"></span>
</button>
</span>
<span data-i18n-list-item="persuasion">
<input class="flag" type="hidden" name="attr_npc_persuasion_flag" value="0">
<button type="roll" name="roll_npc_persuasion" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{persuasion}}} {{mod=@{npc_persuasion}}} {{r1=[[@{d20}+@{npc_persuasion}]]}} @{rtype}+@{npc_persuasion}]]}} {{type=Skill}}">
<span data-i18n="persuasion">Persuasion</span>
<span class="stat" name="attr_npc_persuasion"></span>
</button>
</span>
<span data-i18n-list-item="religion">
<input class="flag" type="hidden" name="attr_npc_religion_flag" value="0">
<button type="roll" name="roll_npc_religion" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{religion}}} {{mod=@{npc_religion}}} {{r1=[[@{d20}+@{npc_religion}]]}} @{rtype}+@{npc_religion}]]}} {{type=Skill}}">
<span data-i18n="religion">Religion</span>
<span class="stat" name="attr_npc_religion"></span>
</button>
</span>
<span data-i18n-list-item="sleight_of_hand">
<input class="flag" type="hidden" name="attr_npc_sleight_of_hand_flag" value="0">
<button type="roll" name="roll_npc_sleight_of_hand" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{sleight_of_hand}}} {{mod=@{npc_sleight_of_hand}}} {{r1=[[@{d20}+@{npc_sleight_of_hand}]]}} @{rtype}+@{npc_sleight_of_hand}]]}} {{type=Skill}}">
<span data-i18n="sleight_of_hand">Sleight of Hand</span>
<span class="stat" name="attr_npc_sleight_of_hand"></span>
</button>
</span>
<span data-i18n-list-item="stealth">
<input class="flag" type="hidden" name="attr_npc_stealth_flag" value="0">
<button type="roll" name="roll_npc_stealth" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{stealth}}} {{mod=@{npc_stealth}}} {{r1=[[@{d20}+@{npc_stealth}]]}} @{rtype}+@{npc_stealth}]]}} {{type=Skill}}">
<span data-i18n="stealth">Stealth</span>
<span class="stat" name="attr_npc_stealth"></span>
</button>
</span>
<span data-i18n-list-item="survival">
<input class="flag" type="hidden" name="attr_npc_survival_flag" value="0">
<button type="roll" name="roll_npc_survival" value="@{wtype}&{template:npc} @{npc_name_flag} {{rname=^{survival}}} {{mod=@{npc_survival}}} {{r1=[[@{d20}+@{npc_survival}]]}} @{rtype}+@{npc_survival}]]}} {{type=Skill}}">
<span data-i18n="survival">Survival</span>
<span class="stat" name="attr_npc_survival"></span>
</button>
</span>
</div>
<input class="flag" type="hidden" name="attr_npc_vulnerabilities">
<div class="row status vulnerabilities red">
<span class="bold" data-i18n="dmg-vuln">Damage Vulnerabilities</span>
<span class="info" name="attr_npc_vulnerabilities"></span>
</div>
<input class="flag" type="hidden" name="attr_npc_resistances">
<div class="row status resistances red">
<span class="bold" data-i18n="dmg-res">Damage Resistances</span>
<span class="info" name="attr_npc_resistances"></span>
</div>
<input class="flag" type="hidden" name="attr_npc_immunities">
<div class="row status immunities red">
<span class="bold" data-i18n="dmg-imm">Damage Immunities</span>
<span class="info" name="attr_npc_immunities"></span>
</div>
<input class="flag" type="hidden" name="attr_npc_condition_immunities">
<div class="row status condition_immunities red">
<span class="bold" data-i18n="cond-imm">Condition Immunities</span>
<span class="info" name="attr_npc_condition_immunities"></span>
</div>
<div class="row senses red">
<span class="bold" data-i18n="senses">Senses</span>
<span class="info" name="attr_npc_senses"></span>
</div>
<div class="row languages red">
<span class="bold" data-i18n="langs">Languages</span>
<span class="info languages" name="attr_npc_languages" value="—"></span>
</div>
<div class="row red">
<span class="bold" data-i18n="challenge">Challenge</span>
<span class="num" name="attr_npc_challenge"></span>
<span class="parens xp" name="attr_npc_xp"></span>
</div>
<div class="triangle"></div>
<div class="row traits">
<fieldset class="repeating_npctrait">
<div class="trait">
<input type="text" name="attr_name" placeholder="False Appearance." data-i18n-placeholder="npc-trait-name-place">
<textarea name="attr_desc" placeholder="If the dragon fails..." data-i18n-placeholder="npc-trait-desc-place"></textarea>
</div>
</fieldset>
</div>
</div>
<div class="actions_container"></div>
<input class="dflag" type="hidden" name="attr_dflag" value="pick">
<div class="row actions">
<div class="row actiontitle" style="position: relative;">
<span class="title red" data-i18n="actions">Actions</span>
</div>
<fieldset class="repeating_npcaction">
<div class="action">
<input class="npc_options-flag" type="checkbox" name="attr_npc_options-flag" checked="checked"><span>y</span>
<div class="npc_options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_name">
</div>
<div class="row">
<input type="checkbox" name="attr_attack_flag" value="on">
<span data-i18n="attack-u">ATTACK</span>
</div>
<input type="hidden" class="attack_options" name="attr_attack_flag" value="0">
<div class="row attack_option">
<span data-i18n="type:-u">TYPE:</span>
<select name="attr_attack_type">
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
<span style="margin-left: 15px;" data-i18n="range-reach:-u">RANGE/REACH:</span>
<input type="text" name="attr_attack_range" placeholder="5 ft." style="width: 100px;" data-i18n-placeholder="range-reach-place">
</div>
<div class="row attack_option">
<span data-i18n="to-hit:-u">TO HIT:</span>
<input type="text" name="attr_attack_tohit" value="0" placeholder="5" style="width: 30px;">
<span style="margin-left: 15px;" data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_attack_target" placeholder="One target" style="width: 100px;" data-i18n-placeholder="to-hit-place">
</div>
<input type="hidden" name="attr_damage_flag">
<div class="row attack_option">
<span data-i18n="on-hit:-u">ON HIT:</span>
<input type="text" name="attr_attack_damage" placeholder="1d10" style="width: 65px;">
<input type="text" name="attr_attack_damagetype" placeholder="slashing" style="width: 100px;" data-i18n-placeholder="on-hit-place">
<input type="hidden" name="attr_attack_crit">
</div>
<div class="row attack_option">
<span data-i18n="on-hit2:-u">ON HIT 2:</span>
<input type="text" name="attr_attack_damage2" placeholder="2d6+5" style="width: 65px;">
<input type="text" name="attr_attack_damagetype2" placeholder="fire" style="width: 100px;" data-i18n-placeholder="on-hit-2-place">
<input type="hidden" name="attr_attack_crit2">
</div>
<div class="row attack_option">
<span data-i18n="desc:-u">DESCRIPTION:</span>
<select name="attr_show_desc">
<option value="@{description}" data-i18n="show">Show</option>
<option value=" " data-i18n="hide">Hide</option>
</select>
</div>
<div class="row">
<textarea name="attr_description"></textarea>
</div>
</div>
<div class="display">
<button class="pick" type="roll" name="roll_npc_action" value="@{rollbase}">
<div class="row wide">
<span class="bold wide" name="attr_name"></span>
</div>
<input class="attack_options" type="hidden" name="attr_attack_flag">
<div class="row attack attack_option">
<span class="italics" name="attr_attack_type"></span><span class="italics"> Weapon Attack: </span><span name="attr_attack_tohitrange">
</div>
<div class="row attack attack_option">
<span class="italics" style="font-size: 13px; font-weight: normal; vertical-align: middle;" data-i18n="hit:">Hit: </span><span name="attr_attack_onhit" style="vertical-align: middle;"></span>
</div>
<span class="description" name="attr_description"></span>
</button>
</div>
<input type="hidden" name="attr_rollbase">
<button type="roll" style="display: none;" name="roll_npc_dmg" value="@{wtype}&{template:npcdmg} @{damage_flag} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}}"></button>
<button type="roll" style="display: none;" name="roll_npc_crit" value="@{wtype}&{template:npcdmg} @{damage_flag} {{crit=1}} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}} {{crit1=[[@{attack_crit}+0]]}} {{crit2=[[@{attack_crit2}+0]]}}"></button>
</div>
</fieldset>
</div>
<input class="reaction_flag" type="hidden" name="attr_npcreactionsflag">
<div class="row actions reaction">
<div class="row actiontitle">
<span class="title red" data-i18n="reactions">Reactions</span>
</div>
<fieldset class="repeating_npcreaction">
<div class="trait">
<input type="text" name="attr_name" placeholder="Parry." data-i18n-placeholder="npc-repeating-name-place">
<textarea name="attr_desc" placeholder="The creature adds 2 to its AC against..." data-i18n-placeholder="npc-repeating-desc-place"></textarea>
</div>
</fieldset>
</div>
<input class="legendary_flag" type="hidden" name="attr_npc_legendary_actions" value="0">
<div class="row actions legendary">
<div class="row actiontitle">
<span class="title red" data-i18n="leg-actions">Legendary Actions</span>
</div>
<div class="row">
<div class="legendaryactions" data-i18n="leg-actions-desc">The <span name="attr_npc_name"></span> can take <span name="attr_npc_legendary_actions"></span> legendary actions, choosing from the options below. Only one legendary option can be used at a time and only at the end of another creature's turn. The <span name="attr_npc_name"></span> regains spent legendary actions at the start of its turn.</div>
</div>
<fieldset class="repeating_npcaction-l">
<div class="action">
<input class="npc_options-flag" type="checkbox" name="attr_npc_options-flag" checked="checked"><span>y</span>
<div class="npc_options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_name">
</div>
<div class="row">
<input type="checkbox" name="attr_attack_flag" value="on">
<span data-i18n="attack-u">ATTACK</span>
</div>
<input type="hidden" class="attack_options" name="attr_attack_flag" value="0">
<div class="row attack_option">
<span data-i18n="type:-u">TYPE:</span>
<select name="attr_attack_type">
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
<span style="margin-left: 15px;" data-i18n="range-reach:-u">RANGE/REACH:</span>
<input type="text" name="attr_attack_range" placeholder="5 ft." style="width: 100px;" data-i18n-placeholder="range-reach-place">
</div>
<div class="row attack_option">
<span data-i18n="to-hit:-u">TO HIT:</span>
<input type="text" name="attr_attack_tohit" value="0" placeholder="5" style="width: 30px;">
<span style="margin-left: 15px;" data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_attack_target" placeholder="One target" style="width: 100px;" data-i18n-placeholder="to-hit-place">
</div>
<input type="hidden" name="attr_damage_flag">
<div class="row attack_option">
<span data-i18n="on-hit:-u">ON HIT:</span>
<input type="text" name="attr_attack_damage" placeholder="1d10" style="width: 65px;">
<input type="text" name="attr_attack_damagetype" placeholder="slashing" style="width: 100px;" data-i18n-placeholder="on-hit-place">
<input type="hidden" name="attr_attack_crit">
</div>
<div class="row attack_option">
<span data-i18n="on-hit2:-u">ON HIT 2:</span>
<input type="text" name="attr_attack_damage2" placeholder="2d6+5" style="width: 65px;">
<input type="text" name="attr_attack_damagetype2" placeholder="fire" style="width: 100px;" data-i18n-placeholder="on-hit-2-place">
<input type="hidden" name="attr_attack_crit2">
</div>
<div class="row attack_option">
<span data-i18n="desc:-u">DESCRIPTION:</span>
<select name="attr_show_desc">
<option value="@{description}" data-i18n="show">Show</option>
<option value=" " data-i18n="hide">Hide</option>
</select>
</div>
<div class="row">
<textarea name="attr_description"></textarea>
</div>
</div>
<div class="display">
<button class="pick" type="roll" name="roll_npc_action" value="@{rollbase}">
<div class="row wide">
<span class="bold wide" name="attr_name"></span>
</div>
<input class="attack_options" type="hidden" name="attr_attack_flag">
<div class="row attack attack_option">
<span class="italics" name="attr_attack_type"></span><span class="italics"> Weapon Attack: </span><span name="attr_attack_tohitrange">
</div>
<div class="row attack attack_option">
<span class="italics" style="font-size: 13px; font-weight: normal; vertical-align: middle;" data-i18n="hit:">Hit: </span><span name="attr_attack_onhit" style="vertical-align: middle;"></span>
</div>
<span class="description" name="attr_description"></span>
</button>
</div>
<input type="hidden" name="attr_rollbase">
<button type="roll" style="display: none;" name="roll_npc_dmg" value="@{wtype}&{template:npcdmg} @{damage_flag} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}}"></button>
<button type="roll" style="display: none;" name="roll_npc_crit" value="@{wtype}&{template:npcdmg} @{damage_flag} {{crit=1}} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}} {{crit1=[[@{attack_crit}+0]]}} {{crit2=[[@{attack_crit2}+0]]}}"></button>
</div>
</fieldset>
</div>
<input class="npcspell_flag" type="hidden" name="attr_npcspell_flag">
<div class="row actions npcspell spells">
<div class="row actiontitle">
<span class="title red" style="font-weight: normal; text-align: left;" data-i18n="spells">Spells</span>
</div>
<div class="warning"><span>THIS SECTION IS NOW NO LONGER SUPPORTED. PLEASE TRANSFER ANY SPELLS LISTED HERE INTO THE NEW SPELLS BY LEVEL SECTION, AVAILABLE AFTER SELECTING THE 'SPELLCASTING NPC' OPTION FROM THE NPC OPTIONS ABOVE. FOR MODULE USERS, THIS SHEET WILL BE UPDATED IN AN UPCOMING PATCH.</span></div>
<div class="spell-container">
<fieldset class="repeating_spell-npc">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" style="margin-left: 17px;" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Melee" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="dmg:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="dmg2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="npc-atk-effect-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="on" data-i18n="on">On</option>
<option value="off" selected="selected" data-i18n="off">Off</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="desc:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel">
<input type="hidden" name="attr_rollbase">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<span class="spellritual">R</span>
<span class="spellconcentration">C</span>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<div class="container pc">
<input class="tab-button core" type="radio" name="attr_tab" value="core" checked="checked"><span data-i18n="core-u">CORE</span>
<input class="tab-button bio" type="radio" name="attr_tab" value="bio"><span data-i18n="bio-u">BIO</span>
<input class="tab-button spells" type="radio" name="attr_tab" value="spells"><span data-i18n="spells-u">SPELLS</span>
<input class="tab-button options" type="radio" name="attr_tab" value="options"><span style="font-family: pictos">y</span>
<div class="page core">
<div class="header">
<div class="name-container">
<img src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/5th%20Edition%20OGL%20by%20Roll20/images/srd5_360.png" style="padding-bottom: 5px;">
<input type="text" name="attr_character_name" style="width: 100%;">
<span class="label" data-i18n="char-name-u">CHARACTER NAME</span>
</div>
<div class="header-info">
<div class="top">
<div class="hlabel-container">
<input class="flag" type="hidden" name="attr_custom_class" value="0">
<input class="showing" type="text" name="attr_cust_class" value="@{cust_classname}" disabled="true" style="width: 64px; height: 28px; padding-top: 10px;">
<select class="hiding class" name="attr_class">
<option value="" data-i18n="choose">Choose</option>
<option value="Barbarian" data-i18n="barbarian">Barbarian</option>
<option value="Bard" data-i18n="bard">Bard</option>
<option value="Cleric" data-i18n="cleric">Cleric</option>
<option value="Druid" data-i18n="druid">Druid</option>
<option value="Fighter" data-i18n="fighter">Fighter</option>
<option value="Monk" data-i18n="monk">Monk</option>
<option value="Paladin" data-i18n="paladin">Paladin</option>
<option value="Ranger" data-i18n="ranger">Ranger</option>
<option value="Rogue" data-i18n="rogue">Rogue</option>
<option value="Sorcerer" data-i18n="sorcerer">Sorcerer</option>
<option value="Warlock" data-i18n="warlock">Warlock</option>
<option value="Wizard" data-i18n="wizard">Wizard</option>
</select>
<input type="number" class="class-level" name="attr_base_level" value="1">
<span class="label" data-i18n="class-level-u">CLASS & LEVEL</span>
</div>
<div class="hlabel-container multiclass-container">
<input class="flag" type="hidden" name="attr_multiclass1_flag" value="0">
<span class="hiding multiclass-display"></span>
<span class="hiding multiclass-display-level"></span>
<span class="showing multiclass-display" name="attr_multiclass1" data-i18n-dynamic></span>
<span class="showing multiclass-display-level" name="attr_multiclass1_lvl"></span>
</div>
<div class="hlabel-container multiclass-container">
<input class="flag" type="hidden" name="attr_multiclass2_flag" value="0">
<span class="hiding multiclass-display"></span>
<span class="hiding multiclass-display-level"></span>
<span class="showing multiclass-display" name="attr_multiclass2" data-i18n-dynamic></span>
<span class="showing multiclass-display-level" name="attr_multiclass2_lvl"></span>
</div>
<div class="hlabel-container multiclass-container">
<input class="flag" type="hidden" name="attr_multiclass3_flag" value="0">
<span class="hiding multiclass-display"></span>
<span class="hiding multiclass-display-level"></span>
<span class="showing multiclass-display" name="attr_multiclass3" data-i18n-dynamic></span>
<span class="showing multiclass-display-level" name="attr_multiclass3_lvl"></span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_background" style="width: 122px;">
<span class="label" data-i18n="background-u">BACKGROUND</span>
</div>
</div>
<div class="bottom">
<div class="hlabel-container">
<input type="text" name="attr_race">
<span class="label" data-i18n="race-u">RACE</span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_alignment">
<span class="label" data-i18n="alignment-u">ALIGNMENT</span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_experience">
<span class="label" data-i18n="exp-pts-u">EXPERIENCE POINTS</span>
</div>
</div>
</div>
</div>
<div class="body">
<div class="col col1">
<div class="attributes-container" style="margin-top: 10px;">
<div class="attr-container">
<button type="roll" name="roll_strength" value="@{wtype}&{template:simple} {{rname=^{strength-u}}} {{mod=@{strength_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{strength_mod}@{jack_attr}[STR]]]}} @{rtype}+@{strength_mod}@{jack_attr}[STR]]]}} @{charname_output}" data-i18n="strength-u">STRENGTH</button>
<span class="attr" name="attr_strength_mod" title="@{strength_mod}">0</span>
<div class="attr-mod">
<input class="baseattr" type="text" name="attr_strength_base" title="@{strength}" value="10">
<input type="hidden" name="attr_strength" value="10">
<input class="attr-flag" type="hidden" name="attr_strength_flag" value="0">
<span class="finalattr" name="attr_strength">
</div>
</div>
<div class="attr-container">
<button type="roll" name="roll_dexterity" value="@{wtype}&{template:simple} {{rname=^{dexterity-u}}} {{mod=@{dexterity_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{dexterity_mod}@{jack_attr}[DEX]]]}} @{rtype}+@{dexterity_mod}@{jack_attr}[DEX]]]}} @{charname_output}" data-i18n="dexterity-u">DEXTERITY</button>
<span class="attr" name="attr_dexterity_mod" title="@{dexterity_mod}">0</span>
<div class="attr-mod">
<input class="baseattr" type="text" name="attr_dexterity_base" title="@{dexterity}" value="10">
<input type="hidden" name="attr_dexterity" value="10">
<input class="attr-flag" type="hidden" name="attr_dexterity_flag" value="0">
<span class="finalattr" name="attr_dexterity">
</div>
</div>
<div class="attr-container">
<button type="roll" name="roll_constitution" value="@{wtype}&{template:simple} {{rname=^{constitution-u}}} {{mod=@{constitution_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{constitution_mod}@{jack_attr}[CON]]]}} @{rtype}+@{constitution_mod}@{jack_attr}[CON]]]}} @{charname_output}" data-i18n="constitution-u">CONSTITUTION</button>
<span class="attr" name="attr_constitution_mod" title="@{constitution_mod}">0</span>
<div class="attr-mod">
<input class="baseattr" type="text" name="attr_constitution_base" title="@{constitution}" value="10">
<input type="hidden" name="attr_constitution" value="10">
<input class="attr-flag" type="hidden" name="attr_constitution_flag" value="0">
<span class="finalattr" name="attr_constitution">
</div>
</div>
<div class="attr-container">
<button type="roll" name="roll_intelligence" value="@{wtype}&{template:simple} {{rname=^{intelligence-u}}} {{mod=@{intelligence_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{intelligence_mod}@{jack_attr}[INT]]]}} @{rtype}+@{intelligence_mod}@{jack_attr}[INT]]]}} @{charname_output}" data-i18n="intelligence-u">INTELLIGENCE</button>
<span class="attr" name="attr_intelligence_mod" title="@{intelligence_mod}">0</span>
<div class="attr-mod">
<input class="baseattr" type="text" name="attr_intelligence_base" title="@{intelligence}" value="10">
<input type="hidden" name="attr_intelligence" value="10">
<input class="attr-flag" type="hidden" name="attr_intelligence_flag" value="0">
<span class="finalattr" name="attr_intelligence">
</div>
</div>
<div class="attr-container">
<button type="roll" name="roll_wisdom" value="@{wtype}&{template:simple} {{rname=^{wisdom-u}}} {{mod=@{wisdom_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{wisdom_mod}@{jack_attr}[WIS]]]}} @{rtype}+@{wisdom_mod}@{jack_attr}[WIS]]]}} @{charname_output}" data-i18n="wisdom-u">WISDOM</button>
<span class="attr" name="attr_wisdom_mod" title="@{wisdom_mod}">0</span>
<div class="attr-mod">
<input class="baseattr" type="text" name="attr_wisdom_base" title="@{wisdom}" value="10">
<input type="hidden" name="attr_wisdom" value="10">
<input class="attr-flag" type="hidden" name="attr_wisdom_flag" value="0">
<span class="finalattr" name="attr_wisdom">
</div>
</div>
<div class="attr-container">
<button type="roll" name="roll_charisma" value="@{wtype}&{template:simple} {{rname=^{charisma-u}}} {{mod=@{charisma_mod}@{jack_bonus}}} {{r1=[[@{d20}+@{charisma_mod}@{jack_attr}[CHA]]]}} @{rtype}+@{charisma_mod}@{jack_attr}[CHA]]]}} @{charname_output}" data-i18n="charisma-u">CHARISMA</button>
<span class="attr" name="attr_charisma_mod" title="@{charisma_mod}">0</span>
<div class="attr-mod">
<input class="baseattr" type="text" name="attr_charisma_base" title="@{charisma}" value="10">
<input type="hidden" name="attr_charisma" value="10">
<input class="attr-flag" type="hidden" name="attr_charisma_flag" value="0">
<span class="finalattr" name="attr_charisma">
</div>
</div>
</div>
<div class="skills-saves-container">
<div class="insp-prof-container">
<div class="value">
<input type="checkbox" name="attr_inspiration"><span></span>
</div>
<div class="label">
<span data-i18n="inspiration-u">INSPIRATION</span>
</div>
</div>
<div class="insp-prof-container">
<div class="value">
<span name="attr_pb" title="@{pb}"></span>
</div>
<div class="label">
<span data-i18n="prof-bonus-u">PROFICIENCY BONUS</span>
</div>
</div>
<div class="saving-throw-container">
<div class="saving-throw">
<input type="checkbox" name="attr_strength_save_prof" title="@{strength_save_prof}" value="(@{pb})">
<span name="attr_strength_save_bonus" title="@{strength_save_bonus}">0</span>
<button type="roll" name="roll_strength_save" value="@{wtype}&{template:simple} {{rname=^{strength-save-u}}} {{mod=@{strength_save_bonus}}} {{r1=[[@{d20}+@{strength_save_bonus}@{pbd_safe}]]}} @{rtype}+@{strength_save_bonus}@{pbd_safe}]]}} @{global_save_mod} @{charname_output}" data-i18n="strength">Strength</button>
</div>
<div class="saving-throw">
<input type="checkbox" name="attr_dexterity_save_prof" title="@{dexterity_save_prof}" value="(@{pb})">
<span name="attr_dexterity_save_bonus" title="@{dexterity_save_bonus}">0</span>
<button type="roll" name="roll_dexterity_save" value="@{wtype}&{template:simple} {{rname=^{dexterity-save-u}}} {{mod=@{dexterity_save_bonus}}} {{r1=[[@{d20}+@{dexterity_save_bonus}@{pbd_safe}]]}} @{rtype}+@{dexterity_save_bonus}@{pbd_safe}]]}} @{global_save_mod} @{charname_output}" data-i18n="dexterity">Dexterity</button>
</div>
<div class="saving-throw">
<input type="checkbox" name="attr_constitution_save_prof" title="@{constitution_save_prof}" value="(@{pb})">
<span name="attr_constitution_save_bonus" title="@{constitution_save_bonus}">0</span>
<button type="roll" name="roll_constitution_save" value="@{wtype}&{template:simple} {{rname=^{constitution-save-u}}} {{mod=@{constitution_save_bonus}}} {{r1=[[@{d20}+@{constitution_save_bonus}@{pbd_safe}]]}} @{rtype}+@{constitution_save_bonus}@{pbd_safe}]]}} @{global_save_mod} @{charname_output}" data-i18n="constitution">Constitution</button>
</div>
<div class="saving-throw">
<input type="checkbox" name="attr_intelligence_save_prof" title="@{intelligence_save_prof}" value="(@{pb})">
<span name="attr_intelligence_save_bonus" title="@{intelligence_save_bonus}">0</span>
<button type="roll" name="roll_intelligence_save" value="@{wtype}&{template:simple} {{rname=^{intelligence-save-u}}} {{mod=@{intelligence_save_bonus}}} {{r1=[[@{d20}+@{intelligence_save_bonus}@{pbd_safe}]]}} @{rtype}+@{intelligence_save_bonus}@{pbd_safe}]]}} @{global_save_mod} @{charname_output}" data-i18n="intelligence">Intelligence</button>
</div>
<div class="saving-throw">
<input type="checkbox" name="attr_wisdom_save_prof" title="@{wisdom_save_prof}" value="(@{pb})">
<span name="attr_wisdom_save_bonus" title="@{wisdom_save_bonus}">0</span>
<button type="roll" name="roll_wisdom_save" value="@{wtype}&{template:simple} {{rname=^{wisdom-save-u}}} {{mod=@{wisdom_save_bonus}}} {{r1=[[@{d20}+@{wisdom_save_bonus}@{pbd_safe}]]}} @{rtype}+@{wisdom_save_bonus}@{pbd_safe}]]}} @{global_save_mod} @{charname_output}" data-i18n="wisdom">Wisdom</button>
</div>
<div class="saving-throw">
<input type="checkbox" name="attr_charisma_save_prof" title="@{charisma_save_prof}" value="(@{pb})">
<span name="attr_charisma_save_bonus" title="@{charisma_save_bonus}">0</span>
<button type="roll" name="roll_charisma_save" value="@{wtype}&{template:simple} {{rname=^{charisma-save-u}}} {{mod=@{charisma_save_bonus}}} {{r1=[[@{d20}+@{charisma_save_bonus}@{pbd_safe}]]}} @{rtype}+@{charisma_save_bonus}@{pbd_safe}]]}} @{global_save_mod} @{charname_output}" data-i18n="charisma">Charisma</button>
</div>
<input type="hidden" class="toggleflag" name="attr_global_save_mod_flag">
<div class="hidden globalattack">
<input type="checkbox" name="attr_global_save_mod" value="{{global=[[@{global_save_mod_field}]]}}">
<textarea type="textarea" name="attr_global_save_mod_field" placeholder="1d4[BLESS]" style="width: 125px;"></textarea>
<span class="label" data-i18n="global-save-u">GLOBAL SAVE MODIFIER</span>
</div>
<div class="label">
<span data-i18n="saving-throws-u">SAVING THROWS</span>
</div>
</div>
<div class="skills-container skills-list">
<div data-i18n-list="skills-list">
<div class="skill" data-i18n-list-item="acrobatics">
<input type="checkbox" name="attr_acrobatics_prof" title="@{acrobatics_prof}" value="(@{pb}*@{acrobatics_type})">
<span name="attr_acrobatics_bonus" title="@{acrobatics_bonus}">0</span>
<button type="roll" name="roll_acrobatics" value="@{wtype}&{template:simple} {{rname=^{acrobatics-u}}} {{mod=@{acrobatics_bonus}}} {{r1=[[@{d20}+@{acrobatics_bonus}@{pbd_safe}]]}} @{rtype}+@{acrobatics_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}" data-i18n="acrobatics-core">Acrobatics <span>(Dex)</span></button>
</div>
<div class="skill" data-i18n-list-item="animal_handling">
<input type="checkbox" name="attr_animal_handling_prof" title="@{animal_handling_prof}" value="(@{pb}*@{animal_handling_type})">
<span name='attr_animal_handling_bonus' title='@{animal_handling_bonus}'>0</span>
<button type='roll' name='roll_animal_handling' value='@{wtype}&{template:simple} {{rname=^{animal_handling-u}}} {{mod=@{animal_handling_bonus}}} {{r1=[[@{d20}+@{animal_handling_bonus}@{pbd_safe}]]}} @{rtype}+@{animal_handling_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='animal_handling-core'>Animal Handling <span>(Wis)</span></button>
</div>
<div class="skill" data-i18n-list-item="arcana">
<input type="checkbox" name="attr_arcana_prof" title="@{arcana_prof}" value="(@{pb}*@{arcana_type})">
<span name='attr_arcana_bonus' title='@{arcana_bonus}'>0</span>
<button type='roll' name='roll_arcana' value='@{wtype}&{template:simple} {{rname=^{arcana-u}}} {{mod=@{arcana_bonus}}} {{r1=[[@{d20}+@{arcana_bonus}@{pbd_safe}]]}} @{rtype}+@{arcana_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='arcana-core'>Arcana <span>(Int)</span></button>
</div>
<div class="skill" data-i18n-list-item="athletics">
<input type="checkbox" name="attr_athletics_prof" title="@{athletics_prof}" value="(@{pb}*@{athletics_type})">
<span name='attr_athletics_bonus' title='@{athletics_bonus}'>0</span>
<button type='roll' name='roll_athletics' value='@{wtype}&{template:simple} {{rname=^{athletics-u}}} {{mod=@{athletics_bonus}}} {{r1=[[@{d20}+@{athletics_bonus}@{pbd_safe}]]}} @{rtype}+@{athletics_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='athletics-core'>Athletics <span>(Str)</span></button>
</div>
<div class="skill" data-i18n-list-item="deception">
<input type="checkbox" name="attr_deception_prof" title="@{deception_prof}" value="(@{pb}*@{deception_type})">
<span name='attr_deception_bonus' title='@{deception_bonus}'>0</span>
<button type='roll' name='roll_deception' value='@{wtype}&{template:simple} {{rname=^{deception-u}}} {{mod=@{deception_bonus}}} {{r1=[[@{d20}+@{deception_bonus}@{pbd_safe}]]}} @{rtype}+@{deception_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='deception-core'>Deception <span>(Cha)</span></button>
</div>
<div class="skill" data-i18n-list-item="history">
<input type="checkbox" name="attr_history_prof" title="@{history_prof}" value="(@{pb}*@{history_type})">
<span name='attr_history_bonus' title='@{history_bonus}'>0</span>
<button type='roll' name='roll_history' value='@{wtype}&{template:simple} {{rname=^{history-u}}} {{mod=@{history_bonus}}} {{r1=[[@{d20}+@{history_bonus}@{pbd_safe}]]}} @{rtype}+@{history_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='history-core'>History <span>(Int)</span></button>
</div>
<div class="skill" data-i18n-list-item="insight">
<input type="checkbox" name="attr_insight_prof" title="@{insight_prof}" value="(@{pb}*@{insight_type})">
<span name='attr_insight_bonus' title='@{insight_bonus}'>0</span>
<button type='roll' name='roll_insight' value='@{wtype}&{template:simple} {{rname=^{insight-u}}} {{mod=@{insight_bonus}}} {{r1=[[@{d20}+@{insight_bonus}@{pbd_safe}]]}} @{rtype}+@{insight_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='insight-core'>Insight <span>(Wis)</span></button>
</div>
<div class="skill" data-i18n-list-item="intimidation">
<input type="checkbox" name="attr_intimidation_prof" title="@{intimidation_prof}" value="(@{pb}*@{intimidation_type})">
<span name='attr_intimidation_bonus' title='@{intimidation_bonus}'>0</span>
<button type='roll' name='roll_intimidation' value='@{wtype}&{template:simple} {{rname=^{intimidation-u}}} {{mod=@{intimidation_bonus}}} {{r1=[[@{d20}+@{intimidation_bonus}@{pbd_safe}]]}} @{rtype}+@{intimidation_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='intimidation-core'>Intimidation <span>(Cha)</span></button>
</div>
<div class="skill" data-i18n-list-item="investigation">
<input type="checkbox" name="attr_investigation_prof" title="@{investigation_prof}" value="(@{pb}*@{investigation_type})">
<span name='attr_investigation_bonus' title='@{investigation_bonus}'>0</span>
<button type='roll' name='roll_investigation' value='@{wtype}&{template:simple} {{rname=^{investigation-u}}} {{mod=@{investigation_bonus}}} {{r1=[[@{d20}+@{investigation_bonus}@{pbd_safe}]]}} @{rtype}+@{investigation_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='investigation-core'>Investigation <span>(Int)</span></button>
</div>
<div class="skill" data-i18n-list-item="medicine">
<input type="checkbox" name="attr_medicine_prof" title="@{medicine_prof}" value="(@{pb}*@{medicine_type})">
<span name='attr_medicine_bonus' title='@{medicine_bonus}'>0</span>
<button type='roll' name='roll_medicine' value='@{wtype}&{template:simple} {{rname=^{medicine-u}}} {{mod=@{medicine_bonus}}} {{r1=[[@{d20}+@{medicine_bonus}@{pbd_safe}]]}} @{rtype}+@{medicine_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='medicine-core'>Medicine <span>(Wis)</span></button>
</div>
<div class="skill" data-i18n-list-item="nature">
<input type="checkbox" name="attr_nature_prof" title="@{nature_prof}" value="(@{pb}*@{nature_type})">
<span name='attr_nature_bonus' title='@{nature_bonus}'>0</span>
<button type='roll' name='roll_nature' value='@{wtype}&{template:simple} {{rname=^{nature-u}}} {{mod=@{nature_bonus}}} {{r1=[[@{d20}+@{nature_bonus}@{pbd_safe}]]}} @{rtype}+@{nature_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='nature-core'>Nature <span>(Int)</span></button>
</div>
<div class="skill" data-i18n-list-item="perception">
<input type="checkbox" name="attr_perception_prof" title="@{perception_prof}" value="(@{pb}*@{perception_type})">
<span name='attr_perception_bonus' title='@{perception_bonus}'>0</span>
<button type='roll' name='roll_perception' value='@{wtype}&{template:simple} {{rname=^{perception-u}}} {{mod=@{perception_bonus}}} {{r1=[[@{d20}+@{perception_bonus}@{pbd_safe}]]}} @{rtype}+@{perception_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='perception-core'>Perception <span>(Wis)</span></button>
</div>
<div class="skill" data-i18n-list-item="performance">
<input type="checkbox" name="attr_performance_prof" title="@{performance_prof}" value="(@{pb}*@{performance_type})">
<span name='attr_performance_bonus' title='@{performance_bonus}'>0</span>
<button type='roll' name='roll_performance' value='@{wtype}&{template:simple} {{rname=^{performance-u}}} {{mod=@{performance_bonus}}} {{r1=[[@{d20}+@{performance_bonus}@{pbd_safe}]]}} @{rtype}+@{performance_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='performance-core'>Performance <span>(Cha)</span></button>
</div>
<div class="skill" data-i18n-list-item="persuasion">
<input type="checkbox" name="attr_persuasion_prof" title="@{persuasion_prof}" value="(@{pb}*@{persuasion_type})">
<span name='attr_persuasion_bonus' title='@{persuasion_bonus}'>0</span>
<button type='roll' name='roll_persuasion' value='@{wtype}&{template:simple} {{rname=^{persuasion-u}}} {{mod=@{persuasion_bonus}}} {{r1=[[@{d20}+@{persuasion_bonus}@{pbd_safe}]]}} @{rtype}+@{persuasion_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='persuasion-core'>Persuasion <span>(Wis)</span></button>
</div>
<div class="skill" data-i18n-list-item="religion">
<input type="checkbox" name="attr_religion_prof" title="@{religion_prof}" value="(@{pb}*@{religion_type})">
<span name='attr_religion_bonus' title='@{religion_bonus}'>0</span>
<button type='roll' name='roll_religion' value='@{wtype}&{template:simple} {{rname=^{religion-u}}} {{mod=@{religion_bonus}}} {{r1=[[@{d20}+@{religion_bonus}@{pbd_safe}]]}} @{rtype}+@{religion_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='religion-core'>Religion <span>(Int)</span></button>
</div>
<div class="skill" data-i18n-list-item="sleight_of_hand">
<input type="checkbox" name="attr_sleight_of_hand_prof" title="@{sleight_of_hand_prof}" value="(@{pb}*@{sleight_of_hand_type})">
<span name='attr_sleight_of_hand_bonus' title='@{sleight_of_hand_bonus}'>0</span>
<button type='roll' name='roll_sleight_of_hand' value='@{wtype}&{template:simple} {{rname=^{sleight_of_hand-u}}} {{mod=@{sleight_of_hand_bonus}}} {{r1=[[@{d20}+@{sleight_of_hand_bonus}@{pbd_safe}]]}} @{rtype}+@{sleight_of_hand_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='sleight_of_hand-core'>Sleight of Hand <span>(Dex)</span></button>
</div>
<div class="skill" data-i18n-list-item="stealth">
<input type="checkbox" name="attr_stealth_prof" title="@{stealth_prof}" value="(@{pb}*@{stealth_type})">
<span name='attr_stealth_bonus' title='@{stealth_bonus}'>0</span>
<button type='roll' name='roll_stealth' value='@{wtype}&{template:simple} {{rname=^{stealth-u}}} {{mod=@{stealth_bonus}}} {{r1=[[@{d20}+@{stealth_bonus}@{pbd_safe}]]}} @{rtype}+@{stealth_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='stealth-core'>Stealth <span>(Dex)</span></button>
</div>
<div class="skill" data-i18n-list-item="survival">
<input type="checkbox" name="attr_survival_prof" title="@{survival_prof}" value="(@{pb}*@{survival_type})">
<span name='attr_survival_bonus' title='@{survival_bonus}'>0</span>
<button type='roll' name='roll_survival' value='@{wtype}&{template:simple} {{rname=^{survival-u}}} {{mod=@{survival_bonus}}} {{r1=[[@{d20}+@{survival_bonus}@{pbd_safe}]]}} @{rtype}+@{survival_bonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}' data-i18n='survival-core'>Survival <span>(Wis)</span></button>
</div>
</div>
<div class="label">
<span data-i18n="skills-u">SKILLS</span>
</div>
</div>
</div>
<div class="insp-prof-container" style="width: 100%; margin-top: 2px;">
<div class="value">
<input type="text" name="attr_passive_wisdom" title="@{passive_wisdom}" value="(10+@{perception_bonus}+@{passiveperceptionmod})" disabled="true" ><span></span>
</div>
<div class="label" style="width: 217px;">
<span data-i18n="pass-wis-u">PASSIVE WISDOM (PERCEPTION)</span>
</div>
</div>
<div class="tool_proficiencies" style="margin-bottom: 10px; min-height: 100px; position: relative;">
<div class="top">
<span class="label" style="width: 106px;" data-i18n="tool-u">TOOL</span>
<span class="label" style="width: 35px;" data-i18n="pro-u">PRO</span>
<span class="label" style="width: 50px;" data-i18n="attr-u">ATTRIBUTE</span>
</div>
<fieldset class="repeating_tool">
<div class="tool">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_toolname" style="width: 120px;">
</div>
<div class="row">
<span data-i18n="prof-bonus:-u">PROFICIENCY BONUS:</span>
<select name="attr_toolbonus_base">
<option value="(@{pb})" selected="selected" data-i18n="prof-u">PROFICIENT</option>
<option value="(@{pb}*2)" data-i18n="expertise-u">EXPERTISE</option>
<option value="(floor(@{pb}/2))" data-i18n="jack-of-all-u">JACK OF ALL TRADES</option>
</select>
</div>
<div class="row">
<span data-i18n="attr:-u">ATTRIBUTE:</span>
<select name="attr_toolattr_base">
<option value="@{strength_mod}" selected="selected" data-i18n="strength-u">STRENGTH</option>
<option value="@{dexterity_mod}" data-i18n="dexterity-u">DEXTERITY</option>
<option value="@{constitution_mod}" data-i18n="constitution-u">CONSTITUTION</option>
<option value="@{intelligence_mod}" data-i18n="intelligence-u">INTELLIGENCE</option>
<option value="@{wisdom_mod}" data-i18n="wisdom-u">WISDOM</option>
<option value="@{charisma_mod}" data-i18n="charisma-u">CHARISMA</option>
<option value="?{Attribute?|Strength,@{strength_mod}|Dexterity,@{dexterity_mod}|Constitution,@{constitution_mod}|Intelligence,@{intelligence_mod}|Wisdom,@{wisdom_mod}|Charisma,@{charisma_mod}}" data-i18n="query-attr-u">QUERY ATTRIBUTE</option>
</select>
<span data-i18n="mods:-u">MODS:</span>
<input type="text" class="num" name="attr_tool_mod" title="@{tool_mod}" value="0">
</div>
</div>
<div class="display">
<button type="roll" name="roll_tool" value="@{wtype}&{template:simple} {{rname=@{toolname}}} {{mod=@{toolbonus}}} {{r1=[[@{d20}+@{toolbonus}@{pbd_safe}]]}} @{rtype}+@{toolbonus}@{pbd_safe}]]}} @{global_skill_mod} @{charname_output}">
<span name="attr_toolname" style="width: 100px;"></span>
<input type="text" name="attr_toolbonus" style="width: 40px; text-align: center;">
<input type="text" name="attr_toolattr" style="width: 80px;">
</button>
</div>
</div>
</fieldset>
<input type="hidden" class="toggleflag" name="attr_global_skill_mod_flag">
<div class="hidden globalattack">
<input type="checkbox" name="attr_global_skill_mod" value="{{global=[[@{global_skill_mod_field}]]}}">
<textarea type="textarea" name="attr_global_skill_mod_field" placeholder="1d4[GUIDANCE]"></textarea>
<span class="label" data-i18n="global-skill-u">GLOBAL SKILL MODIFIER</span>
</div>
<div class="label" style="position: absolute; bottom: 0px; width: 100%; text-align: center;">
<span data-i18n="tool-prof-u" style="display: inline;">TOOL PROFICIENCIES</span><span style="display: inline;"> & </span><span data-i18n="custom-skills-u" style="display: inline;">CUSTOM SKILLS</span>
</div>
</div>
<div class="textbox-container proficiencies">
<input type="hidden" class="inventoryflag" name="attr_simpleproficencies" value="complex">
<textarea class="sheet-simple" name="attr_other_proficiencies_and_languages" style="min-height: 91px; height: 91px;"></textarea>
<div class="complex">
<div class="top">
<span class="label" style="width: 60px;" data-i18n="type-u">TYPE</span>
<span class="label" style="width: 135px;" data-i18n="proficency-u">PROFICIENCY</span>
</div>
<fieldset class="repeating_proficiencies">
<div class="proficiency">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="type:-u">TYPE:</span>
<select name="attr_prof_type">
<option selected="selected" data-i18n="lang-u">LANGUAGE</option>
<option data-i18n="weapon-u">WEAPON</option>
<option data-i18n="armor-u">ARMOR</option>
<option data-i18n="other-u">OTHER</option>
</select>
</div>
<div class="row" style="margin-bottom: 3px;">
<span data-i18n="proficency-u">PROFICIENCY</span><span>:</span>
<input type="text" name="attr_name" style="width: 165px;" placeholder="Elven, Dwarven, and Common">
</div>
</div>
<div class="display" style="margin-bottom: 2px;">
<button type="roll" name="roll_output" value="@{wtype}&{template:traits} @{charname_output} {{name=@{prof_type} PROFICIENCY}} {{description=@{name}}}">
<span name="attr_prof_type" style="width: 55px;"></span>
<span name="attr_name" style="width: 159px;"></span>
</button>
</div>
</div>
</fieldset>
</div>
<div class="label">
<span style="margin-top: -10px;" data-i18n="other-prof-langs-u">OTHER PROFICIENCIES & LANGUAGES</span>
</div>
</div>
</div>
<div class="col col2">
<div class="ac-init-speed-container">
<div class="ac">
<input type="text" name="attr_ac" title="@{ac}">
<span class="label pc-ac" data-i18n="armor-class-u">ARMOR CLASS</span>
</div>
<div class="init">
<span name="attr_initiative_bonus" title="@{initiative_bonus}"></span>
<button type="roll" name="roll_initiative" value="@{wtype}&{template:simple} {{rname=^{init-u}}} {{mod=@{initiative_bonus}}} {{r1=[[@{initiative_style}+@{initiative_bonus}@{pbd_safe}[INIT] &{tracker}]]}} {{normal=1}} @{charname_output}" data-i18n="init-u">INITIATIVE</button>
</div>
<div class="speed">
<input type="text" name="attr_speed" title="@{speed}">
<span class="label" data-i18n="speed-u">SPEED</span>
</div>
</div>
<div class="hp">
<div class="top">
<span data-i18n="hp-max-u">Hit Point Maximum</span>
<input type="text" name="attr_hp_max" title="@{hp_max}">
</div>
<input type="number" name="attr_hp" title="@{hp}">
<span class="label" data-i18n="hp-current-u">CURRENT HIT POINTS</span>
</div>
<div class="hp" style="height: 56px;">
<input type="number" name="attr_hp_temp" title="@{hp_temp}">
<span class="label" data-i18n="hp-temp-u">TEMPORARY HIT POINTS</span>
</div>
<div class="hdice-dsaves-container" style="width: 242px;">
<div class="subcontainer">
<div class="top">
<span data-i18n="total">Total</span>
<input type="text" name="attr_hit_dice_max" title="@{hit_dice_max}">
</div>
<input type="number" name="attr_hit_dice" title="@{hit_dice}" style="margin-bottom: -6px;">
<button type="roll" name="roll_hit_dice" value="@{wtype}&{template:simple} {{rname=^{hit-dice-u}}} {{mod=D@{hitdie_final}+[[@{constitution_mod}[CON]]]}} {{r1=[[1d@{hitdie_final}+[[@{constitution_mod}]][CON]]]}} {{normal=1}} @{charname_output}" data-i18n="hit-dice-u">HIT DICE</button>
</div>
<div class="subcontainer" style="float: right;">
<div class="row-container">
<span class="label" data-i18n="successes-u">SUCCESSES</span>
<input type="checkbox" name="attr_deathsave_succ1">
<input type="checkbox" name="attr_deathsave_succ2">
<input type="checkbox" name="attr_deathsave_succ3">
</div>
<div class="row-container">
<span class="label" data-i18n="failures-u">FAILURES</span>
<input type="checkbox" name="attr_deathsave_fail1">
<input type="checkbox" name="attr_deathsave_fail2">
<input type="checkbox" name="attr_deathsave_fail3">
</div>
<button type="roll" name="roll_death_save" style="margin-top: 6px;" value="@{wtype}&{template:simple} {{rname=^{death-save-u}}} {{mod=@{death_save_bonus}}} {{r1=[[@{d20}+@{death_save_bonus}[MOD]@{globalsavingthrowbonus}]]}} {{normal=1}} @{charname_output}" data-i18n="death-saves-u">DEATH SAVES</button>
</div>
</div>
<input type="hidden" class="ammoflag" name="attr_ammotracking">
<div class="attacks" style="position: relative;">
<div class="top">
<span class="label" style="width: 95px;" data-i18n="name-u">NAME</span>
<span class="label" style="width: 35px;" data-i18n="atk-u">ATK</span>
<span class="label" style="width: 65px;" data-i18n="dmg-type-u">DAMAGE/TYPE</span>
</div>
<fieldset class="repeating_attack">
<div class="attack">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_atkname">
</div>
<div class="row">
<input type="checkbox" name="attr_atkflag" value="{{attack=1}}" checked="checked">
<span data-i18n="attack:-u">ATTACK:</span>
<select name="attr_atkattr_base">
<option value="@{strength_mod}" selected="selected" data-i18n="str-u">STR</option>
<option value="@{dexterity_mod}" data-i18n="dex-u">DEX</option>
<option value="@{constitution_mod}" data-i18n="con-u">CON</option>
<option value="@{intelligence_mod}" data-i18n="int-u">INT</option>
<option value="@{wisdom_mod}" data-i18n="wis-u">WIS</option>
<option value="@{charisma_mod}" data-i18n="cha-u">CHA</option>
<option value="0">-</option>
</select>
<span>+</span>
<input type="text" class="num" name="attr_atkmod" placeholder="0">
<span>+</span>
<input type="checkbox" name="attr_atkprofflag" value="(@{pb})" checked="checked" style="margin-left: 3px;">
<span data-i18n="proficient-u">PROFICIENT</span>
</div>
<div class="row">
<span style="margin-left: 17px;" data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_atkrange" placeholder="Self (60-foot cone)" style="width: 170px;" data-i18n-placeholder="range-place">
</div>
<div class="row">
<span style="margin-left: 17px;" data-i18n="magic-bonus:-u">MAGIC BONUS:</span>
<input type="text" class="num" name="attr_atkmagic" placeholder="0">
<span data-i18n="crit-range-u">CRIT RANGE:</span>
<input type="text" class="num" name="attr_atkcritrange" value="20" placeholder="20">
</div>
<div class="row">
<input type="checkbox" name="attr_dmgflag" value="{{damage=1}} {{dmg1flag=1}}" checked="checked">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_dmgbase" placeholder="1d6" style="width: 50px;">
<span>+</span>
<select name="attr_dmgattr">
<option value="@{strength_mod}" selected="selected" data-i18n="str-u">STR</option>
<option value="@{dexterity_mod}" data-i18n="dex-u">DEX</option>
<option value="@{constitution_mod}" data-i18n="con-u">CON</option>
<option value="@{intelligence_mod}" data-i18n="int-u">INT</option>
<option value="@{wisdom_mod}" data-i18n="wis-u">WIS</option>
<option value="@{charisma_mod}" data-i18n="cha-u">CHA</option>
<option value="0">-</option>
</select>
<span>+</span>
<input type="text" class="num" name="attr_dmgmod" placeholder="0">
</div>
<div class="row">
<span style="margin-left: 17px;" data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_dmgtype" placeholder="Slashing" style="width: 50px;" data-i18n-placeholder="dmg-type-place">
<span data-i18n="crit:-u">CRIT:</span>
<input type="text" name="attr_dmgcustcrit" placeholder="1d6" style="width: 80px;">
</div>
<div class="row">
<input type="checkbox" name="attr_dmg2flag" value="{{damage=1}} {{dmg2flag=1}}">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_dmg2base" placeholder="1d6" style="width: 50px;">
<span>+</span>
<select name="attr_dmg2attr">
<option value="@{strength_mod}" data-i18n="str-u">STR</option>
<option value="@{dexterity_mod}" data-i18n="dex-u">DEX</option>
<option value="@{constitution_mod}" data-i18n="con-u">CON</option>
<option value="@{intelligence_mod}" data-i18n="int-u">INT</option>
<option value="@{wisdom_mod}" data-i18n="wis-u">WIS</option>
<option value="@{charisma_mod}" data-i18n="cha-u">CHA</option>
<option value="0" selected="selected">-</option>
</select>
<span>+</span>
<input type="text" class="num" name="attr_dmg2mod" placeholder="0">
</div>
<div class="row">
<span style="margin-left: 17px;" data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_dmg2type" placeholder="Slashing" style="width: 50px;" data-i18n-placeholder="dmg-type-place">
<span data-i18n="crit:-u">CRIT:</span>
<input type="text" name="attr_dmg2custcrit" placeholder="1d6" style="width: 80px;">
</div>
<div class="row">
<input type="checkbox" name="attr_saveflag" value="{{save=1}} {{saveattr=@{saveattr}}} {{savedesc=@{saveeffect}}} {{savedc=[[[[@{savedc}]][SAVE]]]}}">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_saveattr">
<option value="Strength" selected="selected" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="vs-dc:-u">VS DC:</span>
<select name="attr_savedc">
<option value="(@{spell_save_dc})" selected="selected" data-i18n="spell-u">SPELL</option>
<option value="(@{strength_mod}+8+@{pb})" data-i18n="str-u">STR</option>
<option value="(@{dexterity_mod}+8+@{pb})" data-i18n="dex-u">DEX</option>
<option value="(@{constitution_mod}+8+@{pb})" data-i18n="con-u">CON</option>
<option value="(@{intelligence_mod}+8+@{pb})" data-i18n="int-u">INT</option>
<option value="(@{wisdom_mod}+8+@{pb})" data-i18n="wis-u">WIS</option>
<option value="(@{charisma_mod}+8+@{pb})" data-i18n="cha-u">CHA</option>
<option value="(@{saveflat})" data-i18n="flat-u">FLAT</option>
</select>
<input class="flatflag" type="hidden" name="attr_savedc">
<input class="num flat" type="text" name="attr_saveflat" placeholder="10" value="10">
</div>
<div class="row">
<span data-i18n="save-effect:-u">SAVE EFFECT:</span>
<input type="text" name="attr_saveeffect" placeholder="half damage" style="width: 160px;" data-i18n-placeholder="save-effect-place">
</div>
<div class="row ammo">
<span data-i18n="ammunition:-u">AMMUNITION:</span>
<input type="text" name="attr_ammo" placeholder="Arrows" style="width: 160px;" data-i18n-placeholder="ammunition-place">
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
<textarea name="attr_atk_desc" placeholder="Up to 2 creatures within 5 feet" data-i18n-placeholder="description-place"></textarea>
</div>
</div>
<div class="display">
<button type="roll" name="roll_attack" value="@{rollbase}">
<span name="attr_atkname" style="width: 85px;"></span>
<input type="text" name="attr_atkbonus" style="width: 40px; text-align: center;" value="">
<input type="text" name="attr_atkdmgtype" style="width: 90px;" value="">
</button>
</div>
</div>
<input type="hidden" name="attr_rollbase">
<input type="hidden" name="attr_rollbase_dmg">
<input type="hidden" name="attr_rollbase_crit">
<input type="hidden" name="attr_hldmg">
<input type="hidden" name="attr_spelllevel">
<input type="hidden" name="attr_itemid">
<input type="hidden" name="attr_spellid">
<input type="hidden" name="attr_spell_innate">
<button type="roll" name="roll_attack_dmg" style="display: none;" value="@{rollbase_dmg}"></button>
<button type="roll" name="roll_attack_crit" style="display: none;" value="@{rollbase_crit}"></button>
</fieldset>
<input type="hidden" class="toggleflag" name="attr_global_attack_mod_flag">
<div class="hidden globalattack">
<input type="checkbox" name="attr_global_attack_mod" value="{{globalattack=[[@{global_attack_mod_field}]]}}">
<textarea type="textarea" name="attr_global_attack_mod_field" placeholder="1d4[BLESS]"></textarea>
<span class="label" data-i18n="global-attack-u">GLOBAL ATTACK MODIFIER</span>
</div>
<input type="hidden" class="toggleflag" name="attr_global_damage_mod_flag">
<div class="hidden globalattack">
<input type="checkbox" name="attr_global_damage_mod" value="{{globaldamage=[[@{global_damage_mod_field}]]}}">
<input type="hidden" name="attr_global_damage_mod_crit" value="0">
<textarea type="textarea" name="attr_global_damage_mod_field" placeholder="1d6[SNEAK ATTACK]"></textarea>
<span class="label" data-i18n="global-damage-u">GLOBAL DAMAGE MODIFIER</span>
<div class="row" style="margin-top: -8px; margin-bottom: 10px;">
<span style="display: inline; margin-left: 25px;" data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_global_damage_type" value="">
</div>
</div>
<span class="label" style="margin-top: 0px; position: absolute; bottom: 0px;" data-i18n="atk-spellcasting-u">ATTACKS & SPELLCASTING</span>
</div>
<div class="equipment">
<div class="money">
<div class="coin">
<span class="label" data-i18n="copper-piece-u">CP</span>
<input type="text" name="attr_cp" title="@{cp}">
</div>
<div class="coin">
<span class="label" data-i18n="silver-piece-u">SP</span>
<input type="text" name="attr_sp" title="@{sp}">
</div>
<div class="coin">
<span class="label" data-i18n="electrum-piece-u">EP</span>
<input type="text" name="attr_ep" title="@{ep}">
</div>
<div class="coin">
<span class="label" data-i18n="gold-piece-u">GP</span>
<input type="text" name="attr_gp" title="@{gp}">
</div>
<div class="coin">
<span class="label" data-i18n="platinum-piece-u">PP</span>
<input type="text" name="attr_pp" title="@{pp}">
</div>
</div>
<input type="hidden" class="inventoryflag" name="attr_simpleinventory" value="complex">
<textarea class="simple" name="attr_equipment"></textarea>
<div class="complex">
<input type="hidden" class="warningflag" name="attr_armorwarningflag">
<div class="warning">
<span data-i18n="warning-armor-sets-u">
<input type="checkbox" name="attr_armorwarning" value="hide">
WARNING - MULTIPLE SETS OF ARMOR OR SHIELDS HAVE BEEN ADDED AND AC IS NOT CORRECTLY CALCULATED. UNEQUIP THE ARMOR PIECE FROM THE ITEM DETAILS.
</span>
</div>
<div class="header" style="height: auto;">
<span class="pictos" style="width: 25px; font-size: 15px;">*</span>
<span style="width: 100px; text-align: left;" data-i18n="item-name-u">ITEM NAME</SPAN>
<span style="width: 25px;"><img src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/5th%20Edition%20OGL%20by%20Roll20/images/weight_lbs.png" style="width: 15px; margin-bottom: -3px;"></span>
</div>
<fieldset class="repeating_inventory">
<input type="hidden" class="equippedflag" name="attr_equipped">
<div class="item">
<input class="weight" type="text" name="attr_itemcount" value="1">
<input class="name" type="text" name="attr_itemname">
<input class="weight" type="text" name="attr_itemweight">
<input class="inventorysubflag" type="checkbox" name="attr_inventorysubflag"><span>i</span>
<div class="subitem">
<input class="equipped" type="checkbox" name="attr_equipped" value="1" checked="checked">
<span class="equippedlabel" data-i18n="equipped-u">EQUIPPED</span>
<input class="equipped" type="checkbox" name="attr_useasresource" value="1">
<span class="equippedlabel" data-i18n="use-as-resource-u">USE AS A RESOURCE</span>
<input class="equipped" type="checkbox" name="attr_hasattack" value="1">
<span class="equippedlabel" data-i18n="has-attack-u">HAS AN ATTACK</span>
<span class="label" data-i18n="prop:-u">PROP:</span>
<input class="subfield" type="text" name="attr_itemproperties">
<span class="label" data-i18n="mods:-u">MODS:</span>
<input class="subfield" type="text" name="attr_itemmodifiers">
<textarea class="subtextarea" name="attr_itemcontent"></textarea>
</div>
<input type="hidden" name="attr_itemattackid">
<input type="hidden" name="attr_itemresourceid">
</div>
</fieldset>
<div class="weighttotal">
<span class="label" data-i18n="total-weight-u">TOTAL WEIGHT</span>
<input type="text" name="attr_weighttotal" value="0">
<input type="hidden" class="encumberance" name="attr_encumberance">
<span class="encumb immobile" data-i18n="immobile-u">IMMOBILE</span>
<span class="encumb heavily" data-i18n="heavily-encumbered-u">HEAVILY ENCUMBERED</span>
<span class="encumb encumbered" data-i18n="encumbered-u">ENCUMBERED</span>
<span class="encumb over" data-i18n="over-carrying-cap-u">OVER CARRYING CAPACITY</span>
</div>
</div>
<span class="label" style="margin-top: 0px; position: absolute; bottom: 0px;" data-i18n="equipment-u">EQUIPMENT</span>
</div>
</div>
<div class="col col3">
<div class="textbox pibf">
<input class="options-flag" type="checkbox" name="attr_options-flag-personality" checked="checked"><span>y</span>
<div class="options">
<textarea name="attr_personality_traits" style="min-height: 50px; height: 50px;"></textarea>
</div>
<div class="display">
<span name="attr_personality_traits"></span>
</div>
<span class="label" data-i18n="personality-traits-u">PERSONALITY TRAITS</span>
</div>
<div class="textbox pibf">
<input class="options-flag" type="checkbox" name="attr_options-flag-ideals" checked="checked"><span>y</span>
<div class="options">
<textarea name="attr_ideals"></textarea>
</div>
<div class="display">
<span name="attr_ideals"></span>
</div>
<span class="label" data-i18n="ideals-u">IDEALS</span>
</div>
<div class="textbox pibf">
<input class="options-flag" type="checkbox" name="attr_options-flag-bonds" checked="checked"><span>y</span>
<div class="options">
<textarea name="attr_bonds"></textarea>
</div>
<div class="display">
<span name="attr_bonds"></span>
</div>
<span class="label" data-i18n="bonds-u">BONDS</span>
</div>
<div class="textbox pibf">
<input class="options-flag" type="checkbox" name="attr_options-flag-flaws" checked="checked"><span>y</span>
<div class="options">
<textarea name="attr_flaws" style="min-height: 46px; height: 46px;"></textarea>
</div>
<div class="display">
<span name="attr_flaws"></span>
</div>
<span class="label" data-i18n="flaws-u">FLAWS</span>
</div>
<div class="resources">
<div class="hdice-dsaves-container" style="width: 246px; margin-top: 10px;">
<div class="subcontainer" style="height: 64px; width: 119px;">
<div class="top">
<span data-i18n="total">Total</span>
<input type="text" name="attr_class_resource_max" title="@{class_resource_max}">
</div>
<input type="number" name="attr_class_resource" title="@{class_resource}" style="margin-bottom: -6px;">
<input type="text" class="label" name="attr_class_resource_name" title="@{class_resource_name}" placeholder="CLASS RESOURCE" data-i18n-placeholder="class-resource-u">
</div>
<div class="subcontainer" style="height: 64px; width: 119px; float: right;">
<div class="top">
<span data-i18n="total">Total</span>
<input type="text" name="attr_other_resource_max" title="@{other_resource_max}">
</div>
<input type="number" name="attr_other_resource" title="@{other_resource}" style="margin-bottom: -6px;">
<input type="text" class="label" name="attr_other_resource_name" title="@{other_resource_name}" placeholder="OTHER RESOURCE" data-i18n-placeholder="other-resource-u">
<input type="hidden" name="attr_other_resource_itemid">
</div>
</div>
<fieldset class="repeating_resource">
<div class="hdice-dsaves-container" style="width: 246px; margin-top: 10px;">
<div class="subcontainer" style="height: 64px; width: 119px;">
<div class="top">
<span data-i18n="total">Total</span>
<input type="text" name="attr_resource_left_max" title="@{repeating_resource_left_max}">
</div>
<input type="number" name="attr_resource_left" title="@{repeating_resource_left}" style="margin-bottom: -6px;">
<input type="text" class="label" name="attr_resource_left_name" title="@{repeating_resource_left_name}" placeholder="OTHER RESOURCE" data-i18n-placeholder="other-resource-u">
<input type="hidden" name="attr_resource_left_itemid">
</div>
<div class="subcontainer" style="height: 64px; width: 119px;">
<div class="top">
<span data-i18n="total">Total</span>
<input type="text" name="attr_resource_right_max" title="@{repeating_resource_right_max}">
</div>
<input type="number" name="attr_resource_right" title="@{repeating_resource_right}" style="margin-bottom: -6px;">
<input type="text" class="label" name="attr_resource_right_name" title="@{repeating_resource_right_name}" placeholder="OTHER RESOURCE" data-i18n-placeholder="other-resource-u">
<input type="hidden" name="attr_resource_right_itemid">
</div>
</div>
</fieldset>
</div>
<div class="textbox traits" style="min-height: 480px;">
<input type="hidden" class="inventoryflag" name="attr_simpletraits" value="complex">
<textarea class="sheet-simple" name="attr_features_and_traits" style="min-height: 461px; height: 461px;"></textarea>
<div class="complex">
<fieldset class="repeating_traits">
<div class="trait">
<button type="roll" name="roll_output" class="output" value="@{wtype}&{template:traits} @{charname_output} {{name=@{name}}} {{source=@{source}: @{source_type}}} {{description=@{description}}}">w</button>
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<input class="display-flag" type="checkbox" name="attr_display_flag">
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_name" style="width: 120px;">
</div>
<div class="row">
<span data-i18n="source:-u">SOURCE:</span>
<select name="attr_source">
<option selected="selected" data-i18n="racial">Racial</option>
<option data-i18n="class">Class</option>
<option data-i18n="feat">Feat</option>
<option data-i18n="background">Background</option>
<option data-i18n="other">Other</option>
</select>
</div>
<div class="row">
<span data-i18n="source-type:-u">SOURCE TYPE:</span>
<input type="text" name="attr_source_type" style="width: 160px;" placeholder="Dwarf/Fighter/4th Level">
</div>
<div class="row">
<textarea name="attr_description" style="min-height: 200px; height: 200px;"></textarea>
</div>
</div>
<div class="display" style="margin-bottom: 2px;">
<span class="title" name="attr_name"></span>
<span class="subheader">
<span name="attr_source"></span><span>: </span><span name="attr_source_type"></span>
</span>
<span class="desc" name="attr_description"></span>
</div>
</div>
</fieldset>
</div>
<span class="label" data-i18n="feats-traits-u" style="margin-top: 0px; position: absolute; bottom: 0px;">FEATURES & TRAITS</span>
</div>
<input type="hidden" class="missing-info-flag" name="attr_missing_info">
<div class="missing-info">
<span><span class="info-popup pictos">i</span> Looking for missing data?</span>
<span class="missing-info-desc">Your data is in the simple version that can be re-enabled from the Settings(gear) tab of the character sheet. Under GENERAL OPTIONS and then FEATS & TRAITS. Set the section to be 'Simple'.</span>
</div>
</div>
</div>
</div>
<div class="page bio">
<div class="header">
<div class="name-container">
<img src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/5th%20Edition%20OGL%20by%20Roll20/images/srd5_360.png" style="padding-bottom: 5px;">
<input type="text" name="attr_character_name" style="width: 100%;">
<span class="label" data-i18n="char-name-u">CHARACTER NAME</span>
</div>
<div class="header-info">
<div class="top" style="position: relative; top: 10px;">
<div class="hlabel-container">
<input type="text" name="attr_age" style="width: 120px;">
<span class="label" data-i18n="age-u">AGE</span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_size" style="width: 120px;">
<span class="label" data-i18n="size-u">SIZE</span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_height" style="width: 120px;">
<span class="label" data-i18n="height-u">HEIGHT</span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_weight" style="width: 120px;">
<span class="label" data-i18n="weight-u">WEIGHT</span>
</div>
</div>
<div class="bottom">
<div class="hlabel-container">
<input type="text" name="attr_eyes" style="width: 160px;">
<span class="label" data-i18n="eye-u">EYES</span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_skin" style="width: 160px;">
<span class="label" data-i18n="skin-u">SKIN</span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_hair" style="width: 160px;">
<span class="label" data-i18n="hair-u">HAIR</span>
</div>
</div>
</div>
</div>
<div class="body">
<div class="col col1">
<div class="textbox">
<textarea name="attr_character_appearance" style="min-height: 300px; height: 300px;"></textarea>
<span class="label" data-i18n="char-appearance-u">CHARACTER APPEARANCE</span>
</div>
<div class="textbox">
<textarea name="attr_character_backstory" style="min-height: 623px; height: 623px;"></textarea>
<span class="label" data-i18n="char-backstory-u">CHARACTER BACKSTORY</span>
</div>
</div>
<div class="col2-3">
<div class="textbox">
<textarea name="attr_allies_and_organizations" style="min-height: 288px; height: 300px;"></textarea>
<span class="label" data-i18n="allies-orgs-u">ALLIES & ORGANIZATIONS</span>
</div>
<div class="textbox">
<textarea name="attr_additional_feature_and_traits" style="min-height: 289px; height: 300px;"></textarea>
<span class="label" data-i18n="add-feats-traits-u">ADDITIONAL FEATURES & TRAITS</span>
</div>
<div class="textbox">
<textarea name="attr_treasure" style="min-height: 300px; height: 300px;"></textarea>
<span class="label" data-i18n="treasure-u">TREASURE</span>
</div>
</div>
</div>
</div>
<div class="page spells">
<div class="header">
<div class="name-container">
<img src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/5th%20Edition%20OGL%20by%20Roll20/images/srd5_360.png" style="padding-bottom: 5px;">
<input type="text" name="attr_character_name" style="width: 100%;">
<span class="label" data-i18n="char-name-u">CHARACTER NAME</span>
</div>
<div class="header-info">
<div class="part">
<select name="attr_spellcasting_ability">
<option value="0*" data-i18n="none-u">NONE</option>
<option value="@{strength_mod}+" data-i18n="strength-u">STRENGTH</option>
<option value="@{dexterity_mod}+" data-i18n="dexterity-u">DEXTERITY</option>
<option value="@{constitution_mod}+" data-i18n="constitution-u">CONSTITUTION</option>
<option value="@{intelligence_mod}+" data-i18n="intelligence-u">INTELLIGENCE</option>
<option value="@{wisdom_mod}+" data-i18n="wisdom-u">WISDOM</option>
<option value="@{charisma_mod}+" data-i18n="charisma-u">CHARISMA</option>
</select>
<span class="label" data-i18n="spell-ability-u">SPELLCASTING ABILITY</span>
</div>
<div class="part">
<span class="display" name="attr_spell_save_dc"></span>
<span class="label" data-i18n="spell-save-dc-u">SPELL SAVE DC</span>
</div>
<div class="part">
<span class="display" name="attr_spell_attack_bonus"></span>
<span class="label" data-i18n="spell-atk-bonus-u">SPELL ATTACK BONUS</span>
</div>
</div>
</div>
<input type="hidden" class="spellicon_flag" name="attr_spellicon_flag" value="all">
<div class="body">
<div class="col col1">
<div class="spell-level">
<div class="level">
<span class="label">0</span>
</div>
<div class="cantrips">
<span class="label" data-i18n="cantrips-u">CANTRIPS</span>
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-cantrip">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="Abjuration" data-i18n="abjuration">Abjuration</option>
<option value="Conjuration" data-i18n="conjuration">Conjuration</option>
<option value="Divination" data-i18n="divination">Divination</option>
<option value="Enchantment" data-i18n="enchantment">Enchantment</option>
<option value="Evocation" data-i18n="evocation">Evocation</option>
<option value="Illusion" data-i18n="illusion">Illusion</option>
<option value="Necromancy" data-i18n="necromancy">Necromancy</option>
<option value="Transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="cantrip-progression:-u">CANTRIP PROGRESSION</span>
<select name="attr_spell_damage_progression">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Cantrip Dice" data-i18n="cantrip-dice-u">CANTRIP DICE</option>
<option value="Cantrip Beam" data-i18n="cantrip-beam-u">CANTRIP BEAM</option>
</select>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="cantrip">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
<span class="spell-labels">
<span data-i18n="slots_total-u" style="margin-right: 45px;">SLOTS TOTAL</span>
<span data-i18n="slots_remaining-u">SLOTS REMAINING</span>
</span>
<div class="spell-level">
<div class="level">
<span class="label">1</span>
</div>
<div class="total">
<span name="attr_lvl1_slots_total"></span>
</div>
<div class="expended">
<input type="number" name="attr_lvl1_slots_expended" value="0">
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-1">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="1">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared" value="1"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
<div class="spell-level">
<div class="level">
<span class="label">2</span>
</div>
<div class="total">
<span name="attr_lvl2_slots_total"></span>
</div>
<div class="expended">
<input type="number" name="attr_lvl2_slots_expended" value="0">
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-2">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="2">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared" value="1"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
</div>
<div class="col col2">
<div class="spell-level">
<div class="level">
<span class="label">3</span>
</div>
<div class="total">
<span name="attr_lvl3_slots_total"></span>
</div>
<div class="expended">
<input type="number" name="attr_lvl3_slots_expended" value="0">
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-3">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="3">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared" value="1"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
<div class="spell-level">
<div class="level">
<span class="label">4</span>
</div>
<div class="total">
<span name="attr_lvl4_slots_total"></span>
</div>
<div class="expended">
<input type="number" name="attr_lvl4_slots_expended" value="0">
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-4">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="4">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared" value="1"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
<div class="spell-level">
<div class="level">
<span class="label">5</span>
</div>
<div class="total">
<span name="attr_lvl5_slots_total"></span>
</div>
<div class="expended">
<input type="number" name="attr_lvl5_slots_expended" value="0">
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-5">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="5">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared" value="1"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
</div>
<div class="col col3">
<div class="spell-level">
<div class="level">
<span class="label">6</span>
</div>
<div class="total">
<span name="attr_lvl6_slots_total"></span>
</div>
<div class="expended">
<input type="number" name="attr_lvl6_slots_expended" value="0">
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-6">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="6">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared" value="1"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
<div class="spell-level">
<div class="level">
<span class="label">7</span>
</div>
<div class="total">
<span name="attr_lvl7_slots_total"></span>
</div>
<div class="expended">
<input type="number" name="attr_lvl7_slots_expended" value="0">
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-7">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="7">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared" value="1"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
<div class="spell-level">
<div class="level">
<span class="label">8</span>
</div>
<div class="total">
<span name="attr_lvl8_slots_total"></span>
</div>
<div class="expended">
<input type="number" name="attr_lvl8_slots_expended" value="0">
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-8">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="innate:-u">INNATE:</span>
<input type="text" name="attr_innate" placeholder="1/day" value="">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="8">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} {{innate=@{innate}}} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared" value="1"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
<input class="innate_flag" type="hidden" name="attr_innate" value="">
<span class="innate" name="attr_innate"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
<div class="spell-level">
<div class="level">
<span class="label">9</span>
</div>
<div class="total">
<span name="attr_lvl9_slots_total"></span>
</div>
<div class="expended">
<input type="number" name="attr_lvl9_slots_expended" value="0">
</div>
</div>
<div class="spell-container">
<fieldset class="repeating_spell-9">
<div class="spell">
<input class="options-flag" type="checkbox" name="attr_options-flag" checked="checked"><span>y</span>
<div class="options">
<div class="row">
<span data-i18n="name:-u">NAME:</span>
<input type="text" name="attr_spellname">
<input type="checkbox" name="attr_spellprepared" value="1" checked="checked">
<span data-i18n="prep-u">PREP</span>
</div>
<div class="row">
<span data-i18n="school:-u">SCHOOL:</span>
<select name="attr_spellschool">
<option value="abjuration" data-i18n="abjuration">Abjuration</option>
<option value="conjuration" data-i18n="conjuration">Conjuration</option>
<option value="divination" data-i18n="divination">Divination</option>
<option value="enchantment" data-i18n="enchantment">Enchantment</option>
<option value="evocation" data-i18n="evocation">Evocation</option>
<option value="illusion" data-i18n="illusion">Illusion</option>
<option value="necromancy" data-i18n="necromancy">Necromancy</option>
<option value="transmutation" data-i18n="transmutation">Transmutation</option>
</select>
<input type="checkbox" name="attr_spellritual" value="{{ritual=1}}">
<span data-i18n="ritual-u">RITUAL</span>
</div>
<div class="row">
<span data-i18n="casting-time:-u">CASTING TIME:</span>
<input type="text" name="attr_spellcastingtime">
</div>
<div class="row">
<span data-i18n="range:-u">RANGE:</span>
<input type="text" name="attr_spellrange">
</div>
<div class="row">
<span data-i18n="target:-u">TARGET:</span>
<input type="text" name="attr_spelltarget">
</div>
<input type="hidden" name="attr_spellcomp">
<div class="row">
<span data-i18n="components:-u">COMPONENTS:</span>
<input type="checkbox" name="attr_spellcomp_v" value="{{v=1}}" checked="checked">
<span data-i18n="spell-component-verbal">V</span>
<input type="checkbox" name="attr_spellcomp_s" value="{{s=1}}" checked="checked">
<span data-i18n="spell-component-somatic">S</span>
<input type="checkbox" name="attr_spellcomp_m" value="{{m=1}}" checked="checked">
<span data-i18n="spell-component-material">M</span>
<input type="text" name="attr_spellcomp_materials" placeholder="ruby dust worth 50gp" data-i18n-placeholder="ruby-dust-place">
</div>
<div class="row">
<input type="checkbox" name="attr_spellconcentration" value="{{concentration=1}}">
<span data-i18n="concentration-u">CONCENTRATION</span>
</div>
<div class="row">
<span data-i18n="duration:-u">DURATION:</span>
<input type="text" name="attr_spellduration">
</div>
<div class="row">
<span data-i18n="output:-u">OUTPUT:</span>
<select name="attr_spelloutput">
<option value="SPELLCARD" data-i18n="spellcard-u">SPELLCARD</option>
<option value="ATTACK" data-i18n="attack-u">ATTACK</option>
</select>
</div>
<input type="hidden" class="spellattackinfoflag" name="attr_spelloutput">
<div class="spellattackinfo">
<div class="row">
<span data-i18n="spell-atk:-u">SPELL ATTACK:</span>
<select name="attr_spellattack">
<option value="None" data-i18n="none">None</option>
<option value="Melee" data-i18n="melee">Melee</option>
<option value="Ranged" data-i18n="ranged">Ranged</option>
</select>
</div>
<div class="row">
<span data-i18n="damage:-u">DAMAGE:</span>
<input type="text" name="attr_spelldamage" style="width: 50px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="damage2:-u">DAMAGE2:</span>
<input type="text" name="attr_spelldamage2" style="width: 45px;">
<span data-i18n="type:-u">TYPE:</span>
<input type="text" name="attr_spelldamagetype2" style="width: 103px;">
</div>
<div class="row">
<span data-i18n="healing:-u">HEALING:</span>
<input type="text" name="attr_spellhealing" style="width: 45px;">
</div>
<div class="row">
<input type="checkbox" name="attr_spelldmgmod" value="Yes">
<span data-i18n="add-ability-mod-u">ADD ABILITY MOD TO DAMAGE OR HEALING</span>
</div>
<div class="row">
<span data-i18n="saving-throw:-u">SAVING THROW:</span>
<select name="attr_spellsave">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span data-i18n="effect:-u">EFFECT:</span>
<input type="text" name="attr_spellsavesuccess" style="width: 78px;" placeholder="Half damage" data-i18n-placeholder="half-dmg-place">
</div>
<div class="row">
<span data-i18n="at-higher-lvl-dmg:-u">HIGHER LVL CAST DMG:</span>
<input type="text" name="attr_spellhldie" placeholder="1" style="width: 15px; text-align: right;">
<select name="attr_spellhldietype">
<option value="" selected="selected" data-i18n="none-u">NONE</option>
<option value="d4">d4</option>
<option value="d6">d6</option>
<option value="d8">d8</option>
<option value="d10">d10</option>
<option value="d12">d12</option>
<option value="d20">d20</option>
</select>
<span>+</span>
<input type="text" name="attr_spellhlbonus" placeholder="0" style="width: 15px; text-align: center;">
</div>
<div class="row">
<span data-i18n="include_spell_desc:-u">INCLUDE SPELL DESCRIPTION IN ATTACK:</span>
<select name="attr_includedesc">
<option value="off" selected="selected" data-i18n="off">Off</option>
<option value="partial" data-i18n="partial">Partial</option>
<option value="on" data-i18n="on">On</option>
</select>
</div>
</div>
<div class="row">
<span data-i18n="description:-u">DESCRIPTION:</span>
</div>
<div class="row">
<textarea name="attr_spelldescription"></textarea>
</div>
<div class="row">
<span data-i18n="at-higher-lvl:-u">AT HIGHER LEVELS:</span>
</div>
<div class="row">
<textarea name="attr_spellathigherlevels" style="height: 36px; min-height: 36px;"></textarea>
</div>
<input type="hidden" name="attr_spellattackid">
<input type="hidden" name="attr_spelllevel" value="9">
</div>
<div class="display">
<input type="hidden" name="attr_rollcontent" value="@{wtype}&{template:spell} {{level=@{spellschool} @{spelllevel}}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} @{spellconcentration} @{charname_output}">
<button class="spellcard" type="roll" name="roll_spell" value="@{rollcontent}">
<input type="hidden" name="attr_spellprepared" value="1"><span class="prep"></span>
<span class="spellname" name="attr_spellname"></span>
</button>
<input type="hidden" class="spellritual" name="attr_spellritual" value="0">
<input type="hidden" class="spellconcentration" name="attr_spellconcentration" value="0">
<input type="hidden" class="v" name="attr_spellcomp_v" value="{{v=1}}">
<input type="hidden" class="s" name="attr_spellcomp_s" value="{{s=1}}">
<input type="hidden" class="m" name="attr_spellcomp_m" value="{{m=1}}">
<span class="spellritual" data-i18n="spell-ritual">R</span>
<span class="spellconcentration" data-i18n="spell-concentration">C</span>
<span class="componentscontainer">
<span class="v" data-i18n="spell-component-verbal">V</span>
<span class="s" data-i18n="spell-component-somatic">S</span>
<span class="m" data-i18n="spell-component-material">M</span>
</span>
</div>
</div>
</fieldset>
</div>
</div>
</div>
</div>
<div class="page options">
<div class="header">
<div class="name-container">
<img src="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/5th%20Edition%20OGL%20by%20Roll20/images/srd5_360.png" style="padding-bottom: 5px;">
<input type="text" name="attr_character_name" style="width: 100%;">
<span class="label" data-i18n="char-name-u">CHARACTER NAME</span>
</div>
<div class="header-info">
<div class="top">
<div class="hlabel-container">
<input class="flag" type="hidden" name="attr_custom_class" value="0">
<input class="showing" type="text" name="attr_cust_class" value="@{cust_classname}" disabled="true" style="width: 64px; height: 28px; padding-top: 10px;">
<select class="hiding class" name="attr_class">
<option value="" data-i18n="choose">Choose</option>
<option value="Barbarian" data-i18n="barbarian">Barbarian</option>
<option value="Bard" data-i18n="bard">Bard</option>
<option value="Cleric" data-i18n="cleric">Cleric</option>
<option value="Druid" data-i18n="druid">Druid</option>
<option value="Fighter" data-i18n="fighter">Fighter</option>
<option value="Monk" data-i18n="monk">Monk</option>
<option value="Paladin" data-i18n="paladin">Paladin</option>
<option value="Ranger" data-i18n="ranger">Ranger</option>
<option value="Rogue" data-i18n="rogue">Rogue</option>
<option value="Sorcerer" data-i18n="sorcerer">Sorcerer</option>
<option value="Warlock" data-i18n="warlock">Warlock</option>
<option value="Wizard" data-i18n="wizard">Wizard</option>
</select>
<input type="number" class="class-level" name="attr_base_level" value="1">
<span class="label" data-i18n="class-level-u">CLASS & LEVEL</span>
</div>
<div class="hlabel-container multiclass-container">
<input class="flag" type="hidden" name="attr_multiclass1_flag" value="0">
<span class="hiding multiclass-display"></span>
<span class="hiding multiclass-display-level"></span>
<span class="showing multiclass-display" name="attr_multiclass1" data-i18n-dynamic></span>
<span class="showing multiclass-display-level" name="attr_multiclass1_lvl"></span>
</div>
<div class="hlabel-container multiclass-container">
<input class="flag" type="hidden" name="attr_multiclass2_flag" value="0">
<span class="hiding multiclass-display"></span>
<span class="hiding multiclass-display-level"></span>
<span class="showing multiclass-display" name="attr_multiclass2" data-i18n-dynamic></span>
<span class="showing multiclass-display-level" name="attr_multiclass2_lvl"></span>
</div>
<div class="hlabel-container multiclass-container">
<input class="flag" type="hidden" name="attr_multiclass3_flag" value="0">
<span class="hiding multiclass-display"></span>
<span class="hiding multiclass-display-level"></span>
<span class="showing multiclass-display" name="attr_multiclass3" data-i18n-dynamic></span>
<span class="showing multiclass-display-level" name="attr_multiclass3_lvl"></span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_background" style="width: 122px;">
<span class="label" data-i18n="background-u">BACKGROUND</span>
</div>
</div>
<div class="bottom">
<div class="hlabel-container">
<input type="text" name="attr_race">
<span class="label" data-i18n="race-u">RACE</span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_alignment">
<span class="label" data-i18n="alignment-u">ALIGNMENT</span>
</div>
<div class="hlabel-container">
<input type="text" name="attr_experience">
<span class="label" data-i18n="exp-pts-u">EXPERIENCE POINTS</span>
</div>
</div>
</div>
</div>
<div class="body">
<div class="col col1">
<div class="class_options">
<div class="row">
<span data-i18n="hit-die:-u">HIT DIE:</span>
<select name="attr_hitdietype">
<option value="4">D4</option>
<option value="6">D6</option>
<option value="8">D8</option>
<option value="10">D10</option>
<option value="12">D12</option>
</select>
</div>
<div class="row">
<span data-i18n="carrying-capacity-mod:-u">CARRYING CAPACITY MODIFIER:</span>
<input type="text" class="num" name="attr_carrying_capacity_mod" placeholder="*2">
</div>
<div class="row">
<span data-i18n="glob-atk-mod:-u">GLOBAL MAGIC ATTACK MODIFIER:</span>
<input type="text" class="num" name="attr_globalmagicmod" placeholder="0" value="0">
</div>
<div class="row">
<span data-i18n="magic-caster-lvl:-u">MAGIC CASTER LEVEL:</span>
<input type="text" class="num" name="attr_caster_level">
</div>
<div class="row">
<span data-i18n="spell_dc_mod:-u">SPELL SAVE DC MOD:</span>
<input type="text" class="num" name="attr_spell_dc_mod" placeholde="0" value="0">
</div>
<div class="row">
<span data-i18n="spell-icons:-u">SPELL ICONS:</span>
<select name="attr_spellicon_flag">
<option value="all" data-i18n="show_all">Show All</option>
<option value="cp" data-i18n="cr_only">C&R Only</option>
<option value="none" data-i18n="none">None</option>
</select>
</div>
<div class="row">
<input type="checkbox" name="attr_halflingluck_flag" value="1">
<span data-i18n="halfling-luck-u">HALFLING LUCK</span>
</div>
<div class="row">
<input type="checkbox" name="attr_arcane_fighter" value="1">
<span data-i18n="arcane-fighter-u">ARCANE FIGHTER</span>
</div>
<div class="row">
<input type="checkbox" name="attr_arcane_rogue" value="1">
<span data-i18n="arcane-rogue-u">ARCANE ROGUE</span>
</div>
<div class="row title">
<span data-i18n="class-options-u">CLASS OPTIONS (<span name="attr_class" data-i18n-dynamic></span>)</span>
</div>
</div>
<div class="class_options">
<div class="row">
<input type="checkbox" name="attr_multiclass1_flag" value="1">
<span data-i18n="2nd-class:-u">2ND CLASS:</span>
<select name="attr_multiclass1" style="width: 64px;">
<option value="barbarian" data-i18n="barbarian">Barbarian</option>
<option value="bard" data-i18n="bard">Bard</option>
<option value="cleric" data-i18n="cleric">Cleric</option>
<option value="druid" data-i18n="druid">Druid</option>
<option value="fighter" data-i18n="fighter">Fighter</option>
<option value="monk" data-i18n="monk">Monk</option>
<option value="paladin" data-i18n="paladin">Paladin</option>
<option value="ranger" data-i18n="ranger">Ranger</option>
<option value="rogue" data-i18n="rogue">Rogue</option>
<option value="sorcerer" data-i18n="sorcerer">Sorcerer</option>
<option value="warlock" data-i18n="warlock">Warlock</option>
<option value="wizard" data-i18n="wizard">Wizard</option>
</select>
<span data-i18n="lvl:-u">LEVEL:</span>
<input type="text" name="attr_multiclass1_lvl" value="1" style="width: 28px; text-align: center;">
</div>
<div class="row">
<input type="checkbox" name="attr_multiclass2_flag" value="1">
<span data-i18n="3rd-class:-u">3RD CLASS:</span>
<select name="attr_multiclass2" style="width: 64px;">
<option value="barbarian" data-i18n="barbarian">Barbarian</option>
<option value="bard" data-i18n="bard">Bard</option>
<option value="cleric" data-i18n="cleric">Cleric</option>
<option value="druid" data-i18n="druid">Druid</option>
<option value="fighter" data-i18n="fighter">Fighter</option>
<option value="monk" data-i18n="monk">Monk</option>
<option value="paladin" data-i18n="paladin">Paladin</option>
<option value="ranger" data-i18n="ranger">Ranger</option>
<option value="rogue" data-i18n="rogue">Rogue</option>
<option value="sorcerer" data-i18n="sorcerer">Sorcerer</option>
<option value="warlock" data-i18n="warlock">Warlock</option>
<option value="wizard" data-i18n="wizard">Wizard</option>
</select>
<span data-i18n="lvl:-u">LEVEL:</span>
<input type="text" name="attr_multiclass2_lvl" value="1" style="width: 28px; text-align: center;">
</div>
<div class="row">
<input type="checkbox" name="attr_multiclass3_flag" value="1">
<span data-i18n="4th-class:-u">4TH CLASS:</span>
<select name="attr_multiclass3" style="width: 64px;">
<option value="barbarian" data-i18n="barbarian">Barbarian</option>
<option value="bard" data-i18n="bard">Bard</option>
<option value="cleric" data-i18n="cleric">Cleric</option>
<option value="druid" data-i18n="druid">Druid</option>
<option value="fighter" data-i18n="fighter">Fighter</option>
<option value="monk" data-i18n="monk">Monk</option>
<option value="paladin" data-i18n="paladin">Paladin</option>
<option value="ranger" data-i18n="ranger">Ranger</option>
<option value="rogue" data-i18n="rogue">Rogue</option>
<option value="sorcerer" data-i18n="sorcerer">Sorcerer</option>
<option value="warlock" data-i18n="warlock">Warlock</option>
<option value="wizard" data-i18n="wizard">Wizard</option>
</select>
<span data-i18n="lvl:-u">LEVEL:</span>
<input type="text" name="attr_multiclass3_lvl" value="1" style="width: 28px; text-align: center;">
</div>
<div class="row title">
<span data-i18n="mutliclass-opts-u">MULTICLASS OPTIONS</span>
</div>
</div>
<div class="class_options">
<div class="row">
<input type="checkbox" name="attr_custom_class" value="1">
<span data-i18n="use-cust-class-u">USE CUSTOM CLASS</span>
</div>
<div class="row">
<span data-i18n="class-name:-u">CLASS NAME:</span>
<input type="text" name="attr_cust_classname">
</div>
<div class="row">
<span data-i18n="hit-die:-u">HIT DIE:</span>
<select name="attr_cust_hitdietype">
<option value="4">D4</option>
<option value="6">D6</option>
<option value="8">D8</option>
<option value="10">D10</option>
<option value="12">D12</option>
</select>
</div>
<div class="row">
<span data-i18n="spellcasting-ability:-u">SPELLCASTING ABILITY:</span>
<select name="attr_cust_spellcasting_ability">
<option value="0*" data-i18n="none-u">NONE</option>
<option value="@{strength_mod}+" data-i18n="strength-u">STRENGTH</option>
<option value="@{dexterity_mod}+" data-i18n="dexterity-u">DEXTERITY</option>
<option value="@{constitution_mod}+" data-i18n="constitution-u">CONSTITUTION</option>
<option value="@{intelligence_mod}+" data-i18n="intelligence-u">INTELLIGENCE</option>
<option value="@{wisdom_mod}+" data-i18n="wisdom-u">WISDOM</option>
<option value="@{charisma_mod}+" data-i18n="charisma-u">CHARISMA</option>
</select>
</div>
<div class="row">
<span data-i18n="spell-slots:-u">SPELL SLOTS:</span>
<select name="attr_cust_spellslots">
<option value="none" data-i18n="none-u">NONE</option>
<option value="full" data-i18n="spell-full-u">FULL (Cleric, Druid, Wizard)</option>
<option value="half" data-i18n="spell-half-u">HALF (Paladin, Ranger)</option>
<option value="third" data-i18n="spell-third-u">THIRD (Arcane Fighter/Rogue)</option>
</select>
</div>
<div class="row">
<span data-i18n="saves-u">SAVES</span>
</div>
<div class="row">
<input type="checkbox" name="attr_cust_strength_save_prof" value="(@{pb})">
<span data-i18n="strength">Strength</span>
</div>
<div class="row">
<input type="checkbox" name="attr_cust_dexterity_save_prof" value="(@{pb})">
<span data-i18n="dexterity">Dexterity</span>
</div>
<div class="row">
<input type="checkbox" name="attr_cust_constitution_save_prof" value="(@{pb})">
<span data-i18n="constitution">Constitution</span>
</div>
<div class="row">
<input type="checkbox" name="attr_cust_intelligence_save_prof" value="(@{pb})">
<span data-i18n="intelligence">Intelligence</span>
</div>
<div class="row">
<input type="checkbox" name="attr_cust_wisdom_save_prof" value="(@{pb})">
<span data-i18n="wisdom">Wisdom</span>
</div>
<div class="row">
<input type="checkbox" name="attr_cust_charisma_save_prof" value="(@{pb})">
<span data-i18n="charisma">Charisma</span>
</div>
<div class="row title">
<span data-i18n="cust-class-opts">CUSTOM CLASS OPTIONS</span>
</div>
</div>
<div class="class_options spell_slot_mods">
<div class="column">
<div class="row">
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">1 +</span>
<input type="text" class="num" name="attr_lvl1_slots_mod" value="0" placeholder="0" title="@{lvl1_slots_mod}">
</div>
<div class="row">
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">2 +</span>
<input type="text" class="num" name="attr_lvl2_slots_mod" value="0" placeholder="0" title="@{lvl2_slots_mod}">
</div>
<div class="row">
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">3 +</span>
<input type="text" class="num" name="attr_lvl3_slots_mod" value="0" placeholder="0" title="@{lvl3_slots_mod}">
</div>
</div>
<div class="column">
<div class="row">
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">4 +</span>
<input type="text" class="num" name="attr_lvl4_slots_mod" value="0" placeholder="0" title="@{lvl4_slots_mod}">
</div>
<div class="row">
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">5 +</span>
<input type="text" class="num" name="attr_lvl5_slots_mod" value="0" placeholder="0" title="@{lvl5_slots_mod}">
</div>
<div class="row">
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">6 +</span>
<input type="text" class="num" name="attr_lvl6_slots_mod" value="0" placeholder="0" title="@{lvl6_slots_mod}">
</div>
</div>
<div class="column">
<div class="row">
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">7 +</span>
<input type="text" class="num" name="attr_lvl7_slots_mod" value="0" placeholder="0" title="@{lvl7_slots_mod}">
</div>
<div class="row">
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">8 +</span>
<input type="text" class="num" name="attr_lvl8_slots_mod" value="0" placeholder="0" title="@{lvl8_slots_mod}">
</div>
<div class="row">
<span data-i18n="lvl-u">LEVEL</span><span class="num_plus">9 +</span>
<input type="text" class="num" name="attr_lvl9_slots_mod" value="0" placeholder="0" title="@{lvl9_slots_mod}">
</div>
</div>
<div class="row title">
<span data-i18n="spell_slot_modifiers-u">SPELL SLOT MODIFIERS</span>
</div>
</div>
</div>
<div class="col col2">
<div class="attribute_options" style="width: 234px;">
<div class="row skill">
<span data-i18n="strength-u">STRENGTH</span>
<span>+</span><input type="text" class="num" name="attr_strength_bonus" value="0" placeholder="0" title="@{strength_bonus}">
</div>
<div class="row skill">
<span data-i18n="dexterity-u">DEXTERITY</span>
<span>+</span><input type="text" class="num" name="attr_dexterity_bonus" value="0" placeholder="0" title="@{dexterity_bonus}">
</div>
<div class="row skill">
<span data-i18n="constitution-u">CONSTITUTION</span>
<span>+</span><input type="text" class="num" name="attr_constitution_bonus" value="0" placeholder="0" title="@{constitution_bonus}">
</div>
<div class="row skill">
<span data-i18n="intelligence-u">INTELLIGENCE</span>
<span>+</span><input type="text" class="num" name="attr_intelligence_bonus" value="0" placeholder="0" title="@{intelligence_bonus}">
</div>
<div class="row skill">
<span data-i18n="wisdom-u">WISDOM</span>
<span>+</span><input type="text" class="num" name="attr_wisdom_bonus" value="0" placeholder="0" title="@{wisdom_bonus}">
</div>
<div class="row skill">
<span data-i18n="charisma-u">CHARISMA</span>
<span>+</span><input type="text" class="num" name="attr_charisma_bonus" value="0" placeholder="0" title="@{charisma_bonus}">
</div>
<div class="row">
<span data-i18n="initiative-mod:-u">INITIATIVE MODIFIER:</span>
<input type="text" class="num" name="attr_initmod" placeholder="0" value="0">
</div>
<div class="row">
<span data-i18n="initiative-style:-u">INITIATIVE STYLE:</span>
<select name="attr_initiative_style">
<option value="@{d20}" selected="selected" data-i18n="norm">Normal</option>
<option value="{@{d20},@{d20}}kh1" data-i18n="adv">Advantage</option>
<option value="{@{d20},@{d20}}kl1" data-i18n="disadv">Disadvantage</option>
<!-- <option value="?{Advantage?|Normal Roll,&#64;&#123;d20&#125;|Advantage,&#123;&#64;&#123;d20&#125;&#44;&#64;&#123;d20&#125;&#125;kh1|Disadvantage,&#123;&#64;&#123;d20&#125;&#44;&#64;&#123;d20&#125;&#125;kl1}" data-i18n="query-roll-adv">Query Advantage</option> -->
</select>
</div>
<div class="row">
<input type="checkbox" name="attr_init_tiebreaker" value="@{dexterity}/100">
<span data-i18n="add-dex-tiebreaker-u">ADD DEX TIEBREAKER TO INITIATIVE</span>
</div>
<div class="row">
<span data-i18n="glob-ac-mod:-u">GLOBAL ARMOR CLASS MODIFIER:</span>
<input type="text" class="num" name="attr_globalacmod" placeholder="0" value="0">
</div>
<div class="row">
<span data-i18n="armor-class-tracking:-u">ARMOR CLASS TRACKING:</span>
<select name="attr_custom_ac_flag">
<option value="0" selected="selected" data-i18n="automatic">Automatic</option>
<option value="1" data-i18n="custom">Custom</option>
<option value="2" data-i18n="off">Off</option>
</select>
</div>
<input class="toggleflag" type="hidden" name="attr_custom_ac_flag">
<div class="row hidden">
<span data-i18n="custom_ac:-u">CUSTOM AC:</span>
<input type="text" class="num" name="attr_custom_ac_base" placeholde="10" value="10">
<span>+</span>
<select name="attr_custom_ac_part1">
<option value="none" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
<span>+</span>
<select name="attr_custom_ac_part2">
<option value="none" selected="selected" data-i18n="none-u">NONE</option>
<option value="Strength" data-i18n="str-u">STR</option>
<option value="Dexterity" data-i18n="dex-u">DEX</option>
<option value="Constitution" data-i18n="con-u">CON</option>
<option value="Intelligence" data-i18n="int-u">INT</option>
<option value="Wisdom" data-i18n="wis-u">WIS</option>
<option value="Charisma" data-i18n="cha-u">CHA</option>
</select>
</div>
<div class="row title">
<span data-i18n="attribute-opts-u">ATTRIBUTE OPTIONS</span>
</div>
</div>
<div class="save_options" style="width: 234px;">
<div class="row skill">
<span data-i18n="strength-save-u">Strength Save</span>
<span>+</span><input type="text" class="num" name="attr_strength_save_mod" value="0" placeholder="0" title="@{strength_save_mod}">
</div>
<div class="row skill">
<span data-i18n="dexterity-save-u">Dexterity Save</span>
<span>+</span><input type="text" class="num" name="attr_dexterity_save_mod" value="0" placeholder="0" title="@{dexterity_save_mod}">
</div>
<div class="row skill">
<span data-i18n="constitution-save-u">Constitution Save</span>
<span>+</span><input type="text" class="num" name="attr_constitution_save_mod" value="0" placeholder="0" title="@{constitution_save_mod}">
</div>
<div class="row skill">
<span data-i18n="intelligence-save-u">Intelligence Save</span>
<span>+</span><input type="text" class="num" name="attr_intelligence_save_mod" value="0" placeholder="0" title="@{intelligence_save_mod}">
</div>
<div class="row skill">
<span data-i18n="wisdom-save-u">Wisdom Save</span>
<span>+</span><input type="text" class="num" name="attr_wisdom_save_mod" value="0" placeholder="0" title="@{wisdom_save_mod}">
</div>
<div class="row skill">
<span data-i18n="charisma-save-u">Charisma Save</span>
<span>+</span><input type="text" class="num" name="attr_charisma_save_mod" value="0" placeholder="0" title="@{charisma_save_mod}">
</div>
<div class="row">
<span data-i18n="death-save-mod:-u">DEATH SAVE MODIFIER:</span>
<input type="text" class="num" name="attr_death_save_mod" placeholder="0" value="0">
</div>
<div class="row">
<span data-i18n="glob-saving-mod:-u">GLOBAL SAVING THROW MODIFIER:</span>
<input type="text" class="num" name="attr_globalsavemod" placeholder="0" value="0">
</div>
<div class="row title">
<span data-i18n="save-opts-u">SAVE OPTIONS</span>
</div>
</div>
<div class="skill_options" style="width: 234px;">
<div data-i18n-list="skills-list">
<div class="row skill" data-i18n-list-item="acrobatics">
<select name="attr_acrobatics_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="acrobatics-core">Acrobatics <span>(Dex)</span></span>
<span>+</span><input type="text" class="num" name="attr_acrobatics_flat" value="0" placeholder="0" title="@{acrobatics_flat}">
</div>
<div class="row skill" data-i18n-list-item="animal_handling">
<select name="attr_animal_handling_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="animal_handling-core">Animal Handling <span>(Wis)</span></span>
<span>+</span><input type="text" class="num" name="attr_animal_handling_flat" value="0" placeholder="0" title="@{animal_handling_flat}">
</div>
<div class="row skill" data-i18n-list-item="arcana">
<select name="attr_arcana_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="arcana-core">Arcana <span>(Int)</span></span>
<span>+</span><input type="text" class="num" name="attr_arcana_flat" value="0" placeholder="0" title="@{arcana_flat}">
</div>
<div class="row skill" data-i18n-list-item="athletics">
<select name="attr_athletics_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="athletics-core">Athletics <span>(Str)</span></span>
<span>+</span><input type="text" class="num" name="attr_athletics_flat" value="0" placeholder="0" title="@{athletics_flat}">
</div>
<div class="row skill" data-i18n-list-item="deception">
<select name="attr_deception_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="deception-core">Deception <span>(Cha)</span></span>
<span>+</span><input type="text" class="num" name="attr_deception_flat" value="0" placeholder="0" title="@{deception_flat}">
</div>
<div class="row skill" data-i18n-list-item="history">
<select name="attr_history_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="history-core">History <span>(Int)</span></span>
<span>+</span><input type="text" class="num" name="attr_history_flat" value="0" placeholder="0" title="@{history_flat}">
</div>
<div class="row skill" data-i18n-list-item="insight">
<select name="attr_insight_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="insight-core">Insight <span>(Wis)</span></span>
<span>+</span><input type="text" class="num" name="attr_insight_flat" value="0" placeholder="0" title="@{insight_flat}">
</div>
<div class="row skill" data-i18n-list-item="intimidation">
<select name="attr_intimidation_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="intimidation-core">Intimidation <span>(Cha)</span></span>
<span>+</span><input type="text" class="num" name="attr_intimidation_flat" value="0" placeholder="0" title="@{intimidation_flat}">
</div>
<div class="row skill" data-i18n-list-item="investigation">
<select name="attr_investigation_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="investigation-core">Investigation <span>(Int)</span></span>
<span>+</span><input type="text" class="num" name="attr_investigation_flat" value="0" placeholder="0" title="@{investigation_flat}">
</div>
<div class="row skill" data-i18n-list-item="medicine">
<select name="attr_medicine_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="medicine-core">Medicine <span>(Wis)</span></span>
<span>+</span><input type="text" class="num" name="attr_medicine_flat" value="0" placeholder="0" title="@{medicine_flat}">
</div>
<div class="row skill" data-i18n-list-item="nature">
<select name="attr_nature_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="nature-core">Nature <span>(Int)</span></span>
<span>+</span><input type="text" class="num" name="attr_nature_flat" value="0" placeholder="0" title="@{nature_flat}">
</div>
<div class="row skill" data-i18n-list-item="perception">
<select name="attr_perception_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="perception-core">Perception <span>(Wis)</span></span>
<span>+</span><input type="text" class="num" name="attr_perception_flat" value="0" placeholder="0" title="@{perception_flat}">
</div>
<div class="row skill" data-i18n-list-item="performance">
<select name="attr_performance_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="performance-core">Performance <span>(Cha)</span></span>
<span>+</span><input type="text" class="num" name="attr_performance_flat" value="0" placeholder="0" title="@{performance_flat}">
</div>
<div class="row skill" data-i18n-list-item="persuasion">
<select name="attr_persuasion_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="persuasion-core">Persuasion <span>(Cha)</span></span>
<span>+</span><input type="text" class="num" name="attr_persuasion_flat" value="0" placeholder="0" title="@{persuasion_flat}">
</div>
<div class="row skill" data-i18n-list-item="religion">
<select name="attr_religion_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="religion-core">Religion <span>(Int)</span></span>
<span>+</span><input type="text" class="num" name="attr_religion_flat" value="0" placeholder="0" title="@{religion_flat}">
</div>
<div class="row skill" data-i18n-list-item="sleight_of_hand">
<select name="attr_sleight_of_hand_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="sleight_of_hand-core">Sleight of Hand <span>(Dex)</span></span>
<span>+</span><input type="text" class="num" name="attr_sleight_of_hand_flat" value="0" placeholder="0" title="@{sleight_of_hand_flat}">
</div>
<div class="row skill" data-i18n-list-item="stealth">
<select name="attr_stealth_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="stealth-core">Stealth <span>(Dex)</span></span>
<span>+</span><input type="text" class="num" name="attr_stealth_flat" value="0" placeholder="0" title="@{stealth_flat}">
</div>
<div class="row skill" data-i18n-list-item="survival">
<select name="attr_survival_type"><option value="1" selected="selected" data-i18n="normal">Normal</option><option value="2" data-i18n="expirtise">Expertise</option></select>
<span data-i18n="survival-core">Survival <span>(Wis)</span></span>
<span>+</span><input type="text" class="num" name="attr_survival_flat" value="0" placeholder="0" title="@{survival_flat}">
</div>
</div>
<div class="row" style="margin-top:10px;">
<input type="checkbox" name="attr_jack_of_all_trades" value="@{jack}">
<span data-i18n="jack-of-all-u">JACK OF ALL TRADES</span>
</div>
<div class="row">
<span data-i18n="pass-perc-mod:-u">PASSIVE PERCEPTION MODIFIER:</span>
<input type="text" class="num" name="attr_passiveperceptionmod" placeholder="0" value="0">
</div>
<div class="row title">
<span data-i18n="skill-opts-u">SKILL OPTIONS</span>
</div>
</div>
</div>
<div class="col col3">
<div class="general_options">
<div class="version">
<span data-i18n="version">v</span>
<input type="text" name="attr_version" value="2.0">
</div>
<div class="row">
<input type="checkbox" name="attr_npc" value="1">
<span data-i18n="npc-u">NPC</span>
</div>
<div class="row">
<span data-i18n="roll-queries:-u">ROLL QUERIES:</span>
<select name="attr_rtype">
<option value="{{always=1}} {{r2=[[@{d20}" data-i18n="always-roll-adv">Always Roll Advantage</option>
<option value="@{advantagetoggle}" data-i18n="toggle-roll-adv">Advantage Toggle</option>
<option value="{{query=1}} ?{Advantage?|Normal Roll,&#123&#123normal=1&#125&#125 &#123&#123r2=[[0d20|Advantage,&#123&#123advantage=1&#125&#125 &#123&#123r2=[[@{d20}|Disadvantage,&#123&#123disadvantage=1&#125&#125 &#123&#123r2=[[@{d20}}" data-i18n="query-roll-adv">Query Advantage</option>
<option value="{{normal=1}} {{r2=[[0d20" data-i18n="never-roll-adv">Never Roll Advantage</option>
</select>
</div>
<div class="row">
<span data-i18n="whisp-rolls-gm:-u">WHISPER ROLLS TO GM:</span>
<select name="attr_wtype">
<option value="" data-i18n="never-whisper-roll">Never Whisper Rolls</option>
<option value="@{whispertoggle}" data-i18n="toggle-roll-whisper">Whisper Toggle</option>
<option value="?{Whisper?|Public Roll,|Whisper Roll,/w gm }" data-i18n="query-whisper-roll">Query Whisper</option>
<option value="/w gm " data-i18n="always-whisper-roll">Always Whisper Rolls</option>
</select>
</div>
<div class="row">
<span data-i18n="auto-dmg-roll:-u">AUTO DAMAGE ROLL:</span>
<select class="dtype" name="attr_dtype">
<option value="pick" data-i18n="never-roll-dmg">Don't Auto Roll Damage</option>
<option value="full" data-i18n="always-roll-dmg">Auto Roll Damage & Crit</option>
</select>
</div>
<div class="row">
<span data-i18n="core-die-roll:-u">CORE DIE ROLL:</span>
<input type="text" name="attr_core_die" value="1d20" placeholder="1d20" title="@{core_die}">
</div>
<div class="row">
<span data-i18n="prof-bonus:-u">PROFICIENCY BONUS:</span>
<select class="dtype" name="attr_pb_type">
<option value="level" data-i18n="by-level">By Level (Default)</option>
<option value="die" data-i18n="prof-die">Proficency Die (DMG)</option>
<option value="custom" data-i18n="custom">Custom</option>
</select>
<input type="hidden" name="attr_pb_type">
<input class="pb_custom" type="text" style="float:right;" name="attr_pb_custom" placeholder="2d10">
</div>
<div class="row">
<input type="checkbox" name="attr_global_save_mod_flag" value="1">
<span data-i18n="show-global-save-field-u">SHOW GLOBAL SAVE MODIFIER FIELD</span>
</div>
<div class="row">
<input type="checkbox" name="attr_global_skill_mod_flag" value="1">
<span data-i18n="show-global-skill-field-u">SHOW GLOBAL SKILL MODIFIER FIELD</span>
</div>
<div class="row">
<input type="checkbox" name="attr_global_attack_mod_flag" value="1">
<span data-i18n="show-global-attack-field-u">SHOW GLOBAL ATTACK MODIFIER FIELD</span>
</div>
<div class="row">
<input type="checkbox" name="attr_global_damage_mod_flag" value="1">
<span data-i18n="show-global-damage-field-u">SHOW GLOBAL DAMAGE MODIFIER FIELD</span>
</div>
<div class="row">
<span data-i18n="add-char-to-templates:-u">ADD CHARACTER NAME TO TEMPLATES:</span>
<select class="dtype" name="attr_charname_output">
<option value="{{charname=@{character_name}}}" data-i18n="on">On</option>
<option value="charname=@{character_name}" selected="selected" data-i18n="off">Off</option>
</select>
</div>
<div class="row">
<span data-i18n="level-calculations:-u">LEVEL CALCULATIONS:</span>
<select class="dtype" name="attr_level_calculations">
<option value="on" selected="selected" data-i18n="on">On</option>
<option value="off" data-i18n="off">Off</option>
</select>
</div>
<div class="row">
<span data-i18n="encumbrance:-u">ENCUMBRANCE:</span>
<select name="attr_encumberance_setting">
<option value="off" data-i18n="simple">Simple</option>
<option value="on" data-i18n="variant-phb">Variant (PHB p176)</option>
<option value="disabled" data-i18n="off">Off</option>
</select>
</div>
<div class="row">
<span data-i18n="inventory:-u">INVENTORY:</span>
<select name="attr_simpleinventory">
<option value="complex" data-i18n="compendium-compatible">Compendium Compatible</option>
<option value="simple" data-i18n="simple">Simple</option>
</select>
</div>
<div class="row">
<span data-i18n="feats-traits-u">FEATURES AND TRAITS</span><span>:</span>
<select name="attr_simpletraits">
<option value="complex" data-i18n="compendium-compatible">Compendium Compatible</option>
<option value="simple" data-i18n="simple">Simple</option>
</select>
</div>
<div class="row">
<span data-i18n="prof-langs-u">PROFICENCIES AND LANGUAGES</span><span>:</span>
<select name="attr_simpleproficencies">
<option value="complex" data-i18n="compendium-compatible">Compendium Compatible</option>
<option value="simple" data-i18n="simple">Simple</option>
</select>
</div>
<div class="row">
<span data-i18n="ammo-tracking:-u">AMMO TRACKING:</span>
<select name="attr_ammotracking">
<option value="on" data-i18n="on">On</option>
<option value="off" selected="selected" data-i18n="off">Off</option>
</select>
<span data-i18n-title="api-required-title" data-i18n="api-required-u" title="Try it now with easy one click API installation available with your Pro subscription." style="color:#666; cursor:help;">(API REQUIRED)</span>
</div>
<div class="row title">
<span data-i18n="general-opts-u">GENERAL OPTIONS</span>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div style="margin-right: 50px; margin-left: 10px;">
<span data-i18n="portions-sheet-utilize">
Portions of this sheet utilize content from the System Reference Document 5.0 under the OGL License. View OGL License and Copyright Notice. https://wiki.roll20.net/SRD_5.0_OGL_License
</span>
</div>
<div>
<span data-i18n="footer-wiki-link">
For more information about this character sheet, its functionality, or uses, please check out the Roll20 Wiki for official documentation. https://wiki.roll20.net/5th_Edition_OGL_by_Roll20
</span>
</div>
</div>
<!-- COMPENDIUM DROP CATCHERS -->
<input type="hidden" name="attr_drop_category" accept="Category">
<input type="hidden" name="attr_drop_name" accept="Name">
<input type="hidden" name="attr_drop_weight" accept="Weight">
<input type="hidden" name="attr_drop_properties" accept="Properties">
<input type="hidden" name="attr_drop_modifiers" accept="Modifiers">
<input type="hidden" name="attr_drop_content" accept="Content">
<input type="hidden" name="attr_drop_itemtype" accept="Item Type">
<input type="hidden" name="attr_drop_damage" accept="Damage">
<input type="hidden" name="attr_drop_damagetype" accept="Damage Type">
<input type="hidden" name="attr_drop_range" accept="Range">
<input type="hidden" name="attr_drop_ac" accept="AC">
<input type="hidden" name="attr_drop_attack_type" accept="Spell Attack">
<input type="hidden" name="attr_drop_damage2" accept="Secondary Damage">
<input type="hidden" name="attr_drop_damagetype2" accept="Secondary Damage Type">
<input type="hidden" name="attr_drop_spellritualflag" accept="Ritual">
<input type="hidden" name="attr_drop_spellschool" accept="School">
<input type="hidden" name="attr_drop_spellcastingtime" accept="Casting Time">
<input type="hidden" name="attr_drop_spelltarget" accept="Target">
<input type="hidden" name="attr_drop_spellcomp" accept="Components">
<input type="hidden" name="attr_drop_spellcomp_materials" accept="Material">
<input type="hidden" name="attr_drop_spellconcentrationflag" accept="Concentration">
<input type="hidden" name="attr_drop_spellduration" accept="Duration">
<input type="hidden" name="attr_drop_spellhealing" accept="Healing">
<input type="hidden" name="attr_drop_spelldmgmod" accept="Add Casting Modifier">
<input type="hidden" name="attr_drop_spellsave" accept="Save">
<input type="hidden" name="attr_drop_spellsavesuccess" accept="Save Success">
<input type="hidden" name="attr_drop_spellhldie" accept="Higher Spell Slot Dice">
<input type="hidden" name="attr_drop_spellhldietype" accept="Higher Spell Slot Die">
<input type="hidden" name="attr_drop_spellhlbonus" accept="Higher Spell Slot Bonus">
<input type="hidden" name="attr_drop_spelllevel" accept="Level">
<input type="hidden" name="attr_drop_spell_damage_progression" accept="Damage Progression">
<input type="hidden" name="attr_drop_speed" accept="Speed">
<input type="hidden" name="attr_drop_str" accept="STR">
<input type="hidden" name="attr_drop_dex" accept="DEX">
<input type="hidden" name="attr_drop_con" accept="CON">
<input type="hidden" name="attr_drop_int" accept="INT">
<input type="hidden" name="attr_drop_wis" accept="WIS">
<input type="hidden" name="attr_drop_cha" accept="CHA">
<input type="hidden" name="attr_drop_vulnerabilities" accept="Vulnerabilities">
<input type="hidden" name="attr_drop_resistances" accept="Resistances">
<input type="hidden" name="attr_drop_immunities" accept="Immunities">
<input type="hidden" name="attr_drop_condition_immunities" accept="Condition Immunities">
<input type="hidden" name="attr_drop_languages" accept="Languages">
<input type="hidden" name="attr_drop_challenge_rating" accept="Challenge Rating">
<input type="hidden" name="attr_drop_size" accept="Size">
<input type="hidden" name="attr_drop_type" accept="Type">
<input type="hidden" name="attr_drop_alignment" accept="Alignment">
<input type="hidden" name="attr_drop_hp" accept="HP">
<input type="hidden" name="attr_drop_saving_throws" accept="Saving Throws">
<input type="hidden" name="attr_drop_senses" accept="Senses">
<input type="hidden" name="attr_drop_passive_perception" accept="Passive Perception">
<input type="hidden" name="attr_drop_skills" accept="Skills">
<input type="hidden" name="attr_drop_token_size" accept="Token Size">
</div> <!-- licensecontainer div close -->
<!-- HIDDEN FIELDS -->
<input type="hidden" name="attr_d20" value="1d20">
<input type="hidden" name="attr_level" value="1">
<input type="hidden" name="attr_pb" value="2">
<input type="hidden" name="attr_pbd_safe" value="">
<input type="hidden" name="attr_jack" value="1">
<input type="hidden" name="attr_jack_attr" value="">
<input type="hidden" name="attr_jack_bonus" value="">
<input type="hidden" name="attr_hitdie_final" value="">
<input type="hidden" name="attr_globalsavingthrowbonus" value="">
<input type="hidden" name="attr_death_save_bonus" value="0">
<input type="hidden" name="attr_initiative_bonus" value="0">
<input type="hidden" name="attr_spell_save_dc" value="0">
<input type="hidden" name="attr_spell_attack_bonus" value="0">
<input type="hidden" name="attr_spell_attack_mod" value="0">
<input type="hidden" name="attr_strength_mod" value="0">
<input type="hidden" name="attr_dexterity_mod" value="0">
<input type="hidden" name="attr_constitution_mod" value="0">
<input type="hidden" name="attr_intelligence_mod" value="0">
<input type="hidden" name="attr_wisdom_mod" value="0">
<input type="hidden" name="attr_charisma_mod" value="0">
<input type="hidden" name="attr_strength_save_bonus" value="0">
<input type="hidden" name="attr_dexterity_save_bonus" value="0">
<input type="hidden" name="attr_constitution_save_bonus" value="0">
<input type="hidden" name="attr_intelligence_save_bonus" value="0">
<input type="hidden" name="attr_wisdom_save_bonus" value="0">
<input type="hidden" name="attr_charisma_save_bonus" value="0">
<input type='hidden' name='attr_acrobatics_bonus' value='0'>
<input type='hidden' name='attr_animal_handling_bonus' value='0'>
<input type='hidden' name='attr_arcana_bonus' value='0'>
<input type='hidden' name='attr_athletics_bonus' value='0'>
<input type='hidden' name='attr_deception_bonus' value='0'>
<input type='hidden' name='attr_history_bonus' value='0'>
<input type='hidden' name='attr_insight_bonus' value='0'>
<input type='hidden' name='attr_intimidation_bonus' value='0'>
<input type='hidden' name='attr_investigation_bonus' value='0'>
<input type='hidden' name='attr_medicine_bonus' value='0'>
<input type='hidden' name='attr_nature_bonus' value='0'>
<input type='hidden' name='attr_perception_bonus' value='0'>
<input type='hidden' name='attr_performance_bonus' value='0'>
<input type='hidden' name='attr_persuasion_bonus' value='0'>
<input type='hidden' name='attr_religion_bonus' value='0'>
<input type='hidden' name='attr_sleight_of_hand_bonus' value='0'>
<input type='hidden' name='attr_stealth_bonus' value='0'>
<input type='hidden' name='attr_survival_bonus' value='0'>
<input type='hidden' name='attr_lvl1_slots_total' value='0'>
<input type='hidden' name='attr_lvl2_slots_total' value='0'>
<input type='hidden' name='attr_lvl3_slots_total' value='0'>
<input type='hidden' name='attr_lvl4_slots_total' value='0'>
<input type='hidden' name='attr_lvl5_slots_total' value='0'>
<input type='hidden' name='attr_lvl6_slots_total' value='0'>
<input type='hidden' name='attr_lvl7_slots_total' value='0'>
<input type='hidden' name='attr_lvl8_slots_total' value='0'>
<input type='hidden' name='attr_lvl9_slots_total' value='0'>
</div>
<div class="compendium_warning">
<span data-i18n="accepting-drop-u">ACCEPTING DROP FROM COMPENDIUM</span>
</div>
<div class="monster_confirm">
<span data-i18n="are_you_sure">Are you sure you want to turn this character into a </span><span name="attr_drop_name"></span><span>?</span>
<div style="margin-top: 20px;">
<div style="position: relative; display: inline-block; margin-right: 25px;">
<input class="yes" type="checkbox" name="attr_confirm"><span class="yes" data-i18n="yes">Yes</span>
</div>
<div style="position: relative; display: inline-block;">
<input class="cancel" type="checkbox" name="attr_cancel"><span class="cancel" data-i18n="cancel">Cancel</span>
</div>
</div>
</div>
<!-- ROLL TEMPLATES -->
<div class="rolltemplates">
<rolltemplate class="sheet-rolltemplate-simple">
<div class="container">
<div class="result">
{{#always}}
<div class="adv">
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
</div>
{{/always}}
{{#normal}}
<div class="solo">
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
</div>
{{/normal}}
{{#advantage}}
{{#rollLess() r1 r2}}
<div class="adv">
<span class="grey">{{r1}}{{#global}} + {{global}}{{/global}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
</div>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<div class="adv">
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
</div>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<div class="adv">
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span class="grey">{{r2}}{{#global}} + {{global}}{{/global}}</span>
</div>
{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollLess() r1 r2}}
<div class="adv">
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span class="grey">{{r2}}{{#global}} + {{global}}{{/global}}</span>
</div>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<div class="adv">
<span>{{r1}}{{#global}} + {{global}}{{/global}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
</div>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<div class="adv">
<span class="grey">{{r1}}{{#global}} + {{global}}{{/global}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#global}} + {{global}}{{/global}}</span>
</div>
{{/rollGreater() r1 r2}}
{{/disadvantage}}
</div>
<div class="label">
<span>{{rname}}{{#mod}} <span>({{mod}})</span>{{/mod}}</span>
</div>
{{#charname}}
<div class="charname">
<span>{{charname}}</span>
</div>
{{/charname}}
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-atk">
<div class="container">
<div class="result">
{{#always}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/always}}
{{#normal}}
<div class="solo">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/normal}}
{{#advantage}}
{{#rollLess() r1 r2}}
<div class="adv">
<span class="grey">{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span class="grey">{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollLess() r1 r2}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span class="grey">{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<div class="adv">
<span class="grey">{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollGreater() r1 r2}}
{{/disadvantage}}
</div>
{{#range}}
<div class="sublabel">
<span>{{range}}</span>
</div>
{{/range}}
<div class="label">
{{#normal}}
{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}
{{#^rollWasCrit() r1}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/^rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span>{{rnamec}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollTotal() r1 r2}}{{#^rollWasCrit() r1}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/^rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollLess() r1 r2}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollLess() r1 r2}}
{{#rollGreater() r1 r2}}<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}} <span>({{mod}})</span></span>{{/rollGreater() r1 r2}}
{{/disadvantage}}
</div>
{{#charname}}
<div class="charname">
<span>{{charname}}</span>
</div>
{{/charname}}
</div>
{{#desc}}
<div class="desc info">
<span><span class="top"></span><span class="middle">{{desc}}</span><span class="bottom"></span>
</div>
{{/desc}}
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-dmg">
{{#save}}
{{#attack}}
<div class="desc save">
{{/attack}}
{{^attack}}
<div class="atk save">
{{/attack}}
<div class="savedc">
<span class="rolltemplate-inline" data-i18n="difficulty-class-abv">DC</span><span class="rolltemplate-inline">{{savedc}}</span>
</div>
{{#savedesc}}
<div class="sublabel">
<span>{{savedesc}}</span>
</div>
{{/savedesc}}
<div class="label">
<span class="rolltemplate-inline">{{saveattr}}</span> <span class="rolltemplate-inline" data-i18n="save">Save</span>
</div>
</div>
{{/save}}
{{^attack}}
{{#desc}}
<div class="desc info">
<span><span class="top"></span><span class="middle">{{desc}}</span><span class="bottom"></span>
</div>
{{/desc}}
{{/attack}}
{{#globaldamage}}
{{#^rollTotal() globaldamage 0}}
<div class="desc">
<span>{{globaldamage}}{{#globaldamagecrit}}<span class="plus"> + </span>{{globaldamagecrit}}{{/globaldamagecrit}}</span>
<span class="sublabel">{{globaldamagetype}}</span>
</div>
{{/^rollTotal() globaldamage 0}}
{{/globaldamage}}
{{#hldmg}}
{{#^rollTotal() hldmg 0}}
<div class="desc">
<span>{{hldmg}}{{#hldmgcrit}}<span class="plus"> + </span>{{hldmgcrit}}{{/hldmgcrit}}</span>
<span class="sublabel">{{dmg1type}}</span>
<div class="label">
<span data-i18n="higher-lvl-cast">Higher Level Cast</span>
</div>
</div>
{{/^rollTotal() hldmg 0}}
{{/hldmg}}
<div class="container damagetemplate">
<div class="result">
{{#dmg1flag}}
{{^dmg2flag}}
<div class="solo">
<span class="damage">{{dmg1}}{{#crit}} + {{crit1}}{{/crit}}</span>
<span class="sublabel">{{dmg1type}}</span>
</div>
{{/dmg2flag}}
{{/dmg1flag}}
{{#dmg2flag}}
{{^dmg1flag}}
<div class="solo">
<span class="damage">{{dmg2}}{{#crit}} + {{crit2}}{{/crit}}</span>
<span class="sublabel">{{dmg2type}}</span>
</div>
{{/dmg1flag}}
{{/dmg2flag}}
{{#dmg1flag}}
{{#dmg2flag}}
<div class="adv">
<span class="damage">{{dmg1}}{{#crit}} + {{crit1}}{{/crit}}</span>
<span class="sublabel">{{dmg1type}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span class="damage">{{dmg2}}{{#crit}} + {{crit2}}{{/crit}}</span>
<span class="sublabel">{{dmg2type}}</span>
</div>
{{/dmg2flag}}
{{/dmg1flag}}
</div>
{{^attack}}
{{#range}}
<div class="sublabel" style="color: black;">
<span>{{range}}</span>
</div>
{{/range}}
<div class="label">
<span>{{rname}}</span>{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}}
</div>
{{#charname}}
<div class="charname">
<span>{{charname}}</span>
</div>
{{/charname}}
{{/attack}}
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-atkdmg">
{{#attack}}
<div class="container atk">
<div class="result">
{{#always}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/always}}
{{#normal}}
<div class="solo">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/normal}}
{{#advantage}}
{{#rollLess() r1 r2}}
<div class="adv">
<span class="grey">{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span class="grey">{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollLess() r1 r2}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span class="grey">{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<div class="adv">
<span>{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<div class="adv">
<span class="grey">{{r1}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>{{r2}}{{#globalattack}} + {{globalattack}}{{/globalattack}}</span>
</div>
{{/rollGreater() r1 r2}}
{{/disadvantage}}
</div>
{{#range}}
<div class="sublabel">
<span>{{range}}</span>
</div>
{{/range}}
<div class="label">
<span>{{rname}}{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}}{{#attack}} <span>({{mod}})</span>{{/attack}}</span>
</div>
{{#charname}}
<div class="charname">
<span>{{charname}}</span>
</div>
{{/charname}}
</div>
{{/attack}}
{{#save}}
{{#attack}}
<div class="container desc save">
{{/attack}}
{{^attack}}
<div class="container atk save">
{{/attack}}
<div class="savedc">
<span class="rolltemplate-inline" data-i18n="difficulty-class-abv">DC</span><span class="rolltemplate-inline">{{savedc}}</span>
</div>
{{#savedesc}}
<div class="sublabel">
<span>{{savedesc}}</span>
</div>
{{/savedesc}}
<div class="label">
<span class="rolltemplate-inline">{{saveattr}}</span> <span class="rolltemplate-inline" data-i18n="save">Save</span>
</div>
</div>
{{/save}}
{{#desc}}
<div class="desc info">
<span><span class="top"></span><span class="middle">{{desc}}</span><span class="bottom"></span>
</div>
{{/desc}}
{{#globaldamage}}
{{#^rollTotal() globaldamage 0}}
<div class="desc">
<span>
{{globaldamage}}
{{#attack}}
{{#normal}}
{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{globaldamagecrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{/disadvantage}}
{{/attack}}
</span>
<span class="sublabel">{{globaldamagetype}}</span>
</div>
{{/^rollTotal() globaldamage 0}}
{{/globaldamage}}
{{#hldmg}}
{{#^rollTotal() hldmg 0}}
<div class="desc">
<span>
{{hldmg}}
<!-- {{#hldmgcrit}} + {{hldmgcrit}}{{/hldmgcrit}} -->
{{#attack}}
{{#normal}}
{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="plus"> + </span>{{hldmgcrit}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{/disadvantage}}
{{/attack}}
</span>
<span class="sublabel">{{dmg1type}}</span>
<div class="label">
<span data-i18n="higher-lvl-cast">Higher Level Cast</span>
</div>
</div>
{{/^rollTotal() hldmg 0}}
{{/hldmg}}
{{#damage}}
<div class="container damagetemplate">
<div class="result">
{{#dmg1flag}}
{{^dmg2flag}}
<div class="solo">
<span class="damage">
{{dmg1}}
{{#attack}}
{{#normal}}
{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{/disadvantage}}
{{/attack}}
</span>
<span class="sublabel">{{dmg1type}}</span>
</div>
{{/dmg2flag}}
{{/dmg1flag}}
{{#dmg2flag}}
{{^dmg1flag}}
<div class="solo">
<span class="damage">
{{dmg2}}
{{#attack}}
{{#normal}}
{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{/disadvantage}}
{{/attack}}
</span>
<span class="sublabel">{{dmg2type}}</span>
</div>
{{/dmg1flag}}
{{/dmg2flag}}
{{#dmg1flag}}
{{#dmg2flag}}
<div class="adv">
<span class="damage">
{{dmg1}}
{{#attack}}
{{#normal}}
{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{/disadvantage}}
{{/attack}}
</span>
<span class="sublabel">{{dmg1type}}</span>
</div>
<div class="advspacer"></div>
<div class="adv">
<span>
{{dmg2}}
{{#attack}}
{{#normal}}
{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}+ {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}+ {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{/disadvantage}}
{{/attack}}
</span>
<span class="sublabel">{{dmg2type}}</span>
</div>
{{/dmg2flag}}
{{/dmg1flag}}
</div>
{{^attack}}
{{#range}}
<div class="sublabel">
<span>{{range}}</span>
</div>
{{/range}}
<div class="label">
<span>{{rname}}</span>{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}}
</div>
{{#charname}}
<div class="charname">
<span>{{charname}}</span>
</div>
{{/charname}}
{{/attack}}
</div>
{{/damage}}
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-desc">
<div class="desc info">
<span><span class="top"></span><span class="middle">{{desc}}</span><span class="bottom"></span>
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-spell">
<div class="container">
<div class="title row">
<span>{{name}}</span>{{#innate}}<span class="grey">, {{innate}}</span>{{/innate}}
</div>
<div class="italics row">
<span>{{level}}{{#ritual}} (<span data-i18n="ritual-l"></span>){{/ritual}}</span>
</div>
<div class="spacer"></div>
{{#castingtime}}
<div class="row">
<span class="bold" data-i18n="casting-time:">Casting Time:</span> <span>{{castingtime}}<span>
</div>
{{/castingtime}}
{{#range}}
<div class="row">
<span class="bold" data-i18n="range:">Range:</span> <span>{{range}}<span>
</div>
{{/range}}
{{#target}}
<div class="row">
<span class="bold" data-i18n="target:">Target:</span> <span>{{target}}<span>
</div>
{{/target}}
<div class="row">
<span class="bold" data-i18n="components:">Components:</span>
<span>
{{#v}}V{{#s}}, {{/s}}{{^s}}{{#m}}, {{/m}}{{/s}}{{/v}}
{{#s}}S{{#m}}, {{/m}}{{/s}}
{{#m}}M {{#material}}({{material}}){{/material}}{{/m}}
<span>
</div>
{{#duration}}
<div class="row">
<span class="bold" data-i18n="duration:">Duration:</span> <span>{{#concentration}}<span data-i18n="concentration">Concentration</span> {{/concentration}}{{duration}}<span>
</div>
{{/duration}}
<div class="spacer"></div>
{{#description}}
<div class="row">
<span class="description">{{description}}<span>
</div>
{{/description}}
{{#athigherlevels}}
<div class="row">
<span class="bold italics" data-i18n="at-higher-lvl">At Higher Levels</span>. <span class="description">{{athigherlevels}}<span>
</div>
{{/athigherlevels}}
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-traits">
<div class="row header">
<span>{{name}}</span>
</div>
{{#source}}
<div class="row subheader">
<span class="italics">{{#charname}}{{charname}} {{/charname}}{{source}}</span>
</div>
{{/source}}
{{#description}}
<div class="row">
<span class="desc">{{description}}</span>
</div>
{{/description}}
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-npc">
<div class="row header">
<span>{{rname}}</span>
</div>
{{#name}}
<div class="row subheader">
<span class="italics">{{name}}</span>
</div>
{{/name}}
<div class="arrow-right"></div>
<div class="row">
{{#normal}}
<span class="italics">{{type}}: </span><span>{{r1}}</span>
{{/normal}}
{{#always}}
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}
<span class="italics">{{type}}: </span><span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollLess() r1 r2}}
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<span class="italics">{{type}}: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<span class="italics">{{type}}: </span><span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollGreater() r1 r2}}
{{/disadvantage}}
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-npcatk">
<div class="row header">
{{#normal}}
{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}
{{#^rollWasCrit() r1}}{{rname}}{{/^rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}{{rnamec}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}{{rname}}{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}{{rnamec}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}{{rname}}{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}{{rnamec}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollTotal() r1 r2}}{{#^rollWasCrit() r1}}{{rname}}{{/^rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollLess() r1 r2}}{{rname}}{{/rollLess() r1 r2}}
{{#rollGreater() r1 r2}}{{rnamec}}{{/rollGreater() r1 r2}}
{{/disadvantage}}
</div>
{{#name}}
<div class="row subheader">
<span class="italics">{{name}}</span>
</div>
{{/name}}
<div class="arrow-right"></div>
<div class="row">
{{#normal}}
{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}
{{#^rollWasCrit() r1}}<span class="italics">{{type}}: </span>{{/^rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}<span class="italics">{{type}}: </span>{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}}<span class="italics">[{{typec}}: </span>{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{#^rollWasCrit() r1}}{{#^rollWasCrit() r2}}<span class="italics">{{type}}: </span>{{/^rollWasCrit() r2}}{{/^rollWasCrit() r1}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}}<span class="italics">{{typec}}: </span>{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollTotal() r1 r2}}{{#^rollWasCrit() r1}}<span class="italics">{{type}}: </span>{{/^rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollLess() r1 r2}}<span class="italics">{{type}}: </span>{{/rollLess() r1 r2}}
{{#rollGreater() r1 r2}}<span class="italics">{{typec}}: </span>{{/rollGreater() r1 r2}}
{{/disadvantage}}
{{#normal}}
<span>{{r1}}</span>
{{/normal}}
{{#always}}
<span>{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}
<span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<span>{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollLess() r1 r2}}
<span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<span>{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollGreater() r1 r2}}
{{/disadvantage}}
</div>
{{#description}}
<div class="row">
<span class="desc">{{description}}</span>
</div>
{{/description}}
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-npcdmg">
<div class="container dmgcontainer damagetemplate">
<span class="italics">Damage: </span>
<span>
{{#dmg1flag}}
{{dmg1}}{{#crit}} + {{crit1}}{{/crit}}{{dmg1type}}
{{/dmg1flag}}
{{#dmg1flag}}{{#dmg2flag}}+{{/dmg2flag}}{{/dmg1flag}}
{{#dmg2flag}}
{{dmg2}}{{#crit}} + {{crit2}}{{/crit}}{{dmg2type}}
{{/dmg2flag}}
</span>
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-npcaction">
<div class="container">
<div class="row header">
<span>{{rname}}</span>
</div>
{{#name}}
<div class="row subheader">
<span class="italics">{{name}}</span>
</div>
{{/name}}
<div class="arrow-right"></div>
{{#attack}}
<div class="row">
{{#normal}}
<span class="italics">Attack: </span><span>{{r1}}</span>
{{/normal}}
{{#always}}
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}
<span class="italics">Attack: </span><span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollLess() r1 r2}}
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span class="grey">{{r2}}</span>
{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}
<span class="italics">Attack: </span><span>{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}
<span class="italics">Attack: </span><span class="grey">{{r1}}</span><span> | </span><span>{{r2}}</span>
{{/rollGreater() r1 r2}}
{{/disadvantage}}
</div>
{{/attack}}
{{#description}}
<span class="desc">{{description}}</span>
{{/description}}
</div>
{{#damage}}
<div class="container dmgcontainer damagetemplate">
<span class="italics">Damage: </span>
<span>
{{#dmg1flag}}
{{dmg1}}
{{#normal}}
{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}} + {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}} + {{crit1}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit1}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{/disadvantage}}
{{dmg1type}}
{{/dmg1flag}}
{{#dmg1flag}}{{#dmg2flag}}+{{/dmg2flag}}{{/dmg1flag}}
{{#dmg2flag}}
{{dmg2}}
{{#normal}}
{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}
{{/normal}}
{{#always}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}} + {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/always}}
{{#advantage}}
{{#rollLess() r1 r2}}{{#rollWasCrit() r2}} + {{crit2}}{{/rollWasCrit() r2}}{{/rollLess() r1 r2}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{#rollGreater() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollGreater() r1 r2}}
{{/advantage}}
{{#disadvantage}}
{{#rollTotal() r1 r2}}{{#rollWasCrit() r1}} + {{crit2}}{{/rollWasCrit() r1}}{{/rollTotal() r1 r2}}
{{/disadvantage}}
{{dmg2type}}
{{/dmg2flag}}
</span>
</div>
{{/damage}}
</rolltemplate>
</div>
<!-- WORKERS -->
<script type="text/worker">
on("sheet:opened", function() {
cleanup_drop_fields();
versioning();
v2_old_values_check();
});
on("sheet:compendium-drop", function() {
getAttrs(["hp_max","npc_senses","token_size","cd_bar1_v","cd_bar1_m","cd_bar1_l","cd_bar2_v","cd_bar2_m","cd_bar2_l","cd_bar3_v","cd_bar3_m","cd_bar3_l"], function(v) {
var default_attr = {};
default_attr["width"] = 70;
default_attr["height"] = 70;
if(v["npc_senses"].toLowerCase().match(/(darkvision|blindsight|tremorsense|truesight)/)) {
default_attr["light_radius"] = Math.max.apply(Math, v["npc_senses"].match(/\d+/g));
}
if(v["token_size"]) {
var squarelength = 70;
if(v["token_size"].indexOf(",") > -1) {
var setwidth = !isNaN(v["token_size"].split(",")[0]) ? v["token_size"].split(",")[0] : 1;
var setheight = !isNaN(v["token_size"].split(",")[1]) ? v["token_size"].split(",")[1] : 1;
default_attr["width"] = setwidth * squarelength;
default_attr["height"] = setheight * squarelength;
}
else {
default_attr["width"] = squarelength * v["token_size"]
default_attr["height"] = squarelength * v["token_size"]
};
}
if(v["cd_bar1_l"]) {
default_attr["bar1_link"] = v["cd_bar1_l"];
}
else if(v["cd_bar1_v"] || v["cd_bar1_m"]) {
if(v["cd_bar1_v"]) {
default_attr["bar1_value"] = v["cd_bar1_v"];
}
if(v["cd_bar1_m"]) {
default_attr["bar1_max"] = v["cd_bar1_m"];
}
}
else {
default_attr["bar1_value"] = v["hp_max"];
default_attr["bar1_max"] = v["hp_max"];
}
if(v["cd_bar2_l"]) {
default_attr["bar2_link"] = v["cd_bar2_l"];
}
else if(v["cd_bar2_v"] || v["cd_bar2_m"]) {
if(v["cd_bar2_v"]) {
default_attr["bar2_value"] = v["cd_bar2_v"];
}
if(v["cd_bar2_m"]) {
default_attr["bar2_max"] = v["cd_bar2_m"];
}
}
else {
default_attr["bar2_link"] = "npc_ac";
}
if(v["cd_bar3_l"]) {
default_attr["bar3_link"] = v["cd_bar3_l"];
}
else if(v["cd_bar3_v"] || v["cd_bar3_m"]) {
if(v["cd_bar3_v"]) {
default_attr["bar3_value"] = v["cd_bar3_v"];
}
if(v["cd_bar3_m"]) {
default_attr["bar3_max"] = v["cd_bar3_m"];
}
}
setDefaultToken(default_attr);
});
});
on("change:strength_base change:strength_bonus", function() {
update_attr("strength");
});
on("change:strength", function() {
update_mod("strength");
check_customac("Strength");
update_weight();
});
on("change:dexterity_base change:dexterity_bonus", function() {
update_attr("dexterity");
update_initiative();
});
on("change:dexterity", function() {
update_mod("dexterity");
check_customac("Dexterity");
});
on("change:constitution_base change:constitution_bonus", function() {
update_attr("constitution");
});
on("change:constitution", function() {
update_mod("constitution");
check_customac("Constitution");
});
on("change:intelligence_base change:intelligence_bonus", function() {
update_attr("intelligence");
});
on("change:intelligence", function() {
update_mod("intelligence");
check_customac("Intelligence");
});
on("change:wisdom_base change:wisdom_bonus", function() {
update_attr("wisdom");
});
on("change:wisdom", function() {
update_mod("wisdom");
check_customac("Wisdom");
});
on("change:charisma_base change:charisma_bonus", function() {
update_attr("charisma");
});
on("change:charisma", function() {
update_mod("charisma");
check_customac("Charisma");
});
on("change:strength_mod", function() {
update_save("strength");
update_skills(["athletics"]);
update_attacks("strength");
update_tool("strength");
update_spell_info("strength");
});
on("change:dexterity_mod", function() {
update_save("dexterity");
update_skills(["acrobatics", "sleight_of_hand", "stealth"]);
update_attacks("dexterity");
update_tool("dexterity");
update_spell_info("dexterity");
update_ac();
update_initiative();
});
on("change:constitution_mod", function() {
update_save("constitution");
update_attacks("constitution");
update_tool("constitution");
update_spell_info("constitution");
});
on("change:intelligence_mod", function() {
update_save("intelligence");
update_skills(["arcana", "history", "investigation", "nature", "religion"]);
update_attacks("intelligence");
update_tool("intelligence");
update_spell_info("intelligence");
});
on("change:wisdom_mod", function() {
update_save("wisdom");
update_skills(["animal_handling", "insight", "medicine", "perception", "survival"]);
update_attacks("wisdom");
update_tool("wisdom");
update_spell_info("wisdom");
});
on("change:charisma_mod", function() {
update_save("charisma");
update_skills(["deception", "intimidation", "performance", "persuasion"]);
update_attacks("charisma");
update_tool("charisma");
update_spell_info("charisma");
});
on("change:strength_save_prof change:strength_save_mod", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_save("strength");
});
on("change:dexterity_save_prof change:dexterity_save_mod", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_save("dexterity");
});
on("change:constitution_save_prof change:constitution_save_mod", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_save("constitution");
});
on("change:intelligence_save_prof change:intelligence_save_mod", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_save("intelligence");
});
on("change:wisdom_save_prof change:wisdom_save_mod", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_save("wisdom");
});
on("change:charisma_save_prof change:charisma_save_mod", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_save("charisma");
});
on("change:globalsavemod", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_all_saves();
});
on("change:death_save_mod", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_save("death");
});
on("change:acrobatics_prof change:acrobatics_type change:acrobatics_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["acrobatics"]);
});
on("change:animal_handling_prof change:animal_handling_type change:animal_handling_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["animal_handling"]);
});
on("change:arcana_prof change:arcana_type change:arcana_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["arcana"]);
});
on("change:athletics_prof change:athletics_type change:athletics_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["athletics"]);
});
on("change:deception_prof change:deception_type change:deception_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["deception"]);
});
on("change:history_prof change:history_type change:history_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["history"]);
});
on("change:insight_prof change:insight_type change:insight_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["insight"]);
});
on("change:intimidation_prof change:intimidation_type change:intimidation_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["intimidation"]);
});
on("change:investigation_prof change:investigation_type change:investigation_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["investigation"]);
});
on("change:medicine_prof change:medicine_type change:medicine_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["medicine"]);
});
on("change:nature_prof change:nature_type change:nature_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["nature"]);
});
on("change:perception_prof change:perception_type change:perception_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["perception"]);
});
on("change:performance_prof change:performance_type change:performance_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["performance"]);
});
on("change:persuasion_prof change:persuasion_type change:persuasion_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["persuasion"]);
});
on("change:religion_prof change:religion_type change:religion_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["religion"]);
});
on("change:sleight_of_hand_prof change:sleight_of_hand_type change:sleight_of_hand_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["sleight_of_hand"]);
});
on("change:stealth_prof change:stealth_type change:stealth_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["stealth"]);
});
on("change:survival_prof change:survival_type change:survival_flat", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {return;};
update_skills(["survival"]);
});
on("change:repeating_tool:toolname change:repeating_tool:toolbonus_base change:repeating_tool:toolattr_base change:repeating_tool:tool_mod", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {
return;
}
var tool_id = eventinfo.sourceAttribute.substring(15, 35);
update_tool(tool_id);
});
on("change:repeating_attack:atkname change:repeating_attack:atkflag change:repeating_attack:atkattr_base change:repeating_attack:atkmod change:repeating_attack:atkmagic change:repeating_attack:atkprofflag change:repeating_attack:dmgflag change:repeating_attack:dmgbase change:repeating_attack:dmgattr change:repeating_attack:dmgmod change:repeating_attack:dmgtype change:repeating_attack:dmg2flag change:repeating_attack:dmg2base change:repeating_attack:dmg2attr change:repeating_attack:dmg2mod change:repeating_attack:dmg2type change:repeating_attack:saveflag change:repeating_attack:savedc change:repeating_attack:saveflat change:repeating_attack:dmgcustcrit change:repeating_attack:dmg2custcrit change:repeating_attack:ammo", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {
return;
}
var attackid = eventinfo.sourceAttribute.substring(17, 37);
update_attacks(attackid);
});
on("change:drop_category", function(eventinfo) {
if(eventinfo.newValue === "Monsters") {
getAttrs(["class","race","speed","hp"], function(v) {
if(v["class"] != "" || v["race"] != "" || v["speed"] != "" || v["hp"] != "") {
setAttrs({monster_confirm_flag: 1});
}
else {
handle_drop(eventinfo.newValue);
}
});
}
else {
handle_drop(eventinfo.newValue);
}
});
on("change:repeating_inventory:hasattack", function(eventinfo) {
if(eventinfo.sourceType === "sheetworker") {
return;
}
var itemid = eventinfo.sourceAttribute.substring(20, 40);
getAttrs(["repeating_inventory_" + itemid + "_hasattack", "repeating_inventory_" + itemid + "_itemattackid"], function(v) {
var attackid = v["repeating_inventory_" + itemid + "_itemattackid"];
var hasattack = v["repeating_inventory_" + itemid + "_hasattack"];
if(attackid && attackid != "" && hasattack == 0) {
remove_attack(attackid);
}
else if(hasattack == 1) {
create_attack_from_item(itemid);
};
});
})
on("change:repeating_inventory:itemname change:repeating_inventory:itemproperties change:repeating_inventory:itemmodifiers change:repeating_inventory:itemcount", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
var itemid = eventinfo.sourceAttribute.substring(20, 40);
getAttrs(["repeating_inventory_" + itemid + "_itemattackid", "repeating_inventory_" + itemid + "_itemresourceid"], function(v) {
var attackid = v["repeating_inventory_" + itemid + "_itemattackid"];
var resourceid = v["repeating_inventory_" + itemid + "_itemresourceid"];
if(attackid) {
update_attack_from_item(itemid, attackid);
}
if(resourceid) {
update_resource_from_item(itemid, resourceid);
}
});
});
on("change:repeating_inventory:useasresource", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
var itemid = eventinfo.sourceAttribute.substring(20, 40);
getAttrs(["repeating_inventory_" + itemid + "_useasresource", "repeating_inventory_" + itemid + "_itemresourceid"], function(v) {
var useasresource = v["repeating_inventory_" + itemid + "_useasresource"];
var resourceid = v["repeating_inventory_" + itemid + "_itemresourceid"];
if(useasresource == 1) {
create_resource_from_item(itemid);
}
else {
remove_resource(resourceid);
};
});
});
on("change:other_resource change:other_resource_name change:repeating_resource:resource_left change:repeating_resource:resource_left_name change:repeating_resource:resource_right change:repeating_resource:resource_right_name", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
var resourceid = eventinfo.sourceAttribute;
if(eventinfo.sourceAttribute.indexOf("other") > -1) {
resourceid = "other_resource";
}
else if(eventinfo.sourceAttribute.substring(eventinfo.sourceAttribute.length - 5) == "_name") {
resourceid = eventinfo.sourceAttribute.substring(0, eventinfo.sourceAttribute.length - 5);
};
getAttrs([resourceid, resourceid + "_name", resourceid + "_itemid"], function(v) {
if(!v[resourceid + "_name"]) {
remove_resource(resourceid);
}
else if(v[resourceid + "_itemid"] && v[resourceid + "_itemid"] != ""){
update_item_from_resource(resourceid, v[resourceid + "_itemid"]);
};
});
});
on("change:repeating_inventory:itemweight change:repeating_inventory:itemcount change:cp change:sp change:ep change:gp change:pp change:encumberance_setting change:size change:carrying_capacity_mod", function() {
update_weight();
});
on("change:repeating_inventory:itemmodifiers change:repeating_inventory:equipped", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
var itemid = eventinfo.sourceAttribute.substring(20, 40);
getAttrs(["repeating_inventory_" + itemid + "_itemmodifiers"], function(v) {
if(v["repeating_inventory_" + itemid + "_itemmodifiers"]) {
check_itemmodifiers(v["repeating_inventory_" + itemid + "_itemmodifiers"], eventinfo.previousValue);
};
});
});
on("change:globalacmod change:custom_ac_flag change:custom_ac_base change:custom_ac_part1 change:custom_ac_part2", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
update_ac();
});
on("change:repeating_spell-cantrip:spellname change:repeating_spell-1:spellname change:repeating_spell-1:spellprepared change:repeating_spell-2:spellname change:repeating_spell-2:spellprepared change:repeating_spell-3:spellname change:repeating_spell-3:spellprepared change:repeating_spell-4:spellname change:repeating_spell-4:spellprepared change:repeating_spell-5:spellname change:repeating_spell-5:spellprepared change:repeating_spell-6:spellname change:repeating_spell-6:spellprepared change:repeating_spell-7:spellname change:repeating_spell-7:spellprepared change:repeating_spell-8:spellname change:repeating_spell-8:spellprepared change:repeating_spell-9:spellname change:repeating_spell-9:spellprepared change:repeating_spell-cantrip:spellrange change:repeating_spell-1:spellrange change:repeating_spell-2:spellrange change:repeating_spell-3:spellrange change:repeating_spell-4:spellrange change:repeating_spell-5:spellrange change:repeating_spell-6:spellrange change:repeating_spell-7:spellrange change:repeating_spell-8:spellrange change:repeating_spell-9:spellrange change:repeating_spell-cantrip:spelltarget change:repeating_spell-1:spelltarget change:repeating_spell-2:spelltarget change:repeating_spell-3:spelltarget change:repeating_spell-4:spelltarget change:repeating_spell-5:spelltarget change:repeating_spell-6:spelltarget change:repeating_spell-7:spelltarget change:repeating_spell-8:spelltarget change:repeating_spell-9:spelltarget change:repeating_spell-cantrip:spelldamage change:repeating_spell-1:spelldamage change:repeating_spell-2:spelldamage change:repeating_spell-3:spelldamage change:repeating_spell-4:spelldamage change:repeating_spell-5:spelldamage change:repeating_spell-6:spelldamage change:repeating_spell-7:spelldamage change:repeating_spell-8:spelldamage change:repeating_spell-9:spelldamage change:repeating_spell-cantrip:spelldamagetype change:repeating_spell-1:spelldamagetype change:repeating_spell-2:spelldamagetype change:repeating_spell-3:spelldamagetype change:repeating_spell-4:spelldamagetype change:repeating_spell-5:spelldamagetype change:repeating_spell-6:spelldamagetype change:repeating_spell-7:spelldamagetype change:repeating_spell-8:spelldamagetype change:repeating_spell-9:spelldamagetype change:repeating_spell-cantrip:spelldamage2 change:repeating_spell-1:spelldamage2 change:repeating_spell-2:spelldamage2 change:repeating_spell-3:spelldamage2 change:repeating_spell-4:spelldamage2 change:repeating_spell-5:spelldamage2 change:repeating_spell-6:spelldamage2 change:repeating_spell-7:spelldamage2 change:repeating_spell-8:spelldamage2 change:repeating_spell-9:spelldamage2 change:repeating_spell-cantrip:spelldamagetype2 change:repeating_spell-1:spelldamagetype2 change:repeating_spell-2:spelldamagetype2 change:repeating_spell-3:spelldamagetype2 change:repeating_spell-4:spelldamagetype2 change:repeating_spell-5:spelldamagetype2 change:repeating_spell-6:spelldamagetype2 change:repeating_spell-7:spelldamagetype2 change:repeating_spell-8:spelldamagetype2 change:repeating_spell-9:spelldamagetype2 change:repeating_spell-cantrip:spellhealing change:repeating_spell-1:spellhealing change:repeating_spell-2:spellhealing change:repeating_spell-3:spellhealing change:repeating_spell-4:spellhealing change:repeating_spell-5:spellhealing change:repeating_spell-6:spellhealing change:repeating_spell-7:spellhealing change:repeating_spell-8:spellhealing change:repeating_spell-9:spellhealing change:repeating_spell-cantrip:spelldmgmod change:repeating_spell-1:spelldmgmod change:repeating_spell-2:spelldmgmod change:repeating_spell-3:spelldmgmod change:repeating_spell-4:spelldmgmod change:repeating_spell-5:spelldmgmod change:repeating_spell-6:spelldmgmod change:repeating_spell-7:spelldmgmod change:repeating_spell-8:spelldmgmod change:repeating_spell-9:spelldmgmod change:repeating_spell-cantrip:spellsave change:repeating_spell-1:spellsave change:repeating_spell-2:spellsave change:repeating_spell-3:spellsave change:repeating_spell-4:spellsave change:repeating_spell-5:spellsave change:repeating_spell-6:spellsave change:repeating_spell-7:spellsave change:repeating_spell-8:spellsave change:repeating_spell-9:spellsave change:repeating_spell-cantrip:spellsavesuccess change:repeating_spell-1:spellsavesuccess change:repeating_spell-2:spellsavesuccess change:repeating_spell-3:spellsavesuccess change:repeating_spell-4:spellsavesuccess change:repeating_spell-5:spellsavesuccess change:repeating_spell-6:spellsavesuccess change:repeating_spell-7:spellsavesuccess change:repeating_spell-8:spellsavesuccess change:repeating_spell-9:spellsavesuccess change:repeating_spell-cantrip:spellhldie change:repeating_spell-1:spellhldie change:repeating_spell-2:spellhldie change:repeating_spell-3:spellhldie change:repeating_spell-4:spellhldie change:repeating_spell-5:spellhldie change:repeating_spell-6:spellhldie change:repeating_spell-7:spellhldie change:repeating_spell-8:spellhldie change:repeating_spell-9:spellhldie change:repeating_spell-cantrip:spellhldietype change:repeating_spell-1:spellhldietype change:repeating_spell-2:spellhldietype change:repeating_spell-3:spellhldietype change:repeating_spell-4:spellhldietype change:repeating_spell-5:spellhldietype change:repeating_spell-6:spellhldietype change:repeating_spell-7:spellhldietype change:repeating_spell-8:spellhldietype change:repeating_spell-9:spellhldietype change:repeating_spell-cantrip:spell_updateflag change:repeating_spell-1:spell_updateflag change:repeating_spell-2:spell_updateflag change:repeating_spell-3:spell_updateflag change:repeating_spell-4:spell_updateflag change:repeating_spell-5:spell_updateflag change:repeating_spell-6:spell_updateflag change:repeating_spell-7:spell_updateflag change:repeating_spell-8:spell_updateflag change:repeating_spell-9:spell_updateflag change:repeating_spell-cantrip:spellattack change:repeating_spell-1:spellattack change:repeating_spell-2:spellattack change:repeating_spell-3:spellattack change:repeating_spell-4:spellattack change:repeating_spell-5:spellattack change:repeating_spell-6:spellattack change:repeating_spell-7:spellattack change:repeating_spell-8:spellattack change:repeating_spell-9:spellattack change:repeating_spell-cantrip:spellhlbonus change:repeating_spell-1:spellhlbonus change:repeating_spell-2:spellhlbonus change:repeating_spell-3:spellhlbonus change:repeating_spell-4:spellhlbonus change:repeating_spell-5:spellhlbonus change:repeating_spell-6:spellhlbonus change:repeating_spell-7:spellhlbonus change:repeating_spell-8:spellhlbonus change:repeating_spell-9:spellhlbonus change:repeating_spell-cantrip:includedesc change:repeating_spell-1:includedesc change:repeating_spell-2:includedesc change:repeating_spell-3:includedesc change:repeating_spell-4:includedesc change:repeating_spell-5:includedesc change:repeating_spell-6:includedesc change:repeating_spell-7:includedesc change:repeating_spell-8:includedesc change:repeating_spell-9:includedesc change:repeating_spell-cantrip:spellathigherlevels change:repeating_spell-1:spellathigherlevels change:repeating_spell-2:spellathigherlevels change:repeating_spell-3:spellathigherlevels change:repeating_spell-4:spellathigherlevels change:repeating_spell-5:spellathigherlevels change:repeating_spell-6:spellathigherlevels change:repeating_spell-7:spellathigherlevels change:repeating_spell-8:spellathigherlevels change:repeating_spell-9:spellathigherlevels change:repeating_spell-cantrip:spelldescription change:repeating_spell-1:spelldescription change:repeating_spell-2:spelldescription change:repeating_spell-3:spelldescription change:repeating_spell-4:spelldescription change:repeating_spell-5:spelldescription change:repeating_spell-6:spelldescription change:repeating_spell-7:spelldescription change:repeating_spell-8:spelldescription change:repeating_spell-9:spelldescription change:repeating_spell-cantrip:innate change:repeating_spell-1:innate change:repeating_spell-2:innate change:repeating_spell-3:innate change:repeating_spell-4:innate change:repeating_spell-5:innate change:repeating_spell-6:innate change:repeating_spell-7:innate change:repeating_spell-8:innate change:repeating_spell-9:innate", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
var repeating_source = eventinfo.sourceAttribute.substring(0, eventinfo.sourceAttribute.lastIndexOf('_'));
getAttrs([repeating_source + "_spellattackid", repeating_source + "_spelllevel"], function(v) {
var spellid = repeating_source.slice(-20);
var attackid = v[repeating_source + "_spellattackid"];
var lvl = v[repeating_source + "_spelllevel"];
if(attackid && lvl && spellid) {
update_attack_from_spell(lvl, spellid, attackid)
}
});
});
on("change:repeating_spell-cantrip:spelloutput change:repeating_spell-1:spelloutput change:repeating_spell-2:spelloutput change:repeating_spell-3:spelloutput change:repeating_spell-4:spelloutput change:repeating_spell-5:spelloutput change:repeating_spell-6:spelloutput change:repeating_spell-7:spelloutput change:repeating_spell-8:spelloutput change:repeating_spell-9:spelloutput", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
var repeating_source = eventinfo.sourceAttribute.substring(0, eventinfo.sourceAttribute.lastIndexOf('_'));
getAttrs([repeating_source + "_spellattackid", repeating_source + "_spelllevel", repeating_source + "_spelloutput", repeating_source + "_spellattackid", repeating_source + "_spellathigherlevels","character_id"], function(v) {
var update = {};
var spelloutput = v[repeating_source + "_spelloutput"];
var spellid = repeating_source.slice(-20);
var attackid = v[repeating_source + "_spellattackid"];
var lvl = v[repeating_source + "_spelllevel"];
if(spelloutput && spelloutput === "ATTACK") {
create_attack_from_spell(lvl, spellid, v["character_id"]);
}
else if(spelloutput && spelloutput === "SPELLCARD" && attackid && attackid != "") {
remove_attack(attackid);
var spelllevel = "@{spelllevel}";
if(v[repeating_source + "_spellathigherlevels"]) {
var lvl = parseInt(v[repeating_source + "_spelllevel"],10);
spelllevel = "?{Cast at what level?";
for(i = 0; i < 10-lvl; i++) {
spelllevel = spelllevel + "|Level " + (parseInt(i, 10) + parseInt(lvl, 10)) + "," + (parseInt(i, 10) + parseInt(lvl, 10));
}
spelllevel = spelllevel + "}";
}
update[repeating_source + "_rollcontent"] = "@{wtype}&{template:spell} {{level=@{spellschool} " + spelllevel + "}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} {{innate=@{innate}}} @{spellconcentration} @{charname_output}";
}
setAttrs(update, {silent: true});
});
});
on("change:repeating_spell-cantrip:spellathigherlevels change:repeating_spell-1:spellathigherlevels change:repeating_spell-2:spellathigherlevels change:repeating_spell-3:spellathigherlevels change:repeating_spell-4:spellathigherlevels change:repeating_spell-5:spellathigherlevels change:repeating_spell-6:spellathigherlevels change:repeating_spell-7:spellathigherlevels change:repeating_spell-8:spellathigherlevels change:repeating_spell-9:spellathigherlevels", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
var repeating_source = eventinfo.sourceAttribute.substring(0, eventinfo.sourceAttribute.lastIndexOf('_'));
getAttrs([repeating_source + "_spelllevel", repeating_source + "_spelloutput", repeating_source + "_spellathigherlevels"], function(v) {
var update = {};
var spelloutput = v[repeating_source + "_spelloutput"];
var lvl = v[repeating_source + "_spelllevel"];
if(spelloutput && spelloutput === "SPELLCARD") {
var spelllevel = "@{spelllevel}";
if(v[repeating_source + "_spellathigherlevels"]) {
var lvl = parseInt(v[repeating_source + "_spelllevel"],10);
spelllevel = "?{Cast at what level?";
for(i = 0; i < 10-lvl; i++) {
spelllevel = spelllevel + "|Level " + (parseInt(i, 10) + parseInt(lvl, 10)) + "," + (parseInt(i, 10) + parseInt(lvl, 10));
}
spelllevel = spelllevel + "}";
}
update[repeating_source + "_rollcontent"] = "@{wtype}&{template:spell} {{level=@{spellschool} " + spelllevel + "}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} {{innate=@{innate}}} @{spellconcentration} @{charname_output}";
}
setAttrs(update, {silent: true});
});
});
on("change:class change:custom_class change:cust_classname change:cust_hitdietype change:cust_spellcasting_ability change:cust_spellslots change:cust_strength_save_prof change:cust_dexterity_save_prof change:cust_constitution_save_prof change:cust_intelligence_save_prof change:cust_wisdom_save_prof change:cust_charisma_save_prof", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
update_class();
});
on("change:base_level change:multiclass1_flag change:multiclass1 change:multiclass1_lvl change:multiclass2_flag change:multiclass2 change:multiclass2_lvl change:multiclass3_flag change:multiclass3 change:multiclass3_lvl change:arcane_fighter change:arcane_rogue", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
set_level();
});
on("change:level_calculations change:caster_level change:lvl1_slots_mod change:lvl2_slots_mod change:lvl3_slots_mod change:lvl4_slots_mod change:lvl5_slots_mod change:lvl6_slots_mod change:lvl7_slots_mod change:lvl8_slots_mod change:lvl9_slots_mod", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
getAttrs(["level_calculations"], function(v) {
if(!v["level_calculations"] || v["level_calculations"] == "on") {
update_spell_slots();
};
});
});
on("change:caster_level", function(eventinfo) {
getAttrs(["caster_level","npc"], function(v) {
var casterlvl = v["caster_level"] && !isNaN(parseInt(v["caster_level"], 10)) ? parseInt(v["caster_level"], 10) : 0;
if(v["npc"] && v["npc"] == 1 && casterlvl > 0) {
setAttrs({level: casterlvl})
};
});
});
on("change:pb_type change:pb_custom", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
update_pb();
});
on("change:dtype", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
update_attacks("all");
update_npc_action("all");
});
on("change:jack_of_all_trades", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
update_jack_attr();
update_initiative();
update_skills(["athletics", "acrobatics", "sleight_of_hand", "stealth", "arcana", "history", "investigation", "nature", "religion", "animal_handling", "insight", "medicine", "perception", "survival","deception", "intimidation", "performance", "persuasion"]);
});
on("change:initmod change:init_tiebreaker", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
update_initiative();
});
on("change:spellcasting_ability change:spell_dc_mod change:globalmagicmod", function(eventinfo) {
if(eventinfo.sourceType && eventinfo.sourceType === "sheetworker") {
return;
}
update_spell_info();
update_attacks("spells");
});
on("change:npc_challenge", function() {
update_challenge();
});
on("change:npc_str_save_base change:npc_dex_save_base change:npc_con_save_base change:npc_int_save_base change:npc_wis_save_base change:npc_cha_save_base", function(eventinfo) {
update_npc_saves();
});
on("change:npc_acrobatics_base change:npc_animal_handling_base change:npc_arcana_base change:npc_athletics_base change:npc_deception_base change:npc_history_base change:npc_insight_base change:npc_intimidation_base change:npc_investigation_base change:npc_medicine_base change:npc_nature_base change:npc_perception_base change:npc_performance_base change:npc_persuasion_base change:npc_religion_base change:npc_sleight_of_hand_base change:npc_stealth_base change:npc_survival_base", function(eventinfo) {
update_npc_skills();
});
on("change:repeating_npcaction:attack_flag change:repeating_npcaction:attack_type change:repeating_npcaction:attack_range change:repeating_npcaction:attack_target change:repeating_npcaction:attack_tohit change:repeating_npcaction:attack_damage change:repeating_npcaction:attack_damagetype change:repeating_npcaction:attack_damage2 change:repeating_npcaction:attack_damagetype2 change:repeating_npcaction-l:attack_flag change:repeating_npcaction-l:attack_type change:repeating_npcaction-l:attack_range change:repeating_npcaction-l:attack_target change:repeating_npcaction-l:attack_tohit change:repeating_npcaction-l:attack_damage change:repeating_npcaction-l:attack_damagetype change:repeating_npcaction-l:attack_damage2 change:repeating_npcaction-l:attack_damagetype2 change:repeating_npc_action:show_desc change:repeating_npc_action-l:show_desc", function(eventinfo) {
var actionid = eventinfo.sourceAttribute.substring(20, 40);
var legendary = eventinfo.sourceAttribute.indexOf("npcaction-l") > -1 ? true : false;
if(legendary) {
actionid = eventinfo.sourceAttribute.substring(22, 42);
}
update_npc_action(actionid, legendary);
});
on("change:core_die change:halflingluck_flag", function() {
getAttrs(["core_die","halflingluck_flag"], function(v) {
core = v.core_die && v.core_die != "" ? v.core_die : "1d20";
luck = v.halflingluck_flag && v.halflingluck_flag === "1" ? "ro<1" : "";
update = {};
update["d20"] = core + luck;
if(!v.core_die || v.core_die === "") {
update["core_die"] = "1d20";
}
setAttrs(update);
});
});
on("change:global_attack_mod", function(eventinfo) {
if(eventinfo.newValue) {
getAttrs(["global_attack_mod_field"], function(v) {
if(!v["global_attack_mod_field"] || v["global_attack_mod_field"] === "") {
setAttrs({global_attack_mod_field: "1d4[BLESS]"})
}
});
};
});
on("change:global_damage_mod", function(eventinfo) {
if(eventinfo.newValue) {
getAttrs(["global_damage_mod_field"], function(v) {
if(!v["global_damage_mod_field"] || v["global_damage_mod_field"] === "") {
setAttrs({global_damage_mod_field: "1d6[SNEAK ATTACK]"})
}
});
};
});
on("change:global_attack_mod_field", function(eventinfo) {
if(!eventinfo.newValue) {
setAttrs({global_attack_mod: 0});
};
});
on("change:global_damage_mod_field", function(eventinfo) {
var update = {};
if(!eventinfo.newValue) {
update["global_damage_mod"] = 0;
update["global_damage_mod_crit"] = 0;
}
else {
update["global_damage_mod_crit"] = "{{globaldamagecrit=[[@{global_damage_mod_field}]]}}";
}
setAttrs(update);
});
on("change:confirm", function(eventinfo) {
getAttrs(["drop_category"], function(v) {
if(v["drop_category"]) {
handle_drop(v["drop_category"]);
}
});
});
on("change:cancel", function(eventinfo) {
cleanup_drop_fields();
});
on("remove:repeating_inventory", function(eventinfo) {
var itemid = eventinfo.sourceAttribute.substring(20, 40);
var attackid = eventinfo.removedInfo && eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemattackid"] ? eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemattackid"] : undefined;
var resourceid = eventinfo.removedInfo && eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemresourceid"] ? eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemresourceid"] : undefined;
if(attackid) {
remove_attack(attackid);
}
if(resourceid) {
remove_resource(resourceid);
}
if(eventinfo.removedInfo && eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemmodifiers"]) {
check_itemmodifiers(eventinfo.removedInfo["repeating_inventory_" + itemid + "_itemmodifiers"]);
}
update_weight();
});
on("remove:repeating_attack", function(eventinfo) {
var attackid = eventinfo.sourceAttribute.substring(17, 37);
var itemid = eventinfo.removedInfo["repeating_attack_" + attackid + "_itemid"];
var spellid = eventinfo.removedInfo["repeating_attack_" + attackid + "_spellid"];
var spelllvl = eventinfo.removedInfo["repeating_attack_" + attackid + "_spelllevel"];
if(itemid) {
getAttrs(["repeating_inventory_" + itemid + "_hasattack"], function(v) {
if(v["repeating_inventory_" + itemid + "_hasattack"] && v["repeating_inventory_" + itemid + "_hasattack"] == 1) {
var update = {};
update["repeating_inventory_" + itemid + "_itemattackid"] = "";
update["repeating_inventory_" + itemid + "_hasattack"] = 0;
setAttrs(update, {silent: true});
}
});
};
if(spellid && spelllvl) {
getAttrs(["repeating_spell-" + spelllvl + "_" + spellid + "_spelloutput"], function(v) {
if(v["repeating_spell-" + spelllvl + "_" + spellid + "_spelloutput"] && v["repeating_spell-" + spelllvl + "_" + spellid + "_spelloutput"] == "ATTACK") {
var update = {};
update["repeating_spell-" + spelllvl + "_" + spellid + "_spellattackid"] = "";
update["repeating_spell-" + spelllvl + "_" + spellid + "_spelloutput"] = "SPELLCARD";
setAttrs(update, {silent: true});
}
});
};
});
on("remove:repeating_resource", function(eventinfo) {
var resourceid = eventinfo.sourceAttribute.substring(19, 39);
var left_itemid = eventinfo.removedInfo["repeating_resource_" + resourceid + "_resource_left_itemid"];
var right_itemid = eventinfo.removedInfo["repeating_resource_" + resourceid + "_resource_right_itemid"];
var update = {};
if(left_itemid) {
update["repeating_inventory_" + left_itemid + "_useasresource"] = 0;
update["repeating_inventory_" + left_itemid + "_itemresourceid"] = "";
}
if(right_itemid) {
update["repeating_inventory_" + right_itemid + "_useasresource"] = 0;
update["repeating_inventory_" + right_itemid + "_itemresourceid"] = "";
}
setAttrs(update, {silent: true});
});
on("remove:repeating_spell-cantrip remove:repeating_spell-1 remove:repeating_spell-2 remove:repeating_spell-3 remove:repeating_spell-4 remove:repeating_spell-5 remove:repeating_spell-6 remove:repeating_spell-7 remove:repeating_spell-8 remove:repeating_spell-9", function(eventinfo) {
var attackid = eventinfo.removedInfo[eventinfo.sourceAttribute + "_spellattackid"];
if(attackid) {
remove_attack(attackid);
}
});
var update_attr = function(attr) {
var update = {};
var attr_fields = [attr + "_base",attr + "_bonus"];
getSectionIDs("repeating_inventory", function(idarray) {
_.each(idarray, function(currentID, i) {
attr_fields.push("repeating_inventory_" + currentID + "_equipped");
attr_fields.push("repeating_inventory_" + currentID + "_itemmodifiers");
});
getAttrs(attr_fields, function(v) {
var base = v[attr + "_base"] && !isNaN(parseInt(v[attr + "_base"], 10)) ? parseInt(v[attr + "_base"], 10) : 10;
var bonus = v[attr + "_bonus"] && !isNaN(parseInt(v[attr + "_bonus"], 10)) ? parseInt(v[attr + "_bonus"], 10) : 0;
var item_base = 0;
var item_bonus = 0;
_.each(idarray, function(currentID) {
if((!v["repeating_inventory_" + currentID + "_equipped"] || v["repeating_inventory_" + currentID + "_equipped"] === "1") && v["repeating_inventory_" + currentID + "_itemmodifiers"] && v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf(attr > -1)) {
var mods = v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().split(",");
_.each(mods, function(mod) {
if(mod.indexOf(attr) > -1 && mod.indexOf("save") === -1) {
if(mod.indexOf(":") > -1) {
var new_base = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
item_base = new_base && new_base > item_base ? new_base : item_base;
}
else if(mod.indexOf("-") > -1) {
var new_mod = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
item_bonus = new_mod ? item_bonus - new_mod : item_bonus;
}
else {
var new_mod = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
item_bonus = new_mod ? item_bonus + new_mod : item_bonus;
}
};
});
}
});
update[attr + "_flag"] = bonus > 0 || item_bonus > 0 || item_base > base ? 1 : 0;
base = base > item_base ? base : item_base;
update[attr] = base + bonus + item_bonus;
setAttrs(update);
});
});
};
var update_mod = function (attr) {
getAttrs([attr], function(v) {
var attr_abr = attr.substring(0,3);
var finalattr = v[attr] && isNaN(v[attr]) === false ? Math.floor((parseInt(v[attr], 10) - 10) / 2) : 0;
var update = {};
update[attr + "_mod"] = finalattr;
update["npc_" + attr_abr + "_negative"] = v[attr] && !isNaN(v[attr]) && parseInt(v[attr], 10) < 10 ? 1 : 0;
setAttrs(update);
});
};
var update_save = function (attr) {
console.log("UPDATING SAVE: " + attr);
var save_attrs = [attr + "_mod", attr + "_save_prof", attr + "_save_mod","pb","globalsavemod","pb_type"];
getSectionIDs("repeating_inventory", function(idarray) {
_.each(idarray, function(currentID, i) {
save_attrs.push("repeating_inventory_" + currentID + "_equipped");
save_attrs.push("repeating_inventory_" + currentID + "_itemmodifiers");
});
getAttrs(save_attrs, function(v) {
var attr_mod = v[attr + "_mod"] ? parseInt(v[attr + "_mod"], 10) : 0;
var prof = v[attr + "_save_prof"] && v[attr + "_save_prof"] != 0 && !isNaN(v["pb"]) ? parseInt(v["pb"], 10) : 0;
var save_mod = v[attr + "_save_mod"] && !isNaN(parseInt(v[attr + "_save_mod"], 10)) ? parseInt(v[attr + "_save_mod"], 10) : 0;
var global = v["globalsavemod"] && !isNaN(v["globalsavemod"]) ? parseInt(v["globalsavemod"], 10) : 0;
var items = 0;
_.each(idarray, function(currentID) {
if(v["repeating_inventory_" + currentID + "_equipped"] && v["repeating_inventory_" + currentID + "_equipped"] === "1" && v["repeating_inventory_" + currentID + "_itemmodifiers"] && (v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf("saving throws") > -1 || v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf(attr + " save") > -1)) {
var mods = v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().split(",");
_.each(mods, function(mod) {
if(mod.indexOf(attr + " save") > -1) {
var substr = mod.slice(mod.lastIndexOf(attr + " save") + attr.length + " save".length);
var bonus = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? parseInt(substr,10) : 0;
}
else if(mod.indexOf("saving throws") > -1) {
var substr = mod.slice(mod.lastIndexOf("saving throws") + "saving throws".length);
var bonus = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? parseInt(substr,10) : 0;
};
if(bonus && bonus != 0) {
items = items + bonus;
};
});
}
});
var total = attr_mod + prof + save_mod + global + items;
if(v["pb_type"] && v["pb_type"] === "die" && v[attr + "_save_prof"] != 0 && attr != "death") {
total = total + "+" + v["pb"];
};
var update = {};
update[attr + "_save_bonus"] = total;
setAttrs(update, {silent: true});
});
});
};
var update_all_saves = function() {
update_save("strength");
update_save("dexterity");
update_save("constitution");
update_save("intelligence");
update_save("wisdom");
update_save("charisma");
update_save("death");
};
var update_skills = function (skills_array) {
var skill_parent = {athletics: "strength", acrobatics: "dexterity", sleight_of_hand: "dexterity", stealth: "dexterity", arcana: "intelligence", history: "intelligence", investigation: "intelligence", nature: "intelligence", religion: "intelligence", animal_handling: "wisdom", insight: "wisdom", medicine: "wisdom", perception: "wisdom", survival: "wisdom", deception: "charisma", intimidation: "charisma", performance: "charisma", persuasion: "charisma"};
var attrs_to_get = ["pb","pb_type","jack_of_all_trades","jack"];
var update = {};
_.each(skills_array, function(s) {
if(skill_parent[s] && attrs_to_get.indexOf(skill_parent[s]) === -1) {attrs_to_get.push(skill_parent[s] + "_mod")};
attrs_to_get.push(s + "_prof");
attrs_to_get.push(s + "_type");
attrs_to_get.push(s + "_flat");
});
getSectionIDs("repeating_inventory", function(idarray) {
_.each(idarray, function(currentID, i) {
attrs_to_get.push("repeating_inventory_" + currentID + "_equipped");
attrs_to_get.push("repeating_inventory_" + currentID + "_itemmodifiers");
});
getAttrs(attrs_to_get, function(v) {
_.each(skills_array, function(s) {
console.log("UPDATING SKILL: " + s);
var attr_mod = v[skill_parent[s] + "_mod"] ? parseInt(v[skill_parent[s] + "_mod"], 10) : 0;
var prof = v[s + "_prof"] != 0 && !isNaN(v["pb"]) ? parseInt(v["pb"], 10) : 0;
var flat = v[s + "_flat"] && !isNaN(parseInt(v[s + "_flat"], 10)) ? parseInt(v[s + "_flat"], 10) : 0;
var type = v[s + "_type"] && !isNaN(parseInt(v[s + "_type"], 10)) ? parseInt(v[s + "_type"], 10) : 1;
var jack = v["jack_of_all_trades"] && v["jack_of_all_trades"] != 0 && v["jack"] ? v["jack"] : 0;
var item_bonus = 0;
_.each(idarray, function(currentID) {
if(v["repeating_inventory_" + currentID + "_equipped"] && v["repeating_inventory_" + currentID + "_equipped"] === "1" && v["repeating_inventory_" + currentID + "_itemmodifiers"] && v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf(s) > -1) {
var mods = v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().split(",");
_.each(mods, function(mod) {
if(mod.indexOf(s) > -1) {
if(mod.indexOf("-") > -1) {
var new_mod = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
item_bonus = new_mod ? item_bonus - new_mod : item_bonus;
}
else {
var new_mod = !isNaN(parseInt(mod.replace(/[^0-9]/g, ""), 10)) ? parseInt(mod.replace(/[^0-9]/g, ""), 10) : false;
item_bonus = new_mod ? item_bonus + new_mod : item_bonus;
}
};
});
};
});
var total = attr_mod + flat + item_bonus;
if(v["pb_type"] && v["pb_type"] === "die") {
if(v[s + "_prof"] != 0) {
type === 1 ? "" : "2"
total = total + "+" + type + v["pb"];
}
else if(v[s + "_prof"] == 0 && jack != 0) {
total = total + "+" + jack;
};
}
else {
if(v[s + "_prof"] != 0) {
total = total + (prof * type);
}
else if(v[s + "_prof"] == 0 && jack != 0) {
total = total + parseInt(jack, 10);
};
};
update[s + "_bonus"] = total;
});
setAttrs(update, {silent: true});
});
});
};
var update_tool = function(tool_id) {
if(tool_id.substring(0,1) === "-" && tool_id.length === 20) {
do_update_tool([tool_id]);
}
else if(tool_id === "all") {
getSectionIDs("repeating_tool", function(idarray) {
do_update_tool(idarray);
});
}
else {
getSectionIDs("repeating_tool", function(idarray) {
var tool_attribs = [];
_.each(idarray, function(id) {
tool_attribs.push("repeating_tool_" + id + "_toolattr_base");
});
getAttrs(tool_attribs, function(v) {
var attr_tool_ids = [];
_.each(idarray, function(id) {
if(v["repeating_tool_" + id + "_toolattr_base"] && v["repeating_tool_" + id + "_toolattr_base"].indexOf(tool_id) > -1) {
attr_tool_ids.push(id);
}
});
if(attr_tool_ids.length > 0) {
do_update_tool(attr_tool_ids);
}
});
});
};
};
var do_update_tool = function(tool_array) {
var tool_attribs = ["pb","pb_type","jack","strength_mod","dexterity_mod","constitution_mod","intelligence_mod","wisdom_mod","charisma_mod"];
var update = {};
_.each(tool_array, function(tool_id) {
tool_attribs.push("repeating_tool_" + tool_id + "_toolbonus_base");
tool_attribs.push("repeating_tool_" + tool_id + "_tool_mod");
tool_attribs.push("repeating_tool_" + tool_id + "_toolattr_base");
});
getAttrs(tool_attribs, function(v) {
_.each(tool_array, function(tool_id) {
console.log("UPDATING TOOL: " + tool_id);
if(v["repeating_tool_" + tool_id + "_toolattr_base"] && v["repeating_tool_" + tool_id + "_toolattr_base"].substring(0,2) === "?{") {
update["repeating_tool_" + tool_id + "_toolattr"] = "QUERY";
var mod = "?{Attribute?|Strength,@{strength_mod}|Dexterity,@{dexterity_mod}|Constitution,@{constitution_mod}|Intelligence,@{intelligence_mod}|Wisdom,@{wisdom_mod}|Charisma,@{charisma_mod}}";
if(v["repeating_tool_" + tool_id + "_tool_mod"]) {
mod = mod + "+" + v["repeating_tool_" + tool_id + "_tool_mod"];
}
}
else {
var attr = v["repeating_tool_" + tool_id + "_toolattr_base"].substring(0, v["repeating_tool_" + tool_id + "_toolattr_base"].length - 5).substr(2);
var attr_mod = v[attr + "_mod"] ? parseInt(v[attr + "_mod"], 10) : 0;
var tool_mod = v["repeating_tool_" + tool_id + "_tool_mod"] && !isNaN(parseInt(v["repeating_tool_" + tool_id + "_tool_mod"], 10)) ? parseInt(v["repeating_tool_" + tool_id + "_tool_mod"], 10) : 0;
var mod = attr_mod + tool_mod;
update["repeating_tool_" + tool_id + "_toolattr"] = attr.toUpperCase();
if(v["repeating_tool_" + tool_id + "_tool_mod"] && v["repeating_tool_" + tool_id + "_tool_mod"].indexOf("@{") > -1) {
update["repeating_tool_" + tool_id + "_toolbonus"] = update["repeating_tool_" + tool_id + "_toolbonus"] + "+" + v["repeating_tool_" + tool_id + "_tool_mod"];
}
if(!v["repeating_tool_" + tool_id + "_tool_mod"]) {
update["repeating_tool_" + tool_id + "_tool_mod"] = 0;
}
};
if(v["pb_type"] && v["pb_type"] === "die" ) {
if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb})") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + v.pb}
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb}*2)") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+2" + v.pb}
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(floor(@{pb}/2))") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + v.jack};
}
else if(v["repeating_tool_" + tool_id + "_toolattr_base"] && v["repeating_tool_" + tool_id + "_toolattr_base"].substring(0,2) === "?{") {
if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb})") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + parseInt(v.pb, 10)}
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb}*2)") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + (parseInt(v.pb, 10)*2)}
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(floor(@{pb}/2))") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + "+" + parseInt(v.jack, 10)};
}
else {
if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb})") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + parseInt(v.pb, 10)}
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(@{pb}*2)") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + (parseInt(v.pb, 10)*2)}
else if(v["repeating_tool_" + tool_id + "_toolbonus_base"] === "(floor(@{pb}/2))") {update["repeating_tool_" + tool_id + "_toolbonus"] = mod + parseInt(v.jack, 10)};
};
});
setAttrs(update, {silent: true});
});
};
var handle_drop = function(category, eventinfo) {
var callbacks = [];
var update = {};
var id = generateRowID();
getAttrs(["drop_name","drop_weight","drop_properties","drop_modifiers","drop_content","drop_itemtype","drop_damage","drop_damagetype","drop_damage2","drop_damagetype2","drop_range","drop_ac","drop_spellritualflag", "drop_spellschool", "drop_spellcastingtime", "drop_spelltarget", "drop_spellcomp", "drop_spellcomp_materials", "drop_spellconcentrationflag", "drop_spellduration", "drop_spellhealing", "drop_spelldmgmod", "drop_spellsave", "drop_spellsavesuccess", "drop_spellhldie", "drop_spellhldietype", "drop_spellhlbonus", "drop_spelllevel", "drop_spell_damage_progression", "drop_attack_type", "drop_speed", "drop_str", "drop_dex", "drop_con", "drop_int", "drop_wis", "drop_cha", "drop_vulnerabilities", "drop_resistances", "drop_immunities", "drop_condition_immunities", "drop_languages", "drop_challenge_rating", "drop_size", "drop_type", "drop_alignment", "drop_hp", "drop_saving_throws", "drop_senses", "drop_passive_perception", "drop_skills", "drop_token_size", "character_id"], function(v) {
if(category === "Items") {
update["tab"] = "core";
if(v.drop_name) {update["repeating_inventory_" + id + "_itemname"] = v.drop_name};
if(v.drop_weight) {update["repeating_inventory_" + id + "_itemweight"] = v.drop_weight};
if(v.drop_properties) {update["repeating_inventory_" + id + "_itemproperties"] = v.drop_properties};
if(v.drop_content) {update["repeating_inventory_" + id + "_itemcontent"] = v.drop_content};
if(!v.drop_itemtype || v.drop_itemtype == "") {v.drop_itemtype = category};
var mods = "Item Type: " + v.drop_itemtype;
if(v.drop_ac && v.drop_ac != "") {
mods += ", AC: " + v.drop_ac;
callbacks.push( function() {update_ac();} )
};
if(v.drop_damage && v.drop_damage != "") {mods += ", Damage: " + v.drop_damage};
if(v.drop_damagetype && v.drop_damagetype != "") {mods += ", Damage Type: " + v.drop_damagetype};
if(v.drop_damage2 && v.drop_damage2 != "") {mods += ", Secondary Damage: " + v.drop_damage2};
if(v.drop_damagetype2 && v.drop_damagetype2 != "") {mods += ", Secondary Damage Type: " + v.drop_damagetype2};
if(v.drop_range && v.drop_range != "") {mods += ", Range: " + v.drop_range};
if(v.drop_modifiers && v.drop_modifiers != "") {mods += ", " + v.drop_modifiers};
update["repeating_inventory_" + id + "_itemmodifiers"] = mods;
if(v.drop_itemtype.indexOf("Weapon") > -1) {
update["repeating_inventory_" + id + "_hasattack"] = 1;
callbacks.push( function() {create_attack_from_item(id);} );
}
else if(v.drop_itemtype.indexOf("Ammunition") > -1) {
update["repeating_inventory_" + id + "_useasresource"] = 1;
callbacks.push( function() {create_resource_from_item(id);} );
};
if(v["drop_modifiers"]) {
callbacks.push( function() {check_itemmodifiers(v["drop_modifiers"]);} );
};
callbacks.push( function() {update_weight();} );
};
if(category === "Spells") {
var lvl = v.drop_spelllevel && v.drop_spelllevel > 0 ? v.drop_spelllevel : "cantrip";
update["repeating_spell-" + lvl + "_" + id + "_spelllevel"] = lvl;
if(v.drop_name) {update["repeating_spell-" + lvl + "_" + id + "_spellname"] = v.drop_name};
if(v.drop_spellritualflag) {update["repeating_spell-" + lvl + "_" + id + "_spellritual"] = "{{ritual=1}}"};
if(v.drop_spellschool) {update["repeating_spell-" + lvl + "_" + id + "_spellschool"] = v.drop_spellschool.toLowerCase()};
if(v.drop_spellcastingtime) {update["repeating_spell-" + lvl + "_" + id + "_spellcastingtime"] = v.drop_spellcastingtime};
if(v.drop_range) {update["repeating_spell-" + lvl + "_" + id + "_spellrange"] = v.drop_range};
if(v.drop_spelltarget) {update["repeating_spell-" + lvl + "_" + id + "_spelltarget"] = v.drop_spelltarget};
if(v.drop_spellcomp) {
if(v.drop_spellcomp.toLowerCase().indexOf("v") === -1) {update["repeating_spell-" + lvl + "_" + id + "_spellcomp_v"] = "0"};
if(v.drop_spellcomp.toLowerCase().indexOf("s") === -1) {update["repeating_spell-" + lvl + "_" + id + "_spellcomp_s"] = "0"};
if(v.drop_spellcomp.toLowerCase().indexOf("m") === -1) {update["repeating_spell-" + lvl + "_" + id + "_spellcomp_m"] = "0"};
};
if(v.drop_spellcomp_materials) {update["repeating_spell-" + lvl + "_" + id + "_spellcomp_materials"] = v.drop_spellcomp_materials};
if(v.drop_spellconcentrationflag) {update["repeating_spell-" + lvl + "_" + id + "_spellconcentration"] = "{{concentration=1}}"};
if(v.drop_spellduration) {update["repeating_spell-" + lvl + "_" + id + "_spellduration"] = v.drop_spellduration};
if(v.drop_damage || v.drop_spellhealing) {
update["repeating_spell-" + lvl + "_" + id + "_spelloutput"] = "ATTACK";
callbacks.push( function() {create_attack_from_spell(lvl, id, v["character_id"]);} );
}
else if(v.drop_content && v.drop_content.indexOf("At Higher Levels:") > -1) {
var spelllevel = "?{Cast at what level?";
for(i = 0; i < 10-lvl; i++) {
spelllevel = spelllevel + "|Level " + (parseInt(i, 10) + parseInt(lvl, 10)) + "," + (parseInt(i, 10) + parseInt(lvl, 10));
}
spelllevel = spelllevel + "}";
update["repeating_spell-" + lvl + "_" + id + "_rollcontent"] = "@{wtype}&{template:spell} {{level=@{spellschool} " + spelllevel + "}} {{name=@{spellname}}} {{castingtime=@{spellcastingtime}}} {{range=@{spellrange}}} {{target=@{spelltarget}}} @{spellcomp_v} @{spellcomp_s} @{spellcomp_m} {{material=@{spellcomp_materials}}} {{duration=@{spellduration}}} {{description=@{spelldescription}}} {{athigherlevels=@{spellathigherlevels}}} @{spellritual} {{innate=@{innate}}} @{spellconcentration} @{charname_output}";
};
if(v.drop_attack_type) {update["repeating_spell-" + lvl + "_" + id + "_spellattack"] = v.drop_attack_type};
if(v.drop_damage) {update["repeating_spell-" + lvl + "_" + id + "_spelldamage"] = v.drop_damage};
if(v.drop_damagetype) {update["repeating_spell-" + lvl + "_" + id + "_spelldamagetype"] = v.drop_damagetype};
if(v.drop_damage2) {update["repeating_spell-" + lvl + "_" + id + "_spelldamage2"] = v.drop_damage2};
if(v.drop_damagetype2) {update["repeating_spell-" + lvl + "_" + id + "_spelldamagetype2"] = v.drop_damagetype2};
if(v.drop_spellhealing) {update["repeating_spell-" + lvl + "_" + id + "_spellhealing"] = v.drop_spellhealing;};
if(v.drop_spelldmgmod) {update["repeating_spell-" + lvl + "_" + id + "_spelldmgmod"] = v.drop_spelldmgmod};
if(v.drop_spellsave) {update["repeating_spell-" + lvl + "_" + id + "_spellsave"] = v.drop_spellsave};
if(v.drop_spellsavesuccess) {update["repeating_spell-" + lvl + "_" + id + "_spellsavesuccess"] = v.drop_spellsavesuccess};
if(v.drop_spellhldie) {update["repeating_spell-" + lvl + "_" + id + "_spellhldie"] = v.drop_spellhldie};
if(v.drop_spellhldietype) {update["repeating_spell-" + lvl + "_" + id + "_spellhldietype"] = v.drop_spellhldietype};
if(v.drop_spellhlbonus) {update["repeating_spell-" + lvl + "_" + id + "_spellhlbonus"] = v.drop_spellhlbonus};
if(v.drop_spell_damage_progression && lvl == "cantrip") {update["repeating_spell-" + lvl + "_" + id + "_spell_damage_progression"] = v.drop_spell_damage_progression};
if(v.drop_content && v.drop_content != "") {
var content = v.drop_content.split("At Higher Levels:");
if(content.length > 1) {
update["repeating_spell-" + lvl + "_" + id + "_spelldescription"] = content[0].trim();
update["repeating_spell-" + lvl + "_" + id + "_spellathigherlevels"] = content[1].trim();
}
else {
update["repeating_spell-" + lvl + "_" + id + "_spelldescription"] = v.drop_content.trim();
}
};
update["repeating_spell-" + lvl + "_" + id + "_options-flag"] = "0";
};
if(category === "Monsters") {
update["npc"] = "1";
update["npc_options-flag"] = "0";
if(v["drop_name"] && v["drop_name"] != "") {update["npc_name"] = v["drop_name"]};
update["npc_speed"] = v["drop_speed"] ? v["drop_speed"] : "";
update["strength_base"] = v["drop_str"] ? v["drop_str"] : "";
update["dexterity_base"] = v["drop_dex"] ? v["drop_dex"] : "";
update["constitution_base"] = v["drop_con"] ? v["drop_con"] : "";
update["intelligence_base"] = v["drop_int"] ? v["drop_int"] : "";
update["wisdom_base"] = v["drop_wis"] ? v["drop_wis"] : "";
update["charisma_base"] = v["drop_cha"] ? v["drop_cha"] : "";
callbacks.push( function() {update_attr("strength");} );
callbacks.push( function() {update_attr("dexterity");} );
callbacks.push( function() {update_attr("constitution");} );
callbacks.push( function() {update_attr("intelligence");} );
callbacks.push( function() {update_attr("wisdom");} );
callbacks.push( function() {update_attr("charisma");} );
update["npc_vulnerabilities"] = v["drop_vulnerabilities"] ? v["drop_vulnerabilities"] : "";
update["npc_resistances"] = v["drop_resistances"] ? v["drop_resistances"] : "";
update["npc_immunities"] = v["drop_immunities"] ? v["drop_immunities"] : "";
update["npc_condition_immunities"] = v["drop_condition_immunities"] ? v["drop_condition_immunities"] : "";
update["npc_languages"] = v["drop_languages"] ? v["drop_languages"] : "";
update["token_size"] = v["drop_token_size"] ? v["drop_token_size"] : "";
if(v["drop_challenge_rating"] && v["drop_challenge_rating"] != "") {
callbacks.push( function() {update_challenge();} );
update["npc_challenge"] = v["drop_challenge_rating"];
}
else {
update["npc_challenge"] = "";
}
var type = "";
if(v["drop_size"]) {type = v["drop_size"]};
if(v["drop_type"]) {
if(type.length > 0) {
type = type + " " + v["drop_type"].toLowerCase();
}
else {
type = v["drop_type"].toLowerCase();
}
};
if(v["drop_alignment"]) {
if(type.length > 0) {
type = type + ", " + v["drop_alignment"];
}
else {
type = v["drop_alignment"];
}
};
update["npc_type"] = type;
if(v["drop_hp"]) {
if(v["drop_hp"].indexOf("(") > -1) {
update["hp_max"] = v["drop_hp"].split(" (")[0];
update["npc_hpformula"] = v["drop_hp"].split(" (")[1].slice(0, -1);
}
else {
update["hp_max"] = v["drop_hp"]
update["npc_hpformula"] = ""
};
}
else {
update["hp_max"] = ""
update["npc_hpformula"] = ""
};
if(v["drop_ac"]) {
if(v["drop_ac"].indexOf("(") > -1) {
update["npc_ac"] = v["drop_ac"].split(" (")[0];
update["npc_actype"] = v["drop_ac"].split(" (")[1].slice(0, -1);
}
else {
update["npc_ac"] = v["drop_ac"];
update["npc_actype"] = "";
};
}
else {
update["npc_ac"] = "";
update["npc_actype"] = "";
};
if(v["drop_hp"]) {
if(v["drop_hp"].indexOf("(") > -1) {
update["hp_max"] = v["drop_hp"].split(" (")[0];
update["npc_hpformula"] = v["drop_hp"].split(" (")[1].slice(0, -1);
}
else {
update["hp_max"] = v["drop_hp"];
update["npc_hpformula"] = "";
}
}
else {
update["hp_max"] = "";
update["npc_hpformula"] = "";
};
var senses = v["drop_senses"] ? v["drop_senses"] : "";
if(v["drop_passive_perception"]) {
if(senses.length > 0) {
senses = senses + ", passive Perception " + v["drop_passive_perception"];
}
else {
senses = v["drop_passive_perception"];
}
}
update["npc_senses"] = senses;
update["npc_str_save_base"] = "";
update["npc_dex_save_base"] = "";
update["npc_con_save_base"] = "";
update["npc_int_save_base"] = "";
update["npc_wis_save_base"] = "";
update["npc_cha_save_base"] = "";
if(v["drop_saving_throws"] && v["drop_saving_throws"] != "") {
var savearray = v["drop_saving_throws"].split(", ");
_.each(savearray, function(save) {
kv = save.indexOf("-") > -1 ? save.split(" ") : save.split(" +");
update["npc_" + kv[0].toLowerCase() + "_save_base"] = parseInt(kv[1], 10);
});
callbacks.push( function() {update_npc_saves();} );
};
update["npc_acrobatics_base"] = "";
update["npc_animal_handling_base"] = "";
update["npc_arcana_base"] = "";
update["npc_athletics_base"] = "";
update["npc_deception_base"] = "";
update["npc_history_base"] = "";
update["npc_insight_base"] = "";
update["npc_intimidation_base"] = "";
update["npc_investigation_base"] = "";
update["npc_medicine_base"] = "";
update["npc_nature_base"] = "";
update["npc_perception_base"] = "";
update["npc_performance_base"] = "";
update["npc_persuasion_base"] = "";
update["npc_religion_base"] = "";
update["npc_sleight_of_hand_base"] = "";
update["npc_stealth_base"] = "";
update["npc_survival_base"] = "";
if(v["drop_skills"] && v["drop_skills"] != "") {
skillarray = v["drop_skills"].split(", ");
_.each(skillarray, function(skill) {
kv = skill.indexOf("-") > -1 ? skill.split(" ") : skill.split(" +");
update["npc_" + kv[0].toLowerCase().replace(/ /g, '_') + "_base"] = parseInt(kv[1], 10);
});
callbacks.push( function() {update_npc_skills();} );
}
getSectionIDs("repeating_npcaction-l", function(idarray) {
_.each(idarray, function(currentID, i) {
removeRepeatingRow("repeating_npcaction-l_" + currentID);
});
});
getSectionIDs("repeating_npcreaction", function(idarray) {
_.each(idarray, function(currentID, i) {
removeRepeatingRow("repeating_npcreaction_" + currentID);
});
});
getSectionIDs("repeating_npcaction", function(idarray) {
_.each(idarray, function(currentID, i) {
removeRepeatingRow("repeating_npcaction_" + currentID);
});
});
getSectionIDs("repeating_npctrait", function(idarray) {
_.each(idarray, function(currentID, i) {
removeRepeatingRow("repeating_npctrait_" + currentID);
});
});
var contentarray = v["drop_content"];
if(contentarray && contentarray.indexOf("Legendary Actions") > -1) {
if(contentarray.indexOf(/\n Legendary Actions\n/) > -1) {
temp = contentarray.split(/\n Legendary Actions\n/)
}
else {
temp = contentarray.split(/Legendary Actions\n/)
}
var legendaryactionsarray = temp[1];
contentarray = temp[0];
}
if(contentarray && contentarray.indexOf("Reactions") > -1) {
if(contentarray.indexOf(/\n Reactions\n/) > -1) {
temp = contentarray.split(/\n Reactions\n/)
}
else {
temp = contentarray.split(/Reactions\n/)
}
var reactionsarray = temp[1];
contentarray = temp[0];
}
if(contentarray && contentarray.indexOf("Actions") > -1) {
if(contentarray.indexOf("Lair Actions") > -1) {
contentarray = contentarray.replace("Lair Actions","Lair Action");
}
if(contentarray.indexOf(/\n Actions\n/) > -1) {
temp = contentarray.split(/\n Actions\n/)
}
else {
temp = contentarray.split(/Actions\n/)
}
var actionsarray = temp[1];
contentarray = temp[0];
}
if(contentarray && contentarray.indexOf("Traits") > -1) {
if(contentarray.indexOf("Lair Traits") > -1) {
contentarray = contentarray.replace("Lair Traits","Lair Trait");
}
if(contentarray.indexOf(/\n Traits\n/) > -1) {
temp = contentarray.split(/\n Traits\n/)
}
else {
temp = contentarray.split(/Traits\n/)
}
var traitsarray = temp[1];
contentarray = temp[0];
}
if(traitsarray) {
traitsarray = traitsarray.split("**");
traitsarray.shift();
var traitsobj = {};
traitsarray.forEach(function(val, i) {
if (i % 2 === 1) return;
traitsobj[val] = traitsarray[i + 1];
});
_.each(traitsobj, function(desc, name) {
newrowid = generateRowID();
update["repeating_npctrait_" + newrowid + "_name"] = name + ".";
if(desc.substring(0,2) === ": " || encodeURI(desc.substring(0,2)) === ":%C2%A0") {
desc = desc.substring(2);
}
update["repeating_npctrait_" + newrowid + "_desc"] = desc.trim();
// SPELLCASTING NPCS
if(name === "Spellcasting") {
var lvl = parseInt(desc.substring(desc.indexOf("-level")-4, desc.indexOf("-level")-2).trim(), 10);
lvl = !isNaN(lvl) ? lvl : 1;
var ability = desc.match(/casting ability is (.*?) /);
ability = ability && ability.length > 1 ? ability[1] : false;
ability = ability ? "@{" + ability.toLowerCase() + "_mod}+" : "0*";
update["npcspellcastingflag"] = 1;
update["spellcasting_ability"] = ability;
update["caster_level"] = lvl;
update["class"] = "Wizard";
update["base_level"] = lvl;
update["level"] = lvl;
callbacks.push( function() {update_pb();} );
callbacks.push( function() {update_spell_slots();} );
}
});
}
if(actionsarray) {
actionsarray = actionsarray.split("**");
actionsarray.shift();
var actionsobj = {};
actionsarray.forEach(function(val, i) {
if (i % 2 === 1) return;
actionsobj[val] = actionsarray[i + 1];
});
_.each(actionsobj, function(desc, name) {
newrowid = generateRowID();
update["repeating_npcaction_" + newrowid + "_npc_options-flag"] = "0";
update["repeating_npcaction_" + newrowid + "_name"] = name;
if(desc.substring(0,2) === ": " || encodeURI(desc.substring(0,2)) === ":%C2%A0") {
desc = desc.substring(2);
}
if(desc.indexOf(" Attack:") > -1) {
update["repeating_npcaction_" + newrowid + "_attack_flag"] = "on";
update["repeating_npcaction_" + newrowid + "_attack_display_flag"] = "{{attack=1}}";
update["repeating_npcaction_" + newrowid + "_attack_options"] = "{{attack=1}}";
if(desc.indexOf(" Weapon Attack:") > -1) {
attacktype = desc.split(" Weapon Attack:")[0];
}
else if(desc.indexOf(" Spell Attack:") > -1) {
attacktype = desc.split(" Spell Attack:")[0];
}
else {
console.log("FAILED TO IMPORT ATTACK - NO ATTACK TYPE FOUND (Weapon Attack/Spell Attack)");
return;
}
update["repeating_npcaction_" + newrowid + "_attack_type"] = attacktype;
if(attacktype === "Melee") {
update["repeating_npcaction_" + newrowid + "_attack_range"] = (desc.match(/reach (.*?),/) || ["",""])[1];
}
else {
update["repeating_npcaction_" + newrowid + "_attack_range"] = (desc.match(/range (.*?),/) || ["",""])[1];
}
update["repeating_npcaction_" + newrowid + "_attack_tohit"] = (desc.match(/\+(.*) to hit/) || ["",""])[1];
update["repeating_npcaction_" + newrowid + "_attack_target"] = (desc.match(/\.,(?!.*\.,)(.*)\. Hit:/) || ["",""])[1];
if(desc.toLowerCase().indexOf("damage") > -1) {
update["repeating_npcaction_" + newrowid + "_attack_damage"] = (desc.match(/\(([^)]+)\)/) || ["",""])[1];
update["repeating_npcaction_" + newrowid + "_attack_damagetype"] = (desc.match(/\) (.*?) damage/) || ["",""])[1];
if((desc.match(/\(/g) || []).length > 1 && desc.match(/\((?!.*\()([^)]+)\)/)) {
var second_match = desc.match(/\((?!.*\()([^)]+)\)/);
if(second_match[1] && second_match[1].indexOf(" DC") === -1) {
update["repeating_npcaction_" + newrowid + "_attack_damage2"] = (desc.match(/\((?!.*\()([^)]+)\)/) || ["",""])[1];
update["repeating_npcaction_" + newrowid + "_attack_damagetype2"] = (desc.match(/\)(?!.*\)) (.*?) damage/) || ["",""])[1];
};
};
ctest1 = desc.split("damage.")[1];
ctest2 = desc.split("damage, ")[1];
if(ctest1 && ctest1.length > 0) {
update["repeating_npcaction_" + newrowid + "_description"] = ctest1.trim();
}
else if(ctest2 && ctest2.length > 0) {
update["repeating_npcaction_" + newrowid + "_description"] = ctest2.trim();
}
}
else {
update["repeating_npcaction_" + newrowid + "_description"] = desc.split("Hit:")[1].trim();
}
}
else {
update["repeating_npcaction_" + newrowid + "_description"] = desc;
}
});
callbacks.push( function() {update_npc_action("all");} );
}
if(reactionsarray) {
update["npcreactionsflag"] = 1;
reactionsarray = reactionsarray.split("**");
reactionsarray.shift();
var reactionsobj = {};
reactionsarray.forEach(function(val, i) {
if (i % 2 === 1) return;
reactionsobj[val] = reactionsarray[i + 1];
});
_.each(reactionsobj, function(desc, name) {
newrowid = generateRowID();
update["repeating_npcreaction_" + newrowid + "_name"] = name + ".";
if(desc.substring(0,2) === ": " || encodeURI(desc.substring(0,2)) === ":%C2%A0") {
desc = desc.substring(2);
}
update["repeating_npcreaction_" + newrowid + "_desc"] = desc.trim();
});
}
if(legendaryactionsarray) {
update["npc_legendary_actions"] = (legendaryactionsarray.match(/\d+/) || [""])[0];
legendaryactionsarray = legendaryactionsarray.split("**");
legendaryactionsarray.shift();
var actionsobj = {};
legendaryactionsarray.forEach(function(val, i) {
if (i % 2 === 1) return;
actionsobj[val] = legendaryactionsarray[i + 1];
});
_.each(actionsobj, function(desc, name) {
newrowid = generateRowID();
update["repeating_npcaction-l_" + newrowid + "_npc_options-flag"] = "0";
update["repeating_npcaction-l_" + newrowid + "_name"] = name;
if(desc.substring(0,2) === ": " || encodeURI(desc.substring(0,2)) === ":%C2%A0") {
desc = desc.substring(2);
}
if(desc.indexOf(" Attack:") > -1) {
update["repeating_npcaction-l_" + newrowid + "_attack_flag"] = "on";
update["repeating_npcaction-l_" + newrowid + "_attack_display_flag"] = "{{attack=1}}";
update["repeating_npcaction-l_" + newrowid + "_attack_options"] = "{{attack=1}}";
if(desc.indexOf(" Weapon Attack:") > -1) {
attacktype = desc.split(" Weapon Attack:")[0];
}
else if(desc.indexOf(" Spell Attack:") > -1) {
attacktype = desc.split(" Spell Attack:")[0];
}
else {
console.log("FAILED TO IMPORT ATTACK - NO ATTACK TYPE FOUND (Weapon Attack/Spell Attack)");
return;
}
update["repeating_npcaction-l_" + newrowid + "_attack_type"] = attacktype;
if(attacktype === "Melee") {
update["repeating_npcaction-l_" + newrowid + "_attack_range"] = (desc.match(/reach (.*?),/) || ["",""])[1];
}
else {
update["repeating_npcaction-l_" + newrowid + "_attack_range"] = (desc.match(/range (.*?),/) || ["",""])[1];
}
update["repeating_npcaction-l_" + newrowid + "_attack_tohit"] = (desc.match(/\+(.*) to hit/) || ["",""])[1];
update["repeating_npcaction-l_" + newrowid + "_attack_target"] = (desc.match(/\.,(?!.*\.,)(.*)\. Hit:/) || ["",""])[1];
update["repeating_npcaction-l_" + newrowid + "_attack_damage"] = (desc.match(/\(([^)]+)\)/) || ["",""])[1];
update["repeating_npcaction-l_" + newrowid + "_attack_damagetype"] = (desc.match(/\) (.*?) damage/) || ["",""])[1];
if((desc.match(/\(/g) || []).length > 1 && (!desc.match(/\((?!.*\()([^)]+)\)/).indexOf(" DC")[1] || desc.match(/\((?!.*\()([^)]+)\)/).indexOf(" DC")[1] === -1)) {
update["repeating_npcaction-l_" + newrowid + "_attack_damage2"] = (desc.match(/\((?!.*\()([^)]+)\)/) || ["",""])[1];
update["repeating_npcaction-l_" + newrowid + "_attack_damagetype2"] = (desc.match(/\)(?!.*\)) (.*?) damage/) || ["",""])[1];
}
}
else {
update["repeating_npcaction-l_" + newrowid + "_description"] = desc;
}
});
}
};
callbacks.push( function() {cleanup_drop_fields();} );
setAttrs(update, {silent: true}, function() {callbacks.forEach(function(callback) {callback(); })} );
});
};
var cleanup_drop_fields = function() {
var update = {};
update["drop_name"] = "";
update["drop_weight"] = "";
update["drop_properties"] = "";
update["drop_modifiers"] = "";
update["drop_content"] = "";
update["drop_itemtype"] = "";
update["drop_damage"] = "";
update["drop_damagetype"] = "";
update["drop_range"] = "";
update["drop_ac"] = "";
update["drop_attack_type"] = "";
update["drop_damage2"] = "";
update["drop_damagetype2"] = "";
update["drop_spellritualflag"] = "";
update["drop_spellschool"] = "";
update["drop_spellcastingtime"] = "";
update["drop_spelltarget"] = "";
update["drop_spellcomp"] = "";
update["drop_spellcomp_materials"] = "";
update["drop_spellconcentrationflag"] = "";
update["drop_spellduration"] = "";
update["drop_spellhealing"] = "";
update["drop_spelldmgmod"] = "";
update["drop_spellsave"] = "";
update["drop_spellsavesuccess"] = "";
update["drop_spellhldie"] = "";
update["drop_spellhldietype"] = "";
update["drop_spellhlbonus"] = "";
update["drop_spelllevel"] = "";
update["drop_spell_damage_progression"] = "";
update["drop_category"] = "";
update["drop_speed"] = "";
update["drop_str"] = "";
update["drop_dex"] = "";
update["drop_con"] = "";
update["drop_int"] = "";
update["drop_wis"] = "";
update["drop_cha"] = "";
update["drop_vulnerabilities"] = "";
update["drop_resistances"] = "";
update["drop_immunities"] = "";
update["drop_condition_immunities"] = "";
update["drop_languages"] = "";
update["drop_challenge_rating"] = "";
update["drop_size"] = "";
update["drop_type"] = "";
update["drop_alignment"] = "";
update["drop_hp"] = "";
update["drop_saving_throws"] = "";
update["drop_senses"] = "";
update["drop_passive_perception"] = "";
update["drop_skills"] = "";
update["drop_token_size"] = "";
update["monster_confirm_flag"] = 0;
setAttrs(update, {silent: true});
};
var check_itemmodifiers = function(modifiers, previousValue) {
var mods = modifiers.toLowerCase().split(",");
if(previousValue) {
prevmods = previousValue.toLowerCase().split(",");
mods = _.union(mods, prevmods);
};
_.each(mods, function(mod) {
if(mod.indexOf("ac:") > -1 || mod.indexOf("ac +") > -1 || mod.indexOf("ac -") > -1) {update_ac();};
if(mod.indexOf("spell") > -1) {update_spell_info();};
if(mod.indexOf("saving throws") > -1) {update_all_saves();};
if(mod.indexOf("strength save") > -1) {update_save("strength");} else if(mod.indexOf("strength") > -1) {update_attr("strength");};
if(mod.indexOf("dexterity save") > -1) {update_save("dexterity");} else if(mod.indexOf("dexterity") > -1) {update_attr("dexterity");};
if(mod.indexOf("constitution save") > -1) {update_save("constitution");} else if(mod.indexOf("constitution") > -1) {update_attr("constitution");};
if(mod.indexOf("intelligence save") > -1) {update_save("intelligence");} else if(mod.indexOf("intelligence") > -1) {update_attr("intelligence");};
if(mod.indexOf("wisdom save") > -1) {update_save("wisdom");} else if(mod.indexOf("wisdom") > -1) {update_attr("wisdom");};
if(mod.indexOf("charisma save") > -1) {update_save("charisma");} else if(mod.indexOf("charisma") > -1) {update_attr("charisma");};
if(mod.indexOf("acrobatics") > -1) {update_skills(["acrobatics"]);};
if(mod.indexOf("animal handling") > -1) {update_skills(["animal_handling"]);};
if(mod.indexOf("arcana") > -1) {update_skills(["arcana"]);};
if(mod.indexOf("athletics") > -1) {update_skills(["athletics"]);};
if(mod.indexOf("deception") > -1) {update_skills(["deception"]);};
if(mod.indexOf("history") > -1) {update_skills(["history"]);};
if(mod.indexOf("insight") > -1) {update_skills(["insight"]);};
if(mod.indexOf("intimidation") > -1) {update_skills(["intimidation"]);};
if(mod.indexOf("investigation") > -1) {update_skills(["investigation"]);};
if(mod.indexOf("medicine") > -1) {update_skills(["medicine"]);};
if(mod.indexOf("nature") > -1) {update_skills(["nature"]);};
if(mod.indexOf("perception") > -1) {update_skills(["perception"]);};
if(mod.indexOf("performance") > -1) {update_skills(["performance"]);};
if(mod.indexOf("persuasion") > -1) {update_skills(["persuasion"]);};
if(mod.indexOf("religion") > -1) {update_skills(["religion"]);};
if(mod.indexOf("sleight of hand") > -1) {update_skills(["sleight_of_hand"]);};
if(mod.indexOf("stealth") > -1) {update_skills(["stealth"]);};
if(mod.indexOf("survival") > -1) {update_skills(["survival"]);};
});
};
var create_attack_from_item = function(itemid) {
var update = {};
var newrowid = generateRowID();
update["repeating_inventory_" + itemid + "_itemattackid"] = newrowid;
setAttrs(update, {}, update_attack_from_item(itemid, newrowid, true));
};
var update_attack_from_item = function(itemid, attackid, newattack) {
getAttrs(["repeating_inventory_" + itemid + "_itemname","repeating_inventory_" + itemid + "_itemproperties","repeating_inventory_" + itemid + "_itemmodifiers"], function(v) {
var update = {}; var itemtype; var damage; var damagetype; var damage2; var damagetype2; var attackmod; var damagemod; var range;
if(newattack) {
update["repeating_attack_" + attackid + "_options-flag"] = "0";
update["repeating_attack_" + attackid + "_itemid"] = itemid;
}
if(v["repeating_inventory_" + itemid + "_itemmodifiers"] && v["repeating_inventory_" + itemid + "_itemmodifiers"] != "") {
var mods = v["repeating_inventory_" + itemid + "_itemmodifiers"].split(",");
_.each(mods, function(mod) {
if(mod.indexOf("Item Type:") > -1) {itemtype = mod.split(":")[1].trim()}
else if(mod.indexOf("Secondary Damage Type:") > -1) {damagetype2 = mod.split(":")[1].trim()}
else if(mod.indexOf("Secondary Damage:") > -1) {damage2 = mod.split(":")[1].trim()}
else if(mod.indexOf("Damage Type:") > -1) {damagetype = mod.split(":")[1].trim()}
else if(mod.indexOf("Damage:") > -1) {damage = mod.split(":")[1].trim()}
else if(mod.indexOf("Range:") > -1) {range = mod.split(":")[1].trim()}
else if(mod.indexOf(" Attacks ") > -1) {attackmod = mod.split(" Attacks ")[1].trim()}
else if(mod.indexOf(" Damage ") > -1) {damagemod = mod.split(" Damage ")[1].trim()}
});
}
if(v["repeating_inventory_" + itemid + "_itemname"] && v["repeating_inventory_" + itemid + "_itemname"] != "") {
update["repeating_attack_" + attackid + "_atkname"] = v["repeating_inventory_" + itemid + "_itemname"];
}
if(damage) {
update["repeating_attack_" + attackid + "_dmgbase"] = damage;
}
if(damagetype) {
update["repeating_attack_" + attackid + "_dmgtype"] = damagetype;
}
if(damage2) {
update["repeating_attack_" + attackid + "_dmg2base"] = damage2;
update["repeating_attack_" + attackid + "_dmg2attr"] = 0;
update["repeating_attack_" + attackid + "_dmg2flag"] = "{{damage=1}} {{dmg2flag=1}}";
}
if(damagetype2) {
update["repeating_attack_" + attackid + "_dmg2type"] = damagetype2;
}
if(range) {
update["repeating_attack_" + attackid + "_atkrange"] = range;
}
if( (itemtype && itemtype.indexOf("Ranged") > -1) || (v["repeating_inventory_" + itemid + "_itemproperties"] && v["repeating_inventory_" + itemid + "_itemproperties"].toLowerCase().indexOf("finesse") > -1) ) {
update["repeating_attack_" + attackid + "_atkattr_base"] = "@{dexterity_mod}";
update["repeating_attack_" + attackid + "_dmgattr"] = "@{dexterity_mod}";
}
else {
update["repeating_attack_" + attackid + "_atkattr_base"] = "@{strength_mod}";
update["repeating_attack_" + attackid + "_dmgattr"] = "@{strength_mod}";
}
if(attackmod && damagemod && attackmod == damagemod) {
update["repeating_attack_" + attackid + "_atkmagic"] = parseInt(attackmod, 10);
}
else {
if(attackmod) {
update["repeating_attack_" + attackid + "_atkmod"] = parseInt(attackmod, 10);
}
if(damagemod) {
update["repeating_attack_" + attackid + "_dmgmod"] = parseInt(attackmod, 10);
}
}
var callback = function() {update_attacks(attackid, "item")};
setAttrs(update, {silent: true}, callback);
});
};
var create_resource_from_item = function(itemid) {
var update = {};
var newrowid = generateRowID();
getAttrs(["other_resource_name"], function(x) {
if(!x.other_resource_name || x.other_resource_name == "") {
update["repeating_inventory_" + itemid + "_itemresourceid"] = "other_resource";
setAttrs(update, {}, update_resource_from_item(itemid, "other_resource", true));
}
else {
getSectionIDs("repeating_resource", function(idarray) {
if(idarray.length == 0) {
update["repeating_inventory_" + itemid + "_itemresourceid"] = newrowid + "_resource_left";
setAttrs(update, {}, update_resource_from_item(itemid, newrowid + "_resource_left", true));
}
else {
var resource_names = [];
_.each(idarray, function(currentID, i) {
resource_names.push("repeating_resource_" + currentID + "_resource_left_name");
resource_names.push("repeating_resource_" + currentID + "_resource_right_name");
});
getAttrs(resource_names, function(y) {
var existing = false;
_.each(idarray, function(currentID, i) {
if((!y["repeating_resource_" + currentID + "_resource_left_name"] || y["repeating_resource_" + currentID + "_resource_left_name"] === "") && existing == false) {
update["repeating_inventory_" + itemid + "_itemresourceid"] = currentID + "_resource_left";
setAttrs(update, {}, update_resource_from_item(itemid, currentID + "_resource_left", true));
existing = true;
}
else if((!y["repeating_resource_" + currentID + "_resource_right_name"] || y["repeating_resource_" + currentID + "_resource_right_name"] === "") && existing == false) {
update["repeating_inventory_" + itemid + "_itemresourceid"] = currentID + "_resource_right";
setAttrs(update, {}, update_resource_from_item(itemid, currentID + "_resource_right", true));
existing = true;
};
});
if(!existing) {
update["repeating_inventory_" + itemid + "_itemresourceid"] = newrowid + "_resource_left";
setAttrs(update, {}, update_resource_from_item(itemid, newrowid + "_resource_left", true));
}
});
};
});
};
});
};
var update_resource_from_item = function(itemid, resourceid, newresource) {
getAttrs(["repeating_inventory_" + itemid + "_itemname","repeating_inventory_" + itemid + "_itemcount"], function(v) {
var update = {}; var id;
if(resourceid && resourceid == "other_resource") {
id = resourceid;
}
else {
id = "repeating_resource_" + resourceid;
};
if(newresource) {
update[id + "_itemid"] = itemid;
} ;
if(!v["repeating_inventory_" + itemid + "_itemname"]) {
update["repeating_inventory_" + itemid + "_useasresource"] = 0;
update["repeating_inventory_" + itemid + "_itemresourceid"] = "";
remove_resource(resourceid);
};
if(v["repeating_inventory_" + itemid + "_itemname"] && v["repeating_inventory_" + itemid + "_itemname"] != "") {
update[id + "_name"] = v["repeating_inventory_" + itemid + "_itemname"];
};
if(v["repeating_inventory_" + itemid + "_itemcount"] && v["repeating_inventory_" + itemid + "_itemcount"] != "") {
update[id] = v["repeating_inventory_" + itemid + "_itemcount"];
};
setAttrs(update, {silent: true});
});
};
var update_item_from_resource = function(resourceid, itemid) {
var update = {};
getAttrs([resourceid, resourceid + "_name"], function(v) {
update["repeating_inventory_" + itemid + "_itemcount"] = v[resourceid];
update["repeating_inventory_" + itemid + "_itemname"] = v[resourceid + "_name"];
setAttrs(update, {silent: true}, function() {update_weight()});
});
};
var create_attack_from_spell = function(lvl, spellid, character_id) {
var update = {};
var newrowid = generateRowID();
update["repeating_spell-" + lvl + "_" + spellid + "_spellattackid"] = newrowid;
update["repeating_spell-" + lvl + "_" + spellid + "_rollcontent"] = "%{" + character_id + "|repeating_attack_" + newrowid + "_attack}";
setAttrs(update, {}, update_attack_from_spell(lvl, spellid, newrowid, true));
}
var update_attack_from_spell = function(lvl, spellid, attackid, newattack) {
getAttrs(["repeating_spell-" + lvl + "_" + spellid + "_spellname", "repeating_spell-" + lvl + "_" + spellid + "_spellrange", "repeating_spell-" + lvl + "_" + spellid + "_spelltarget", "repeating_spell-" + lvl + "_" + spellid + "_spellattack", "repeating_spell-" + lvl + "_" + spellid + "_spelldamage", "repeating_spell-" + lvl + "_" + spellid + "_spelldamage2", "repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype", "repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype2", "repeating_spell-" + lvl + "_" + spellid + "_spellhealing", "repeating_spell-" + lvl + "_" + spellid + "_spelldmgmod", "repeating_spell-" + lvl + "_" + spellid + "_spellsave", "repeating_spell-" + lvl + "_" + spellid + "_spellsavesuccess", "repeating_spell-" + lvl + "_" + spellid + "_spellhldie", "repeating_spell-" + lvl + "_" + spellid + "_spellhldietype", "repeating_spell-" + lvl + "_" + spellid + "_spellhlbonus", "repeating_spell-" + lvl + "_" + spellid + "_spelllevel", "repeating_spell-" + lvl + "_" + spellid + "_includedesc", "repeating_spell-" + lvl + "_" + spellid + "_spelldescription", "repeating_spell-" + lvl + "_" + spellid + "_spellathigherlevels", "repeating_spell-" + lvl + "_" + spellid + "_spell_damage_progression", "repeating_spell-" + lvl + "_" + spellid + "_innate", "spellcasting_ability"], function(v) {
var update = {};
var description = "";
if(newattack) {
update["repeating_attack_" + attackid + "_options-flag"] = "0";
update["repeating_attack_" + attackid + "_spellid"] = spellid;
update["repeating_attack_" + attackid + "_spelllevel"] = lvl;
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spellname"] && v["repeating_spell-" + lvl + "_" + spellid + "_spellname"] != "") {
update["repeating_attack_" + attackid + "_atkname"] = v["repeating_spell-" + lvl + "_" + spellid + "_spellname"];
}
if(!v["repeating_spell-" + lvl + "_" + spellid + "_spellattack"] || v["repeating_spell-" + lvl + "_" + spellid + "_spellattack"] === "None") {
update["repeating_attack_" + attackid + "_atkflag"] = "0";
}
else {
update["repeating_attack_" + attackid + "_atkattr_base"] = v.spellcasting_ability.slice(0, -1);
update["repeating_attack_" + attackid + "_atkflag"] = "{{attack=1}}";
description = description + v["repeating_spell-" + lvl + "_" + spellid + "_spellattack"] + " Spell Attack. ";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage"] && v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage"] != "") {
update["repeating_attack_" + attackid + "_dmgflag"] = "{{damage=1}} {{dmg1flag=1}}";
if(v["repeating_spell-" + lvl + "_" + spellid + "_spell_damage_progression"] && v["repeating_spell-" + lvl + "_" + spellid + "_spell_damage_progression"] === "Cantrip Dice") {
update["repeating_attack_" + attackid + "_dmgbase"] = "[[round((@{level} + 1) / 6 + 0.5)]]" + v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage"].substring(1);
}
else {
update["repeating_attack_" + attackid + "_dmgbase"] = v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage"];
}
}
else {
update["repeating_attack_" + attackid + "_dmgflag"] = "0"
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spelldmgmod"] && v["repeating_spell-" + lvl + "_" + spellid + "_spelldmgmod"] === "Yes") {
update["repeating_attack_" + attackid + "_dmgattr"] = v.spellcasting_ability.slice(0, -1);
}
else {
update["repeating_attack_" + attackid + "_dmgattr"] = "0";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype"]) {
update["repeating_attack_" + attackid + "_dmgtype"] = v["repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype"];
}
else {
update["repeating_attack_" + attackid + "_dmgtype"] = "";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage2"]) {
update["repeating_attack_" + attackid + "_dmg2base"] = v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage2"];
update["repeating_attack_" + attackid + "_dmg2attr"] = 0;
update["repeating_attack_" + attackid + "_dmg2flag"] = "{{damage=1}} {{dmg2flag=1}}";
}
else {
update["repeating_attack_" + attackid + "_dmg2base"] = "";
update["repeating_attack_" + attackid + "_dmg2attr"] = 0;
update["repeating_attack_" + attackid + "_dmg2flag"] = "0";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype2"]) {
update["repeating_attack_" + attackid + "_dmg2type"] = v["repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype2"];
}
else {
update["repeating_attack_" + attackid + "_dmg2type"] = "";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spellrange"]) {
update["repeating_attack_" + attackid + "_atkrange"] = v["repeating_spell-" + lvl + "_" + spellid + "_spellrange"];
}
else {
update["repeating_attack_" + attackid + "_atkrange"] = "";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spellrange"]) {
update["repeating_attack_" + attackid + "_atkrange"] = v["repeating_spell-" + lvl + "_" + spellid + "_spellrange"];
}
else {
update["repeating_attack_" + attackid + "_atkrange"] = "";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spellsave"]) {
update["repeating_attack_" + attackid + "_saveflag"] = "{{save=1}} {{saveattr=@{saveattr}}} {{savedesc=@{saveeffect}}} {{savedc=[[[[@{savedc}]][SAVE]]]}}";
update["repeating_attack_" + attackid + "_saveattr"] = v["repeating_spell-" + lvl + "_" + spellid + "_spellsave"];
}
else {
update["repeating_attack_" + attackid + "_saveflag"] = "0";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spellsavesuccess"]) {
update["repeating_attack_" + attackid + "_saveeffect"] = v["repeating_spell-" + lvl + "_" + spellid + "_spellsavesuccess"];
}
else {
update["repeating_attack_" + attackid + "_saveeffect"] = "";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spellhldie"] && v["repeating_spell-" + lvl + "_" + spellid + "_spellhldie"] != "" && v["repeating_spell-" + lvl + "_" + spellid + "_spellhldietype"] && v["repeating_spell-" + lvl + "_" + spellid + "_spellhldietype"] != "") {
var bonus = "";
var spelllevel = v["repeating_spell-" + lvl + "_" + spellid + "_spelllevel"];
var query = "?{Cast at what level?";
for(i = 0; i < 10-spelllevel; i++) {
query = query + "|Level " + (parseInt(i, 10) + parseInt(spelllevel, 10)) + "," + i;
}
query = query + "}";
if(v["repeating_spell-" + lvl + "_" + spellid + "_spellhlbonus"] && v["repeating_spell-" + lvl + "_" + spellid + "_spellhlbonus"] != "") {
bonus = "+(" + v["repeating_spell-" + lvl + "_" + spellid + "_spellhlbonus"] + "*" + query + ")";
}
update["repeating_attack_" + attackid + "_hldmg"] = "{{hldmg=[[(" + v["repeating_spell-" + lvl + "_" + spellid + "_spellhldie"] + "*" + query + ")" + v["repeating_spell-" + lvl + "_" + spellid + "_spellhldietype"] + bonus + "]]}}";
}
else {
update["repeating_attack_" + attackid + "_hldmg"] = "";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spellhealing"] && v["repeating_spell-" + lvl + "_" + spellid + "_spellhealing"] != "") {
if(!v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage"] || v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage"] === "") {
update["repeating_attack_" + attackid + "_dmgbase"] = v["repeating_spell-" + lvl + "_" + spellid + "_spellhealing"];
update["repeating_attack_" + attackid + "_dmgflag"] = "{{damage=1}} {{dmg1flag=1}}";
update["repeating_attack_" + attackid + "_dmgtype"] = "Healing";
}
else if(!v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage2"] || v["repeating_spell-" + lvl + "_" + spellid + "_spelldamage2"] === "") {
update["repeating_attack_" + attackid + "_dmg2base"] = v["repeating_spell-" + lvl + "_" + spellid + "_spellhealing"];
update["repeating_attack_" + attackid + "_dmg2flag"] = "{{damage=1}} {{dmg2flag=1}}";
update["repeating_attack_" + attackid + "_dmg2type"] = "Healing";
}
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_innate"]) {
update["repeating_attack_" + attackid + "_spell_innate"] = v["repeating_spell-" + lvl + "_" + spellid + "_innate"];
}
else {
update["repeating_attack_" + attackid + "_spell_innate"] = "";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_spelltarget"]) {
description = description + v["repeating_spell-" + lvl + "_" + spellid + "_spelltarget"] + ". ";
}
if(v["repeating_spell-" + lvl + "_" + spellid + "_includedesc"] && v["repeating_spell-" + lvl + "_" + spellid + "_includedesc"] === "on") {
description = v["repeating_spell-" + lvl + "_" + spellid + "_spelldescription"];
if(v["repeating_spell-" + lvl + "_" + spellid + "_spellathigherlevels"] && v["repeating_spell-" + lvl + "_" + spellid + "_spellathigherlevels"] != "") {
description = description + "\n\nAt Higher Levels: " + v["repeating_spell-" + lvl + "_" + spellid + "_spellathigherlevels"];
}
}
else if(v["repeating_spell-" + lvl + "_" + spellid + "_includedesc"] && v["repeating_spell-" + lvl + "_" + spellid + "_includedesc"] === "off") {
description = "";
};
update["repeating_attack_" + attackid + "_atk_desc"] = description;
var callback = function() {update_attacks(attackid, "spell")};
setAttrs(update, {silent: true}, callback);
});
};
var update_attacks = function(update_id, source) {
console.log("DOING UPDATE_ATTACKS: " + update_id);
if(update_id.substring(0,1) === "-" && update_id.length === 20) {
do_update_attack([update_id], source);
}
else if(["strength","dexterity","constitution","intelligence","wisdom","charisma","spells","all"].indexOf(update_id) > -1) {
getSectionIDs("repeating_attack", function(idarray) {
if(update_id === "all") {
do_update_attack(idarray);
}
else if(update_id === "spells") {
var attack_attribs = [];
_.each(idarray, function(id) {
attack_attribs.push("repeating_attack_" + id + "_spellid");
});
getAttrs(attack_attribs, function(v) {
var attr_attack_ids = [];
_.each(idarray, function(id) {
if(v["repeating_attack_" + id + "_spellid"] && v["repeating_attack_" + id + "_spellid"] != "") {
attr_attack_ids.push(id);
}
});
if(attr_attack_ids.length > 0) {
do_update_attack(attr_attack_ids);
}
});
}
else {
var attack_attribs = ["spellcasting_ability"];
_.each(idarray, function(id) {
attack_attribs.push("repeating_attack_" + id + "_atkattr_base");
attack_attribs.push("repeating_attack_" + id + "_dmgattr");
attack_attribs.push("repeating_attack_" + id + "_dmg2attr");
attack_attribs.push("repeating_attack_" + id + "_savedc");
});
getAttrs(attack_attribs, function(v) {
var attr_attack_ids = [];
_.each(idarray, function(id) {
if((v["repeating_attack_" + id + "_atkattr_base"] && v["repeating_attack_" + id + "_atkattr_base"].indexOf(update_id) > -1) || (v["repeating_attack_" + id + "_dmgattr"] && v["repeating_attack_" + id + "_dmgattr"].indexOf(update_id) > -1) || (v["repeating_attack_" + id + "_dmg2attr"] && v["repeating_attack_" + id + "_dmg2attr"].indexOf(update_id) > -1) || (v["repeating_attack_" + id + "_savedc"] && v["repeating_attack_" + id + "_savedc"].indexOf(update_id) > -1) || (v["repeating_attack_" + id + "_savedc"] && v["repeating_attack_" + id + "_savedc"] === "(@{spell_save_dc})" && v["spellcasting_ability"] && v["spellcasting_ability"].indexOf(update_id) > -1)) {
attr_attack_ids.push(id);
}
});
if(attr_attack_ids.length > 0) {
do_update_attack(attr_attack_ids);
}
});
};
});
};
};
var do_update_attack = function(attack_array, source) {
var attack_attribs = ["level","d20","pb","pb_type","pbd_safe","dtype","globalmagicmod","strength_mod","dexterity_mod","constitution_mod","intelligence_mod","wisdom_mod","charisma_mod","spellcasting_ability","spell_save_dc","spell_attack_mod"];
_.each(attack_array, function(attackid) {
attack_attribs.push("repeating_attack_" + attackid + "_atkflag");
attack_attribs.push("repeating_attack_" + attackid + "_atkname");
attack_attribs.push("repeating_attack_" + attackid + "_atkattr_base");
attack_attribs.push("repeating_attack_" + attackid + "_atkmod");
attack_attribs.push("repeating_attack_" + attackid + "_atkprofflag");
attack_attribs.push("repeating_attack_" + attackid + "_atkmagic");
attack_attribs.push("repeating_attack_" + attackid + "_dmgflag");
attack_attribs.push("repeating_attack_" + attackid + "_dmgbase");
attack_attribs.push("repeating_attack_" + attackid + "_dmgattr");
attack_attribs.push("repeating_attack_" + attackid + "_dmgmod");
attack_attribs.push("repeating_attack_" + attackid + "_dmgtype");
attack_attribs.push("repeating_attack_" + attackid + "_dmg2flag");
attack_attribs.push("repeating_attack_" + attackid + "_dmg2base");
attack_attribs.push("repeating_attack_" + attackid + "_dmg2attr");
attack_attribs.push("repeating_attack_" + attackid + "_dmg2mod");
attack_attribs.push("repeating_attack_" + attackid + "_dmg2type");
attack_attribs.push("repeating_attack_" + attackid + "_dmgcustcrit");
attack_attribs.push("repeating_attack_" + attackid + "_dmg2custcrit");
attack_attribs.push("repeating_attack_" + attackid + "_saveflag");
attack_attribs.push("repeating_attack_" + attackid + "_savedc");
attack_attribs.push("repeating_attack_" + attackid + "_saveeffect");
attack_attribs.push("repeating_attack_" + attackid + "_saveflat");
attack_attribs.push("repeating_attack_" + attackid + "_hldmg");
attack_attribs.push("repeating_attack_" + attackid + "_spellid");
attack_attribs.push("repeating_attack_" + attackid + "_spelllevel");
attack_attribs.push("repeating_attack_" + attackid + "_atkrange");
attack_attribs.push("repeating_attack_" + attackid + "_itemid");
attack_attribs.push("repeating_attack_" + attackid + "_ammo");
attack_attribs.push("repeating_attack_" + attackid + "_global_damage_mod_field");
});
getAttrs(attack_attribs, function(v) {
_.each(attack_array, function(attackid) {
console.log("UPDATING ATTACK: " + attackid);
var callbacks = [];
var update = {};
var hbonus = "";
var hdmg1 = "";
var hdmg2 = "";
var dmg = "";
var dmg2 = "";
var rollbase = "";
var spellattack = false;
var magicattackmod = 0;
var pbd_safe = v["pbd_safe"] ? v["pbd_safe"] : "";
var global_crit = v["repeating_attack_" + attackid + "_global_damage_mod_field"] && v["repeating_attack_" + attackid + "_global_damage_mod_field"] != "" ? "@{global_damage_mod_crit}" : "";
var hldmgcrit = v["repeating_attack_" + attackid + "_hldmg"] && v["repeating_attack_" + attackid + "_hldmg"] != "" ? v["repeating_attack_" + attackid + "_hldmg"].slice(0, 7) + "crit" + v["repeating_attack_" + attackid + "_hldmg"].slice(7) : "";
if(v["repeating_attack_" + attackid + "_spellid"] && v["repeating_attack_" + attackid + "_spellid"] != "") {
spellattack = true;
magicattackmod = v["spell_attack_mod"] && !isNaN(parseInt(v["spell_attack_mod"],10)) ? parseInt(v["spell_attack_mod"],10) : 0;
};
if(!v["repeating_attack_" + attackid + "_atkattr_base"] || v["repeating_attack_" + attackid + "_atkattr_base"] === "0") {atkattr_base = 0} else {atkattr_base = parseInt(v[v["repeating_attack_" + attackid + "_atkattr_base"].substring(2, v["repeating_attack_" + attackid + "_atkattr_base"].length - 1)], 10)};
if(!v["repeating_attack_" + attackid + "_dmgattr"] || v["repeating_attack_" + attackid + "_dmgattr"] === "0") {dmgattr = 0} else {dmgattr = parseInt(v[v["repeating_attack_" + attackid + "_dmgattr"].substring(2, v["repeating_attack_" + attackid + "_dmgattr"].length - 1)], 10)};
if(!v["repeating_attack_" + attackid + "_dmg2attr"] || v["repeating_attack_" + attackid + "_dmg2attr"] === "0") {dmg2attr = 0} else {dmg2attr = parseInt(v[v["repeating_attack_" + attackid + "_dmg2attr"].substring(2, v["repeating_attack_" + attackid + "_dmg2attr"].length - 1)], 10)};
var dmgbase = v["repeating_attack_" + attackid + "_dmgbase"] && v["repeating_attack_" + attackid + "_dmgbase"] != "" ? v["repeating_attack_" + attackid + "_dmgbase"] : 0;
var dmg2base = v["repeating_attack_" + attackid + "_dmg2base"] && v["repeating_attack_" + attackid + "_dmg2base"] != "" ? v["repeating_attack_" + attackid + "_dmg2base"] : 0;
var dmgmod = v["repeating_attack_" + attackid + "_dmgmod"] && isNaN(parseInt(v["repeating_attack_" + attackid + "_dmgmod"],10)) === false ? parseInt(v["repeating_attack_" + attackid + "_dmgmod"],10) : 0;
var dmg2mod = v["repeating_attack_" + attackid + "_dmg2mod"] && isNaN(parseInt(v["repeating_attack_" + attackid + "_dmg2mod"],10)) === false ? parseInt(v["repeating_attack_" + attackid + "_dmg2mod"],10) : 0;
var dmgtype = v["repeating_attack_" + attackid + "_dmgtype"] ? v["repeating_attack_" + attackid + "_dmgtype"] + " " : "";
var dmg2type = v["repeating_attack_" + attackid + "_dmg2type"] ? v["repeating_attack_" + attackid + "_dmg2type"] + " " : "";
var pb = v["repeating_attack_" + attackid + "_atkprofflag"] && v["repeating_attack_" + attackid + "_atkprofflag"] != 0 && v.pb ? v.pb : 0;
var atkmod = v["repeating_attack_" + attackid + "_atkmod"] && v["repeating_attack_" + attackid + "_atkmod"] != "" ? parseInt(v["repeating_attack_" + attackid + "_atkmod"],10) : 0;
var atkmag = v["repeating_attack_" + attackid + "_atkmagic"] && v["repeating_attack_" + attackid + "_atkmagic"] != "" ? parseInt(v["repeating_attack_" + attackid + "_atkmagic"],10) : 0;
var dmgmag = isNaN(atkmag) === false && atkmag != 0 && ((v["repeating_attack_" + attackid + "_dmgflag"] && v["repeating_attack_" + attackid + "_dmgflag"] != 0) || (v["repeating_attack_" + attackid + "_dmg2flag"] && v["repeating_attack_" + attackid + "_dmg2flag"] != 0)) ? "+ " + atkmag + " Magic Bonus" : "";
if(v["repeating_attack_" + attackid + "_atkflag"] && v["repeating_attack_" + attackid + "_atkflag"] != 0) {
bonus_mod = atkattr_base + atkmod + atkmag + magicattackmod;
if(v["pb_type"] && v["pb_type"] === "die") {
plus_minus = bonus_mod > -1 ? "+" : "";
bonus = bonus_mod + "+" + pb;
}
else {
bonus_mod = bonus_mod + parseInt(pb, 10);
plus_minus = bonus_mod > -1 ? "+" : "";
bonus = plus_minus + bonus_mod;
};
}
else if(v["repeating_attack_" + attackid + "_saveflag"] && v["repeating_attack_" + attackid + "_saveflag"] != 0) {
if(!v["repeating_attack_" + attackid + "_savedc"] || (v["repeating_attack_" + attackid + "_savedc"] && v["repeating_attack_" + attackid + "_savedc"] === "(@{spell_save_dc})")) {
var tempdc = v["spell_save_dc"];
}
else if(v["repeating_attack_" + attackid + "_savedc"] && v["repeating_attack_" + attackid + "_savedc"] === "(@{saveflat})") {
var tempdc = isNaN(parseInt(v["repeating_attack_" + attackid + "_saveflat"])) === false ? parseInt(v["repeating_attack_" + attackid + "_saveflat"]) : "0";
}
else {
var savedcattr = v["repeating_attack_" + attackid + "_savedc"].replace(/^[^{]*{/,"").replace(/\_.*$/,"");
var safe_pb = v["pb_type"] && v["pb_type"] === "die" ? parseInt(pb.substring(1), 10) / 2 : parseInt(pb,10);
var safe_attr = v[savedcattr + "_mod"] ? parseInt(v[savedcattr + "_mod"],10) : 0;
var tempdc = 8 + safe_attr + safe_pb;
};
bonus = "DC" + tempdc;
}
else {
bonus = "-";
}
if(v["repeating_attack_" + attackid + "_dmgflag"] && v["repeating_attack_" + attackid + "_dmgflag"] != 0) {
if(spellattack === true && dmgbase.indexOf("[[round((@{level} + 1) / 6 + 0.5)]]") > -1) {
// SPECIAL CANTRIP DAMAGE
dmgdiestring = Math.round(((parseInt(v["level"], 10) + 1) / 6) + 0.5).toString()
dmg = dmgdiestring + dmgbase.substring(dmgbase.lastIndexOf("d"));
if(dmgattr + dmgmod != 0) {
dmg = dmg + "+" + (dmgattr + dmgmod);
}
dmg = dmg + " " + dmgtype;
}
else {
if(dmgbase === 0 && (dmgattr + dmgmod === 0)){
dmg = 0;
}
if(dmgbase != 0) {
dmg = dmgbase;
}
if(dmgbase != 0 && (dmgattr + dmgmod != 0)){
dmg = dmgattr + dmgmod > 0 ? dmg + "+" : dmg;
}
if(dmgattr + dmgmod != 0) {
dmg = dmg + (dmgattr + dmgmod);
}
dmg = dmg + " " + dmgtype;
}
}
else {
dmg = "";
};
if(v["repeating_attack_" + attackid + "_dmg2flag"] && v["repeating_attack_" + attackid + "_dmg2flag"] != 0) {
if(dmg2base === 0 && (dmg2attr + dmg2mod === 0)){
dmg2 = 0;
}
if(dmg2base != 0) {
dmg2 = dmg2base;
}
if(dmg2base != 0 && (dmg2attr + dmg2mod != 0)){
dmg2 = dmg2attr + dmg2mod > 0 ? dmg2 + "+" : dmg2;
}
if(dmg2attr + dmg2mod != 0) {
dmg2 = dmg2 + (dmg2attr + dmg2mod);
}
dmg2 = dmg2 + " " + dmg2type;
}
else {
dmg2 = "";
};
dmgspacer = v["repeating_attack_" + attackid + "_dmgflag"] && v["repeating_attack_" + attackid + "_dmgflag"] != 0 && v["repeating_attack_" + attackid + "_dmg2flag"] && v["repeating_attack_" + attackid + "_dmg2flag"] != 0 ? "+ " : "";
crit1 = v["repeating_attack_" + attackid + "_dmgcustcrit"] && v["repeating_attack_" + attackid + "_dmgcustcrit"] != "" ? v["repeating_attack_" + attackid + "_dmgcustcrit"] : dmgbase;
crit2 = v["repeating_attack_" + attackid + "_dmg2custcrit"] && v["repeating_attack_" + attackid + "_dmg2custcrit"] != "" ? v["repeating_attack_" + attackid + "_dmg2custcrit"] : dmg2base;
r1 = v["repeating_attack_" + attackid + "_atkflag"] && v["repeating_attack_" + attackid + "_atkflag"] != 0 ? "@{d20}" : "0d20";
r2 = v["repeating_attack_" + attackid + "_atkflag"] && v["repeating_attack_" + attackid + "_atkflag"] != 0 ? "@{rtype}" : "{{r2=[[0d20";
if(v["repeating_attack_" + attackid + "_atkflag"] && v["repeating_attack_" + attackid + "_atkflag"] != 0) {
if(magicattackmod != 0) {hbonus = " + " + magicattackmod + "[SPELLATK]" + hbonus};
if(atkmag != 0) {hbonus = " + " + atkmag + "[MAGIC]" + hbonus};
if(pb != 0) {hbonus = " + " + pb + pbd_safe + "[PROF]" + hbonus};
if(atkmod != 0) {hbonus = " + " + atkmod + "[MOD]" + hbonus};
if(atkattr_base != 0) {hbonus = " + " + atkattr_base + "[" + v["repeating_attack_" + attackid + "_atkattr_base"].substring(2, 5).toUpperCase() + "]" + hbonus};
}
else {
hbonus = "";
}
if(v["repeating_attack_" + attackid + "_dmgflag"] && v["repeating_attack_" + attackid + "_dmgflag"] != 0) {
if(atkmag != 0) {hdmg1 = " + " + atkmag + "[MAGIC]" + hdmg1};
if(dmgmod != 0) {hdmg1 = " + " + dmgmod + "[MOD]" + hdmg1};
if(dmgattr != 0) {hdmg1 = " + " + dmgattr + "[" + v["repeating_attack_" + attackid + "_dmgattr"].substring(2, 5).toUpperCase() + "]" + hdmg1};
hdmg1 = dmgbase + hdmg1;
}
else {
hdmg1 = "0";
}
if(v["repeating_attack_" + attackid + "_dmg2flag"] && v["repeating_attack_" + attackid + "_dmg2flag"] != 0) {
if(dmg2mod != 0) {hdmg2 = " + " + dmg2mod + "[MOD]" + hdmg2};
if(dmg2attr != 0) {hdmg2 = " + " + dmg2attr + "[" + v["repeating_attack_" + attackid + "_dmg2attr"].substring(2, 5).toUpperCase() + "]" + hdmg2};
hdmg2 = dmg2base + hdmg2;
}
else {
hdmg2 = "0";
}
if(v.dtype === "full") {
pickbase = "full";
rollbase = "@{wtype}&{template:atkdmg} {{mod=@{atkbonus}}} {{rname=@{atkname}}} {{r1=[[" + r1 + "cs>@{atkcritrange}" + hbonus + "]]}} " + r2 + "cs>@{atkcritrange}" + hbonus + "]]}} @{atkflag} {{range=@{atkrange}}} @{dmgflag} {{dmg1=[[" + hdmg1 + "]]}} {{dmg1type=" + dmgtype + "}} @{dmg2flag} {{dmg2=[[" + hdmg2 + "]]}} {{dmg2type=" + dmg2type + "}} {{crit1=[[" + crit1 + "[CRIT]]]}} {{crit2=[[" + crit2 + "[CRIT]]]}} @{saveflag} {{desc=@{atk_desc}}} @{hldmg} " + hldmgcrit + " {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} @{global_attack_mod} @{global_damage_mod} @{global_damage_mod_crit} {{globaldamagetype=@{global_damage_type}}} ammo=@{ammo} @{charname_output}";
}
else if(v["repeating_attack_" + attackid + "_atkflag"] && v["repeating_attack_" + attackid + "_atkflag"] != 0) {
pickbase = "pick";
rollbase = "@{wtype}&{template:atk} {{mod=@{atkbonus}}} {{rname=[@{atkname}](~repeating_attack_attack_dmg)}} {{rnamec=[@{atkname}](~repeating_attack_attack_crit)}} {{r1=[[" + r1 + "cs>@{atkcritrange}" + hbonus + "]]}} " + r2 + "cs>@{atkcritrange}" + hbonus + "]]}} {{range=@{atkrange}}} {{desc=@{atk_desc}}} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} @{global_attack_mod} ammo=@{ammo} @{charname_output}";
}
else if(v["repeating_attack_" + attackid + "_dmgflag"] && v["repeating_attack_" + attackid + "_dmgflag"] != 0) {
pickbase = "dmg";
rollbase = "@{wtype}&{template:dmg} {{rname=@{atkname}}} @{atkflag} {{range=@{atkrange}}} @{dmgflag} {{dmg1=[[" + hdmg1 + "]]}} {{dmg1type=" + dmgtype + "}} @{dmg2flag} {{dmg2=[[" + hdmg2 + "]]}} {{dmg2type=" + dmg2type + "}} @{saveflag} {{desc=@{atk_desc}}} @{hldmg} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} @{global_damage_mod} {{globaldamagetype=@{global_damage_type}}} ammo=@{ammo} @{charname_output}"
}
else {
pickbase = "empty";
rollbase = "@{wtype}&{template:dmg} {{rname=@{atkname}}} @{atkflag} {{range=@{atkrange}}} @{saveflag} {{desc=@{atk_desc}}} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} ammo=@{ammo} @{charname_output}"
}
update["repeating_attack_" + attackid + "_rollbase_dmg"] = "@{wtype}&{template:dmg} {{rname=@{atkname}}} @{atkflag} {{range=@{atkrange}}} @{dmgflag} {{dmg1=[[" + hdmg1 + "]]}} {{dmg1type=" + dmgtype + "}} @{dmg2flag} {{dmg2=[[" + hdmg2 + "]]}} {{dmg2type=" + dmg2type + "}} @{saveflag} {{desc=@{atk_desc}}} @{hldmg} {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} @{global_damage_mod} {{globaldamagetype=@{global_damage_type}}} @{charname_output}";
update["repeating_attack_" + attackid + "_rollbase_crit"] = "@{wtype}&{template:dmg} {{crit=1}} {{rname=@{atkname}}} @{atkflag} {{range=@{atkrange}}} @{dmgflag} {{dmg1=[[" + hdmg1 + "]]}} {{dmg1type=" + dmgtype + "}} @{dmg2flag} {{dmg2=[[" + hdmg2 + "]]}} {{dmg2type=" + dmg2type + "}} {{crit1=[[" + crit1 + "]]}} {{crit2=[[" + crit2 + "]]}} @{saveflag} {{desc=@{atk_desc}}} @{hldmg} " + hldmgcrit + " {{spelllevel=@{spelllevel}}} {{innate=@{spell_innate}}} @{global_damage_mod} @{global_damage_mod_crit} {{globaldamagetype=@{global_damage_type}}} @{charname_output}"
update["repeating_attack_" + attackid + "_atkbonus"] = bonus;
update["repeating_attack_" + attackid + "_atkdmgtype"] = dmg + dmgspacer + dmg2 + dmgmag + " ";
update["repeating_attack_" + attackid + "_rollbase"] = rollbase;
if(v["repeating_attack_" + attackid + "_spellid"] && v["repeating_attack_" + attackid + "_spellid"] != "" && (!source || source && source != "spell") && v["repeating_attack_" + attackid + "_spellid"].length == 20) {
var spellid = v["repeating_attack_" + attackid + "_spellid"];
var lvl = v["repeating_attack_" + attackid + "_spelllevel"];
callbacks.push( function() {update_spell_from_attack(lvl, spellid, attackid);} );
}
if(v["repeating_attack_" + attackid + "_itemid"] && v["repeating_attack_" + attackid + "_itemid"] != "" && (!source || source && source != "item")) {
var itemid = v["repeating_attack_" + attackid + "_itemid"];
callbacks.push( function() {update_item_from_attack(itemid, attackid);} );
}
setAttrs(update, {silent: true}, function() {callbacks.forEach(function(callback) {callback(); })} );
});
});
};
var update_spell_from_attack = function(lvl, spellid, attackid) {
var update = {};
getAttrs(["repeating_attack_" + attackid + "_atkname", "repeating_attack_" + attackid + "_atkrange", "repeating_attack_" + attackid + "_dmgbase", "repeating_attack_" + attackid + "_dmgtype", "repeating_attack_" + attackid + "_dmg2base", "repeating_attack_" + attackid + "_dmg2type", "repeating_attack_" + attackid + "_saveflag", "repeating_attack_" + attackid + "_saveattr", "repeating_attack_" + attackid + "_saveeffect"], function(v) {
update["repeating_spell-" + lvl + "_" + spellid + "_spellname"] = v["repeating_attack_" + attackid + "_atkname"];
if(v["repeating_attack_" + attackid + "_atkrange"] && v["repeating_attack_" + attackid + "_atkrange"] != "") {
update["repeating_spell-" + lvl + "_" + spellid + "_spellrange"] = v["repeating_attack_" + attackid + "_atkrange"];
}
else {
update["repeating_spell-" + lvl + "_" + spellid + "_spellrange"] = "";
};
if(v["repeating_attack_" + attackid + "_dmgtype"] && v["repeating_attack_" + attackid + "_dmgtype"].toLowerCase() == "healing") {
if(v["repeating_attack_" + attackid + "_dmgbase"] && v["repeating_attack_" + attackid + "_dmgbase"] != "") {
update["repeating_spell-" + lvl + "_" + spellid + "_spellhealing"] = v["repeating_attack_" + attackid + "_dmgbase"];
}
}
else {
if(v["repeating_attack_" + attackid + "_dmgbase"] && v["repeating_attack_" + attackid + "_dmgbase"] != "" && v["repeating_attack_" + attackid + "_dmgbase"].indexOf("[[round((@{level} + 1) / 6 + 0.5)]]") === -1) {
update["repeating_spell-" + lvl + "_" + spellid + "_spelldamage"] = v["repeating_attack_" + attackid + "_dmgbase"];
}
else if(!v["repeating_attack_" + attackid + "_dmgbase"] || v["repeating_attack_" + attackid + "_dmgbase"] === "") {
update["repeating_spell-" + lvl + "_" + spellid + "_spelldamage"] = "";
}
if(v["repeating_attack_" + attackid + "_dmgtype"] && v["repeating_attack_" + attackid + "_dmgtype"] != "") {
update["repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype"] = v["repeating_attack_" + attackid + "_dmgtype"];
}
else {
update["repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype"] = "";
}
};
if(v["repeating_attack_" + attackid + "_dmg2type"] && v["repeating_attack_" + attackid + "_dmg2type"].toLowerCase() == "healing") {
if(v["repeating_attack_" + attackid + "_dmgbase"] && v["repeating_attack_" + attackid + "_dmgbase"] != "") {
update["repeating_spell-" + lvl + "_" + spellid + "_spellhealing"] = v["repeating_attack_" + attackid + "_dmgbase"];
}
}
else {
if(v["repeating_attack_" + attackid + "_dmg2base"] && v["repeating_attack_" + attackid + "_dmg2base"] != "") {
update["repeating_spell-" + lvl + "_" + spellid + "_spelldamage2"] = v["repeating_attack_" + attackid + "_dmg2base"];
}
else {
update["repeating_spell-" + lvl + "_" + spellid + "_spelldamage2"] = "";
}
if(v["repeating_attack_" + attackid + "_dmg2type"] && v["repeating_attack_" + attackid + "_dmg2type"] != "") {
update["repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype2"] = v["repeating_attack_" + attackid + "_dmg2type"];
}
else {
update["repeating_spell-" + lvl + "_" + spellid + "_spelldamagetype2"] = "";
}
};
if(v["repeating_attack_" + attackid + "_saveflag"] && v["repeating_attack_" + attackid + "_saveflag"] != "0") {
update["repeating_spell-" + lvl + "_" + spellid + "_spellsave"] = v["repeating_attack_" + attackid + "_saveflag"];
}
else {
update["repeating_spell-" + lvl + "_" + spellid + "_spellsave"] = "";
};
if(v["repeating_attack_" + attackid + "_saveeffect"] && v["repeating_attack_" + attackid + "_saveeffect"] != "") {
update["repeating_spell-" + lvl + "_" + spellid + "_spellsavesuccess"] = v["repeating_attack_" + attackid + "_saveeffect"];
}
else {
update["repeating_spell-" + lvl + "_" + spellid + "_spellsavesuccess"] = "";
};
setAttrs(update, {silent: true});
});
};
var update_item_from_attack = function(itemid, attackid) {
getAttrs(["repeating_attack_" + attackid + "_atkname", "repeating_attack_" + attackid + "_dmgbase", "repeating_attack_" + attackid + "_dmg2base", "repeating_attack_" + attackid + "_dmgtype", "repeating_attack_" + attackid + "_dmg2type", "repeating_attack_" + attackid + "_atkrange", "repeating_attack_" + attackid + "_atkmod", "repeating_attack_" + attackid + "_dmgmod", "repeating_inventory_" + itemid + "_itemmodifiers"], function(v) {
var update = {};
var mods = [];
var damage = v["repeating_attack_" + attackid + "_dmgbase"] ? v["repeating_attack_" + attackid + "_dmgbase"] : 0;
var damage2 = v["repeating_attack_" + attackid + "_dmg2base"] ? v["repeating_attack_" + attackid + "_dmg2base"] : 0;
var damagetype = v["repeating_attack_" + attackid + "_dmgtype"] ? v["repeating_attack_" + attackid + "_dmgtype"] : 0;
var damagetype2 = v["repeating_attack_" + attackid + "_dmg2type"] ? v["repeating_attack_" + attackid + "_dmg2type"] : 0;
var range = v["repeating_attack_" + attackid + "_atkrange"] ? v["repeating_attack_" + attackid + "_atkrange"] : 0;
var attackmod = v["repeating_attack_" + attackid + "_atkmod"] ? v["repeating_attack_" + attackid + "_atkmod"] : 0;
var damagemod = v["repeating_attack_" + attackid + "_dmgmod"] ? v["repeating_attack_" + attackid + "_dmgmod"] : 0;
var atktype = "";
update["repeating_inventory_" + itemid + "_itemname"] = v["repeating_attack_" + attackid + "_atkname"];
if(v["repeating_inventory_" + itemid + "_itemmodifiers"] && v["repeating_inventory_" + itemid + "_itemmodifiers"] != "") {
var mods = _.uniq(v["repeating_inventory_" + itemid + "_itemmodifiers"].split(",").map((item) => item.trim()));
if(mods.indexOf("Item Type: Ranged Weapon") > -1) {atktype = "Ranged";} else if(mods.indexOf("Item Type: Melee Weapon") > -1) {atktype = "Melee";} else if(v["repeating_attack_" + attackid + "_atkrange"]) {atktype = "Ranged";} else {atktype = "Melee";};
var to_be_removed = [];
_.each(mods, function(mod, i) {
if(mod.indexOf("Secondary Damage Type:") > -1) {
if(damagetype2 != 0) {
mods[i] = mod.substring(0, mod.lastIndexOf(":") + 1) + " " + damagetype2;
damagetype2 = 0;
}
else {
to_be_removed.push(i);
}
}
else if(mod.indexOf("Secondary Damage:") > -1) {
if(damage2 != 0) {
mods[i] = mod.substring(0, mod.lastIndexOf(":") + 1) + " " + damage2;
damage2 = 0;
}
else {
to_be_removed.push(i);
}
}
else if(mod.indexOf("Damage Type:") > -1) {
if(damagetype != 0) {
mods[i] = mod.substring(0, mod.lastIndexOf(":") + 1) + " " + damagetype;
damagetype = 0;
}
else {
to_be_removed.push(i);
}
}
else if(mod.indexOf("Damage:") > -1) {
if(damage != 0) {
mods[i] = mod.substring(0, mod.lastIndexOf(":") + 1) + " " + damage;
damage = 0;
}
else {
to_be_removed.push(i);
}
}
else if(mod.indexOf("Range:") > -1) {
if(range != 0) {
mods[i] = mod.substring(0, mod.lastIndexOf(":") + 1) + " " + range;
range = 0;
}
else {
to_be_removed.push(i);
}
}
else if(mod.indexOf(" Attacks ") > -1) {
if(attackmod != 0) {
mods[i] = mod.substring(0, mod.lastIndexOf(" Attacks ") + 1) + " " + attackmod;
attackmod = 0;
}
else {
to_be_removed.push(i);
}
}
else if(mod.indexOf(" Damage ") > -1) {
if(damagemod != 0) {
mods[i] = mod.substring(0, mod.lastIndexOf(" Damage ") + 1) + " " + damagemod;
damagemod = 0;
}
else {
to_be_removed.push(i);
}
};
});
mods = _(mods).filter(function(mod) {return to_be_removed.indexOf(mods.indexOf(mod)) === -1 });
}
if(damage != 0) {
mods.push("Damage: " + damage);
}
if(damagetype != 0) {
mods.push("Damage Type: " + damagetype);
}
if(damage2 != 0) {
mods.push("Secondary Damage: " + damage2);
}
if(damagetype != 0) {
mods.push("Secondary Damage Type: " + damagetype2);
}
if(range != 0) {
mods.push("Range: " + range);
}
if(attackmod != 0) {
mods.push(atktype + " Attacks +" + attackmod);
}
if(damagemod != 0) {
mods.push(atktype + " Damage +" + damagemod);
}
mods = mods.join(", ");
if(mods.length > 0) {
update["repeating_inventory_" + itemid + "_itemmodifiers"] = mods;
}
setAttrs(update, {silent: true});
});
};
var remove_attack = function(attackid) {
removeRepeatingRow("repeating_attack_" + attackid);
};
var remove_resource = function(id) {
var update = {};
getAttrs([id + "_itemid"], function(v) {
var itemid = v[id + "_itemid"];
if(itemid) {
update["repeating_inventory_" + itemid + "_useasresource"] = 0;
update["repeating_inventory_" + itemid + "_itemresourceid"] = "";
};
if(id == "other_resource") {
update["other_resource"] = "";
update["other_resource_name"] = "";
update["other_resource_itemid"] = "";
setAttrs(update, {silent: true});
}
else {
var baseid = id.replace("repeating_resource_", "").substring(0,20);
var resource_names = ["repeating_resource_" + baseid + "_resource_left_name", "repeating_resource_" + baseid + "_resource_right_name"];
getAttrs(resource_names, function(v) {
if((id.indexOf("left") > -1 && !v["repeating_resource_" + baseid + "_resource_right_name"]) || (id.indexOf("right") > -1 && !v["repeating_resource_" + baseid + "_resource_left_name"])) {
removeRepeatingRow("repeating_resource_" + baseid);
}
else {
update["repeating_resource_" + id.replace("repeating_resource_", "")] = "";
update["repeating_resource_" + id.replace("repeating_resource_", "") + "_name"] = "";
};
setAttrs(update, {silent: true});
});
};
});
};
var update_weight = function() {
var update = {};
var wtotal = 0;
var weight_attrs = ["cp","sp","ep","gp","pp","encumberance_setting","strength","size","carrying_capacity_mod"];
getSectionIDs("repeating_inventory", function(idarray) {
_.each(idarray, function(currentID, i) {
weight_attrs.push("repeating_inventory_" + currentID + "_itemweight");
weight_attrs.push("repeating_inventory_" + currentID + "_itemcount");
});
getAttrs(weight_attrs, function(v) {
cp = isNaN(parseInt(v.cp, 10)) === false ? parseInt(v.cp, 10) : 0;
sp = isNaN(parseInt(v.sp, 10)) === false ? parseInt(v.sp, 10) : 0;
ep = isNaN(parseInt(v.ep, 10)) === false ? parseInt(v.ep, 10) : 0;
gp = isNaN(parseInt(v.gp, 10)) === false ? parseInt(v.gp, 10) : 0;
pp = isNaN(parseInt(v.pp, 10)) === false ? parseInt(v.pp, 10) : 0;
wtotal = wtotal + ((cp + sp + ep + gp + pp) / 50);
_.each(idarray, function(currentID, i) {
if(v["repeating_inventory_" + currentID + "_itemweight"] && isNaN(parseInt(v["repeating_inventory_" + currentID + "_itemweight"], 10)) === false) {
count = v["repeating_inventory_" + currentID + "_itemcount"] && isNaN(parseFloat(v["repeating_inventory_" + currentID + "_itemcount"])) === false ? parseFloat(v["repeating_inventory_" + currentID + "_itemcount"]) : 1;
wtotal = wtotal + (parseFloat(v["repeating_inventory_" + currentID + "_itemweight"]) * count);
}
});
update["weighttotal"] = wtotal;
var str_base = parseInt(v.strength, 10);
var size_multiplier = 1;
if(v["size"] && v["size"] != "") {
if(v["size"].toLowerCase().trim() == "tiny") {size_multiplier = .5}
else if(v["size"].toLowerCase().trim() == "large") {size_multiplier = 2}
else if(v["size"].toLowerCase().trim() == "huge") {size_multiplier = 4}
else if(v["size"].toLowerCase().trim() == "gargantuan") {size_multiplier = 8}
}
var str = str_base*size_multiplier;
if(v.carrying_capacity_mod) {
var operator = v.carrying_capacity_mod.substring(0,1);
var value = v.carrying_capacity_mod.substring(1);
if(["*","x","+","-"].indexOf(operator) > -1 && isNaN(parseInt(value,10)) === false) {
if(operator == "*" || operator == "x") {str = str*parseInt(value,10);}
else if(operator == "+") {str = str+parseInt(value,10);}
else if(operator == "-") {str = str-parseInt(value,10);}
}
}
if(!v.encumberance_setting || v.encumberance_setting === "off") {
if(wtotal > str*15) {
update["encumberance"] = "OVER CARRYING CAPACITY";
}
else {
update["encumberance"] = " ";
}
}
else if(v.encumberance_setting === "on") {
if(wtotal > str*15) {
update["encumberance"] = "IMMOBILE";
}
else if(wtotal > str*10) {
update["encumberance"] = "HEAVILY ENCUMBERED";
}
else if(wtotal > str*5) {
update["encumberance"] = "ENCUMBERED";
}
else {
update["encumberance"] = " ";
}
}
else {
update["encumberance"] = " ";
}
setAttrs(update, {silent: true});
});
});
};
var update_ac = function() {
getAttrs(["custom_ac_flag"], function(v) {
if(v.custom_ac_flag === "2") {
return;
}
else if(v.custom_ac_flag === "1") {
getAttrs(["custom_ac_base","custom_ac_part1","custom_ac_part2","strength_mod","dexterity_mod","constitution_mod","intelligence_mod","wisdom_mod","charisma_mod"], function(b) {
var base = isNaN(parseInt(b.custom_ac_base, 10)) === false ? parseInt(b.custom_ac_base, 10) : 10;
var part1attr = b.custom_ac_part1.toLowerCase();
var part2attr = b.custom_ac_part2.toLowerCase();
var part1 = part1attr === "none" ? 0 : b[part1attr + "_mod"];
var part2 = part2attr === "none" ? 0 : b[part2attr + "_mod"];
var total = base + part1 + part2;
setAttrs({ac: total});
});
}
else {
var update = {};
var ac_attrs = ["simpleinventory","dexterity_mod","globalacmod"];
getSectionIDs("repeating_inventory", function(idarray) {
_.each(idarray, function(currentID, i) {
ac_attrs.push("repeating_inventory_" + currentID + "_equipped");
ac_attrs.push("repeating_inventory_" + currentID + "_itemmodifiers");
});
getAttrs(ac_attrs, function(b) {
var globalacmod = isNaN(parseInt(b.globalacmod, 10)) === false ? parseInt(b.globalacmod, 10) : 0;
var dexmod = b["dexterity_mod"];
var total = 10 + dexmod;
var armorcount = 0;
var shieldcount = 0;
var armoritems = [];
if(b.simpleinventory === "complex") {
_.each(idarray, function(currentID, i) {
if(b["repeating_inventory_" + currentID + "_equipped"] && b["repeating_inventory_" + currentID + "_equipped"] === "1" && b["repeating_inventory_" + currentID + "_itemmodifiers"] && b["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf("ac") > -1) {
var mods = b["repeating_inventory_" + currentID + "_itemmodifiers"].split(",");
var ac = 0;
var type = "mod";
_.each(mods, function(mod) {
if(mod.substring(0,10) === "Item Type:") {
type = mod.substring(11, mod.length).trim().toLowerCase();
}
if(mod.toLowerCase().indexOf("ac:") > -1 || mod.toLowerCase().indexOf("ac +") > -1 || mod.toLowerCase().indexOf("ac+") > -1) {
var regex = mod.replace(/[^0-9]/g, "");
var bonus = regex && regex.length > 0 && isNaN(parseInt(regex,10)) === false ? parseInt(regex,10) : 0;
ac = ac + bonus;
}
if(mod.toLowerCase().indexOf("ac -") > -1 || mod.toLowerCase().indexOf("ac-") > -1) {
var regex = mod.replace(/[^0-9]/g, "");
var bonus = regex && regex.length > 0 && isNaN(parseInt(regex,10)) === false ? parseInt(regex,10) : 0;
ac = ac - bonus;
}
});
armoritems.push({type: type, ac: ac});
}
});
armorcount = armoritems.filter(function(item){ return item["type"].indexOf("armor") > -1 }).length;
shieldcount = armoritems.filter(function(item){ return item["type"].indexOf("shield") > -1 }).length;
var base = dexmod;
var armorac = 10;
var shieldac = 0;
var modac = 0;
_.each(armoritems, function(item) {
if(item["type"].indexOf("light armor") > -1) {
armorac = item["ac"];
base = dexmod;
}
else if(item["type"].indexOf("medium armor") > -1) {
armorac = item["ac"];
base = Math.min(dexmod, 2);
}
else if(item["type"].indexOf("heavy armor") > -1) {
armorac = item["ac"];
base = 0;
}
else if(item["type"].indexOf("shield") > -1) {
shieldac = item["ac"];
}
else {
modac = modac + item["ac"]
}
})
total = base + armorac + shieldac + modac;
};
if(armorcount > 1 || shieldcount > 1) {
update["armorwarningflag"] = "show";
update["armorwarning"] = "0";
}
else {
update["armorwarningflag"] = "hide";
update["armorwarning"] = "0";
}
update["ac"] = total + globalacmod;
setAttrs(update, {silent: true});
});
});
};
});
};
var check_customac = function(attr) {
getAttrs(["custom_ac_flag","custom_ac_part1","custom_ac_part2"], function(v) {
if(v["custom_ac_flag"] && v["custom_ac_flag"] === "1" && ((v["custom_ac_part1"] && v["custom_ac_part1"] === attr) || (v["custom_ac_part2"] && v["custom_ac_part2"] === attr))) {
update_ac();
}
});
};
var update_initiative = function() {
getAttrs(["dexterity","dexterity_mod","initmod","jack_of_all_trades","jack","init_tiebreaker","pb_type"], function(v) {
var update = {};
var final_init = parseInt(v["dexterity_mod"], 10);
if(v["initmod"] && !isNaN(parseInt(v["initmod"], 10))) {
final_init = final_init + parseInt(v["initmod"], 10);
}
if(v["init_tiebreaker"] && v["init_tiebreaker"] != 0) {
final_init = final_init + (parseInt(v["dexterity"], 10)/100);
}
if(v["jack_of_all_trades"] && v["jack_of_all_trades"] != 0) {
if(v["pb_type"] && v["pb_type"] === "die" && v["jack"]) {
// final_init = final_init + Math.floor(parseInt(v["jack"].substring(1),10)/2);
final_init = final_init + "+" + v["jack"];
}
else if(v["jack"] && !isNaN(parseInt(v["jack"], 10))) {
final_init = final_init + parseInt(v["jack"], 10);
}
}
update["initiative_bonus"] = final_init;
setAttrs(update, {silent: true});
});
};
var update_class = function() {
getAttrs(["class","base_level","custom_class","cust_classname","cust_hitdietype","cust_spellcasting_ability","cust_strength_save_prof","cust_dexterity_save_prof","cust_constitution_save_prof","cust_intelligence_save_prof","cust_wisdom_save_prof","cust_charisma_save_prof","strength_save_prof","dexterity_save_prof","constitution_save_prof","intelligence_save_prof","wisdom_save_prof","charisma_save_prof"], function(v) {
if(v.custom_class && v.custom_class != "0") {
setAttrs({
hitdietype: v.cust_hitdietype,
spellcasting_ability: v.cust_spellcasting_ability,
strength_save_prof: v.cust_strength_save_prof,
dexterity_save_prof: v.cust_dexterity_save_prof,
constitution_save_prof: v.cust_constitution_save_prof,
intelligence_save_prof: v.cust_intelligence_save_prof,
wisdom_save_prof: v.cust_wisdom_save_prof,
charisma_save_prof: v.cust_charisma_save_prof
});
}
else {
update = {};
switch(v.class) {
case "":
update["hitdietype"] = 6;
update["spellcasting_ability"] = "0*";
update["strength_save_prof"] = 0;
update["dexterity_save_prof"] = 0;
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = 0;
update["charisma_save_prof"] = 0;
update["class_resource_name"] = "";
break;
case "Barbarian":
update["hitdietype"] = 12;
update["spellcasting_ability"] = "0*";
if(!v.strength_save_prof || v.strength_save_prof != "(@{pb})" || !v.constitution_save_prof || v.constitution_save_prof != "(@{pb})") {
update["strength_save_prof"] = "(@{pb})";
update["dexterity_save_prof"] = 0;
update["constitution_save_prof"] = "(@{pb})";
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = 0;
update["charisma_save_prof"] = 0;
update["class_resource_name"] = "Rage";
}
break;
case "Bard":
update["hitdietype"] = 8;
update["spellcasting_ability"] = "@{charisma_mod}+";
if(!v.dexterity_save_prof || v.dexterity_save_prof != "(@{pb})" || !v.charisma_save_prof || v.charisma_save_prof != "(@{pb})") {
update["strength_save_prof"] = 0;
update["dexterity_save_prof"] = "(@{pb})";
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = 0;
update["charisma_save_prof"] = "(@{pb})";
update["class_resource_name"] = "Bardic Inspiration";
}
break;
case "Cleric":
update["hitdietype"] = 8;
update["spellcasting_ability"] = "@{wisdom_mod}+";
if(!v.wisdom_save_prof || v.wisdom_save_prof != "(@{pb})" || !v.charisma_save_prof || v.charisma_save_prof != "(@{pb})") {
update["strength_save_prof"] = 0;
update["dexterity_save_prof"] = 0;
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = "(@{pb})";
update["charisma_save_prof"] = "(@{pb})";
update["class_resource_name"] = "Channel Divinity";
}
break;
case "Druid":
update["hitdietype"] = 8;
update["spellcasting_ability"] = "@{wisdom_mod}+";
if(!v.wisdom_save_prof || v.wisdom_save_prof != "(@{pb})" || !v.intelligence_save_prof || v.intelligence_save_prof != "(@{pb})") {
update["strength_save_prof"] = 0;
update["dexterity_save_prof"] = 0;
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = "(@{pb})";
update["wisdom_save_prof"] = "(@{pb})";
update["charisma_save_prof"] = 0;
update["class_resource_name"] = "Wild Shape";
}
break;
case "Fighter":
update["hitdietype"] = 10;
update["spellcasting_ability"] = "0*";
if(!v.strength_save_prof || v.strength_save_prof != "(@{pb})" || !v.constitution_save_prof || v.constitution_save_prof != "(@{pb})") {
update["strength_save_prof"] = "(@{pb})";
update["dexterity_save_prof"] = 0;
update["constitution_save_prof"] = "(@{pb})";
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = 0;
update["charisma_save_prof"] = 0;
update["class_resource_name"] = "Second Wind";
}
break;
case "Monk":
update["hitdietype"] = 8;
update["spellcasting_ability"] = "0*";
if(!v.strength_save_prof || v.strength_save_prof != "(@{pb})" || !v.dexterity_save_prof || v.dexterity_save_prof != "(@{pb})") {
update["strength_save_prof"] = "(@{pb})";
update["dexterity_save_prof"] = "(@{pb})";
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = 0;
update["charisma_save_prof"] = 0;
update["class_resource_name"] = "Ki";
}
break;
case "Paladin":
update["hitdietype"] = 10;
update["spellcasting_ability"] = "@{charisma_mod}+";
if(!v.wisdom_save_prof || v.wisdom_save_prof != "(@{pb})" || !v.charisma_save_prof || v.charisma_save_prof != "(@{pb})") {
update["strength_save_prof"] = 0;
update["dexterity_save_prof"] = 0;
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = "(@{pb})";
update["charisma_save_prof"] = "(@{pb})";
update["class_resource_name"] = "Channel Divinity";
}
break;
case "Ranger":
update["hitdietype"] = 10;
update["spellcasting_ability"] = "@{wisdom_mod}+";
if(!v.strength_save_prof || v.strength_save_prof != "(@{pb})" || !v.dexterity_save_prof || v.dexterity_save_prof != "(@{pb})") {
update["strength_save_prof"] = "(@{pb})";
update["dexterity_save_prof"] = "(@{pb})";
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = 0;
update["charisma_save_prof"] = 0;
}
break;
case "Rogue":
update["hitdietype"] = 8;
update["spellcasting_ability"] = "0*";
if(!v.intelligence_save_prof || v.intelligence_save_prof != "(@{pb})" || !v.dexterity_save_prof || v.dexterity_save_prof != "(@{pb})") {
update["strength_save_prof"] = 0;
update["dexterity_save_prof"] = "(@{pb})";
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = "(@{pb})";
update["wisdom_save_prof"] = 0;
update["charisma_save_prof"] = 0;
}
break;
case "Sorcerer":
update["hitdietype"] = 6;
update["spellcasting_ability"] = "@{charisma_mod}+";
if(!v.constitution_save_prof || v.constitution_save_prof != "(@{pb})" || !v.charisma_save_prof || v.charisma_save_prof != "(@{pb})") {
update["strength_save_prof"] = 0;
update["dexterity_save_prof"] = 0;
update["constitution_save_prof"] = "(@{pb})";
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = 0;
update["charisma_save_prof"] = "(@{pb})";
update["class_resource_name"] = "Sorcery Points";
}
break;
case "Warlock":
update["hitdietype"] = 8;
update["spellcasting_ability"] = "@{charisma_mod}+";
if(!v.wisdom_save_prof || v.wisdom_save_prof != "(@{pb})" || !v.charisma_save_prof || v.charisma_save_prof != "(@{pb})") {
update["strength_save_prof"] = 0;
update["dexterity_save_prof"] = 0;
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = 0;
update["wisdom_save_prof"] = "(@{pb})";
update["charisma_save_prof"] = "(@{pb})";
update["class_resource_name"] = "Spell Slots";
}
break;
case "Wizard":
update["hitdietype"] = 6;
update["spellcasting_ability"] = "@{intelligence_mod}+";
if(!v.wisdom_save_prof || v.wisdom_save_prof != "(@{pb})" || !v.intelligence_save_prof || v.intelligence_save_prof != "(@{pb})") {
update["strength_save_prof"] = 0;
update["dexterity_save_prof"] = 0;
update["constitution_save_prof"] = 0;
update["intelligence_save_prof"] = "(@{pb})";
update["wisdom_save_prof"] = "(@{pb})";
update["charisma_save_prof"] = 0;
}
break;
}
setAttrs(update, {silent: true});
};
});
set_level();
};
var set_level = function() {
getAttrs(["base_level","multiclass1_flag","multiclass2_flag","multiclass3_flag","multiclass1_lvl","multiclass2_lvl","multiclass3_lvl","class","multiclass1","multiclass2","multiclass3", "arcane_fighter", "arcane_rogue", "custom_class", "cust_spellslots", "cust_classname","level_calculations"], function(v) {
var update = {};
var callbacks = [];
var multiclass = (v.multiclass1_flag && v.multiclass1_flag === "1") || (v.multiclass2_flag && v.multiclass2_flag === "1") || (v.multiclass3_flag && v.multiclass3_flag === "1") ? true : false;
var finalclass = v["custom_class"] && v["custom_class"] != "0" ? v["cust_spellslots"] : v["class"];
var casterlevel = checkCasterLevel(finalclass.toLowerCase(), v["base_level"], v["arcane_fighter"], v["arcane_rogue"]);
var finallevel = (v.base_level && v.base_level > 0) ? parseInt(v.base_level,10) : 1;
var charclass = v.custom_class && v.custom_class != "0" ? v["cust_classname"] : v["class"];
var hitdie_final = multiclass ? "?{Hit Die Class|" + charclass + ",@{hitdietype}" : "@{hitdietype}";
if(v.multiclass1_flag && v.multiclass1_flag === "1") {
var multiclasslevel = (v["multiclass1_lvl"] && v["multiclass1_lvl"] > 0) ? parseInt(v["multiclass1_lvl"], 10) : 1;
finallevel = finallevel + multiclasslevel;
casterlevel = casterlevel + checkCasterLevel(v["multiclass1"], v["multiclass1_lvl"], v["arcane_fighter"], v["arcane_rogue"]);
hitdie_final = hitdie_final + "|" + v["multiclass1"].charAt(0).toUpperCase() + v["multiclass1"].slice(1) + "," + checkHitDie(v["multiclass1"]);
};
if(v.multiclass2_flag && v.multiclass2_flag === "1") {
var multiclasslevel = (v["multiclass2_lvl"] && v["multiclass2_lvl"] > 0) ? parseInt(v["multiclass2_lvl"], 10) : 1;
finallevel = finallevel + multiclasslevel;
casterlevel = casterlevel + checkCasterLevel(v["multiclass2"], v["multiclass2_lvl"], v["arcane_fighter"], v["arcane_rogue"]);
hitdie_final = hitdie_final + "|" + v["multiclass2"].charAt(0).toUpperCase() + v["multiclass2"].slice(1) + "," + checkHitDie(v["multiclass2"]);
};
if(v.multiclass3_flag && v.multiclass3_flag === "1") {
var multiclasslevel = (v["multiclass3_lvl"] && v["multiclass3_lvl"] > 0) ? parseInt(v["multiclass3_lvl"], 10) : 1;
finallevel = finallevel + multiclasslevel;
casterlevel = casterlevel + checkCasterLevel(v["multiclass3"], v["multiclass3_lvl"], v["arcane_fighter"], v["arcane_rogue"]);
hitdie_final = hitdie_final + "|" + v["multiclass3"].charAt(0).toUpperCase() + v["multiclass3"].slice(1) + "," + checkHitDie(v["multiclass3"]);
};
update["hitdie_final"] = multiclass ? hitdie_final + "}" : hitdie_final;
update["level"] = finallevel;
update["caster_level"] = casterlevel;
if(!v["level_calculations"] || v["level_calculations"] == "on") {
update["hit_dice_max"] = finallevel;
callbacks.push( function() {update_spell_slots();} );
}
callbacks.push( function() {update_pb();} );
setAttrs(update, {silent: true}, function() {callbacks.forEach(function(callback) {callback(); })} );
});
};
var checkCasterLevel = function(class_string, levels, arcane_fighter, arcane_rogue) {
var full = ["bard","cleric","druid","sorcerer","wizard","full"];
var half = ["paladin","ranger","half"];
if(full.indexOf(class_string) != -1) {
return parseInt(levels, 10);
}
else if(half.indexOf(class_string) != -1) {
if(levels == 1) {
return 0;
}
else {
return Math.ceil(parseInt(levels, 10) / 2);
}
}
else if((class_string === "fighter" && arcane_fighter === "1") || (class_string === "rogue" && arcane_rogue === "1")) {
if(levels == 1 || levels == 2) {
return 0;
}
else {
return Math.ceil(parseInt(levels, 10) / 3);
}
}
else {
return 0;
}
};
var checkHitDie = function(class_string) {
var d10class = ["fighter","paladin","ranger"];
var d8class = ["bard","cleric","druid","monk","rogue","warlock"];
var d6class = ["sorcerer","wizard"];
if(class_string === "barbarian") {return "12"}
else if (d10class.indexOf(class_string) != -1) {return "10"}
else if (d8class.indexOf(class_string) != -1) {return "8"}
else if (d6class.indexOf(class_string) != -1) {return "6"}
else {return "0"};
};
var update_spell_slots = function() {
getAttrs(["lvl1_slots_mod","lvl2_slots_mod","lvl3_slots_mod","lvl4_slots_mod","lvl5_slots_mod","lvl6_slots_mod","lvl7_slots_mod","lvl8_slots_mod","lvl9_slots_mod","caster_level"], function(v) {
var update = {};
var lvl = v["caster_level"] && !isNaN(parseInt(v["caster_level"], 10)) ? parseInt(v["caster_level"], 10) : 0;
var l1 = v["lvl1_slots_mod"] && !isNaN(parseInt(v["lvl1_slots_mod"], 10)) ? parseInt(v["lvl1_slots_mod"], 10) : 0;
var l2 = v["lvl2_slots_mod"] && !isNaN(parseInt(v["lvl2_slots_mod"], 10)) ? parseInt(v["lvl2_slots_mod"], 10) : 0;
var l3 = v["lvl3_slots_mod"] && !isNaN(parseInt(v["lvl3_slots_mod"], 10)) ? parseInt(v["lvl3_slots_mod"], 10) : 0;
var l4 = v["lvl4_slots_mod"] && !isNaN(parseInt(v["lvl4_slots_mod"], 10)) ? parseInt(v["lvl4_slots_mod"], 10) : 0;
var l5 = v["lvl5_slots_mod"] && !isNaN(parseInt(v["lvl5_slots_mod"], 10)) ? parseInt(v["lvl5_slots_mod"], 10) : 0;
var l6 = v["lvl6_slots_mod"] && !isNaN(parseInt(v["lvl6_slots_mod"], 10)) ? parseInt(v["lvl6_slots_mod"], 10) : 0;
var l7 = v["lvl7_slots_mod"] && !isNaN(parseInt(v["lvl7_slots_mod"], 10)) ? parseInt(v["lvl7_slots_mod"], 10) : 0;
var l8 = v["lvl8_slots_mod"] && !isNaN(parseInt(v["lvl8_slots_mod"], 10)) ? parseInt(v["lvl8_slots_mod"], 10) : 0;
var l9 = v["lvl9_slots_mod"] && !isNaN(parseInt(v["lvl9_slots_mod"], 10)) ? parseInt(v["lvl9_slots_mod"], 10) : 0;
if(lvl > 0) {
l1 = l1 + Math.min((lvl + 1),4);
if(lvl < 3) {l2 = l2 + 0;} else if(lvl === 3) {l2 = l2 + 2;} else {l2 = l2 + 3;};
if(lvl < 5) {l3 = l3 + 0;} else if(lvl === 5) {l3 = l3 + 2;} else {l3 = l3 + 3;};
if(lvl < 7) {l4 = l4 + 0;} else if(lvl === 7) {l4 = l4 + 1;} else if(lvl === 8) {l4 = l4 + 2;} else {l4 = l4 + 3;};
if(lvl < 9) {l5 = l5 + 0;} else if(lvl === 9) {l5 = l5 + 1;} else if(lvl < 18) {l5 = l5 + 2;} else {l5 = l5 + 3;};
if(lvl < 11) {l6 = l6 + 0;} else if(lvl < 19) {l6 = l6 + 1;} else {l6 = l6 + 2;};
if(lvl < 13) {l7 = l7 + 0;} else if(lvl < 20) {l7 = l7 + 1;} else {l7 = l7 + 2;};
if(lvl < 15) {l8 = l8 + 0;} else {l8 = l8 + 1;};
if(lvl < 17) {l9 = l9 + 0;} else {l9 = l9 + 1;};
};
update["lvl1_slots_total"] = l1;
update["lvl2_slots_total"] = l2;
update["lvl3_slots_total"] = l3;
update["lvl4_slots_total"] = l4;
update["lvl5_slots_total"] = l5;
update["lvl6_slots_total"] = l6;
update["lvl7_slots_total"] = l7;
update["lvl8_slots_total"] = l8;
update["lvl9_slots_total"] = l9;
setAttrs(update, {silent: true});
});
};
var update_pb = function() {
callbacks = [];
getAttrs(["level","pb_type","pb_custom"], function(v) {
var update = {};
var pb = 2;
var lvl = parseInt(v["level"],10);
if(lvl < 5) {pb = "2"} else if(lvl < 9) {pb = "3"} else if(lvl < 13) {pb = "4"} else if(lvl < 17) {pb = "5"} else {pb = "6"}
var jack = Math.floor(pb/2);
if(v["pb_type"] === "die") {
update["jack"] = "d" + pb;
update["pb"] = "d" + pb*2;
update["pbd_safe"] = "cs0cf0";
}
else if(v["pb_type"] === "custom" && v["pb_custom"] && v["pb_custom"] != "") {
update["pb"] = v["pb_custom"]
update["jack"] = !isNaN(parseInt(v["pb_custom"],10)) ? Math.floor(parseInt(v["pb_custom"],10)/2) : jack;
update["pbd_safe"] = "";
}
else {
update["pb"] = pb;
update["jack"] = jack;
update["pbd_safe"] = "";
};
callbacks.push( function() {update_attacks("all");} );
callbacks.push( function() {update_spell_info();} );
callbacks.push( function() {update_jack_attr();} );
callbacks.push( function() {update_initiative();} );
callbacks.push( function() {update_tool("all");} );
callbacks.push( function() {update_all_saves();} );
callbacks.push( function() {update_skills(["athletics", "acrobatics", "sleight_of_hand", "stealth", "arcana", "history", "investigation", "nature", "religion", "animal_handling", "insight", "medicine", "perception", "survival","deception", "intimidation", "performance", "persuasion"]);} );
setAttrs(update, {silent: true}, function() {callbacks.forEach(function(callback) {callback(); })} );
});
};
var update_jack_attr = function() {
var update = {};
getAttrs(["jack_of_all_trades","jack"], function(v) {
if(v["jack_of_all_trades"] && v["jack_of_all_trades"] != 0) {
update["jack_bonus"] = "+" + v["jack"];
update["jack_attr"] = "+" + v["jack"] + "@{pbd_safe}";
}
else {
update["jack_bonus"] = "";
update["jack_attr"] = "";
}
setAttrs(update, {silent: true});
});
};
var update_spell_info = function(attr) {
var update = {};
getAttrs(["spellcasting_ability","spell_dc_mod","globalmagicmod","strength_mod","dexterity_mod","constitution_mod","intelligence_mod","wisdom_mod","charisma_mod"], function(v) {
if(attr && v["spellcasting_ability"] && v["spellcasting_ability"].indexOf(attr) === -1) {
return
};
if(!v["spellcasting_ability"] || (v["spellcasting_ability"] && v["spellcasting_ability"] === "0*")) {
update["spell_attack_bonus"] = "0";
update["spell_save_dc"] = "0";
var callback = function() {update_attacks("spells")};
setAttrs(update, {silent: true}, callback);
return
};
var attr = attr ? attr : "";
console.log("UPDATING SPELL INFO: " + attr);
var ability = parseInt(v[v["spellcasting_ability"].substring(2,v["spellcasting_ability"].length-2)],10);
var spell_mod = v["globalmagicmod"] && !isNaN(parseInt(v["globalmagicmod"], 10)) ? parseInt(v["globalmagicmod"], 10) : 0;
var atk = v["globalmagicmod"] && !isNaN(parseInt(v["globalmagicmod"], 10)) ? ability + parseInt(v["globalmagicmod"], 10) : ability;
var dc = v["spell_dc_mod"] && !isNaN(parseInt(v["spell_dc_mod"], 10)) ? 8 + ability + parseInt(v["spell_dc_mod"], 10) : 8 + ability;
var itemfields = ["pb_type","pb"];
getSectionIDs("repeating_inventory", function(idarray) {
_.each(idarray, function(currentID, i) {
itemfields.push("repeating_inventory_" + currentID + "_equipped");
itemfields.push("repeating_inventory_" + currentID + "_itemmodifiers");
});
getAttrs(itemfields, function(v) {
_.each(idarray, function(currentID) {
if((!v["repeating_inventory_" + currentID + "_equipped"] || v["repeating_inventory_" + currentID + "_equipped"] === "1") && v["repeating_inventory_" + currentID + "_itemmodifiers"] && v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().indexOf("spell" > -1)) {
var mods = v["repeating_inventory_" + currentID + "_itemmodifiers"].toLowerCase().split(",");
_.each(mods, function(mod) {
if(mod.indexOf("spell attack") > -1) {
var substr = mod.slice(mod.lastIndexOf("spell attack") + "spell attack".length);
atk = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? atk + parseInt(substr,10) : atk;
spell_mod = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? spell_mod + parseInt(substr,10) : spell_mod;
};
if(mod.indexOf("spell dc") > -1) {
var substr = mod.slice(mod.lastIndexOf("spell dc") + "spell dc".length);
dc = substr && substr.length > 0 && !isNaN(parseInt(substr,10)) ? dc + parseInt(substr,10) : dc;
};
});
};
});
if(v["pb_type"] && v["pb_type"] === "die") {
atk = atk + "+" + v["pb"];
dc = dc + parseInt(v["pb"].substring(1), 10) / 2;
}
else {
atk = parseInt(atk, 10) + parseInt(v["pb"], 10);
dc = parseInt(dc, 10) + parseInt(v["pb"], 10);
};
update["spell_attack_mod"] = spell_mod;
update["spell_attack_bonus"] = atk;
update["spell_save_dc"] = dc;
var callback = function() {update_attacks("spells")};
setAttrs(update, {silent: true}, callback);
});
});
});
};
var update_challenge = function() {
getAttrs(["npc_challenge"], function(v) {
var update = {};
var xp = 0;
var pb = 0;
switch(v.npc_challenge) {
case "0":
xp = "10";
pb = 2;
break;
case "1/8":
xp = "25";
pb = 2;
break;
case "1/4":
xp = "50";
pb = 2;
break;
case "1/2":
xp = "100";
pb = 2;
break;
case "1":
xp = "200";
pb = 2;
break;
case "2":
xp = "450";
pb = 2;
break;
case "3":
xp = "700";
pb = 2;
break;
case "4":
xp = "1100";
pb = 2;
break;
case "5":
xp = "1800";
pb = 3;
break;
case "6":
xp = "2300";
pb = 3;
break;
case "7":
xp = "2900";
pb = 3;
break;
case "8":
xp = "3900";
pb = 3;
break;
case "9":
xp = "5000";
pb = 4;
break;
case "10":
xp = "5900";
pb = 4;
break;
case "11":
xp = "7200";
pb = 4;
break;
case "12":
xp = "8400";
pb = 4;
break;
case "13":
xp = "10000";
pb = 5;
break;
case "14":
xp = "11500";
pb = 5;
break;
case "15":
xp = "13000";
pb = 5;
break;
case "16":
xp = "15000";
pb = 5;
break;
case "17":
xp = "18000";
pb = 6;
break;
case "18":
xp = "20000";
pb = 6;
break;
case "19":
xp = "22000";
pb = 6;
break;
case "20":
xp = "25000";
pb = 6;
break;
case "21":
xp = "33000";
pb = 7;
break;
case "22":
xp = "41000";
pb = 7;
break;
case "23":
xp = "50000";
pb = 7;
break;
case "24":
xp = "62000";
pb = 7;
break;
case "25":
xp = "75000";
pb = 8;
break;
case "26":
xp = "90000";
pb = 8;
break;
case "27":
xp = "105000";
pb = 8;
break;
case "28":
xp = "120000";
pb = 8;
break;
case "29":
xp = "";
pb = 9;
break;
case "30":
xp = "155000";
pb = 9;
break;
}
update["npc_xp"] = xp;
update["pb_custom"] = pb;
update["pb_type"] = "custom";
setAttrs(update, {silent: true}, function() {update_pb()});
});
};
var update_npc_saves = function() {
getAttrs(["npc_str_save_base","npc_dex_save_base","npc_con_save_base","npc_int_save_base","npc_wis_save_base","npc_cha_save_base"], function(v) {
var update = {};
var last_save = 0; var cha_save_flag = 0; var cha_save = ""; var wis_save_flag = 0; var wis_save = ""; var int_save_flag = 0; var int_save = ""; var con_save_flag = 0; var con_save = ""; var dex_save_flag = 0; var dex_save = ""; var str_save_flag = 0; var str_save = "";
// 1 = Positive, 2 = Last, 3 = Negative, 4 = Last Negative
if(v.npc_cha_save_base && v.npc_cha_save_base != "@{charisma_mod}") {cha_save = parseInt(v.npc_cha_save_base, 10); if(last_save === 0) {last_save = 1; cha_save_flag = cha_save < 0 ? 4 : 2;} else {cha_save_flag = cha_save < 0 ? 3 : 1;} } else {cha_save_flag = 0; cha_save = "";};
if(v.npc_wis_save_base && v.npc_wis_save_base != "@{wisdom_mod}") {wis_save = parseInt(v.npc_wis_save_base, 10); if(last_save === 0) {last_save = 1; wis_save_flag = wis_save < 0 ? 4 : 2;} else {wis_save_flag = wis_save < 0 ? 3 : 1;} } else {wis_save_flag = 0; wis_save = "";};
if(v.npc_int_save_base && v.npc_int_save_base != "@{intelligence_mod}") {int_save = parseInt(v.npc_int_save_base, 10); if(last_save === 0) {last_save = 1; int_save_flag = int_save < 0 ? 4 : 2;} else {int_save_flag = int_save < 0 ? 3 : 1;} } else {int_save_flag = 0; int_save = "";};
if(v.npc_con_save_base && v.npc_con_save_base != "@{constitution_mod}") {con_save = parseInt(v.npc_con_save_base, 10); if(last_save === 0) {last_save = 1; con_save_flag = con_save < 0 ? 4 : 2;} else {con_save_flag = con_save < 0 ? 3 : 1;} } else {con_save_flag = 0; con_save = "";};
if(v.npc_dex_save_base && v.npc_dex_save_base != "@{dexterity_mod}") {dex_save = parseInt(v.npc_dex_save_base, 10); if(last_save === 0) {last_save = 1; dex_save_flag = dex_save < 0 ? 4 : 2;} else {dex_save_flag = dex_save < 0 ? 3 : 1;} } else {dex_save_flag = 0; dex_save = "";};
if(v.npc_str_save_base && v.npc_str_save_base != "@{strength_mod}") {str_save = parseInt(v.npc_str_save_base, 10); if(last_save === 0) {last_save = 1; str_save_flag = str_save < 0 ? 4 : 2;} else {str_save_flag = str_save < 0 ? 3 : 1;} } else {str_save_flag = 0; str_save = "";};
update["npc_saving_flag"] = "" + cha_save + wis_save + int_save + con_save + dex_save + str_save;
update["npc_str_save"] = str_save;
update["npc_str_save_flag"] = str_save_flag;
update["npc_dex_save"] = dex_save;
update["npc_dex_save_flag"] = dex_save_flag;
update["npc_con_save"] = con_save;
update["npc_con_save_flag"] = con_save_flag;
update["npc_int_save"] = int_save;
update["npc_int_save_flag"] = int_save_flag;
update["npc_wis_save"] = wis_save;
update["npc_wis_save_flag"] = wis_save_flag;
update["npc_cha_save"] = cha_save;
update["npc_cha_save_flag"] = cha_save_flag;
setAttrs(update, {silent: true});
});
};
var update_npc_skills = function() {
getAttrs(["npc_acrobatics_base","npc_animal_handling_base","npc_arcana_base","npc_athletics_base","npc_deception_base","npc_history_base","npc_insight_base","npc_intimidation_base","npc_investigation_base","npc_medicine_base","npc_nature_base","npc_perception_base","npc_performance_base","npc_persuasion_base","npc_religion_base","npc_sleight_of_hand_base","npc_stealth_base","npc_survival_base"], function(v) {
var update = {};
var last_skill = 0;
var survival_flag = 0; var survival = ""; var stealth_flag = 0; var stealth = ""; var sleight_of_hand_flag = 0; var sleight_of_hand = ""; var religion_flag = 0; var religion = ""; var persuasion_flag = 0; var persuasion = ""; var performance_flag = 0; var sperformance = ""; var perception_flag = 0; var perception = ""; var perception_flag = 0; var perception = ""; var nature_flag = 0; var nature = ""; var medicine_flag = 0; var medicine = ""; var investigation_flag = 0; var investigation = ""; var intimidation_flag = 0; var intimidation = ""; var insight_flag = 0; var insight = ""; var history_flag = 0; var history = ""; var deception_flag = 0; var deception = ""; var athletics_flag = 0; var athletics = ""; var arcana_flag = 0; var arcana = ""; var animal_handling_flag = 0; var animal_handling = ""; var acrobatics_flag = 0; var acrobatics = "";
// 1 = Positive, 2 = Last, 3 = Negative, 4 = Last Negative
if(v.npc_survival_base && v.npc_survival_base != "@{wisdom_mod}") {survival = parseInt(v.npc_survival_base, 10); if(last_skill === 0) {last_skill = 1; survival_flag = survival < 0 ? 4 : 2;} else {survival_flag = survival < 0 ? 3 : 1;} } else {survival_flag = 0; survival = "";};
if(v.npc_stealth_base && v.npc_stealth_base != "@{dexterity_mod}") {stealth = parseInt(v.npc_stealth_base, 10); if(last_skill === 0) {last_skill = 1; stealth_flag = stealth < 0 ? 4 : 2;} else {stealth_flag = stealth < 0 ? 3 : 1;} } else {stealth_flag = 0; stealth = "";};
if(v.npc_sleight_of_hand_base && v.npc_sleight_of_hand_base != "@{dexterity_mod}") {sleight_of_hand = parseInt(v.npc_sleight_of_hand_base, 10); if(last_skill === 0) {last_skill = 1; sleight_of_hand_flag = sleight_of_hand < 0 ? 4 : 2;} else {sleight_of_hand_flag = sleight_of_hand < 0 ? 3 : 1;} } else {sleight_of_hand_flag = 0; sleight_of_hand = "";};
if(v.npc_religion_base && v.npc_religion_base != "@{intelligence_mod}") {religion = parseInt(v.npc_religion_base, 10); if(last_skill === 0) {last_skill = 1; religion_flag = religion < 0 ? 4 : 2;} else {religion_flag = religion < 0 ? 3 : 1;} } else {religion_flag = 0; religion = "";};
if(v.npc_persuasion_base && v.npc_persuasion_base != "@{charisma_mod}") {persuasion = parseInt(v.npc_persuasion_base, 10); if(last_skill === 0) {last_skill = 1; persuasion_flag = persuasion < 0 ? 4 : 2;} else {persuasion_flag = persuasion < 0 ? 3 : 1;} } else {persuasion_flag = 0; persuasion = "";};
if(v.npc_performance_base && v.npc_performance_base != "@{charisma_mod}") {sperformance = parseInt(v.npc_performance_base, 10); if(last_skill === 0) {last_skill = 1; performance_flag = sperformance < 0 ? 4 : 2;} else {performance_flag = sperformance < 0 ? 3 : 1;} } else {performance_flag = 0; sperformance = "";};
if(v.npc_perception_base && v.npc_perception_base != "@{wisdom_mod}") {perception = parseInt(v.npc_perception_base, 10); if(last_skill === 0) {last_skill = 1; perception_flag = perception < 0 ? 4 : 2;} else {perception_flag = perception < 0 ? 3 : 1;} } else {perception_flag = 0; perception = "";};
if(v.npc_nature_base && v.npc_nature_base != "@{intelligence_mod}") {nature = parseInt(v.npc_nature_base, 10); if(last_skill === 0) {last_skill = 1; nature_flag = nature < 0 ? 4 : 2;} else {nature_flag = nature < 0 ? 3 : 1;} } else {nature_flag = 0; nature = "";};
if(v.npc_medicine_base && v.npc_medicine_base != "@{wisdom_mod}") {medicine = parseInt(v.npc_medicine_base, 10); if(last_skill === 0) {last_skill = 1; medicine_flag = medicine < 0 ? 4 : 2;} else {medicine_flag = medicine < 0 ? 3 : 1;} } else {medicine_flag = 0; medicine = "";};
if(v.npc_investigation_base && v.npc_investigation_base != "@{intelligence_mod}") {investigation = parseInt(v.npc_investigation_base, 10); if(last_skill === 0) {last_skill = 1; investigation_flag = investigation < 0 ? 4 : 2;} else {investigation_flag = investigation < 0 ? 3 : 1;} } else {investigation_flag = 0; investigation = "";};
if(v.npc_intimidation_base && v.npc_intimidation_base != "@{charisma_mod}") {intimidation = parseInt(v.npc_intimidation_base, 10); if(last_skill === 0) {last_skill = 1; intimidation_flag = intimidation < 0 ? 4 : 2;} else {intimidation_flag = intimidation < 0 ? 3 : 1;} } else {intimidation_flag = 0; intimidation = "";};
if(v.npc_insight_base && v.npc_insight_base != "@{wisdom_mod}") {insight = parseInt(v.npc_insight_base, 10); if(last_skill === 0) {last_skill = 1; insight_flag = insight < 0 ? 4 : 2;} else {insight_flag = insight < 0 ? 3 : 1;} } else {insight_flag = 0; insight = "";};
if(v.npc_history_base && v.npc_history_base != "@{intelligence_mod}") {history = parseInt(v.npc_history_base, 10); if(last_skill === 0) {last_skill = 1; history_flag = history < 0 ? 4 : 2;} else {history_flag = history < 0 ? 3 : 1;} } else {history_flag = 0; history = "";};
if(v.npc_deception_base && v.npc_deception_base != "@{charisma_mod}") {deception = parseInt(v.npc_deception_base, 10); if(last_skill === 0) {last_skill = 1; deception_flag = deception < 0 ? 4 : 2;} else {deception_flag = deception < 0 ? 3 : 1;} } else {deception_flag = 0; deception = "";};
if(v.npc_athletics_base && v.npc_athletics_base != "@{strength_mod}") {athletics = parseInt(v.npc_athletics_base, 10); if(last_skill === 0) {last_skill = 1; athletics_flag = athletics < 0 ? 4 : 2;} else {athletics_flag = athletics < 0 ? 3 : 1;} } else {athletics_flag = 0; athletics = "";};
if(v.npc_arcana_base && v.npc_arcana_base != "@{intelligence_mod}") {arcana = parseInt(v.npc_arcana_base, 10); if(last_skill === 0) {last_skill = 1; arcana_flag = arcana < 0 ? 4 : 2;} else {arcana_flag = arcana < 0 ? 3 : 1;} } else {arcana_flag = 0; arcana = "";};
if(v.npc_animal_handling_base && v.npc_animal_handling_base != "@{wisdom_mod}") {animal_handling = parseInt(v.npc_animal_handling_base, 10); if(last_skill === 0) {last_skill = 1; animal_handling_flag = animal_handling < 0 ? 4 : 2;} else {animal_handling_flag = animal_handling < 0 ? 3 : 1;} } else {animal_handling_flag = 0; animal_handling = "";};
if(v.npc_acrobatics_base && v.npc_acrobatics_base != "@{dexterity_mod}") {acrobatics = parseInt(v.npc_acrobatics_base, 10); if(last_skill === 0) {last_skill = 1; acrobatics_flag = acrobatics < 0 ? 4 : 2;} else {acrobatics_flag = acrobatics < 0 ? 3 : 1;} } else {acrobatics_flag = 0; acrobatics = "";};
update["npc_skills_flag"] = "" + acrobatics + animal_handling + arcana + athletics + deception + history + insight + intimidation + investigation + medicine + nature + perception + sperformance + persuasion + religion + sleight_of_hand + stealth + survival;
update["npc_stealth_flag"] = stealth_flag;
update["npc_survival"] = survival;;
update["npc_acrobatics"] = acrobatics;
update["npc_acrobatics_flag"] = acrobatics_flag;
update["npc_animal_handling"] = animal_handling;
update["npc_animal_handling_flag"] = animal_handling_flag;
update["npc_arcana"] = arcana;
update["npc_arcana_flag"] = arcana_flag;
update["npc_athletics"] = athletics;
update["npc_athletics_flag"] = athletics_flag;
update["npc_deception"] = deception;
update["npc_deception_flag"] = deception_flag;
update["npc_history"] = history;
update["npc_history_flag"] = history_flag;
update["npc_insight"] = insight;
update["npc_insight_flag"] = insight_flag;
update["npc_intimidation"] = intimidation;
update["npc_intimidation_flag"] = intimidation_flag;
update["npc_investigation"] = investigation;
update["npc_investigation_flag"] = investigation_flag;
update["npc_medicine"] = medicine;
update["npc_medicine_flag"] = medicine_flag;
update["npc_nature"] = nature;
update["npc_nature_flag"] = nature_flag;
update["npc_perception"] = perception;
update["npc_perception_flag"] = perception_flag;
update["npc_performance"] = sperformance;
update["npc_performance_flag"] = performance_flag;
update["npc_persuasion"] = persuasion;
update["npc_persuasion_flag"] = persuasion_flag;
update["npc_religion"] = religion;
update["npc_religion_flag"] = religion_flag;
update["npc_sleight_of_hand"] = sleight_of_hand;
update["npc_sleight_of_hand_flag"] = sleight_of_hand_flag;
update["npc_stealth"] = stealth;
update["npc_stealth_flag"] = stealth_flag;
update["npc_survival"] = survival;
update["npc_survival_flag"] = survival_flag;
setAttrs(update, {silent: true});
});
};
var update_npc_action = function(update_id, legendary) {
if(update_id.substring(0,1) === "-" && update_id.length === 20) {
do_update_npc_action([update_id], legendary);
}
else if(update_id === "all") {
var legendary_array = [];
var actions_array = [];
getSectionIDs("repeating_npcaction-l", function(idarray) {
legendary_array = idarray;
if(legendary_array.length > 0) {
do_update_npc_action(legendary_array, true);
}
getSectionIDs("repeating_npcaction", function(idarray) {
actions_array = idarray.filter(function(i) {return legendary_array.indexOf(i) < 0;});
if(actions_array.length > 0) {
do_update_npc_action(actions_array, false);
};
});
});
};
};
var do_update_npc_action = function(action_array, legendary) {
var repvar = legendary ? "repeating_npcaction-l_" : "repeating_npcaction_";
var action_attribs = ["dtype"];
_.each(action_array, function(actionid) {
action_attribs.push(repvar + actionid + "_attack_flag");
action_attribs.push(repvar + actionid + "_attack_type");
action_attribs.push(repvar + actionid + "_attack_range");
action_attribs.push(repvar + actionid + "_attack_target");
action_attribs.push(repvar + actionid + "_attack_tohit");
action_attribs.push(repvar + actionid + "_attack_damage");
action_attribs.push(repvar + actionid + "_attack_damagetype");
action_attribs.push(repvar + actionid + "_attack_damage2");
action_attribs.push(repvar + actionid + "_attack_damagetype2");
});
getAttrs(action_attribs, function(v) {
_.each(action_array, function(actionid) {
console.log("UPDATING NPC ACTION: " + actionid);
var callbacks = [];
var update = {};
var onhit = "";
var damage_flag = "";
var range = "";
var attack_flag = v[repvar + actionid + "_attack_flag"] && v[repvar + actionid + "_attack_flag"] != "0" ? "{{attack=1}}" : "";
var tohit = v[repvar + actionid + "_attack_tohit"] && isNaN(parseInt(v[repvar + actionid + "_attack_tohit"], 10)) === false ? parseInt(v[repvar + actionid + "_attack_tohit"], 10) : 0;
if(v[repvar + actionid + "_attack_type"] && v[repvar + actionid + "_attack_range"]) {
if(v[repvar + actionid + "_attack_type"] === "Melee") {var rangetype = "Reach";} else {var rangetype = "Range";};
range = ", " + rangetype + " " + v[repvar + actionid + "_attack_range"];
}
var target = v[repvar + actionid + "_attack_target"] && v[repvar + actionid + "_attack_target"] != "" ? ", " + v[repvar + actionid + "_attack_target"] : ""
var attack_tohitrange = "+" + tohit + range + target;
var dmg1 = v[repvar + actionid + "_attack_damage"] && v[repvar + actionid + "_attack_damage"] != "" ? v[repvar + actionid + "_attack_damage"] : "";
var dmg1type = v[repvar + actionid + "_attack_damagetype"] && v[repvar + actionid + "_attack_damagetype"] != "" ? " " + v[repvar + actionid + "_attack_damagetype"] : "";
var dmg2 = v[repvar + actionid + "_attack_damage2"] && v[repvar + actionid + "_attack_damage2"] != "" ? v[repvar + actionid + "_attack_damage2"] : "";
var dmg2type = v[repvar + actionid + "_attack_damagetype2"] && v[repvar + actionid + "_attack_damagetype2"] != "" ? " " + v[repvar + actionid + "_attack_damagetype2"] : "";
var dmgspacer = dmg1 != "" && dmg2 != "" ? " plus " : "";
if(dmg1 != "") {
dmg1t = dmg1.replace(/\s/g, '').split(/d|(?=\+|\-)/g);
dmg1t2 = isNaN(eval(dmg1t[1])) === false ? eval(dmg1t[1]) : 0;
if(dmg1t.length < 2) {
onhit = onhit + dmg1t[0] + " (" + dmg1 + ")" + dmg1type + " damage";
}
else if(dmg1t.length < 3) {
onhit = onhit + Math.floor(dmg1t[0]*((dmg1t2/2)+0.5)) + " (" + dmg1 + ")" + dmg1type + " damage";
}
else {
onhit = onhit + (Math.floor(dmg1t[0]*((dmg1t2/2)+0.5))+parseInt(dmg1t[2],10)) + " (" + dmg1 + ")" + dmg1type + " damage";
};
};
dmgspacer = dmg1 != "" && dmg2 != "" ? " plus " : "";
onhit = onhit + dmgspacer;
if(dmg2 != "") {
dmg2t = dmg2.replace(/\s/g, '').split(/[d+]+/);
dmg2t2 = isNaN(eval(dmg2t[1])) === false ? eval(dmg2t[1]) : 0;
if(dmg2t.length < 2) {
onhit = onhit + dmg2t[0] + " (" + dmg2 + ")" + dmg2type + " damage";
}
else if(dmg2t.length < 3) {
onhit = onhit + Math.floor(dmg2t[0]*((dmg2t2/2)+0.5)) + " (" + dmg2 + ")" + dmg2type + " damage";
}
else {
onhit = onhit + (Math.floor(dmg2t[0]*((dmg2t2/2)+0.5))+parseInt(dmg2t[2],10)) + " (" + dmg2 + ")" + dmg2type + " damage";
};
};
if(dmg1 != "" || dmg2 != "") {damage_flag = damage_flag + "{{damage=1}} "};
if(dmg1 != "") {damage_flag = damage_flag + "{{dmg1flag=1}} "};
if(dmg2 != "") {damage_flag = damage_flag + "{{dmg2flag=1}} "};
var crit1 = dmg1 != "" && dmg1t.length > 1 ? dmg1t[0] + "d" + dmg1t[1] : "";
var crit2 = dmg2 != "" && dmg2t.length > 1 ? dmg2t[0] + "d" + dmg2t[1] : "";
var rollbase = "";
if(v.dtype === "full") {
rollbase = "@{wtype}&{template:npcaction} " + attack_flag + " @{damage_flag} @{npc_name_flag} {{rname=@{name}}} {{r1=[[@{d20}+(@{attack_tohit}+0)]]}} @{rtype}+(@{attack_tohit}+0)]]}} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}} {{crit1=[[@{attack_crit}+0]]}} {{crit2=[[@{attack_crit2}+0]]}} {{description=@{show_desc}}} @{charname_output}";
}
else if(v[repvar + actionid + "_attack_flag"] && v[repvar + actionid + "_attack_flag"] != "0") {
if(legendary) {
rollbase = "@{wtype}&{template:npcatk} " + attack_flag + " @{damage_flag} @{npc_name_flag} {{rname=[@{name}](~repeating_npcaction-l_npc_dmg)}} {{rnamec=[@{name}](~repeating_npcaction-l_npc_crit)}} {{type=[Attack](~repeating_npcaction-l_npc_dmg)}} {{typec=[Attack](~repeating_npcaction-l_npc_crit)}} {{r1=[[@{d20}+(@{attack_tohit}+0)]]}} @{rtype}+(@{attack_tohit}+0)]]}} {{description=@{show_desc}}} @{charname_output}"
}
else {
rollbase = "@{wtype}&{template:npcatk} " + attack_flag + " @{damage_flag} @{npc_name_flag} {{rname=[@{name}](~repeating_npcaction_npc_dmg)}} {{rnamec=[@{name}](~repeating_npcaction_npc_crit)}} {{type=[Attack](~repeating_npcaction_npc_dmg)}} {{typec=[Attack](~repeating_npcaction_npc_crit)}} {{r1=[[@{d20}+(@{attack_tohit}+0)]]}} @{rtype}+(@{attack_tohit}+0)]]}} {{description=@{show_desc}}} @{charname_output}";
}
}
else if(dmg1 || dmg2) {
rollbase = "@{wtype}&{template:npcdmg} @{damage_flag} {{dmg1=[[@{attack_damage}+0]]}} {{dmg1type=@{attack_damagetype}}} {{dmg2=[[@{attack_damage2}+0]]}} {{dmg2type=@{attack_damagetype2}}} {{crit1=[[@{attack_crit}+0]]}} {{crit2=[[@{attack_crit2}+0]]}} @{charname_output}"
}
else {
rollbase = "@{wtype}&{template:npcaction} @{npc_name_flag} {{rname=@{name}}} {{description=@{show_desc}}} @{charname_output}"
}
update[repvar + actionid + "_attack_tohitrange"] = attack_tohitrange;
update[repvar + actionid + "_attack_onhit"] = onhit;
update[repvar + actionid + "_damage_flag"] = damage_flag;
update[repvar + actionid + "_attack_crit"] = crit1;
update[repvar + actionid + "_attack_crit2"] = crit2;
update[repvar + actionid + "_rollbase"] = rollbase;
setAttrs(update, {silent: true});
});
});
};
var v2_old_values_check = function() {
update_attacks("all");
var update = {};
var attrs = ["simpletraits","features_and_traits","initiative_bonus","npc","character_id"];
getSectionIDs("repeating_spell-npc", function(idarray) {
_.each(idarray, function(id) {
attrs.push("repeating_spell-npc_" + id + "_rollcontent");
});
getAttrs(attrs, function(v) {
if(v["npc"] && v["npc"] == 1 && (!v["initiative_bonus"] || v["initiative_bonus"] == 0)) {
update_initiative();
}
var spellflag = idarray && idarray.length > 0 ? 1 : 0;
var missing = v["features_and_traits"] && v["simpletraits"] === "complex" ? 1 : 0;
update["npcspell_flag"] = spellflag;
update["missing_info"] = missing;
_.each(idarray, function(id) {
var content = v["repeating_spell-npc_" + id + "_rollcontent"];
if(content.substring(0,3) === "%{-" && content.substring(22,41) === "|repeating_attack_-" && content.substring(60,68) === "_attack}") {
var thisid = content.substring(2,21);
if(thisid != v["character_id"]) {
update["repeating_spell-npc_" + id + "_rollcontent"] = content.substring(0,2) + v["character_id"] + content.substring(22,68);
}
}
});
setAttrs(update);
});
});
};
var upgrade_to_2_0 = function(doneupdating) {
getAttrs(["npc","strength","dexterity","constitution","intelligence","wisdom","charisma","strength_base","dexterity_base","constitution_base","intelligence_base","wisdom_base","charisma_base","deathsavemod","death_save_mod","npc_str_save","npc_dex_save","npc_con_save","npc_int_save","npc_wis_save","npc_cha_save","npc_str_save_base","npc_dex_save_base","npc_con_save_base","npc_int_save_base","npc_wis_save_base","npc_cha_save_base","npc_acrobatics_base", "npc_animal_handling_base", "npc_arcana_base", "npc_athletics_base", "npc_deception_base", "npc_history_base", "npc_insight_base", "npc_intimidation_base", "npc_investigation_base", "npc_medicine_base", "npc_nature_base", "npc_perception_base", "npc_performance_base", "npc_persuasion_base", "npc_religion_base", "npc_sleight_of_hand_base", "npc_stealth_base", "npc_survival_base", "npc_acrobatics", "npc_animal_handling", "npc_arcana", "npc_athletics", "npc_deception", "npc_history", "npc_insight", "npc_intimidation", "npc_investigation", "npc_medicine", "npc_nature", "npc_perception", "npc_performance", "npc_persuasion", "npc_religion", "npc_sleight_of_hand", "npc_stealth", "npc_survival"], function(v) {
var update = {};
var stats = ["strength","dexterity","constitution","intelligence","wisdom","charisma"];
var npc_stats = ["npc_str_save","npc_dex_save","npc_con_save","npc_int_save","npc_wis_save","npc_cha_save","npc_acrobatics", "npc_animal_handling", "npc_arcana", "npc_athletics", "npc_deception", "npc_history", "npc_insight", "npc_intimidation", "npc_investigation", "npc_medicine", "npc_nature", "npc_perception", "npc_performance", "npc_persuasion", "npc_religion", "npc_sleight_of_hand", "npc_stealth", "npc_survival"];
_.each(stats, function(attr) {
if(v[attr] && v[attr] != "10" && v[attr + "_base"] == "10") {
update[attr + "_base"] = v[attr];
}
});
_.each(npc_stats, function(attr) {
if(v[attr] && !isNaN(v[attr]) && v[attr + "_base"] == "") {
update[attr + "_base"] = v[attr];
}
});
if(v["deathsavemod"] && v["deathsavemod"] != "0" && v["death_save_mod"] === "0") {v["death_save_mod"] = v["deathsavemod"];};
if(v["npc"] && v["npc"] == "1") {
var callback = function() {
update_attr("all");
update_mod("strength");
update_mod("dexterity");
update_mod("constitution");
update_mod("intelligence");
update_mod("wisdom");
update_mod("charisma");
update_npc_action("all");
update_npc_saves();
update_npc_skills();
update_initiative();
}
}
else {
var callback = function() {
update_attr("all");
update_mod("strength");
update_mod("dexterity");
update_mod("constitution");
update_mod("intelligence");
update_mod("wisdom");
update_mod("charisma");
update_all_saves();
update_skills(["athletics", "acrobatics", "sleight_of_hand", "stealth", "arcana", "history", "investigation", "nature", "religion", "animal_handling", "insight", "medicine", "perception", "survival","deception", "intimidation", "performance", "persuasion"]);
update_tool("all")
update_attacks("all");
update_pb();
update_jack_attr();
update_initiative();
update_weight();
update_spell_info();
update_ac();
}
}
setAttrs(update, {silent: true}, callback);
doneupdating();
});
};
var versioning = function() {
getAttrs(["version"], function(v) {
if(v["version"] === "2.0") {
console.log("5th Edition OGL by Roll20 v2.0")
return;
}
else {
console.log("UPGRADING TO v2.0");
upgrade_to_2_0(function() {
setAttrs({version: "2.0"});
versioning();
});
};
});
};
</script>
{
"skills-list": "acrobatics,animal_handling,arcana,athletics,deception,history,insight,intimidation,investigation,medicine,nature,perception,performance,persuasion,religion,sleight_of_hand,stealth,survival",
"npc-options-u": "NPC OPTIONS",
"name-u": "NAME",
"npc-type-u": "NPC TYPE",
"npc-type-place": "Medium fiend, any evil alignment",
"armor-class-u": "ARMOR CLASS",
"class-u": "CLASS",
"type-u": "TYPE",
"npc-armor-place": "scale mail",
"hit-points-u": "HIT POINTS",
"formula-u": "FORMULA",
"speed-u": "SPEED",
"npc-speed-place": "30 ft., fly 60ft.",
"attributes-u": "ATTRIBUTES",
"str-u": "STR",
"dex-u": "DEX",
"con-u": "CON",
"int-u": "INT",
"wis-u": "WIS",
"cha-u": "CHA",
"saves-u": "SAVES",
"skills-u": "SKILLS",
"acrobatics-u": "ACROBATICS",
"animal_handling-u": "ANIMAL HANDLING",
"arcana-u": "ARCANA",
"athletics-u": "ATHLETICS",
"deception-u": "DECEPTION",
"history-u": "HISTORY",
"insight-u": "INSIGHT",
"intimidation-u": "INTIMIDATION",
"investigation-u": "INVESTIGATION",
"medicine-u": "MEDICINE",
"nature-u": "NATURE",
"perception-u": "PERCEPTION",
"performance-u": "PERFORMANCE",
"persuasion-u": "PERSUASION",
"religion-u": "RELIGION",
"sleight_of_hand-u": "SLEIGHT OF HAND",
"stealth-u": "STEALTH",
"survival-u": "SURVIVAL",
"damage-vuln-u": "DAMAGE VULNERABILITIES",
"npc-dmg-vuln-place": "fire",
"damage-res-u": "DAMAGE RESISTANCES",
"npc-dmg-res-place": "cold",
"damage-imm-u": "DAMAGE IMMUNITIES",
"npc-dmg-imm-place": "lightning, thunder",
"cond-imm-u": "CONDITION IMMUNITIES",
"npc-cond-imm-place": "charmed",
"senses-u": "SENSES",
"npc-senses-place": "darkvision 120ft., passive Perception 16",
"langs-u": "LANGUAGES",
"lang-u": "LANGUAGE",
"npc-langs-place": "Abyssal, Common, Infernal",
"challenge-u": "CHALLENGE",
"xp-u": "XP",
"spellcast-npc-u": "SPELLCASTING NPC",
"spell-ability-u": "SPELLCASTING ABILITY",
"none-u": "NONE",
"strength-u": "STRENGTH",
"strength-save-u": "STRENGTH SAVE",
"dexterity-u": "DEXTERITY",
"dexterity-save-u": "DEXTERITY SAVE",
"constitution-u": "CONSTITUTION",
"constitution-save-u": "CONSTITUTION SAVE",
"intelligence-u": "INTELLIGENCE",
"intelligence-save-u": "INTELLIGENCE SAVE",
"wisdom-u": "WISDOM",
"wisdom-save-u": "WISDOM SAVE",
"charisma-u": "CHARISMA",
"charisma-save-u": "CHARISMA SAVE",
"spell-dc-u": "SPELL DC",
"spell-atk-bonus-u": "SPELL ATTACK BONUS",
"has-reaction-u": "HAS REACTIONS",
"leg-actions:-u": "LEGENDARY ACTIONS:",
"gen-opts-u": "GENERAL OPTIONS",
"npc-u": "NPC",
"roll-queries:-u": "ROLL QUERIES:",
"always-adv": "Always Roll Advantage",
"adv-toggle": "Advantage Toggle",
"query-adv": "Query Advantage",
"never-adv": "Never Roll Advantage",
"whisp-rolls-gm:-u": "WHISPER ROLLS TO GM:",
"never-whisp": "Never Whisper Rolls",
"query-whisp": "Query Whisper",
"always-whisp": "Always Whisper Rolls",
"auto-dmg-roll:-u": "AUTO DAMAGE ROLL:",
"never-dmg": "Don't Auto Roll Damage",
"always-dmg": "Auto Roll Damage &amp; Crit",
"ac": "Armor Class",
"hp": "Hit Points",
"speed": "Speed",
"saving-throw": "Saving Throws",
"str": "Str",
"dex": "Dex",
"con": "Con",
"int": "Int",
"wis": "Wis",
"cha": "Cha",
"skills": "Skills",
"acrobatics": "Acrobatics",
"animal_handling": "Animal Handling",
"arcana": "Arcana",
"athletics": "Athletics",
"deception": "Deception",
"history": "History",
"insight": "Insight",
"intimidation": "Intimidation",
"investigation": "Investigation",
"medicine": "Medicine",
"nature": "Nature",
"perception": "Perception",
"performance": "Performance",
"persuasion": "Persuasion",
"religion": "Religion",
"sleight_of_hand": "Sleight of Hand",
"stealth": "Stealth",
"survival": "Survival",
"dmg-vuln": "Damage Vulnerabilities",
"dmg-res": "Damage Resistances",
"dmg-imm": "Damage Immunities",
"cond-imm": "Condition Immunities",
"senses": "Senses",
"langs": "Languages",
"challenge": "Challenge",
"npc-trait-name-place": "False Appearance.",
"npc-trait-desc-place": "If the dragon fails...",
"actions": "Actions",
"adv": "Advantage",
"norm": "Normal",
"disadv": "Disadvantage",
"name:-u": "NAME:",
"attack-u": "ATTACK",
"type:-u": "TYPE:",
"melee": "Melee",
"ranged": "Ranged",
"range-reach:-u": "RANGE/REACH:",
"range-reach-place": "5 ft.",
"to-hit:-u": "TO HIT:",
"target:-u": "TARGET:",
"target:": "Target:",
"to-hit-place": "One target",
"on-hit:-u": "ON HIT:",
"on-hit-place": "slashing",
"on-hit2:-u": "ON HIT 2:",
"on-hit-2-place": "fire",
"hit:": "Hit: ",
"reactions": "Reactions",
"npc-repeating-name-place": "Parry.",
"npc-repeating-desc-place": "The creature adds 2 to its AC against...",
"spells": "Spells",
"prep-u": "PREP",
"school:-u": "SCHOOL:",
"abjuration": "Abjuration",
"conjuration": "Conjuration",
"divination": "Divination",
"enchantment": "Enchantment",
"evocation": "Evocation",
"illusion": "Illusion",
"necromancy": "Necromancy",
"transmutation": "Transmutation",
"ritual": "Ritual",
"ritual-l": "ritual",
"range:-u": "RANGE:",
"range:": "Range:",
"components:-u": "COMPONENTS:",
"components:": "Components:",
"spell-component-verbal": "V",
"spell-component-somatic": "S",
"spell-component-material": "M",
"spell-ritual": "R",
"spell-concentration": "C",
"ruby-dust-place": "ruby dust worth 50gp",
"concentration-u": "CONCENTRATION",
"concentration": "Concentration",
"duration:-u": "DURATION:",
"duration:": "Duration:",
"difficulty-class-abv": "DC",
"output:-u": "OUTPUT:",
"spellcard-u": "SPELLCARD",
"spell-atk:-u": "SPELL ATTACK:",
"none": "None",
"dmg:-u": "DAMAGE:",
"dmg2:-u": "DAMAGE2:",
"healing:-u": "HEALING:",
"add-ability-mod-u": "ADD ABILITY MOD TO DAMAGE OR HEALING",
"effect:-u": "EFFECT:",
"npc-atk-effect-place": "Half damage",
"desc:-u": "DESCRIPTION:",
"at-higher-lvl:-u": "AT HIGHER LEVELS:",
"at-higher-lvl": "At Higher Levels",
"higher-lvl-cast": "Higher Level Cast",
"leg-actions": "Legendary Actions",
"leg-actions-desc": "The <span name=\"attr_npc_name\"></span> can take <span name=\"attr_npc_legendary_actions\"></span> legendary actions, choosing from the options below. Only one legendary option can be used at a time and only at the end of another creature's turn. The <span name=\"attr_npc_name\"></span> regains spent legendary actions at the start of its turn.",
"atk-range-place": "5 ft.",
"atk-target-place": "One target",
"atk-dmg-type-place": "slashing",
"atk-dmg-type2-place": "fire",
"adv-u": "ADVANTAGE",
"norm-u": "NORMAL",
"disadv-u": "DISADVANTAGE",
"core-u": "CORE",
"bio-u": "BIO",
"spells-u": "SPELLS",
"char-name-u": "CHARACTER NAME",
"barbarian": "Barbarian",
"bard": "Bard",
"cleric": "Cleric",
"druid": "Druid",
"fighter": "Fighter",
"monk": "Monk",
"paladin": "Paladin",
"ranger": "Ranger",
"rogue": "Rogue",
"sorcerer": "Sorcerer",
"warlock": "Warlock",
"wizard": "Wizard",
"class-level-u": "CLASS &amp; LEVEL",
"background-u": "BACKGROUND",
"background": "Background",
"race-u": "RACE",
"alignment-u": "ALIGNMENT",
"exp-pts-u": "EXPERIENCE POINTS",
"inspiration-u": "INSPIRATION",
"prof-bonus-u": "PROFICIENCY BONUS",
"strength": "Strength",
"strength-save": "Strength Save",
"dexterity": "Dexterity",
"dexterity-save": "Dexterity Save",
"constitution": "Constitution",
"constitution-save": "Constitution Save",
"intelligence": "Intelligence",
"intelligence-save": "Intelligence Save",
"wisdom": "Wisdom",
"wisdom-save": "Wisdom Save",
"charisma": "Charisma",
"charisma-save": "Charisma Save",
"saving-throws-u": "SAVING THROWS",
"acrobatics-core": "Acrobatics <span>(Dex)</span>",
"animal_handling-core": "Animal Handling <span>(Wis)</span>",
"arcana-core": "Arcana <span>(Int)</span>",
"athletics-core": "Athletics <span>(Str)</span>",
"deception-core": "Deception <span>(Cha)</span>",
"history-core": "History <span>(Int)</span>",
"insight-core": "Insight <span>(Wis)</span>",
"intimidation-core": "Intimidation <span>(Cha)</span>",
"investigation-core": "Investigation <span>(Int)</span>",
"medicine-core": "Medicine <span>(Wis)</span>",
"nature-core": "Nature <span>(Int)</span>",
"perception-core": "Perception <span>(Wis)</span>",
"performance-core": "Performance <span>(Cha)</span>",
"persuasion-core": "Persuasion <span>(Cha)</span>",
"religion-core": "Religion <span>(Int)</span>",
"sleight_of_hand-core": "Sleight of Hand <span>(Dex)</span>",
"stealth-core": "Stealth <span>(Dex)</span>",
"survival-core": "Survival <span>(Wis)</span>",
"pass-wis-u": "PASSIVE WISDOM (PERCEPTION)",
"tool-u": "TOOL",
"pro-u": "PRO",
"attr-u": "ATTRIBUTE",
"prof-bonus:-u": "PROFICIENCY BONUS:",
"prof-u": "PROFICIENT",
"proficency-u": "PROFICIENCY",
"expertise-u": "EXPERTISE",
"jack-of-all-u": "JACK OF ALL TRADES",
"attr:-u": "ATTRIBUTE:",
"tool-prof-u": "TOOL PROFICIENCIES",
"other-prof-langs-u": "OTHER PROFICIENCIES &amp; LANGUAGES",
"prof-langs-u": "PROFICIENCIES &amp; LANGUAGES",
"init": "Initiative",
"init-u": "INITIATIVE",
"hp-max-u": "Hit Point Maximum",
"hp-current-u": "CURRENT HIT POINTS",
"hp-temp-u": "TEMPORARY HIT POINTS",
"total": "Total",
"hit-dice-u": "HIT DICE",
"successes-u": "SUCCESSES",
"failures-u": "FAILURES",
"death-save-u": "DEATH SAVE",
"death-saves-u": "DEATH SAVES",
"atk-u": "ATK",
"dmg-type-u": "DAMAGE/TYPE",
"attack:-u": "ATTACK:",
"proficient-u": "PROFICIENT",
"range-place": "Self (60-foot cone)",
"magic-bonus:-u": "MAGIC BONUS:",
"crit-range-u": "CRIT RANGE:",
"damage:-u": "DAMAGE:",
"dmg-type-place": "Slashing",
"crit:-u": "CRIT:",
"damage2:-u": "DAMAGE2:",
"saving-throw:-u": "SAVING THROW:",
"vs-dc:-u": "VS DC:",
"spell-u": "SPELL",
"flat-u": "FLAT",
"save": "Save",
"save-effect:-u": "SAVE EFFECT:",
"save-effect-place": "half damage",
"ammunition:-u": "AMMUNITION:",
"ammunition-place": "Arrows",
"description:-u": "DESCRIPTION:",
"description-place": "Up to 2 creatures within 5 feet",
"atk-spellcasting-u": "ATTACKS &amp; SPELLCASTING",
"copper-piece-u": "CP",
"silver-piece-u": "SP",
"electrum-piece-u": "EP",
"gold-piece-u": "GP",
"platinum-piece-u": "PP",
"warning-armor-sets-u": "<input type=\"checkbox\" name=\"attr_armorwarning\" value=\"hide\">WARNING - MULTIPLE SETS OF ARMOR OR SHIELDS HAVE BEEN ADDED AND AC IS NOT CORRECTLY CALCULATED. UNEQUIP THE ARMOR PIECE FROM THE ITEM DETAILS.",
"item-name-u": "ITEM NAME",
"equipped-u": "EQUIPPED",
"use-as-resource-u": "USE AS A RESOURCE",
"prop:-u": "PROP:",
"mods:-u": "MODS:",
"total-weight-u": "TOTAL WEIGHT",
"immobile-u": "IMMOBILE",
"heavily-encumbered-u": "HEAVILY ENCUMBERED",
"encumbered-u": "ENCUMBERED",
"over-carrying-cap-u": "OVER CARRYING CAPACITY",
"equipment-u": "EQUIPMENT",
"personality-traits-u": "PERSONALITY TRAITS",
"ideals-u": "IDEALS",
"bonds-u": "BONDS",
"flaws-u": "FLAWS",
"class-resource-u": "CLASS RESOURCE",
"other-resource-u": "OTHER RESOURCE",
"feats-traits-u": "FEATURES &amp; TRAITS",
"age-u": "AGE",
"size-u": "SIZE",
"height-u": "HEIGHT",
"weight-u": "WEIGHT",
"eye-u": "EYES",
"skin-u": "SKIN",
"hair-u": "HAIR",
"char-appearance-u": "CHARACTER APPEARANCE",
"char-backstory-u": "CHARACTER BACKSTORY",
"allies-orgs-u": "ALLIES &amp; ORGANIZATIONS",
"add-feats-traits-u": "ADDITIONAL FEATURES &amp; TRAITS",
"feat-u": "FEAT",
"treasure-u": "TREASURE",
"spell-save-dc-u": "SPELL SAVE DC",
"cantrips-u": "CANTRIPS",
"ritual-u": "RITUAL",
"casting-time:-u": "CASTING TIME:",
"casting-time:": "Casting Time:",
"at-higher-lvl-dmg:-u": "HIGHER LVL CAST DMG:",
"half-dmg-place": "Half damage",
"hit-die:-u": "HIT DIE:",
"initiative-mod:-u": "INITIATIVE MODIFIER:",
"glob-saving-mod:-u": "GLOBAL SAVING THROW MODIFIER:",
"glob-ac-mod:-u": "GLOBAL ARMOR CLASS MODIFIER:",
"glob-atk-mod:-u": "GLOBAL MAGIC ATTACK MODIFIER:",
"pass-perc-mod:-u": "PASSIVE PERCEPTION MODIFIER:",
"death-save-mod:-u": "DEATH SAVE MODIFIER:",
"magic-caster-lvl:-u": "MAGIC CASTER LEVEL:",
"halfling-luck-u": "HALFLING LUCK",
"arcane-fighter-u": "ARCANE FIGHTER",
"arcane-rogue-u": "ARCANE ROGUE",
"class-options-u": "CLASS OPTIONS (<input type=\"text\" name=\"attr_class_label\" value=\"@{class}\" disabled=\"true\">)",
"2nd-class:-u": "2ND CLASS:",
"lvl:-u": "LEVEL:",
"3rd-class:-u": "3RD CLASS:",
"4th-class:-u": "4TH CLASS:",
"mutliclass-opts-u": "MULTICLASS OPTIONS",
"use-cust-class-u": "USE CUSTOM CLASS",
"class-name:-u": "CLASS NAME:",
"spellcasting-ability:-u": "SPELLCASTING ABILITY:",
"spell-slots:-u": "SPELL SLOTS:",
"spell-full-u": "FULL (Cleric, Druid, Wizard)",
"spell-half-u": "HALF (Paladin, Ranger)",
"spell-third-u": "THIRD (Arcane Fighter/Rogue)",
"cust-class-opts": "CUSTOM CLASS OPTIONS",
"normal": "Normal",
"expirtise": "Expertise",
"skill-opts-u": "SKILL OPTIONS",
"version": "v",
"always-roll-adv": "Always Roll Advantage",
"toggle-roll-adv": "Advantage Toggle",
"query-roll-adv": "Query Advantage",
"never-roll-adv": "Never Roll Advantage",
"never-whisper-roll": "Never Whisper Rolls",
"query-whisper-roll": "Query Whisper",
"always-whisper-roll": "Always Whisper Rolls",
"never-roll-dmg": "Don't Auto Roll Damage",
"always-roll-dmg": "Auto Roll Damage &amp; Crit",
"add-char-to-templates:-u": "ADD CHARACTER NAME TO TEMPLATES:",
"on": "On",
"off": "Off",
"inventory:-u": "INVENTORY:",
"compendium-compatible": "Compendium Compatible",
"simple": "Simple",
"encumbrance:-u": "ENCUMBRANCE:",
"ammo-tracking:-u": "AMMO TRACKING:",
"general-opts-u": "GENERAL OPTIONS",
"transition-text": "Clicking one of the images below will reformat the data from your current sheet to this sheet. These changes are permanent and cannot be undone.",
"transition-text-highlight": "Please make a copy of your game before you use this tool.",
"choose-sheet-transfer": "CHOOSE THE SHEET YOU ARE TRANSFERING FROM",
"community-sheet-u": "COMMUNITY SHEET",
"shaped-sheet-u": "SHAPED SHEET",
"transition-opts-u": "TRANSITION OPTIONS",
"portions-sheet-utilize": "Portions of this sheet utilize content from the System Reference Document 5.0 under the OGL License. View OGL License and Copyright Notice. https://wiki.roll20.net/SRD_5.0_OGL_License",
"api-required-title": "Try it now with easy one click API installation available with your Pro subscription.",
"api-required-u": "(API REQUIRED)",
"spell_dc_mod:-u": "SPELL SAVE DC MOD:",
"custom_ac:-u": "CUSTOM AC:",
"npc-info":"The NPC option sets new characters to default to the NPC card style sheet. Useful if the player characters have already been created and all new character sheets added to the game will likely representing non player characters.",
"npc-pc":"NPC/PC",
"roll-queries-info":"D20 Rolls output according to this option. Always Roll Advantage is the default setting and will roll two D20 on every roll in case of advantage. The expectation is that if there is no advantage or disadvantage you use the left most result. The Advantage Toggle option adds three new buttons to the top of the sheet so that you can toggle advantage on a case by case basis. Query Advantage gives you a prompt every roll asking if the roll has advantage. Never Roll Advantage always rolls a single D20 on any given roll, expecting the player to roll a second time in case of advantage or disadvantage.",
"whisp-rolls-gm-info":"All sheet rolls are sent to all players in chat by default. Whisper Toggle gives a set of buttons to quick select your preference on the fly. Query Whisper option gives you a prompt with each roll of whether or not the roll should be sent privately only to yourself and the GM. Always Whisper Rolls will send all rolls only to yourself and the GM.",
"auto-dmg-roll-info":"By default, attack damage rolls are not rolled until the hit is confirmed. Damage is rolled from the chat roll template by clicking on the name of the attack in the right hand bar, which then displays the damage. The default method is compatible with 3D dice. Optionally, you can choose to have the Auto Roll Damage & Crit option which will roll damage and critical hit dice at the same time of the attack, presenting all possible outcomes at the time of the attack.",
"add-char-to-templates-info":"Character names are not added to the roll template by default, and are only displayed as normal in the chat tab as the player/character selected as 'Speaking As'. Turning this option on adds the character making the roll's name to the template, useful for players represting multiple characters.",
"inventory-info":"Character Inventories default to the complex style that is compatible with the Roll20 5E Compendium. This includes granular item amounts/weights, weight and encumbrance tracking, sorting, AC calculations, automatic attack generation, and more. The Simple option provides a text field for item lists for players who want more manual control over the sheet.",
"encumbrance-info":"The sheet uses the variant encumbrance rules on page 176 of the PHB. The Off option disables the variant rules and only uses a basic over-limit inventory weight check.",
"ammo-tracking-info":"Provides automatic ammo tracking with the <a src='https://wiki.roll20.net/5th_Edition_OGL_by_Roll20#Utilizing_the_5th_Edition_OGL_Companion_API_Script'>5th Edition OGL by Roll20 Companion API Script</a>.",
"dungeons-and-dragons-styling": "DUNGEONS AND DRAGONS STYLING",
"dungeons-and-dragons-styling-info": "Turns on Dungeons and Dragons styling for both the character sheet and roll templates. This setting is automatically applied to all character sheets and cannot be selectively used.",
"cd-bar1-value:-u": "BAR 1 VALUE:",
"cd-bar1-max:-u": "BAR 1 MAX:",
"cd-bar1-link:-u": "BAR 1 LINK:",
"cd-bar1-value-desc:-u": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 1's value to this attribute.",
"cd-bar1-max-desc:-u": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 1's max to this attribute.",
"cd-bar1-link-desc:-u": "On Default Tokens created by doing a Compendium drop onto the virtual table top, link the Bar 1's value to this attribute. If set this will override all other bar settings.",
"cd-bar2-value:-u": "BAR 2 VALUE:",
"cd-bar2-max:-u": "BAR 2 MAX:",
"cd-bar2-link:-u": "BAR 2 LINK:",
"cd-bar2-value-desc:-u": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 2's value to this attribute.",
"cd-bar2-max-desc:-u": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 2's max to this attribute.",
"cd-bar2-link-desc:-u": "On Default Tokens created by doing a Compendium drop onto the virtual table top, link the Bar 2's value to this attribute. If set this will override all other bar settings.",
"cd-bar3-value:-u": "BAR 3 VALUE:",
"cd-bar3-max:-u": "BAR 3 MAX:",
"cd-bar3-link:-u": "BAR 3 LINK:",
"cd-bar3-value-desc:-u": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 3's value to this attribute.",
"cd-bar3-max-desc:-u": "On Default Tokens created by doing a Compendium drop onto the virtual table top, set the Bar 3's max to this attribute.",
"cd-bar3-link-desc:-u": "On Default Tokens created by doing a Compendium drop onto the virtual table top, link the Bar 3's value to this attribute. If set this will override all other bar settings.",
"npc-name-in-rolls:-u": "NPC NAME IN ROLLS:",
"show": "Show",
"hide": "Hide",
"npc-name-in-rolls-desc:-u": "In NPC roll results, show or hide the name of the NPC in the roll result card.",
"public:-u": "PUBLIC",
"to-gm:-u": "TO <span class='togm'>GM</span>",
"toggle-roll-whisper": "Whisper Toggle",
"attribute-opts-u": "ATTRIBUTE OPTIONS",
"save-opts-u": "SAVE OPTIONS",
"by-level": "By Level (Default)",
"prof-die": "Proficency Die (DMG)",
"custom": "Custom",
"core-die-roll:-u": "CORE DIE ROLL:",
"has-attack-u": "HAS AN ATTACK",
"variant-phb": "Variant (PHB p176)",
"carrying-capacity-mod:-u": "CARRYING CAPACITY MODIFIER:",
"armor-class-tracking:-u": "ARMOR CLASS TRACKING:",
"automatic": "Automatic",
"cantrip-progression:-u": "CANTRIP PROGRESSION",
"cantrip-dice-u": "CANTRIP DICE",
"cantrip-beam-u": "CANTRIP BEAM",
"slots_total-u": "SLOTS TOTAL",
"slots_remaining-u": "SLOTS REMAINING",
"level-calculations:-u": "AUTO LEVEL CALCULATIONS:",
"spell_slot_modifiers-u": "SPELL SLOT MODIFIERS",
"lvl-u": "LEVEL",
"include_spell_desc:-u": "INCLUDE SPELL DESCRIPTION IN ATTACK:",
"token_size-u": "TOKEN SIZE",
"add-dex-tiebreaker-u": "ADD DEX TIEBREAKER TO INITIATIVE",
"initiative-style:-u": "INITIATIVE STYLE:",
"query-attr-u": "QUERY ATTRIBUTE",
"custom-skills-u": "CUSTOM SKILLS",
"weapon-u": "WEAPON",
"armor-u": "ARMOR",
"other-u": "OTHER",
"source:-u": "SOURCE:",
"source-type:-u": "SOURCE TYPE:",
"racial": "Racial",
"class": "Class",
"feat": "Feat",
"other": "Other",
"partial": "Partial",
"show_all": "Show All",
"cr_only": "C&R Only",
"spell-icons:-u": "SPELL ICONS:",
"custom-pb:-u": "CUSTOM PROFICIENCY BONUS:",
"show-global-attack-field-u": "SHOW GLOBAL ATTACK MODIFIER FIELD",
"show-global-damage-field-u": "SHOW GLOBAL DAMAGE MODIFIER FIELD",
"show-global-save-field-u": "SHOW GLOBAL SAVE MODIFIER FIELD",
"show-global-skill-field-u": "SHOW GLOBAL SKILL MODIFIER FIELD",
"global-attack-u": "GLOBAL ATTACK MODIFIER",
"global-damage-u": "GLOBAL DAMAGE MODIFIER",
"global-save-u": "GLOBAL SAVE MODIFIER",
"global-skill-u": "GLOBAL SKILL MODIFIER",
"global-damage": "Global Damage Modifier",
"core-die-roll-info": "Changing the core die will replace the normal 1d20 made with almost all rolls with a randomizer of your choice, such as 2d10 or 3d6.",
"pb-type-info": "By default, the character's Proficiency Bonus will be automatically calculated based off of their total level as is the standard method in the PHB. The Proficency Die option supports the alternate method outlined in the DMG where, instead of a flat bonus, a die is rolled instead. The Custom option allows you to replace the PB with anything of your choosing.",
"global-save-info": "Creates a custom global save modifier field, underneath the SAVING THROWS section of the character sheet. Anything put there will be applied to any save roll. Perfect for regular but not permanent bonuses like the Bless spell.",
"global-skill-info": "Creates a custom global skill modifier field, underneath the SKILLS section of the character sheet. Anything put there will be applied to any save roll. Perfect for regular but not permanent bonuses like the Guidance spell.",
"global-attack-info": "Creates a custom global attack modifier field, underneath the ATTACKS AND SPELL CASTING section of the character sheet. Anything put there will be applied to any attack to-hit roll. Perfect for regular but not permanent bonuses to attack like the Bless spell.",
"global-damage-info": "Creates a custom global damage modifier field, underneath the ATTACKS AND SPELL CASTING section of the character sheet. Anything put there will be applied to any attack damage roll. Perfect for regular but not permanent bonuses to damage like the Sneak Attack ability.",
"auto-level-calc-info": "By default changing character levels will automatically set spell slots and hit dice. Changing this setting to off prevents this behavior.",
"simple-traits-info": "Character FEATURES AND TRAITS section defaults to the complex style that is compatible with the Roll20 5E Compendium. The Simple option provides a text field for players who want more manual control over the sheet.",
"simple-proficiencies-info": "Character OTHER PROFICIENCIES & LANGUAGES section defaults to the complex style that is compatible with the Roll20 5E Compendium. The Simple option provides a text field for players who want more manual control over the sheet.",
"b-custom-info": "When the Proficiency Bonus type is set to Custom, the character sheet will use this value for the character's Proficiency Bonus.",
"footer-wiki-link": "For more information about this character sheet, its functionality, or uses, please check out the Roll20 Wiki for official documentation. https://wiki.roll20.net/5th_Edition_OGL_by_Roll20",
"accepting-drop-u": "ACCEPTING DROP FROM COMPENDIUM",
"are_you_sure": "Are you sure you want to turn this character into a ",
"yes": "Yes",
"cancel": "Cancel",
"choose": "Choose",
"innate:-u": "INNATE:"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment