mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 21:21:08 +01:00
164 - Add Hope/Fear formula
This commit is contained in:
parent
aacaf516b2
commit
8423ab6776
9 changed files with 125 additions and 57 deletions
|
|
@ -1519,6 +1519,11 @@
|
||||||
"Macro": {
|
"Macro": {
|
||||||
"Name": "Macro"
|
"Name": "Macro"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Settings": {
|
||||||
|
"ResultBased": {
|
||||||
|
"label": "Formula based on Hope/Fear result."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"RollTypes": {
|
"RollTypes": {
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,8 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
||||||
context.getRealIndex = this.getRealIndex.bind(this);
|
context.getRealIndex = this.getRealIndex.bind(this);
|
||||||
context.disableOption = this.disableOption.bind(this);
|
context.disableOption = this.disableOption.bind(this);
|
||||||
context.isNPC = this.action.actor && this.action.actor.type !== 'character';
|
context.isNPC = this.action.actor && this.action.actor.type !== 'character';
|
||||||
|
context.hasRoll = this.action.hasRoll();
|
||||||
|
console.log(context)
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,13 +42,12 @@ export default class CostSelectionDialog extends HandlebarsApplicationMixin(Appl
|
||||||
}
|
}
|
||||||
|
|
||||||
async _prepareContext(_options) {
|
async _prepareContext(_options) {
|
||||||
console.log(this.costs);
|
|
||||||
const updatedCosts = this.action.calcCosts(this.costs),
|
const updatedCosts = this.action.calcCosts(this.costs),
|
||||||
updatedUses = this.action.calcUses(this.uses);
|
updatedUses = this.action.calcUses(this.uses);
|
||||||
return {
|
return {
|
||||||
costs: updatedCosts,
|
costs: updatedCosts,
|
||||||
uses: updatedUses,
|
uses: updatedUses,
|
||||||
canUse: this.action.getRealCosts(updatedCosts)?.hasCost && this.action.hasUses(updatedUses)
|
canUse: this.action.hasCost(updatedCosts) && this.action.hasUses(updatedUses)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,6 @@ export class DHRoll extends Roll {
|
||||||
|
|
||||||
this.applyKeybindings(config);
|
this.applyKeybindings(config);
|
||||||
|
|
||||||
// let roll;
|
|
||||||
// if(config.dialog?.configure === false) {
|
|
||||||
// roll = new this('', config.actor, config);
|
|
||||||
// } else {
|
|
||||||
if (config.dialog.configure !== false) {
|
if (config.dialog.configure !== false) {
|
||||||
// Open Roll Dialog
|
// Open Roll Dialog
|
||||||
const DialogClass = config.dialog?.class ?? this.DefaultDialog;
|
const DialogClass = config.dialog?.class ?? this.DefaultDialog;
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,9 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
initial: SYSTEM.GENERAL.healingTypes.hitPoints.id,
|
initial: SYSTEM.GENERAL.healingTypes.hitPoints.id,
|
||||||
label: 'Healing'
|
label: 'Healing'
|
||||||
}),
|
}),
|
||||||
value: new fields.EmbeddedDataField(DHActionDiceData)
|
resultBased: new fields.BooleanField({ initial: false, label: "DAGGERHEART.Actions.Settings.ResultBased.label" }),
|
||||||
|
value: new fields.EmbeddedDataField(DHActionDiceData),
|
||||||
|
valueAlt: new fields.EmbeddedDataField(DHActionDiceData),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
extraSchemas = {};
|
extraSchemas = {};
|
||||||
|
|
@ -228,7 +230,8 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
...config,
|
...config,
|
||||||
...(await this.getCost(config))
|
...(await this.getCost(config))
|
||||||
};
|
};
|
||||||
if (!this.hasRoll() && (!config.costs.hasCost || !this.hasUses(config.uses)))
|
|
||||||
|
if ((!this.hasRoll() || config.event.shiftKey) && (!this.hasCost(config.costs) || !this.hasUses(config.uses)))
|
||||||
return ui.notifications.warn("You don't have the resources to use that action.");
|
return ui.notifications.warn("You don't have the resources to use that action.");
|
||||||
|
|
||||||
// Proceed with Roll
|
// Proceed with Roll
|
||||||
|
|
@ -245,7 +248,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
/* ROLL */
|
/* ROLL */
|
||||||
hasRoll() {
|
hasRoll() {
|
||||||
// return this.roll?.type && this.roll?.trait;
|
// return this.roll?.type && this.roll?.trait;
|
||||||
return this.roll?.type;
|
return !!this.roll?.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
async proceedRoll(config) {
|
async proceedRoll(config) {
|
||||||
|
|
@ -269,9 +272,9 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
|
|
||||||
/* COST */
|
/* COST */
|
||||||
async getCost(config) {
|
async getCost(config) {
|
||||||
let costs = this.cost?.length ? foundry.utils.deepClone(this.cost) : { values: [], hasCost: true };
|
let costs = this.cost?.length ? foundry.utils.deepClone(this.cost) : [];
|
||||||
let uses = this.getUses();
|
let uses = this.getUses();
|
||||||
if (!config.event.shiftKey && !this.hasRoll()) {
|
if (!config.event.shiftKey && !this.hasRoll() && !(!costs.length && !uses)) {
|
||||||
const dialogClosed = new Promise((resolve, _) => {
|
const dialogClosed = new Promise((resolve, _) => {
|
||||||
new CostSelectionDialog(costs, uses, this, resolve).render(true);
|
new CostSelectionDialog(costs, uses, this, resolve).render(true);
|
||||||
});
|
});
|
||||||
|
|
@ -282,7 +285,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
|
|
||||||
getRealCosts(costs) {
|
getRealCosts(costs) {
|
||||||
const realCosts = costs?.length ? costs.filter(c => c.enabled) : [];
|
const realCosts = costs?.length ? costs.filter(c => c.enabled) : [];
|
||||||
return { values: realCosts, hasCost: this.hasCost(realCosts) };
|
return realCosts;
|
||||||
}
|
}
|
||||||
|
|
||||||
calcCosts(costs) {
|
calcCosts(costs) {
|
||||||
|
|
@ -296,7 +299,8 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
hasCost(costs) {
|
hasCost(costs) {
|
||||||
return costs.reduce((a, c) => a && this.actor.system.resources[c.type]?.value >= (c.total ?? c.value), true);
|
const realCosts = this.getRealCosts(costs);
|
||||||
|
return realCosts.reduce((a, c) => a && this.actor.system.resources[c.type]?.value >= (c.total ?? c.value), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
async spendCost(config) {
|
async spendCost(config) {
|
||||||
|
|
@ -314,13 +318,14 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
getUses() {
|
getUses() {
|
||||||
if (!this.uses) return { hasUse: true };
|
if (!this.uses?.max) return null;
|
||||||
const uses = foundry.utils.deepClone(this.uses);
|
const uses = foundry.utils.deepClone(this.uses);
|
||||||
if (!uses.value) uses.value = 0;
|
if (!uses.value) uses.value = 0;
|
||||||
return uses;
|
return uses;
|
||||||
}
|
}
|
||||||
|
|
||||||
calcUses(uses) {
|
calcUses(uses) {
|
||||||
|
if(!uses) return null;
|
||||||
return {
|
return {
|
||||||
...uses,
|
...uses,
|
||||||
enabled: uses.hasOwnProperty('enabled') ? uses.enabled : true
|
enabled: uses.hasOwnProperty('enabled') ? uses.enabled : true
|
||||||
|
|
@ -328,7 +333,8 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
hasUses(uses) {
|
hasUses(uses) {
|
||||||
return !uses.enabled || uses.value + 1 <= uses.max;
|
if(!uses) return true;
|
||||||
|
return (uses.hasOwnProperty('enabled') && !uses.enabled) || uses.value + 1 <= uses.max;
|
||||||
}
|
}
|
||||||
/* USES */
|
/* USES */
|
||||||
|
|
||||||
|
|
@ -430,8 +436,14 @@ export class DHDamageAction extends DHBaseAction {
|
||||||
return await this.rollDamage(event, config);
|
return await this.rollDamage(event, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getFormulaValue(part, data) {
|
||||||
|
let formulaValue = part.value;
|
||||||
|
if(this.hasRoll() && part.resultBased && data.system.roll.result.duality === -1) return part.valueAlt;
|
||||||
|
return formulaValue;
|
||||||
|
}
|
||||||
|
|
||||||
async rollDamage(event, data) {
|
async rollDamage(event, data) {
|
||||||
let formula = this.damage.parts.map(p => p.getFormula(this.actor)).join(' + ');
|
let formula = this.damage.parts.map(p => this.getFormulaValue(p, data).getFormula(this.actor)).join(' + ');
|
||||||
|
|
||||||
if (!formula || formula == '') return;
|
if (!formula || formula == '') return;
|
||||||
let roll = { formula: formula, total: formula },
|
let roll = { formula: formula, total: formula },
|
||||||
|
|
@ -475,9 +487,11 @@ export class DHAttackAction extends DHDamageAction {
|
||||||
|
|
||||||
getParentDamage() {
|
getParentDamage() {
|
||||||
return {
|
return {
|
||||||
multiplier: 'proficiency',
|
value: {
|
||||||
dice: this.item?.system?.damage.value,
|
multiplier: 'proficiency',
|
||||||
bonus: this.item?.system?.damage.bonus ?? 0,
|
dice: this.item?.system?.damage.value,
|
||||||
|
bonus: this.item?.system?.damage.bonus ?? 0
|
||||||
|
},
|
||||||
type: this.item?.system?.damage.type,
|
type: this.item?.system?.damage.type,
|
||||||
base: true
|
base: true
|
||||||
};
|
};
|
||||||
|
|
@ -498,13 +512,20 @@ export class DHHealingAction extends DHBaseAction {
|
||||||
return await this.rollHealing(event, config);
|
return await this.rollHealing(event, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getFormulaValue(data) {
|
||||||
|
let formulaValue = this.healing.value;
|
||||||
|
if(this.hasRoll() && this.healing.resultBased && data.system.roll.result.duality === -1) return this.healing.valueAlt;
|
||||||
|
return formulaValue;
|
||||||
|
}
|
||||||
|
|
||||||
async rollHealing(event, data) {
|
async rollHealing(event, data) {
|
||||||
let formula = this.healing.value.getFormula(this.actor);
|
let formulaValue = this.getFormulaValue(data),
|
||||||
|
formula = formulaValue.getFormula(this.actor);
|
||||||
|
|
||||||
if (!formula || formula == '') return;
|
if (!formula || formula == '') return;
|
||||||
let roll = { formula: formula, total: formula },
|
let roll = { formula: formula, total: formula },
|
||||||
bonusDamage = [];
|
bonusDamage = [];
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
title: game.i18n.format('DAGGERHEART.Chat.HealingRoll.Title', {
|
title: game.i18n.format('DAGGERHEART.Chat.HealingRoll.Title', {
|
||||||
healing: game.i18n.localize(SYSTEM.GENERAL.healingTypes[this.healing.type].label)
|
healing: game.i18n.localize(SYSTEM.GENERAL.healingTypes[this.healing.type].label)
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,11 @@ export class DHDamageField extends fields.SchemaField {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DHDamageData extends DHActionDiceData {
|
export class DHDamageData extends foundry.abstract.DataModel {
|
||||||
/** @override */
|
/** @override */
|
||||||
static defineSchema() {
|
static defineSchema() {
|
||||||
return {
|
return {
|
||||||
...super.defineSchema(),
|
// ...super.defineSchema(),
|
||||||
base: new fields.BooleanField({ initial: false, readonly: true, label: 'Base' }),
|
base: new fields.BooleanField({ initial: false, readonly: true, label: 'Base' }),
|
||||||
type: new fields.StringField({
|
type: new fields.StringField({
|
||||||
choices: SYSTEM.GENERAL.damageTypes,
|
choices: SYSTEM.GENERAL.damageTypes,
|
||||||
|
|
@ -52,7 +52,10 @@ export class DHDamageData extends DHActionDiceData {
|
||||||
label: 'Type',
|
label: 'Type',
|
||||||
nullable: false,
|
nullable: false,
|
||||||
required: true
|
required: true
|
||||||
})
|
}),
|
||||||
|
resultBased: new fields.BooleanField({ initial: false, label: "DAGGERHEART.Actions.Settings.ResultBased.label" }),
|
||||||
|
value: new fields.EmbeddedDataField(DHActionDiceData),
|
||||||
|
valueAlt: new fields.EmbeddedDataField(DHActionDiceData),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
if (this.config.costs?.length) {
|
if (this.config.costs?.length) {
|
||||||
const updatedCosts = this.action.calcCosts(this.config.costs);
|
const updatedCosts = this.action.calcCosts(this.config.costs);
|
||||||
context.costs = updatedCosts;
|
context.costs = updatedCosts;
|
||||||
context.canRoll = this.action.getRealCosts(updatedCosts)?.hasCost;
|
context.canRoll = this.action.hasCost(updatedCosts);
|
||||||
}
|
}
|
||||||
if (this.config.uses?.max) {
|
if (this.config.uses?.max) {
|
||||||
context.uses = this.action.calcUses(this.config.uses);
|
context.uses = this.action.calcUses(this.config.uses);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
<div class="fas fa-plus icon-button" data-action="addDamage"></div>
|
<div class="fas fa-plus icon-button" data-action="addDamage"></div>
|
||||||
{{#if @root.hasBaseDamage}}
|
{{#if @root.hasBaseDamage}}
|
||||||
<div>
|
<div>
|
||||||
{{!-- <input type="checkbox" data-action="addBaseDamage"{{#if @root.hasBaseDamage}} checked{{/if}}> --}}
|
|
||||||
{{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" }}
|
{{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" }}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -16,7 +15,6 @@
|
||||||
{{#each source.parts as |dmg index|}}
|
{{#each source.parts as |dmg index|}}
|
||||||
{{#if @root.isNPC}}
|
{{#if @root.isNPC}}
|
||||||
{{formField ../fields.custom.fields.enabled value=dmg.custom.enabled name=(concat ../path "damage.parts." index ".custom.enabled")}}
|
{{formField ../fields.custom.fields.enabled value=dmg.custom.enabled name=(concat ../path "damage.parts." index ".custom.enabled")}}
|
||||||
{{!-- {{formField ../fields.multiplier value=dmg.multiplier name=(concat ../path "damage.parts." index ".multiplier") localize=true}} --}}
|
|
||||||
<input type="hidden" name="{{../path}}damage.parts.{{index}}.multiplier" value="{{dmg.multiplier}}">
|
<input type="hidden" name="{{../path}}damage.parts.{{index}}.multiplier" value="{{dmg.multiplier}}">
|
||||||
{{#if dmg.custom.enabled}}
|
{{#if dmg.custom.enabled}}
|
||||||
{{formField ../fields.custom.fields.formula value=dmg.custom.formula name=(concat ../path "damage.parts." index ".custom.formula") localize=true}}
|
{{formField ../fields.custom.fields.formula value=dmg.custom.formula name=(concat ../path "damage.parts." index ".custom.formula") localize=true}}
|
||||||
|
|
@ -30,26 +28,48 @@
|
||||||
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}}
|
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#with (@root.getRealIndex index) as | realIndex |}}
|
{{#with (@root.getRealIndex index) as | realIndex |}}
|
||||||
<fieldset{{#if dmg.base}} disabled{{/if}}>
|
<fieldset{{#if dmg.base}} disabled{{/if}}>
|
||||||
{{#unless dmg.base}}
|
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}}
|
||||||
{{formField ../../fields.custom.fields.enabled value=dmg.custom.enabled name=(concat "damage.parts." realIndex ".custom.enabled")}}
|
{{formField ../../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." realIndex ".resultBased") localize=true}}
|
||||||
{{/unless}}
|
{{/if}}
|
||||||
{{#if dmg.custom.enabled}}
|
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}}
|
||||||
{{formField ../../fields.custom.fields.formula value=dmg.custom.formula name=(concat "damage.parts." realIndex ".custom.formula") localize=true}}
|
<fieldset>
|
||||||
{{else}}
|
<legend>
|
||||||
<div class="multi-display">
|
<div>With Hope</div>
|
||||||
{{formField ../../fields.multiplier value=dmg.multiplier name=(concat "damage.parts." realIndex ".multiplier") localize=true}}
|
</legend>
|
||||||
{{#if (eq dmg.multiplier 'flat')}}{{formField ../../fields.flatMultiplier value=dmg.flatMultiplier name=(concat "damage.parts." realIndex ".flatMultiplier") }}{{/if}}
|
{{> formula fields=../../fields.value.fields type=../../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
||||||
{{formField ../../fields.dice value=dmg.dice name=(concat "damage.parts." realIndex ".dice")}}
|
</fieldset>
|
||||||
{{formField ../../fields.bonus value=dmg.bonus name=(concat "damage.parts." realIndex ".bonus") localize=true}}
|
<fieldset>
|
||||||
</div>
|
<legend>
|
||||||
{{/if}}
|
<div>With Fear</div>
|
||||||
{{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}}
|
</legend>
|
||||||
<input type="hidden" name="damage.parts.{{realIndex}}.base" value="{{dmg.base}}">
|
{{> formula fields=../../fields.valueAlt.fields type=../../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" realIndex=realIndex}}
|
||||||
{{#unless dmg.base}}<div class="fas fa-trash" data-action="removeDamage" data-index="{{realIndex}}"></div>{{/unless}}
|
</fieldset>
|
||||||
</fieldset>
|
{{else}}
|
||||||
|
{{> formula fields=../../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
||||||
|
{{/if}}
|
||||||
|
{{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}}
|
||||||
|
<input type="hidden" name="damage.parts.{{realIndex}}.base" value="{{dmg.base}}">
|
||||||
|
{{#unless dmg.base}}<div class="fas fa-trash" data-action="removeDamage" data-index="{{realIndex}}"></div>{{/unless}}
|
||||||
|
</fieldset>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
{{#*inline "formula"}}
|
||||||
|
{{#unless dmg.base}}
|
||||||
|
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "damage.parts." realIndex "." target ".custom.enabled")}}
|
||||||
|
{{/unless}}
|
||||||
|
{{#if source.custom.enabled}}
|
||||||
|
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat "damage.parts." realIndex "." target ".custom.formula") localize=true}}
|
||||||
|
{{else}}
|
||||||
|
<div class="multi-display">
|
||||||
|
{{formField fields.multiplier value=source.multiplier name=(concat "damage.parts." realIndex "." target ".multiplier") localize=true}}
|
||||||
|
{{#if (eq source.multiplier 'flat')}}{{formField fields.flatMultiplier value=source.flatMultiplier name=(concat "damage.parts." realIndex ".flatMultiplier") }}{{/if}}
|
||||||
|
{{formField fields.dice value=source.dice name=(concat "damage.parts." realIndex "." target ".dice")}}
|
||||||
|
{{formField fields.bonus value=source.bonus name=(concat "damage.parts." realIndex "." target ".bonus") localize=true}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{/inline}}
|
||||||
|
|
@ -6,16 +6,38 @@
|
||||||
<div class="action-category-data open">
|
<div class="action-category-data open">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{formField fields.type value=source.type name="healing.type" localize=true}}
|
{{formField fields.type value=source.type name="healing.type" localize=true}}
|
||||||
<div class="multi-display">
|
{{#if (and (not @root.isNPC) @root.hasRoll)}}
|
||||||
{{formField fields.value.fields.custom.fields.enabled value=source.value.custom.enabled name="healing.value.custom.enabled"}}
|
{{formField fields.resultBased value=source.resultBased name="healing.resultBased" localize=true}}
|
||||||
{{#if source.value.custom.enabled}}
|
{{/if}}
|
||||||
{{formField fields.value.fields.custom.fields.formula value=source.value.custom.formula name="healing.value.custom.formula" localize=true}}
|
{{#if (and (not @root.isNPC) @root.hasRoll source.resultBased)}}
|
||||||
{{else}}
|
<fieldset>
|
||||||
{{formField fields.value.fields.multiplier value=source.value.multiplier name="healing.value.multiplier" localize=true}}
|
<legend>
|
||||||
{{formField fields.value.fields.dice value=source.value.dice name="healing.value.dice"}}
|
<div>With Hope</div>
|
||||||
{{formField fields.value.fields.bonus value=source.value.bonus name="healing.value.bonus" localize=true}}
|
</legend>
|
||||||
{{/if}}
|
{{> formula fields=fields.value.fields source=source.value target="value"}}
|
||||||
</div>
|
</fieldset>
|
||||||
|
<fieldset>
|
||||||
|
<legend>
|
||||||
|
<div>With Fear</div>
|
||||||
|
</legend>
|
||||||
|
{{> formula fields=fields.valueAlt.fields source=source.valueAlt target="valueAlt"}}
|
||||||
|
</fieldset>
|
||||||
|
{{else}}
|
||||||
|
{{> formula fields=fields.value.fields source=source.value target="value"}}
|
||||||
|
{{/if}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
{{#*inline "formula"}}
|
||||||
|
<div class="multi-display">
|
||||||
|
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "healing." target ".custom.enabled")}}
|
||||||
|
{{#if source.custom.enabled}}
|
||||||
|
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat "healing." target ".custom.formula") localize=true}}
|
||||||
|
{{else}}
|
||||||
|
{{formField fields.multiplier value=source.multiplier name=(concat "healing." target ".multiplier") localize=true}}
|
||||||
|
{{formField fields.dice value=source.dice name=(concat "healing." target ".dice")}}
|
||||||
|
{{formField fields.bonus value=source.bonus name=(concat "healing." target ".bonus") localize=true}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/inline}}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue