Merged with v14-Dev

This commit is contained in:
WBHarry 2026-03-25 16:38:44 +01:00
commit 956b168122
105 changed files with 984 additions and 832 deletions

View file

@ -156,7 +156,8 @@
}, },
"conditional": { "conditional": {
"title": "Conditional Application" "title": "Conditional Application"
} },
"stacking": { "title": "Stacking" }
}, },
"RangeDependance": { "RangeDependance": {
"hint": "Settings for an optional distance at which this effect should activate", "hint": "Settings for an optional distance at which this effect should activate",
@ -2541,8 +2542,7 @@
"featuresLabel": "Community Feature" "featuresLabel": "Community Feature"
}, },
"Consumable": { "Consumable": {
"consumeOnUse": "Consume On Use", "consumeOnUse": "Consume On Use"
"destroyOnEmpty": "Destroy On Empty"
}, },
"DomainCard": { "DomainCard": {
"type": "Type", "type": "Type",
@ -3008,6 +3008,8 @@
}, },
"EffectsDisplay": { "EffectsDisplay": {
"removeThing": "[Right Click] Remove {thing}", "removeThing": "[Right Click] Remove {thing}",
"increaseStacks": "[Left Click] Increment Stacks",
"decreaseStacks": "[Right Click] Decrement Stacks",
"appliedBy": "Applied By: {by}" "appliedBy": "Applied By: {by}"
}, },
"ItemBrowser": { "ItemBrowser": {

View file

@ -70,8 +70,8 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
context.rollConfig = this.config; context.rollConfig = this.config;
context.hasRoll = !!this.config.roll; context.hasRoll = !!this.config.roll;
context.canRoll = true; context.canRoll = true;
context.selectedRollMode = this.config.selectedRollMode ?? game.settings.get('core', 'rollMode'); context.selectedMessageMode = this.config.selectedMessageMode ?? game.settings.get('core', 'messageMode');
context.rollModes = Object.entries(CONFIG.Dice.rollModes).map(([action, { label, icon }]) => ({ context.rollModes = Object.entries(CONFIG.ChatMessage.modes).map(([action, { label, icon }]) => ({
action, action,
label, label,
icon icon
@ -142,10 +142,10 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
})); }));
} }
static updateRollConfiguration(event, _, formData) { static updateRollConfiguration(_event, _, formData) {
const { ...rest } = foundry.utils.expandObject(formData.object); const { ...rest } = foundry.utils.expandObject(formData.object);
this.config.selectedRollMode = rest.selectedRollMode; this.config.selectedMessageMode = rest.selectedMessageMode;
if (this.config.costs) { if (this.config.costs) {
this.config.costs = foundry.utils.mergeObject(this.config.costs, rest.costs); this.config.costs = foundry.utils.mergeObject(this.config.costs, rest.costs);

View file

@ -52,8 +52,8 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
context.formula = this.roll.constructFormula(this.config); context.formula = this.roll.constructFormula(this.config);
context.hasHealing = this.config.hasHealing; context.hasHealing = this.config.hasHealing;
context.directDamage = this.config.directDamage; context.directDamage = this.config.directDamage;
context.selectedRollMode = this.config.selectedRollMode; context.selectedMessageMode = this.config.selectedMessageMode;
context.rollModes = Object.entries(CONFIG.Dice.rollModes).map(([action, { label, icon }]) => ({ context.rollModes = Object.entries(CONFIG.ChatMessage.modes).map(([action, { label, icon }]) => ({
action, action,
label, label,
icon icon
@ -69,7 +69,7 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
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); foundry.utils.mergeObject(this.config.modifiers, rest.modifiers);
this.config.selectedRollMode = rest.selectedRollMode; this.config.selectedMessageMode = rest.selectedMessageMode;
this.render(); this.render();
} }

View file

@ -58,6 +58,10 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
id: 'initialization', id: 'initialization',
template: 'systems/daggerheart/templates/dialogs/tagTeamDialog/initialization.hbs' template: 'systems/daggerheart/templates/dialogs/tagTeamDialog/initialization.hbs'
}, },
rollSelection: {
id: 'rollSelection',
template: 'systems/daggerheart/templates/dialogs/tagTeamDialog/rollSelection.hbs'
},
tagTeamRoll: { tagTeamRoll: {
id: 'tagTeamRoll', id: 'tagTeamRoll',
template: 'systems/daggerheart/templates/dialogs/tagTeamDialog/tagTeamRoll.hbs' template: 'systems/daggerheart/templates/dialogs/tagTeamDialog/tagTeamRoll.hbs'
@ -78,15 +82,52 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
element.addEventListener('change', this.updateRollType.bind(this)); element.addEventListener('change', this.updateRollType.bind(this));
} }
_configureRenderParts(options) {
const { initialization, rollSelection, tagTeamRoll } = super._configureRenderParts(options);
const augmentedParts = { initialization };
for (const memberKey of Object.keys(this.party.system.tagTeam.members)) {
augmentedParts[memberKey] = {
id: memberKey,
template: 'systems/daggerheart/templates/dialogs/tagTeamDialog/tagTeamMember.hbs'
};
}
augmentedParts.rollSelection = rollSelection;
augmentedParts.tagTeamRoll = tagTeamRoll;
return augmentedParts;
}
/**@inheritdoc */
async _onRender(context, options) {
await super._onRender(context, options);
if (this.element.querySelector('.team-container')) return;
const initializationPart = this.element.querySelector('.initialization-container');
initializationPart.insertAdjacentHTML('afterend', '<div class="team-container"></div>');
const teamContainer = this.element.querySelector('.team-container');
for (const memberContainer of this.element.querySelectorAll('.team-member-container'))
teamContainer.appendChild(memberContainer);
}
async _prepareContext(_options) { async _prepareContext(_options) {
const context = await super._prepareContext(_options); const context = await super._prepareContext(_options);
context.isEditable = this.getIsEditable(); context.isEditable = this.getIsEditable();
context.fields = this.party.system.schema.fields.tagTeam.fields;
context.data = this.party.system.tagTeam;
context.rollTypes = CONFIG.DH.GENERAL.tagTeamRollTypes;
context.traitOptions = CONFIG.DH.ACTOR.abilities;
context.members = {};
context.allHaveRolled = Object.keys(this.party.system.tagTeam.members).every(key => {
const data = this.party.system.tagTeam.members[key];
return Boolean(data.rollData);
});
return context; return context;
} }
async _preparePartContext(partId, context, options) { async _preparePartContext(partId, context, options) {
const partContext = await super._preparePartContext(partId, context, options); const partContext = await super._preparePartContext(partId, context, options);
partContext.partId = partId;
switch (partId) { switch (partId) {
case 'initialization': case 'initialization':
partContext.tagTeamFields = this.party.system.schema.fields.tagTeam.fields; partContext.tagTeamFields = this.party.system.schema.fields.tagTeam.fields;
@ -100,66 +141,20 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
partContext.initiatorDisabled = !selectedMembers.length; partContext.initiatorDisabled = !selectedMembers.length;
partContext.openForAllPlayers = this.openForAllPlayers; partContext.openForAllPlayers = this.openForAllPlayers;
break;
case 'rollSelection':
partContext.members = Object.keys(this.party.system.tagTeam.members).reduce((acc, key) => {
const member = this.party.system.tagTeam.members[key];
acc[key] = { selected: member.selected };
return acc;
}, {});
break; break;
case 'tagTeamRoll': case 'tagTeamRoll':
partContext.fields = this.party.system.schema.fields.tagTeam.fields;
partContext.data = this.party.system.tagTeam;
partContext.rollTypes = CONFIG.DH.GENERAL.tagTeamRollTypes;
partContext.traitOptions = CONFIG.DH.ACTOR.abilities;
const selectedRoll = Object.values(this.party.system.tagTeam.members).find(member => member.selected); const selectedRoll = Object.values(this.party.system.tagTeam.members).find(member => member.selected);
const critSelected = !selectedRoll const critSelected = !selectedRoll
? undefined ? undefined
: (selectedRoll?.rollData?.options?.roll?.isCritical ?? false); : (selectedRoll?.rollData?.options?.roll?.isCritical ?? false);
partContext.members = {};
for (const actorId in this.party.system.tagTeam.members) {
const data = this.party.system.tagTeam.members[actorId];
const actor = game.actors.get(actorId);
const rollOptions = [];
const damageRollOptions = [];
for (const item of actor.items) {
if (item.system.metadata.hasActions) {
const actions = [
...item.system.actions,
...(item.system.attack ? [item.system.attack] : [])
];
for (const action of actions) {
if (action.hasRoll) {
const actionItem = {
value: action.uuid,
label: action.name,
group: item.name,
baseAction: action.baseAction
};
if (action.hasDamage) damageRollOptions.push(actionItem);
else rollOptions.push(actionItem);
}
}
}
}
const damage = data.rollData?.options?.damage;
partContext.hasDamage |= Boolean(damage);
const critHitPointsDamage = await this.getCriticalDamage(damage);
partContext.members[actorId] = {
...data,
isEditable: actor.testUserPermission(game.user, CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER),
key: actorId,
readyToRoll: Boolean(data.rollChoice),
hasRolled: Boolean(data.rollData),
rollOptions,
damageRollOptions,
damage: damage,
critDamage: critHitPointsDamage,
useCritDamage:
critSelected || (critSelected === undefined && data.rollData?.options?.roll?.isCritical)
};
}
partContext.hintText = await this.getInfoTexts(this.party.system.tagTeam.members); partContext.hintText = await this.getInfoTexts(this.party.system.tagTeam.members);
partContext.joinedRoll = await this.getJoinedRoll({ partContext.joinedRoll = await this.getJoinedRoll({
overrideIsCritical: critSelected, overrideIsCritical: critSelected,
@ -169,24 +164,85 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
break; break;
} }
if (Object.keys(this.party.system.tagTeam.members).includes(partId)) {
const data = this.party.system.tagTeam.members[partId];
const actor = game.actors.get(partId);
const rollOptions = [];
const damageRollOptions = [];
for (const item of actor.items) {
if (item.system.metadata.hasActions) {
const actions = [...item.system.actions, ...(item.system.attack ? [item.system.attack] : [])];
for (const action of actions) {
if (action.hasRoll) {
const actionItem = {
value: action.uuid,
label: action.name,
group: item.name,
baseAction: action.baseAction
};
if (action.hasDamage) damageRollOptions.push(actionItem);
else rollOptions.push(actionItem);
}
}
}
}
const selectedRoll = Object.values(this.party.system.tagTeam.members).find(member => member.selected);
const critSelected = !selectedRoll
? undefined
: (selectedRoll?.rollData?.options?.roll?.isCritical ?? false);
const damage = data.rollData?.options?.damage;
partContext.hasDamage |= Boolean(damage);
const critHitPointsDamage = await this.getCriticalDamage(damage);
partContext.members[partId] = {
...data,
isEditable: actor.testUserPermission(game.user, CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER),
key: partId,
readyToRoll: Boolean(data.rollChoice),
hasRolled: Boolean(data.rollData),
rollOptions,
damageRollOptions,
damage: damage,
critDamage: critHitPointsDamage,
useCritDamage: critSelected || (critSelected === undefined && data.rollData?.options?.roll?.isCritical)
};
}
return partContext; return partContext;
} }
static async updateData(_event, _, formData) { getUpdatingParts(target) {
const { initialization, rollSelection, tagTeamRoll } = this.constructor.PARTS;
const isInitialization = this.tabGroups.application === initialization.id;
const updatingMember = target.closest('.team-member-container')?.dataset?.memberKey;
return [
...(isInitialization ? [initialization.id] : []),
...(updatingMember ? [updatingMember] : []),
...(!isInitialization ? [rollSelection.id] : []),
...(!isInitialization ? [tagTeamRoll.id] : [])
];
}
static async updateData(event, _, formData) {
const { initiator, openForAllPlayers, ...partyData } = foundry.utils.expandObject(formData.object); const { initiator, openForAllPlayers, ...partyData } = foundry.utils.expandObject(formData.object);
this.initiator = initiator; this.initiator = initiator;
this.openForAllPlayers = openForAllPlayers !== undefined ? openForAllPlayers : this.openForAllPlayers; this.openForAllPlayers = openForAllPlayers !== undefined ? openForAllPlayers : this.openForAllPlayers;
this.updatePartyData(partyData); this.updatePartyData(partyData, this.getUpdatingParts(event.target));
} }
async updatePartyData(update, options = { render: true }) { async updatePartyData(update, updatingParts, options = { render: true }) {
const gmUpdate = async update => { const gmUpdate = async update => {
await this.party.update(update); await this.party.update(update);
this.render(); this.render({ parts: updatingParts });
game.socket.emit(`system.${CONFIG.DH.id}`, { game.socket.emit(`system.${CONFIG.DH.id}`, {
action: socketEvent.Refresh, action: socketEvent.Refresh,
data: { refreshType: RefreshType.TagTeamRoll, action: 'refresh' } data: { refreshType: RefreshType.TagTeamRoll, action: 'refresh', parts: updatingParts }
}); });
}; };
@ -195,7 +251,9 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
gmUpdate, gmUpdate,
update, update,
this.party.uuid, this.party.uuid,
options.render ? { refreshType: RefreshType.TagTeamRoll, action: 'refresh' } : undefined options.render
? { refreshType: RefreshType.TagTeamRoll, action: 'refresh', parts: updatingParts }
: undefined
); );
} }
@ -206,7 +264,7 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
}); });
} }
tagTeamRefresh = ({ refreshType, action }) => { tagTeamRefresh = ({ refreshType, action, parts }) => {
if (refreshType !== RefreshType.TagTeamRoll) return; if (refreshType !== RefreshType.TagTeamRoll) return;
switch (action) { switch (action) {
@ -214,7 +272,7 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
this.tabGroups.application = 'tagTeamRoll'; this.tabGroups.application = 'tagTeamRoll';
break; break;
case 'refresh': case 'refresh':
this.render(); this.render({ parts });
break; break;
case 'close': case 'close':
this.close(); this.close();
@ -304,22 +362,28 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
} }
async updateRollType(event) { async updateRollType(event) {
this.updatePartyData({ this.updatePartyData(
[`system.tagTeam.members.${event.target.dataset.member}`]: { {
rollType: event.target.value, [`system.tagTeam.members.${event.target.dataset.member}`]: {
rollChoice: null rollType: event.target.value,
} rollChoice: null
}); }
},
this.getUpdatingParts(event.target)
);
} }
static async #removeRoll(_, button) { static async #removeRoll(_, button) {
this.updatePartyData({ this.updatePartyData(
[`system.tagTeam.members.${button.dataset.member}`]: { {
rollData: null, [`system.tagTeam.members.${button.dataset.member}`]: {
rollChoice: null, rollData: null,
selected: false rollChoice: null,
} selected: false
}); }
},
this.getUpdatingParts(button)
);
} }
static async #makeRoll(event, button) { static async #makeRoll(event, button) {
@ -342,9 +406,12 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
const rollData = result.messageRoll.toJSON(); const rollData = result.messageRoll.toJSON();
delete rollData.options.messageRoll; delete rollData.options.messageRoll;
this.updatePartyData({ this.updatePartyData(
[`system.tagTeam.members.${member}.rollData`]: rollData {
}); [`system.tagTeam.members.${member}.rollData`]: rollData
},
this.getUpdatingParts(button)
);
} }
async makeTraitRoll(memberKey) { async makeTraitRoll(memberKey) {
@ -389,15 +456,18 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
diceType diceType
); );
const rollData = parsedRoll.toJSON(); const rollData = parsedRoll.toJSON();
this.updatePartyData({ this.updatePartyData(
[`system.tagTeam.members.${member}.rollData`]: { {
...rollData, [`system.tagTeam.members.${member}.rollData`]: {
options: { ...rollData,
...rollData.options, options: {
roll: newRoll ...rollData.options,
roll: newRoll
}
} }
} },
}); this.getUpdatingParts(button)
);
} }
static async #makeDamageRoll(event, button) { static async #makeDamageRoll(event, button) {
@ -423,29 +493,35 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
if (!config.damage) return; if (!config.damage) return;
const current = this.party.system.tagTeam.members[memberKey].rollData; const current = this.party.system.tagTeam.members[memberKey].rollData;
await this.updatePartyData({ await this.updatePartyData(
[`system.tagTeam.members.${memberKey}.rollData`]: { {
...current, [`system.tagTeam.members.${memberKey}.rollData`]: {
options: { ...current,
...current.options, options: {
damage: config.damage ...current.options,
damage: config.damage
}
} }
} },
}); this.getUpdatingParts(button)
);
} }
static async #removeDamageRoll(_, button) { static async #removeDamageRoll(_, button) {
const { memberKey } = button.dataset; const { memberKey } = button.dataset;
const current = this.party.system.tagTeam.members[memberKey].rollData; const current = this.party.system.tagTeam.members[memberKey].rollData;
this.updatePartyData({ this.updatePartyData(
[`system.tagTeam.members.${memberKey}.rollData`]: { {
...current, [`system.tagTeam.members.${memberKey}.rollData`]: {
options: { ...current,
...current.options, options: {
damage: null ...current.options,
damage: null
}
} }
} },
}); this.getUpdatingParts(button)
);
} }
static async #rerollDamageDice(_, button) { static async #rerollDamageDice(_, button) {
@ -476,9 +552,12 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
return acc; return acc;
}, 0); }, 0);
this.updatePartyData({ this.updatePartyData(
[`system.tagTeam.members.${memberKey}.rollData`]: rollData {
}); [`system.tagTeam.members.${memberKey}.rollData`]: rollData
},
this.getUpdatingParts(button)
);
} }
async getCriticalDamage(damage) { async getCriticalDamage(damage) {
@ -529,15 +608,18 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
static async #selectRoll(_, button) { static async #selectRoll(_, button) {
const { memberKey } = button.dataset; const { memberKey } = button.dataset;
this.updatePartyData({ this.updatePartyData(
[`system.tagTeam.members`]: Object.entries(this.party.system.tagTeam.members).reduce( {
(acc, [key, member]) => { [`system.tagTeam.members`]: Object.entries(this.party.system.tagTeam.members).reduce(
acc[key] = { selected: key === memberKey ? !member.selected : false }; (acc, [key, member]) => {
return acc; acc[key] = { selected: key === memberKey ? !member.selected : false };
}, return acc;
{} },
) {}
}); )
},
this.getUpdatingParts(button)
);
} }
async getJoinedRoll({ overrideIsCritical, displayVersion } = {}) { async getJoinedRoll({ overrideIsCritical, displayVersion } = {}) {
@ -602,6 +684,7 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
members: _replace({}) members: _replace({})
} }
}, },
[],
{ render: false } { render: false }
); );

View file

@ -154,8 +154,13 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2)
context.openSection = this.openSection; context.openSection = this.openSection;
context.tabs = this._getTabs(this.constructor.TABS); context.tabs = this._getTabs(this.constructor.TABS);
context.config = CONFIG.DH; context.config = CONFIG.DH;
if (this.action.damage?.hasOwnProperty('includeBase') && this.action.type === 'attack') if (this.action.hasDamage) {
context.hasBaseDamage = !!this.action.parent.attack; context.allDamageTypesUsed = !getUnusedDamageTypes(this.action.damage.parts).length;
if (this.action.damage.hasOwnProperty('includeBase') && this.action.type === 'attack')
context.hasBaseDamage = !!this.action.parent.attack;
}
context.costOptions = this.getCostOptions(); context.costOptions = this.getCostOptions();
context.getRollTypeOptions = this.getRollTypeOptions(); context.getRollTypeOptions = this.getRollTypeOptions();
context.disableOption = this.disableOption.bind(this); context.disableOption = this.disableOption.bind(this);
@ -173,7 +178,6 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2)
revealed: this.openTrigger === index revealed: this.openTrigger === index
}; };
}); });
context.allDamageTypesUsed = !getUnusedDamageTypes(this.action.damage.parts).length;
const settingsTiers = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LevelTiers).tiers; const settingsTiers = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LevelTiers).tiers;
context.tierOptions = [ context.tierOptions = [
@ -312,8 +316,11 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2)
const callback = (_, button) => { const callback = (_, button) => {
const data = this.action.toObject(); const data = this.action.toObject();
const type = choices[button.form.elements.type.value].value; const type = choices[button.form.elements.type.value].value;
const part = { applyTo: type }; const part = this.action.schema.fields.damage.fields.parts.element.getInitialValue();
if (this.action.actor?.isNPC) part.value = { multiplier: 'flat' }; part.applyTo = type;
if (type === CONFIG.DH.GENERAL.healingTypes.hitPoints.id)
part.type = this.action.schema.fields.damage.fields.parts.element.fields.type.element.initial;
data.damage.parts[type] = part; data.damage.parts[type] = part;
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
}; };

View file

@ -24,15 +24,13 @@ export default class DHActionConfig extends DHActionBaseConfig {
const effectData = this._addEffectData.bind(this)(); const effectData = this._addEffectData.bind(this)();
const data = this.action.toObject(); const data = this.action.toObject();
const created = await game.system.api.documents.DhActiveEffect.createDialog(effectData, { const created = await this.action.item.createEmbeddedDocuments('ActiveEffect', [
parent: this.action.item, game.system.api.data.activeEffects.BaseEffect.getDefaultObject()
render: false ]);
});
if (!created) return;
data.effects.push({ _id: created._id }); data.effects.push({ _id: created[0]._id });
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
this.action.item.effects.get(created._id).sheet.render(true); this.action.item.effects.get(created[0]._id).sheet.render(true);
} }
/** /**

View file

@ -172,6 +172,10 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
}); });
}); });
htmlElement
.querySelector('.stacking-change-checkbox')
?.addEventListener('change', this.stackingChangeToggle.bind(this));
htmlElement htmlElement
.querySelector('.armor-change-checkbox') .querySelector('.armor-change-checkbox')
?.addEventListener('change', this.armorChangeToggle.bind(this)); ?.addEventListener('change', this.armorChangeToggle.bind(this));
@ -244,6 +248,16 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
return partContext; return partContext;
} }
stackingChangeToggle(event) {
const stackingFields = this.document.system.schema.fields.stacking.fields;
const systemData = {
stacking: event.target.checked
? { value: stackingFields.value.initial, max: stackingFields.max.initial }
: null
};
return this.submit({ updateData: { system: systemData } });
}
armorChangeToggle(event) { armorChangeToggle(event) {
if (event.target.checked) { if (event.target.checked) {
this.addArmorChange(); this.addArmorChange();

View file

@ -49,11 +49,9 @@ export default class DhEffectsDisplay extends HandlebarsApplicationMixin(Applica
_attachPartListeners(partId, htmlElement, options) { _attachPartListeners(partId, htmlElement, options) {
super._attachPartListeners(partId, htmlElement, options); super._attachPartListeners(partId, htmlElement, options);
for (const element of this.element?.querySelectorAll('.effect-container a') ?? []) {
if (this.element) { element.addEventListener('click', e => this.#onClickEffect(e));
this.element.querySelectorAll('.effect-container a').forEach(element => { element.addEventListener('contextmenu', e => this.#onClickEffect(e, -1));
element.addEventListener('contextmenu', this.removeEffect.bind(this));
});
} }
} }
@ -87,11 +85,21 @@ export default class DhEffectsDisplay extends HandlebarsApplicationMixin(Applica
this.render(); this.render();
} }
async removeEffect(event) { async #onClickEffect(event, delta = 1) {
const element = event.target.closest('.effect-container'); const element = event.target.closest('.effect-container');
const effects = DhEffectsDisplay.getTokenEffects(); const effects = DhEffectsDisplay.getTokenEffects();
const effect = effects.find(x => x.id === element.dataset.effectId); const effect = effects.find(x => x.id === element.dataset.effectId);
await effect.delete(); if (!effect || (delta >= 0 && !effect.system.stacking)) {
return;
}
const maxValue = effect.system.stacking?.max ?? Infinity;
const newValue = Math.clamp((effect.system.stacking?.value ?? 1) + delta, 0, maxValue);
if (newValue > 0) {
await effect.update({ 'system.stacking.value': newValue });
} else {
await effect.delete();
}
this.render(); this.render();
} }

View file

@ -1,56 +1,3 @@
/**
* @typedef ContextMenuEntry
* @property {string} name The context menu label. Can be localized.
* @property {string} [icon] A string containing an HTML icon element for the menu item.
* @property {string} [classes] Additional CSS classes to apply to this menu item.
* @property {string} [group] An identifier for a group this entry belongs to.
* @property {ContextMenuJQueryCallback} callback The function to call when the menu item is clicked.
* @property {ContextMenuCondition|boolean} [condition] A function to call or boolean value to determine if this entry
* appears in the menu.
*/
/**
* @callback ContextMenuCondition
* @param {jQuery|HTMLElement} html The element of the context menu entry.
* @returns {boolean} Whether the entry should be rendered in the context menu.
*/
/**
* @callback ContextMenuCallback
* @param {HTMLElement} target The element that the context menu has been triggered for.
* @returns {unknown}
*/
/**
* @callback ContextMenuJQueryCallback
* @param {HTMLElement|jQuery} target The element that the context menu has been triggered for. Will
* either be a jQuery object or an HTMLElement instance, depending
* on how the ContextMenu was configured.
* @returns {unknown}
*/
/**
* @typedef ContextMenuOptions
* @property {string} [eventName="contextmenu"] Optionally override the triggering event which can spawn the menu. If
* the menu is using fixed positioning, this event must be a MouseEvent.
* @property {ContextMenuCallback} [onOpen] A function to call when the context menu is opened.
* @property {ContextMenuCallback} [onClose] A function to call when the context menu is closed.
* @property {boolean} [fixed=false] If true, the context menu is given a fixed position rather than being
* injected into the target.
* @property {boolean} [jQuery=true] If true, callbacks will be passed jQuery objects instead of HTMLElement
* instances.
*/
/**
* @typedef ContextMenuRenderOptions
* @property {Event} [event] The event that triggered the context menu opening.
* @property {boolean} [animate=true] Animate the context menu opening.
*/
/**
* A subclass of ContextMenu.
* @extends {foundry.applications.ux.ContextMenu}
*/
export default class DHContextMenu extends foundry.applications.ux.ContextMenu { export default class DHContextMenu extends foundry.applications.ux.ContextMenu {
/** /**
* Trigger a context menu event in response to a normal click on a additional options button. * Trigger a context menu event in response to a normal click on a additional options button.

View file

@ -30,8 +30,8 @@ export default class DhTokenPlaceable extends foundry.canvas.placeables.Token {
if (!effect.img) continue; if (!effect.img) continue;
const promise = const promise =
effect === overlayEffect effect === overlayEffect
? this._drawOverlay(effect.img, effect.tint) ? this._drawOverlay(effect.img, effect.tint, effect)
: this._drawEffect(effect.img, effect.tint); : this._drawEffect(effect.img, effect.tint, effect);
promises.push( promises.push(
promise.then(e => { promise.then(e => {
if (e) e.zIndex = i; if (e) e.zIndex = i;
@ -45,6 +45,39 @@ export default class DhTokenPlaceable extends foundry.canvas.placeables.Token {
this.renderFlags.set({ refreshEffects: true }); this.renderFlags.set({ refreshEffects: true });
} }
/**@inheritdoc */
async _drawEffect(src, tint, effect) {
if (!src) return;
const tex = await foundry.canvas.loadTexture(src, { fallback: 'icons/svg/hazard.svg' });
const icon = new PIXI.Sprite(tex);
icon.tint = tint ?? 0xffffff;
if (effect.system.stacking?.value > 1) {
const stackOverlay = new PIXI.Text(effect.system.stacking.value, {
fill: '#f3c267',
stroke: '#000000',
fontSize: 96,
strokeThickness: 4
});
const nrDigits = Math.floor(Math.log10(effect.system.stacking.value)) + 1;
stackOverlay.y = -8;
/* This does not account for 1:s being much less wide than other digits. I don't think it's desired however as it makes it look jumpy */
stackOverlay.x = icon.width - 8 - nrDigits * 56;
stackOverlay.anchor.set(0, 0);
icon.addChild(stackOverlay);
}
return this.effects.addChild(icon);
}
async _drawOverlay(src, tint, effect) {
const icon = await this._drawEffect(src, tint, effect);
if (icon) icon.alpha = 0.8;
this.effects.overlay = icon ?? null;
return icon;
}
/** /**
* Returns the distance from this token to another token object. * Returns the distance from this token to another token object.
* This value is corrected to handle alternate token sizes and other grid types * This value is corrected to handle alternate token sizes and other grid types

View file

@ -264,12 +264,20 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
hasSave: this.hasSave, hasSave: this.hasSave,
onSave: this.save?.damageMod, onSave: this.save?.damageMod,
isDirect: !!this.damage?.direct, isDirect: !!this.damage?.direct,
selectedRollMode: game.settings.get('core', 'rollMode'), selectedMessageMode: game.settings.get('core', 'messageMode'),
data: this.getRollData(), data: this.getRollData(),
evaluate: this.hasRoll, evaluate: this.hasRoll,
resourceUpdates: new ResourceUpdateMap(this.actor), resourceUpdates: new ResourceUpdateMap(this.actor),
targetUuid: this.targetUuid, targetUuid: this.targetUuid,
...configOptions ...configOptions,
skips: {
resources: false,
triggers: false,
createMessage: false,
updateCountdowns: false,
reaction: false,
...(configOptions.skips ?? {})
}
}; };
DHBaseAction.applyKeybindings(config); DHBaseAction.applyKeybindings(config);
@ -329,6 +337,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
* @param {boolean} successCost * @param {boolean} successCost
*/ */
async consume(config, successCost = false) { async consume(config, successCost = false) {
config.resourceUpdates = new ResourceUpdateMap(config.actionActor);
await this.workflow.get('cost')?.execute(config, successCost); await this.workflow.get('cost')?.execute(config, successCost);
await this.workflow.get('uses')?.execute(config, successCost); await this.workflow.get('uses')?.execute(config, successCost);

View file

@ -83,7 +83,20 @@ export default class BaseEffect extends foundry.data.ActiveEffectTypeDataModel {
initial: CONFIG.DH.GENERAL.range.melee.id, initial: CONFIG.DH.GENERAL.range.melee.id,
label: 'DAGGERHEART.GENERAL.range' label: 'DAGGERHEART.GENERAL.range'
}) })
}) }),
stacking: new fields.SchemaField(
{
value: new fields.NumberField({
initial: 1,
min: 1,
integer: true,
nullable: false,
label: 'DAGGERHEART.GENERAL.value'
}),
max: new fields.NumberField({ integer: true, label: 'DAGGERHEART.GENERAL.max' })
},
{ nullable: true, initial: null }
)
}; };
} }
@ -158,8 +171,10 @@ export default class BaseEffect extends foundry.data.ActiveEffectTypeDataModel {
return acc; return acc;
}, this.parent.actor.system.armor?.system?.armor?.current ?? 0); }, this.parent.actor.system.armor?.system?.armor?.current ?? 0);
const armorData = getScrollTextData(this.parent.actor, { value: newArmorTotal }, 'armor'); if (newArmorTotal !== this.parent.actor.system.armorScore.value) {
options.scrollingTextData = [armorData]; const armorData = getScrollTextData(this.parent.actor, { value: newArmorTotal }, 'armor');
options.scrollingTextData = [armorData];
}
} }
} }

View file

@ -106,22 +106,11 @@ export default class EffectsField extends fields.ArrayField {
} }
/** /**
* Apply an Effect to a target or enable it if already on it * Apply an Effect to a target
* @param {object} effect Effect object containing ActiveEffect UUID * @param {object} effect Effect object containing ActiveEffect UUID
* @param {object} actor Actor Document * @param {object} actor Actor Document
*/ */
static async applyEffect(effect, actor) { static async applyEffect(effect, actor) {
const existingEffect = actor.effects.find(e => e.origin === effect.uuid);
if (existingEffect) {
return effect.update(
foundry.utils.mergeObject({
...effect.constructor.getInitialDuration(),
disabled: false
})
);
}
// Otherwise, create a new effect on the target
const effectData = foundry.utils.mergeObject({ const effectData = foundry.utils.mergeObject({
...(effect.toObject?.() ?? effect), ...(effect.toObject?.() ?? effect),
disabled: false, disabled: false,

View file

@ -89,6 +89,7 @@ export class ActionField extends foundry.data.fields.ObjectField {
/** @override */ /** @override */
_cleanType(value, options, _state) { _cleanType(value, options, _state) {
if (!(typeof value === 'object')) value = {}; if (!(typeof value === 'object')) value = {};
value = super._cleanType(value, options, _state);
const cls = this.getModel(value); const cls = this.getModel(value);
if (cls) return cls.cleanData(value, options, _state); if (cls) return cls.cleanData(value, options, _state);
return value; return value;
@ -309,7 +310,7 @@ export function ActionMixin(Base) {
} }
}; };
ChatMessage.applyRollMode(msg, game.settings.get('core', 'rollMode')); ChatMessage.applyMode(msg, game.settings.get('core', 'messageMode'));
cls.create(msg); cls.create(msg);
} }
} }

View file

@ -18,8 +18,7 @@ export default class DHConsumable extends BaseDataItem {
const fields = foundry.data.fields; const fields = foundry.data.fields;
return { return {
...super.defineSchema(), ...super.defineSchema(),
consumeOnUse: new fields.BooleanField({ initial: true }), consumeOnUse: new fields.BooleanField({ initial: true })
destroyOnEmpty: new fields.BooleanField({ initial: true })
}; };
} }

View file

@ -33,7 +33,7 @@ export default class DamageRoll extends DHRoll {
static async buildPost(roll, config, message) { static async buildPost(roll, config, message) {
const chatMessage = config.source?.message const chatMessage = config.source?.message
? ui.chat.collection.get(config.source.message) ? ui.chat.collection.get(config.source.message)
: getDocumentClass('ChatMessage').applyRollMode({}, config.rollMode ?? CONST.DICE_ROLL_MODES.PUBLIC); : getDocumentClass('ChatMessage').applyMode({}, config.rollMode ?? 'public');
if (game.modules.get('dice-so-nice')?.active) { if (game.modules.get('dice-so-nice')?.active) {
const pool = foundry.dice.terms.PoolTerm.fromRolls( const pool = foundry.dice.terms.PoolTerm.fromRolls(
Object.values(config.damage).flatMap(r => r.parts.map(p => p.roll)) Object.values(config.damage).flatMap(r => r.parts.map(p => p.roll))

View file

@ -117,10 +117,10 @@ export default class DHRoll extends Roll {
rolls: [roll] rolls: [roll]
}; };
config.selectedRollMode ??= game.settings.get('core', 'rollMode'); config.selectedMessageMode ??= game.settings.get('core', 'messageMode');
if (roll._evaluated) { if (roll._evaluated) {
const message = await cls.create(msgData, { rollMode: config.selectedRollMode }); const message = await cls.create(msgData, { messageMode: config.selectedMessageMode });
if (config.tagTeamSelected) { if (config.tagTeamSelected) {
game.system.api.applications.dialogs.TagTeamDialog.assignRoll(message.speakerActor, message); game.system.api.applications.dialogs.TagTeamDialog.assignRoll(message.speakerActor, message);

View file

@ -111,6 +111,18 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
update.img = 'icons/magic/life/heart-cross-blue.webp'; update.img = 'icons/magic/life/heart-cross-blue.webp';
} }
const existingEffect = this.actor.effects.find(x => x.origin === data.origin);
const stacks = Boolean(data.system?.stacking);
if (existingEffect && !stacks) return false;
if (existingEffect && stacks) {
const incrementedValue = existingEffect.system.stacking.value + 1;
await existingEffect.update({
'system.stacking.value': Math.min(incrementedValue, existingEffect.system.stacking.max ?? Infinity)
});
return false;
}
const statuses = Object.keys(data.statuses ?? {}); const statuses = Object.keys(data.statuses ?? {});
const immuneStatuses = const immuneStatuses =
statuses.filter( statuses.filter(
@ -187,7 +199,10 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect {
} catch (_) {} } catch (_) {}
} }
const evalValue = this.effectSafeEval(itemAbleRollParse(key, parseModel, effect.parent)); const stackingParsedValue = effect.system.stacking
? Roll.replaceFormulaData(key, { stacks: effect.system.stacking.value })
: key;
const evalValue = itemAbleRollParse(stackingParsedValue, parseModel, effect.parent);
return evalValue ?? key; return evalValue ?? key;
} }

View file

@ -122,6 +122,14 @@ export default class DhpActor extends Actor {
} }
} }
_onUpdateDescendantDocuments(parent, collection, documents, changes, options, userId) {
if (collection === 'effects') {
ui.effectsDisplay.render();
}
super._onUpdateDescendantDocuments(parent, collection, documents, changes, options, userId);
}
async updateLevel(newLevel) { async updateLevel(newLevel) {
if (!['character', 'companion'].includes(this.type) || newLevel === this.system.levelData.level.changed) return; if (!['character', 'companion'].includes(this.type) || newLevel === this.system.levelData.level.changed) return;
@ -771,20 +779,10 @@ export default class DhpActor extends Actor {
resources.forEach(r => { resources.forEach(r => {
if (r.itemId) { if (r.itemId) {
const { path, value } = game.system.api.fields.ActionFields.CostField.getItemIdCostUpdate(r); const { path, value } = game.system.api.fields.ActionFields.CostField.getItemIdCostUpdate(r);
updates.items[r.key] = {
if ( target: r.target,
r.key === 'quantity' && resources: { [path]: value }
r.target.type === 'consumable' && };
value === 0 &&
r.target.system.destroyOnEmpty
) {
r.target.delete();
} else {
updates.items[r.key] = {
target: r.target,
resources: { [path]: value }
};
}
} else { } else {
const valueFunc = (base, resource, baseMax) => { const valueFunc = (base, resource, baseMax) => {
if (resource.clear) return baseMax && base.inverted ? baseMax : 0; if (resource.clear) return baseMax && base.inverted ? baseMax : 0;

View file

@ -76,7 +76,7 @@ export default class DhRollTable extends foundry.documents.RollTable {
} }
async toMessage(results, { roll, messageData = {}, messageOptions = {} } = {}) { async toMessage(results, { roll, messageData = {}, messageOptions = {} } = {}) {
messageOptions.rollMode ??= game.settings.get('core', 'rollMode'); messageOptions.rollMode ??= game.settings.get('core', 'messageMode');
// Construct chat data // Construct chat data
messageData = foundry.utils.mergeObject( messageData = foundry.utils.mergeObject(

View file

@ -169,70 +169,19 @@ export default class DhTooltipManager extends foundry.helpers.interaction.Toolti
} }
} }
this.baseActivate(element, { ...options, html: html }); this.noOffset = options.noOffset;
super.activate(element, { ...options, html: html });
} }
/* Need to pass more options to _setAnchor, so have to copy whole foundry method >_< */ _setAnchor(direction) {
async baseActivate(element, options) {
let { text, direction, cssClass, locked = false, html, content } = options;
if (content && !html) {
foundry.utils.logCompatibilityWarning(
'The content option has been deprecated in favor of the html option',
{ since: 13, until: 15, once: true }
);
html = content;
}
// Deactivate currently active element
this.deactivate();
// Check if the element still exists in the DOM.
if (!document.body.contains(element)) return;
// Mark the new element as active
this.#active = true;
this.element = element;
element.setAttribute('aria-describedby', 'tooltip');
html ||= element.dataset.tooltipHtml;
if (html) {
if (typeof html === 'string') this.tooltip.innerHTML = foundry.utils.cleanHTML(html);
else {
this.tooltip.innerHTML = ''; // Clear existing HTML
this.tooltip.appendChild(html);
}
} else {
text ||= element.dataset.tooltipText;
if (text) this.tooltip.textContent = text;
else {
text = element.dataset.tooltip;
// Localized message should be safe
if (game.i18n.has(text)) this.tooltip.innerHTML = game.i18n.localize(text);
else this.tooltip.innerHTML = foundry.utils.cleanHTML(text);
}
}
// Activate display of the tooltip
this.tooltip.removeAttribute('class');
this.tooltip.classList.add('active', 'themed', 'theme-dark');
this.tooltip.showPopover();
cssClass ??= element.closest('[data-tooltip-class]')?.dataset.tooltipClass;
if (cssClass) this.tooltip.classList.add(...cssClass.split(' '));
// Set tooltip position
direction ??= element.closest('[data-tooltip-direction]')?.dataset.tooltipDirection;
if (!direction) direction = this._determineDirection();
this._setAnchor(direction, options);
if (locked || element.dataset.hasOwnProperty('locked')) this.lockTooltip();
}
_setAnchor(direction, options = {}) {
const directions = this.constructor.TOOLTIP_DIRECTIONS; const directions = this.constructor.TOOLTIP_DIRECTIONS;
const pad = this.constructor.TOOLTIP_MARGIN_PX; const pad = this.constructor.TOOLTIP_MARGIN_PX;
const pos = this.element.getBoundingClientRect(); const pos = this.element.getBoundingClientRect();
const { innerHeight, innerWidth } = this.tooltip.ownerDocument.defaultView; const { innerHeight, innerWidth } = this.tooltip.ownerDocument.defaultView;
const tooltipPadding = 16; const tooltipPadding = 16;
const horizontalOffset = options.noOffset ? tooltipPadding : this.tooltip.offsetWidth / 2 - pos.width / 2; const horizontalOffset = this.noOffset ? tooltipPadding : this.tooltip.offsetWidth / 2 - pos.width / 2;
const verticalOffset = options.noOffset ? tooltipPadding : this.tooltip.offsetHeight / 2 - pos.height / 2; const verticalOffset = this.noOffset ? tooltipPadding : this.tooltip.offsetHeight / 2 - pos.height / 2;
const style = {}; const style = {};
switch (direction) { switch (direction) {

View file

@ -771,8 +771,7 @@ export function getArmorSources(actor) {
const data = rawArmorSources.map(doc => { const data = rawArmorSources.map(doc => {
// Get the origin item. Since the actor is already loaded, it should already be cached // Get the origin item. Since the actor is already loaded, it should already be cached
// Consider the relative function versions if this causes an issue // Consider the relative function versions if this causes an issue
const isItem = doc instanceof Item; const origin = doc.origin ? foundry.utils.fromUuidSync(doc.origin) : doc;
const origin = isItem ? doc : doc.origin ? foundry.utils.fromUuidSync(doc.origin) : doc.parent;
return { return {
origin, origin,
name: origin.name, name: origin.name,

View file

@ -29,8 +29,7 @@
"Compendium.daggerheart.beastforms.Item.QFg1hNCEoKVDd9Zo" "Compendium.daggerheart.beastforms.Item.QFg1hNCEoKVDd9Zo"
], ],
"evolved": { "evolved": {
"mainTraitBonus": 0, "mainTraitBonus": 0
"maximumTier": 1
}, },
"hybrid": { "hybrid": {
"beastformOptions": 2, "beastformOptions": 2,

View file

@ -71,13 +71,17 @@
"changes": [ "changes": [
{ {
"key": "system.bonuses.roll.attack.bonus", "key": "system.bonuses.roll.attack.bonus",
"value": 1, "type": "add",
"value": "@stacks",
"priority": null, "priority": null,
"type": "add" "phase": "initial"
} }
], ],
"duration": { "duration": {
"type": "shortRest" "type": "shortRest"
},
"stacking": {
"max": null
} }
}, },
"disabled": false, "disabled": false,

View file

@ -69,14 +69,18 @@
"changes": [ "changes": [
{ {
"key": "system.evasion", "key": "system.evasion",
"value": 2, "type": "add",
"value": "2 * @stacks",
"priority": null, "priority": null,
"type": "add" "phase": "initial"
} }
], ],
"duration": { "duration": {
"type": "temporary", "type": "temporary",
"description": "<p><span style=\"color: rgb(239, 230, 216); font-family: Montserrat, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgba(24, 22, 46, 0.565); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Until the next time an attack succeeds against you.</span></p>" "description": "<p><span style=\"color: rgb(239, 230, 216); font-family: Montserrat, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgba(24, 22, 46, 0.565); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Until the next time an attack succeeds against you.</span></p>"
},
"stacking": {
"max": null
} }
}, },
"disabled": false, "disabled": false,

View file

@ -127,7 +127,7 @@
"sort": 3400000, "sort": 3400000,
"effects": [ "effects": [
{ {
"name": "Corroded (1 stack)", "name": "Corroded",
"img": "icons/magic/acid/dissolve-bone-white.webp", "img": "icons/magic/acid/dissolve-bone-white.webp",
"origin": "Compendium.daggerheart.domains.Item.qJaSNTuDfbPVr8Lb", "origin": "Compendium.daggerheart.domains.Item.qJaSNTuDfbPVr8Lb",
"transfer": false, "transfer": false,
@ -139,27 +139,31 @@
"type": "withinRange", "type": "withinRange",
"target": "hostile", "target": "hostile",
"range": "melee" "range": "melee"
},
"changes": [
{
"key": "system.difficulty",
"type": "add",
"value": "-@stack",
"priority": null,
"phase": "initial"
}
],
"stacking": {
"max": null
},
"duration": {
"type": ""
} }
}, },
"changes": [
{
"key": "system.difficulty",
"mode": 2,
"value": "-1",
"priority": null
}
],
"disabled": false, "disabled": false,
"duration": { "duration": {
"startTime": null, "value": null,
"combat": null, "units": "seconds",
"seconds": null, "expiry": null,
"rounds": null, "expired": false
"turns": null,
"startRound": null,
"startTurn": null
}, },
"description": "<p><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">While a target is </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">Corroded</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">, they gain a 1 penalty to their </span><span class=\"tooltip-convert\" style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">Difficulty</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\"> for every 2 Stress you spent. This </span><span class=\"tooltip-convert\" style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">condition</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\"> can stack.</p>", "description": "<p><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">While a target is </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\">Corroded</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\">, they gain a 1 penalty to their </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\" class=\"tooltip-convert\">Difficulty</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\"> for every 2 Stress you spent. This </span><span style=\"box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgb(93, 20, 43) rgba(0, 0, 0, 0);color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial\" class=\"tooltip-convert\">condition</span><span style=\"color:rgb(239, 230, 216);font-family:Montserrat, sans-serif;font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0px;text-transform:none;widows:2;word-spacing:0px;-webkit-text-stroke-width:0px;white-space:normal;background-color:rgba(24, 22, 46, 0.376);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;display:inline !important;float:none\"> can stack.</span></p>",
"tint": "#ffffff", "tint": "#ffffff",
"statuses": [ "statuses": [
"corrode" "corrode"
@ -169,6 +173,16 @@
"_stats": { "_stats": {
"compendiumSource": null "compendiumSource": null
}, },
"start": {
"time": 0,
"combat": null,
"combatant": null,
"initiative": null,
"round": null,
"turn": null
},
"showIcon": 1,
"folder": null,
"_key": "!items.effects!qJaSNTuDfbPVr8Lb.zB95bjSSdVlApQnR" "_key": "!items.effects!qJaSNTuDfbPVr8Lb.zB95bjSSdVlApQnR"
} }
], ],

View file

@ -42,44 +42,8 @@
"type": "self", "type": "self",
"amount": null "amount": null
}, },
"name": "Mark 1 Stress", "name": "Mark Stress",
"img": "icons/magic/control/silhouette-aura-energy.webp", "img": "icons/skills/wounds/injury-face-impact-orange.webp",
"range": "self"
},
"fKY9NcYBwCFwMsgV": {
"type": "effect",
"_id": "fKY9NcYBwCFwMsgV",
"systemPath": "actions",
"description": "<p>You can <strong>mark a Stress</strong> to gain a bonus to your damage roll equal to twice your Strength.</p>",
"chatDisplay": true,
"actionType": "action",
"cost": [
{
"scalable": false,
"key": "stress",
"value": 2,
"step": null,
"consumeOnSuccess": false
}
],
"uses": {
"value": null,
"max": "",
"recovery": null,
"consumeOnSuccess": false
},
"effects": [
{
"_id": "t6SIjQxB6UBUJ98f",
"onSave": false
}
],
"target": {
"type": "self",
"amount": null
},
"name": "Mark 2 Stress",
"img": "icons/magic/control/silhouette-aura-energy.webp",
"range": "self" "range": "self"
} }
}, },
@ -94,8 +58,8 @@
"sort": 3400000, "sort": 3400000,
"effects": [ "effects": [
{ {
"name": "Rage Up (1)", "name": "Rage Up",
"img": "systems/daggerheart/assets/icons/domains/domain-card/blade.png", "img": "icons/skills/wounds/injury-face-impact-orange.webp",
"origin": "Compendium.daggerheart.domains.Item.GRL0cvs96vrTDckZ", "origin": "Compendium.daggerheart.domains.Item.GRL0cvs96vrTDckZ",
"transfer": false, "transfer": false,
"_id": "bq1MhcmoP6Wo5CXF", "_id": "bq1MhcmoP6Wo5CXF",
@ -106,33 +70,38 @@
"type": "withinRange", "type": "withinRange",
"target": "hostile", "target": "hostile",
"range": "melee" "range": "melee"
},
"changes": [
{
"key": "system.bonuses.damage.magical.bonus",
"type": "add",
"value": "2*@system.traits.strength.value*@stacks",
"priority": 21,
"phase": "initial"
},
{
"key": "system.bonuses.damage.physical.bonus",
"type": "add",
"value": "2*@system.traits.strength.value*@stacks",
"priority": 21,
"phase": "initial"
}
],
"stacking": {
"max": 2
},
"duration": {
"type": ""
} }
}, },
"changes": [
{
"key": "system.bonuses.damage.magical.bonus",
"mode": 2,
"value": "2*@system.traits.strength.value",
"priority": 21
},
{
"key": "system.bonuses.damage.physical.bonus",
"mode": 2,
"value": "2*@system.traits.strength.value",
"priority": 21
}
],
"disabled": false, "disabled": false,
"duration": { "duration": {
"startTime": null, "value": null,
"combat": null, "units": "seconds",
"seconds": null, "expiry": null,
"rounds": null, "expired": false
"turns": null,
"startRound": null,
"startTurn": null
}, },
"description": "", "description": "<p>For your next attack you have a bonus to your damage roll equal to twice your Strength.</p>",
"tint": "#ffffff", "tint": "#ffffff",
"statuses": [], "statuses": [],
"sort": 0, "sort": 0,
@ -140,6 +109,16 @@
"_stats": { "_stats": {
"compendiumSource": null "compendiumSource": null
}, },
"start": {
"time": 0,
"combat": null,
"combatant": null,
"initiative": null,
"round": null,
"turn": null
},
"showIcon": 1,
"folder": null,
"_key": "!items.effects!GRL0cvs96vrTDckZ.bq1MhcmoP6Wo5CXF" "_key": "!items.effects!GRL0cvs96vrTDckZ.bq1MhcmoP6Wo5CXF"
}, },
{ {
@ -155,31 +134,28 @@
"type": "withinRange", "type": "withinRange",
"target": "hostile", "target": "hostile",
"range": "melee" "range": "melee"
}
},
"changes": [
{
"key": "system.bonuses.damage.magical.bonus",
"mode": 2,
"value": "4*@system.traits.strength.value",
"priority": 21
}, },
{ "changes": [
"key": "system.bonuses.damage.physical.bonus", {
"mode": 2, "key": "system.bonuses.damage.magical.bonus",
"value": "4*@system.traits.strength.value", "value": "4*@system.traits.strength.value",
"priority": 21 "priority": 21,
} "type": "add"
], },
{
"key": "system.bonuses.damage.physical.bonus",
"value": "4*@system.traits.strength.value",
"priority": 21,
"type": "add"
}
]
},
"disabled": false, "disabled": false,
"duration": { "duration": {
"startTime": null, "value": null,
"combat": null, "units": "seconds",
"seconds": null, "expiry": null,
"rounds": null, "expired": false
"turns": null,
"startRound": null,
"startTurn": null
}, },
"description": "", "description": "",
"tint": "#ffffff", "tint": "#ffffff",
@ -189,6 +165,9 @@
"_stats": { "_stats": {
"compendiumSource": null "compendiumSource": null
}, },
"start": null,
"showIcon": 1,
"folder": null,
"_key": "!items.effects!GRL0cvs96vrTDckZ.t6SIjQxB6UBUJ98f" "_key": "!items.effects!GRL0cvs96vrTDckZ.t6SIjQxB6UBUJ98f"
} }
], ],

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -48,7 +48,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -89,7 +89,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -71,7 +71,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -134,7 +134,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -84,7 +84,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -91,7 +91,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -71,7 +71,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -89,7 +89,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -84,7 +84,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -84,7 +84,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -84,7 +84,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -84,7 +84,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -85,7 +85,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -85,7 +85,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -84,7 +84,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -71,7 +71,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -64,7 +64,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -159,7 +159,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 62, "page": 62,

View file

@ -91,7 +91,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -85,7 +85,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -40,7 +40,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 60, "page": 60,

View file

@ -45,7 +45,6 @@
} }
}, },
"consumeOnUse": true, "consumeOnUse": true,
"destroyOnEmpty": true,
"attribution": { "attribution": {
"source": "Daggerheart SRD", "source": "Daggerheart SRD",
"page": 61, "page": 61,

View file

@ -1,4 +1,212 @@
.daggerheart.dialog.dh-style.views.tag-team-dialog { .daggerheart.dialog.dh-style.views.tag-team-dialog {
.team-container {
display: flex;
gap: 16px;
margin-bottom: 16px;
.team-member-container {
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 8px;
flex: 1;
&.select-padding {
padding-bottom: 64px;
}
&.inactive {
opacity: 0.4;
pointer-events: none;
}
.data-container {
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
}
.member-info {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
img {
height: 64px;
border-radius: 6px;
border: 1px solid light-dark(@dark-blue, @golden);
}
.member-name {
flex: 1;
text-align: center;
font-size: var(--font-size-18);
}
}
.roll-setup {
width: 100%;
}
.roll-container {
display: flex;
flex-direction: column;
}
.roll-title {
font-size: var(--font-size-20);
font-weight: bold;
color: light-dark(@dark-blue, @golden);
text-align: center;
display: flex;
align-items: center;
gap: 8px;
&::before,
&::after {
color: light-dark(@dark-blue, @golden);
content: '';
flex: 1;
height: 2px;
}
&::before {
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, light-dark(@dark-blue, @golden) 100%);
}
&::after {
background: linear-gradient(90deg, light-dark(@dark-blue, @golden) 0%, rgba(0, 0, 0, 0) 100%);
}
}
.roll-tools {
display: flex;
gap: 4px;
align-items: center;
img {
height: 16px;
}
a {
display: flex;
font-size: 16px;
&:hover {
text-shadow: none;
filter: drop-shadow(0 0 8px var(--golden));
}
}
}
.roll-data {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
&.hope {
--text-color: @golden;
--bg-color: @golden-40;
}
&.fear {
--text-color: @chat-blue;
--bg-color: @chat-blue-40;
}
&.critical {
--text-color: @chat-purple;
--bg-color: @chat-purple-40;
}
.duality-label {
color: var(--text-color);
font-size: var(--font-size-20);
font-weight: bold;
text-align: center;
.unused-damage {
text-decoration: line-through;
}
}
.roll-dice-container {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
gap: 8px;
.roll-dice {
position: relative;
display: flex;
align-items: center;
justify-content: center;
.dice-label {
position: absolute;
color: white;
font-size: 1rem;
paint-order: stroke fill;
-webkit-text-stroke: 2px black;
}
img {
height: 32px;
}
}
.roll-operator {
font-size: var(--font-size-24);
}
.roll-value {
font-size: 18px;
}
}
.roll-total {
background: var(--bg-color);
color: var(--text-color);
border-radius: 4px;
padding: 3px;
}
}
}
}
.roll-selection {
position: relative;
top: -80px;
&.rendered {
margin-bottom: -56px;
}
.roll-selection-container {
display: flex;
.select-roll-button {
margin-top: 8px;
flex: 1;
display: flex;
justify-content: center;
i {
color: light-dark(@dark-blue, @golden);
font-size: 48px;
&.inactive {
opacity: 0.4;
}
}
}
}
}
.tag-team-roll-container { .tag-team-roll-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -9,193 +217,6 @@
pointer-events: none; pointer-events: none;
} }
.team-container {
display: flex;
gap: 16px;
.member-container {
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 8px;
flex: 1;
&.inactive {
opacity: 0.4;
pointer-events: none;
}
.data-container {
display: flex;
flex-direction: column;
gap: 8px;
width: 100%;
}
.member-info {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
img {
height: 64px;
border-radius: 6px;
border: 1px solid light-dark(@dark-blue, @golden);
}
.member-name {
flex: 1;
text-align: center;
font-size: var(--font-size-18);
}
}
.roll-setup {
width: 100%;
}
.roll-container {
display: flex;
flex-direction: column;
}
.roll-title {
font-size: var(--font-size-20);
font-weight: bold;
color: light-dark(@dark-blue, @golden);
text-align: center;
display: flex;
align-items: center;
gap: 8px;
&::before,
&::after {
color: light-dark(@dark-blue, @golden);
content: '';
flex: 1;
height: 2px;
}
&::before {
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, light-dark(@dark-blue, @golden) 100%);
}
&::after {
background: linear-gradient(90deg, light-dark(@dark-blue, @golden) 0%, rgba(0, 0, 0, 0) 100%);
}
}
.roll-tools {
display: flex;
gap: 4px;
align-items: center;
img {
height: 16px;
}
a {
display: flex;
font-size: 16px;
&:hover {
text-shadow: none;
filter: drop-shadow(0 0 8px var(--golden));
}
}
}
.roll-data {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
&.hope {
--text-color: @golden;
--bg-color: @golden-40;
}
&.fear {
--text-color: @chat-blue;
--bg-color: @chat-blue-40;
}
&.critical {
--text-color: @chat-purple;
--bg-color: @chat-purple-40;
}
.duality-label {
color: var(--text-color);
font-size: var(--font-size-20);
font-weight: bold;
text-align: center;
.unused-damage {
text-decoration: line-through;
}
}
.roll-dice-container {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
gap: 8px;
.roll-dice {
position: relative;
display: flex;
align-items: center;
justify-content: center;
.dice-label {
position: absolute;
color: white;
font-size: 1rem;
paint-order: stroke fill;
-webkit-text-stroke: 2px black;
}
img {
height: 32px;
}
}
.roll-operator {
font-size: var(--font-size-24);
}
.roll-value {
font-size: 18px;
}
}
.roll-total {
background: var(--bg-color);
color: var(--text-color);
border-radius: 4px;
padding: 3px;
}
}
.select-roll-button {
margin-top: 8px;
i {
color: light-dark(@dark-blue, @golden);
font-size: 48px;
&.inactive {
opacity: 0.4;
}
}
}
}
}
.results-container { .results-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -243,9 +264,9 @@
grid-column: span 2; grid-column: span 2;
} }
} }
}
.hint { .hint {
text-align: center; text-align: center;
}
} }
} }

View file

@ -293,6 +293,20 @@
} }
} }
&.optional,
&.one-column.optional {
padding-top: 0;
padding-bottom: 4px;
min-height: auto;
row-gap: 0;
legend {
display: flex;
align-items: center;
padding-left: 3px;
}
}
.list-w-img { .list-w-img {
padding: 5px; padding: 5px;
label { label {
@ -469,6 +483,10 @@
&.even { &.even {
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
} }
&.full-width {
width: 100%;
}
} }
.three-columns { .three-columns {

View file

@ -46,16 +46,6 @@
} }
.armor-change-container { .armor-change-container {
padding-top: 0;
padding-bottom: 4px;
row-gap: 0;
legend {
display: flex;
align-items: center;
padding-left: 3px;
}
header { header {
padding: 0; padding: 0;
left: -0.25rem; // TODO: Find why this header is offset 0.25rem to the right so this can be removed. left: -0.25rem; // TODO: Find why this header is offset 0.25rem to the right so this can be removed.

View file

@ -35,6 +35,21 @@
color: @golden; color: @golden;
filter: drop-shadow(0 0 3px black); filter: drop-shadow(0 0 3px black);
} }
.stacking-value {
position: absolute;
top: 4px;
right: 4px;
font-size: 16px;
font-weight: bold;
font-variant-numeric: tabular-nums;
color: @golden;
background: black;
padding: 1px;
border-radius: 6px;
border: 1px solid @golden;
pointer-events: none;
}
} }
} }
} }

View file

@ -6,6 +6,7 @@
.daggerheart.dh-style.tooltip { .daggerheart.dh-style.tooltip {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: start;
text-align: start; text-align: start;
width: 100%; width: 100%;
gap: 5px; gap: 5px;
@ -13,6 +14,7 @@
border-radius: 3px; border-radius: 3px;
.tooltip-header { .tooltip-header {
width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -35,12 +37,48 @@
} }
} }
.close-hint { .effect-stacks-outer-container {
border-radius: 3px; display: flex;
padding: 3px; flex-direction: column;
background: @rustic-brown-80; gap: 4px;
color: @golden; width: 100%;
font-size: 12px;
.effect-stacks-title {
font-size: var(--font-size-20);
font-weight: bold;
text-align: center;
}
.effect-stacks-container {
display: flex;
justify-content: space-between;
.effect-stacks-inner-container {
display: flex;
flex-direction: column;
gap: 2px;
.effect-stack-title {
font-weight: bold;
}
}
}
}
.close-hints {
margin-top: 0.5rem;
display: flex;
flex-direction: column;
gap: 4px;
.close-hint {
border-radius: 3px;
padding: 3px;
background: @rustic-brown-80;
color: @golden;
font-size: 12px;
margin: 0;
}
} }
.duration-container { .duration-container {

View file

@ -16,50 +16,52 @@
{{formField directField value=source.direct name=(concat path "damage.direct") localize=true classes="checkbox"}} {{formField directField value=source.direct name=(concat path "damage.direct") localize=true classes="checkbox"}}
{{/unless}} {{/unless}}
</div> </div>
{{#each source.parts as |dmg key|}}
{{!-- 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.parts as |dmg|}}
<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}}">
<legend class="with-icon"> <legend class="with-icon">
{{localize (concat "DAGGERHEART.CONFIG.HealingType." key ".name")}} {{localize (concat "DAGGERHEART.CONFIG.HealingType." dmg.applyTo ".name")}}
{{#unless (or dmg.base ../path)}} {{#unless (or dmg.base ../path)}}
<a data-action="removeDamage" data-key="{{key}}"><i class="fas fa-trash"></i></a> <a data-action="removeDamage" data-key="{{dmg.applyTo}}"><i class="fas fa-trash"></i></a>
{{/unless}} {{/unless}}
</legend> </legend>
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}} {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}}
{{formField ../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." key ".resultBased") localize=true classes="checkbox"}} {{formField ../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." dmg.applyTo ".resultBased") localize=true classes="checkbox"}}
{{/if}} {{/if}}
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}} {{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}}
<div class="nest-inputs"> <div class="nest-inputs">
<fieldset class="one-column"> <fieldset class="one-column">
<legend>{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}</legend> <legend>{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.hope")}}</legend>
{{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=key path=../path}} {{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path}}
</fieldset> </fieldset>
<fieldset class="one-column"> <fieldset class="one-column">
<legend>{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}</legend> <legend>{{localize "DAGGERHEART.GENERAL.withThing" thing=(localize "DAGGERHEART.GENERAL.fear")}}</legend>
{{> formula fields=../fields.valueAlt.fields type=../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" key=key path=../path}} {{> formula fields=../fields.valueAlt.fields type=../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" key=dmg.applyTo path=../path}}
</fieldset> </fieldset>
</div> </div>
{{else}} {{else}}
{{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=key path=../path}} {{> formula fields=../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" key=dmg.applyTo path=../path}}
{{/if}} {{/if}}
{{#if (and (eq dmg.applyTo 'hitPoints') (ne @root.source.type 'healing'))}} {{#if (and (eq dmg.applyTo 'hitPoints') (ne @root.source.type 'healing'))}}
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." key ".type") localize=true}} {{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." dmg.applyTo ".type") localize=true}}
{{/if}} {{/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>
<div class="nest-inputs"> <div class="nest-inputs">
<input type="hidden" name="{{../path}}damage.parts.{{key}}.valueAlt.multiplier" value="flat"> <input type="hidden" name="{{../path}}damage.parts.{{dmg.applyTo}}.valueAlt.multiplier" value="flat">
{{formField ../fields.valueAlt.fields.flatMultiplier value=dmg.valueAlt.flatMultiplier name=(concat ../path "damage.parts." key ".valueAlt.flatMultiplier") label="DAGGERHEART.ACTIONS.Settings.multiplier" classes="inline-child" localize=true }} {{formField ../fields.valueAlt.fields.flatMultiplier value=dmg.valueAlt.flatMultiplier name=(concat ../path "damage.parts." dmg.applyTo ".valueAlt.flatMultiplier") label="DAGGERHEART.ACTIONS.Settings.multiplier" classes="inline-child" localize=true }}
{{formField ../fields.valueAlt.fields.dice value=dmg.valueAlt.dice name=(concat ../path "damage.parts." key ".valueAlt.dice") classes="inline-child" localize=true}} {{formField ../fields.valueAlt.fields.dice value=dmg.valueAlt.dice name=(concat ../path "damage.parts." dmg.applyTo ".valueAlt.dice") classes="inline-child" localize=true}}
{{formField ../fields.valueAlt.fields.bonus value=dmg.valueAlt.bonus name=(concat ../path "damage.parts." key ".valueAlt.bonus") localize=true classes="inline-child"}} {{formField ../fields.valueAlt.fields.bonus value=dmg.valueAlt.bonus name=(concat ../path "damage.parts." dmg.applyTo ".valueAlt.bonus") localize=true classes="inline-child"}}
</div> </div>
</fieldset> </fieldset>
{{/if}} {{/if}}
<input type="hidden" name="damage.parts.{{key}}.base" value="{{dmg.base}}"> <input type="hidden" name="{{concat ../path "damage.parts." dmg.applyTo ".base"}}" value="{{dmg.base}}">
</fieldset> </fieldset>
</div> </div>
{{/each}} {{/each}}

View file

@ -56,8 +56,8 @@
{{/unless}} {{/unless}}
<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="selectedMessageMode">
{{selectOptions rollModes selected=selectedRollMode valueAttr="action" labelAttr="label" localize=true}} {{selectOptions rollModes selected=selectedMessageMode valueAttr="action" labelAttr="label" localize=true}}
</select> </select>
{{/if}} {{/if}}
<button class="submit-btn" data-action="submitRoll"> <button class="submit-btn" data-action="submitRoll">

View file

@ -189,8 +189,8 @@
{{/if}} {{/if}}
<div class="roll-dialog-controls"> <div class="roll-dialog-controls">
<select class="roll-mode-select" name="selectedRollMode"> <select class="roll-mode-select" name="selectedMessageMode">
{{selectOptions rollModes selected=selectedRollMode valueAttr="action" labelAttr="label" localize=true}} {{selectOptions rollModes selected=selectedMessageMode valueAttr="action" labelAttr="label" localize=true}}
</select> </select>
<button class="submit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}> <button class="submit-btn" data-action="submitRoll"{{#unless canRoll}} disabled{{/unless}}>
<i class="fa-solid fa-dice"></i> <i class="fa-solid fa-dice"></i>

View file

@ -1,4 +1,5 @@
<section class="initialization-container tab {{#if tabs.initialization.active}} active{{/if}}" data-group="{{tabs.initialization.group}}" data-tab="{{tabs.initialization.id}}"> <section class="initialization-container tab {{#if tabs.initialization.active}} active{{/if}}" data-group="{{tabs.initialization.group}}" data-tab="{{tabs.initialization.id}}">
{{partId}}
<h2>{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.selectParticipants"}}</h2> <h2>{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.selectParticipants"}}</h2>
<div class="members-container"> <div class="members-container">
{{#each memberSelection as |member|}} {{#each memberSelection as |member|}}

View file

@ -0,0 +1,11 @@
<section class="roll-selection {{#if (and allHaveRolled tabs.tagTeamRoll.active)}}rendered{{/if}} tab {{#if tabs.tagTeamRoll.active}} active{{/if}}" data-group="{{tabs.tagTeamRoll.group}}">
{{#if allHaveRolled}}
<div class="roll-selection-container">
{{#each members as |member key|}}
<a class="select-roll-button" data-action="selectRoll" data-member-key="{{key}}">
<i class="{{#if member.selected}}fa-solid fa-circle-check{{else}}fa-regular fa-circle inactive{{/if}}"></i>
</a>
{{/each}}
</div>
{{/if}}
</section>

View file

@ -0,0 +1,126 @@
{{#with (lookup members partId)}}
<fieldset class="team-member-container {{#if @root.allHaveRolled}}select-padding{{/if}} {{#unless isEditable}}inactive{{/unless}}" data-member-key="{{@root.partId}}">
<div class="data-container">
<div class="member-info">
<img src="{{img}}" />
<span class="member-name">{{name}}</span>
</div>
<div class="roll-setup">
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.rollType"}}</label>
<select class="roll-type-select" data-member="{{@root.partId}}" {{#if hasRolled}}disabled{{/if}}>
{{selectOptions ../rollTypes selected=rollType localize=true}}
</select>
</div>
</div>
{{#if (or (not rollType) (eq rollType 'trait'))}}
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.GENERAL.Trait.single"}}</label>
<select name="{{concat "system.tagTeam.members." @root.partId ".rollChoice"}}" {{#if hasRolled}}disabled{{/if}}>
{{selectOptions ../traitOptions selected=rollChoice localize=true blank=""}}
</select>
</div>
</div>
{{else if (eq rollType 'damageAbility')}}
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.CONFIG.TagTeamRollTypes.damageAbility"}}</label>
<select name="{{concat "system.tagTeam.members." @root.partId ".rollChoice"}}" {{#if hasRolled}}disabled{{/if}}>
{{selectOptions damageRollOptions selected=rollChoice localize=true blank=""}}
</select>
</div>
</div>
{{else}}
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.GENERAL.Ability.single"}}</label>
<select name="{{concat "system.tagTeam.members." @root.partId ".rollChoice"}}" {{#if hasRolled}}disabled{{/if}}>
{{selectOptions rollOptions selected=rollChoice localize=true blank=""}}
</select>
</div>
</div>
{{/if}}
</div>
{{#if readyToRoll}}
<div class="roll-container">
<span class="roll-title">
{{localize "DAGGERHEART.GENERAL.roll"}}
<div class="roll-tools">
<a class="roll-button" data-action="makeRoll" data-member="{{@root.partId}}">
<img src="systems/daggerheart/assets/icons/dice/hope/d12.svg" />
</a>
{{#if hasRolled}}
<a class="delete-button" data-action="removeRoll" data-member="{{@root.partId}}">
<i class="fa-solid fa-trash"></i>
</a>
{{/if}}
</div>
</span>
{{#if rollData}}
{{#with rollData.options.roll}}
<div class="roll-data {{#if this.isCritical}}critical{{else}}{{#if (eq this.result.duality 1)}}hope{{else}}fear{{/if}}{{/if}}">
<div class="duality-label">{{this.total}} {{localize "DAGGERHEART.GENERAL.withThing" thing=this.result.label}}</div>
<div class="roll-dice-container">
<a class="roll-dice" data-action="rerollDice" data-member="{{@root.partId}}" data-dice-type="hope">
<span class="dice-label">{{this.hope.value}}</span>
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/" this.hope.dice ".svg"}}" />
</a>
<span class="roll-operator">+</span>
<a class="roll-dice" data-action="rerollDice" data-member="{{@root.partId}}" data-dice-type="fear">
<span class="dice-label">{{this.fear.value}}</span>
<img src="{{concat "systems/daggerheart/assets/icons/dice/fear/" this.fear.dice ".svg"}}" />
</a>
{{#if this.advantage.type}}
<span class="roll-operator">{{#if (eq this.advantage.type 1)}}+{{else}}-{{/if}}</span>
<span class="roll-dice">
<span class="dice-label">{{this.advantage.value}}</span>
<img src="{{concat "systems/daggerheart/assets/icons/dice/" (ifThen (eq this.advantage.type 1) "adv/" "disadv/") this.advantage.dice ".svg"}}" />
</span>
{{/if}}
<span class="roll-operator">{{#if (gte this.modifierTotal 0)}}+{{else}}-{{/if}}</span>
<span class="roll-value">{{positive this.modifierTotal}}</span>
</div>
</div>
{{/with}}
{{else}}
<span class="hint">{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.makeYourRoll"}}</span>
{{/if}}
</div>
{{/if}}
{{#if rollData.options.hasDamage}}
<div class="roll-container">
<span class="roll-title">
{{localize "DAGGERHEART.GENERAL.damage"}}
<div class="roll-tools">
<a class="roll-button" data-action="makeDamageRoll" data-member-key="{{@root.partId}}" {{#unless readyToRoll}}disabled{{/unless}}>
<img src="systems/daggerheart/assets/icons/dice/hope/d20.svg" />
</a>
{{#if damage}}
<a class="delete-button" data-action="removeDamageRoll" data-member-key="{{@root.partId}}" {{#unless rollData.options.damage}}disabled{{/unless}}>
<i class="fa-solid fa-trash"></i>
</a>
{{/if}}
</div>
</span>
{{#if damage}}
{{#if useCritDamage}}
{{> "systems/daggerheart/templates/dialogs/tagTeamDialog/parts/tagTeamDamageParts.hbs" damage=critDamage isCritical=true }}
{{else}}
{{> "systems/daggerheart/templates/dialogs/tagTeamDialog/parts/tagTeamDamageParts.hbs" damage=damage }}
{{/if}}
{{else}}
<span class="hint">{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.makeYourRoll"}}</span>
{{/if}}
</div>
{{/if}}
</div>
</fieldset>
{{/with}}

View file

@ -1,140 +1,5 @@
<section class="tag-team-roll tab {{#if tabs.tagTeamRoll.active}} active{{/if}}" data-group="{{tabs.tagTeamRoll.group}}" data-tab="{{tabs.tagTeamRoll.id}}"> <section class="tag-team-roll tab {{#if tabs.tagTeamRoll.active}} active{{/if}}" data-group="{{tabs.tagTeamRoll.group}}" data-tab="{{tabs.tagTeamRoll.id}}">
<div class="tag-team-roll-container {{#unless isEditable}}inactive{{/unless}}"> <div class="tag-team-roll-container {{#unless isEditable}}inactive{{/unless}}">
<div class="team-container">
{{#each members as |member key|}}
<fieldset class="member-container {{#unless member.isEditable}}inactive{{/unless}}">
<div class="data-container">
<div class="member-info">
<img src="{{member.img}}" />
<span class="member-name">{{member.name}}</span>
</div>
<div class="roll-setup">
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.rollType"}}</label>
<select class="roll-type-select" data-member="{{key}}" {{#if member.hasRolled}}disabled{{/if}}>
{{selectOptions ../rollTypes selected=member.rollType localize=true}}
</select>
</div>
</div>
{{#if (eq member.rollType 'trait')}}
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.GENERAL.Trait.single"}}</label>
<select name="{{concat "system.tagTeam.members." key ".rollChoice"}}" {{#if member.hasRolled}}disabled{{/if}}>
{{selectOptions ../traitOptions selected=member.rollChoice localize=true blank=""}}
</select>
</div>
</div>
{{else if (eq member.rollType 'damageAbility')}}
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.CONFIG.TagTeamRollTypes.damageAbility"}}</label>
<select name="{{concat "system.tagTeam.members." key ".rollChoice"}}" {{#if member.hasRolled}}disabled{{/if}}>
{{selectOptions member.damageRollOptions selected=member.rollChoice localize=true blank=""}}
</select>
</div>
</div>
{{else}}
<div class="form-group">
<div class="form-fields">
<label>{{localize "DAGGERHEART.GENERAL.Ability.single"}}</label>
<select name="{{concat "system.tagTeam.members." key ".rollChoice"}}" {{#if member.hasRolled}}disabled{{/if}}>
{{selectOptions member.rollOptions selected=member.rollChoice localize=true blank=""}}
</select>
</div>
</div>
{{/if}}
</div>
{{#if member.readyToRoll}}
<div class="roll-container">
<span class="roll-title">
{{localize "DAGGERHEART.GENERAL.roll"}}
<div class="roll-tools">
<a class="roll-button" data-action="makeRoll" data-member="{{key}}">
<img src="systems/daggerheart/assets/icons/dice/hope/d12.svg" />
</a>
{{#if member.hasRolled}}
<a class="delete-button" data-action="removeRoll" data-member="{{key}}">
<i class="fa-solid fa-trash"></i>
</a>
{{/if}}
</div>
</span>
{{#if member.rollData}}
{{#with member.rollData.options.roll}}
<div class="roll-data {{#if this.isCritical}}critical{{else}}{{#if (eq this.result.duality 1)}}hope{{else}}fear{{/if}}{{/if}}">
<div class="duality-label">{{this.total}} {{localize "DAGGERHEART.GENERAL.withThing" thing=this.result.label}}</div>
<div class="roll-dice-container">
<a class="roll-dice" data-action="rerollDice" data-member="{{../key}}" data-dice-type="hope">
<span class="dice-label">{{this.hope.value}}</span>
<img src="{{concat "systems/daggerheart/assets/icons/dice/hope/" this.hope.dice ".svg"}}" />
</a>
<span class="roll-operator">+</span>
<a class="roll-dice" data-action="rerollDice" data-member="{{../key}}" data-dice-type="fear">
<span class="dice-label">{{this.fear.value}}</span>
<img src="{{concat "systems/daggerheart/assets/icons/dice/fear/" this.fear.dice ".svg"}}" />
</a>
{{#if this.advantage.type}}
<span class="roll-operator">{{#if (eq this.advantage.type 1)}}+{{else}}-{{/if}}</span>
<span class="roll-dice">
<span class="dice-label">{{this.advantage.value}}</span>
<img src="{{concat "systems/daggerheart/assets/icons/dice/" (ifThen (eq this.advantage.type 1) "adv/" "disadv/") this.advantage.dice ".svg"}}" />
</span>
{{/if}}
<span class="roll-operator">{{#if (gte this.modifierTotal 0)}}+{{else}}-{{/if}}</span>
<span class="roll-value">{{positive this.modifierTotal}}</span>
</div>
</div>
{{/with}}
{{else}}
<span class="hint">{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.makeYourRoll"}}</span>
{{/if}}
</div>
{{/if}}
{{#if member.rollData.options.hasDamage}}
<div class="roll-container">
<span class="roll-title">
{{localize "DAGGERHEART.GENERAL.damage"}}
<div class="roll-tools">
<a class="roll-button" data-action="makeDamageRoll" data-member-key="{{key}}" {{#unless member.readyToRoll}}disabled{{/unless}}>
<img src="systems/daggerheart/assets/icons/dice/hope/d20.svg" />
</a>
{{#if damage}}
<a class="delete-button" data-action="removeDamageRoll" data-member-key="{{key}}" {{#unless member.rollData.options.damage}}disabled{{/unless}}>
<i class="fa-solid fa-trash"></i>
</a>
{{/if}}
</div>
</span>
{{#if damage}}
{{#if useCritDamage}}
{{> "systems/daggerheart/templates/dialogs/tagTeamDialog/parts/tagTeamDamageParts.hbs" damage=critDamage isCritical=true }}
{{else}}
{{> "systems/daggerheart/templates/dialogs/tagTeamDialog/parts/tagTeamDamageParts.hbs" damage=damage }}
{{/if}}
{{else}}
<span class="hint">{{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.makeYourRoll"}}</span>
{{/if}}
</div>
{{/if}}
</div>
{{#if member.hasRolled}}
<a class="select-roll-button" data-action="selectRoll" data-member-key="{{key}}">
<i class="{{#if member.selected}}fa-solid fa-circle-check{{else}}fa-regular fa-circle inactive{{/if}}"></i>
</a>
{{/if}}
</fieldset>
{{/each}}
</div>
<div class="results-container"> <div class="results-container">
<span class="result-container-label">{{localize "DAGGERHEART.GENERAL.result.plural"}}</span> <span class="result-container-label">{{localize "DAGGERHEART.GENERAL.result.plural"}}</span>
<div class="results-inner-container"> <div class="results-inner-container">

View file

@ -4,13 +4,22 @@
<input type="text" name="elevation" value="{{elevation}}" {{disabled (or locked (and isGamePaused (not isGM)))}}> <input type="text" name="elevation" value="{{elevation}}" {{disabled (or locked (and isGamePaused (not isGM)))}}>
</div> </div>
<button type="button" class="control-icon" data-action="sort" data-direction="up" data-tooltip="HUD.ToFront"> <button type="button" class="control-icon" data-action="sort" data-tooltip="HUD.ToFrontOrBack">
<img src="{{icons.up}}"> <i class="fa-solid fa-arrow-down-arrow-up" inert></i>
</button> </button>
<button type="button" class="control-icon" data-action="sort" data-direction="down" data-tooltip="HUD.ToBack"> {{#if canChangeLevel}}
<img src="{{icons.down}}"> <button type="button" class="control-icon" data-action="togglePalette" data-palette="levels"
aria-label="{{ localize "HUD.ChangeLevel" }}" data-tooltip>
<i class="fa-solid fa-stairs" inert></i>
</button> </button>
<div class="palette palette-list" data-palette="levels">
{{#each levels as |level|}}
<a class="palette-list-entry {{level.cssClass}}" data-action="level" data-level-id="{{level.id}}"><span>{{level.name}}</span></a>
{{/each}}
</div>
{{/if}}
{{#if hasCompanion}} {{#if hasCompanion}}
<button type="button" class="control-icon clown-car" data-action="toggleCompanions" data-tooltip="{{#if companionOnCanvas}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.retrieveCompanionTokens"}}{{else}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.depositCompanionTokens"}}{{/if}}"> <button type="button" class="control-icon clown-car" data-action="toggleCompanions" data-tooltip="{{#if companionOnCanvas}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.retrieveCompanionTokens"}}{{else}}{{localize "DAGGERHEART.APPLICATIONS.HUD.tokenHUD.depositCompanionTokens"}}{{/if}}">
<img {{#if companionOnCanvas}}class="flipped"{{/if}} src="{{icons.toggleClowncar}}"> <img {{#if companionOnCanvas}}class="flipped"{{/if}} src="{{icons.toggleClowncar}}">

Some files were not shown because too many files have changed in this diff Show more