mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Feature/683 damage dialog options (#735)
* Temp solution for specific weapon feature * Add Serrated & Self-Correcting * Remove comments
This commit is contained in:
parent
1c000c7cfe
commit
585601c134
18 changed files with 177 additions and 118 deletions
|
|
@ -56,12 +56,14 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
|
||||||
label,
|
label,
|
||||||
icon
|
icon
|
||||||
}));
|
}));
|
||||||
|
context.modifiers = this.config.modifiers;
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
static updateRollConfiguration(_event, _, formData) {
|
static updateRollConfiguration(_event, _, formData) {
|
||||||
const { ...rest } = foundry.utils.expandObject(formData.object);
|
const { ...rest } = foundry.utils.expandObject(formData.object);
|
||||||
foundry.utils.mergeObject(this.config.roll, rest.roll);
|
foundry.utils.mergeObject(this.config.roll, rest.roll);
|
||||||
|
foundry.utils.mergeObject(this.config.modifiers, rest.modifiers);
|
||||||
this.config.selectedRollMode = rest.selectedRollMode;
|
this.config.selectedRollMode = rest.selectedRollMode;
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
if (usable)
|
if (usable) {
|
||||||
options.unshift({
|
options.unshift({
|
||||||
name: 'DAGGERHEART.GENERAL.damage',
|
name: 'DAGGERHEART.GENERAL.damage',
|
||||||
icon: 'fa-solid fa-explosion',
|
icon: 'fa-solid fa-explosion',
|
||||||
|
|
@ -353,24 +353,11 @@ export default function DHApplicationMixin(Base) {
|
||||||
icon: 'fa-solid fa-burst',
|
icon: 'fa-solid fa-burst',
|
||||||
condition: target => {
|
condition: target => {
|
||||||
const doc = getDocFromElementSync(target);
|
const doc = getDocFromElementSync(target);
|
||||||
return doc?.system?.attack?.damage.parts.length || doc?.damage?.parts.length;
|
return doc && !(doc.type === 'domainCard' && doc.system.inVault);
|
||||||
},
|
},
|
||||||
callback: async (target, event) => {
|
callback: async (target, event) => (await getDocFromElement(target)).use(event)
|
||||||
const doc = await getDocFromElement(target),
|
|
||||||
action = doc?.system?.attack ?? doc;
|
|
||||||
return action && action.use(event, { byPassRoll: true });
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
options.unshift({
|
|
||||||
name: 'DAGGERHEART.APPLICATIONS.ContextMenu.useItem',
|
|
||||||
icon: 'fa-solid fa-burst',
|
|
||||||
condition: target => {
|
|
||||||
const doc = getDocFromElementSync(target);
|
|
||||||
return doc && !(doc.type === 'domainCard' && doc.system.inVault);
|
|
||||||
},
|
|
||||||
callback: async (target, event) => (await getDocFromElement(target)).use(event)
|
|
||||||
});
|
|
||||||
|
|
||||||
if (toChat)
|
if (toChat)
|
||||||
options.push({
|
options.push({
|
||||||
|
|
|
||||||
|
|
@ -1040,16 +1040,6 @@ export const weaponFeatures = {
|
||||||
key: 'system.evasion',
|
key: 'system.evasion',
|
||||||
mode: 2,
|
mode: 2,
|
||||||
value: '-1'
|
value: '-1'
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'system.bonuses.damage.primaryWeapon.extraDice',
|
|
||||||
mode: 2,
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'system.rules.weapon.dropLowestDamageDice',
|
|
||||||
mode: 5,
|
|
||||||
value: '1'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -1166,18 +1156,7 @@ export const weaponFeatures = {
|
||||||
name: 'DAGGERHEART.CONFIG.WeaponFeature.powerful.effects.powerful.name',
|
name: 'DAGGERHEART.CONFIG.WeaponFeature.powerful.effects.powerful.name',
|
||||||
description: 'DAGGERHEART.CONFIG.WeaponFeature.powerful.effects.powerful.description',
|
description: 'DAGGERHEART.CONFIG.WeaponFeature.powerful.effects.powerful.description',
|
||||||
img: 'icons/magic/control/buff-flight-wings-runes-red-yellow.webp',
|
img: 'icons/magic/control/buff-flight-wings-runes-red-yellow.webp',
|
||||||
changes: [
|
changes: []
|
||||||
{
|
|
||||||
key: 'system.bonuses.damage.primaryWeapon.extraDice',
|
|
||||||
mode: 2,
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'system.rules.weapon.dropLowestDamageDice',
|
|
||||||
mode: 5,
|
|
||||||
value: '1'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -1301,13 +1280,7 @@ export const weaponFeatures = {
|
||||||
name: 'DAGGERHEART.CONFIG.WeaponFeature.selfCorrecting.effects.selfCorrecting.name',
|
name: 'DAGGERHEART.CONFIG.WeaponFeature.selfCorrecting.effects.selfCorrecting.name',
|
||||||
description: 'DAGGERHEART.CONFIG.WeaponFeature.selfCorrecting.effects.selfCorrecting.description',
|
description: 'DAGGERHEART.CONFIG.WeaponFeature.selfCorrecting.effects.selfCorrecting.description',
|
||||||
img: 'icons/weapons/ammunition/arrow-broadhead-glowing-orange.webp',
|
img: 'icons/weapons/ammunition/arrow-broadhead-glowing-orange.webp',
|
||||||
changes: [
|
changes: []
|
||||||
{
|
|
||||||
key: 'system.rules.damage.flipMinDiceValue',
|
|
||||||
mode: 5,
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -1319,13 +1292,7 @@ export const weaponFeatures = {
|
||||||
name: 'DAGGERHEART.CONFIG.WeaponFeature.serrated.effects.serrated.name',
|
name: 'DAGGERHEART.CONFIG.WeaponFeature.serrated.effects.serrated.name',
|
||||||
description: 'DAGGERHEART.CONFIG.WeaponFeature.serrated.effects.serrated.description',
|
description: 'DAGGERHEART.CONFIG.WeaponFeature.serrated.effects.serrated.description',
|
||||||
img: 'icons/weapons/ammunition/arrow-broadhead-glowing-orange.webp',
|
img: 'icons/weapons/ammunition/arrow-broadhead-glowing-orange.webp',
|
||||||
changes: [
|
changes: []
|
||||||
{
|
|
||||||
key: 'system.rules.damage.flipMinDiceValue',
|
|
||||||
mode: 5,
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -287,18 +287,6 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
weapon: new fields.SchemaField({
|
|
||||||
/* Unimplemented
|
|
||||||
-> Should remove the lowest damage dice from weapon damage
|
|
||||||
-> Reflect this in the chat message somehow so players get feedback that their choice is helping them.
|
|
||||||
*/
|
|
||||||
dropLowestDamageDice: new fields.BooleanField({ initial: false }),
|
|
||||||
/* Unimplemented
|
|
||||||
-> Should flip any lowest possible dice rolls for weapon damage to highest
|
|
||||||
-> Reflect this in the chat message somehow so players get feedback that their choice is helping them.
|
|
||||||
*/
|
|
||||||
flipMinDiceValue: new fields.BooleanField({ intial: false })
|
|
||||||
}),
|
|
||||||
runeWard: new fields.BooleanField({ initial: false }),
|
runeWard: new fields.BooleanField({ initial: false }),
|
||||||
burden: new fields.SchemaField({
|
burden: new fields.SchemaField({
|
||||||
ignore: new fields.BooleanField()
|
ignore: new fields.BooleanField()
|
||||||
|
|
|
||||||
|
|
@ -102,14 +102,14 @@ export default class DamageRoll extends DHRoll {
|
||||||
}
|
}
|
||||||
|
|
||||||
constructFormula(config) {
|
constructFormula(config) {
|
||||||
this.options.roll.forEach(part => {
|
this.options.roll.forEach((part, index) => {
|
||||||
part.roll = new Roll(Roll.replaceFormulaData(part.formula, config.data));
|
part.roll = new Roll(Roll.replaceFormulaData(part.formula, config.data));
|
||||||
this.constructFormulaPart(config, part);
|
this.constructFormulaPart(config, part, index);
|
||||||
});
|
});
|
||||||
return this.options.roll;
|
return this.options.roll;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructFormulaPart(config, part) {
|
constructFormulaPart(config, part, index) {
|
||||||
part.roll.terms = Roll.parse(part.roll.formula, config.data);
|
part.roll.terms = Roll.parse(part.roll.formula, config.data);
|
||||||
|
|
||||||
if (part.applyTo === CONFIG.DH.GENERAL.healingTypes.hitPoints.id) {
|
if (part.applyTo === CONFIG.DH.GENERAL.healingTypes.hitPoints.id) {
|
||||||
|
|
@ -120,6 +120,15 @@ export default class DamageRoll extends DHRoll {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* To Remove When Reaction System */
|
||||||
|
if(index === 0 && part.applyTo === CONFIG.DH.GENERAL.healingTypes.hitPoints.id) {
|
||||||
|
for(const mod in config.modifiers) {
|
||||||
|
const modifier = config.modifiers[mod];
|
||||||
|
if(modifier.beforeCrit === true && (modifier.enabled || modifier.value))
|
||||||
|
modifier.callback(part);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (part.extraFormula) {
|
if (part.extraFormula) {
|
||||||
part.roll.terms.push(
|
part.roll.terms.push(
|
||||||
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
|
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
|
||||||
|
|
@ -132,6 +141,102 @@ export default class DamageRoll extends DHRoll {
|
||||||
criticalBonus = tmpRoll.total - this.constructor.calculateTotalModifiers(tmpRoll);
|
criticalBonus = tmpRoll.total - this.constructor.calculateTotalModifiers(tmpRoll);
|
||||||
part.roll.terms.push(...this.formatModifier(criticalBonus));
|
part.roll.terms.push(...this.formatModifier(criticalBonus));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* To Remove When Reaction System */
|
||||||
|
if(index === 0 && part.applyTo === CONFIG.DH.GENERAL.healingTypes.hitPoints.id) {
|
||||||
|
for(const mod in config.modifiers) {
|
||||||
|
const modifier = config.modifiers[mod];
|
||||||
|
if(!modifier.beforeCrit && (modifier.enabled || modifier.value))
|
||||||
|
modifier.callback(part);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (part.roll._formula = this.constructor.getFormula(part.roll.terms));
|
return (part.roll._formula = this.constructor.getFormula(part.roll.terms));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* To Remove When Reaction System */
|
||||||
|
static temporaryModifierBuilder(config) {
|
||||||
|
const mods = {};
|
||||||
|
if(config.data?.parent) {
|
||||||
|
if(config.data.parent.appliedEffects) {
|
||||||
|
// Bardic Rally
|
||||||
|
mods.rally = {
|
||||||
|
label: "DAGGERHEART.CLASS.Feature.rallyDice",
|
||||||
|
values: config.data?.parent?.appliedEffects.reduce((a, c) => {
|
||||||
|
const change = c.changes.find(ch => ch.key === 'system.bonuses.rally');
|
||||||
|
if (change) a.push({ value: c.id, label: change.value });
|
||||||
|
return a;
|
||||||
|
}, []),
|
||||||
|
value: null,
|
||||||
|
beforeCrit: true,
|
||||||
|
callback: (part) => {
|
||||||
|
const rallyFaces = config.modifiers.rally.values.find(r => r.value === config.modifiers.rally.value)?.label;
|
||||||
|
part.roll.terms.push(
|
||||||
|
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
|
||||||
|
...this.parse(`1${rallyFaces}`)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const item = config.data.parent.items?.get(config.source.item);
|
||||||
|
if(item) {
|
||||||
|
// Massive (Weapon Feature)
|
||||||
|
if(item.system.itemFeatures.find(f => f.value === "massive"))
|
||||||
|
mods.massive = {
|
||||||
|
label: CONFIG.DH.ITEM.weaponFeatures.massive.label,
|
||||||
|
enabled: true,
|
||||||
|
callback: (part) => {
|
||||||
|
part.roll.terms[0].modifiers.push(`kh${part.roll.terms[0].number}`);
|
||||||
|
part.roll.terms[0].number += 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Powerful (Weapon Feature)
|
||||||
|
if(item.system.itemFeatures.find(f => f.value === "powerful"))
|
||||||
|
mods.powerful = {
|
||||||
|
label: CONFIG.DH.ITEM.weaponFeatures.powerful.label,
|
||||||
|
enabled: true,
|
||||||
|
callback: (part) => {
|
||||||
|
part.roll.terms[0].modifiers.push(`kh${part.roll.terms[0].number}`);
|
||||||
|
part.roll.terms[0].number += 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Brutal (Weapon Feature)
|
||||||
|
if(item.system.itemFeatures.find(f => f.value === "brutal"))
|
||||||
|
mods.brutal = {
|
||||||
|
label: CONFIG.DH.ITEM.weaponFeatures.brutal.label,
|
||||||
|
enabled: true,
|
||||||
|
beforeCrit: true,
|
||||||
|
callback: (part) => {
|
||||||
|
part.roll.terms[0].modifiers.push(`x${part.roll.terms[0].faces}`);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Serrated (Weapon Feature)
|
||||||
|
if(item.system.itemFeatures.find(f => f.value === "serrated"))
|
||||||
|
mods.serrated = {
|
||||||
|
label: CONFIG.DH.ITEM.weaponFeatures.serrated.label,
|
||||||
|
enabled: true,
|
||||||
|
callback: (part) => {
|
||||||
|
part.roll.terms[0].modifiers.push(`sc8`);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Self-Correcting (Weapon Feature)
|
||||||
|
if(item.system.itemFeatures.find(f => f.value === "selfCorrecting"))
|
||||||
|
mods.selfCorrecting = {
|
||||||
|
label: CONFIG.DH.ITEM.weaponFeatures.selfCorrecting.label,
|
||||||
|
enabled: true,
|
||||||
|
callback: (part) => {
|
||||||
|
part.roll.terms[0].modifiers.push(`sc6`);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
config.modifiers = mods;
|
||||||
|
return mods;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ export default class DHRoll extends Roll {
|
||||||
|
|
||||||
this.applyKeybindings(config);
|
this.applyKeybindings(config);
|
||||||
|
|
||||||
|
this.temporaryModifierBuilder(config);
|
||||||
|
|
||||||
let roll = new this(config.roll.formula, config.data, config);
|
let roll = new this(config.roll.formula, config.data, config);
|
||||||
if (config.dialog.configure !== false) {
|
if (config.dialog.configure !== false) {
|
||||||
// Open Roll Dialog
|
// Open Roll Dialog
|
||||||
|
|
@ -207,6 +209,10 @@ export default class DHRoll extends Roll {
|
||||||
}
|
}
|
||||||
return modifierTotal;
|
return modifierTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static temporaryModifierBuilder(config) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const registerRollDiceHooks = () => {
|
export const registerRollDiceHooks = () => {
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ export default class DualityRoll extends D20Roll {
|
||||||
}
|
}
|
||||||
if (this.rallyFaces)
|
if (this.rallyFaces)
|
||||||
this.terms.push(
|
this.terms.push(
|
||||||
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
|
new foundry.dice.terms.OperatorTerm({ operator: this.hasDisadvantage ? '-' : '+' }),
|
||||||
new foundry.dice.terms.Die({ faces: this.rallyFaces })
|
new foundry.dice.terms.Die({ faces: this.rallyFaces })
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,26 @@ Roll.replaceFormulaData = function (formula, data = {}, { missing, warn = false
|
||||||
return nativeReplaceFormulaData(formula, data, { missing, warn });
|
return nativeReplaceFormulaData(formula, data, { missing, warn });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
foundry.dice.terms.Die.MODIFIERS.sc = "selfCorrecting";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the configured value as result if 1 is rolled
|
||||||
|
* Example: 6d6sc6 Roll 6d6, each result of 1 will be changed into 6
|
||||||
|
* @param {string} modifier The matched modifier query
|
||||||
|
*/
|
||||||
|
foundry.dice.terms.Die.prototype.selfCorrecting = function(modifier) {
|
||||||
|
const rgx = /(?:sc)([0-9]+)/i;
|
||||||
|
const match = modifier.match(rgx);
|
||||||
|
if ( !match ) return false;
|
||||||
|
let [target] = match.slice(1);
|
||||||
|
target = parseInt(target);
|
||||||
|
for ( const r of this.results ) {
|
||||||
|
if ( r.result === 1 ) {
|
||||||
|
r.result = target;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const getDamageKey = damage => {
|
export const getDamageKey = damage => {
|
||||||
return ['none', 'minor', 'major', 'severe'][damage];
|
return ['none', 'minor', 'major', 'severe'][damage];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
"value": {
|
"value": {
|
||||||
"dice": "d8",
|
"dice": "d10",
|
||||||
"bonus": 9,
|
"bonus": 9,
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
"flatMultiplier": 1,
|
"flatMultiplier": 1,
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,7 @@
|
||||||
"equipped": false,
|
"equipped": false,
|
||||||
"secondary": false,
|
"secondary": false,
|
||||||
"burden": "twoHanded",
|
"burden": "twoHanded",
|
||||||
"weaponFeatures": [
|
"weaponFeatures": [],
|
||||||
{
|
|
||||||
"value": "cumbersome",
|
|
||||||
"effectIds": [
|
|
||||||
"hl0S2LrBY5Mg69q6"
|
|
||||||
],
|
|
||||||
"actionIds": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Attack",
|
"name": "Attack",
|
||||||
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
||||||
|
|
@ -51,8 +43,8 @@
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
"value": {
|
"value": {
|
||||||
"dice": "d10",
|
"dice": "d8",
|
||||||
"bonus": 8,
|
"bonus": 9,
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
"flatMultiplier": 1,
|
"flatMultiplier": 1,
|
||||||
"custom": {
|
"custom": {
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
"value": {
|
"value": {
|
||||||
"dice": "d8",
|
"dice": "d10",
|
||||||
"bonus": 6,
|
"bonus": 6,
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
"flatMultiplier": 1,
|
"flatMultiplier": 1,
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,7 @@
|
||||||
"equipped": false,
|
"equipped": false,
|
||||||
"secondary": false,
|
"secondary": false,
|
||||||
"burden": "twoHanded",
|
"burden": "twoHanded",
|
||||||
"weaponFeatures": [
|
"weaponFeatures": [],
|
||||||
{
|
|
||||||
"value": "cumbersome",
|
|
||||||
"effectIds": [
|
|
||||||
"8twXPJELZpvFWA5K"
|
|
||||||
],
|
|
||||||
"actionIds": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Attack",
|
"name": "Attack",
|
||||||
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
||||||
|
|
@ -51,8 +43,8 @@
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
"value": {
|
"value": {
|
||||||
"dice": "d10",
|
"dice": "d8",
|
||||||
"bonus": 5,
|
"bonus": 6,
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
"flatMultiplier": 1,
|
"flatMultiplier": 1,
|
||||||
"custom": {
|
"custom": {
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
"value": {
|
"value": {
|
||||||
"dice": "d8",
|
"dice": "d10",
|
||||||
"bonus": 12,
|
"bonus": 12,
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
"flatMultiplier": 1,
|
"flatMultiplier": 1,
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,7 @@
|
||||||
"equipped": false,
|
"equipped": false,
|
||||||
"secondary": false,
|
"secondary": false,
|
||||||
"burden": "twoHanded",
|
"burden": "twoHanded",
|
||||||
"weaponFeatures": [
|
"weaponFeatures": [],
|
||||||
{
|
|
||||||
"value": "cumbersome",
|
|
||||||
"effectIds": [
|
|
||||||
"f44KWDgCQeKYfccr"
|
|
||||||
],
|
|
||||||
"actionIds": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Attack",
|
"name": "Attack",
|
||||||
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
||||||
|
|
@ -51,8 +43,8 @@
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
"value": {
|
"value": {
|
||||||
"dice": "d10",
|
"dice": "d8",
|
||||||
"bonus": 11,
|
"bonus": 12,
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
"flatMultiplier": 1,
|
"flatMultiplier": 1,
|
||||||
"custom": {
|
"custom": {
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
"value": {
|
"value": {
|
||||||
"dice": "d8",
|
"dice": "d10",
|
||||||
"bonus": 3,
|
"bonus": 3,
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
"flatMultiplier": 1,
|
"flatMultiplier": 1,
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,7 @@
|
||||||
"equipped": false,
|
"equipped": false,
|
||||||
"secondary": false,
|
"secondary": false,
|
||||||
"burden": "twoHanded",
|
"burden": "twoHanded",
|
||||||
"weaponFeatures": [
|
"weaponFeatures": [],
|
||||||
{
|
|
||||||
"value": "cumbersome",
|
|
||||||
"effectIds": [
|
|
||||||
"Z5MnVI8EOOgzRdXC"
|
|
||||||
],
|
|
||||||
"actionIds": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"attack": {
|
"attack": {
|
||||||
"name": "Attack",
|
"name": "Attack",
|
||||||
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
"img": "icons/skills/melee/blood-slash-foam-red.webp",
|
||||||
|
|
@ -51,8 +43,8 @@
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
"value": {
|
"value": {
|
||||||
"dice": "d10",
|
"dice": "d8",
|
||||||
"bonus": 2,
|
"bonus": 3,
|
||||||
"multiplier": "prof",
|
"multiplier": "prof",
|
||||||
"flatMultiplier": 1,
|
"flatMultiplier": 1,
|
||||||
"custom": {
|
"custom": {
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 17px;
|
line-height: 17px;
|
||||||
|
white-space: nowrap;
|
||||||
color: light-dark(@dark, @beige);
|
color: light-dark(@dark, @beige);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,22 @@
|
||||||
<input type="text" value="{{extraFormula}}" name="roll.{{ @index }}.extraFormula" placeholder="Situational Bonus">
|
<input type="text" value="{{extraFormula}}" name="roll.{{ @index }}.extraFormula" placeholder="Situational Bonus">
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
{{#if @root.modifiers}}
|
||||||
|
<fieldset class="modifier-container two-columns">
|
||||||
|
<legend>{{localize "DAGGERHEART.GENERAL.Modifier.plural"}}</legend>
|
||||||
|
{{#each @root.modifiers}}
|
||||||
|
<span class="formula-label">{{ localize label }}</span>
|
||||||
|
{{#if (hasProperty this "values")}}
|
||||||
|
<select name="modifiers.{{@key}}.value">
|
||||||
|
{{selectOptions values blank="" selected=value}}
|
||||||
|
</select>
|
||||||
|
{{/if}}
|
||||||
|
{{#if (hasProperty this "enabled")}}
|
||||||
|
<input type="checkbox" name="modifiers.{{@key}}.enabled" {{ checked enabled }}>
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
|
</fieldset>
|
||||||
|
{{/if}}
|
||||||
<div class="damage-section-controls">
|
<div class="damage-section-controls">
|
||||||
{{#if directDamage}}
|
{{#if directDamage}}
|
||||||
<select class="roll-mode-select" name="selectedRollMode">
|
<select class="roll-mode-select" name="selectedRollMode">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue