[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:
WBHarry 2026-01-21 02:52:07 +01:00 committed by GitHub
parent cc998bffa7
commit 3725fc29ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 41 additions and 5 deletions

View file

@ -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": {

View file

@ -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;

View file

@ -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,