Sneaking in Auto-hit and Auto-miss for non-HFH option to 0.5.1 release

master
The Happy Anarchist 2020-09-24 21:37:22 -10:00
parent c63baddd86
commit 40e0f4fd03
5 changed files with 44 additions and 4 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
acks/

View File

@ -26,3 +26,13 @@ Removed DAC field from armor items
BUG FIXES:
Fixed a rounding error present in the OSE code
Fixed some areas where AC was not shown correctly in OSE code
v0.5.1 HFH Options / Core Toggle
MINOR CHANGES:
Added toggle for Exploding 20s and BHR
Implemented auto-miss on 1 and auto-hit on 20 for Core Rules (non-HFH)
BUG FIXES:
Monster Saves pre-fill not present when monster is new
Negative Con mod could make HD roll negative (now floored at 1)
Negative Str mod could make damage negative (now minimum 1)

Binary file not shown.

View File

@ -272,6 +272,8 @@
"ACKS.messages.InflictsDamage": "Inflicts damage!",
"ACKS.messages.applyDamage": "Apply Damage",
"ACKS.messages.applyHealing": "Apply Healing",
"ACKS.messages.Fumble": "<b>1! Automatic Miss!</b>",
"ACKS.messages.Critical": "<b>20! Automatic Hit!</b>",
"ACKS.colors.green": "Green",
"ACKS.colors.red": "Red",

View File

@ -141,8 +141,29 @@ export class AcksDice {
: 0;
result.victim = data.roll.target ? data.roll.target.data.name : null;
const hfh = game.settings.get("acks", "exploding20s")
const die = roll.dice[0].total
if (game.settings.get("acks", "ascendingAC")) {
if (roll.total < targetAac + 10) {
if (die == 1 && !hfh) {
result.details = game.i18n.format(
"ACKS.messages.Fumble",
{
result: roll.total,
bonus: result.target,
}
);
return result;
} else if (roll.total < targetAac + 10 && die < 20) {
result.details = game.i18n.format(
"ACKS.messages.AttackAscendingFailure",
{
result: roll.total - 10,
bonus: result.target,
}
);
return result;
} else if (roll.total < targetAac + 10 && hfh) {
result.details = game.i18n.format(
"ACKS.messages.AttackAscendingFailure",
{
@ -152,9 +173,15 @@ export class AcksDice {
);
return result;
}
if (!hfh && die == 20) {
result.details = game.i18n.format("ACKS.messages.Critical", {
result: roll.total,
});
} else {
result.details = game.i18n.format("ACKS.messages.AttackAscendingSuccess", {
result: roll.total - 10,
});
}
result.isSuccess = true;
} else {
// B/X Historic THAC0 Calculation