diff --git a/src/module/dialog/talentDialog.mjs b/src/module/dialog/talentDialog.mjs index 1eaec417..b59ba76a 100644 --- a/src/module/dialog/talentDialog.mjs +++ b/src/module/dialog/talentDialog.mjs @@ -102,21 +102,25 @@ export class TalentDialog extends HandlebarsApplicationMixin(ApplicationV2) { const context = { talent: this._talent.name, taw, + mod: modValue, ergebnis: [ { eigenschaft: this._talent.system.probe[0], - eigenschaftWert: this._actor.system.attribute[this._talent.system.probe[0].toLowerCase()].aktuell, - wuerfelErgebnis: result.evaluated.terms[0].results[0].result + eigenschaftWert: taw + modValue < 0 ? this._actor.system.attribute[this._talent.system.probe[0].toLowerCase()].aktuell + (taw + modValue) : this._actor.system.attribute[this._talent.system.probe[0].toLowerCase()].aktuell, + wuerfelErgebnis: result.evaluated.terms[0].results[0].result, + reduced: taw + modValue < 0 }, { eigenschaft: this._talent.system.probe[1], - eigenschaftWert: this._actor.system.attribute[this._talent.system.probe[1].toLowerCase()].aktuell, - wuerfelErgebnis: result.evaluated.terms[0].results[1].result + eigenschaftWert: taw + modValue < 0 ? this._actor.system.attribute[this._talent.system.probe[1].toLowerCase()].aktuell + (taw + modValue) : this._actor.system.attribute[this._talent.system.probe[1].toLowerCase()].aktuell, + wuerfelErgebnis: result.evaluated.terms[0].results[1].result, + reduced: taw + modValue < 0 }, { eigenschaft: this._talent.system.probe[2], - eigenschaftWert: this._actor.system.attribute[this._talent.system.probe[2].toLowerCase()].aktuell, - wuerfelErgebnis: result.evaluated.terms[0].results[2].result + eigenschaftWert: taw + modValue < 0 ? this._actor.system.attribute[this._talent.system.probe[2].toLowerCase()].aktuell + (taw + modValue) : this._actor.system.attribute[this._talent.system.probe[2].toLowerCase()].aktuell, + wuerfelErgebnis: result.evaluated.terms[0].results[2].result, + reduced: taw + modValue < 0 } ], patzer: result.patzer, diff --git a/src/module/globals/DSARoll.mjs b/src/module/globals/DSARoll.mjs index 713e39a3..90e9439a 100644 --- a/src/module/globals/DSARoll.mjs +++ b/src/module/globals/DSARoll.mjs @@ -23,7 +23,7 @@ const evaluateRoll = async (rolledDice, { countToMeisterlich = 3, countToPatzer = 3, }, rollObject = Roll) => { - let tap = value - mod; + let tap = value + mod; let meisterlichCounter = 0; let patzerCounter = 0; let failCounter = 0; diff --git a/src/module/globals/DSARoll.test.mjs b/src/module/globals/DSARoll.test.mjs index 7297ab77..240087b9 100644 --- a/src/module/globals/DSARoll.test.mjs +++ b/src/module/globals/DSARoll.test.mjs @@ -96,14 +96,14 @@ describe('Attribute Checks', () => { describe('Skill Checks', () => { it('should yield positive TAP when the die roll matches values of used attributes', async () => { - + let taw = 5 let actual = await evaluateRoll("3d20",{ - value: 1, + value: taw, werte: [12, 12, 12], owner }, RollWithMockResults(12, 12, 12)) - expect(actual.tap).toBeGreaterThan(0) + expect(actual.tap).toBe(taw) }) it('should succeed with a TaP* of 1 when the die roll are exactly the values of used attributes', async () => { @@ -114,7 +114,7 @@ describe('Skill Checks', () => { owner }, RollWithMockResults(12, 12, 12)) - expect(actual.tap).toBe(0) + expect(actual.tap).toBe(1) expect(actual.patzer).toBe(false) }) @@ -201,7 +201,7 @@ describe('Skill Checks', () => { mod: -3, werte: [12, 12, 12], owner - }, RollWithMockResults(13, 13, 13)) + }, RollWithMockResults(10, 10, 10)) expect(actual.tap).toBe(-3) }) diff --git a/src/style/atoms/_chat.scss b/src/style/atoms/_chat.scss index 2c1fb644..68b992e4 100644 --- a/src/style/atoms/_chat.scss +++ b/src/style/atoms/_chat.scss @@ -22,6 +22,10 @@ line-height: 16px; height: 16px; vertical-align: middle; + + &.modified { + color: red; + } } span.value { diff --git a/src/templates/chat/skill-chat-message.hbs b/src/templates/chat/skill-chat-message.hbs index c232d1e3..6f89b2bc 100644 --- a/src/templates/chat/skill-chat-message.hbs +++ b/src/templates/chat/skill-chat-message.hbs @@ -2,11 +2,12 @@