diff --git a/css/deltagreen.css b/css/deltagreen.css index 3c6cf23..9aed516 100644 --- a/css/deltagreen.css +++ b/css/deltagreen.css @@ -666,6 +666,28 @@ div .first-aid-received-section { margin-bottom: 10px; } +div .exhausted-section { + border-bottom: 1px solid #aaa; + margin-bottom: 10px; +} + +.exhausted-section input[type="number"] { + width: 75px; + text-align: center; + border: 1px solid rgb(122, 121, 113); + border-radius: 3px; + height: 100%; + margin-left: 10px; + margin-bottom: 5px; + min-height: 25px; + color: rgb(139, 0, 0); + background-color: rgba(0, 0, 0, 0.05); +} + +.resource .exhaustion-label { + vertical-align: middle; +} + .bonds-section-header { /* border-top: 1px solid #AAA; */ width: 100%; @@ -1107,8 +1129,7 @@ input.item-sheet-short-input { padding-top: 10px; } - -.stat-block-input{ +.stat-block-input { min-height: 300px; resize: none; -} \ No newline at end of file +} diff --git a/lang/ca.json b/lang/ca.json index f4893ae..74398f4 100644 --- a/lang/ca.json +++ b/lang/ca.json @@ -97,6 +97,8 @@ "DG.Physical.Wounds": "Ferides", "DG.Physical.FirstAidLabel": "Primers auxilis ja aplicats: ", + "DG.Physical.Exhausted": "Exhausted:", + "DG.Physical.ExhaustionPenalty": "Penalty:", "DG.Generic.AddButtonLabel": "Afegir", @@ -152,6 +154,7 @@ "DG.Tooltip.AdaptedToViolence": "Adaptar-se a la violència significa que l'empatia de l'agent rep al ser testimoni de tanta violència. Perd permanentment 1d6 CAR i la mateixa quantitat de cadascún dels seus vincles.", "DG.Tooltip.AdaptedToHelplessness": "Estar adaptat a la impotència significa que l'impuls personal de l'agent s'allunya del món que el rodeja. Perd permanentement 1D6 POD. ", "DG.Tooltip.ToggleEquippedState": "Fes click per alternar si aquest item està equipat o no. ", + "DG.Tooltip.Exhaustion": "An Agent who works too long or faces extreme danger and injury without resting becomes exhausted. When this comes into play is up to the Handler, but a good rule of thumb is that going a night without sleep or refusing to rest after losing SAN or Hit Points leads to exhaustion.", "DG.Gear.Expense.NA": "N/A", "DG.Gear.Expense.Incidental": "Accidental", diff --git a/lang/de.json b/lang/de.json index ceb61fe..d7cdbdb 100644 --- a/lang/de.json +++ b/lang/de.json @@ -112,6 +112,8 @@ "DG.Physical.Wounds": "Verletzungen", "DG.Physical.FirstAidLabel": "Erste Hilfe bereits geleistet: ", + "DG.Physical.Exhausted": "Exhausted:", + "DG.Physical.ExhaustionPenalty": "Penalty:", "DG.Generic.AddButtonLabel": "Hinzufügen", @@ -167,6 +169,7 @@ "DG.Tooltip.AdaptedToViolence": "Die 'Gewöhnung an Gewalt' ('Adapted to Violence') bedeutet, dass das Einfühlungsvermögen deines Agenten leidet, da er Gewalt nur als ein weiteres Werkzeug ansieht, das er einsetzen kann. Der Agent verliert dauerhaft 1D6 CHA und den gleichen Betrag von jedem seiner Bindungen.", "DG.Tooltip.AdaptedToHelplessness": "Die 'Gewöhnung an Hilflosigkeit' ('Adapted to Helplessness') bedeutet, dass der persönliche Antrieb deines Agenten leidet, da er sich von der Welt um ihn herum zurückzieht. Sobald dein Agent an die Hilflosigkeit gewöhnt ist, verliert er dauerhaft 1D6 MANA.", "DG.Tooltip.ToggleEquippedState": "Klicke hier, um umzuschalten, ob dieser Gegenstand ausgerüstet ist oder nicht.", + "DG.Tooltip.Exhaustion": "An Agent who works too long or faces extreme danger and injury without resting becomes exhausted. When this comes into play is up to the Handler, but a good rule of thumb is that going a night without sleep or refusing to rest after losing SAN or Hit Points leads to exhaustion.", "DG.Gear.Expense.NA": "N/A bzw Keine", "DG.Gear.Expense.Incidental": "Zufällig", diff --git a/lang/en.json b/lang/en.json index f5084da..8aea9ad 100644 --- a/lang/en.json +++ b/lang/en.json @@ -113,6 +113,8 @@ "DG.Physical.Wounds": "Wounds", "DG.Physical.FirstAidLabel": "First Aid Has Already Been Attempted: ", + "DG.Physical.Exhausted": "Exhausted:", + "DG.Physical.ExhaustionPenalty": "Penalty:", "DG.Generic.AddButtonLabel": "Add", @@ -168,6 +170,7 @@ "DG.Tooltip.AdaptedToViolence": "Being adapted to violence means your Agent’s empathy suffers as they come to view violence as nothing but another tool to be wielded. Agent permanently loses 1D6 CHA and the same amount from each of their Bonds.", "DG.Tooltip.AdaptedToHelplessness": "Being adapted to helplessness means your Agent’s personal drive suffers as they pull back from the world around them. As soon as your Agent becomes adapted to helplessness, agent permanently loses 1D6 POW.", "DG.Tooltip.ToggleEquippedState": "Click to toggle whether this item is equipped or not.", + "DG.Tooltip.Exhaustion": "An Agent who works too long or faces extreme danger and injury without resting becomes exhausted. When this comes into play is up to the Handler, but a good rule of thumb is that going a night without sleep or refusing to rest after losing SAN or Hit Points leads to exhaustion.", "DG.Gear.Expense.NA": "N/A or None", "DG.Gear.Expense.Incidental": "Incidental", diff --git a/lang/es.json b/lang/es.json index 6da90c4..9fac471 100644 --- a/lang/es.json +++ b/lang/es.json @@ -97,6 +97,8 @@ "DG.Physical.Wounds": "Heridas", "DG.Physical.FirstAidLabel": "Los Primeros Auxilios ya han sido aplicados: ", + "DG.Physical.Exhausted": "Exhausted:", + "DG.Physical.ExhaustionPenalty": "Penalty:", "DG.Generic.AddButtonLabel": "Añadir", @@ -152,6 +154,7 @@ "DG.Tooltip.AdaptedToViolence": "Adaptarse a la violencia significa que la empatía de su agente sufre al ser testigo de tanta violencia. Pierde permanentemente 1D6 CAR y la misma cantidad de cada uno de sus vínculos.", "DG.Tooltip.AdaptedToHelplessness": "Estar adaptado a la impotencia significa que el impulso personal de su Agente sufre cuando se aleja del mundo que lo rodea. Tan pronto como su Agente se adapte a la indefensión, perderá permanentemente 1D6 POD. ", "DG.Tooltip.ToggleEquippedState": "Haga clic para alternar si este artículo está equipado o no. ", + "DG.Tooltip.Exhaustion": "An Agent who works too long or faces extreme danger and injury without resting becomes exhausted. When this comes into play is up to the Handler, but a good rule of thumb is that going a night without sleep or refusing to rest after losing SAN or Hit Points leads to exhaustion.", "DG.Gear.Expense.NA": "N/A", "DG.Gear.Expense.Incidental": "Incidental", diff --git a/lang/fr.json b/lang/fr.json index 9bc20d6..99ed0c7 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -103,6 +103,8 @@ "DG.Physical.Wounds": "Blessures", "DG.Physical.FirstAidLabel": "Les premiers secours ont déjà été tentés: ", + "DG.Physical.Exhausted": "Exhausted:", + "DG.Physical.ExhaustionPenalty": "Penalty:", "DG.Generic.AddButtonLabel": "Ajout", @@ -158,6 +160,7 @@ "DG.Tooltip.AdaptedToViolence": "Être adapté à la violence signifie que l'empathie de votre Agent souffre lorsqu'il en vient à considérer la violence comme un outil de plus à manier. Il ou elle perd définitivement 1D6 CHA et le même montant dans chacun de ses Liens.", "DG.Tooltip.AdaptedToHelplessness": "Être adapté à l'impuissance signifie que la motivation personnelle de votre agent souffre lorsqu'il se retire du monde qui l'entoure. Dès que votre agent s'adapte à l'impuissance, il ou elle perd définitivement 1D6 POU.", "DG.Tooltip.ToggleEquippedState": "Cliquez pour indiquer si cet élément est équipé ou non.", + "DG.Tooltip.Exhaustion": "An Agent who works too long or faces extreme danger and injury without resting becomes exhausted. When this comes into play is up to the Handler, but a good rule of thumb is that going a night without sleep or refusing to rest after losing SAN or Hit Points leads to exhaustion.", "DG.Gear.Expense.NA": "N/A ou Aucun", "DG.Gear.Expense.Incidental": "Courant", diff --git a/lang/ja.json b/lang/ja.json index 549fc97..1cc3ef6 100644 --- a/lang/ja.json +++ b/lang/ja.json @@ -97,6 +97,8 @@ "DG.Physical.Wounds": "傷", "DG.Physical.FirstAidLabel": "応急処置は既に施された", + "DG.Physical.Exhausted": "疲れ果てた:", + "DG.Physical.ExhaustionPenalty": "Penalty:", "DG.Generic.AddButtonLabel": "加える", @@ -152,6 +154,7 @@ "DG.Tooltip.AdaptedToViolence": "暴力を道具としかみえない、暴力を見たり、使ったりするのをなんとも思えなくなって、もう精神ダメージは受けないが、永遠に1D6魅力とそれぞれの絆のスコアを失ってしまう。", "DG.Tooltip.AdaptedToHelplessness": "すべてが無意味と理解し、もう無力の精神ダメージはうけないが、執行するドライブが下がって、永遠に1D6判断力を失ってしまう。", "DG.Tooltip.ToggleEquippedState": "クリックすると、この装備を着るる/外す。", + "DG.Tooltip.Exhaustion": "An Agent who works too long or faces extreme danger and injury without resting becomes exhausted. When this comes into play is up to the Handler, but a good rule of thumb is that going a night without sleep or refusing to rest after losing SAN or Hit Points leads to exhaustion.", "DG.Gear.Expense.NA": "N/A", "DG.Gear.Expense.Incidental": "付帯費用", diff --git a/lang/pt-BR.json b/lang/pt-BR.json index b9db68e..f0ae5f5 100644 --- a/lang/pt-BR.json +++ b/lang/pt-BR.json @@ -89,6 +89,8 @@ "DG.Roll.Roll": "Rolar", "DG.Physical.Wounds": "Ferimentos", "DG.Physical.FirstAidLabel": "Primeiros socorros já foi tentado: ", + "DG.Physical.Exhausted": "Exhausted:", + "DG.Physical.ExhaustionPenalty": "Penalty:", "DG.Generic.AddButtonLabel": "Adicionar", "DG.Mental.BreakingPoint": "Ponto de Ruptura: ", "DG.Mental.Reset": "Resetar", @@ -139,6 +141,7 @@ "DG.Tooltip.AdaptedToViolence": "Estar adaptado à violência significa que a empatia do seu agente sofre quando eles veem a violência como nada além de outra ferramenta a ser usada. O agente perde permanentemente 1D6 CAR e a mesma quantia de cada um de seus vínculos.", "DG.Tooltip.AdaptedToHelplessness": "Estar adaptado ao desamparo significa que a motivação pessoal do seu agente sofre à medida que ele se afasta do mundo ao seu redor. Assim que seu Agente se adaptar ao desamparo, o agente perde permanentemente 1D6 de POD.", "DG.Tooltip.ToggleEquippedState": "Clique para alternar se este item está equipado ou não.", + "DG.Tooltip.Exhaustion": "An Agent who works too long or faces extreme danger and injury without resting becomes exhausted. When this comes into play is up to the Handler, but a good rule of thumb is that going a night without sleep or refusing to rest after losing SAN or Hit Points leads to exhaustion.", "DG.Gear.Expense.NA": "N/A", "DG.Gear.Expense.Incidental": "Incidental", "DG.Gear.Expense.Standard": "Padrão", diff --git a/module/actor/actor.js b/module/actor/actor.js index 2fbee2f..15c0020 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -265,6 +265,11 @@ export default class DeltaGreenActor extends Actor { system.statistics.str.meleeDamageBonus = bonus; system.statistics.str.meleeDamageBonusFormula = sbonus; + if (system.physical.exhaustedPenalty > 0) { + system.physical.exhaustedPenalty = + -1 * Math.abs(system.physical.exhaustedPenalty); + } + console.log(agent); } diff --git a/module/roll/roll.js b/module/roll/roll.js index 597e3de..7072fa2 100644 --- a/module/roll/roll.js +++ b/module/roll/roll.js @@ -267,10 +267,36 @@ export class DGPercentileRoll extends DGRoll { this.effectiveTarget }`; } - if (this.modifier) { - label += ` (${this.target}${DGUtils.formatStringWithLeadingPlus( - this.modifier, - )}%)`; + + let isExhausted = false; + let exhaustedCheckPenalty = -20; + + try { + // I suspect (but am not entirely certain) that being tired doesn't make you less lucky) + if (this.type !== "luck") { + isExhausted = this.actor.system.physical.exhausted; + exhaustedCheckPenalty = this.actor.system.physical.exhaustedPenalty; + exhaustedCheckPenalty = -1 * Math.abs(exhaustedCheckPenalty); + } + } catch { + isExhausted = false; + exhaustedCheckPenalty = -20; + } + + if (this.modifier || isExhausted) { + label += ` (${this.target}`; + + if (this.modifier) { + label += ` ${DGUtils.formatStringWithLeadingPlus(this.modifier)}%`; + } + + if (isExhausted) { + label += ` ${DGUtils.formatStringWithLeadingPlus( + exhaustedCheckPenalty, + )}%`; + } + + label += `)`; } let resultString = ""; @@ -425,18 +451,39 @@ export class DGPercentileRoll extends DGRoll { * Actual target for the roll accounting for modifier if present. * Floored to 1 if a negative modifier would bring it below 1. * Capped at 99 unless it is an inhuman stat test. + * Also worth noting, per page 47 of the Agent's Handbook, Exhaustion penalties + * affect not only skill and stat tests, but SAN tests as well... * * @returns {null|integer} */ get effectiveTarget() { let target = 1; + let isExhausted = false; + let exhaustedCheckPenalty = -20; + + try { + // I suspect (but am not entirely certain) that being tired doesn't make you less lucky) + if (this.type !== "luck") { + isExhausted = this.actor.system.physical.exhausted; + exhaustedCheckPenalty = this.actor.system.physical.exhaustedPenalty; + exhaustedCheckPenalty = -1 * Math.abs(exhaustedCheckPenalty); + } + } catch { + isExhausted = false; + exhaustedCheckPenalty = -20; + } + if (!this.target || Number.isNaN(this.target)) { return null; } target = parseInt(this.target); + if (isExhausted) { + target += exhaustedCheckPenalty; + } + if (this.modifier && !Number.isNaN(this.modifier)) { const modifier = parseInt(this.modifier); diff --git a/template.json b/template.json index 7b52b6d..611042d 100644 --- a/template.json +++ b/template.json @@ -486,7 +486,9 @@ "physical": { "description": "(Physical description of agent)", "wounds": "", - "firstAidAttempted": false + "firstAidAttempted": false, + "exhausted": false, + "exhaustedPenalty": -20 }, "biography": { "profession": "", diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index cc49c2d..c482281 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -171,6 +171,18 @@ >{{localize 'DG.Physical.FirstAidLabel'}} +
+ + + + + {{#if actor.system.physical.exhausted }} + + + + + {{/if}} +