diff --git a/lang/en.json b/lang/en.json index a78ed588..945adad0 100755 --- a/lang/en.json +++ b/lang/en.json @@ -194,6 +194,8 @@ "unequip": "Unequip", "useItem": "Use Item" }, + "defaultHopeDice": "Default Hope Dice", + "defaultFearDice": "Default Fear Dice", "disadvantageSources": { "label": "Disadvantage Sources", "hint": "Add single words or short text as reminders and hints of what a character has disadvantage on." diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index eba46f10..7a30fb5a 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -280,6 +280,22 @@ export default class DhCharacter extends BaseDataActor { }) }) }), + dualityRoll: new fields.SchemaField({ + defaultHopeDice: new fields.StringField({ + nullable: false, + required: true, + choices: CONFIG.DH.GENERAL.diceTypes, + initial: CONFIG.DH.GENERAL.diceTypes.d12, + label: 'DAGGERHEART.ACTORS.Character.defaultHopeDice' + }), + defaultFearDice: new fields.StringField({ + nullable: false, + required: true, + choices: CONFIG.DH.GENERAL.diceTypes, + initial: CONFIG.DH.GENERAL.diceTypes.d12, + label: 'DAGGERHEART.ACTORS.Character.defaultFearDice' + }) + }), runeWard: new fields.BooleanField({ initial: false }), burden: new fields.SchemaField({ ignore: new fields.BooleanField() diff --git a/module/dice/dualityRoll.mjs b/module/dice/dualityRoll.mjs index d2e20213..63233902 100644 --- a/module/dice/dualityRoll.mjs +++ b/module/dice/dualityRoll.mjs @@ -130,9 +130,14 @@ export default class DualityRoll extends D20Roll { this.terms = [this.terms[0], this.terms[1], this.terms[2]]; return; } - this.terms[0] = new foundry.dice.terms.Die({ faces: 12 }); + + const { defaultHopeDice, defaultFearDice } = this.data.rules.dualityRoll; + const hopeFaces = Number.parseInt(defaultHopeDice.substring(1)); + const fearFaces = Number.parseInt(defaultFearDice.substring(1)); + + this.terms[0] = new foundry.dice.terms.Die({ faces: hopeFaces }); this.terms[1] = new foundry.dice.terms.OperatorTerm({ operator: '+' }); - this.terms[2] = new foundry.dice.terms.Die({ faces: 12 }); + this.terms[2] = new foundry.dice.terms.Die({ faces: fearFaces }); } applyAdvantage() { diff --git a/src/packs/adversaries/adversary_Demon_of_Despair_kE4dfhqmIQpNd44e.json b/src/packs/adversaries/adversary_Demon_of_Despair_kE4dfhqmIQpNd44e.json index b1804074..188b2687 100644 --- a/src/packs/adversaries/adversary_Demon_of_Despair_kE4dfhqmIQpNd44e.json +++ b/src/packs/adversaries/adversary_Demon_of_Despair_kE4dfhqmIQpNd44e.json @@ -312,7 +312,14 @@ "range": "melee" } }, - "changes": [], + "changes": [ + { + "key": "system.rules.dualityRoll.defaultHopeDice", + "mode": 5, + "value": "d8", + "priority": null + } + ], "disabled": false, "duration": { "startTime": null, @@ -323,7 +330,7 @@ "startRound": null, "startTurn": null }, - "description": "
All targets aff ected replace their Hope Die with a d8 until they roll a success with Hope or their next rest.
", + "description": "All targets affected replace their Hope Die with a d8 until they roll a success with Hope or their next rest.
", "tint": "#ffffff", "statuses": [], "sort": 0, diff --git a/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json b/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json index 9e838d6d..d4acda0e 100644 --- a/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json +++ b/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json @@ -256,34 +256,45 @@ "description": "Spend a Fear to boil the blood of all PCs within Far range. They use a d20 as their Fear Die until the end of the scene.
@Template[type:emanation|range:f]
", "resource": null, "actions": { - "V142qYppCGJn8OiN": { + "jKvzbQT0vp66DDOH": { "type": "effect", - "_id": "V142qYppCGJn8OiN", + "_id": "jKvzbQT0vp66DDOH", "systemPath": "actions", + "baseAction": false, "description": "", "chatDisplay": true, + "originItem": { + "type": "itemCollection" + }, "actionType": "action", "cost": [ { "scalable": false, "key": "fear", "value": 1, - "step": null + "itemId": null, + "step": null, + "consumeOnSuccess": false } ], "uses": { "value": null, "max": "", - "recovery": null + "recovery": null, + "consumeOnSuccess": false }, - "effects": [], + "effects": [ + { + "_id": "gFeHLGgeRoDdd3VG", + "onSave": false + } + ], "target": { - "type": "self", + "type": "hostile", "amount": null }, "name": "Spend Fear", - "img": "icons/skills/melee/maneuver-greatsword-yellow.webp", - "range": "" + "range": "far" } }, "originItemType": null, @@ -292,7 +303,51 @@ }, "_id": "a33PW8UkziliowlR", "img": "icons/skills/melee/maneuver-greatsword-yellow.webp", - "effects": [], + "effects": [ + { + "name": "Battle Lust", + "img": "icons/skills/melee/maneuver-greatsword-yellow.webp", + "origin": "Compendium.daggerheart.adversaries.Actor.5lphJAgzoqZI3VoG.Item.a33PW8UkziliowlR", + "transfer": false, + "_id": "gFeHLGgeRoDdd3VG", + "type": "base", + "system": { + "rangeDependence": { + "enabled": false, + "type": "withinRange", + "target": "hostile", + "range": "melee" + } + }, + "changes": [ + { + "key": "system.rules.dualityRoll.defaultFearDice", + "mode": 5, + "value": "d20", + "priority": null + } + ], + "disabled": false, + "duration": { + "startTime": null, + "combat": null, + "seconds": null, + "rounds": null, + "turns": null, + "startRound": null, + "startTurn": null + }, + "description": "You use a d20 as your Fear Die until the end of the scene.
", + "tint": "#ffffff", + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!actors.items.effects!5lphJAgzoqZI3VoG.a33PW8UkziliowlR.gFeHLGgeRoDdd3VG" + } + ], "folder": null, "sort": 0, "ownership": { diff --git a/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json b/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json index 705c9585..dd8078ee 100644 --- a/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json +++ b/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json @@ -136,13 +136,89 @@ "system": { "description": "Cultists dedicated this place to the Fallen Gods, and their foul influence seeps into it. Reduce the PCs’ Hope Die to a d10 while in this environment. The desecration can be removed with a Progress Countdown (6).
How do the PCs fist notice that something is wrong about this place? What fears resurface while hope is kept at bay?
Your Hope Die is reduced to a d10 while in the Desecrated Grounds.
", + "tint": "#ffffff", + "statuses": [], + "sort": 0, + "flags": {}, + "_stats": { + "compendiumSource": null + }, + "_key": "!actors.items.effects!QAXXiOKBDmCTauHD.iiHjguQG2aBn9g8i.8yNIw8Y7rfMdOqWC" + } + ], "folder": null, "sort": 0, "ownership": {