mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Fixed so @ strings can be parsed as active effect values
This commit is contained in:
parent
b8482da848
commit
3c33158d11
7 changed files with 26 additions and 183 deletions
41
lang/en.json
41
lang/en.json
|
|
@ -264,6 +264,7 @@
|
|||
}
|
||||
},
|
||||
"Tiers": {
|
||||
"singular": "Tier",
|
||||
"tier1": "Tier 1",
|
||||
"tier2": "Tier 2",
|
||||
"tier3": "Tier 3",
|
||||
|
|
@ -620,25 +621,9 @@
|
|||
}
|
||||
},
|
||||
"WeaponFeature": {
|
||||
"Barrier1": {
|
||||
"Name": "Barrier 1",
|
||||
"Description": "+1 to Armor Score; -1 to Evasion"
|
||||
},
|
||||
"Barrier2": {
|
||||
"Name": "Barrier 2",
|
||||
"Description": "+2 to Armor Score; -1 to Evasion"
|
||||
},
|
||||
"Barrier3": {
|
||||
"Name": "Barrier 3",
|
||||
"Description": "+3 to Armor Score; -1 to Evasion"
|
||||
},
|
||||
"Barrier4": {
|
||||
"Name": "Barrier 4",
|
||||
"Description": "+4 to Armor Score; -1 to Evasion"
|
||||
},
|
||||
"Barrier5": {
|
||||
"Name": "Barrier 5",
|
||||
"Description": "+5 to Armor Score; -1 to Evasion"
|
||||
"Barrier": {
|
||||
"Name": "Barrier",
|
||||
"Description": "+{armorScore} to Armor Score; -1 to Evasion"
|
||||
},
|
||||
"Bonded": {
|
||||
"Name": "Bonded",
|
||||
|
|
@ -764,21 +749,9 @@
|
|||
"Name": "Powerful",
|
||||
"Description": "On a successful attack, roll an additional damage die and discard the lowest result."
|
||||
},
|
||||
"Protective1": {
|
||||
"Name": "Protective 1",
|
||||
"Description": "+1 to Armor Score"
|
||||
},
|
||||
"Protective2": {
|
||||
"Name": "Protective 2",
|
||||
"Description": "+2 to Armor Score"
|
||||
},
|
||||
"Protective3": {
|
||||
"Name": "Protective 3",
|
||||
"Description": "+3 to Armor Score"
|
||||
},
|
||||
"Protective4": {
|
||||
"Name": "Protective 4",
|
||||
"Description": "+4 to Armor Score"
|
||||
"Protective": {
|
||||
"Name": "Protective",
|
||||
"Description": "+{tier} to Armor Score"
|
||||
},
|
||||
"Quick": {
|
||||
"Name": "Quick",
|
||||
|
|
|
|||
|
|
@ -187,112 +187,16 @@ export const armorFeatures = {
|
|||
};
|
||||
|
||||
export const weaponFeatures = {
|
||||
barrier1: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Barrier1.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Barrier1.Description',
|
||||
barrier: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Barrier.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Barrier.Description',
|
||||
effects: [
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.bonuses.armorScore',
|
||||
mode: 2,
|
||||
value: '1'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.evasion.bonus',
|
||||
mode: 2,
|
||||
value: '-1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
barrier2: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Barrier2.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Barrier2.Description',
|
||||
effects: [
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.bonuses.armorScore',
|
||||
mode: 2,
|
||||
value: '2'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.evasion.bonus',
|
||||
mode: 2,
|
||||
value: '-1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
barrier3: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Barrier3.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Barrier3.Description',
|
||||
effects: [
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.bonuses.armorScore',
|
||||
mode: 2,
|
||||
value: '3'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.evasion.bonus',
|
||||
mode: 2,
|
||||
value: '-1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
barrier4: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Barrier4.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Barrier4.Description',
|
||||
effects: [
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.bonuses.armorScore',
|
||||
mode: 2,
|
||||
value: '4'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.evasion.bonus',
|
||||
mode: 2,
|
||||
value: '-1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
barrier5: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Barrier5.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Barrier5.Description',
|
||||
effects: [
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.bonuses.armorScore',
|
||||
mode: 2,
|
||||
value: '5'
|
||||
value: '@system.tier + 1'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -520,61 +424,16 @@ export const weaponFeatures = {
|
|||
label: 'DAGGERHEART.WeaponFeature.Powerful.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Powerful.Description'
|
||||
},
|
||||
protective1: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Protective1.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Protective1.Description',
|
||||
protective: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Protective.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Protective.Description',
|
||||
effects: [
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.bonuses.armorScore',
|
||||
mode: 2,
|
||||
value: '1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
protective2: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Protective2.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Protective2.Description',
|
||||
effects: [
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.bonuses.armorScore',
|
||||
mode: 2,
|
||||
value: '2'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
protective3: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Protective3.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Protective3.Description',
|
||||
effects: [
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.bonuses.armorScore',
|
||||
mode: 2,
|
||||
value: '3'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
protective4: {
|
||||
label: 'DAGGERHEART.WeaponFeature.Protective4.Name',
|
||||
description: 'DAGGERHEART.WeaponFeature.Protective4.Description',
|
||||
effects: [
|
||||
{
|
||||
changes: [
|
||||
{
|
||||
key: 'system.bonuses.armorScore',
|
||||
mode: 2,
|
||||
value: '4'
|
||||
value: '@system.tier'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export default class DHArmor extends BaseDataItem {
|
|||
const fields = foundry.data.fields;
|
||||
return {
|
||||
...super.defineSchema(),
|
||||
tier: new fields.NumberField({ required: true, integer: true, initial: 1 }),
|
||||
equipped: new fields.BooleanField({ initial: false }),
|
||||
baseScore: new fields.NumberField({ integer: true, initial: 0 }),
|
||||
features: new fields.ArrayField(
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export default class DHWeapon extends BaseDataItem {
|
|||
const fields = foundry.data.fields;
|
||||
return {
|
||||
...super.defineSchema(),
|
||||
tier: new fields.NumberField({ required: true, integer: true, initial: 1 }),
|
||||
equipped: new fields.BooleanField({ initial: false }),
|
||||
|
||||
//SETTINGS
|
||||
|
|
|
|||
|
|
@ -19,4 +19,9 @@ export default class DhActiveEffect extends ActiveEffect {
|
|||
|
||||
await super._preCreate(data, options, user);
|
||||
}
|
||||
|
||||
static applyField(model, change, field) {
|
||||
change.value = Roll.safeEval(Roll.replaceFormulaData(change.value, change.effect.parent));
|
||||
super.applyField(model, change, field);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
<fieldset class="two-columns">
|
||||
<legend>{{localize tabs.settings.label}}</legend>
|
||||
<span>{{localize "DAGGERHEART.Tiers.singular"}}</span>
|
||||
{{formField systemFields.tier value=source.system.tier}}
|
||||
<span>{{localize "DAGGERHEART.Sheets.Armor.baseScore"}}</span>
|
||||
{{formField systemFields.baseScore value=source.system.baseScore}}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
>
|
||||
<fieldset class="two-columns">
|
||||
<legend>{{localize tabs.settings.label}}</legend>
|
||||
<span>{{localize "DAGGERHEART.Tiers.singular"}}</span>
|
||||
{{formField systemFields.tier value=source.system.tier}}
|
||||
<span>{{localize "DAGGERHEART.Sheets.Weapon.SecondaryWeapon"}}</span>
|
||||
{{formField systemFields.secondary value=source.system.secondary}}
|
||||
<span>{{localize "DAGGERHEART.Sheets.Weapon.Trait"}}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue