[Feature] 494 - Adversaries Tier 1 (#500)

* Some work

* More work

* Finished Tier 1
This commit is contained in:
WBHarry 2025-08-01 16:43:59 +02:00 committed by GitHub
parent 3014be79ad
commit 263dfa69ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
70 changed files with 15171 additions and 972 deletions

View file

@ -1,7 +1,6 @@
import { itemAbleRollParse } from '../helpers/utils.mjs';
export default class DhActiveEffect extends foundry.documents.ActiveEffect {
/* -------------------------------------------- */
/* Properties */
/* -------------------------------------------- */
@ -78,8 +77,8 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
/**
* Altered Foundry safeEval to allow non-numeric return
* @param {string} expression
* @returns
* @param {string} expression
* @returns
*/
static effectSafeEval(expression) {
let result;
@ -95,13 +94,15 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
}
/**
* Generates a list of localized tags based on this item's type-specific properties.
* @returns {string[]} An array of localized tag strings.
*/
* Generates a list of localized tags based on this item's type-specific properties.
* @returns {string[]} An array of localized tag strings.
*/
_getTags() {
const tags = [
`${game.i18n.localize(this.parent.system.metadata.label)}: ${this.parent.name}`,
game.i18n.localize(this.isTemporary ? 'DAGGERHEART.EFFECTS.Duration.temporary' : 'DAGGERHEART.EFFECTS.Duration.passive')
game.i18n.localize(
this.isTemporary ? 'DAGGERHEART.EFFECTS.Duration.temporary' : 'DAGGERHEART.EFFECTS.Duration.passive'
)
];
for (const statusId of this.statuses) {

View file

@ -74,8 +74,8 @@ export default class DHItem extends foundry.documents.Item {
isInventoryItem === true
? 'Inventory Items' //TODO localize
: isInventoryItem === false
? 'Character Items' //TODO localize
: 'Other'; //TODO localize
? 'Character Items' //TODO localize
: 'Other'; //TODO localize
return { value: type, label, group };
}
@ -137,10 +137,10 @@ export default class DHItem extends foundry.documents.Item {
this.type === 'ancestry'
? game.i18n.localize('DAGGERHEART.UI.Chat.foundationCard.ancestryTitle')
: this.type === 'community'
? game.i18n.localize('DAGGERHEART.UI.Chat.foundationCard.communityTitle')
: this.type === 'feature'
? game.i18n.localize('TYPES.Item.feature')
: game.i18n.localize('DAGGERHEART.UI.Chat.foundationCard.subclassFeatureTitle'),
? game.i18n.localize('DAGGERHEART.UI.Chat.foundationCard.communityTitle')
: this.type === 'feature'
? game.i18n.localize('TYPES.Item.feature')
: game.i18n.localize('DAGGERHEART.UI.Chat.foundationCard.subclassFeatureTitle'),
origin: origin,
img: this.img,
name: this.name,