mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
Move type to main damage only
This commit is contained in:
parent
37f64ed023
commit
c5a64c2def
2 changed files with 15 additions and 18 deletions
|
|
@ -283,17 +283,6 @@ export class DHResourceData extends foundry.abstract.DataModel {
|
||||||
static defineSchema() {
|
static defineSchema() {
|
||||||
return {
|
return {
|
||||||
base: new fields.BooleanField({ initial: false, readonly: true, label: 'Base' }),
|
base: new fields.BooleanField({ initial: false, readonly: true, label: 'Base' }),
|
||||||
type: new fields.SetField(
|
|
||||||
new fields.StringField({
|
|
||||||
choices: CONFIG.DH.GENERAL.damageTypes,
|
|
||||||
initial: 'physical',
|
|
||||||
nullable: false,
|
|
||||||
required: true
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
label: game.i18n.localize('DAGGERHEART.GENERAL.type')
|
|
||||||
}
|
|
||||||
),
|
|
||||||
applyTo: new fields.StringField({
|
applyTo: new fields.StringField({
|
||||||
choices: CONFIG.DH.GENERAL.healingTypes,
|
choices: CONFIG.DH.GENERAL.healingTypes,
|
||||||
required: true,
|
required: true,
|
||||||
|
|
@ -325,7 +314,18 @@ export class DHDamageData extends DHResourceData {
|
||||||
choices: CONFIG.DH.GENERAL.groupAttackRange,
|
choices: CONFIG.DH.GENERAL.groupAttackRange,
|
||||||
blank: true,
|
blank: true,
|
||||||
label: 'DAGGERHEART.ACTIONS.Settings.groupAttack.label'
|
label: 'DAGGERHEART.ACTIONS.Settings.groupAttack.label'
|
||||||
})
|
}),
|
||||||
|
type: new fields.SetField(
|
||||||
|
new fields.StringField({
|
||||||
|
choices: CONFIG.DH.GENERAL.damageTypes,
|
||||||
|
initial: 'physical',
|
||||||
|
nullable: false,
|
||||||
|
required: true
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
label: game.i18n.localize('DAGGERHEART.GENERAL.type')
|
||||||
|
}
|
||||||
|
)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{> damageData data=source.main fields=fields.main.fields basePath=(concat path "damage.main")}}
|
{{> damageData data=source.main fields=fields.main.fields basePath=(concat path "damage.main")}}
|
||||||
|
{{#if (ne @root.source.type 'healing')}}
|
||||||
|
{{formField fields.main.fields.type value=source.main.type name=(concat path "damage.main.type") localize=true}}
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
@ -33,8 +36,6 @@
|
||||||
{{localize "DAGGERHEART.GENERAL.Resource.plural"}}
|
{{localize "DAGGERHEART.GENERAL.Resource.plural"}}
|
||||||
{{#unless (eq path 'system.attack.')}}<a data-action="addDamageResource" {{#if @root.allDamageTypesUsed}}disabled{{/if}}><i class="fa-solid fa-plus icon-button"></i></a>{{/unless}}
|
{{#unless (eq path 'system.attack.')}}<a data-action="addDamageResource" {{#if @root.allDamageTypesUsed}}disabled{{/if}}><i class="fa-solid fa-plus icon-button"></i></a>{{/unless}}
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
{{!-- Handlebars uses Symbol.Iterator to produce index|key. This isn't compatible with our parts object, so we instead use applyTo, which is the same value --}}
|
|
||||||
{{#each source.resources as |dmg key|}}
|
{{#each source.resources as |dmg key|}}
|
||||||
<div class="nest-inputs">
|
<div class="nest-inputs">
|
||||||
<fieldset{{#if dmg.base}} disabled{{/if}} class="one-column{{#if ../path}} no-style{{/if}}">
|
<fieldset{{#if dmg.base}} disabled{{/if}} class="one-column{{#if ../path}} no-style{{/if}}">
|
||||||
|
|
@ -90,10 +91,6 @@
|
||||||
{{> formula fields=fields.value.fields type=fields.type dmg=data source=data.value basePath=basePath target="value" key=data.applyTo path=../path}}
|
{{> formula fields=fields.value.fields type=fields.type dmg=data source=data.value basePath=basePath target="value" key=data.applyTo path=../path}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if (ne @root.source.type 'healing')}}
|
|
||||||
{{formField fields.type value=data.type name=(concat basePath ".type") localize=true}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if ../horde}}
|
{{#if ../horde}}
|
||||||
<fieldset class="one-column">
|
<fieldset class="one-column">
|
||||||
<legend>{{localize "DAGGERHEART.ACTORS.Adversary.hordeDamage"}}</legend>
|
<legend>{{localize "DAGGERHEART.ACTORS.Adversary.hordeDamage"}}</legend>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue