When I click on the checkboxes (human intuition to perception, and favoured language ) , the expected update does not always occur. It seems like the status only updates on a 'full clickthrough', that is click once to check box (no change), clikc second time to uncheck box (no change), click a third time to check box (perception updates), click again to uncheck box (no change), click again to check box (no change), click again to uncheck box (perception updates) etc... I vaguely recall encountering this issue before, but can't honsetly remember. The Hunter's Mind checkbox is making no changes at all. <div class="skillrow"> <details> <summary>Human Intuition</summary> <input type="hidden" class="knavecheckbox human_intuition_front" name="attr_human_intuition" value="0" /> <div class="knaveroll human_intuition_button_front"> Apply to Perception <input type="checkbox" name="attr_humanintuitionperception" value="1" /> <br> Apply to Attack <input type="checkbox" name="humanintuitionattack" value="1" /> </div> </details> </div> on("change:stealth change:miscstealth change:perception change:miscperception change:reflexes change:psychic_talent change:humanintuitionperception change:stillnesspos change:rank change:huntersmindactivate change:baseaf change:favoured_language", function() {
getAttrs([
'stealth', 'miscstealth', 'perception', 'miscperception',
'reflexes', 'psychic_talent', 'humanintuitionperception',
'stillnesspos', 'rank', 'huntersmindactivate', 'baseaf', 'favoured_language'
], function(values) {
let stealth = parseInt(values.stealth) || 0;
let miscStealth = parseInt(values.miscstealth) || 0;
let perception = parseInt(values.perception) || 0;
let miscPerception = parseInt(values.miscperception) || 0;
let reflexes = parseInt(values.reflexes) || 0;
let psychicTalent = parseInt(values.psychic_talent) || 0;
let humanIntuitionPerception = parseInt(values.humanintuitionperception) === 1;
let stillnessPos = parseInt(values.stillnesspos) || 0;
let rank = parseInt(values.rank) || 0;
let huntersMindActive = parseInt(values.huntersmindactivate) === 1;
let baseAF = parseInt(values.baseaf) || 0;
let favoured_language = parseInt(values.favoured_language) === 1;
// Initial final scores calculation
let finalStealth = stealth + miscStealth + stillnessPos;
let finalPerception = perception + miscPerception;
// Apply Reflexes modifiers
if (reflexes <= 5) {
finalStealth -= 1;
} else if (reflexes >= 16) {
finalStealth += 1;
}
// Apply Psychic Talent modifiers
if (psychicTalent <= 5) {
finalPerception -= 1;
} else if (psychicTalent >= 16) {
finalPerception += 1;
}
// Apply the rule for human intuition perception
if (humanIntuitionPerception) {
finalPerception += 1;
}
// Apply the favoured language bonus
if (favoured_language) {
finalPerception += 1;
}
// Apply Hunter's Mind bonus if conditions are met
if (huntersMindActive && baseAF < 3) {
let huntersMindBonus = Math.floor(rank / 3);
finalStealth += huntersMindBonus;
finalPerception += huntersMindBonus;
}
// Update attributes with final scores
setAttrs({
'finalstealth': finalStealth,
'finalperception': finalPerception
});
});
});