diff --git a/The One Ring 2e/release-notes.md b/The One Ring 2e/release-notes.md index de3c365efe..164e06b0af 100644 --- a/The One Ring 2e/release-notes.md +++ b/The One Ring 2e/release-notes.md @@ -4,6 +4,12 @@ This is a rewrite based on the early 2e (basic) and 1e edition that also include # Release History +## 02.12.00 (Build 15) + +### Features + +- changed keen, grievieous, fell weapon spec from checkbox into selectable valued options + ## 02.11.00 (Build 14) ### Features diff --git a/The One Ring 2e/sheet.css b/The One Ring 2e/sheet.css index 3c6e8b3f74..82df39fb69 100644 --- a/The One Ring 2e/sheet.css +++ b/The One Ring 2e/sheet.css @@ -130,7 +130,7 @@ border-radius: 0; border-bottom: 2px solid rgba(0, 0, 0, .15); text-align: left; - margin-bottom: 5px; + margin-bottom: 2px; } .charsheet input[type="text"] { @@ -159,7 +159,7 @@ border-right: 0; border-top: 0; line-height: 18px; - height: 17px; + height: 20px; padding: 0px 4px 0px 4px; } @@ -743,11 +743,19 @@ text-align: left; } -.charsheet #war-gear-nested input[type="checkbox"] { +.charsheet #war-gear-nested input[type="checkbox"], +.charsheet #armour-nested input[type="checkbox"] { text-align: center; vertical-align: sub; } +.charsheet #war-gear-nested select, +.charsheet #armour-nested select { + appearance: none; + justify-self: center; + text-align: center; +} + .charsheet #armour { grid-area: armo; z-index: 1; diff --git a/The One Ring 2e/sheet.html b/The One Ring 2e/sheet.html index a6a014df2c..66c5999638 100644 --- a/The One Ring 2e/sheet.html +++ b/The One Ring 2e/sheet.html @@ -1,4 +1,4 @@ - + @@ -749,8 +749,8 @@ - + @@ -780,9 +780,26 @@ - - - + + + + + + @@ -811,9 +828,26 @@ - - - + + + + + + @@ -842,9 +876,26 @@ - - - + + + + + + @@ -873,9 +924,26 @@ - - - + + + + + + @@ -904,9 +972,26 @@ - - - + + + + + + @@ -935,9 +1020,26 @@ - - - + + + + + + @@ -958,16 +1060,36 @@ data-i18n-placeholder="armour-placeholder" name="attr_armour"> - - + + + + - - + + + + - - + + + + @@ -991,8 +1123,18 @@ data-i18n-placeholder="shield-placeholder" name="attr_shield"> - - + + + +
@@ -1410,7 +1552,11 @@ parrymodStr = "", stanceattackmodStr = "", targetnameStr = "", - target; + target, + closefit="", + closefitStr="", + keen="", + match=[]; act = capitalize(act); act = (act === "Wisdom" || act === "Valour") ? "Shadow test: "+act : act; @@ -1492,10 +1638,12 @@ favouredStr = favId == 2 ? "{{favoured=Favoured}}" : ( favId == 0 ? "{{favoured=Ill-favoured}}" : "" ); // REWARDS, KEEN WEAPONS AND CLOSE FITTING ARMOUR - keen = (additional.match(/Keen/g) || []).length; - if( keen > 0 ) { clog("Weapon is keen!"); } - closefit = int((additional.match(/Close fitting/g) || []).length)*2; - let closefitStr = ""; + match = additional.match(/keen='(.*)';/); + keen = match ? match[1] : 10; + if( keen < 10 ) { clog(`Weapon is keen: ${keen}`); } + match = additional.match(/closefit='(.*)';/); + closefit = match ? match[1] : 0; + closefitStr = ""; if( closefit > 0 ) { clog(`Armour is close fitting: ${closefit}`); closefitStr = `+${closefit}[Close fit]`; @@ -1555,7 +1703,10 @@ if (weary === 1) { // remove the 1, 2, 3, results, still add any closefitting bonus for protection rolls (already done) // Weary condition affects protections rolls, see discussion here: https://boardgamegeek.com/thread/2031462/protection-tests-when-weary - rollSuccess = (_.reduce(rollresult.results.r1.dice, (memo, num) => { if(num <= 3) {return memo} else {return memo+num} }, 0)); + // Headsup: rollresult.results.r1.dice only includes the dice (excluding a bonus e.g. for closefit) + let wearydice = (_.reduce(rollresult.results.r1.dice, (memo, num) => { if(num <= 3) {return memo} else {return memo+num} }, 0)); + let nonwearydice = (_.reduce(rollresult.results.r1.dice, (memo, num) => {return memo+num}, 0)); + rollSuccess = rollSuccess - (nonwearydice - wearydice); clog(`Weary successes: ${rollSuccess}`); } else { clog(`Normal successes: ${rollSuccess}`); @@ -1590,12 +1741,12 @@ } // GREATNESS & FEAT DIE - // Test for piercing blow on crit success or 10 - outcome = (rolltype === "combat") && (outcome === 1 || outcome === 2) && (rollFeat === crit || rollFeat === 10) ? 3 : outcome; - clog(`Outcome after Piercing: ${outcome}`); - // Piercing blow also at 9 if the weapon used is keen - outcome = rolltype === "combat" && (outcome === 1 || outcome === 2) && rollFeat === 9 && keen > 0 ? 3 : outcome; - clog(`Outcome after Keen: ${outcome}`); + // Test for piercing blow on crit success + outcome = rolltype === "combat" && (outcome === 2) ? 3 : outcome; + clog(`Outcome after Crit: ${outcome}`); + // Piercing blow also at 10 or 8/9 if the used weapon is keen + outcome = rolltype === "combat" && (outcome === 1) && (rollFeat >= keen && rollFeat <= 10) ? 3 : outcome; + clog(`Outcome after Piercing or Keen: ${outcome}`); // count number of 6s in success, great or extraordinary success // Count the number of sixes rolled, to report degree of success clog(`Roll r1 : ${JSON.stringify(rollresult.results.r1.dice)}`); @@ -1950,20 +2101,28 @@ on('clicked:protection_action', async (ev) => { clog(`Starting first roll`); let action = 'protection', - data = await asw.getAttrs(['character_name', action, 'protection', 'armourcf', 'armourcm', 'helmetcf', 'helmetcm', 'othercf', 'othercm', 'sheetTab', 'protection_favoured']), + data = await asw.getAttrs(['character_name', action, 'protection', + 'armourcf', 'armourcm', 'helmetcf', 'helmetcm', 'othercf', 'othercm', + 'armourcf_val', 'armourcm_val', 'helmetcf_val', 'helmetcm_val', 'othercf_val', 'othercm_val', + 'armourprot_active', 'helmprot_active', 'otherprot_active', + 'sheetTab', 'protection_favoured']), actdice = int(data.protection), actfav = data.protection_favoured, lm = data.sheetTab ==="isAdversary" ? true : false; let additionalStr = ""; - additionalStr = additionalStr + ((data.armourcf == "1") ? "Close fitting armour, " : ""); - additionalStr = additionalStr + ((data.helmetcf == "1") ? "Close fitting helm, " : ""); - additionalStr = additionalStr + ((data.othercf == "1") ? "Close fitting other, " : ""); - additionalStr = additionalStr + ((data.armourcm == "1") ? "Cunning made armour, " : ""); - additionalStr = additionalStr + ((data.helmetcm == "1") ? "Cunning made helm, " : ""); - additionalStr = additionalStr + ((data.helmetcm == "1") ? "Other Cunning made, " : ""); + additionalStr = additionalStr + ((data.armourcf_val != "0" && data.armourprot_active) ? "Close fitting armour, " : ""); + additionalStr = additionalStr + ((data.helmetcf_val != "0" && data.helmprot_active) ? "Close fitting helm, " : ""); + additionalStr = additionalStr + ((data.othercf_val != "0" && data.otherprot_active) ? "Close fitting other, " : ""); + additionalStr = additionalStr + ((data.armourcm_val != "0" && data.armourprot_active) ? "Cunning made armour, " : ""); + additionalStr = additionalStr + ((data.helmetcm_val != "0" && data.helmprot_active) ? "Cunning made helm, " : ""); + additionalStr = additionalStr + ((data.helmetcm_val != "0" && data.otherprot_active) ? "Other Cunning made, " : ""); additionalStr = additionalStr.slice(0,-2); - clog(`First roll: ${JSON.stringify(data)}, Action : ${action}, protection value: ${actdice}, Additional: ${additionalStr}, Favoured: ${actfav}`); - await rollFirst(data.character_name, action, actdice, "0", actfav, "protection", `additional='${additionalStr}';`, lm); + let closefit = + int(data.armourprot_active) * int(data.armourcf_val) + + int(data.helmprot_active) * int(data.helmetcf_val) + + int(data.otherprot_active) * int(data.othercf_val); + clog(`First roll: ${JSON.stringify(data)}, Action : ${action}, Protection value: ${actdice}, Closefit: ${closefit}, Additional: ${additionalStr}, Favoured: ${actfav}`); + await rollFirst(data.character_name, action, actdice, "0", actfav, "protection", `additional='${additionalStr}';closefit='${closefit}';`, lm); clog(`Completed first roll`); }); @@ -2132,7 +2291,11 @@ let options = stripaction((ev.triggerName).slice(18)).split("_"), index = options[0], target = options[1] || "", - data = await asw.getAttrs(['character_name', `weapon_skill_name_${index}`,`weapon_rating_${index}`, `weapon_damage_${index}`, `weapon_injury_${index}`, 'favorill', 'favourill_id']), + data = await asw.getAttrs([ + 'character_name', `weapon_skill_name_${index}`, + `weapon_rating_${index}`, `weapon_damage_${index}`, + `weapon_injury_${index}`, 'favorill', 'favourill_id'] + ), action = data[`weapon_skill_name_${index}`], actdice = data[`weapon_rating_${index}`], damage = data[`weapon_damage_${index}`], @@ -2180,7 +2343,9 @@ clog(`Starting first roll: weapon_${index}, target: ${target}`); let data = await asw.getAttrs([ 'character_name', 'strengthtn', `weapon_skill_name_${index}`, `weapon_combat_prof_${index}`, `weapon_damage_${index}`, - `weapon_injury_${index}`, `weapon_note_${index}`, `weapon_fell_${index}`, `weapon_grievous_${index}`, `weapon_keen_${index}`, + `weapon_injury_${index}`, `weapon_note_${index}`, + `weapon_fell_${index}`, `weapon_grievous_${index}`, `weapon_keen_${index}`, + `weapon_fell_val_${index}`, `weapon_grievous_val_${index}`, `weapon_keen_val_${index}`, 'stanceattack_active', 'stanceattackbonus', 'stancedamagebonus', 'axes', 'bows', 'spears', 'swords']), action = data[`weapon_skill_name_${index}`], @@ -2188,16 +2353,20 @@ damage = data[`weapon_damage_${index}`], injury = data[`weapon_injury_${index}`], note = data[`weapon_note_${index}`], - keen = int(data[`weapon_keen_${index}`],0) === 0 ? "" : "Keen, ", - fell = int(data[`weapon_fell_${index}`],0) === 0 ? "" : "Fell, ", - grievous = int(data[`weapon_grievous_${index}`],0) === 0 ? "" : "Grievous, ", + fell_val = int(data[`weapon_fell_val_${index}`],0), + grievous_val = int(data[`weapon_grievous_val_${index}`],0), + keen_val = int(data[`weapon_keen_val_${index}`],0), + fell = fell_val === 0 ? "" : "Fell, ", + grievous = grievous_val === 0 ? "" : "Grievous, ", + keen = keen_val === 10 ? "" : "Keen, ", actdice = int(data[`${combatprof}`]), stanceattack_active = int(data['stanceattack_active']), stanceattackbonus = int(data['stanceattackbonus']), stancedamagebonus = int(data['stancedamagebonus']); - damage = (stanceattack_active == 1) ? `${damage} + ${stancedamagebonus}` : damage; - clog(`First roll: ${JSON.stringify(data)}, Action: ${action}, Dice: ${actdice}, Keen: ${keen}, tn: ${data.strengthtn}`); - await rollFirst(data.character_name, action, actdice, data.strengthtn, 0, "combat"+target, `weapon='${keen}${fell}${grievous}Damage: ${damage}, Injury: ${injury}'; additional='Notes: ${note}';`); + damage = (stanceattack_active == 1 || grievous_val > 0) ? `${damage}+${stancedamagebonus + grievous_val}` : damage; + injury = (fell_val > 0) ? `${injury}+${fell_val}` : injury; + clog(`First roll: ${JSON.stringify(data)}, Action: ${action}, Dice: ${actdice}, tn: ${data.strengthtn}`); + await rollFirst(data.character_name, action, actdice, data.strengthtn, 0, "combat"+target, `weapon='${keen}${fell}${grievous}Damage:${damage}, Injury:${injury}'; additional='Notes: ${note}';keen='${keen_val}';`, false); clog(`Completed first roll: weapon_${index}`); }); diff --git a/The One Ring 2e/translation.json b/The One Ring 2e/translation.json index 874ae20eb7..9c4d6be290 100644 --- a/The One Ring 2e/translation.json +++ b/The One Ring 2e/translation.json @@ -27,11 +27,11 @@ "weapon-load": "Load", "weapon-injury": "Inj.", "weapon-fell": "F", - "weapon-fell-description": "Fell: Add 2 to the Injury rating of the selected weapon", - "weapon-grievieous": "G", - "weapon-grievieous-description": "Grievious: Add 1 to the damage rating of the weapon", + "weapon-fell-description": "Fell: Add 2 (Superior: 4) to the Injury rating of the selected weapon", + "weapon-grievous": "G", + "weapon-grievous-description": "Grievous: Add 1 (Superior: 4) to the damage rating of the weapon", "weapon-keen": "K", - "weapon-keen-description": "Keen: Attack rolls made with a Keen weapon score a Piercing Blow also on a result of 9 on the Feat die", + "weapon-keen-description": "Keen: Attack rolls made with a Keen weapon score a Piercing Blow on a result of 9+ (Superior: 8+) on the Feat die", "weapon-called-shot": "Called Shot", "special-abilities": "Special Abilities", "hope": "Hope",