Files
2024-06-03 13:15:14 -04:00

900 lines
29 KiB
HTML

<input type="text" name="attr_debug" style="display: none;" value=" "/>
<input type="text" name="attr_character_sheet" style="display: none;" value="EngineHeart"/>
<div class="top">
<div class="column bio">
<div>
<div class="labelledLeft" style="width: 50%;">
<label>UNIT NAME</label>
<div class="inner">
<input type="text" name="attr_character_name"/>
</div>
</div>
<div class="labelledLeft" style="width: 49%;">
<label>PLAYER</label>
<div class="inner">
<input type="text" name="attr_player_name"/>
</div>
</div>
</div>
<div>
<div class="labelledLeft" style="width: 100%;">
<label>ORIGINAL PURPOSE</label>
<div class="inner">
<input type="text" name="attr_originalPurpose"/>
</div>
</div>
</div>
</div>
<div class="column points">
<div class="bubble">
<label>POINTS</label>
<div class="inner">
<input type="number" name="attr_points"/>
</div>
</div>
</div>
</div>
<div class="attributes">
<div class="column">
<div class="attrsHeader">
<div class="boxedIcon iconIntelligence"></div>
<h2>INTELLIGENCE</h2>
</div>
<div class="attrsInner">
<div class="attribute" title="Defines how well a robot understands cause and effect in the physical world.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=rcom_calc}} {{result=[[@{rcom_calc}]]}}"></button>
<input type="hidden" name="attr_rcom_calc"/>
<label>RealityCom</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_rcom_total"></span>
<input type="hidden" name="attr_rcom_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_rcom"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_rcom_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Defines how well a robot understands human minds or organic actions.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=hcom_calc}} {{result=[[@{hcom_calc}]]}}"></button>
<input type="hidden" name="attr_hcom_calc"/>
<label>HumanCom</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_hcom_total"></span>
<input type="hidden" name="attr_hcom_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_hcom"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_hcom_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Defines how adept a robot is at interacting with non-physical systems like computers.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=dcon_calc}} {{result=[[@{dcon_calc}]]}}"></button>
<input type="hidden" name="attr_dcon_calc"/>
<label>DigiCon</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_dcon_total"></span>
<input type="hidden" name="attr_dcon_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_dcon"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_dcon_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Defines how adept a robot is at interacting with mechanical systems.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=mcon_calc}} {{result=[[@{mcon_calc}]]}}"></button>
<input type="hidden" name="attr_mcon_calc"/>
<label>MechaniCon</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_mcon_total"></span>
<input type="hidden" name="attr_mcon_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_mcon"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_mcon_mod"/>
</div>
</div>
</div>
</div>
</div>
<div class="column">
<div class="attrsHeader">
<div class="boxedIcon iconChassis"></div>
<h2>CHASSIS</h2>
</div>
<div class="attrsInner">
<div class="attribute" title="Measures the degree of fine motor control ncessary for interaction with the outside world.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=dex_calc}} {{result=[[@{dex_calc}]]}}"></button>
<input type="hidden" name="attr_dex_calc"/>
<label>Dexterity</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_dex_total"></span>
<input type="hidden" name="attr_dex_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_dex"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_dex_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Dictates the robot's cability to propel itself about the environment.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=mobil_calc}} {{result=[[@{mobil_calc}]]}}"></button>
<input type="hidden" name="attr_mobil_calc"/>
<label>Mobility</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_mobil_total"></span>
<input type="hidden" name="attr_mobil_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_mobil"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_mobil_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Determines the variety and quality of sensors mounted, as well as information relayed back.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=per_calc}} {{result=[[@{per_calc}]]}}"></button>
<input type="hidden" name="attr_per_calc"/>
<label>Perception</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_per_total"></span>
<input type="hidden" name="attr_per_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_per"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_per_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Determines response lag and overall speed of animation.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=ref_calc}} {{result=[[@{ref_calc}]]}}"></button>
<input type="hidden" name="attr_ref_calc"/>
<label>Reflexes</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_ref_total"></span>
<input type="hidden" name="attr_ref_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_ref"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_ref_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Determines the robot's maximum load capacity and ability to inflict brute-force damage on other objects.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=str_calc}} {{result=[[@{str_calc}]]}}"></button>
<input type="hidden" name="attr_str_calc"/>
<label>Strength</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_str_total"></span>
<input type="hidden" name="attr_str_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_str"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_str_mod"/>
</div>
</div>
</div>
</div>
</div>
<div class="column">
<div class="attrsHeader">
<div class="boxedIcon iconCrux"></div>
<h2>CRUX</h2>
</div>
<div class="attrsInner">
<div class="attribute" title="Measures how much damage a robot can withstand before ceasing operation or being destroyed.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=dur_calc}} {{result=[[@{dur_calc}]]}}"></button>
<input type="hidden" name="attr_dur_calc"/>
<label>Durability</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_dur_total"></span>
<input type="hidden" name="attr_dur_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_dur"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_dur_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Rates the robot's ability to withstand information overload.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=buf_calc}} {{result=[[@{buf_calc}]]}}"></button>
<input type="hidden" name="attr_buf_calc"/>
<label>Buffer</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_buf_total"></span>
<input type="hidden" name="attr_buf_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_buf"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_buf_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Rates the robot's physical dimensions.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=size_calc}} {{result=[[@{size_calc}]]}}"></button>
<input type="hidden" name="attr_size_calc"/>
<label>Size</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_size_total"></span>
<input type="hidden" name="attr_size_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_size"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_size_mod"/>
</div>
</div>
</div>
<div class="attribute" title="Rates how long the robot can operate on its own without recharging.">
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=pow_calc}} {{result=[[@{pow_calc}]]}}"></button>
<input type="hidden" name="attr_pow_calc"/>
<label>Power</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_pow_total"></span>
<input type="hidden" name="attr_pow_total"/>
</div>
</div>
<div class="bubble">
<label>RATING</label>
<div class="inner">
<input type="number" name="attr_pow"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_pow_mod"/>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- A secondary attribute.-->
<!-- Thresholds are like hit points.-->
<div class="secondaryAttrs">
<div class="column">
<div class="attrsHeader">
<div class="boxedIcon iconPhysicalInteraction"></div>
<h2>Physical interaction</h2>
</div>
<div class="attrsInner">
<div class="intPool rollable">
<div class="attribute" title="(Dex + Ref) This is the dice pool a robot has to strike, grab, or otherwise manually interact with an unwilling robot or other mobile object.">
<input type="hidden" name="attr_intPool_calc"/>
<label>Interaction Pool</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_intPool_total"></span>
<input type="hidden" name="attr_intPool_total"/>
</div>
</div>
<div class="bubble">
<label>NORMAL</label>
<div class="inner"><span class="readOnly" name="attr_intPool"></span>
<input type="hidden" name="attr_intPool"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_intPool_mod"/>
</div>
</div>
</div>
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=intPool_calc}} {{result=[[@{intPool_calc}]]}}"></button>
</div>
<div class="attribute" title="(Mobil + Ref) A robot's TN to be struck may not be higher than 10.">
<input type="hidden" name="attr_tn2bStruck_calc"/>
<label>TN to be struck</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_tn2bStruck_total"></span>
<input type="hidden" name="attr_tn2bStruck_total"/>
</div>
</div>
<div class="bubble">
<label>NORMAL</label>
<div class="inner"><span class="readOnly" name="attr_tn2bStruck"></span>
<input type="hidden" name="attr_tn2bStruck"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_tn2bStruck_mod"/>
</div>
</div>
</div>
<div class="attribute" title="(Str/2, round down) This is how much damage a robot can inflict by simply smashing its body or limbs into another object.">
<input type="hidden" name="attr_dmgFromStrike_calc"/>
<label>Damage from Strike</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_dmgFromStrike_total"></span>
<input type="hidden" name="attr_dmgFromStrike_total"/>
</div>
</div>
<div class="bubble">
<label>NORMAL</label>
<div class="inner"><span class="readOnly" name="attr_dmgFromStrike"></span>
<input type="hidden" name="attr_dmgFromStrike"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_dmgFromStrike_mod"/>
</div>
</div>
</div>
</div>
</div>
<div class="column">
<div class="attrsHeader">
<div class="boxedIcon iconMovement"></div>
<h2>Movement</h2>
</div>
<div class="attrsInner">
<div class="initiative rollable">
<div class="attribute" title="(1d10 + Ref) This measures which robots will act first in a conflict or other event where multiple robots attempt to act before each other.">
<input type="hidden" name="attr_initiative_calc"/>
<label>Initiative</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_initiative_total"></span>
<input type="hidden" name="attr_initiative_total"/>
</div>
</div>
<div class="bubble">
<label>NORMAL</label>
<div class="inner"><span class="readOnly" name="attr_initiative"></span>
<input type="hidden" name="attr_initiative"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_initiative_mod"/>
</div>
</div>
</div>
<button type="roll" value="&amp;{template:eh} {{charName=@{character_name}}} {{attr=initiative_calc}} {{result=[[@{initiative_calc}]]}}"></button>
</div>
<div class="attribute" title="(Mobil + Ref) This determines how fast a robot can move from one place to another. A robot's speed is equal to its speed in kilometers per hour during long journeys, or meters per round during conflict situations.">
<input type="hidden" name="attr_speed_calc"/>
<label>Speed</label>
<div class="bubble">
<label>TOTAL</label>
<div class="inner"><span class="readOnly" name="attr_speed_total"></span>
<input type="hidden" name="attr_speed_total"/>
</div>
</div>
<div class="bubble">
<label>NORMAL</label>
<div class="inner"><span class="readOnly" name="attr_speed"></span>
<input type="hidden" name="attr_speed"/>
</div>
</div>
<div class="bubble">
<label>MODIFIER</label>
<div class="inner">
<input type="number" name="attr_speed_mod"/>
</div>
</div>
</div>
</div>
</div>
<div class="column">
<div class="attrsHeader">
<div class="boxedIcon iconThresholds"></div>
<h2>Thresholds</h2>
</div>
<div class="attrsInner">
<div class="attribute threshold">
<label>OS Threshold</label>
<div class="bubble" title="(DigiCon + Buffer) This is a measure of how resilient and self-sustaining the robot's &amp;quot;brain&amp;quot; is.">
<label>MAX</label>
<div class="inner"><span class="readOnly" name="attr_osThreshold_max"></span>
<input type="hidden" name="attr_osThreshold_max"/>
</div>
</div>
<div class="bubble" title="(DigiCon + Buffer) This is a measure of how resilient and self-sustaining the robot's &amp;quot;brain&amp;quot; is.">
<label>CURRENT</label>
<div class="inner">
<input type="number" name="attr_osThreshold"/>
</div>
</div>
</div>
<div class="attribute threshold">
<label>Damage Threshold</label>
<div class="bubble" title="(Durability + Size) This is a measure of how hardy and resilient the robot's physical body is.">
<label>MAX</label>
<div class="inner"><span class="readOnly" name="attr_dmgThreshold_max"></span>
<input type="hidden" name="attr_dmgThreshold_max"/>
</div>
</div>
<div class="bubble" title="(Durability + Size) This is a measure of how hardy and resilient the robot's physical body is.">
<label>CURRENT</label>
<div class="inner">
<input type="number" name="attr_dmgThreshold"/>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="twoColumns featuresDefects">
<div class="column features">
<h2>FEATURES</h2>
<table>
<thead>
<th>Feature</th>
<th>Rating</th>
<th>Notes</th>
</thead>
</table>
<fieldset class="repeating_features">
<div class="feature">
<input type="text" name="attr_name"/>
<input type="number" name="attr_rating"/>
<textarea name="attr_notes"></textarea>
</div>
</fieldset>
</div>
<div class="column defects">
<h2>DEFECTS</h2>
<table>
<thead>
<th>Feature</th>
<th>Rating</th>
<th>Notes</th>
</thead>
</table>
<fieldset class="repeating_defects">
<div class="defect">
<input type="text" name="attr_name"/>
<input type="number" name="attr_rating"/>
<textarea name="attr_notes"></textarea>
</div>
</fieldset>
</div>
</div>
<div class="twoColumns">
<div class="column equipment">
<h2>EQUIPMENT</h2>
<textarea name="attr_equipment"></textarea>
</div>
<div class="column campaign">
<h2>CAMPAIGN NOTES</h2>
<textarea name="attr_campaignNotes"></textarea>
</div>
</div>
<script type="text/worker">/**
* Forces an update on a list of numerical fields, also making sure that
* any undefined fields are set to 0.
* @param {string[]} attrs
* @param {function} cb
*/
function forceUpdate(attrs, cb) {
parseAttrs(attrs, values => {
let tempValues = {};
_.each(attrs, attr => {
tempValues[attr] = -9999;
});
setAttrs(tempValues);
setAttrs(values);
});
}
function onChange(attrs, cb) {
attrs = _.map(attrs, attr => {
return 'change:' + attr;
}).join(' ');
on(attrs, cb);
}
function onChangeParse(attrs, cb) {
onChange(attrs, () => {
parseAttrs(attrs, cb);
});
}
/**
* Gets the specified attributes and parses them as an integer or 0.
*/
function parseAttrs(attrs, cb) {
getAttrs(attrs, function(values) {
_.each(attrs, function(attr) {
if(_.isUndefined(values[attr]))
values[attr] = 0;
else if(!isNaN(values[attr]))
values[attr] = parseInt(values[attr]);
});
cb(values);
});
}
/**
* Updates the roll calculation for an attribute.
* @param {string} attr
*/
function updateAttribute(attr) {
parseAttrs([attr, attr + '_mod'], values => {
let rating = parseInt(values[attr]);
let mod = parseInt(values[attr + '_mod']) || 0;
let total = rating + mod;
let calc = `(${total})d10>?{Target Number (TN)}`;
setAttrs({
[attr + '_calc']: calc,
[attr + '_total']: total
});
});
}
function updateRcom() {
updateAttribute('rcom');
}
function updateHcom() {
updateAttribute('hcom');
}
function updateDcon() {
updateAttribute('dcon');
}
function updateMcon() {
updateAttribute('mcon');
}
function updateDex() {
updateAttribute('dex');
}
function updateMobil() {
updateAttribute('mobil');
}
function updatePer() {
updateAttribute('per');
}
function updateRef() {
updateAttribute('ref');
}
function updateStr() {
updateAttribute('str');
}
function updateDur() {
updateAttribute('dur');
}
function updateBuf() {
updateAttribute('buf');
}
function updateSize() {
updateAttribute('size');
}
function updatePow() {
updateAttribute('pow');
}
function updateAllAttributes() {
updateRcom();
updateHcom();
updateDcon();
updateMcon();
updateDex();
updateMobil();
updatePer();
updateRef();
updateStr();
updateDur();
updateBuf();
updateSize();
updatePow();
}
function updateIntPool() {
parseAttrs(['dex_total', 'ref_total', 'intPool_mod'], values => {
let dex_total = parseInt(values['dex_total']);
let ref_total = parseInt(values['ref_total']);
let intPool_mod = parseInt(values['intPool_mod']) || 0;
let intPool = dex_total + ref_total;
let intPool_total = intPool + intPool_mod;
let intPool_calc = `(${intPool_total})d10>?{Target Number (TN)}`;
setAttrs({ intPool, intPool_calc, intPool_total });
});
}
function updateTn2bStruck() {
parseAttrs(['mobil_total', 'ref_total', 'tn2bStruck_mod'], values => {
let mobil_total = parseInt(values['mobil_total']);
let ref_total = parseInt(values['ref_total']);
let tn2bStruck_mod = parseInt(values['tn2bStruck_mod']) || 0;
let tn2bStruck = mobil_total + ref_total;
let tn2bStruck_total = tn2bStruck + tn2bStruck_mod;
setAttrs({ tn2bStruck, tn2bStruck_total });
});
}
function updateDmgFromStrike() {
parseAttrs(['str_total', 'dmgFromStrike_mod'], values => {
let str_total = parseInt(values['str_total']);
let dmgFromStrike_mod = parseInt(values['dmgFromStrike_mod']) || 0;
let dmgFromStrike = Math.floor(str_total/2);
let dmgFromStrike_total = dmgFromStrike + dmgFromStrike_mod;
setAttrs({ dmgFromStrike, dmgFromStrike_total });
});
}
function updateInitiative() {
parseAttrs(['ref_total', 'initiative_mod'], values => {
let ref_total = parseInt(values['ref_total']);
let initiative_mod = parseInt(values['initiative_mod']) || 0;
let initiative = ref_total;
let initiative_total = initiative + initiative_mod;
let initiative_calc = `1d10 + ${initiative_total}`;
setAttrs({ initiative, initiative_total, initiative_calc });
});
}
function updateSpeed() {
parseAttrs(['mobil_total', 'ref_total', 'speed_mod'], values => {
let mobil_total = parseInt(values['mobil_total']);
let ref_total = parseInt(values['ref_total']);
let speed_mod = parseInt(values['speed_mod']) || 0;
let speed = mobil_total + ref_total;
let speed_total = speed + speed_mod;
setAttrs({ speed, speed_total });
});
}
function updateOsThreshold() {
parseAttrs(['dcon_total', 'buf_total'], values => {
let dcon_total = parseInt(values['dcon_total']);
let buf_total = parseInt(values['buf_total']);
let osThreshold_max = dcon_total + buf_total;
setAttrs({ osThreshold_max });
});
}
function updateDmgThreshold() {
parseAttrs(['dur_total', 'size_total'], values => {
let dur_total = parseInt(values['dur_total']);
let size_total = parseInt(values['size_total']);
let dmgThreshold_max = dur_total + size_total;
setAttrs({ dmgThreshold_max });
});
}
// Change events
onChange(['rcom', 'rcom_mod'], () => {
updateRcom();
});
onChange(['hcom', 'hcom_mod'], () => {
updateHcom();
});
onChange(['dcon', 'dcon_mod'], () => {
updateDcon();
});
onChange(['mcon', 'mcon_mod'], () => {
updateMcon();
});
onChange(['dex', 'dex_mod'], () => {
updateDex();
});
onChange(['mobil', 'mobil_mod'], () => {
updateMobil();
});
onChange(['per', 'per_mod'], () => {
updatePer();
});
onChange(['ref', 'ref_mod'], () => {
updateRef();
});
onChange(['str', 'str_mod'], () => {
updateStr();
});
onChange(['dur', 'dur_mod'], () => {
updateDur();
});
onChange(['buf', 'buf_mod'], () => {
updateBuf();
});
onChange(['size', 'size_mod'], () => {
updateSize();
});
onChange(['pow', 'pow_mod'], () => {
updatePow();
});
onChange(['dex_total', 'ref_total', 'intPool_mod'], () => {
updateIntPool();
});
onChange(['mobil_total', 'ref_total', 'tn2bStruck_mod'], () => {
updateTn2bStruck();
});
onChange(['str_total', 'dmgFromStrike_mod'], () => {
updateDmgFromStrike();
});
onChange(['ref_total', 'initiative_mod'], () => {
updateInitiative();
});
onChange(['mobil_total', 'ref_total', 'speed_mod'], () => {
updateSpeed();
});
onChange(['dcon_total', 'buf_total'], () => {
updateOsThreshold();
});
onChange(['dur_total', 'size_total'], () => {
updateDmgThreshold();
});
// Init
on('sheet:opened', () => {
setAttrs({
character_sheet: 'EngineHeart v1.0.0'
});
updateAllAttributes();
});
</script>
<rolltemplate class="sheet-rolltemplate-eh">
<table>
<thead>
<tr>
<th>unit( "{{charName}}" ).exec( "{{attr}}" );</th>
</tr>
</thead>
<tbody>
<tr>
<td>Successes {{result}}</td>
</tr>{{#notes}}
<tr>
<td class="notes">
<div>Notes:</div>
<div>{{notes}}</div>
</td>
</tr>{{/notes}}
</tbody>
</table>
</rolltemplate>