mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 06:26:13 +01:00
[Feature] Seaborne Improvement (#1553)
* Added a max to KnowTheTide. Added a onFear trigger to increase the resource * . * Added a notification message when KnowTheTide gains a token
This commit is contained in:
parent
cc998bffa7
commit
3725fc29ef
3 changed files with 41 additions and 5 deletions
|
|
@ -2876,7 +2876,8 @@
|
|||
"documentIsMissing": "The {documentType} is missing from the world.",
|
||||
"tokenActorMissing": "{name} is missing an Actor",
|
||||
"tokenActorsMissing": "[{names}] missing Actors",
|
||||
"domainTouchRequirement": "This domain card requires {nr} {domain} cards in the loadout to be used"
|
||||
"domainTouchRequirement": "This domain card requires {nr} {domain} cards in the loadout to be used",
|
||||
"knowTheTide": "Know The Tide gained a token"
|
||||
},
|
||||
"Sidebar": {
|
||||
"actorDirectory": {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export default class RegisteredTriggers extends Map {
|
|||
}
|
||||
|
||||
registerItemTriggers(item, registerOverride) {
|
||||
if (!item.actor || !item._stats.createdTime) return;
|
||||
for (const action of item.system.actions ?? []) {
|
||||
if (!action.actor) continue;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,47 @@
|
|||
"resource": {
|
||||
"type": "simple",
|
||||
"value": 0,
|
||||
"max": "",
|
||||
"icon": "",
|
||||
"recovery": null,
|
||||
"max": "@system.levelData.level.current",
|
||||
"icon": "fa-solid fa-water",
|
||||
"recovery": "session",
|
||||
"diceStates": {},
|
||||
"dieFaces": "d4"
|
||||
},
|
||||
"actions": {},
|
||||
"actions": {
|
||||
"tFlus34KotJjHfTe": {
|
||||
"type": "effect",
|
||||
"_id": "tFlus34KotJjHfTe",
|
||||
"systemPath": "actions",
|
||||
"baseAction": false,
|
||||
"description": "",
|
||||
"chatDisplay": true,
|
||||
"originItem": {
|
||||
"type": "itemCollection"
|
||||
},
|
||||
"actionType": "action",
|
||||
"triggers": [
|
||||
{
|
||||
"trigger": "fearRoll",
|
||||
"triggeringActorType": "self",
|
||||
"command": "const { max, value } = this.item.system.resource;\nconst maxValue = actor.system.levelData.level.current;\nconst afterUpdate = value+1;\nif (afterUpdate > maxValue) return;\n\nui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.knowTheTide'));\nreturn { updates: [{\n key: 'resource',\n itemId: this.item.id,\n target: this.item,\n value: 1,\n}]};"
|
||||
}
|
||||
],
|
||||
"cost": [],
|
||||
"uses": {
|
||||
"value": null,
|
||||
"max": "",
|
||||
"recovery": null,
|
||||
"consumeOnSuccess": false
|
||||
},
|
||||
"effects": [],
|
||||
"target": {
|
||||
"type": "any",
|
||||
"amount": null
|
||||
},
|
||||
"name": "Know The Tide",
|
||||
"range": ""
|
||||
}
|
||||
},
|
||||
"originItemType": null,
|
||||
"subType": null,
|
||||
"originId": null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue