mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Feature] Armor/Weapon Compendiums (#459)
* Fixed localization * . * Added all Secondary Weapons * Added all armors * Added Tier1 weapons * Tier2 Physical * Tier 2 magical * Tier 3 Physical * Tier 3 Magical * Tier 4 Physical * Tier 4 Magical * Added wheelchairs
This commit is contained in:
parent
8e516df7cb
commit
2c4d3bd4a3
277 changed files with 34221 additions and 431 deletions
|
|
@ -69,34 +69,34 @@ export class DHActionRollData extends foundry.abstract.DataModel {
|
|||
|
||||
getModifier() {
|
||||
const modifiers = [];
|
||||
if(!this.parent?.actor) return modifiers;
|
||||
if (!this.parent?.actor) return modifiers;
|
||||
switch (this.parent.actor.type) {
|
||||
case 'character':
|
||||
const trait = this.useDefault || !this.trait ? (this.parent.item.system.attack.roll.trait ?? 'agility') : this.trait;
|
||||
if(this.type === CONFIG.DH.GENERAL.rollTypes.attack.id || this.type === CONFIG.DH.GENERAL.rollTypes.trait.id)
|
||||
modifiers.push(
|
||||
{
|
||||
label: `DAGGERHEART.CONFIG.Traits.${trait}.name`,
|
||||
value: this.parent.actor.system.traits[trait].value
|
||||
}
|
||||
)
|
||||
else if(this.type === CONFIG.DH.GENERAL.rollTypes.spellcast.id)
|
||||
modifiers.push(
|
||||
{
|
||||
label: `DAGGERHEART.CONFIG.RollTypes.spellcast.name`,
|
||||
value: this.parent.actor.system.spellcastModifier
|
||||
}
|
||||
)
|
||||
const trait =
|
||||
this.useDefault || !this.trait
|
||||
? (this.parent.item.system.attack.roll.trait ?? 'agility')
|
||||
: this.trait;
|
||||
if (
|
||||
this.type === CONFIG.DH.GENERAL.rollTypes.attack.id ||
|
||||
this.type === CONFIG.DH.GENERAL.rollTypes.trait.id
|
||||
)
|
||||
modifiers.push({
|
||||
label: `DAGGERHEART.CONFIG.Traits.${trait}.name`,
|
||||
value: this.parent.actor.system.traits[trait].value
|
||||
});
|
||||
else if (this.type === CONFIG.DH.GENERAL.rollTypes.spellcast.id)
|
||||
modifiers.push({
|
||||
label: `DAGGERHEART.CONFIG.RollTypes.spellcast.name`,
|
||||
value: this.parent.actor.system.spellcastModifier
|
||||
});
|
||||
break;
|
||||
case 'companion':
|
||||
case 'adversary':
|
||||
if(this.type === CONFIG.DH.GENERAL.rollTypes.attack.id)
|
||||
modifiers.push(
|
||||
{
|
||||
label: 'Bonus to Hit',
|
||||
value: this.bonus ?? this.parent.actor.system.attack.roll.bonus
|
||||
}
|
||||
)
|
||||
if (this.type === CONFIG.DH.GENERAL.rollTypes.attack.id)
|
||||
modifiers.push({
|
||||
label: 'Bonus to Hit',
|
||||
value: this.bonus ?? this.parent.actor.system.attack.roll.bonus
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue