Levelup Followup (#126)

* Levelup applies bonuses to character

* Added visualisation of domain card levels

* Fixed domaincard level max for selections in a tier

* A trait can now only be level up once within the same tier
This commit is contained in:
WBHarry 2025-06-13 14:15:02 +02:00 committed by GitHub
parent f840dc2553
commit ec3aecfe99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 566 additions and 202 deletions

View file

@ -36,17 +36,12 @@ export default class DHDomainCard extends BaseDataItem {
return false;
}
if (!this.actor.system.domains.find(x => x === item.system.domain)) {
if (!this.actor.system.domains.find(x => x === this.domain)) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.LacksDomain'));
return false;
}
if (this.actor.system.domainCards.total.length === 5) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.MaxLoadoutReached'));
return false;
}
if (this.actor.system.domainCards.total.find(x => x.name === item.name)) {
if (this.actor.system.domainCards.total.find(x => x.name === this.parent.name)) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.DuplicateDomainCard'));
return false;
}