mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Fixed adding a new damage instance to an action default to prof, which doesn't work for adversaries
This commit is contained in:
parent
e8ac3012ad
commit
0f1ac406df
3 changed files with 2 additions and 18 deletions
|
|
@ -21,7 +21,6 @@ export default class DHActionConfig extends DHActionBaseConfig {
|
||||||
|
|
||||||
static async addEffect(_event) {
|
static async addEffect(_event) {
|
||||||
if (!this.action.effects) return;
|
if (!this.action.effects) return;
|
||||||
const effectData = this._addEffectData.bind(this)();
|
|
||||||
const data = this.action.toObject();
|
const data = this.action.toObject();
|
||||||
|
|
||||||
const created = await this.action.item.createEmbeddedDocuments('ActiveEffect', [
|
const created = await this.action.item.createEmbeddedDocuments('ActiveEffect', [
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
|
||||||
return {
|
return {
|
||||||
multiplier: new fields.StringField({
|
multiplier: new fields.StringField({
|
||||||
choices: CONFIG.DH.GENERAL.multiplierTypes,
|
choices: CONFIG.DH.GENERAL.multiplierTypes,
|
||||||
initial: 'prof',
|
initial: 'flat',
|
||||||
label: 'DAGGERHEART.ACTIONS.Config.damage.multiplier',
|
label: 'DAGGERHEART.ACTIONS.Config.damage.multiplier',
|
||||||
nullable: false,
|
nullable: false,
|
||||||
required: true
|
required: true
|
||||||
|
|
@ -244,7 +244,7 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
|
||||||
}),
|
}),
|
||||||
dice: new fields.StringField({
|
dice: new fields.StringField({
|
||||||
choices: CONFIG.DH.GENERAL.diceTypes,
|
choices: CONFIG.DH.GENERAL.diceTypes,
|
||||||
initial: 'd6',
|
initial: CONFIG.DH.GENERAL.diceTypes.d6,
|
||||||
label: 'DAGGERHEART.GENERAL.Dice.single',
|
label: 'DAGGERHEART.GENERAL.Dice.single',
|
||||||
nullable: false,
|
nullable: false,
|
||||||
required: true
|
required: true
|
||||||
|
|
|
||||||
|
|
@ -4,21 +4,6 @@
|
||||||
<a><i class="fa-solid fa-plus icon-button" data-action="addEffect"></i></a>
|
<a><i class="fa-solid fa-plus icon-button" data-action="addEffect"></i></a>
|
||||||
</legend>
|
</legend>
|
||||||
<ul class="items-list">
|
<ul class="items-list">
|
||||||
{{!-- {{#each source as | effect index |}}
|
|
||||||
<div class="inventory-item" data-effect-id="{{effect._id}}" data-action="editEffect">
|
|
||||||
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
|
||||||
<img class="item-img" src="{{img}}">
|
|
||||||
<div class="item-label">
|
|
||||||
<span class="item-name">{{name}}</span>
|
|
||||||
</div>
|
|
||||||
{{/with}}
|
|
||||||
<input type="hidden" name="effects.{{index}}._id" value="{{effect._id}}">
|
|
||||||
{{#if @root.source.save.trait}}{{formInput ../fields.onSave value=effect.onSave name=(concat "effects." index ".onSave") dataset=(object tooltip=(localize "DAGGERHEART.UI.Tooltip.appliedEvenIfSuccessful") tooltipDirection="UP")}}{{/if}}
|
|
||||||
<div class="controls">
|
|
||||||
<a data-tooltip="{{localize "CONTROLS.CommonDelete"}}" data-action="removeEffect" data-index="{{index}}"><i class="fas fa-trash"></i></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/each}} --}}
|
|
||||||
{{#each source as | effect index |}}
|
{{#each source as | effect index |}}
|
||||||
<div class="inventory-item single-img" data-effect-id="{{effect._id}}" data-action="editEffect">
|
<div class="inventory-item single-img" data-effect-id="{{effect._id}}" data-action="editEffect">
|
||||||
<div class="inventory-item-header">
|
<div class="inventory-item-header">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue