diff --git a/.vscode/settings.json b/.vscode/settings.json index 9bf4d12..cba139d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true + "editor.formatOnSave": true, + "cSpell.words": ["deltagreen", "Hypergeometry"] } diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 148560b..8fc46ec 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -135,6 +135,8 @@ export default class DeltaGreenActorSheet extends ActorSheet { return data; } + // some handlers may wish to avoid leading players to think they should be seeking out magic + // so control whether an actor sheet shows the hypergeometry (rituals and tomes) section shouldShowHyperGeometrySection(actor) { // always show for GM if (game.user.isGM) { diff --git a/module/actor/actor.js b/module/actor/actor.js index 15c0020..0de87f0 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -80,12 +80,13 @@ export default class DeltaGreenActor extends Actor { system.health.max = 10; } + /* system.skills.ritual = { label: "Ritual", proficiency: 99 - system.sanity.value, cannotBeImprovedByFailure: true, failure: false, - }; + }; if (system.skills.ritual.proficiency > 99) { system.skills.ritual.proficiency = 99; @@ -93,6 +94,20 @@ export default class DeltaGreenActor extends Actor { system.skills.ritual.proficiency = 1; } + */ + + try { + delete system.skills.ritual; // try to remove legacy skill for ritual if it exists + } catch {} + + system.sanity.ritual = 99 - system.sanity.value; + + if (system.sanity.ritual > 99) { + system.sanity.ritual = 99; + } else if (system.sanity.ritual < 1) { + system.sanity.ritual = 1; + } + // calculate total armor rating let protection = 0; for (const i of actor.items) { @@ -152,12 +167,13 @@ export default class DeltaGreenActor extends Actor { // The ritual skill is from the Handler's Guide, it is for activating a ritual and is always equal to 99 - current sanity. // The rules can be found on page 166, under 'Ritual Activation'. + /* system.skills.ritual = { label: "Ritual", proficiency: 99 - system.sanity.value, cannotBeImprovedByFailure: true, failure: false, - }; + }; if (system.skills.ritual.proficiency > 99) { system.skills.ritual.proficiency = 99; @@ -165,6 +181,20 @@ export default class DeltaGreenActor extends Actor { system.skills.ritual.proficiency = 1; } + */ + + try { + delete system.skills.ritual; // try to remove legacy skill for ritual if it exists + } catch {} + + system.sanity.ritual = 99 - system.sanity.value; + + if (system.sanity.ritual > 99) { + system.sanity.ritual = 99; + } else if (system.sanity.ritual < 1) { + system.sanity.ritual = 1; + } + // The unnatural skill is sort of special // It cannot be improved via failure, so add in a special property to reflect this // Mostly to make it easy to deactivate the failure checkbox in the GUI diff --git a/module/roll/roll.js b/module/roll/roll.js index 04ab32e..6aec751 100644 --- a/module/roll/roll.js +++ b/module/roll/roll.js @@ -396,6 +396,10 @@ export class DGPercentileRoll extends DGRoll { target = skill.proficiency; localizedKey = `${skill.group} (${skill.label})`; } + if (this.key === "ritual") { + target = actorData.sanity.ritual; + localizedKey = game.i18n.localize(`DG.Skills.ritual`); + } return { target, localizedKey }; } @@ -411,7 +415,7 @@ export class DGPercentileRoll extends DGRoll { get isInhuman() { /* Changing this to only consider the base x5 stat target for whether something is 'inhuman' - beecause I do not think the intent was an Agent with a high strength getting a +40% bonus to be considered 'inhuman' + because I do not think the intent was an Agent with a high strength getting a +40% bonus to be considered 'inhuman' and therefore benefit from the increased crit threshold, although could be wrong about this. */ if (this.target > 99 && this.type === "stat") { diff --git a/templates/actor/partials/equipment-partial.html b/templates/actor/partials/equipment-partial.html index 99ec4d9..622e4ed 100644 --- a/templates/actor/partials/equipment-partial.html +++ b/templates/actor/partials/equipment-partial.html @@ -269,7 +269,7 @@
- {{localize 'DG.Gear.Rituals'}} + {{localize 'DG.Gear.Rituals'}}