mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-09 14:18:10 +02:00
Compare commits
2 commits
607ee3b580
...
cfd9950aae
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfd9950aae | ||
|
|
702c9e0b6a |
14 changed files with 22 additions and 16 deletions
|
|
@ -712,6 +712,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"CONFIG": {
|
"CONFIG": {
|
||||||
|
"ActionAutomationChoices": {
|
||||||
|
"never": "Never",
|
||||||
|
"showDialog": "Show Dialog Only",
|
||||||
|
"always": "Always"
|
||||||
|
},
|
||||||
"AdversaryTrait": {
|
"AdversaryTrait": {
|
||||||
"relentless": {
|
"relentless": {
|
||||||
"name": "Relentless",
|
"name": "Relentless",
|
||||||
|
|
|
||||||
|
|
@ -188,8 +188,9 @@ export default class SettingFeatureConfig extends HandlebarsApplicationMixin(App
|
||||||
if (type === 'effect') {
|
if (type === 'effect') {
|
||||||
const move = foundry.utils.getProperty(this.settings, this.movePath);
|
const move = foundry.utils.getProperty(this.settings, this.movePath);
|
||||||
for (const action of move.actions) {
|
for (const action of move.actions) {
|
||||||
const remainingEffects = action.effects.filter(x => x._id !== id);
|
const actionEffects = action.effects ?? [];
|
||||||
if (action.effects.length !== remainingEffects.length) {
|
const remainingEffects = actionEffects.filter(x => x._id !== id);
|
||||||
|
if (actionEffects.length !== remainingEffects.length) {
|
||||||
await action.update({
|
await action.update({
|
||||||
effects: remainingEffects.map(x => {
|
effects: remainingEffects.map(x => {
|
||||||
const { _id, ...rest } = x;
|
const { _id, ...rest } = x;
|
||||||
|
|
|
||||||
|
|
@ -172,8 +172,8 @@ export const typeConfig = {
|
||||||
key: 'system.secondary',
|
key: 'system.secondary',
|
||||||
label: 'DAGGERHEART.UI.ItemBrowser.subtype',
|
label: 'DAGGERHEART.UI.ItemBrowser.subtype',
|
||||||
choices: [
|
choices: [
|
||||||
{ value: false, label: 'DAGGERHEART.ITEMS.Weapon.primaryWeapon' },
|
{ value: false, label: 'DAGGERHEART.ITEMS.Weapon.primaryWeapon.short' },
|
||||||
{ value: true, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon' }
|
{ value: true, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon.short' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -453,7 +453,7 @@ export const allArmorFeatures = () => {
|
||||||
const feature = homebrewFeatures[key];
|
const feature = homebrewFeatures[key];
|
||||||
const actions = feature.actions.map(action => ({
|
const actions = feature.actions.map(action => ({
|
||||||
...action,
|
...action,
|
||||||
effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)),
|
effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id))??[],
|
||||||
type: action.type
|
type: action.type
|
||||||
}));
|
}));
|
||||||
const actionEffects = actions.flatMap(a => a.effects);
|
const actionEffects = actions.flatMap(a => a.effects);
|
||||||
|
|
@ -1389,7 +1389,7 @@ export const allWeaponFeatures = () => {
|
||||||
|
|
||||||
const actions = feature.actions.map(action => ({
|
const actions = feature.actions.map(action => ({
|
||||||
...action,
|
...action,
|
||||||
effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)),
|
effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id))??[],
|
||||||
type: action.type
|
type: action.type
|
||||||
}));
|
}));
|
||||||
const actionEffects = actions.flatMap(a => a.effects);
|
const actionEffects = actions.flatMap(a => a.effects);
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ export default class DHWeapon extends AttachableItem {
|
||||||
equipped: new fields.BooleanField({ initial: false }),
|
equipped: new fields.BooleanField({ initial: false }),
|
||||||
|
|
||||||
//SETTINGS
|
//SETTINGS
|
||||||
secondary: new fields.BooleanField({ initial: false, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon' }),
|
secondary: new fields.BooleanField({ initial: false, label: 'DAGGERHEART.ITEMS.Weapon.secondaryWeapon.full' }),
|
||||||
burden: new fields.StringField({
|
burden: new fields.StringField({
|
||||||
required: true,
|
required: true,
|
||||||
choices: CONFIG.DH.GENERAL.burden,
|
choices: CONFIG.DH.GENERAL.burden,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<section class="creation-action-footer">
|
<section class="creation-action-footer">
|
||||||
<button data-action="close">{{localize "COMMON.Cancel"}}</button>
|
<button data-action="close">{{localize "Cancel"}}</button>
|
||||||
{{#if isLastTab}}
|
{{#if isLastTab}}
|
||||||
<button data-action="finish">{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.finishCreation"}}</button>
|
<button data-action="finish">{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.finishCreation"}}</button>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
<footer class="flexrow">
|
<footer class="flexrow">
|
||||||
<button data-action="close">
|
<button data-action="close">
|
||||||
<span>{{localize "COMMON.Cancel"}}</span>
|
<span>{{localize "Cancel"}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button data-action="takeMove" {{#if (not this.selectedMove)}}disabled{{/if}}>
|
<button data-action="takeMove" {{#if (not this.selectedMove)}}disabled{{/if}}>
|
||||||
<span>
|
<span>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<button type="button" data-action="close">{{localize "COMMON.Cancel"}}</button>
|
<button type="button" data-action="close">{{localize "Cancel"}}</button>
|
||||||
<button type="button" data-action="takeDowntime" {{#if disabledDowntime}}disabled{{/if}}>{{localize "DAGGERHEART.APPLICATIONS.Downtime.takeDowntime"}}</button>
|
<button type="button" data-action="takeDowntime" {{#if disabledDowntime}}disabled{{/if}}>{{localize "DAGGERHEART.APPLICATIONS.Downtime.takeDowntime"}}</button>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<button data-action="close">{{localize "COMMON.Cancel"}}</button>
|
<button data-action="close">{{localize "Cancel"}}</button>
|
||||||
<button type="button" data-action="finishSelection">{{localize "DAGGERHEART.APPLICATIONS.ImageSelect.selectImage"}}</button>
|
<button type="button" data-action="finishSelection">{{localize "DAGGERHEART.APPLICATIONS.ImageSelect.selectImage"}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<button data-action="close">{{localize "COMMON.Cancel"}}</button>
|
<button data-action="close">{{localize "Cancel"}}</button>
|
||||||
<button data-action="save" {{disabled multiclassDisabled}}>{{localize "DAGGERHEART.GENERAL.multiclass"}}</button>
|
<button data-action="save" {{disabled multiclassDisabled}}>{{localize "DAGGERHEART.GENERAL.multiclass"}}</button>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#unless levelupAuto}}
|
{{#unless levelupAuto}}
|
||||||
<div class="levelup-footer">
|
<div class="levelup-footer">
|
||||||
<button type="button" data-action="close">{{localize "COMMON.Cancel"}}</button>
|
<button type="button" data-action="close">{{localize "Cancel"}}</button>
|
||||||
<button type="button" data-action="save">{{localize "Save"}}</button>
|
<button type="button" data-action="save">{{localize "Save"}}</button>
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<section class='tab-form-footer spaced'>
|
<section class='tab-form-footer spaced'>
|
||||||
<button data-action="close">{{localize "COMMON.Cancel"}}</button>
|
<button data-action="close">{{localize "Cancel"}}</button>
|
||||||
<button data-action="saveForm"><i class="fa-solid fa-floppy-disk"></i> {{localize "Save"}}</button>
|
<button data-action="saveForm"><i class="fa-solid fa-floppy-disk"></i> {{localize "Save"}}</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<legend>{{localize tabs.settings.label}}</legend>
|
<legend>{{localize tabs.settings.label}}</legend>
|
||||||
<span>{{localize "DAGGERHEART.GENERAL.Tiers.singular"}}</span>
|
<span>{{localize "DAGGERHEART.GENERAL.Tiers.singular"}}</span>
|
||||||
{{formInput systemFields.tier value=source.system.tier}}
|
{{formInput systemFields.tier value=source.system.tier}}
|
||||||
<span>{{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon"}}</span>
|
<span>{{localize "DAGGERHEART.ITEMS.Weapon.secondaryWeapon.full"}}</span>
|
||||||
{{formInput systemFields.secondary value=source.system.secondary}}
|
{{formInput systemFields.secondary value=source.system.secondary}}
|
||||||
<span>{{localize "DAGGERHEART.GENERAL.Trait.single"}}</span>
|
<span>{{localize "DAGGERHEART.GENERAL.Trait.single"}}</span>
|
||||||
{{formInput systemFields.attack.fields.roll.fields.trait value=document.system.attack.roll.trait name="system.attack.roll.trait" label="DAGGERHEART.GENERAL.Trait.single" localize=true}}
|
{{formInput systemFields.attack.fields.roll.fields.trait value=document.system.attack.roll.trait name="system.attack.roll.trait" label="DAGGERHEART.GENERAL.Trait.single" localize=true}}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
|
|
||||||
{{#if (and combats.length user.isGM)}}
|
{{#if (and combats.length user.isGM)}}
|
||||||
<div class="encounter-battlepoints" data-tooltip="#battlepoints#" data-combat-id="{{combat.id}}">
|
<div class="encounter-battlepoints" data-tooltip="#battlepoints#" data-combat-id="{{combat.id}}">
|
||||||
{{battlepoints.current}}/{{battlepoints.max}} BP{{#if battlepoints.hasModifierBP}}*{{/if}}
|
{{battlepoints.current}}/{{battlepoints.max}} {{localize "DAGGERHEART.GENERAL.Battlepoints.short"}}{{#if battlepoints.hasModifierBP}}*{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue