mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
Compare commits
No commits in common. "505cc634d356e903f2057c993d5fde5282dba584" and "5240186984ef8e7b57e4645a28b69465c95ee973" have entirely different histories.
505cc634d3
...
5240186984
31 changed files with 202 additions and 352 deletions
|
|
@ -175,14 +175,14 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
this.disadvantage = advantage === -1;
|
this.disadvantage = advantage === -1;
|
||||||
|
|
||||||
this.config.roll.advantage = this.config.roll.advantage === advantage ? 0 : advantage;
|
this.config.roll.advantage = this.config.roll.advantage === advantage ? 0 : advantage;
|
||||||
if (this.config.roll.advantage === 0) return this.render();
|
|
||||||
|
|
||||||
const defaultFaces =
|
if (this.config.roll.advantage === 1 && this.config.data.rules.roll.defaultAdvantageDice) {
|
||||||
this.config.roll.advantage === 1
|
const faces = Number.parseInt(this.config.data.rules.roll.defaultAdvantageDice);
|
||||||
? this.config.data.rules.roll.defaultAdvantageDice
|
|
||||||
: this.config.data.rules.roll.defaultDisadvantageDice;
|
|
||||||
const faces = Number.parseInt(defaultFaces);
|
|
||||||
this.roll.advantageFaces = Number.isNaN(faces) ? this.roll.advantageFaces : faces;
|
this.roll.advantageFaces = Number.isNaN(faces) ? this.roll.advantageFaces : faces;
|
||||||
|
} else if (this.config.roll.advantage === -1 && this.config.data.rules.roll.defaultDisadvantageDice) {
|
||||||
|
const faces = Number.parseInt(this.config.data.rules.roll.defaultDisadvantageDice);
|
||||||
|
this.roll.advantageFaces = Number.isNaN(faces) ? this.roll.advantageFaces : faces;
|
||||||
|
}
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ export default class DHActionBaseConfig extends DaggerheartSheet(ApplicationV2)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.action.parent.metadata.isInventoryItem) {
|
if (this.action.parent.metadata?.isQuantifiable) {
|
||||||
options.quantity = {
|
options.quantity = {
|
||||||
label: 'DAGGERHEART.GENERAL.itemQuantity',
|
label: 'DAGGERHEART.GENERAL.itemQuantity',
|
||||||
group: 'Global'
|
group: 'Global'
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,6 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
|
||||||
const partContext = await super._preparePartContext(partId, context);
|
const partContext = await super._preparePartContext(partId, context);
|
||||||
switch (partId) {
|
switch (partId) {
|
||||||
case 'details':
|
case 'details':
|
||||||
partContext.isItemEffect = partContext.isItemEffect || this.options.isSetting;
|
|
||||||
const useGeneric = game.settings.get(
|
const useGeneric = game.settings.get(
|
||||||
CONFIG.DH.id,
|
CONFIG.DH.id,
|
||||||
CONFIG.DH.SETTINGS.gameSettings.appearance
|
CONFIG.DH.SETTINGS.gameSettings.appearance
|
||||||
|
|
|
||||||
|
|
@ -184,9 +184,6 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
for (const input of form.querySelectorAll('input:not([type=search]), .editor.prosemirror')) {
|
for (const input of form.querySelectorAll('input:not([type=search]), .editor.prosemirror')) {
|
||||||
input.disabled = disabled;
|
input.disabled = disabled;
|
||||||
}
|
}
|
||||||
for (const element of form.querySelectorAll('.input[contenteditable]')) {
|
|
||||||
element.classList.toggle('disabled', disabled);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
|
|
@ -371,7 +368,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
const doc = getDocFromElementSync(target);
|
const doc = getDocFromElementSync(target);
|
||||||
return doc?.isOwner && !isItemWizardManaged(doc);
|
return doc?.isOwner && !isItemWizardManaged(doc);
|
||||||
},
|
},
|
||||||
onClick: async (event, target) => {
|
callback: async (target, event) => {
|
||||||
const doc = await getDocFromElement(target);
|
const doc = await getDocFromElement(target);
|
||||||
if (event.shiftKey) return doc.delete();
|
if (event.shiftKey) return doc.delete();
|
||||||
else return doc.deleteDialog();
|
else return doc.deleteDialog();
|
||||||
|
|
@ -396,7 +393,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
const doc = getDocFromElementSync(target);
|
const doc = getDocFromElementSync(target);
|
||||||
return doc?.isOwner && doc.system.inVault;
|
return doc?.isOwner && doc.system.inVault;
|
||||||
},
|
},
|
||||||
onClick: async (_, target) => {
|
callback: async target => {
|
||||||
const doc = await getDocFromElement(target);
|
const doc = await getDocFromElement(target);
|
||||||
const actorLoadout = doc.actor.system.loadoutSlot;
|
const actorLoadout = doc.actor.system.loadoutSlot;
|
||||||
if (actorLoadout.available) return doc.update({ 'system.inVault': false });
|
if (actorLoadout.available) return doc.update({ 'system.inVault': false });
|
||||||
|
|
@ -410,7 +407,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
const doc = getDocFromElementSync(target);
|
const doc = getDocFromElementSync(target);
|
||||||
return doc?.isOwner && doc.system.inVault;
|
return doc?.isOwner && doc.system.inVault;
|
||||||
},
|
},
|
||||||
onClick: async (event, target) => {
|
callback: async (target, event) => {
|
||||||
const doc = await getDocFromElement(target);
|
const doc = await getDocFromElement(target);
|
||||||
const actorLoadout = doc.actor.system.loadoutSlot;
|
const actorLoadout = doc.actor.system.loadoutSlot;
|
||||||
if (!actorLoadout.available) {
|
if (!actorLoadout.available) {
|
||||||
|
|
@ -449,7 +446,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
const doc = getDocFromElementSync(target);
|
const doc = getDocFromElementSync(target);
|
||||||
return doc?.isOwner && !doc.system.inVault;
|
return doc?.isOwner && !doc.system.inVault;
|
||||||
},
|
},
|
||||||
onClick: async (_, target) => (await getDocFromElement(target)).update({ 'system.inVault': true })
|
callback: async target => (await getDocFromElement(target)).update({ 'system.inVault': true })
|
||||||
}
|
}
|
||||||
].map(option => ({
|
].map(option => ({
|
||||||
...option,
|
...option,
|
||||||
|
|
@ -475,7 +472,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
const doc = getDocFromElementSync(target);
|
const doc = getDocFromElementSync(target);
|
||||||
return doc.isOwner && doc && !doc.system.equipped;
|
return doc.isOwner && doc && !doc.system.equipped;
|
||||||
},
|
},
|
||||||
onClick: (event, target) => CharacterSheet.#toggleEquipItem.call(this, event, target)
|
callback: (target, event) => CharacterSheet.#toggleEquipItem.call(this, event, target)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'unequip',
|
label: 'unequip',
|
||||||
|
|
@ -484,7 +481,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
const doc = getDocFromElementSync(target);
|
const doc = getDocFromElementSync(target);
|
||||||
return doc.isOwner && doc && doc.system.equipped;
|
return doc.isOwner && doc && doc.system.equipped;
|
||||||
},
|
},
|
||||||
onClick: (event, target) => CharacterSheet.#toggleEquipItem.call(this, event, target)
|
callback: (target, event) => CharacterSheet.#toggleEquipItem.call(this, event, target)
|
||||||
}
|
}
|
||||||
].map(option => ({
|
].map(option => ({
|
||||||
...option,
|
...option,
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
const target = element.closest('[data-item-uuid]');
|
const target = element.closest('[data-item-uuid]');
|
||||||
return !target.dataset.disabled && target.dataset.itemType !== 'beastform';
|
return !target.dataset.disabled && target.dataset.itemType !== 'beastform';
|
||||||
},
|
},
|
||||||
onClick: async (_, target) => (await getDocFromElement(target)).update({ disabled: true })
|
callback: async target => (await getDocFromElement(target)).update({ disabled: true })
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'enableEffect',
|
label: 'enableEffect',
|
||||||
|
|
@ -433,7 +433,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
const target = element.closest('[data-item-uuid]');
|
const target = element.closest('[data-item-uuid]');
|
||||||
return target.dataset.disabled && target.dataset.itemType !== 'beastform';
|
return target.dataset.disabled && target.dataset.itemType !== 'beastform';
|
||||||
},
|
},
|
||||||
onClick: async (_, target) => (await getDocFromElement(target)).update({ disabled: false })
|
callback: async target => (await getDocFromElement(target)).update({ disabled: false })
|
||||||
}
|
}
|
||||||
].map(option => ({
|
].map(option => ({
|
||||||
...option,
|
...option,
|
||||||
|
|
@ -478,9 +478,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
(doc?.isOwner && (!doc?.hasOwnProperty('systemPath') || doc?.inCollection))
|
(doc?.isOwner && (!doc?.hasOwnProperty('systemPath') || doc?.inCollection))
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
onClick: async (_, target) => {
|
callback: async target => (await getDocFromElement(target)).sheet.render({ force: true })
|
||||||
return (await getDocFromElement(target)).sheet.render({ force: true });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -495,7 +493,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
!foundry.utils.isEmpty(doc?.damage?.parts);
|
!foundry.utils.isEmpty(doc?.damage?.parts);
|
||||||
return doc?.isOwner && hasDamage;
|
return doc?.isOwner && hasDamage;
|
||||||
},
|
},
|
||||||
onClick: async (event, target) => {
|
callback: async (target, event) => {
|
||||||
const doc = await getDocFromElement(target),
|
const doc = await getDocFromElement(target),
|
||||||
action = doc?.system?.attack ?? doc;
|
action = doc?.system?.attack ?? doc;
|
||||||
const config = action.prepareConfig(event);
|
const config = action.prepareConfig(event);
|
||||||
|
|
@ -515,7 +513,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
const doc = getDocFromElementSync(target);
|
const doc = getDocFromElementSync(target);
|
||||||
return doc?.isOwner && !(doc.type === 'domainCard' && doc.system.inVault);
|
return doc?.isOwner && !(doc.type === 'domainCard' && doc.system.inVault);
|
||||||
},
|
},
|
||||||
onClick: async (event, target) => (await getDocFromElement(target)).use(event)
|
callback: async (target, event) => (await getDocFromElement(target)).use(event)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -523,7 +521,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
options.push({
|
options.push({
|
||||||
label: 'DAGGERHEART.APPLICATIONS.ContextMenu.sendToChat',
|
label: 'DAGGERHEART.APPLICATIONS.ContextMenu.sendToChat',
|
||||||
icon: 'fa-solid fa-message',
|
icon: 'fa-solid fa-message',
|
||||||
onClick: async (_, target) => (await getDocFromElement(target)).toChat(this.document.uuid)
|
callback: async target => (await getDocFromElement(target)).toChat(this.document.uuid)
|
||||||
});
|
});
|
||||||
|
|
||||||
if (deletable)
|
if (deletable)
|
||||||
|
|
@ -535,7 +533,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
const doc = getDocFromElementSync(target);
|
const doc = getDocFromElementSync(target);
|
||||||
return doc?.isOwner !== false && target.dataset.itemType !== 'beastform';
|
return doc?.isOwner !== false && target.dataset.itemType !== 'beastform';
|
||||||
},
|
},
|
||||||
onClick: async (event, target) => {
|
callback: async (target, event) => {
|
||||||
const doc = await getDocFromElement(target);
|
const doc = await getDocFromElement(target);
|
||||||
if (event.shiftKey) return doc.delete();
|
if (event.shiftKey) return doc.delete();
|
||||||
else return doc.deleteDialog();
|
else return doc.deleteDialog();
|
||||||
|
|
|
||||||
|
|
@ -166,15 +166,6 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add support for input content editables */
|
|
||||||
_toggleDisabled(disabled) {
|
|
||||||
super._toggleDisabled(disabled);
|
|
||||||
const form = this.form;
|
|
||||||
for (const element of form.querySelectorAll('.input[contenteditable]')) {
|
|
||||||
element.classList.toggle('disabled', disabled);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Context Menu */
|
/* Context Menu */
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
|
||||||
options.push({
|
options.push({
|
||||||
name: 'CONTROLS.CommonDelete',
|
name: 'CONTROLS.CommonDelete',
|
||||||
icon: '<i class="fa-solid fa-trash"></i>',
|
icon: '<i class="fa-solid fa-trash"></i>',
|
||||||
onClick: async (_, target) => {
|
callback: async target => {
|
||||||
const feature = await getDocFromElement(target);
|
const feature = await getDocFromElement(target);
|
||||||
if (!feature) return;
|
if (!feature) return;
|
||||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
icon: '<i class="fa-solid fa-dice"></i>',
|
icon: '<i class="fa-solid fa-dice"></i>',
|
||||||
visible: li => {
|
visible: li => {
|
||||||
const message = game.messages.get(li.dataset.messageId);
|
const message = game.messages.get(li.dataset.messageId);
|
||||||
return message.system.hasRoll && (game.user.isGM || message.isAuthor);
|
return game.user.isGM || message.isAuthor;
|
||||||
},
|
},
|
||||||
callback: async li => {
|
callback: async li => {
|
||||||
const message = game.messages.get(li.dataset.messageId);
|
const message = game.messages.get(li.dataset.messageId);
|
||||||
|
|
@ -128,8 +128,10 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
},
|
},
|
||||||
callback: async li => {
|
callback: async li => {
|
||||||
const message = game.messages.get(li.dataset.messageId);
|
const message = game.messages.get(li.dataset.messageId);
|
||||||
const update = await message.system.getRerolledDamage();
|
const damageRoll = new game.system.api.dice.DamageRoll(message.system.damage.hitPoints.roll);
|
||||||
message.update(update);
|
await message.system.action.workflow.get('damage')?.execute(message.system, message.id, true);
|
||||||
|
// message.update({ rolls: [reroll] });
|
||||||
|
console.log('test');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import { getDocFromElement } from '../../helpers/utils.mjs';
|
|
||||||
import { RefreshType, socketEvent } from '../../systemRegistration/socket.mjs';
|
import { RefreshType, socketEvent } from '../../systemRegistration/socket.mjs';
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
@ -48,8 +47,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
expandContent: this.expandContent,
|
expandContent: this.expandContent,
|
||||||
resetFilters: this.resetFilters,
|
resetFilters: this.resetFilters,
|
||||||
sortList: this.sortList,
|
sortList: this.sortList,
|
||||||
openSettings: this.openSettings,
|
openSettings: this.openSettings
|
||||||
viewSheet: this.#onViewSheet
|
|
||||||
},
|
},
|
||||||
position: {
|
position: {
|
||||||
left: 100,
|
left: 100,
|
||||||
|
|
@ -308,8 +306,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
{
|
{
|
||||||
items: this.items,
|
items: this.items,
|
||||||
menu: this.selectedMenu,
|
menu: this.selectedMenu,
|
||||||
formatLabel: this.formatLabel,
|
formatLabel: this.formatLabel
|
||||||
viewSheet: this.items[0] instanceof Actor
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -571,11 +568,6 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #onViewSheet(_, target) {
|
|
||||||
const document = await getDocFromElement(target);
|
|
||||||
document?.sheet?.render(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
_createDragProcess() {
|
_createDragProcess() {
|
||||||
new foundry.applications.ux.DragDrop.implementation({
|
new foundry.applications.ux.DragDrop.implementation({
|
||||||
dragSelector: '.item-container',
|
dragSelector: '.item-container',
|
||||||
|
|
@ -614,16 +606,7 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
items: {
|
items: {
|
||||||
folder: 'equipments',
|
folder: 'equipments',
|
||||||
render: {
|
render: {
|
||||||
folders: [
|
noFolder: true
|
||||||
'equipments',
|
|
||||||
'ancestries',
|
|
||||||
'classes',
|
|
||||||
'subclasses',
|
|
||||||
'domains',
|
|
||||||
'communities',
|
|
||||||
'beastforms'
|
|
||||||
// excluded: features
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
compendium: {}
|
compendium: {}
|
||||||
|
|
|
||||||
|
|
@ -148,14 +148,10 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Returns true if the action is usable */
|
||||||
* Returns true if the action is usable.
|
|
||||||
* An action is usable on any actor type. For example, an adversary might have a base attack action.
|
|
||||||
*/
|
|
||||||
get usable() {
|
get usable() {
|
||||||
const actor = this.actor;
|
const actor = this.actor;
|
||||||
const pack = actor?.pack ? game.packs.get(actor.pack) : null;
|
return this.isOwner && actor?.type === 'character';
|
||||||
return !pack?.locked && this.isOwner;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static getRollType(parent) {
|
static getRollType(parent) {
|
||||||
|
|
|
||||||
|
|
@ -130,41 +130,6 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Change how damage data is stored somehow to enable better rerolling */
|
|
||||||
async getRerolledDamage() {
|
|
||||||
if (!this.damage) return;
|
|
||||||
|
|
||||||
const rerolls = [];
|
|
||||||
const update = { system: { damage: {} } };
|
|
||||||
for (const partKey in this.damage) {
|
|
||||||
const part = this.damage[partKey];
|
|
||||||
const testRoll = Roll.fromData(part.parts[0].roll);
|
|
||||||
const rerolled = await testRoll.reroll();
|
|
||||||
rerolls.push(rerolled);
|
|
||||||
|
|
||||||
if (!update.system.damage[partKey]) update.system.damage[partKey] = { parts: [part.parts[0]] };
|
|
||||||
const partData = update.system.damage[partKey].parts[0];
|
|
||||||
update.system.damage[partKey].total = rerolled.total;
|
|
||||||
partData.modifierTotal = rerolled.terms.reduce((acc, x) => {
|
|
||||||
if (x.isDeterministic && !x.operator) acc += x.total;
|
|
||||||
return acc;
|
|
||||||
}, 0);
|
|
||||||
partData.dice = rerolled.dice;
|
|
||||||
partData.total = rerolled.total;
|
|
||||||
partData.roll = rerolled.toJSON();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (game.modules.get('dice-so-nice')?.active) {
|
|
||||||
for (const roll of rerolls) {
|
|
||||||
await game.dice3d.showForRoll(roll, game.user, true);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
foundry.audio.AudioHelper.play({ src: CONFIG.sounds.dice });
|
|
||||||
}
|
|
||||||
|
|
||||||
return update;
|
|
||||||
}
|
|
||||||
|
|
||||||
registerTargetHook() {
|
registerTargetHook() {
|
||||||
if (!this.parent.isAuthor || !this.hasTarget) return;
|
if (!this.parent.isAuthor || !this.hasTarget) return;
|
||||||
if (this.targetMode && this.parent.targetHook !== null) {
|
if (this.targetMode && this.parent.targetHook !== null) {
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ export default class CostField extends fields.ArrayField {
|
||||||
static calcCosts(costs) {
|
static calcCosts(costs) {
|
||||||
const resources = CostField.getResources.call(this, costs);
|
const resources = CostField.getResources.call(this, costs);
|
||||||
let filteredCosts = costs;
|
let filteredCosts = costs;
|
||||||
if (this.parent?.isInventoryItem && this.parent.consumeOnUse === false) {
|
if (this.parent?.metadata.isQuantifiable && this.parent.consumeOnUse === false) {
|
||||||
filteredCosts = filteredCosts.filter(c => c.key !== 'quantity');
|
filteredCosts = filteredCosts.filter(c => c.key !== 'quantity');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,24 @@ export class DHActionRollData extends foundry.abstract.DataModel {
|
||||||
return formula;
|
return formula;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getModifier() {
|
||||||
|
const modifiers = [];
|
||||||
|
if (!this.parent?.actor) return modifiers;
|
||||||
|
switch (this.parent.actor.type) {
|
||||||
|
case 'companion':
|
||||||
|
case 'adversary':
|
||||||
|
if (this.type === CONFIG.DH.GENERAL.rollTypes.attack.id)
|
||||||
|
modifiers.push({
|
||||||
|
label: 'Bonus to Hit',
|
||||||
|
value: this.bonus ?? this.parent.actor.system.attack.roll.bonus ?? 0
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return modifiers;
|
||||||
|
}
|
||||||
|
|
||||||
get rollTrait() {
|
get rollTrait() {
|
||||||
if (this.parent?.actor?.type !== 'character') return null;
|
if (this.parent?.actor?.type !== 'character') return null;
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
|
|
@ -127,6 +145,7 @@ export default class RollField extends fields.EmbeddedDataField {
|
||||||
config.dialog.configure = RollField.getAutomation() ? !config.dialog.configure : config.dialog.configure;
|
config.dialog.configure = RollField.getAutomation() ? !config.dialog.configure : config.dialog.configure;
|
||||||
|
|
||||||
const roll = {
|
const roll = {
|
||||||
|
baseModifiers: this.roll.getModifier(),
|
||||||
label: 'Attack',
|
label: 'Attack',
|
||||||
type: this.roll?.type,
|
type: this.roll?.type,
|
||||||
trait: this.roll?.rollTrait,
|
trait: this.roll?.rollTrait,
|
||||||
|
|
|
||||||
|
|
@ -128,30 +128,8 @@ export default class D20Roll extends DHRoll {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getBaseModifiers() {
|
|
||||||
const modifiers = [];
|
|
||||||
const actor = foundry.utils.fromUuidSync(this.options.source.actor);
|
|
||||||
if (!actor) return modifiers;
|
|
||||||
switch (actor.type) {
|
|
||||||
case 'companion':
|
|
||||||
case 'adversary':
|
|
||||||
if (
|
|
||||||
this.options.roll.type === CONFIG.DH.GENERAL.rollTypes.attack.id ||
|
|
||||||
this.options.source.action === actor.system.attack.id
|
|
||||||
)
|
|
||||||
modifiers.push({
|
|
||||||
label: 'Bonus to Hit',
|
|
||||||
value: this.data.attack.roll.bonus ?? 0
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return modifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
applyBaseBonus() {
|
applyBaseBonus() {
|
||||||
const modifiers = this.getBaseModifiers();
|
const modifiers = foundry.utils.deepClone(this.options.roll.baseModifiers) ?? [];
|
||||||
|
|
||||||
modifiers.push(
|
modifiers.push(
|
||||||
...this.getBonus(
|
...this.getBonus(
|
||||||
|
|
@ -246,19 +224,4 @@ export default class D20Roll extends DHRoll {
|
||||||
resetFormula() {
|
resetFormula() {
|
||||||
return (this._formula = this.constructor.getFormula(this.terms));
|
return (this._formula = this.constructor.getFormula(this.terms));
|
||||||
}
|
}
|
||||||
|
|
||||||
async reroll(options) {
|
|
||||||
const result = await super.reroll(options);
|
|
||||||
if (this instanceof game.system.api.dice.DualityRoll) return result;
|
|
||||||
|
|
||||||
if (options?.liveRoll) {
|
|
||||||
if (game.modules.get('dice-so-nice')?.active) {
|
|
||||||
await game.dice3d.showForRoll(result, game.user, true);
|
|
||||||
} else {
|
|
||||||
foundry.audio.AudioHelper.play({ src: CONFIG.sounds.dice });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,7 @@ export default class DamageRoll extends DHRoll {
|
||||||
if (config.evaluate !== false) for (const roll of config.roll) await roll.roll.evaluate();
|
if (config.evaluate !== false) for (const roll of config.roll) await roll.roll.evaluate();
|
||||||
|
|
||||||
roll._evaluated = true;
|
roll._evaluated = true;
|
||||||
|
const parts = config.roll.map(r => this.postEvaluate(r));
|
||||||
const parts = [];
|
|
||||||
for (const roll of config.roll) {
|
|
||||||
parts.push(this.postEvaluate(roll));
|
|
||||||
roll.roll = JSON.stringify(roll.roll.toJSON());
|
|
||||||
}
|
|
||||||
|
|
||||||
config.damage = this.unifyDamageRoll(parts);
|
config.damage = this.unifyDamageRoll(parts);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,22 +150,14 @@ export default class DualityRoll extends D20Roll {
|
||||||
}
|
}
|
||||||
|
|
||||||
applyAdvantage() {
|
applyAdvantage() {
|
||||||
const advDieClass = this.hasAdvantage
|
if (this.hasAdvantage || this.hasDisadvantage) {
|
||||||
? game.system.api.dice.diceTypes.AdvantageDie
|
const dieFaces = this.advantageFaces,
|
||||||
: this.hasDisadvantage
|
advDie = new foundry.dice.terms.Die({ faces: dieFaces, number: this.advantageNumber });
|
||||||
? game.system.api.dice.diceTypes.DisadvantageDie
|
|
||||||
: null;
|
|
||||||
if (advDieClass) {
|
|
||||||
const advDie = new advDieClass({ faces: this.advantageFaces, number: this.advantageNumber });
|
|
||||||
if (this.terms.length < 4) {
|
|
||||||
if (this.advantageNumber > 1) advDie.modifiers = ['kh'];
|
if (this.advantageNumber > 1) advDie.modifiers = ['kh'];
|
||||||
this.terms.push(
|
this.terms.push(
|
||||||
new foundry.dice.terms.OperatorTerm({ operator: this.hasDisadvantage ? '-' : '+' }),
|
new foundry.dice.terms.OperatorTerm({ operator: this.hasDisadvantage ? '-' : '+' }),
|
||||||
advDie
|
advDie
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
this.terms[4] = advDie;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.rallyFaces)
|
if (this.rallyFaces)
|
||||||
this.terms.push(
|
this.terms.push(
|
||||||
|
|
|
||||||
|
|
@ -73,10 +73,8 @@ export default class DHItem extends foundry.documents.Item {
|
||||||
/** Returns true if the item can be used */
|
/** Returns true if the item can be used */
|
||||||
get usable() {
|
get usable() {
|
||||||
const actor = this.actor;
|
const actor = this.actor;
|
||||||
const pack = actor?.pack ? game.packs.get(actor.pack) : null;
|
const actionsList = this.system.actionsList;
|
||||||
const hasActions = this.system.actionsList?.size || this.system.actionsList?.length;
|
return this.isOwner && actor?.type === 'character' && (actionsList?.size || actionsList?.length);
|
||||||
const isValidType = actor?.type === 'character' || this.type === 'feature';
|
|
||||||
return !pack?.locked && this.isOwner && isValidType && hasActions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
@import '../../utils/mixin.less';
|
|
||||||
|
|
||||||
.theme-light .daggerheart.dialog.dh-style.views.tag-team-dialog {
|
.theme-light .daggerheart.dialog.dh-style.views.tag-team-dialog {
|
||||||
.initialization-container .members-container .member-container {
|
.initialization-container .members-container .member-container {
|
||||||
.member-name {
|
.member-name {
|
||||||
|
|
@ -64,7 +62,17 @@
|
||||||
|
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
text-shadow: 1px 1px 2px var(--shadow-color), 0 0 10px var(--shadow-color);
|
text-shadow: 1px 1px 2px var(--shadow-color), 0 0 10px var(--shadow-color);
|
||||||
.smooth-gradient-ease-in-out(background-image, to bottom, var(--shadow-color), 100%);
|
|
||||||
|
// Basic "scrim" gradient
|
||||||
|
background-image: linear-gradient(
|
||||||
|
to top,
|
||||||
|
var(--shadow-color),
|
||||||
|
rgba(from var(--shadow-color) r g b / 0.834) 10.6%,
|
||||||
|
rgba(from var(--shadow-color) r g b / 0.541) 34%,
|
||||||
|
rgba(from var(--shadow-color) r g b / 0.382) 47%,
|
||||||
|
rgba(from var(--shadow-color) r g b / 0.194) 65%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
.attribution-header-label {
|
.attribution-header-label {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
color: @color-text-subtle;
|
color: light-dark(@chat-blue-bg, @beige-50);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab.inventory {
|
.tab.inventory {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
.profile {
|
.profile {
|
||||||
height: 235px;
|
height: 235px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
.smooth-gradient-ease-in-out(mask-image, to top, black, 2.25rem);
|
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.actor-name {
|
.actor-name {
|
||||||
|
|
@ -24,16 +24,11 @@
|
||||||
margin-bottom: -30px;
|
margin-bottom: -30px;
|
||||||
|
|
||||||
input[type='text'] {
|
input[type='text'] {
|
||||||
backdrop-filter: none;
|
|
||||||
border: none;
|
|
||||||
font-family: @font-title;
|
|
||||||
font-size: var(--font-size-24);
|
font-size: var(--font-size-24);
|
||||||
outline: 2px solid transparent;
|
height: 32px;
|
||||||
box-shadow: unset;
|
|
||||||
text-shadow: 0 0 4px light-dark(white, @dark-80), 0 0 8px light-dark(white, @dark-80), 0 0 14px light-dark(white, @dark-80);
|
|
||||||
|
|
||||||
height: 2rem;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
outline: 2px solid transparent;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
@ -248,7 +243,7 @@
|
||||||
.companion-navigation {
|
.companion-navigation {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-items: baseline;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
@import '../../../utils/colors.less';
|
@import '../../../utils/colors.less';
|
||||||
@import '../../../utils/fonts.less';
|
@import '../../../utils/fonts.less';
|
||||||
@import '../../../utils/mixin.less';
|
|
||||||
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.environment {
|
.application.sheet.daggerheart.actor.dh-style.environment {
|
||||||
.environment-header-sheet {
|
.environment-header-sheet {
|
||||||
|
|
@ -11,53 +10,28 @@
|
||||||
|
|
||||||
.profile {
|
.profile {
|
||||||
height: 235px;
|
height: 235px;
|
||||||
|
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
.smooth-gradient-ease-in-out(mask-image, to top, black, 3.5rem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-container {
|
.item-container {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-auto-flow: row;
|
|
||||||
grid-template-columns: 1fr min-content;
|
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -36px;
|
top: -45px;
|
||||||
gap: 0 var(--spacer-12);
|
gap: 20px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
margin-bottom: -26px;
|
margin-bottom: -30px;
|
||||||
|
|
||||||
.item-name input[type='text'] {
|
.item-info {
|
||||||
backdrop-filter: none;
|
display: flex;
|
||||||
border: none;
|
flex-direction: column;
|
||||||
font-family: @font-title;
|
gap: 8px;
|
||||||
font-size: var(--font-size-32);
|
|
||||||
text-align: start;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
outline: 2px solid transparent;
|
|
||||||
box-shadow: none;
|
|
||||||
text-shadow: 0 0 4px light-dark(white, @dark-80), 0 0 8px light-dark(white, @dark-80), 0 0 14px light-dark(white, @dark-80);
|
|
||||||
|
|
||||||
padding-left: 0;
|
|
||||||
height: 2.625rem;
|
|
||||||
|
|
||||||
&:hover[type='text'],
|
|
||||||
&:focus[type='text'] {
|
|
||||||
box-shadow: none;
|
|
||||||
outline: 2px solid light-dark(@dark-blue, @golden);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.flexrow {
|
|
||||||
align-items: baseline;
|
|
||||||
grid-column: span 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tags {
|
.tags {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
flex: 0;
|
|
||||||
|
|
||||||
.tag {
|
.tag {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -67,7 +41,6 @@
|
||||||
padding: 3px 5px;
|
padding: 3px 5px;
|
||||||
font-size: var(--font-size-12);
|
font-size: var(--font-size-12);
|
||||||
font: @font-body;
|
font: @font-body;
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
background: light-dark(@dark-15, @beige-15);
|
background: light-dark(@dark-15, @beige-15);
|
||||||
border: 1px solid light-dark(@dark, @beige);
|
border: 1px solid light-dark(@dark, @beige);
|
||||||
|
|
@ -84,8 +57,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.attribution-header-label {
|
.attribution-header-label {
|
||||||
text-align: right;
|
text-align: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
top: 4px;
|
||||||
|
margin-bottom: -6px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-number {
|
.status-number {
|
||||||
|
|
@ -105,7 +81,7 @@
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: light-dark(#e8e6e3, @dark-blue);
|
background: light-dark(transparent, @dark-blue);
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
||||||
&.armor-slots {
|
&.armor-slots {
|
||||||
|
|
@ -117,7 +93,7 @@
|
||||||
.status-label {
|
.status-label {
|
||||||
padding: 2px 10px;
|
padding: 2px 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 0 0 3px 3px;
|
border-radius: 3px;
|
||||||
background: light-dark(@dark-blue, @golden);
|
background: light-dark(@dark-blue, @golden);
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
|
|
@ -129,23 +105,37 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-name {
|
||||||
|
input[type='text'] {
|
||||||
|
font-size: var(--font-size-32);
|
||||||
|
height: 42px;
|
||||||
|
text-align: start;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
|
||||||
|
&:hover[type='text'],
|
||||||
|
&:focus[type='text'] {
|
||||||
|
box-shadow: none;
|
||||||
|
outline: 2px solid light-dark(@dark-blue, @golden);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.environment-info {
|
.environment-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--spacer-8);
|
gap: 12px;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.environment-navigation {
|
.environment-navigation {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
align-items: baseline;
|
align-items: center;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
.tab-navigation {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@
|
||||||
.appTheme({
|
.appTheme({
|
||||||
&.environment {
|
&.environment {
|
||||||
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||||
|
|
||||||
|
.attribution-header-label {
|
||||||
|
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
&.environment {
|
&.environment {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
@import '../../../utils/colors.less';
|
@import '../../../utils/colors.less';
|
||||||
@import '../../../utils/fonts.less';
|
@import '../../../utils/fonts.less';
|
||||||
@import '../../../utils/mixin.less';
|
|
||||||
|
|
||||||
.party-header-sheet {
|
.party-header-sheet {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -10,32 +9,28 @@
|
||||||
|
|
||||||
.profile {
|
.profile {
|
||||||
height: 235px;
|
height: 235px;
|
||||||
|
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
.smooth-gradient-ease-in-out(mask-image, to top, black, 3.5rem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-container {
|
.item-container {
|
||||||
margin-top: -2rem;
|
.item-name {
|
||||||
z-index: 1;
|
padding: 0 20px;
|
||||||
input.item-name[type='text'] {
|
input[type='text'] {
|
||||||
backdrop-filter: none;
|
font-size: 32px;
|
||||||
border: none;
|
height: 42px;
|
||||||
font-family: @font-title;
|
|
||||||
font-size: var(--font-size-32);
|
|
||||||
outline: 2px solid transparent;
|
|
||||||
box-shadow: unset;
|
|
||||||
text-shadow: 0 0 4px light-dark(white, @dark-80), 0 0 8px light-dark(white, @dark-80), 0 0 14px light-dark(white, @dark-80);
|
|
||||||
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
width: calc(100% - 40px);
|
outline: 2px solid transparent;
|
||||||
height: 2.625rem;
|
border: 1px solid transparent;
|
||||||
|
|
||||||
&:hover[type='text'],
|
&:hover[type='text'],
|
||||||
&:focus[type='text'] {
|
&:focus[type='text'] {
|
||||||
|
box-shadow: none;
|
||||||
outline: 2px solid light-dark(@dark-blue, @golden);
|
outline: 2px solid light-dark(@dark-blue, @golden);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-list-header,
|
.item-list-header,
|
||||||
.item-list .item-info[data-action] {
|
.item-list [data-action='expandContent'] {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
> * {
|
> * {
|
||||||
|
|
|
||||||
|
|
@ -83,8 +83,6 @@
|
||||||
--gradient-stress: linear-gradient(15deg, rgb(130, 59, 1) 0%, rgb(252, 142, 69) 65%, rgb(190, 0, 0) 100%);
|
--gradient-stress: linear-gradient(15deg, rgb(130, 59, 1) 0%, rgb(252, 142, 69) 65%, rgb(190, 0, 0) 100%);
|
||||||
|
|
||||||
--primary-color-fear: rgba(9, 71, 179, 0.75);
|
--primary-color-fear: rgba(9, 71, 179, 0.75);
|
||||||
|
|
||||||
--dh-color-text-subtle: light-dark(#555, #a29086);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@primary-blue: var(--primary-blue, #1488cc);
|
@primary-blue: var(--primary-blue, #1488cc);
|
||||||
|
|
@ -192,5 +190,3 @@
|
||||||
box-shadow: 0 0 2px 2px @dark-blue;
|
box-shadow: 0 0 2px 2px @dark-blue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@color-text-subtle: var(--dh-color-text-subtle);
|
|
||||||
|
|
@ -114,48 +114,3 @@
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// A simple ease-out mask
|
|
||||||
.smooth-gradient-ease-out(@param, @to, @destination, @length) {
|
|
||||||
@{param}+: linear-gradient(
|
|
||||||
@to,
|
|
||||||
transparent 0%,
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.013)") calc(0.008 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.049)") calc(0.029 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.104)") calc(0.064 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.259)") calc(0.166 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.45)") calc(0.304 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.741)") calc(0.554 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.825)") calc(0.644 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.896)") calc(0.735 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.951)") calc(0.825 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.987)") calc(0.914 * @length),
|
|
||||||
@destination @length
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A simple ease in and out mask.
|
|
||||||
* @param - the parameter to add to
|
|
||||||
* @param - direction, such as "to top"
|
|
||||||
* @destination - the color at the destination. The origin is always transparent
|
|
||||||
* @length - the value at the destination
|
|
||||||
*/
|
|
||||||
.smooth-gradient-ease-in-out(@param, @to, @destination, @length: 100%) {
|
|
||||||
@{param}+: linear-gradient(
|
|
||||||
@to,
|
|
||||||
transparent 0%,
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.013)") calc(0.081 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.049)") calc(0.155 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.104)") calc(0.225 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.259)") calc(0.353 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.45)") calc(0.471 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.741)") calc(0.647 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.825)") calc(0.71 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.896)") calc(0.775 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.951)") calc(0.845 * @length),
|
|
||||||
rgb(from @destination r g b / ~"calc(alpha * 0.987)") calc(0.914 * @length),
|
|
||||||
@destination @length
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,16 @@
|
||||||
{{formGroup systemFields.targetDispositions value=source.system.targetDispositions name=(concat "system.targetDispositions") localize=true}}
|
{{formGroup systemFields.targetDispositions value=source.system.targetDispositions name=(concat "system.targetDispositions") localize=true}}
|
||||||
|
|
||||||
{{#if isActorEffect}}
|
{{#if isActorEffect}}
|
||||||
{{formGroup fields.origin value=source.origin rootId=rootId disabled=true}}
|
<div class="form-group">
|
||||||
{{else if isItemEffect}}
|
<label>{{localize "EFFECT.FIELDS.origin.label"}}</label>
|
||||||
{{formGroup fields.transfer value=source.transfer rootId=rootId}}
|
<div class="form-fields">
|
||||||
|
<input type="text" value="{{source.origin}}" disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if isItemEffect}}
|
||||||
|
{{formGroup fields.transfer value=source.transfer rootId=rootId label=legacyTransfer.label hint=(localize "DAGGERHEART.EFFECTS.Attachments.transferHint")}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{formGroup fields.statuses value=source.statuses options=statuses rootId=rootId classes="statuses"}}
|
{{formGroup fields.statuses value=source.statuses options=statuses rootId=rootId classes="statuses"}}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,9 @@
|
||||||
<header class='environment-header-sheet'>
|
<header class='environment-header-sheet'>
|
||||||
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
|
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
|
||||||
<div class='item-container'>
|
<div class='item-container'>
|
||||||
|
<div class="item-info">
|
||||||
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
|
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
|
||||||
<div class="status-number">
|
<div class="flexcol">
|
||||||
<div class='status-value armor-slots'>
|
|
||||||
{{#if source.system.difficulty}}
|
|
||||||
<p>{{source.system.difficulty}}</p>
|
|
||||||
{{else}}
|
|
||||||
<p>-</p>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<div class="status-label">
|
|
||||||
<h4>{{localize "DAGGERHEART.GENERAL.difficulty"}}</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flexrow">
|
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<div class="tag">
|
<div class="tag">
|
||||||
<span>
|
<span>
|
||||||
|
|
@ -34,6 +23,19 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="status-number">
|
||||||
|
<div class='status-value armor-slots'>
|
||||||
|
{{#if source.system.difficulty}}
|
||||||
|
<p>{{source.system.difficulty}}</p>
|
||||||
|
{{else}}
|
||||||
|
<p>-</p>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="status-label">
|
||||||
|
<h4>{{localize "DAGGERHEART.GENERAL.difficulty"}}</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<line-div></line-div>
|
<line-div></line-div>
|
||||||
<div class="environment-info">
|
<div class="environment-info">
|
||||||
<span class="description">
|
<span class="description">
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
|
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
|
||||||
<div class='item-container'>
|
<div class='item-container'>
|
||||||
<div class="item-info">
|
<div class="item-info">
|
||||||
<input class="item-name" type='text' name='name' value='{{source.name}}' autocomplete="off" spellcheck="false"/>
|
<h1 class='item-name'>
|
||||||
|
<input type='text' name='name' value='{{source.name}}' autocomplete="off" spellcheck="false"/>
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
(hasProperty item "toChat" ) "toChat" "editDoc" ) }}' {{#unless hideTooltip}} {{#if (eq type 'attack' )}}
|
(hasProperty item "toChat" ) "toChat" "editDoc" ) }}' {{#unless hideTooltip}} {{#if (eq type 'attack' )}}
|
||||||
data-tooltip="#attack#{{item.actor.uuid}}" {{else}} data-tooltip="#item#{{item.uuid}}" {{/if}} {{/unless}}>
|
data-tooltip="#attack#{{item.actor.uuid}}" {{else}} data-tooltip="#item#{{item.uuid}}" {{/if}} {{/unless}}>
|
||||||
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" />
|
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" />
|
||||||
{{#if item.usable}}
|
{{#if (or item.system.actionsList.size item.system.actionsList.length item.actionType)}}
|
||||||
{{#if @root.isNPC}}
|
{{#if @root.isNPC}}
|
||||||
<img class="roll-img d20" src="systems/daggerheart/assets/icons/dice/default/d20.svg" alt="d20">
|
<img class="roll-img d20" src="systems/daggerheart/assets/icons/dice/default/d20.svg" alt="d20">
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{{#each items}}
|
{{#each items}}
|
||||||
<div class="item-container" data-item-uuid="{{uuid}}" draggable="true">
|
<div class="item-container" data-item-uuid="{{uuid}}" draggable="true">
|
||||||
<div class="item-header">
|
<div class="item-header">
|
||||||
<div class="item-info" {{#if @root.viewSheet}}data-action="viewSheet"{{else}}data-action="expandContent"{{/if}}>
|
<div class="item-info" data-action="expandContent">
|
||||||
<img src="{{img}}" data-item-key="img" class="item-list-img">
|
<img src="{{img}}" data-item-key="img" class="item-list-img">
|
||||||
<span data-item-key="name" class="item-list-name">{{name}}</span>
|
<span data-item-key="name" class="item-list-name">{{name}}</span>
|
||||||
{{#each ../menu.data.columns}}
|
{{#each ../menu.data.columns}}
|
||||||
|
|
@ -9,13 +9,11 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{#unless viewSheet}}
|
|
||||||
<div class="item-desc extensible">
|
<div class="item-desc extensible">
|
||||||
<span class="wrapper">
|
<span class="wrapper">
|
||||||
{{{system.enrichedTags}}}
|
{{{system.enrichedTags}}}
|
||||||
{{{system.enrichedDescription}}}
|
{{{system.enrichedDescription}}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue