mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
Merge branch 'main' into bug/229-Narrative-Countdown-Window
This commit is contained in:
commit
939712f8f8
91 changed files with 3499 additions and 1423 deletions
|
|
@ -124,6 +124,7 @@ Hooks.once('init', () => {
|
||||||
|
|
||||||
CONFIG.ui.resources = Resources;
|
CONFIG.ui.resources = Resources;
|
||||||
CONFIG.ux.ContextMenu = applications.DhContextMenu;
|
CONFIG.ux.ContextMenu = applications.DhContextMenu;
|
||||||
|
CONFIG.ux.TooltipManager = applications.DhTooltipManager;
|
||||||
|
|
||||||
game.socket.on(`system.${SYSTEM.id}`, handleSocketEvent);
|
game.socket.on(`system.${SYSTEM.id}`, handleSocketEvent);
|
||||||
|
|
||||||
|
|
@ -289,7 +290,6 @@ const preloadHandlebarsTemplates = async function () {
|
||||||
'systems/daggerheart/templates/sheets/global/partials/action-item.hbs',
|
'systems/daggerheart/templates/sheets/global/partials/action-item.hbs',
|
||||||
'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs',
|
'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs',
|
||||||
'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs',
|
'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs',
|
||||||
|
|
||||||
'systems/daggerheart/templates/sheets/parts/attributes.hbs',
|
'systems/daggerheart/templates/sheets/parts/attributes.hbs',
|
||||||
'systems/daggerheart/templates/sheets/parts/defense.hbs',
|
'systems/daggerheart/templates/sheets/parts/defense.hbs',
|
||||||
'systems/daggerheart/templates/sheets/parts/armor.hbs',
|
'systems/daggerheart/templates/sheets/parts/armor.hbs',
|
||||||
|
|
@ -303,10 +303,6 @@ const preloadHandlebarsTemplates = async function () {
|
||||||
'systems/daggerheart/templates/sheets/parts/heritage.hbs',
|
'systems/daggerheart/templates/sheets/parts/heritage.hbs',
|
||||||
'systems/daggerheart/templates/sheets/parts/subclassFeature.hbs',
|
'systems/daggerheart/templates/sheets/parts/subclassFeature.hbs',
|
||||||
'systems/daggerheart/templates/sheets/parts/effects.hbs',
|
'systems/daggerheart/templates/sheets/parts/effects.hbs',
|
||||||
'systems/daggerheart/templates/sheets/character/sections/inventory.hbs',
|
|
||||||
'systems/daggerheart/templates/sheets/character/sections/loadout.hbs',
|
|
||||||
'systems/daggerheart/templates/sheets/character/parts/heritageCard.hbs',
|
|
||||||
'systems/daggerheart/templates/sheets/character/parts/advancementCard.hbs',
|
|
||||||
'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-features.hbs',
|
'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-features.hbs',
|
||||||
'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-feature.hbs',
|
'systems/daggerheart/templates/sheets/items/subclass/parts/subclass-feature.hbs',
|
||||||
'systems/daggerheart/templates/components/card-preview.hbs',
|
'systems/daggerheart/templates/components/card-preview.hbs',
|
||||||
|
|
|
||||||
118
lang/en.json
118
lang/en.json
|
|
@ -192,6 +192,10 @@
|
||||||
"Full": "Disadvantage",
|
"Full": "Disadvantage",
|
||||||
"Short": "Dis"
|
"Short": "Dis"
|
||||||
},
|
},
|
||||||
|
"Neutral": {
|
||||||
|
"Full": "None",
|
||||||
|
"Short": "no"
|
||||||
|
},
|
||||||
"OK": "OK",
|
"OK": "OK",
|
||||||
"Cancel": "Cancel",
|
"Cancel": "Cancel",
|
||||||
"Or": "Or",
|
"Or": "Or",
|
||||||
|
|
@ -223,12 +227,22 @@
|
||||||
"Major": "Major",
|
"Major": "Major",
|
||||||
"Minor": "Minor",
|
"Minor": "Minor",
|
||||||
"None": "None"
|
"None": "None"
|
||||||
}
|
},
|
||||||
|
"tabs": {
|
||||||
|
"details": "Details",
|
||||||
|
"attack": "Attack",
|
||||||
|
"experiences": "Experiences",
|
||||||
|
"features": "Features",
|
||||||
|
"actions": "Actions",
|
||||||
|
"potentialAdversaries": "Potential Adversaries",
|
||||||
|
"adversaries": "Adversaries"
|
||||||
|
},
|
||||||
|
"basics": "Basics"
|
||||||
},
|
},
|
||||||
"ActionType": {
|
"ActionType": {
|
||||||
"Passive": "Passive",
|
"passive": "Passive",
|
||||||
"Action": "Action",
|
"action": "Action",
|
||||||
"Reaction": "Reaction"
|
"reaction": "Reaction"
|
||||||
},
|
},
|
||||||
"Abilities": {
|
"Abilities": {
|
||||||
"agility": {
|
"agility": {
|
||||||
|
|
@ -312,45 +326,45 @@
|
||||||
},
|
},
|
||||||
"Adversary": {
|
"Adversary": {
|
||||||
"Type": {
|
"Type": {
|
||||||
"Bruiser": {
|
"bruiser": {
|
||||||
"label": "Bruiser",
|
"label": "Bruiser",
|
||||||
"Description": "Tough adversaries with powerful attacks."
|
"description": "Tough adversaries with powerful attacks."
|
||||||
},
|
},
|
||||||
"Horde": {
|
"horde": {
|
||||||
"label": "Horde",
|
"label": "Horde",
|
||||||
"Description": "A Horde represents a number of foes working in a group."
|
"description": "A Horde represents a number of foes working in a group."
|
||||||
},
|
},
|
||||||
"Leader": {
|
"leader": {
|
||||||
"label": "Leader",
|
"label": "Leader",
|
||||||
"Description": "Adversaries that command and summon other adversaries."
|
"description": "Adversaries that command and summon other adversaries."
|
||||||
},
|
},
|
||||||
"Minion": {
|
"minion": {
|
||||||
"label": "Minion",
|
"label": "Minion",
|
||||||
"Description": "Basic enemies that are easily dispatched but dangerous in numbers."
|
"description": "Basic enemies that are easily dispatched but dangerous in numbers."
|
||||||
},
|
},
|
||||||
"Ranged": {
|
"ranged": {
|
||||||
"label": "Ranged",
|
"label": "Ranged",
|
||||||
"Description": "Adversaries that attack from a distance."
|
"description": "Adversaries that attack from a distance."
|
||||||
},
|
},
|
||||||
"Skulk": {
|
"skulk": {
|
||||||
"label": "Skulk",
|
"label": "Skulk",
|
||||||
"Description": "Adversaries that maneuver and exploit opportunities to ambush their opponents."
|
"description": "Adversaries that maneuver and exploit opportunities to ambush their opponents."
|
||||||
},
|
},
|
||||||
"Social": {
|
"social": {
|
||||||
"label": "Social",
|
"label": "Social",
|
||||||
"Description": "Adversaries that are primarily interpersonal threats or challenges."
|
"description": "Adversaries that are primarily interpersonal threats or challenges."
|
||||||
},
|
},
|
||||||
"Solo": {
|
"solo": {
|
||||||
"label": "Solo",
|
"label": "Solo",
|
||||||
"Description": "Designed to present a challenge to a whole party."
|
"description": "Designed to present a challenge to a whole party."
|
||||||
},
|
},
|
||||||
"Standard": {
|
"standard": {
|
||||||
"label": "Standard",
|
"label": "Standard",
|
||||||
"Description": "Rank and File adversaries."
|
"description": "Rank and File adversaries."
|
||||||
},
|
},
|
||||||
"Support": {
|
"support": {
|
||||||
"label": "Support",
|
"label": "Support",
|
||||||
"Description": "Enemies that enhance their allies and/or disrupt their opponents."
|
"description": "Enemies that enhance their allies and/or disrupt their opponents."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Trait": {
|
"Trait": {
|
||||||
|
|
@ -373,19 +387,19 @@
|
||||||
},
|
},
|
||||||
"Environment": {
|
"Environment": {
|
||||||
"Type": {
|
"Type": {
|
||||||
"Exploration": {
|
"exploration": {
|
||||||
"label": "Exploration",
|
"label": "Exploration",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"Social": {
|
"social": {
|
||||||
"label": "Social",
|
"label": "Social",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"Traversal": {
|
"traversal": {
|
||||||
"label": "Traversal",
|
"label": "Traversal",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
"Event": {
|
"event": {
|
||||||
"label": "Event",
|
"label": "Event",
|
||||||
"description": ""
|
"description": ""
|
||||||
}
|
}
|
||||||
|
|
@ -1334,14 +1348,18 @@
|
||||||
},
|
},
|
||||||
"Tabs": {
|
"Tabs": {
|
||||||
"Main": "Data",
|
"Main": "Data",
|
||||||
"Information": "Information"
|
"Information": "Information",
|
||||||
|
"features": "Features",
|
||||||
|
"notes": "Notes",
|
||||||
|
"effects": "Effects"
|
||||||
},
|
},
|
||||||
"General": "General",
|
"General": "General",
|
||||||
"DamageThresholds": "Damage Thresholds",
|
"DamageThresholds": "Damage Thresholds",
|
||||||
"HitPoints": "Hit Points",
|
"HitPoints": "Hit Points",
|
||||||
"Stress": "Stress",
|
"Stress": "Stress",
|
||||||
"Experiences": "Experiences",
|
"Experiences": "Experiences",
|
||||||
"Attack": "Attack"
|
"Attack": "Attack",
|
||||||
|
"horderHp": "Horde/HP"
|
||||||
},
|
},
|
||||||
"Environment": {
|
"Environment": {
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
|
|
@ -1353,6 +1371,12 @@
|
||||||
},
|
},
|
||||||
"difficulty": {
|
"difficulty": {
|
||||||
"label": "Difficulty"
|
"label": "Difficulty"
|
||||||
|
},
|
||||||
|
"impulses": {
|
||||||
|
"label": "Impulses"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"label": "Description"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Tabs": {
|
"Tabs": {
|
||||||
|
|
@ -1566,9 +1590,11 @@
|
||||||
},
|
},
|
||||||
"Tooltip": {
|
"Tooltip": {
|
||||||
"openItemWorld": "Open Item World",
|
"openItemWorld": "Open Item World",
|
||||||
|
"openActorWorld": "Open Actor World",
|
||||||
"sendToChat": "Send to Chat",
|
"sendToChat": "Send to Chat",
|
||||||
"moreOptions": "More Options",
|
"moreOptions": "More Options",
|
||||||
"equip": "Equip",
|
"equip": "Equip",
|
||||||
|
"edit": "Edit",
|
||||||
"unequip": "Unequip",
|
"unequip": "Unequip",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"sendToVault": "Send to Vault",
|
"sendToVault": "Send to Vault",
|
||||||
|
|
@ -1576,29 +1602,29 @@
|
||||||
},
|
},
|
||||||
"Actions": {
|
"Actions": {
|
||||||
"Types": {
|
"Types": {
|
||||||
"Attack": {
|
"attack": {
|
||||||
"Name": "Attack"
|
"name": "Attack"
|
||||||
},
|
},
|
||||||
"Spellcast": {
|
"spellcast": {
|
||||||
"Name": "Spellcast"
|
"name": "Spellcast"
|
||||||
},
|
},
|
||||||
"Resource": {
|
"resource": {
|
||||||
"Name": "Resource"
|
"name": "Resource"
|
||||||
},
|
},
|
||||||
"Damage": {
|
"damage": {
|
||||||
"Name": "Damage"
|
"name": "Damage"
|
||||||
},
|
},
|
||||||
"Healing": {
|
"healing": {
|
||||||
"Name": "Healing"
|
"name": "Healing"
|
||||||
},
|
},
|
||||||
"Summon": {
|
"summon": {
|
||||||
"Name": "Summon"
|
"name": "Summon"
|
||||||
},
|
},
|
||||||
"Effect": {
|
"effect": {
|
||||||
"Name": "Effect"
|
"name": "Effect"
|
||||||
},
|
},
|
||||||
"Macro": {
|
"macro": {
|
||||||
"Name": "Macro"
|
"name": "Macro"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Settings": {
|
"Settings": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
export { default as DhCharacterSheet } from './sheets/character.mjs';
|
export { default as DhCharacterSheet } from './sheets/actors/character.mjs';
|
||||||
|
export { default as DhpAdversarySheet } from './sheets/actors/adversary.mjs';
|
||||||
export { default as DhCompanionSheet } from './sheets/companion.mjs';
|
export { default as DhCompanionSheet } from './sheets/companion.mjs';
|
||||||
export { default as DhpAdversarySheet } from './sheets/adversary.mjs';
|
|
||||||
export { default as DhpClassSheet } from './sheets/items/class.mjs';
|
export { default as DhpClassSheet } from './sheets/items/class.mjs';
|
||||||
export { default as DhpSubclass } from './sheets/items/subclass.mjs';
|
export { default as DhpSubclass } from './sheets/items/subclass.mjs';
|
||||||
export { default as DhpFeatureSheet } from './sheets/items/feature.mjs';
|
export { default as DhpFeatureSheet } from './sheets/items/feature.mjs';
|
||||||
|
|
@ -12,8 +12,9 @@ export { default as DhpConsumable } from './sheets/items/consumable.mjs';
|
||||||
export { default as DhpWeapon } from './sheets/items/weapon.mjs';
|
export { default as DhpWeapon } from './sheets/items/weapon.mjs';
|
||||||
export { default as DhpArmor } from './sheets/items/armor.mjs';
|
export { default as DhpArmor } from './sheets/items/armor.mjs';
|
||||||
export { default as DhpChatMessage } from './chatMessage.mjs';
|
export { default as DhpChatMessage } from './chatMessage.mjs';
|
||||||
export { default as DhpEnvironment } from './sheets/environment.mjs';
|
export { default as DhpEnvironment } from './sheets/actors/environment.mjs';
|
||||||
export { default as DhActiveEffectConfig } from './sheets/activeEffectConfig.mjs';
|
export { default as DhActiveEffectConfig } from './sheets/activeEffectConfig.mjs';
|
||||||
export { default as DhContextMenu } from './contextMenu.mjs';
|
export { default as DhContextMenu } from './contextMenu.mjs';
|
||||||
|
export { default as DhTooltipManager } from './tooltipManager.mjs';
|
||||||
|
|
||||||
export * as api from './sheets/api/_modules.mjs';
|
export * as api from './sheets/api/_modules.mjs';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/** NOT USED ANYMORE - TO BE DELETED **/
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
export default class NpcRollSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
export default class NpcRollSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import DamageDialog from '../dialogs/damageDialog.mjs';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export class DHRoll extends Roll {
|
export class DHRoll extends Roll {
|
||||||
|
baseTerms = [];
|
||||||
constructor(formula, data, options) {
|
constructor(formula, data, options) {
|
||||||
super(formula, data, options);
|
super(formula, data, options);
|
||||||
}
|
}
|
||||||
|
|
@ -37,6 +38,7 @@ export class DHRoll extends Roll {
|
||||||
if (config.dialog.configure !== false) {
|
if (config.dialog.configure !== false) {
|
||||||
// Open Roll Dialog
|
// Open Roll Dialog
|
||||||
const DialogClass = config.dialog?.class ?? this.DefaultDialog;
|
const DialogClass = config.dialog?.class ?? this.DefaultDialog;
|
||||||
|
console.log(roll, config)
|
||||||
const configDialog = await DialogClass.configure(roll, config, message);
|
const configDialog = await DialogClass.configure(roll, config, message);
|
||||||
if (!configDialog) return;
|
if (!configDialog) return;
|
||||||
}
|
}
|
||||||
|
|
@ -97,9 +99,27 @@ export class DHRoll extends Roll {
|
||||||
config.dialog.configure ??= !(config.event.shiftKey || config.event.altKey || config.event.ctrlKey);
|
config.dialog.configure ??= !(config.event.shiftKey || config.event.altKey || config.event.ctrlKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
formatModifier(modifier) {
|
||||||
|
const numTerm = modifier < 0 ? '-' : '+';
|
||||||
|
return [
|
||||||
|
new foundry.dice.terms.OperatorTerm({ operator: numTerm }),
|
||||||
|
new foundry.dice.terms.NumericTerm({ number: Math.abs(modifier) })
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
getFaces(faces) {
|
||||||
|
return Number((faces.startsWith('d') ? faces.replace('d', '') : faces));
|
||||||
|
}
|
||||||
|
|
||||||
constructFormula(config) {
|
constructFormula(config) {
|
||||||
// const formula = Roll.replaceFormulaData(this.options.roll.formula, config.data);
|
|
||||||
this.terms = Roll.parse(this.options.roll.formula, config.data);
|
this.terms = Roll.parse(this.options.roll.formula, config.data);
|
||||||
|
|
||||||
|
if (this.options.extraFormula) {
|
||||||
|
this.terms.push(
|
||||||
|
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
|
||||||
|
...this.constructor.parse(this.options.extraFormula, this.options.data)
|
||||||
|
);
|
||||||
|
}
|
||||||
return (this._formula = this.constructor.getFormula(this.terms));
|
return (this._formula = this.constructor.getFormula(this.terms));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -111,12 +131,9 @@ export class DualityDie extends foundry.dice.terms.Die {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class D20Roll extends DHRoll {
|
export class D20Roll extends DHRoll {
|
||||||
|
|
||||||
constructor(formula, data = {}, options = {}) {
|
constructor(formula, data = {}, options = {}) {
|
||||||
super(formula, data, options);
|
super(formula, data, options);
|
||||||
// this.createBaseDice();
|
|
||||||
// this.configureModifiers();
|
|
||||||
|
|
||||||
// this._formula = this.resetFormula();
|
|
||||||
this.constructFormula();
|
this.constructFormula();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,7 +156,7 @@ export class D20Roll extends DHRoll {
|
||||||
|
|
||||||
set d20(faces) {
|
set d20(faces) {
|
||||||
if (!(this.terms[0] instanceof foundry.dice.terms.Die)) this.createBaseDice();
|
if (!(this.terms[0] instanceof foundry.dice.terms.Die)) this.createBaseDice();
|
||||||
this.terms[0].faces = faces;
|
this.terms[0].faces = this.getFaces(faces);
|
||||||
}
|
}
|
||||||
|
|
||||||
get dAdvantage() {
|
get dAdvantage() {
|
||||||
|
|
@ -152,11 +169,11 @@ export class D20Roll extends DHRoll {
|
||||||
}
|
}
|
||||||
|
|
||||||
get hasAdvantage() {
|
get hasAdvantage() {
|
||||||
return this.options.advantage === this.constructor.ADV_MODE.ADVANTAGE;
|
return this.options.roll.advantage === this.constructor.ADV_MODE.ADVANTAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
get hasDisadvantage() {
|
get hasDisadvantage() {
|
||||||
return this.options.advantage === this.constructor.ADV_MODE.DISADVANTAGE;
|
return this.options.roll.advantage === this.constructor.ADV_MODE.DISADVANTAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static applyKeybindings(config) {
|
static applyKeybindings(config) {
|
||||||
|
|
@ -170,18 +187,55 @@ export class D20Roll extends DHRoll {
|
||||||
config.dialog.configure ??= !Object.values(keys).some(k => k);
|
config.dialog.configure ??= !Object.values(keys).some(k => k);
|
||||||
|
|
||||||
// Determine advantage mode
|
// Determine advantage mode
|
||||||
const advantage = config.advantage || keys.advantage;
|
const advantage = config.roll.advantage === this.ADV_MODE.ADVANTAGE || keys.advantage;
|
||||||
const disadvantage = config.disadvantage || keys.disadvantage;
|
const disadvantage = config.roll.advantage === this.ADV_MODE.DISADVANTAGE || keys.disadvantage;
|
||||||
if (advantage && !disadvantage) config.advantage = this.ADV_MODE.ADVANTAGE;
|
if (advantage && !disadvantage) config.roll.advantage = this.ADV_MODE.ADVANTAGE;
|
||||||
else if (!advantage && disadvantage) config.advantage = this.ADV_MODE.DISADVANTAGE;
|
else if (!advantage && disadvantage) config.roll.advantage = this.ADV_MODE.DISADVANTAGE;
|
||||||
else config.advantage = this.ADV_MODE.NORMAL;
|
else config.roll.advantage = this.ADV_MODE.NORMAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
constructFormula(config) {
|
||||||
|
// this.terms = [];
|
||||||
|
this.createBaseDice();
|
||||||
|
this.configureModifiers();
|
||||||
|
this.resetFormula();
|
||||||
|
return this._formula;
|
||||||
}
|
}
|
||||||
|
|
||||||
createBaseDice() {
|
createBaseDice() {
|
||||||
if (this.terms[0] instanceof foundry.dice.terms.Die) return;
|
if (this.terms[0] instanceof foundry.dice.terms.Die) {
|
||||||
|
this.terms = [this.terms[0]];
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.terms[0] = new foundry.dice.terms.Die({ faces: 20 });
|
this.terms[0] = new foundry.dice.terms.Die({ faces: 20 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configureModifiers() {
|
||||||
|
this.applyAdvantage();
|
||||||
|
this.applyBaseBonus();
|
||||||
|
|
||||||
|
this.options.experiences?.forEach(m => {
|
||||||
|
if (this.options.data.experiences?.[m])
|
||||||
|
this.options.roll.modifiers.push({
|
||||||
|
label: this.options.data.experiences[m].name,
|
||||||
|
value: this.options.data.experiences[m].total ?? this.options.data.experiences[m].value
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.options.roll.modifiers?.forEach(m => {
|
||||||
|
this.terms.push(...this.formatModifier(m.value));
|
||||||
|
});
|
||||||
|
|
||||||
|
this.baseTerms = foundry.utils.deepClone(this.terms);
|
||||||
|
|
||||||
|
if (this.options.extraFormula) {
|
||||||
|
this.terms.push(
|
||||||
|
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
|
||||||
|
...this.constructor.parse(this.options.extraFormula, this.options.data)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
applyAdvantage() {
|
applyAdvantage() {
|
||||||
this.d20.modifiers.findSplice(m => ['kh', 'kl'].includes(m));
|
this.d20.modifiers.findSplice(m => ['kh', 'kl'].includes(m));
|
||||||
if (!this.hasAdvantage && !this.hasDisadvantage) this.number = 1;
|
if (!this.hasAdvantage && !this.hasDisadvantage) this.number = 1;
|
||||||
|
|
@ -191,47 +245,16 @@ export class D20Roll extends DHRoll {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trait bonus != Adversary
|
|
||||||
configureModifiers() {
|
|
||||||
this.applyAdvantage();
|
|
||||||
// this.options.roll.modifiers = [];
|
|
||||||
this.applyBaseBonus();
|
|
||||||
|
|
||||||
this.options.experiences?.forEach(m => {
|
|
||||||
if (this.options.data.experiences?.[m])
|
|
||||||
this.options.roll.modifiers.push({
|
|
||||||
label: this.options.data.experiences[m].name,
|
|
||||||
value: this.options.data.experiences[m].total ?? this.options.data.experiences[m].value
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.options.roll.modifiers?.forEach(m => {
|
|
||||||
this.terms.push(...this.formatModifier(m.value));
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this.options.extraFormula) {
|
|
||||||
this.terms.push(
|
|
||||||
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
|
|
||||||
...this.constructor.parse(this.options.extraFormula, this.getRollData())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// this.resetFormula();
|
|
||||||
}
|
|
||||||
|
|
||||||
constructFormula(config) {
|
|
||||||
this.terms = [];
|
|
||||||
this.createBaseDice();
|
|
||||||
this.configureModifiers();
|
|
||||||
this.resetFormula();
|
|
||||||
return this._formula;
|
|
||||||
}
|
|
||||||
|
|
||||||
applyBaseBonus() {
|
applyBaseBonus() {
|
||||||
this.options.roll.modifiers = [
|
this.options.roll.modifiers = [];
|
||||||
|
if(!this.options.roll.bonus) return;
|
||||||
|
this.options.roll.modifiers.push(
|
||||||
{
|
{
|
||||||
label: 'Bonus to Hit',
|
label: 'Bonus to Hit',
|
||||||
value: Roll.replaceFormulaData('@attackBonus', this.data)
|
value: this.options.roll.bonus
|
||||||
|
// value: Roll.replaceFormulaData('@attackBonus', this.data)
|
||||||
}
|
}
|
||||||
];
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static postEvaluate(roll, config = {}) {
|
static postEvaluate(roll, config = {}) {
|
||||||
|
|
@ -241,26 +264,22 @@ export class D20Roll extends DHRoll {
|
||||||
const difficulty = config.roll.difficulty ?? target.difficulty ?? target.evasion;
|
const difficulty = config.roll.difficulty ?? target.difficulty ?? target.evasion;
|
||||||
target.hit = this.isCritical || roll.total >= difficulty;
|
target.hit = this.isCritical || roll.total >= difficulty;
|
||||||
});
|
});
|
||||||
} else if (config.roll.difficulty)
|
} else if (config.roll.difficulty) config.roll.success = roll.isCritical || roll.total >= config.roll.difficulty;
|
||||||
config.roll.success = roll.isCritical || roll.total >= config.roll.difficulty;
|
|
||||||
config.roll.advantage = {
|
config.roll.advantage = {
|
||||||
type: config.advantage,
|
type: config.roll.advantage,
|
||||||
dice: roll.dAdvantage?.denomination,
|
dice: roll.dAdvantage?.denomination,
|
||||||
value: roll.dAdvantage?.total
|
value: roll.dAdvantage?.total
|
||||||
};
|
};
|
||||||
config.roll.modifierTotal = config.roll.modifiers.reduce((a, c) => a + Number(c.value), 0);
|
config.roll.extra = roll.dice.filter(d => !roll.baseTerms.includes(d)).map(d => {
|
||||||
}
|
return {
|
||||||
|
dice: d.denomination,
|
||||||
getRollData() {
|
value: d.total
|
||||||
return this.options.data;
|
}
|
||||||
}
|
})
|
||||||
|
config.roll.modifierTotal = 0;
|
||||||
formatModifier(modifier) {
|
for(let i = 0; i < roll.terms.length; i++) {
|
||||||
const numTerm = modifier < 0 ? '-' : '+';
|
if(roll.terms[i] instanceof foundry.dice.terms.NumericTerm && !!roll.terms[i-1] && roll.terms[i-1] instanceof foundry.dice.terms.OperatorTerm) config.roll.modifierTotal += Number(`${roll.terms[i-1].operator}${roll.terms[i].total}`);
|
||||||
return [
|
}
|
||||||
new foundry.dice.terms.OperatorTerm({ operator: numTerm }),
|
|
||||||
new foundry.dice.terms.NumericTerm({ number: Math.abs(modifier) })
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resetFormula() {
|
resetFormula() {
|
||||||
|
|
@ -269,6 +288,8 @@ export class D20Roll extends DHRoll {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DualityRoll extends D20Roll {
|
export class DualityRoll extends D20Roll {
|
||||||
|
_advantageFaces = 6;
|
||||||
|
|
||||||
constructor(formula, data = {}, options = {}) {
|
constructor(formula, data = {}, options = {}) {
|
||||||
super(formula, data, options);
|
super(formula, data, options);
|
||||||
}
|
}
|
||||||
|
|
@ -286,7 +307,7 @@ export class DualityRoll extends D20Roll {
|
||||||
|
|
||||||
set dHope(faces) {
|
set dHope(faces) {
|
||||||
if (!(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie)) this.createBaseDice();
|
if (!(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie)) this.createBaseDice();
|
||||||
this.terms[0].faces = faces;
|
this.terms[0].faces = this.getFaces(faces);
|
||||||
// this.#hopeDice = `d${face}`;
|
// this.#hopeDice = `d${face}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -299,7 +320,7 @@ export class DualityRoll extends D20Roll {
|
||||||
|
|
||||||
set dFear(faces) {
|
set dFear(faces) {
|
||||||
if (!(this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie)) this.createBaseDice();
|
if (!(this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie)) this.createBaseDice();
|
||||||
this.dice[1].faces = faces;
|
this.dice[1].faces = this.getFaces(faces);
|
||||||
// this.#fearDice = `d${face}`;
|
// this.#fearDice = `d${face}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -307,6 +328,14 @@ export class DualityRoll extends D20Roll {
|
||||||
return this.dice[2];
|
return this.dice[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get advantageFaces() {
|
||||||
|
return this._advantageFaces;
|
||||||
|
}
|
||||||
|
|
||||||
|
set advantageFaces(faces) {
|
||||||
|
this._advantageFaces = this.getFaces(faces);
|
||||||
|
}
|
||||||
|
|
||||||
get isCritical() {
|
get isCritical() {
|
||||||
if (!this.dHope._evaluated || !this.dFear._evaluated) return;
|
if (!this.dHope._evaluated || !this.dFear._evaluated) return;
|
||||||
return this.dHope.total === this.dFear.total;
|
return this.dHope.total === this.dFear.total;
|
||||||
|
|
@ -336,25 +365,25 @@ export class DualityRoll extends D20Roll {
|
||||||
return game.i18n.localize(label);
|
return game.i18n.localize(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateFormula() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
createBaseDice() {
|
createBaseDice() {
|
||||||
if (
|
if (this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie && this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie) {
|
||||||
this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie &&
|
this.terms = [this.terms[0], this.terms[1], this.terms[2]];
|
||||||
this.dice[1] instanceof CONFIG.Dice.daggerheart.DualityDie
|
|
||||||
)
|
|
||||||
return;
|
return;
|
||||||
if (!(this.dice[0] instanceof CONFIG.Dice.daggerheart.DualityDie))
|
}
|
||||||
this.terms[0] = new CONFIG.Dice.daggerheart.DualityDie();
|
this.terms[0] = new CONFIG.Dice.daggerheart.DualityDie();
|
||||||
this.terms[1] = new foundry.dice.terms.OperatorTerm({ operator: '+' });
|
this.terms[1] = new foundry.dice.terms.OperatorTerm({ operator: '+' });
|
||||||
if (!(this.dice[2] instanceof CONFIG.Dice.daggerheart.DualityDie))
|
this.terms[2] = new CONFIG.Dice.daggerheart.DualityDie();
|
||||||
this.terms[2] = new CONFIG.Dice.daggerheart.DualityDie();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
applyAdvantage() {
|
applyAdvantage() {
|
||||||
const dieFaces = 6,
|
const dieFaces = this.advantageFaces,
|
||||||
bardRallyFaces = this.hasBarRally,
|
bardRallyFaces = this.hasBarRally,
|
||||||
advDie = new foundry.dice.terms.Die({ faces: dieFaces });
|
advDie = new foundry.dice.terms.Die({ faces: dieFaces });
|
||||||
if (this.hasAdvantage || this.hasDisadvantage || bardRallyFaces)
|
if (this.hasAdvantage || this.hasDisadvantage || bardRallyFaces) this.terms.push(new foundry.dice.terms.OperatorTerm({ operator: this.hasDisadvantage ? '-' : '+' }));
|
||||||
this.terms.push(new foundry.dice.terms.OperatorTerm({ operator: this.hasDisadvantage ? '-' : '+' }));
|
|
||||||
if (bardRallyFaces) {
|
if (bardRallyFaces) {
|
||||||
const rallyDie = new foundry.dice.terms.Die({ faces: bardRallyFaces });
|
const rallyDie = new foundry.dice.terms.Die({ faces: bardRallyFaces });
|
||||||
if (this.hasAdvantage) {
|
if (this.hasAdvantage) {
|
||||||
|
|
@ -371,12 +400,14 @@ export class DualityRoll extends D20Roll {
|
||||||
}
|
}
|
||||||
|
|
||||||
applyBaseBonus() {
|
applyBaseBonus() {
|
||||||
this.options.roll.modifiers = [
|
this.options.roll.modifiers = [];
|
||||||
|
if(!this.options.roll.trait) return;
|
||||||
|
this.options.roll.modifiers.push(
|
||||||
{
|
{
|
||||||
label: `DAGGERHEART.Abilities.${this.options.roll.trait}.name`,
|
label: `DAGGERHEART.Abilities.${this.options.roll.trait}.name`,
|
||||||
value: Roll.replaceFormulaData(`@traits.${this.options.roll.trait}.total`, this.data)
|
value: Roll.replaceFormulaData(`@traits.${this.options.roll.trait}.total`, this.data)
|
||||||
}
|
}
|
||||||
];
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static postEvaluate(roll, config = {}) {
|
static postEvaluate(roll, config = {}) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
/** NOT USED ANYMORE - TO BE DELETED **/
|
||||||
|
|
||||||
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
||||||
|
|
||||||
export default class RollSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
export default class RollSelectionDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,23 @@
|
||||||
import DHActionConfig from '../config/Action.mjs';
|
import DHActionConfig from '../../config/Action.mjs';
|
||||||
import DaggerheartSheet from './daggerheart-sheet.mjs';
|
import DaggerheartSheet from '../daggerheart-sheet.mjs';
|
||||||
|
import DHAdversarySettings from '../applications/adversary-settings.mjs';
|
||||||
|
|
||||||
const { ActorSheetV2 } = foundry.applications.sheets;
|
const { ActorSheetV2 } = foundry.applications.sheets;
|
||||||
export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
static DEFAULT_OPTIONS = {
|
static DEFAULT_OPTIONS = {
|
||||||
tag: 'form',
|
tag: 'form',
|
||||||
classes: ['daggerheart', 'sheet', 'actor', 'dh-style', 'adversary'],
|
classes: ['daggerheart', 'sheet', 'actor', 'dh-style', 'adversary'],
|
||||||
position: { width: 450, height: 1000 },
|
position: { width: 660, height: 766 },
|
||||||
actions: {
|
actions: {
|
||||||
reactionRoll: this.reactionRoll,
|
reactionRoll: this.reactionRoll,
|
||||||
attackRoll: this.attackRoll,
|
useItem: this.useItem,
|
||||||
|
toChat: this.toChat,
|
||||||
attackConfigure: this.attackConfigure,
|
attackConfigure: this.attackConfigure,
|
||||||
addExperience: this.addExperience,
|
addExperience: this.addExperience,
|
||||||
removeExperience: this.removeExperience,
|
removeExperience: this.removeExperience,
|
||||||
toggleHP: this.toggleHP,
|
toggleHP: this.toggleHP,
|
||||||
toggleStress: this.toggleStress
|
toggleStress: this.toggleStress,
|
||||||
|
openSettings: this.openSettings
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
handler: this.updateForm,
|
handler: this.updateForm,
|
||||||
|
|
@ -24,28 +27,37 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
};
|
};
|
||||||
|
|
||||||
static PARTS = {
|
static PARTS = {
|
||||||
|
sidebar: { template: 'systems/daggerheart/templates/sheets/actors/adversary/sidebar.hbs' },
|
||||||
header: { template: 'systems/daggerheart/templates/sheets/actors/adversary/header.hbs' },
|
header: { template: 'systems/daggerheart/templates/sheets/actors/adversary/header.hbs' },
|
||||||
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
actions: { template: 'systems/daggerheart/templates/sheets/actors/adversary/actions.hbs' },
|
||||||
main: { template: 'systems/daggerheart/templates/sheets/actors/adversary/main.hbs' },
|
notes: { template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs' },
|
||||||
information: { template: 'systems/daggerheart/templates/sheets/actors/adversary/information.hbs' }
|
effects: { template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs' }
|
||||||
};
|
};
|
||||||
|
|
||||||
static TABS = {
|
static TABS = {
|
||||||
main: {
|
actions: {
|
||||||
active: true,
|
active: true,
|
||||||
cssClass: '',
|
cssClass: '',
|
||||||
group: 'primary',
|
group: 'primary',
|
||||||
id: 'main',
|
id: 'actions',
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.Sheets.Adversary.Tabs.Main'
|
label: 'DAGGERHEART.General.tabs.actions'
|
||||||
},
|
},
|
||||||
information: {
|
notes: {
|
||||||
active: false,
|
active: false,
|
||||||
cssClass: '',
|
cssClass: '',
|
||||||
group: 'primary',
|
group: 'primary',
|
||||||
id: 'information',
|
id: 'notes',
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.Sheets.Adversary.Tabs.Information'
|
label: 'DAGGERHEART.Sheets.Adversary.Tabs.notes'
|
||||||
|
},
|
||||||
|
effects: {
|
||||||
|
active: false,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'effects',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.Sheets.Adversary.Tabs.effects'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -56,10 +68,15 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
context.systemFields.attack.fields = this.document.system.attack.schema.fields;
|
context.systemFields.attack.fields = this.document.system.attack.schema.fields;
|
||||||
context.getEffectDetails = this.getEffectDetails.bind(this);
|
context.getEffectDetails = this.getEffectDetails.bind(this);
|
||||||
context.isNPC = true;
|
context.isNPC = true;
|
||||||
console.log(context)
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getAction(element) {
|
||||||
|
const itemId = (element.target ?? element).closest('[data-item-id]').dataset.itemId,
|
||||||
|
item = this.document.system.actions.find(x => x.id === itemId);
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
static async updateForm(event, _, formData) {
|
static async updateForm(event, _, formData) {
|
||||||
await this.document.update(formData.object);
|
await this.document.update(formData.object);
|
||||||
this.render();
|
this.render();
|
||||||
|
|
@ -70,7 +87,7 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
event: event,
|
event: event,
|
||||||
title: `${this.actor.name} - Reaction Roll`,
|
title: `${this.actor.name} - Reaction Roll`,
|
||||||
roll: {
|
roll: {
|
||||||
modifier: null,
|
// modifier: null,
|
||||||
type: 'reaction'
|
type: 'reaction'
|
||||||
},
|
},
|
||||||
chatMessage: {
|
chatMessage: {
|
||||||
|
|
@ -86,8 +103,40 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static async attackRoll(event) {
|
static async openSettings() {
|
||||||
this.actor.system.attack.use(event);
|
await new DHAdversarySettings(this.document).render(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async useItem(event) {
|
||||||
|
const action = this.getAction(event) ?? this.actor.system.attack;
|
||||||
|
action.use(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async toChat(event, button) {
|
||||||
|
if (button?.dataset?.type === 'experience') {
|
||||||
|
const experience = this.document.system.experiences[button.dataset.uuid];
|
||||||
|
const cls = getDocumentClass('ChatMessage');
|
||||||
|
const systemData = {
|
||||||
|
name: game.i18n.localize('DAGGERHEART.General.Experience.Single'),
|
||||||
|
description: `${experience.name} ${
|
||||||
|
experience.modifier < 0 ? experience.modifier : `+${experience.modifier}`
|
||||||
|
}`
|
||||||
|
};
|
||||||
|
const msg = new cls({
|
||||||
|
type: 'abilityUse',
|
||||||
|
user: game.user.id,
|
||||||
|
system: systemData,
|
||||||
|
content: await foundry.applications.handlebars.renderTemplate(
|
||||||
|
'systems/daggerheart/templates/chat/ability-use.hbs',
|
||||||
|
systemData
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
cls.create(msg.toObject());
|
||||||
|
} else {
|
||||||
|
const item = this.getAction(event) ?? this.document.system.attack;
|
||||||
|
item.toChat(this.document.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static async attackConfigure(event) {
|
static async attackConfigure(event) {
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
import { capitalize } from '../../helpers/utils.mjs';
|
import { capitalize } from '../../../helpers/utils.mjs';
|
||||||
import DhpDeathMove from '../deathMove.mjs';
|
import DhpDeathMove from '../../deathMove.mjs';
|
||||||
import DhpDowntime from '../downtime.mjs';
|
import DhpDowntime from '../../downtime.mjs';
|
||||||
import AncestrySelectionDialog from '../ancestrySelectionDialog.mjs';
|
import AncestrySelectionDialog from '../../ancestrySelectionDialog.mjs';
|
||||||
import DaggerheartSheet from './daggerheart-sheet.mjs';
|
import DaggerheartSheet from '.././daggerheart-sheet.mjs';
|
||||||
import { abilities } from '../../config/actorConfig.mjs';
|
import { abilities } from '../../../config/actorConfig.mjs';
|
||||||
import DhCharacterlevelUp from '../levelup/characterLevelup.mjs';
|
import DhCharacterlevelUp from '../../levelup/characterLevelup.mjs';
|
||||||
import DhCharacterCreation from '../characterCreation.mjs';
|
import DhCharacterCreation from '../../characterCreation.mjs';
|
||||||
|
|
||||||
const { ActorSheetV2 } = foundry.applications.sheets;
|
const { ActorSheetV2 } = foundry.applications.sheets;
|
||||||
const { TextEditor } = foundry.applications.ux;
|
const { TextEditor } = foundry.applications.ux;
|
||||||
|
|
@ -727,9 +727,7 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
const cls = getDocumentClass('ChatMessage');
|
const cls = getDocumentClass('ChatMessage');
|
||||||
const systemData = {
|
const systemData = {
|
||||||
name: game.i18n.localize('DAGGERHEART.General.Experience.Single'),
|
name: game.i18n.localize('DAGGERHEART.General.Experience.Single'),
|
||||||
description: `${experience.description} ${
|
description: `${experience.name} ${experience.total < 0 ? experience.total : `+${experience.total}`}`
|
||||||
experience.total < 0 ? experience.total : `+${experience.total}`
|
|
||||||
}`
|
|
||||||
};
|
};
|
||||||
const msg = new cls({
|
const msg = new cls({
|
||||||
type: 'abilityUse',
|
type: 'abilityUse',
|
||||||
131
module/applications/sheets/actors/environment.mjs
Normal file
131
module/applications/sheets/actors/environment.mjs
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
import DaggerheartSheet from '../daggerheart-sheet.mjs';
|
||||||
|
import DHEnvironmentSettings from '../applications/environment-settings.mjs';
|
||||||
|
|
||||||
|
const { ActorSheetV2 } = foundry.applications.sheets;
|
||||||
|
export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) {
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
tag: 'form',
|
||||||
|
classes: ['daggerheart', 'sheet', 'actor', 'dh-style', 'environment'],
|
||||||
|
position: {
|
||||||
|
width: 500
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
addAdversary: this.addAdversary,
|
||||||
|
deleteProperty: this.deleteProperty,
|
||||||
|
viewAdversary: this.viewAdversary,
|
||||||
|
openSettings: this.openSettings,
|
||||||
|
useItem: this.useItem,
|
||||||
|
toChat: this.toChat
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
handler: this._updateForm,
|
||||||
|
submitOnChange: true,
|
||||||
|
closeOnSubmit: false
|
||||||
|
},
|
||||||
|
dragDrop: [{ dragSelector: '.action-section .inventory-item', dropSelector: null }]
|
||||||
|
};
|
||||||
|
|
||||||
|
static PARTS = {
|
||||||
|
header: { template: 'systems/daggerheart/templates/sheets/actors/environment/header.hbs' },
|
||||||
|
actions: { template: 'systems/daggerheart/templates/sheets/actors/environment/actions.hbs' },
|
||||||
|
potentialAdversaries: {
|
||||||
|
template: 'systems/daggerheart/templates/sheets/actors/environment/potentialAdversaries.hbs'
|
||||||
|
},
|
||||||
|
notes: { template: 'systems/daggerheart/templates/sheets/actors/environment/notes.hbs' }
|
||||||
|
};
|
||||||
|
|
||||||
|
static TABS = {
|
||||||
|
actions: {
|
||||||
|
active: true,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'actions',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.General.tabs.actions'
|
||||||
|
},
|
||||||
|
potentialAdversaries: {
|
||||||
|
active: false,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'potentialAdversaries',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.General.tabs.potentialAdversaries'
|
||||||
|
},
|
||||||
|
notes: {
|
||||||
|
active: false,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'notes',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.Sheets.Adversary.Tabs.notes'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async _prepareContext(_options) {
|
||||||
|
const context = await super._prepareContext(_options);
|
||||||
|
context.document = this.document;
|
||||||
|
context.tabs = super._getTabs(this.constructor.TABS);
|
||||||
|
context.getEffectDetails = this.getEffectDetails.bind(this);
|
||||||
|
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
getAction(element) {
|
||||||
|
const itemId = (element.target ?? element).closest('[data-item-id]').dataset.itemId,
|
||||||
|
item = this.document.system.actions.find(x => x.id === itemId);
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
static async openSettings() {
|
||||||
|
await new DHEnvironmentSettings(this.document).render(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async _updateForm(event, _, formData) {
|
||||||
|
await this.document.update(formData.object);
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
getEffectDetails(id) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
static async addAdversary() {
|
||||||
|
await this.document.update({
|
||||||
|
[`system.potentialAdversaries.${foundry.utils.randomID()}.label`]: game.i18n.localize(
|
||||||
|
'DAGGERHEART.Sheets.Environment.newAdversary'
|
||||||
|
)
|
||||||
|
});
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async deleteProperty(_, target) {
|
||||||
|
await this.document.update({ [`${target.dataset.path}.-=${target.id}`]: null });
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async viewAdversary(_, button) {
|
||||||
|
const adversary = await foundry.utils.fromUuid(button.dataset.adversary);
|
||||||
|
adversary.sheet.render(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async useItem(event) {
|
||||||
|
const action = this.getAction(event);
|
||||||
|
action.use(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async toChat(event) {
|
||||||
|
const item = this.getAction(event);
|
||||||
|
item.toChat(this.document.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
async _onDragStart(event) {
|
||||||
|
const item = event.currentTarget.closest('.inventory-item');
|
||||||
|
|
||||||
|
if (item) {
|
||||||
|
const adversary = game.actors.find(x => x.type === 'adversary' && x.id === item.dataset.itemId);
|
||||||
|
const adversaryData = { type: 'Actor', uuid: adversary.uuid };
|
||||||
|
event.dataTransfer.setData('text/plain', JSON.stringify(adversaryData));
|
||||||
|
event.dataTransfer.setDragImage(item, 60, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
181
module/applications/sheets/applications/adversary-settings.mjs
Normal file
181
module/applications/sheets/applications/adversary-settings.mjs
Normal file
|
|
@ -0,0 +1,181 @@
|
||||||
|
import DHActionConfig from '../../config/Action.mjs';
|
||||||
|
import DHBaseItemSheet from '../api/base-item.mjs';
|
||||||
|
import { actionsTypes } from '../../../data/_module.mjs';
|
||||||
|
|
||||||
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
|
export default class DHAdversarySettings extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
constructor(actor) {
|
||||||
|
super({});
|
||||||
|
|
||||||
|
this.actor = actor;
|
||||||
|
}
|
||||||
|
|
||||||
|
get title() {
|
||||||
|
return `${game.i18n.localize('DAGGERHEART.Sheets.TABS.settings')}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
tag: 'form',
|
||||||
|
classes: ['daggerheart', 'dh-style', 'dialog', 'adversary-settings'],
|
||||||
|
window: {
|
||||||
|
icon: 'fa-solid fa-wrench',
|
||||||
|
resizable: false
|
||||||
|
},
|
||||||
|
position: { width: 455, height: 'auto' },
|
||||||
|
actions: {
|
||||||
|
addExperience: this.#addExperience,
|
||||||
|
removeExperience: this.#removeExperience,
|
||||||
|
addAction: this.#addAction,
|
||||||
|
editAction: this.#editAction,
|
||||||
|
removeAction: this.#removeAction
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
handler: this.updateForm,
|
||||||
|
submitOnChange: true,
|
||||||
|
closeOnSubmit: false
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static PARTS = {
|
||||||
|
header: {
|
||||||
|
id: 'header',
|
||||||
|
template: 'systems/daggerheart/templates/sheets/applications/adversary-settings/header.hbs'
|
||||||
|
},
|
||||||
|
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||||
|
details: {
|
||||||
|
id: 'details',
|
||||||
|
template: 'systems/daggerheart/templates/sheets/applications/adversary-settings/details.hbs'
|
||||||
|
},
|
||||||
|
attack: {
|
||||||
|
id: 'attack',
|
||||||
|
template: 'systems/daggerheart/templates/sheets/applications/adversary-settings/attack.hbs'
|
||||||
|
},
|
||||||
|
experiences: {
|
||||||
|
id: 'experiences',
|
||||||
|
template: 'systems/daggerheart/templates/sheets/applications/adversary-settings/experiences.hbs'
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
id: 'actions',
|
||||||
|
template: 'systems/daggerheart/templates/sheets/applications/adversary-settings/actions.hbs'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static TABS = {
|
||||||
|
details: {
|
||||||
|
active: true,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'details',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.General.tabs.details'
|
||||||
|
},
|
||||||
|
attack: {
|
||||||
|
active: false,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'attack',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.General.tabs.attack'
|
||||||
|
},
|
||||||
|
experiences: {
|
||||||
|
active: false,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'experiences',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.General.tabs.experiences'
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
active: false,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'actions',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.General.tabs.actions'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async _prepareContext(_options) {
|
||||||
|
const context = await super._prepareContext(_options);
|
||||||
|
context.document = this.actor;
|
||||||
|
context.tabs = this._getTabs(this.constructor.TABS);
|
||||||
|
context.systemFields = this.actor.system.schema.fields;
|
||||||
|
context.systemFields.attack.fields = this.actor.system.attack.schema.fields;
|
||||||
|
context.isNPC = true;
|
||||||
|
console.log(context)
|
||||||
|
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
_getTabs(tabs) {
|
||||||
|
for (const v of Object.values(tabs)) {
|
||||||
|
v.active = this.tabGroups[v.group] ? this.tabGroups[v.group] === v.id : v.active;
|
||||||
|
v.cssClass = v.active ? 'active' : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return tabs;
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #addExperience() {
|
||||||
|
const newExperience = {
|
||||||
|
name: 'Experience',
|
||||||
|
modifier: 0
|
||||||
|
};
|
||||||
|
await this.actor.update({ [`system.experiences.${foundry.utils.randomID()}`]: newExperience });
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #removeExperience(_, target) {
|
||||||
|
await this.actor.update({ [`system.experiences.-=${target.dataset.experience}`]: null });
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #addAction(_event, _button) {
|
||||||
|
const actionType = await DHBaseItemSheet.selectActionType();
|
||||||
|
if (!actionType) return;
|
||||||
|
try {
|
||||||
|
const cls = actionsTypes[actionType] ?? actionsTypes.attack,
|
||||||
|
action = new cls(
|
||||||
|
{
|
||||||
|
_id: foundry.utils.randomID(),
|
||||||
|
type: actionType,
|
||||||
|
name: game.i18n.localize(SYSTEM.ACTIONS.actionTypes[actionType].name),
|
||||||
|
...cls.getSourceConfig(this.actor)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
parent: this.actor
|
||||||
|
}
|
||||||
|
);
|
||||||
|
await this.actor.update({ 'system.actions': [...this.actor.system.actions, action] });
|
||||||
|
await new DHActionConfig(this.actor.system.actions[this.actor.system.actions.length - 1]).render({
|
||||||
|
force: true
|
||||||
|
});
|
||||||
|
this.render();
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #editAction(event, target) {
|
||||||
|
event.stopPropagation();
|
||||||
|
const actionIndex = target.dataset.index;
|
||||||
|
await new DHActionConfig(this.actor.system.actions[actionIndex]).render({
|
||||||
|
force: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #removeAction(event, target) {
|
||||||
|
event.stopPropagation();
|
||||||
|
const actionIndex = target.dataset.index;
|
||||||
|
await this.actor.update({
|
||||||
|
'system.actions': this.actor.system.actions.filter((_, index) => index !== Number.parseInt(actionIndex))
|
||||||
|
});
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async updateForm(event, _, formData) {
|
||||||
|
await this.actor.update(formData.object);
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
}
|
||||||
213
module/applications/sheets/applications/environment-settings.mjs
Normal file
213
module/applications/sheets/applications/environment-settings.mjs
Normal file
|
|
@ -0,0 +1,213 @@
|
||||||
|
import DHActionConfig from '../../config/Action.mjs';
|
||||||
|
import DHBaseItemSheet from '../api/base-item.mjs';
|
||||||
|
import { actionsTypes } from '../../../data/_module.mjs';
|
||||||
|
|
||||||
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
|
export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
constructor(actor) {
|
||||||
|
super({});
|
||||||
|
|
||||||
|
this.actor = actor;
|
||||||
|
this._dragDrop = this._createDragDropHandlers();
|
||||||
|
}
|
||||||
|
|
||||||
|
get title() {
|
||||||
|
return `${game.i18n.localize('DAGGERHEART.Sheets.TABS.settings')}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
tag: 'form',
|
||||||
|
classes: ['daggerheart', 'dh-style', 'dialog', 'environment-settings'],
|
||||||
|
window: {
|
||||||
|
icon: 'fa-solid fa-wrench',
|
||||||
|
resizable: false
|
||||||
|
},
|
||||||
|
position: { width: 455, height: 'auto' },
|
||||||
|
actions: {
|
||||||
|
addAction: this.#addAction,
|
||||||
|
editAction: this.#editAction,
|
||||||
|
removeAction: this.#removeAction,
|
||||||
|
addCategory: this.#addCategory,
|
||||||
|
deleteProperty: this.#deleteProperty,
|
||||||
|
viewAdversary: this.#viewAdversary,
|
||||||
|
deleteAdversary: this.#deleteAdversary
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
handler: this.updateForm,
|
||||||
|
submitOnChange: true,
|
||||||
|
closeOnSubmit: false
|
||||||
|
},
|
||||||
|
dragDrop: [{ dragSelector: null, dropSelector: '.category-container' }]
|
||||||
|
};
|
||||||
|
|
||||||
|
static PARTS = {
|
||||||
|
header: {
|
||||||
|
id: 'header',
|
||||||
|
template: 'systems/daggerheart/templates/sheets/applications/environment-settings/header.hbs'
|
||||||
|
},
|
||||||
|
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||||
|
details: {
|
||||||
|
id: 'details',
|
||||||
|
template: 'systems/daggerheart/templates/sheets/applications/environment-settings/details.hbs'
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
id: 'actions',
|
||||||
|
template: 'systems/daggerheart/templates/sheets/applications/environment-settings/actions.hbs'
|
||||||
|
},
|
||||||
|
adversaries: {
|
||||||
|
id: 'adversaries',
|
||||||
|
template: 'systems/daggerheart/templates/sheets/applications/environment-settings/adversaries.hbs'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static TABS = {
|
||||||
|
details: {
|
||||||
|
active: true,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'details',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.General.tabs.details'
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
active: false,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'actions',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.General.tabs.actions'
|
||||||
|
},
|
||||||
|
adversaries: {
|
||||||
|
active: false,
|
||||||
|
cssClass: '',
|
||||||
|
group: 'primary',
|
||||||
|
id: 'adversaries',
|
||||||
|
icon: null,
|
||||||
|
label: 'DAGGERHEART.General.tabs.adversaries'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async _prepareContext(_options) {
|
||||||
|
const context = await super._prepareContext(_options);
|
||||||
|
context.document = this.actor;
|
||||||
|
context.tabs = this._getTabs(this.constructor.TABS);
|
||||||
|
context.systemFields = this.actor.system.schema.fields;
|
||||||
|
context.isNPC = true;
|
||||||
|
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
_attachPartListeners(partId, htmlElement, options) {
|
||||||
|
super._attachPartListeners(partId, htmlElement, options);
|
||||||
|
|
||||||
|
this._dragDrop.forEach(d => d.bind(htmlElement));
|
||||||
|
}
|
||||||
|
|
||||||
|
_createDragDropHandlers() {
|
||||||
|
return this.options.dragDrop.map(d => {
|
||||||
|
d.callbacks = {
|
||||||
|
drop: this._onDrop.bind(this)
|
||||||
|
};
|
||||||
|
return new foundry.applications.ux.DragDrop.implementation(d);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
_getTabs(tabs) {
|
||||||
|
for (const v of Object.values(tabs)) {
|
||||||
|
v.active = this.tabGroups[v.group] ? this.tabGroups[v.group] === v.id : v.active;
|
||||||
|
v.cssClass = v.active ? 'active' : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return tabs;
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #addAction(_event, _button) {
|
||||||
|
const actionType = await DHBaseItemSheet.selectActionType();
|
||||||
|
if (!actionType) return;
|
||||||
|
try {
|
||||||
|
const cls = actionsTypes[actionType] ?? actionsTypes.attack,
|
||||||
|
action = new cls(
|
||||||
|
{
|
||||||
|
_id: foundry.utils.randomID(),
|
||||||
|
type: actionType,
|
||||||
|
name: game.i18n.localize(SYSTEM.ACTIONS.actionTypes[actionType].name),
|
||||||
|
...cls.getSourceConfig(this.actor)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
parent: this.actor
|
||||||
|
}
|
||||||
|
);
|
||||||
|
await this.actor.update({ 'system.actions': [...this.actor.system.actions, action] });
|
||||||
|
await new DHActionConfig(this.actor.system.actions[this.actor.system.actions.length - 1]).render({
|
||||||
|
force: true
|
||||||
|
});
|
||||||
|
this.render();
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #editAction(event, target) {
|
||||||
|
event.stopPropagation();
|
||||||
|
const actionIndex = target.dataset.index;
|
||||||
|
await new DHActionConfig(this.actor.system.actions[actionIndex]).render({
|
||||||
|
force: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #removeAction(event, target) {
|
||||||
|
event.stopPropagation();
|
||||||
|
const actionIndex = target.dataset.index;
|
||||||
|
await this.actor.update({
|
||||||
|
'system.actions': this.actor.system.actions.filter((_, index) => index !== Number.parseInt(actionIndex))
|
||||||
|
});
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #addCategory() {
|
||||||
|
await this.actor.update({
|
||||||
|
[`system.potentialAdversaries.${foundry.utils.randomID()}.label`]: game.i18n.localize(
|
||||||
|
'DAGGERHEART.Sheets.Environment.newAdversary'
|
||||||
|
)
|
||||||
|
});
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #deleteProperty(_, target) {
|
||||||
|
await this.actor.update({ [`${target.dataset.path}.-=${target.id}`]: null });
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #viewAdversary(_, button) {
|
||||||
|
const adversary = await foundry.utils.fromUuid(button.dataset.adversary);
|
||||||
|
adversary.sheet.render(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async #deleteAdversary(event, target) {
|
||||||
|
const adversaryKey = target.dataset.adversary;
|
||||||
|
const path = `system.potentialAdversaries.${target.dataset.potentialAdversary}.adversaries`;
|
||||||
|
const newAdversaries = foundry.utils.getProperty(this.actor, path).filter(x => x.uuid !== adversaryKey);
|
||||||
|
await this.actor.update({ [path]: newAdversaries });
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
async _onDrop(event) {
|
||||||
|
const data = TextEditor.getDragEventData(event);
|
||||||
|
const item = await fromUuid(data.uuid);
|
||||||
|
if (item.type === 'adversary') {
|
||||||
|
const target = event.target.closest('.category-container');
|
||||||
|
const path = `system.potentialAdversaries.${target.dataset.potentialAdversary}.adversaries`;
|
||||||
|
const current = foundry.utils.getProperty(this.actor, path).map(x => x.uuid);
|
||||||
|
await this.actor.update({
|
||||||
|
[path]: [...current, item.uuid]
|
||||||
|
});
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static async updateForm(event, _, formData) {
|
||||||
|
await this.actor.update(formData.object);
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -60,7 +60,7 @@ export default function DhpApplicationMixin(Base) {
|
||||||
// drop: this._canDragDrop.bind(this)
|
// drop: this._canDragDrop.bind(this)
|
||||||
// };
|
// };
|
||||||
d.callbacks = {
|
d.callbacks = {
|
||||||
// dragstart: this._onDragStart.bind(this),
|
dragstart: this._onDragStart.bind(this),
|
||||||
// dragover: this._onDragOver.bind(this),
|
// dragover: this._onDragOver.bind(this),
|
||||||
drop: this._onDrop.bind(this)
|
drop: this._onDrop.bind(this)
|
||||||
};
|
};
|
||||||
|
|
@ -68,6 +68,7 @@ export default function DhpApplicationMixin(Base) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async _onDragStart(event) {}
|
||||||
_onDrop(event) {}
|
_onDrop(event) {}
|
||||||
|
|
||||||
_getTabs(tabs) {
|
_getTabs(tabs) {
|
||||||
|
|
|
||||||
|
|
@ -1,107 +0,0 @@
|
||||||
import DaggerheartSheet from './daggerheart-sheet.mjs';
|
|
||||||
|
|
||||||
const { ActorSheetV2 } = foundry.applications.sheets;
|
|
||||||
export default class DhpEnvironment extends DaggerheartSheet(ActorSheetV2) {
|
|
||||||
static DEFAULT_OPTIONS = {
|
|
||||||
tag: 'form',
|
|
||||||
classes: ['daggerheart', 'sheet', 'actor', 'dh-style', 'environment'],
|
|
||||||
position: {
|
|
||||||
width: 450,
|
|
||||||
height: 1000
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
addAdversary: this.addAdversary,
|
|
||||||
addFeature: this.addFeature,
|
|
||||||
deleteProperty: this.deleteProperty,
|
|
||||||
viewAdversary: this.viewAdversary
|
|
||||||
},
|
|
||||||
form: {
|
|
||||||
handler: this._updateForm,
|
|
||||||
submitOnChange: true,
|
|
||||||
closeOnSubmit: false
|
|
||||||
},
|
|
||||||
dragDrop: [{ dragSelector: null, dropSelector: '.adversary-container' }]
|
|
||||||
};
|
|
||||||
|
|
||||||
static PARTS = {
|
|
||||||
header: { template: 'systems/daggerheart/templates/sheets/actors/environment/header.hbs' },
|
|
||||||
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
|
||||||
main: { template: 'systems/daggerheart/templates/sheets/actors/environment/main.hbs' },
|
|
||||||
information: { template: 'systems/daggerheart/templates/sheets/actors/environment/information.hbs' }
|
|
||||||
};
|
|
||||||
|
|
||||||
static TABS = {
|
|
||||||
main: {
|
|
||||||
active: true,
|
|
||||||
cssClass: '',
|
|
||||||
group: 'primary',
|
|
||||||
id: 'main',
|
|
||||||
icon: null,
|
|
||||||
label: 'DAGGERHEART.Sheets.Environment.Tabs.Main'
|
|
||||||
},
|
|
||||||
information: {
|
|
||||||
active: false,
|
|
||||||
cssClass: '',
|
|
||||||
group: 'primary',
|
|
||||||
id: 'information',
|
|
||||||
icon: null,
|
|
||||||
label: 'DAGGERHEART.Sheets.Environment.Tabs.Information'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
async _prepareContext(_options) {
|
|
||||||
const context = await super._prepareContext(_options);
|
|
||||||
context.document = this.document;
|
|
||||||
context.tabs = super._getTabs(this.constructor.TABS);
|
|
||||||
context.getEffectDetails = this.getEffectDetails.bind(this);
|
|
||||||
|
|
||||||
return context;
|
|
||||||
}
|
|
||||||
|
|
||||||
static async _updateForm(event, _, formData) {
|
|
||||||
await this.document.update(formData.object);
|
|
||||||
this.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
getEffectDetails(id) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
static async addAdversary() {
|
|
||||||
await this.document.update({
|
|
||||||
[`system.potentialAdversaries.${foundry.utils.randomID()}.label`]: game.i18n.localize(
|
|
||||||
'DAGGERHEART.Sheets.Environment.newAdversary'
|
|
||||||
)
|
|
||||||
});
|
|
||||||
this.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
static async addFeature() {
|
|
||||||
ui.notifications.error('Not Implemented yet. Awaiting datamodel rework');
|
|
||||||
}
|
|
||||||
|
|
||||||
static async deleteProperty(_, target) {
|
|
||||||
await this.document.update({ [`${target.dataset.path}.-=${target.id}`]: null });
|
|
||||||
this.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
static async viewAdversary(_, button) {
|
|
||||||
const adversary = foundry.utils.getProperty(
|
|
||||||
this.document.system.potentialAdversaries,
|
|
||||||
`${button.dataset.potentialAdversary}.adversaries.${button.dataset.adversary}`
|
|
||||||
);
|
|
||||||
adversary.sheet.render(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
async _onDrop(event) {
|
|
||||||
const data = TextEditor.getDragEventData(event);
|
|
||||||
const item = await fromUuid(data.uuid);
|
|
||||||
if (item.type === 'adversary') {
|
|
||||||
const target = event.target.closest('.adversary-container');
|
|
||||||
const path = `system.potentialAdversaries.${target.dataset.potentialAdversary}.adversaries.${item.id}`;
|
|
||||||
await this.document.update({
|
|
||||||
[path]: item.uuid
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
16
module/applications/tooltipManager.mjs
Normal file
16
module/applications/tooltipManager.mjs
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
export default class DhTooltipManager extends TooltipManager {
|
||||||
|
async activate(element, options = {}) {
|
||||||
|
let html = options.html;
|
||||||
|
if (element.dataset.tooltip.startsWith('#item#')) {
|
||||||
|
const item = await foundry.utils.fromUuid(element.dataset.tooltip.slice(6));
|
||||||
|
if (item) {
|
||||||
|
html = await foundry.applications.handlebars.renderTemplate(
|
||||||
|
`systems/daggerheart/templates/tooltip/${item.type}.hbs`,
|
||||||
|
item
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super.activate(element, { ...options, html: html });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,42 +1,42 @@
|
||||||
export const actionTypes = {
|
export const actionTypes = {
|
||||||
attack: {
|
attack: {
|
||||||
id: 'attack',
|
id: 'attack',
|
||||||
name: 'DAGGERHEART.Actions.Types.Attack.Name',
|
name: 'DAGGERHEART.Actions.Types.attack.name',
|
||||||
icon: 'fa-swords'
|
icon: 'fa-swords'
|
||||||
},
|
},
|
||||||
// spellcast: {
|
// spellcast: {
|
||||||
// id: 'spellcast',
|
// id: 'spellcast',
|
||||||
// name: 'DAGGERHEART.Actions.Types.Spellcast.Name',
|
// name: 'DAGGERHEART.Actions.Types.spellcast.name',
|
||||||
// icon: 'fa-book-sparkles'
|
// icon: 'fa-book-sparkles'
|
||||||
// },
|
// },
|
||||||
healing: {
|
healing: {
|
||||||
id: 'healing',
|
id: 'healing',
|
||||||
name: 'DAGGERHEART.Actions.Types.Healing.Name',
|
name: 'DAGGERHEART.Actions.Types.healing.name',
|
||||||
icon: 'fa-kit-medical'
|
icon: 'fa-kit-medical'
|
||||||
},
|
},
|
||||||
// resource: {
|
// resource: {
|
||||||
// id: 'resource',
|
// id: 'resource',
|
||||||
// name: 'DAGGERHEART.Actions.Types.Resource.Name',
|
// name: 'DAGGERHEART.Actions.Types.resource.name',
|
||||||
// icon: 'fa-honey-pot'
|
// icon: 'fa-honey-pot'
|
||||||
// },
|
// },
|
||||||
damage: {
|
damage: {
|
||||||
id: 'damage',
|
id: 'damage',
|
||||||
name: 'DAGGERHEART.Actions.Types.Damage.Name',
|
name: 'DAGGERHEART.Actions.Types.damage.name',
|
||||||
icon: 'fa-bone-break'
|
icon: 'fa-bone-break'
|
||||||
},
|
},
|
||||||
summon: {
|
summon: {
|
||||||
id: 'summon',
|
id: 'summon',
|
||||||
name: 'DAGGERHEART.Actions.Types.Summon.Name',
|
name: 'DAGGERHEART.Actions.Types.summon.name',
|
||||||
icon: 'fa-ghost'
|
icon: 'fa-ghost'
|
||||||
},
|
},
|
||||||
effect: {
|
effect: {
|
||||||
id: 'effect',
|
id: 'effect',
|
||||||
name: 'DAGGERHEART.Actions.Types.Effect.Name',
|
name: 'DAGGERHEART.Actions.Types.effect.name',
|
||||||
icon: 'fa-person-rays'
|
icon: 'fa-person-rays'
|
||||||
},
|
},
|
||||||
macro: {
|
macro: {
|
||||||
id: 'macro',
|
id: 'macro',
|
||||||
name: 'DAGGERHEART.Actions.Types.Macro.Name',
|
name: 'DAGGERHEART.Actions.Types.macro.name',
|
||||||
icon: 'fa-scroll'
|
icon: 'fa-scroll'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -105,3 +105,18 @@ export const diceCompare = {
|
||||||
operator: '>'
|
operator: '>'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const advandtageState = {
|
||||||
|
disadvantage: {
|
||||||
|
label: 'DAGGERHEART.General.Disadvantage.Full',
|
||||||
|
value: -1
|
||||||
|
},
|
||||||
|
neutral: {
|
||||||
|
label: 'DAGGERHEART.General.Neutral.Full',
|
||||||
|
value: 0
|
||||||
|
},
|
||||||
|
advantage: {
|
||||||
|
label: 'DAGGERHEART.General.Advantage.Full',
|
||||||
|
value: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,72 +83,72 @@ export const featureProperties = {
|
||||||
export const adversaryTypes = {
|
export const adversaryTypes = {
|
||||||
bruiser: {
|
bruiser: {
|
||||||
id: 'bruiser',
|
id: 'bruiser',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Bruiser.label',
|
label: 'DAGGERHEART.Adversary.Type.bruiser.label',
|
||||||
description: 'DAGGERHEART.Adversary.Bruiser.Description'
|
description: 'DAGGERHEART.Adversary.bruiser.description'
|
||||||
},
|
},
|
||||||
horde: {
|
horde: {
|
||||||
id: 'horde',
|
id: 'horde',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Horde.label',
|
label: 'DAGGERHEART.Adversary.Type.horde.label',
|
||||||
description: 'DAGGERHEART.Adversary.Horde.Description'
|
description: 'DAGGERHEART.Adversary.horde.description'
|
||||||
},
|
},
|
||||||
leader: {
|
leader: {
|
||||||
id: 'leader',
|
id: 'leader',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Leader.label',
|
label: 'DAGGERHEART.Adversary.Type.leader.label',
|
||||||
description: 'DAGGERHEART.Adversary.Leader.Description'
|
description: 'DAGGERHEART.Adversary.leader.description'
|
||||||
},
|
},
|
||||||
minion: {
|
minion: {
|
||||||
id: 'minion',
|
id: 'minion',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Minion.label',
|
label: 'DAGGERHEART.Adversary.Type.minion.label',
|
||||||
description: 'DAGGERHEART.Adversary.Minion.Description'
|
description: 'DAGGERHEART.Adversary.minion.description'
|
||||||
},
|
},
|
||||||
ranged: {
|
ranged: {
|
||||||
id: 'ranged',
|
id: 'ranged',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Ranged.label',
|
label: 'DAGGERHEART.Adversary.Type.ranged.label',
|
||||||
description: 'DAGGERHEART.Adversary.Ranged.Description'
|
description: 'DAGGERHEART.Adversary.ranged.description'
|
||||||
},
|
},
|
||||||
skulk: {
|
skulk: {
|
||||||
id: 'skulk',
|
id: 'skulk',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Skulk.label',
|
label: 'DAGGERHEART.Adversary.Type.skulk.label',
|
||||||
description: 'DAGGERHEART.Adversary.Skulk.Description'
|
description: 'DAGGERHEART.Adversary.skulk.description'
|
||||||
},
|
},
|
||||||
social: {
|
social: {
|
||||||
id: 'social',
|
id: 'social',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Social.label',
|
label: 'DAGGERHEART.Adversary.Type.social.label',
|
||||||
description: 'DAGGERHEART.Adversary.Social.Description'
|
description: 'DAGGERHEART.Adversary.social.description'
|
||||||
},
|
},
|
||||||
solo: {
|
solo: {
|
||||||
id: 'solo',
|
id: 'solo',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Solo.label',
|
label: 'DAGGERHEART.Adversary.Type.solo.label',
|
||||||
description: 'DAGGERHEART.Adversary.Solo.Description'
|
description: 'DAGGERHEART.Adversary.solo.description'
|
||||||
},
|
},
|
||||||
standard: {
|
standard: {
|
||||||
id: 'standard',
|
id: 'standard',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Standard.label',
|
label: 'DAGGERHEART.Adversary.Type.standard.label',
|
||||||
description: 'DAGGERHEART.Adversary.Standard.Description'
|
description: 'DAGGERHEART.Adversary.standard.description'
|
||||||
},
|
},
|
||||||
support: {
|
support: {
|
||||||
id: 'support',
|
id: 'support',
|
||||||
label: 'DAGGERHEART.Adversary.Type.Support.label',
|
label: 'DAGGERHEART.Adversary.Type.support.label',
|
||||||
description: 'DAGGERHEART.Adversary.Support.Description'
|
description: 'DAGGERHEART.Adversary.support.description'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const environmentTypes = {
|
export const environmentTypes = {
|
||||||
exploration: {
|
exploration: {
|
||||||
label: 'DAGGERHEART.Environment.Type.Exploration.label',
|
label: 'DAGGERHEART.Environment.Type.exploration.label',
|
||||||
description: 'DAGGERHEART.Environment.Type.Exploration.description'
|
description: 'DAGGERHEART.Environment.Type.exploration.description'
|
||||||
},
|
},
|
||||||
social: {
|
social: {
|
||||||
label: 'DAGGERHEART.Environment.Type.Social.label',
|
label: 'DAGGERHEART.Environment.Type.social.label',
|
||||||
description: 'DAGGERHEART.Environment.Type.Social.description'
|
description: 'DAGGERHEART.Environment.Type.social.description'
|
||||||
},
|
},
|
||||||
traversal: {
|
traversal: {
|
||||||
label: 'DAGGERHEART.Environment.Type.Traversal.label',
|
label: 'DAGGERHEART.Environment.Type.traversal.label',
|
||||||
description: 'DAGGERHEART.Environment.Type.Traversal.description'
|
description: 'DAGGERHEART.Environment.Type.traversal.description'
|
||||||
},
|
},
|
||||||
event: {
|
event: {
|
||||||
label: 'DAGGERHEART.Environment.Type.Event.label',
|
label: 'DAGGERHEART.Environment.Type.event.label',
|
||||||
description: 'DAGGERHEART.Environment.Type.Event.description'
|
description: 'DAGGERHEART.Environment.Type.event.description'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -712,14 +712,14 @@ export const valueTypes = {
|
||||||
export const actionTypes = {
|
export const actionTypes = {
|
||||||
passive: {
|
passive: {
|
||||||
id: 'passive',
|
id: 'passive',
|
||||||
label: 'DAGGERHEART.ActionType.Passive'
|
label: 'DAGGERHEART.ActionType.passive'
|
||||||
},
|
},
|
||||||
action: {
|
action: {
|
||||||
id: 'action',
|
id: 'action',
|
||||||
label: 'DAGGERHEART.ActionType.Action'
|
label: 'DAGGERHEART.ActionType.action'
|
||||||
},
|
},
|
||||||
reaction: {
|
reaction: {
|
||||||
id: 'reaction',
|
id: 'reaction',
|
||||||
label: 'DAGGERHEART.ActionType.Reaction'
|
label: 'DAGGERHEART.ActionType.reaction'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import CostSelectionDialog from '../../applications/costSelectionDialog.mjs';
|
|
||||||
import { DHActionDiceData, DHActionRollData, DHDamageData, DHDamageField } from './actionDice.mjs';
|
import { DHActionDiceData, DHActionRollData, DHDamageData, DHDamageField } from './actionDice.mjs';
|
||||||
import DhpActor from '../../documents/actor.mjs';
|
import DhpActor from '../../documents/actor.mjs';
|
||||||
import D20RollDialog from '../../dialogs/d20RollDialog.mjs';
|
import D20RollDialog from '../../dialogs/d20RollDialog.mjs';
|
||||||
|
|
@ -343,7 +342,9 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
label: 'Attack',
|
label: 'Attack',
|
||||||
type: this.actionType,
|
type: this.actionType,
|
||||||
difficulty: this.roll?.difficulty,
|
difficulty: this.roll?.difficulty,
|
||||||
formula: this.roll.getFormula()
|
formula: this.roll.getFormula(),
|
||||||
|
bonus: this.roll.bonus,
|
||||||
|
advantage: SYSTEM.ACTIONS.advandtageState[this.roll.advState].value
|
||||||
};
|
};
|
||||||
if (this.roll?.type === 'diceSet') roll.lite = true;
|
if (this.roll?.type === 'diceSet') roll.lite = true;
|
||||||
|
|
||||||
|
|
@ -372,7 +373,7 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
|
|
||||||
/* ROLL */
|
/* ROLL */
|
||||||
get hasRoll() {
|
get hasRoll() {
|
||||||
return !!this.roll?.type;
|
return !!this.roll?.type || !!this.roll?.bonus;
|
||||||
}
|
}
|
||||||
/* ROLL */
|
/* ROLL */
|
||||||
|
|
||||||
|
|
@ -544,6 +545,29 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* SAVE */
|
/* SAVE */
|
||||||
|
|
||||||
|
async toChat(origin) {
|
||||||
|
const cls = getDocumentClass('ChatMessage');
|
||||||
|
const systemData = {
|
||||||
|
title: game.i18n.localize('DAGGERHEART.ActionType.action'),
|
||||||
|
origin: origin,
|
||||||
|
img: this.img,
|
||||||
|
name: this.name,
|
||||||
|
description: this.description,
|
||||||
|
actions: []
|
||||||
|
};
|
||||||
|
const msg = new cls({
|
||||||
|
type: 'abilityUse',
|
||||||
|
user: game.user.id,
|
||||||
|
system: systemData,
|
||||||
|
content: await foundry.applications.handlebars.renderTemplate(
|
||||||
|
'systems/daggerheart/templates/chat/ability-use.hbs',
|
||||||
|
systemData
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
cls.create(msg.toObject());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DHDamageAction extends DHBaseAction {
|
export class DHDamageAction extends DHBaseAction {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@ export class DHActionRollData extends foundry.abstract.DataModel {
|
||||||
type: new fields.StringField({ nullable: true, initial: null, choices: SYSTEM.GENERAL.rollTypes }),
|
type: new fields.StringField({ nullable: true, initial: null, choices: SYSTEM.GENERAL.rollTypes }),
|
||||||
trait: new fields.StringField({ nullable: true, initial: null, choices: SYSTEM.ACTOR.abilities }),
|
trait: new fields.StringField({ nullable: true, initial: null, choices: SYSTEM.ACTOR.abilities }),
|
||||||
difficulty: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 }),
|
difficulty: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 }),
|
||||||
bonus: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 }),
|
bonus: new fields.NumberField({ nullable: true, initial: null, integer: true }),
|
||||||
|
advState: new fields.StringField({ choices: SYSTEM.ACTIONS.advandtageState, initial: 'neutral' }),
|
||||||
diceRolling: new fields.SchemaField({
|
diceRolling: new fields.SchemaField({
|
||||||
multiplier: new fields.StringField({
|
multiplier: new fields.StringField({
|
||||||
choices: SYSTEM.GENERAL.diceSetNumbers,
|
choices: SYSTEM.GENERAL.diceSetNumbers,
|
||||||
|
|
@ -62,7 +63,7 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
|
||||||
label: 'Multiplier'
|
label: 'Multiplier'
|
||||||
}),
|
}),
|
||||||
flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: 'Flat Multiplier' }),
|
flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: 'Flat Multiplier' }),
|
||||||
dice: new fields.StringField({ choices: SYSTEM.GENERAL.diceTypes, initial: 'd6', label: 'Formula' }),
|
dice: new fields.StringField({ choices: SYSTEM.GENERAL.diceTypes, initial: 'd6', label: 'Dice' }),
|
||||||
bonus: new fields.NumberField({ nullable: true, initial: null, label: 'Bonus' }),
|
bonus: new fields.NumberField({ nullable: true, initial: null, label: 'Bonus' }),
|
||||||
custom: new fields.SchemaField({
|
custom: new fields.SchemaField({
|
||||||
enabled: new fields.BooleanField({ label: 'Custom Formula' }),
|
enabled: new fields.BooleanField({ label: 'Custom Formula' }),
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,11 @@ export default class DhpAdversary extends BaseDataActor {
|
||||||
choices: SYSTEM.ACTOR.adversaryTypes,
|
choices: SYSTEM.ACTOR.adversaryTypes,
|
||||||
initial: SYSTEM.ACTOR.adversaryTypes.standard.id
|
initial: SYSTEM.ACTOR.adversaryTypes.standard.id
|
||||||
}),
|
}),
|
||||||
motivesAndTactics: new fields.HTMLField(),
|
description: new fields.StringField(),
|
||||||
|
motivesAndTactics: new fields.StringField(),
|
||||||
|
notes: new fields.HTMLField(),
|
||||||
difficulty: new fields.NumberField({ required: true, initial: 1, integer: true }),
|
difficulty: new fields.NumberField({ required: true, initial: 1, integer: true }),
|
||||||
|
hordeHp: new fields.NumberField({ required: true, initial: 1, integer: true }),
|
||||||
damageThresholds: new fields.SchemaField({
|
damageThresholds: new fields.SchemaField({
|
||||||
major: new fields.NumberField({ required: true, initial: 0, integer: true }),
|
major: new fields.NumberField({ required: true, initial: 0, integer: true }),
|
||||||
severe: new fields.NumberField({ required: true, initial: 0, integer: true })
|
severe: new fields.NumberField({ required: true, initial: 0, integer: true })
|
||||||
|
|
@ -40,6 +43,7 @@ export default class DhpAdversary extends BaseDataActor {
|
||||||
hitPoints: resourceField(),
|
hitPoints: resourceField(),
|
||||||
stress: resourceField()
|
stress: resourceField()
|
||||||
}),
|
}),
|
||||||
|
actions: new fields.ArrayField(new ActionField()),
|
||||||
attack: new ActionField({
|
attack: new ActionField({
|
||||||
initial: {
|
initial: {
|
||||||
name: 'Attack',
|
name: 'Attack',
|
||||||
|
|
@ -66,7 +70,7 @@ export default class DhpAdversary extends BaseDataActor {
|
||||||
experiences: new fields.TypedObjectField(
|
experiences: new fields.TypedObjectField(
|
||||||
new fields.SchemaField({
|
new fields.SchemaField({
|
||||||
name: new fields.StringField(),
|
name: new fields.StringField(),
|
||||||
value: new fields.NumberField({ required: true, integer: true, initial: 1 })
|
modifier: new fields.NumberField({ required: true, integer: true, initial: 1 })
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
bonuses: new fields.SchemaField({
|
bonuses: new fields.SchemaField({
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import { environmentTypes } from '../../config/actorConfig.mjs';
|
import { environmentTypes } from '../../config/actorConfig.mjs';
|
||||||
import BaseDataActor from './base.mjs';
|
import BaseDataActor from './base.mjs';
|
||||||
import ForeignDocumentUUIDField from '../fields/foreignDocumentUUIDField.mjs';
|
import ForeignDocumentUUIDField from '../fields/foreignDocumentUUIDField.mjs';
|
||||||
|
import ActionField from '../fields/actionField.mjs';
|
||||||
|
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
|
||||||
|
|
||||||
export default class DhEnvironment extends BaseDataActor {
|
export default class DhEnvironment extends BaseDataActor {
|
||||||
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Sheets.Environment'];
|
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Sheets.Environment'];
|
||||||
|
|
@ -21,15 +23,17 @@ export default class DhEnvironment extends BaseDataActor {
|
||||||
initial: SYSTEM.GENERAL.tiers.tier1.id
|
initial: SYSTEM.GENERAL.tiers.tier1.id
|
||||||
}),
|
}),
|
||||||
type: new fields.StringField({ choices: environmentTypes }),
|
type: new fields.StringField({ choices: environmentTypes }),
|
||||||
impulses: new fields.HTMLField(),
|
description: new fields.StringField(),
|
||||||
|
impulses: new fields.StringField(),
|
||||||
difficulty: new fields.NumberField({ required: true, initial: 11, integer: true }),
|
difficulty: new fields.NumberField({ required: true, initial: 11, integer: true }),
|
||||||
potentialAdversaries: new fields.TypedObjectField(
|
potentialAdversaries: new fields.TypedObjectField(
|
||||||
new fields.SchemaField({
|
new fields.SchemaField({
|
||||||
label: new fields.StringField(),
|
label: new fields.StringField(),
|
||||||
adversaries: new fields.TypedObjectField(new ForeignDocumentUUIDField({ type: 'Actor' }))
|
adversaries: new ForeignDocumentUUIDArrayField({ type: 'Actor' })
|
||||||
})
|
})
|
||||||
)
|
),
|
||||||
/* Features pending datamodel rework */
|
actions: new fields.ArrayField(new ActionField()),
|
||||||
|
notes: new fields.HTMLField()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { actionsTypes } from '../action/_module.mjs';
|
// import { actionsTypes } from '../action/_module.mjs';
|
||||||
|
|
||||||
// Temporary Solution
|
// Temporary Solution
|
||||||
export default class ActionField extends foundry.data.fields.ObjectField {
|
export default class ActionField extends foundry.data.fields.ObjectField {
|
||||||
getModel(value) {
|
getModel(value) {
|
||||||
return actionsTypes[value.type] ?? actionsTypes.attack;
|
return game.system.api.models.actionsTypes[value.type] ?? game.system.api.models.actionsTypes.attack;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { actionsTypes } from '../action/_module.mjs';
|
// import { actionsTypes } from '../action/_module.mjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes metadata about the item data model type
|
* Describes metadata about the item data model type
|
||||||
|
|
@ -60,7 +60,8 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
||||||
const actionType = {
|
const actionType = {
|
||||||
weapon: 'attack'
|
weapon: 'attack'
|
||||||
}[this.constructor.metadata.type],
|
}[this.constructor.metadata.type],
|
||||||
cls = actionsTypes.attack,
|
cls = game.system.api.models.actionsTypes[actionType],
|
||||||
|
// cls = actionsTypes.attack,
|
||||||
action = new cls(
|
action = new cls(
|
||||||
{
|
{
|
||||||
_id: foundry.utils.randomID(),
|
_id: foundry.utils.randomID(),
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
this.config.experiences = [];
|
this.config.experiences = [];
|
||||||
|
|
||||||
if (config.source?.action) {
|
if (config.source?.action) {
|
||||||
this.item = config.data.parent.items.get(config.source.item);
|
console.log(config)
|
||||||
|
this.item = config.data.parent.items.get(config.source.item) ?? config.data.parent;
|
||||||
this.action =
|
this.action =
|
||||||
config.data.attack?._id == config.source.action
|
config.data.attack?._id == config.source.action
|
||||||
? config.data.attack
|
? config.data.attack
|
||||||
|
|
@ -50,15 +51,18 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
};
|
};
|
||||||
|
|
||||||
async _prepareContext(_options) {
|
async _prepareContext(_options) {
|
||||||
|
console.log(this.config, this.roll)
|
||||||
const context = await super._prepareContext(_options);
|
const context = await super._prepareContext(_options);
|
||||||
context.hasRoll = !!this.config.roll;
|
context.hasRoll = !!this.config.roll;
|
||||||
|
context.roll = this.roll;
|
||||||
|
context.rollType = this.roll?.constructor.name;
|
||||||
context.experiences = Object.keys(this.config.data.experiences).map(id => ({
|
context.experiences = Object.keys(this.config.data.experiences).map(id => ({
|
||||||
id,
|
id,
|
||||||
...this.config.data.experiences[id]
|
...this.config.data.experiences[id]
|
||||||
}));
|
}));
|
||||||
context.selectedExperiences = this.config.experiences;
|
context.selectedExperiences = this.config.experiences;
|
||||||
context.advantage = this.config.advantage;
|
context.advantage = this.config.roll?.advantage;
|
||||||
/* context.diceOptions = this.diceOptions; */
|
context.diceOptions = SYSTEM.GENERAL.diceTypes;
|
||||||
context.canRoll = true;
|
context.canRoll = true;
|
||||||
context.isLite = this.config.roll?.lite;
|
context.isLite = this.config.roll?.lite;
|
||||||
if (this.config.costs?.length) {
|
if (this.config.costs?.length) {
|
||||||
|
|
@ -71,7 +75,9 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
context.uses = this.action.calcUses(this.config.uses);
|
context.uses = this.action.calcUses(this.config.uses);
|
||||||
context.canRoll = context.canRoll && this.action.hasUses(context.uses);
|
context.canRoll = context.canRoll && this.action.hasUses(context.uses);
|
||||||
}
|
}
|
||||||
|
context.extraFormula = this.config.extraFormula;
|
||||||
context.formula = this.roll.constructFormula(this.config);
|
context.formula = this.roll.constructFormula(this.config);
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -81,12 +87,18 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
this.config.costs = foundry.utils.mergeObject(this.config.costs, rest.costs);
|
this.config.costs = foundry.utils.mergeObject(this.config.costs, rest.costs);
|
||||||
}
|
}
|
||||||
if (this.config.uses) this.config.uses = foundry.utils.mergeObject(this.config.uses, rest.uses);
|
if (this.config.uses) this.config.uses = foundry.utils.mergeObject(this.config.uses, rest.uses);
|
||||||
|
if(rest.roll?.dice) {
|
||||||
|
Object.entries(rest.roll.dice).forEach(([key, value]) => {
|
||||||
|
this.roll[key] = value;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.config.extraFormula = rest.extraFormula;
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
static updateIsAdvantage(_, button) {
|
static updateIsAdvantage(_, button) {
|
||||||
const advantage = Number(button.dataset.advantage);
|
const advantage = Number(button.dataset.advantage);
|
||||||
this.config.advantage = this.config.advantage === advantage ? 0 : advantage;
|
this.config.roll.advantage = this.config.roll.advantage === advantage ? 0 : advantage;
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,17 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
|
||||||
async _prepareContext(_options) {
|
async _prepareContext(_options) {
|
||||||
const context = await super._prepareContext(_options);
|
const context = await super._prepareContext(_options);
|
||||||
context.title = this.config.title;
|
context.title = this.config.title;
|
||||||
context.formula = this.config.roll.formula;
|
context.extraFormula = this.config.extraFormula;
|
||||||
|
context.formula = this.roll.constructFormula(this.config);;
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static updateRollConfiguration(event, _, formData) {
|
||||||
|
const { ...rest } = foundry.utils.expandObject(formData.object);
|
||||||
|
this.config.extraFormula = rest.extraFormula;
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
static async submitRoll() {
|
static async submitRoll() {
|
||||||
await this.close({ submitted: true });
|
await this.close({ submitted: true });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -497,16 +497,18 @@ fieldset.daggerheart.chat {
|
||||||
align-items: end;
|
align-items: end;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
.dice {
|
.dice {
|
||||||
.dice-rolls.duality {
|
.dice-rolls {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
li {
|
&.duality {
|
||||||
display: flex;
|
li {
|
||||||
align-items: center;
|
display: flex;
|
||||||
justify-content: center;
|
align-items: center;
|
||||||
position: relative;
|
justify-content: center;
|
||||||
background: unset;
|
position: relative;
|
||||||
line-height: unset;
|
background: unset;
|
||||||
font-weight: unset;
|
line-height: unset;
|
||||||
|
font-weight: unset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -25,6 +25,21 @@
|
||||||
@import './less/actors/character/biography.less';
|
@import './less/actors/character/biography.less';
|
||||||
@import './less/actors/character/features.less';
|
@import './less/actors/character/features.less';
|
||||||
|
|
||||||
|
@import './less/actors/adversary/header.less';
|
||||||
|
@import './less/actors/adversary/sheet.less';
|
||||||
|
@import './less/actors/adversary/sidebar.less';
|
||||||
|
|
||||||
|
@import './less/actors/environment/header.less';
|
||||||
|
@import './less/actors/environment/sheet.less';
|
||||||
|
|
||||||
|
@import './less/applications/header.less';
|
||||||
|
@import './less/applications/adversary-settings/sheet.less';
|
||||||
|
@import './less/applications/adversary-settings/experiences.less';
|
||||||
|
@import './less/applications/adversary-settings/actions.less';
|
||||||
|
|
||||||
|
@import './less/applications/environment-settings/actions.less';
|
||||||
|
@import './less/applications/environment-settings/adversaries.less';
|
||||||
|
|
||||||
@import './less/actors/companion/sheet.less';
|
@import './less/actors/companion/sheet.less';
|
||||||
|
|
||||||
@import './less/actors/adversary.less';
|
@import './less/actors/adversary.less';
|
||||||
|
|
@ -38,6 +53,7 @@
|
||||||
@import './less/utils/fonts.less';
|
@import './less/utils/fonts.less';
|
||||||
|
|
||||||
@import './less/global/sheet.less';
|
@import './less/global/sheet.less';
|
||||||
|
@import './less/global/dialog.less';
|
||||||
@import './less/global/elements.less';
|
@import './less/global/elements.less';
|
||||||
@import './less/global/tab-navigation.less';
|
@import './less/global/tab-navigation.less';
|
||||||
@import './less/global/tab-form-footer.less';
|
@import './less/global/tab-form-footer.less';
|
||||||
|
|
@ -47,6 +63,7 @@
|
||||||
@import './less/global/feature-section.less';
|
@import './less/global/feature-section.less';
|
||||||
@import './less/global/inventory-item.less';
|
@import './less/global/inventory-item.less';
|
||||||
@import './less/global/inventory-fieldset-items.less';
|
@import './less/global/inventory-fieldset-items.less';
|
||||||
|
@import './less/global/prose-mirror.less';
|
||||||
@import '../node_modules/@yaireo/tagify/dist/tagify.css';
|
@import '../node_modules/@yaireo/tagify/dist/tagify.css';
|
||||||
|
|
||||||
.daggerheart {
|
.daggerheart {
|
||||||
|
|
|
||||||
20
styles/less/actors/adversary/actions.less
Normal file
20
styles/less/actors/adversary/actions.less
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.sheet.daggerheart.actor.dh-style.adversary {
|
||||||
|
.tab.actions {
|
||||||
|
.action-section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
overflow-y: auto;
|
||||||
|
mask-image: linear-gradient(0deg, transparent 0%, black 5%, black 95%, transparent 100%);
|
||||||
|
padding: 20px 0;
|
||||||
|
padding-top: 10px;
|
||||||
|
height: 95%;
|
||||||
|
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
80
styles/less/actors/adversary/header.less
Normal file
80
styles/less/actors/adversary/header.less
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.sheet.daggerheart.actor.dh-style.adversary {
|
||||||
|
.adversary-header-sheet {
|
||||||
|
padding: 0 15px;
|
||||||
|
padding-top: 36px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.name-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0;
|
||||||
|
padding-top: 5px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
input[type='text'] {
|
||||||
|
font-size: 32px;
|
||||||
|
height: 42px;
|
||||||
|
text-align: start;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
outline: 2px solid light-dark(@dark, @golden);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 3px 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
font: @font-body;
|
||||||
|
|
||||||
|
background: light-dark(@dark-15, @beige-15);
|
||||||
|
border: 1px solid light-dark(@dark, @beige);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.adversary-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 16px 0;
|
||||||
|
|
||||||
|
.description,
|
||||||
|
.motives-and-tatics {
|
||||||
|
font-family: @font-body;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.adversary-navigation {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
28
styles/less/actors/adversary/sheet.less
Normal file
28
styles/less/actors/adversary/sheet.less
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.sheet.daggerheart.actor.dh-style.adversary {
|
||||||
|
.window-content {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 275px 1fr;
|
||||||
|
grid-template-rows: 283px 1fr;
|
||||||
|
gap: 15px 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.adversary-sidebar-sheet {
|
||||||
|
grid-row: 1 / span 2;
|
||||||
|
grid-column: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.adversary-header-sheet {
|
||||||
|
grid-row: 1;
|
||||||
|
grid-column: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab {
|
||||||
|
grid-row: 2;
|
||||||
|
grid-column: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
341
styles/less/actors/adversary/sidebar.less
Normal file
341
styles/less/actors/adversary/sidebar.less
Normal file
|
|
@ -0,0 +1,341 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.sheet.daggerheart.actor.dh-style.adversary {
|
||||||
|
.adversary-sidebar-sheet {
|
||||||
|
width: 275px;
|
||||||
|
min-width: 275px;
|
||||||
|
border-right: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||||
|
|
||||||
|
.theme-light & {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.portrait {
|
||||||
|
position: relative;
|
||||||
|
border-bottom: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 235px;
|
||||||
|
width: 275px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.death-roll-btn {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.death-roll {
|
||||||
|
filter: grayscale(1);
|
||||||
|
|
||||||
|
.death-roll-btn {
|
||||||
|
display: flex;
|
||||||
|
position: absolute;
|
||||||
|
top: 30%;
|
||||||
|
right: 30%;
|
||||||
|
font-size: 6rem;
|
||||||
|
color: @beige;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-shadow: 0 0 8px @beige;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.threshold-section {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
background-color: light-dark(transparent, @dark-blue);
|
||||||
|
color: light-dark(@dark-blue, @golden);
|
||||||
|
padding: 5px 10px;
|
||||||
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
border-radius: 6px;
|
||||||
|
align-items: center;
|
||||||
|
width: fit-content;
|
||||||
|
height: 30px;
|
||||||
|
margin-top: 16px;
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: light-dark(@dark-blue, @golden);
|
||||||
|
|
||||||
|
&.threshold-value {
|
||||||
|
color: light-dark(@dark, @beige);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.threshold-legend {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -21px;
|
||||||
|
color: light-dark(@golden, @dark-blue);
|
||||||
|
background-color: light-dark(@dark-blue, @golden);
|
||||||
|
padding: 3px;
|
||||||
|
justify-self: anchor-center;
|
||||||
|
border-radius: 0 0 3px 3px;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hope-value {
|
||||||
|
display: flex;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-section {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
top: -20px;
|
||||||
|
gap: 16px;
|
||||||
|
margin-bottom: -10px;
|
||||||
|
|
||||||
|
.resources-section {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
|
||||||
|
.status-bar {
|
||||||
|
position: relative;
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
justify-items: center;
|
||||||
|
|
||||||
|
.status-label {
|
||||||
|
position: relative;
|
||||||
|
top: 40px;
|
||||||
|
height: 22px;
|
||||||
|
width: 79px;
|
||||||
|
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
|
||||||
|
background: light-dark(@dark-blue, @golden);
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 18px;
|
||||||
|
color: light-dark(@beige, @dark-blue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.status-value {
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
padding: 0 6px;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
align-items: center;
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 2;
|
||||||
|
color: @beige;
|
||||||
|
|
||||||
|
input[type='number'] {
|
||||||
|
background: transparent;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
width: 40px;
|
||||||
|
height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
border: none;
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
color: @beige;
|
||||||
|
|
||||||
|
&.bar-input {
|
||||||
|
padding: 0;
|
||||||
|
color: @beige;
|
||||||
|
backdrop-filter: none;
|
||||||
|
background: transparent;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background: @semi-transparent-dark-blue;
|
||||||
|
backdrop-filter: blur(9.5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar-label {
|
||||||
|
width: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.progress-bar {
|
||||||
|
position: absolute;
|
||||||
|
appearance: none;
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
border-radius: 6px;
|
||||||
|
z-index: 1;
|
||||||
|
background: @dark-blue;
|
||||||
|
|
||||||
|
&::-webkit-progress-bar {
|
||||||
|
border: none;
|
||||||
|
background: @dark-blue;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
&::-webkit-progress-value {
|
||||||
|
background: @gradient-hp;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
&.stress-color::-webkit-progress-value {
|
||||||
|
background: @gradient-stress;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
&::-moz-progress-bar {
|
||||||
|
background: @gradient-hp;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
&.stress-color::-moz-progress-bar {
|
||||||
|
background: @gradient-stress;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-section {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.status-number {
|
||||||
|
justify-items: center;
|
||||||
|
|
||||||
|
.status-value {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
width: 50px;
|
||||||
|
height: 30px;
|
||||||
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
border-bottom: none;
|
||||||
|
border-radius: 6px 6px 0 0;
|
||||||
|
padding: 0 6px;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: light-dark(transparent, @dark-blue);
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
|
&.armor-slots {
|
||||||
|
width: 80px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-label {
|
||||||
|
padding: 2px 10px;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: light-dark(@dark-blue, @golden);
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 18px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: light-dark(@beige, @dark-blue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.items-sidebar-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 5px;
|
||||||
|
|
||||||
|
.inventory-item {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.attack-section {
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
gap: 15px;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.items-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.experience-section {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
gap: 15px;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.experience-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 5px;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 10px;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.experience-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
width: 250px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.experience-name {
|
||||||
|
width: 180px;
|
||||||
|
text-align: start;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: @font-body;
|
||||||
|
color: light-dark(@dark, @beige);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.experience-value {
|
||||||
|
height: 25px;
|
||||||
|
width: 35px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: @font-body;
|
||||||
|
color: light-dark(@dark, @beige);
|
||||||
|
align-content: center;
|
||||||
|
text-align: center;
|
||||||
|
background: url(../assets/svg/experience-shield.svg) no-repeat;
|
||||||
|
|
||||||
|
.theme-light & {
|
||||||
|
background: url('../assets/svg/experience-shield-light.svg') no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.reaction-section {
|
||||||
|
display: flex;
|
||||||
|
padding: 0 10px;
|
||||||
|
margin-top: 20px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,9 +24,5 @@
|
||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
grid-column: 2;
|
grid-column: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.old-sheet {
|
|
||||||
width: 500px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
.portrait {
|
.portrait {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 235px;
|
|
||||||
width: 275px;
|
|
||||||
border-bottom: 1px solid light-dark(@dark-blue, @golden);
|
border-bottom: 1px solid light-dark(@dark-blue, @golden);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
|
@ -130,6 +128,7 @@
|
||||||
border: 1px solid light-dark(@dark-blue, @golden);
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
background: @dark-blue;
|
||||||
|
|
||||||
&::-webkit-progress-bar {
|
&::-webkit-progress-bar {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
@ -144,13 +143,9 @@
|
||||||
background: @gradient-stress;
|
background: @gradient-stress;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
&::-moz-progress-value,
|
|
||||||
&::-moz-progress-bar {
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-moz-progress-bar {
|
&::-moz-progress-bar {
|
||||||
background: @gradient-hp;
|
background: @gradient-hp;
|
||||||
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
&.stress-color::-moz-progress-bar {
|
&.stress-color::-moz-progress-bar {
|
||||||
background: @gradient-stress;
|
background: @gradient-stress;
|
||||||
|
|
|
||||||
140
styles/less/actors/environment/header.less
Normal file
140
styles/less/actors/environment/header.less
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.sheet.daggerheart.actor.dh-style.environment {
|
||||||
|
.environment-header-sheet {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: start;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.profile {
|
||||||
|
width: 100%;
|
||||||
|
height: 235px;
|
||||||
|
object-fit: cover;
|
||||||
|
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
top: -45px;
|
||||||
|
gap: 20px;
|
||||||
|
padding: 0 20px;
|
||||||
|
margin-bottom: -30px;
|
||||||
|
|
||||||
|
.item-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
padding-bottom: 0;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 3px 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
font: @font-body;
|
||||||
|
|
||||||
|
background: light-dark(@dark-15, @beige-15);
|
||||||
|
border: 1px solid light-dark(@dark, @beige);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-number {
|
||||||
|
justify-items: center;
|
||||||
|
|
||||||
|
.status-value {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
width: 50px;
|
||||||
|
height: 30px;
|
||||||
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
border-bottom: none;
|
||||||
|
border-radius: 6px 6px 0 0;
|
||||||
|
padding: 0 6px;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: light-dark(transparent, @dark-blue);
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
|
&.armor-slots {
|
||||||
|
width: 80px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-label {
|
||||||
|
padding: 2px 10px;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: light-dark(@dark-blue, @golden);
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 18px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: light-dark(@beige, @dark-blue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-name {
|
||||||
|
input[type='text'] {
|
||||||
|
font-size: 32px;
|
||||||
|
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 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
|
||||||
|
.description,
|
||||||
|
.impulses {
|
||||||
|
text-align: start;
|
||||||
|
font-family: @font-body;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.environment-navigation {
|
||||||
|
display: flex;
|
||||||
|
gap: 20px;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18
styles/less/actors/environment/sheet.less
Normal file
18
styles/less/actors/environment/sheet.less
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.sheet.daggerheart.actor.dh-style.environment {
|
||||||
|
.theme-light & {
|
||||||
|
background: url('../assets/parchments/dh-parchment-light.png');
|
||||||
|
}
|
||||||
|
.theme-dark & {
|
||||||
|
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab {
|
||||||
|
max-height: 300px;
|
||||||
|
overflow-y: auto;
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
74
styles/less/applications/adversary-settings/actions.less
Normal file
74
styles/less/applications/adversary-settings/actions.less
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.daggerheart.dh-style.dialog {
|
||||||
|
.tab.actions {
|
||||||
|
max-height: 450px;
|
||||||
|
overflow-y: auto;
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||||
|
|
||||||
|
.add-action-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.action-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 40px 1fr auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-family: @font-body;
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 3px 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
background: light-dark(@dark-15, @beige-15);
|
||||||
|
border: 1px solid light-dark(@dark, @beige);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
a {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
28
styles/less/applications/adversary-settings/experiences.less
Normal file
28
styles/less/applications/adversary-settings/experiences.less
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.daggerheart.dh-style.dialog {
|
||||||
|
.tab.experiences {
|
||||||
|
.add-experience-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.experience-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.experience-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 3fr 1fr 30px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18
styles/less/applications/adversary-settings/sheet.less
Normal file
18
styles/less/applications/adversary-settings/sheet.less
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.daggerheart.dh-style.dialog {
|
||||||
|
.tab {
|
||||||
|
&.details.active,
|
||||||
|
&.attack.active {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fieldsets-section {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
74
styles/less/applications/environment-settings/actions.less
Normal file
74
styles/less/applications/environment-settings/actions.less
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.daggerheart.dh-style.dialog.environment-settings {
|
||||||
|
.tab.actions {
|
||||||
|
max-height: 450px;
|
||||||
|
overflow-y: auto;
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||||
|
|
||||||
|
.add-action-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.action-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 40px 1fr auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-family: @font-body;
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 3px 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
background: light-dark(@dark-15, @beige-15);
|
||||||
|
border: 1px solid light-dark(@dark, @beige);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.label {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
a {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.daggerheart.dh-style.dialog {
|
||||||
|
.tab.adversaries {
|
||||||
|
max-height: 450px;
|
||||||
|
overflow-y: auto;
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||||
|
|
||||||
|
.add-action-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: start;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.category-name {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.adversaries-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.adversaries-dragger {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px dashed light-dark(@dark-blue-50, @beige-50);
|
||||||
|
border-radius: 3px;
|
||||||
|
color: light-dark(@dark-blue-50, @beige-50);
|
||||||
|
font-family: @font-body;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
20
styles/less/applications/header.less
Normal file
20
styles/less/applications/header.less
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
@import '../utils/colors.less';
|
||||||
|
@import '../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.daggerheart.dh-style.dialog {
|
||||||
|
.window-content {
|
||||||
|
.dialog-header {
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
h1 {
|
||||||
|
font-family: @font-subtitle;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 24px;
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
color: light-dark(@dark-blue, @golden);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
45
styles/less/global/dialog.less
Normal file
45
styles/less/global/dialog.less
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
@import '../utils/colors.less';
|
||||||
|
@import '../utils/fonts.less';
|
||||||
|
|
||||||
|
.theme-light {
|
||||||
|
.application.dialog.dh-style {
|
||||||
|
background-image: url('../assets/parchments/dh-parchment-light.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-dark {
|
||||||
|
.application.dialog.dh-style {
|
||||||
|
background-image: url('../assets/parchments/dh-parchment-dark.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.application.dialog.dh-style {
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
.window-header {
|
||||||
|
background: transparent;
|
||||||
|
border-bottom: none;
|
||||||
|
color: light-dark(@dark-blue, @beige);
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: light-dark(@dark-blue, @beige);
|
||||||
|
font-family: @font-body;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
color: light-dark(@dark-blue, @beige);
|
||||||
|
background: light-dark(transparent, @deep-black);
|
||||||
|
border: 1px solid light-dark(@dark-blue, transparent);
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
color: light-dark(@dark-blue, @golden);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@import '../utils/colors.less';
|
@import '../utils/colors.less';
|
||||||
@import '../utils/fonts.less';
|
@import '../utils/fonts.less';
|
||||||
|
|
||||||
.application.sheet.dh-style {
|
.application.dh-style {
|
||||||
border: 1px solid light-dark(@dark-blue, @golden);
|
border: 1px solid light-dark(@dark-blue, @golden);
|
||||||
|
|
||||||
input[type='text'],
|
input[type='text'],
|
||||||
|
|
@ -90,6 +90,7 @@
|
||||||
|
|
||||||
a:hover,
|
a:hover,
|
||||||
a.active {
|
a.active {
|
||||||
|
font-weight: bold;
|
||||||
text-shadow: 0 0 8px light-dark(@dark-blue, @golden);
|
text-shadow: 0 0 8px light-dark(@dark-blue, @golden);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,9 +112,25 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.fit-height {
|
||||||
|
height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
&.flex {
|
&.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
|
&.wrap {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px 20px;
|
||||||
|
}
|
||||||
|
.inline-child {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.checkbox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.one-column {
|
&.one-column {
|
||||||
|
|
@ -160,10 +177,12 @@
|
||||||
.nest-inputs {
|
.nest-inputs {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group {
|
.form-group {
|
||||||
|
width: 100%;
|
||||||
label {
|
label {
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@import '../utils/colors.less';
|
@import '../utils/colors.less';
|
||||||
@import '../utils/fonts.less';
|
@import '../utils/fonts.less';
|
||||||
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.character {
|
.application.daggerheart.dh-style {
|
||||||
.items-list {
|
.items-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@import '../utils/colors.less';
|
@import '../utils/colors.less';
|
||||||
@import '../utils/fonts.less';
|
@import '../utils/fonts.less';
|
||||||
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.character {
|
.application.daggerheart.dh-style {
|
||||||
.inventory-item {
|
.inventory-item {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 40px 1fr 60px;
|
grid-template-columns: 40px 1fr 60px;
|
||||||
|
|
@ -15,6 +15,10 @@
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
|
||||||
|
&.actor-img {
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-label {
|
.item-label {
|
||||||
|
|
|
||||||
24
styles/less/global/prose-mirror.less
Normal file
24
styles/less/global/prose-mirror.less
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
@import '../utils/colors.less';
|
||||||
|
|
||||||
|
.application {
|
||||||
|
prose-mirror {
|
||||||
|
height: 100% !important;
|
||||||
|
|
||||||
|
.editor-menu {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.editor-content {
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: light-dark(@dark-blue, @golden) transparent;
|
||||||
|
h1 {
|
||||||
|
font-size: 36px;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
font-size: 32px;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -18,6 +18,13 @@
|
||||||
grid-template-columns: 1fr 4fr 1fr;
|
grid-template-columns: 1fr 4fr 1fr;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
@import '../utils/colors.less';
|
@import '../utils/colors.less';
|
||||||
@import '../utils/fonts.less';
|
@import '../utils/fonts.less';
|
||||||
|
|
||||||
.sheet.daggerheart.dh-style {
|
.daggerheart.dh-style {
|
||||||
.tab-navigation {
|
.tab-navigation {
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
.feature-tab {
|
.feature-tab {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<section class="tooltip-part">
|
<section class="tooltip-part">
|
||||||
<div class="dice">
|
<div class="dice">
|
||||||
{{#each roll.dice}}
|
{{#each roll.dice as | dice index |}}
|
||||||
<header class="part-header flexrow">
|
<header class="part-header flexrow">
|
||||||
<span class="part-formula">{{formula}}</span>
|
<span class="part-formula">{{formula}}</span>
|
||||||
<span class="part-total">{{total}}</span>
|
<span class="part-total">{{total}}</span>
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
<li class="roll die {{../dice}}{{#if discarded}} discarded{{/if}} min">{{result}}</li>
|
<li class="roll die {{../dice}}{{#if discarded}} discarded{{/if}} min">{{result}}</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ol>
|
</ol>
|
||||||
|
{{#if (eq index 0)}}
|
||||||
<div class="attack-roll-advantage-container">
|
<div class="attack-roll-advantage-container">
|
||||||
{{#if (eq ../roll.advantage.type 1)}}{{localize "DAGGERHEART.General.Advantage.Full"}}{{/if}}{{#if (eq ../roll.advantage.type -1)}}{{localize "DAGGERHEART.General.Disadvantage.Full"}}{{/if}}
|
{{#if (eq ../roll.advantage.type 1)}}{{localize "DAGGERHEART.General.Advantage.Full"}}{{/if}}{{#if (eq ../roll.advantage.type -1)}}{{localize "DAGGERHEART.General.Disadvantage.Full"}}{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,30 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#each roll.extra as | extra | }}
|
||||||
|
<div class="dice">
|
||||||
|
<header class="part-header flexrow">
|
||||||
|
<span class="part-formula">
|
||||||
|
<span>1{{extra.dice}}</span>
|
||||||
|
</span>
|
||||||
|
<span class="part-total">{{extra.value}}</span>
|
||||||
|
</header>
|
||||||
|
<div class="flexrow">
|
||||||
|
<ol class="dice-rolls">
|
||||||
|
<li class="roll die {{extra.dice}}">
|
||||||
|
<div class="dice-container">
|
||||||
|
<div class="dice-inner-container">
|
||||||
|
<div class="dice-wrapper">
|
||||||
|
<img class="dice" src="../icons/svg/{{extra.dice}}-grey.svg"/>
|
||||||
|
</div>
|
||||||
|
<div class="dice-value">{{extra.value}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
{{#if roll.modifierTotal}}<div class="duality-modifier">{{#if (gt roll.modifierTotal 0)}}+{{/if}}{{roll.modifierTotal}}</div>{{/if}}
|
{{#if roll.modifierTotal}}<div class="duality-modifier">{{#if (gt roll.modifierTotal 0)}}+{{/if}}{{roll.modifierTotal}}</div>{{/if}}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
11
templates/sheets/actors/adversary/actions.hbs
Normal file
11
templates/sheets/actors/adversary/actions.hbs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
|
||||||
|
data-tab='{{tabs.actions.id}}'
|
||||||
|
data-group='{{tabs.actions.group}}'
|
||||||
|
>
|
||||||
|
<div class="action-section">
|
||||||
|
{{#if document.system.actions}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.actions.label) type='action'}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
8
templates/sheets/actors/adversary/effects.hbs
Normal file
8
templates/sheets/actors/adversary/effects.hbs
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}'
|
||||||
|
data-tab='{{tabs.effects.id}}'
|
||||||
|
data-group='{{tabs.effects.group}}'
|
||||||
|
>
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.activeEffects') type='effect'}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.Sheets.Global.inativeEffects') type='effect'}}
|
||||||
|
</section>
|
||||||
|
|
@ -1,9 +1,43 @@
|
||||||
<header class='item-card-header'>
|
<header class='adversary-header-sheet'>
|
||||||
<img class='profile' src='{{source.img}}' data-action='editImage' data-edit='img' />
|
<line-div></line-div>
|
||||||
<div class='item-info'>
|
<div class="name-row">
|
||||||
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
|
<h1 class='actor-name'>
|
||||||
<div class='item-description'>
|
<input type='text' name='name' value='{{source.name}}' placeholder='Actor Name'
|
||||||
<h3>{{localize 'TYPES.Actor.adversary'}}</h3>
|
/>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div class="tags">
|
||||||
|
<div class="tag">
|
||||||
|
<span>
|
||||||
|
{{localize (concat 'DAGGERHEART.Tiers.' source.system.tier)}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="tag">
|
||||||
|
<span>
|
||||||
|
{{localize (concat 'DAGGERHEART.Adversary.Type.' source.system.type '.label')}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{#if (eq source.system.type 'horde')}}
|
||||||
|
<div class="tag">
|
||||||
|
<span>{{source.system.hordeHp}}</span>
|
||||||
|
<span>/HP</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<line-div></line-div>
|
||||||
|
<div class="adversary-info">
|
||||||
|
<div class="description">
|
||||||
|
<i>{{source.system.description}}</i>
|
||||||
|
</div>
|
||||||
|
<div class="motives-and-tatics">
|
||||||
|
<b>{{localize 'DAGGERHEART.Sheets.Adversary.FIELDS.motivesAndTactics.label'}}: </b>{{{source.system.motivesAndTactics}}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="adversary-navigation">
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||||
|
<button data-action="openSettings">
|
||||||
|
<i class="fa-solid fa-wrench"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.information.cssClass}} {{tabs.information.id}}'
|
|
||||||
data-tab='{{tabs.information.id}}'
|
|
||||||
data-group='{{tabs.information.group}}'
|
|
||||||
>
|
|
||||||
{{!-- <fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Adversary.FIELDS.description.label" }}</legend>
|
|
||||||
|
|
||||||
{{formInput systemFields.description value=source.system.description}}
|
|
||||||
</fieldset> --}}
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Adversary.FIELDS.motivesAndTactics.label" }}</legend>
|
|
||||||
|
|
||||||
{{formInput systemFields.motivesAndTactics value=source.system.motivesAndTactics}}
|
|
||||||
</fieldset>
|
|
||||||
</section>
|
|
||||||
|
|
@ -1,80 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.main.cssClass}} {{tabs.main.id}}'
|
|
||||||
data-tab='{{tabs.main.id}}'
|
|
||||||
data-group='{{tabs.main.group}}'
|
|
||||||
>
|
|
||||||
<div class="adversary-container">
|
|
||||||
<button data-action="reactionRoll">Reaction Test</button>
|
|
||||||
<fieldset class="two-columns even">
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Adversary.General"}}</legend>
|
|
||||||
|
|
||||||
{{formGroup systemFields.tier value=source.system.tier localize=true}}
|
|
||||||
{{formGroup systemFields.type value=source.system.type localize=true}}
|
|
||||||
<div class="full-width">{{formGroup systemFields.difficulty value=source.system.difficulty}}</div>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Adversary.DamageThresholds"}}</legend>
|
|
||||||
|
|
||||||
{{formGroup systemFields.damageThresholds.fields.major value=source.system.damageThresholds.major}}
|
|
||||||
{{formGroup systemFields.damageThresholds.fields.severe value=source.system.damageThresholds.severe}}
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Adversary.HitPoints"}}</legend>
|
|
||||||
|
|
||||||
{{formGroup systemFields.resources.fields.hitPoints.fields.value value=source.system.resources.hitPoints.value}}
|
|
||||||
{{formGroup systemFields.resources.fields.hitPoints.fields.max value=source.system.resources.hitPoints.max}}
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Stress"}}</legend>
|
|
||||||
|
|
||||||
{{formGroup systemFields.resources.fields.stress.fields.value value=source.system.resources.stress.value}}
|
|
||||||
{{formGroup systemFields.resources.fields.stress.fields.max value=source.system.resources.stress.max}}
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Experiences"}} <a><i class="fa-solid fa-plus icon-button" data-action="addExperience"></i></a></legend>
|
|
||||||
|
|
||||||
{{#each source.system.experiences}}
|
|
||||||
<fieldset class="one-column">
|
|
||||||
<legend>{{this.name}} <a><i class="fa-solid fa-trash icon-button" data-action="removeExperience" data-experience="{{@key}}"></i></a></legend>
|
|
||||||
|
|
||||||
{{formGroup @root.systemFields.experiences.element.fields.name name=(concat "system.experiences." @key ".name") value=this.name }}
|
|
||||||
{{formGroup @root.systemFields.experiences.element.fields.value name=(concat "system.experiences." @key ".value") value=this.value }}
|
|
||||||
</fieldset>
|
|
||||||
{{/each}}
|
|
||||||
</fieldset>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset class="two-columns even">
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Attack"}}</legend>
|
|
||||||
<button data-action="attackConfigure">Configure</button>
|
|
||||||
<button data-action="attackRoll">Attack</button>
|
|
||||||
<fieldset class="action-category" style="grid-column: 1 / -1;">
|
|
||||||
<legend class="action-category-label" data-action="toggleSection" data-section="range">
|
|
||||||
<div>Name</div>
|
|
||||||
</legend>
|
|
||||||
<div class="action-category-data open">
|
|
||||||
{{formGroup systemFields.attack.fields.name value=source.system.attack.name name="system.attack.name"}}
|
|
||||||
{{formGroup systemFields.attack.fields.img value=source.img label="Icon" name="system.attack.img"}}
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<div>
|
|
||||||
<fieldset class="action-category">
|
|
||||||
<legend class="action-category-label" data-action="toggleSection" data-section="range">
|
|
||||||
<div>Bonus to Hit</div>
|
|
||||||
</legend>
|
|
||||||
<div class="action-category-data open">
|
|
||||||
{{formField systemFields.attack.fields.roll.fields.bonus value=source.system.attack.roll.bonus name="system.attack.roll.bonus"}}
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
{{> 'systems/daggerheart/templates/views/actionTypes/range-target.hbs' fields=(object range=systemFields.attack.fields.range target=systemFields.attack.fields.target.fields) source=(object target=source.system.attack.target range=source.system.attack.range) path="system.attack."}}
|
|
||||||
</div>
|
|
||||||
{{> 'systems/daggerheart/templates/views/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=source.system.attack.damage path="system.attack."}}
|
|
||||||
<div style="grid-column: 1 / -1;">
|
|
||||||
{{> 'systems/daggerheart/templates/views/actionTypes/effect.hbs' fields=systemFields.attack.fields.effects.element.fields source=source.system.attack.effects}}
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
10
templates/sheets/actors/adversary/notes.hbs
Normal file
10
templates/sheets/actors/adversary/notes.hbs
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.notes.cssClass}} {{tabs.notes.id}}'
|
||||||
|
data-tab='{{tabs.notes.id}}'
|
||||||
|
data-group='{{tabs.notes.group}}'
|
||||||
|
>
|
||||||
|
<fieldset class="fit-height">
|
||||||
|
<legend>{{localize tabs.notes.label}}</legend>
|
||||||
|
{{formInput systemFields.notes value=document.system.notes enriched=document.system.notes localize=true toggled=true}}
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
111
templates/sheets/actors/adversary/sidebar.hbs
Normal file
111
templates/sheets/actors/adversary/sidebar.hbs
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
<aside class="adversary-sidebar-sheet">
|
||||||
|
<div class="portrait {{#if (gte source.system.resources.hitPoints.value source.system.resources.hitPoints.maxTotal)}}death-roll{{/if}}">
|
||||||
|
<img src="{{source.img}}" alt="{{source.name}}" data-action='editImage' data-edit="img">
|
||||||
|
<a class="death-roll-btn" data-tooltip="{{localize "DAGGERHEART.Sheets.PC.Health.DeathMoveTooltip"}}" data-action="makeDeathMove"><i class="fas fa-skull death-save" ></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="info-section">
|
||||||
|
<div class="resources-section">
|
||||||
|
<div class="status-bar">
|
||||||
|
<div class='status-value'>
|
||||||
|
<p><input class="bar-input" name="system.resources.hitPoints.value" value="{{source.system.resources.hitPoints.value}}" type="number"></p>
|
||||||
|
<p>/</p>
|
||||||
|
<p class="bar-label">{{source.system.resources.hitPoints.max}}</p>
|
||||||
|
</div>
|
||||||
|
<progress
|
||||||
|
class='progress-bar'
|
||||||
|
value='{{source.system.resources.hitPoints.value}}'
|
||||||
|
max='{{source.system.resources.hitPoints.max}}'
|
||||||
|
></progress>
|
||||||
|
<div class="status-label">
|
||||||
|
<h4>HP</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="status-bar">
|
||||||
|
<div class='status-value'>
|
||||||
|
<p><input class="bar-input" name="system.resources.stress.value" value="{{source.system.resources.stress.value}}" type="number"></p>
|
||||||
|
<p>/</p>
|
||||||
|
<p class="bar-label">{{source.system.resources.stress.max}}</p>
|
||||||
|
</div>
|
||||||
|
<progress
|
||||||
|
class='progress-bar stress-color'
|
||||||
|
value='{{source.system.resources.stress.value}}'
|
||||||
|
max='{{source.system.resources.stress.max}}'
|
||||||
|
></progress>
|
||||||
|
<div class="status-label">
|
||||||
|
<h4>Stress</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="status-section">
|
||||||
|
<div class="threshold-section">
|
||||||
|
<h4 class="threshold-label">{{localize "DAGGERHEART.Sheets.PC.Health.Minor"}}</h4>
|
||||||
|
<h4 class="threshold-value">{{document.system.damageThresholds.major}}</h4>
|
||||||
|
<h4 class="threshold-label">{{localize "DAGGERHEART.Sheets.PC.Health.Major"}}</h4>
|
||||||
|
<h4 class="threshold-value">{{document.system.damageThresholds.severe}}</h4>
|
||||||
|
<h4 class="threshold-label">{{localize "DAGGERHEART.Sheets.PC.Health.Severe"}}</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="status-section">
|
||||||
|
<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>Difficulty</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="status-number">
|
||||||
|
<div class='status-value armor-slots'>
|
||||||
|
{{#if source.system.attack.target.amount}}
|
||||||
|
<p>{{source.system.attack.target.amount}}</p>
|
||||||
|
{{else}}
|
||||||
|
<p>-</p>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="status-label">
|
||||||
|
<h4>Attack</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="attack-section">
|
||||||
|
<div class="title">
|
||||||
|
<side-line-div class="invert"></side-line-div>
|
||||||
|
<h3>Attack</h3>
|
||||||
|
<side-line-div></side-line-div>
|
||||||
|
</div>
|
||||||
|
<ul class="items-sidebar-list">
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=source.system.attack type=source.system.attack.systemPath isSidebar=true}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="experience-section">
|
||||||
|
<div class="title">
|
||||||
|
<side-line-div class="invert"></side-line-div>
|
||||||
|
<h3>Experience</h3>
|
||||||
|
<side-line-div></side-line-div>
|
||||||
|
</div>
|
||||||
|
<div class="experience-list">
|
||||||
|
{{#each source.system.experiences as |experience id|}}
|
||||||
|
<div class="experience-row">
|
||||||
|
<div class="experience-value">
|
||||||
|
+{{experience.modifier}}
|
||||||
|
</div>
|
||||||
|
<span class="experience-name">{{experience.name}}</span>
|
||||||
|
<div class="controls">
|
||||||
|
<a data-action="toChat" data-type="experience" data-uuid="{{id}}"><i class="fa-regular fa-message"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<line-div></line-div>
|
||||||
|
<div class="reaction-section">
|
||||||
|
<button data-action="reactionRoll">Reaction Test</button>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
max='{{document.system.resources.hitPoints.maxTotal}}'
|
max='{{document.system.resources.hitPoints.maxTotal}}'
|
||||||
></progress>
|
></progress>
|
||||||
<div class="status-label">
|
<div class="status-label">
|
||||||
<h4>Health</h4>
|
<h4>HP</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
9
templates/sheets/actors/environment/actions.hbs
Normal file
9
templates/sheets/actors/environment/actions.hbs
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
|
||||||
|
data-tab='{{tabs.actions.id}}'
|
||||||
|
data-group='{{tabs.actions.group}}'
|
||||||
|
>
|
||||||
|
<div class="action-section">
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize tabs.actions.label) type='action'}}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
@ -1,9 +1,49 @@
|
||||||
<header class='item-card-header'>
|
<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-info'>
|
<div class='item-container'>
|
||||||
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
|
<div class="item-info">
|
||||||
<div class='item-description'>
|
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
|
||||||
<h3>{{localize 'TYPES.Actor.environment'}}</h3>
|
<div class="tags">
|
||||||
|
<div class="tag">
|
||||||
|
<span>
|
||||||
|
{{localize (concat 'DAGGERHEART.Tiers.' source.system.tier)}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{#if source.system.type}}
|
||||||
|
<div class="tag">
|
||||||
|
<span>
|
||||||
|
{{localize (concat 'DAGGERHEART.Environment.Type.' source.system.type '.label')}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</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>Difficulty</h4>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<line-div></line-div>
|
||||||
|
<div class="environment-info">
|
||||||
|
<div class="description">
|
||||||
|
<i>{{source.system.description}}</i>
|
||||||
|
</div>
|
||||||
|
<div class="impulses">
|
||||||
|
<b>{{localize 'DAGGERHEART.Sheets.Environment.FIELDS.impulses.label'}}: </b>{{{source.system.impulses}}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="environment-navigation">
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
|
||||||
|
<button data-action="openSettings">
|
||||||
|
<i class="fa-solid fa-wrench"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.information.cssClass}} {{tabs.information.id}}'
|
|
||||||
data-tab='{{tabs.information.id}}'
|
|
||||||
data-group='{{tabs.information.group}}'
|
|
||||||
>
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Environment.description"}}</legend>
|
|
||||||
|
|
||||||
{{formInput systemFields.description value=source.system.description }}
|
|
||||||
</fieldset>
|
|
||||||
<fieldset>
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Environment.impulses"}}</legend>
|
|
||||||
|
|
||||||
{{formInput systemFields.impulses value=source.system.impulses }}
|
|
||||||
</fieldset>
|
|
||||||
</section>
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.main.cssClass}} {{tabs.main.id}}'
|
|
||||||
data-tab='{{tabs.main.id}}'
|
|
||||||
data-group='{{tabs.main.group}}'
|
|
||||||
>
|
|
||||||
<fieldset class="two-columns even">
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Environment.general"}}</legend>
|
|
||||||
|
|
||||||
{{formGroup systemFields.tier value=source.system.tier localize=true }}
|
|
||||||
{{formGroup systemFields.type value=source.system.type localize=true }}
|
|
||||||
{{formGroup systemFields.difficulty value=source.system.difficulty localize=true }}
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset class="one-column">
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Environment.potentialAdversaries.label"}}<a><i class="fa-solid fa-plus icon-button" data-action="addAdversary"></i></a></legend>
|
|
||||||
|
|
||||||
{{#each source.system.potentialAdversaries}}
|
|
||||||
<fieldset class="potential-adversary-container" data-potential-adversary="{{@key}}">
|
|
||||||
<legend><input name="{{concat "system.potentialAdversaries." id ".label" }}" value="{{this.label}}" /><i class="fa-solid fa-trash" data-action="deleteProperty" data-path="system.potentialAdversaries" id={{@key}}></i></legend>
|
|
||||||
{{#if (eq (length this.adversaries) 0)}}
|
|
||||||
<div class="adversary-placeholder">{{localize "DAGGERHEART.Sheets.Environment.potentialAdversaries.placeholder"}}</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="adversaries-container">
|
|
||||||
{{#each this.adversaries as |adversary id|}}
|
|
||||||
<div class="adversary-container" data-action="viewAdversary" data-potential-adversary="{{@../key}}" data-adversary="{{id}}">{{adversary.name}}</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</fieldset>
|
|
||||||
{{/each}}
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset class="one-column">
|
|
||||||
<legend>{{localize "DAGGERHEART.Sheets.Environment.features.label"}}<a><i class="fa-solid fa-plus icon-button" data-action="addFeature"></i></a></legend>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
</section>
|
|
||||||
10
templates/sheets/actors/environment/notes.hbs
Normal file
10
templates/sheets/actors/environment/notes.hbs
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.notes.cssClass}} {{tabs.notes.id}}'
|
||||||
|
data-tab='{{tabs.notes.id}}'
|
||||||
|
data-group='{{tabs.notes.group}}'
|
||||||
|
>
|
||||||
|
<fieldset class="fit-height">
|
||||||
|
<legend>{{localize tabs.notes.label}}</legend>
|
||||||
|
{{formInput systemFields.notes value=document.system.notes enriched=document.system.notes localize=true toggled=true}}
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
11
templates/sheets/actors/environment/potentialAdversaries.hbs
Normal file
11
templates/sheets/actors/environment/potentialAdversaries.hbs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.potentialAdversaries.cssClass}} {{tabs.potentialAdversaries.id}}'
|
||||||
|
data-tab='{{tabs.potentialAdversaries.id}}'
|
||||||
|
data-group='{{tabs.potentialAdversaries.group}}'
|
||||||
|
>
|
||||||
|
<div class="action-section">
|
||||||
|
{{#each document.system.potentialAdversaries}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=this.label type='adversary' isGlassy=true adversaries=this.adversaries}}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
@ -1,238 +0,0 @@
|
||||||
<div>
|
|
||||||
<header class="adversary-header-container">
|
|
||||||
<div class="adversary-header flexrow">
|
|
||||||
<img class="flex0" src="{{document.img}}" data-edit="img" data-action="onEditImage" title="{{document.name}}" height="64" width="64"/>
|
|
||||||
<div class="adversary-title">
|
|
||||||
{{#if this.editMode}}
|
|
||||||
{{formInput fields.name value=source.name rootId=partId placeholder="{{ localize 'Name' }}"}}
|
|
||||||
{{else}}
|
|
||||||
<div class="title-text">{{this.title}}</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<i class="fa-solid fa-wrench icon-button secondary {{#if this.editMode}}active{{/if}}" data-action="toggleSlider" style="position: absolute; right: 4px; top: 4px;"></i>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section class="sheet-body">
|
|
||||||
{{#if this.editMode}}
|
|
||||||
<div>
|
|
||||||
<h2>{{localize "DAGGERHEART.Sheets.Adversary.Description"}}</h2>
|
|
||||||
<textarea name="system.description">{{source.system.description}}</textarea>
|
|
||||||
<h2 class="motive-container">
|
|
||||||
<div class="motive-title">
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.Adversary.MotivesAndTactics"}}</div>
|
|
||||||
<i class="fa-solid fa-plus" data-action="addMotive"></i>
|
|
||||||
</div>
|
|
||||||
</h2>
|
|
||||||
<div class="ability-choices">
|
|
||||||
{{#each source.system.motivesAndTactics as |motive index|}}
|
|
||||||
<div class="ability-chip">
|
|
||||||
<input type="text" name="system.motivesAndTactics.{{index}}" value="{{motive}}" />
|
|
||||||
<button><i data-action="removeMotive" data-motive="{{index}}" class="fa-solid fa-x"></i></button>
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="adversary-content-container">
|
|
||||||
<div class="adversary-statistics-container">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Tier"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<select name="system.tier">
|
|
||||||
{{selectOptions config.GENERAL.tiers selected=source.system.tier labelAttr="key"}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Type"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<select name="system.type">
|
|
||||||
{{selectOptions config.ACTOR.adversaryTypes selected=source.system.type labelAttr="name" localize=true}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Attack.Modifier"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<input type="text" name="system.attackModifier" value="{{source.system.attackModifier}}" data-dtype="Number" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="attack-container">
|
|
||||||
<h2>{{localize "DAGGERHEART.Sheets.Adversary.Attack.Title"}}</h2>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Attack.Name"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<input type="text" name="system.attack.name" value="{{source.system.attack.name}}" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Attack.Range"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<select name="system.attack.range">
|
|
||||||
{{selectOptions config.GENERAL.range selected=source.system.attack.range labelAttr="name" localize=true}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Attack.Damage.Title"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Attack.Damage.Value"}}</label>
|
|
||||||
<input type="text" name="system.attack.damage.value" value="{{source.system.attack.damage.value}}" />
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Attack.Damage.Type"}}</label>
|
|
||||||
<select name="system.attack.damage.type">
|
|
||||||
{{selectOptions config.GENERAL.damageTypes selected=source.system.attack.damage.type labelAttr="name" localize=true}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Difficulty"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<input type="text" name="system.difficulty" value="{{source.system.difficulty}}" data-dtype="Number" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.DamageThresholds.Title"}}</label>
|
|
||||||
<div class="form-fields adversary-damage-threshold-container">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.DamageThresholds.Major"}}</label>
|
|
||||||
<input type="text" name="system.damageThresholds.major" value="{{source.system.damageThresholds.major}}" data-dtype="Number" />
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.DamageThresholds.Severe"}}</label>
|
|
||||||
<input type="text" name="system.damageThresholds.severe" value="{{source.system.damageThresholds.severe}}" data-dtype="Number" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.HP"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<input type="text" name="system.resources.hitPoints.max" value="{{source.system.resources.hitPoints.max}}" data-dtype="Number" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Stress"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<input type="text" name="system.resources.stress.max" value="{{source.system.resources.stress.max}}" data-dtype="Number" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2 class="experience-container">
|
|
||||||
<div class="flex-centered">
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.Adversary.Experiences"}}</div>
|
|
||||||
<i class="fa-solid fa-plus" data-action="addExperience"></i>
|
|
||||||
</div>
|
|
||||||
</h2>
|
|
||||||
{{#each source.system.experiences as |experience index|}}
|
|
||||||
<div class="experience-chip">
|
|
||||||
<input class="experience.value" type="text" name="system.experiences.{{index}}.name" value="{{experience.name}}" />
|
|
||||||
<input class="experience-value" type="text" name="system.experiences.{{index}}.value" value="{{experience.value}}" data-dtype="Number" />
|
|
||||||
<button class="experience-button" data-action="removeExperience" data-experience="{{experience.id}}"><i class="fa-solid fa-x"></i></button>
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
<div class="adversary-moves-container">
|
|
||||||
<h2 class="moves-edit-container">{{localize "DAGGERHEART.Sheets.Adversary.Features"}} <i class="fa-solid fa-plus" data-action="addMove"></i></h2>
|
|
||||||
{{#each this.data.features as |feature key|}}
|
|
||||||
<div class="chip-container">
|
|
||||||
<div class="chip-inner-container">
|
|
||||||
<img src="{{feature.img}}" />
|
|
||||||
<div class="move-title">{{feature.name}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="chip-inner-container">
|
|
||||||
<button data-action="viewMove" data-move={{feature.uuid}}><i class="fa-solid fa-fw fa-search"></i></button>
|
|
||||||
<button data-action="removeMove" data-move={{feature.uuid}}><i class="fa-solid fa-trash"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="motive-container">
|
|
||||||
<div class="motive-title">
|
|
||||||
<span class="motive-title-value"><strong>{{localize "DAGGERHEART.Sheets.Adversary.Description"}}:</strong> {{this.data.description}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="motive-title">
|
|
||||||
<span class="motive-title-value"><strong>{{localize "DAGGERHEART.Sheets.Adversary.MotivesAndTactics"}}:</strong> {{this.data.motivesAndTactics}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="adversary-content-container">
|
|
||||||
<div class="adversary-statistics-container">
|
|
||||||
<div class="statistic-section">
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Tier"}}:</label>
|
|
||||||
<span class="statistic-value">{{this.data.tier}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Type"}}:</label>
|
|
||||||
<span class="statistic-value">{{this.data.type}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-section">
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Difficulty"}}:</label>
|
|
||||||
<span class="statistic-value">{{this.data.difficulty}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Reaction"}}</label>
|
|
||||||
<img class="adversary-roll" data-action="reactionRoll" src="icons/svg/d20-grey.svg" />
|
|
||||||
</div>
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Attack.Modifier"}}:</label>
|
|
||||||
<span class="statistic-value">+{{this.data.attack.attackModifier}}</span>
|
|
||||||
<img class="adversary-roll" data-action="attackRoll" data-value="{{this.data.attack.attackModifier}}" data-name="{{this.data.attack.name}}" data-damage="{{this.data.attack.damage.value}}" data-damage-type="{{this.data.attack.damage.type}}" src="icons/svg/d20-grey.svg" />
|
|
||||||
</div>
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize this.data.attack.name}}</label>
|
|
||||||
<span class="statistic-value">{{this.data.attack.range}} | {{this.data.attack.damage.value}} {{this.data.attack.damage.typeName}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-section">
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.PC.Health.Major"}}</label>
|
|
||||||
<span class="statistic-value">{{this.data.damageThresholds.major}}</span>
|
|
||||||
<div class="vertical-separator" style="height: 16px; margin: 0 4px;"></div>
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.PC.Health.Severe"}}</label>
|
|
||||||
<span class="statistic-value">{{this.data.damageThresholds.severe}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-resource-container">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.HP"}}</label>
|
|
||||||
<div class="statistic-resource-inner-container">
|
|
||||||
{{#times this.data.hp.max}}
|
|
||||||
<input class="statistic-resource-input" type="checkbox" data-action="toggleHP" data-index="{{this}}" {{checked (gt ../data.hp.value this)}} />
|
|
||||||
{{/times}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-resource-container">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Stress"}}</label>
|
|
||||||
<div class="statistic-resource-inner-container">
|
|
||||||
{{#times this.data.stress.max}}
|
|
||||||
<input class="statistic-resource-input" type="checkbox" data-action="toggleStress" data-index="{{this}}" {{checked (gt ../data.stress.value this)}} />
|
|
||||||
{{/times}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-section">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Experience"}}</label>
|
|
||||||
{{#each source.system.experiences as |experience index|}}
|
|
||||||
<div class="experience-row">
|
|
||||||
<span>{{experience.name}}</span>
|
|
||||||
|
|
||||||
<span>{{#if (gte experience.value 0)}}+{{else}}-{{/if}}{{experience.value}}</span>
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
{{!-- <div class="statistic-resource-container">
|
|
||||||
<label class="statistic-title">{{localize "HP:"}}</label>
|
|
||||||
<span class="statistic-value">{{this.data.hp.max}}</span>
|
|
||||||
</div> --}}
|
|
||||||
</div>
|
|
||||||
<div class="adversary-moves-container">
|
|
||||||
<div class="moves-title">{{localize "DAGGERHEART.Sheets.Adversary.Features"}}</div>
|
|
||||||
{{#each this.data.features as |feature index|}}
|
|
||||||
<div class="move-container">
|
|
||||||
<label class="moves-name">{{feature.name}}</label>
|
|
||||||
<div class="move-description">{{{feature.system.description}}}</div>
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{/if}}
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
34
templates/sheets/applications/adversary-settings/actions.hbs
Normal file
34
templates/sheets/applications/adversary-settings/actions.hbs
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
|
||||||
|
data-tab='{{tabs.actions.id}}'
|
||||||
|
data-group='{{tabs.actions.group}}'
|
||||||
|
>
|
||||||
|
<button class="add-action-btn" data-action="addAction">
|
||||||
|
New Action
|
||||||
|
</button>
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize tabs.actions.label}}</legend>
|
||||||
|
<ul class="action-list">
|
||||||
|
{{#each document.system.actions as |action index|}}
|
||||||
|
<li class="action-item">
|
||||||
|
<img src="{{action.img}}" alt="">
|
||||||
|
<div class="label">
|
||||||
|
<span>{{action.name}}</span>
|
||||||
|
<div class="tags">
|
||||||
|
<div class="tag">
|
||||||
|
{{localize (concat 'DAGGERHEART.Actions.Types.' action.type '.name')}}
|
||||||
|
</div>
|
||||||
|
<div class="tag">
|
||||||
|
{{localize (concat 'DAGGERHEART.ActionType.' action.actionType)}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
<a data-action="editAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.edit'}}"><i class="fa-solid fa-pen-to-square"></i></a>
|
||||||
|
<a data-action="removeAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.delete'}}"><i class="fa-solid fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
23
templates/sheets/applications/adversary-settings/attack.hbs
Normal file
23
templates/sheets/applications/adversary-settings/attack.hbs
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<section
|
||||||
|
class="tab {{tabs.attack.cssClass}} {{tabs.attack.id}}"
|
||||||
|
data-tab="{{tabs.attack.id}}"
|
||||||
|
data-group="{{tabs.attack.group}}"
|
||||||
|
>
|
||||||
|
<fieldset class="one-column">
|
||||||
|
<legend>{{localize "DAGGERHEART.General.basics"}}</legend>
|
||||||
|
{{formGroup systemFields.attack.fields.img value=document.system.attack.img label="Image Path" name="system.attack.img"}}
|
||||||
|
{{formGroup systemFields.attack.fields.name value=document.system.attack.name label="Attack Name" name="system.attack.name"}}
|
||||||
|
</fieldset>
|
||||||
|
<fieldset class="flex">
|
||||||
|
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Attack"}}</legend>
|
||||||
|
{{formField systemFields.attack.fields.roll.fields.bonus value=document.system.attack.roll.bonus label="Attack Bonus" name="system.attack.roll.bonus"}}
|
||||||
|
{{formField systemFields.attack.fields.range value=document.system.attack.range label="Range" name="system.attack.range" localize=true}}
|
||||||
|
{{#if systemFields.attack.fields.target.fields}}
|
||||||
|
{{ formField systemFields.attack.fields.target.fields.type value=document.system.attack.target.type label="Target" name="system.attack.target.type" localize=true }}
|
||||||
|
{{#if (and document.system.attack.target.type (not (eq document.system.attack.target.type 'self')))}}
|
||||||
|
{{ formField systemFields.attack.fields.target.fields.amount value=document.system.attack.target.amount label="Amount" name="system.attack.target.amount" }}
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
</fieldset>
|
||||||
|
{{> 'systems/daggerheart/templates/views/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=document.system.attack.damage path="system.attack."}}
|
||||||
|
</section>
|
||||||
38
templates/sheets/applications/adversary-settings/details.hbs
Normal file
38
templates/sheets/applications/adversary-settings/details.hbs
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.details.cssClass}} {{tabs.details.id}}'
|
||||||
|
data-tab='{{tabs.details.id}}'
|
||||||
|
data-group='{{tabs.details.group}}'
|
||||||
|
>
|
||||||
|
<fieldset class="one-column">
|
||||||
|
<legend>{{localize 'DAGGERHEART.General.basics'}}</legend>
|
||||||
|
<div class="nest-inputs">
|
||||||
|
{{formGroup systemFields.tier value=document.system.tier localize=true}}
|
||||||
|
{{formGroup systemFields.type value=document.system.type localize=true}}
|
||||||
|
{{#if (eq document.system.type 'horde')}}
|
||||||
|
{{formGroup systemFields.hordeHp value=document.system.hordeHp label=(localize "DAGGERHEART.Sheets.Adversary.horderHp")}}
|
||||||
|
{{/if}}
|
||||||
|
{{formGroup systemFields.difficulty value=document.system.difficulty localize=true}}
|
||||||
|
</div>
|
||||||
|
{{formField systemFields.description value=document.system.description label=(localize "DAGGERHEART.Sheets.Adversary.FIELDS.description.label")}}
|
||||||
|
{{formField systemFields.motivesAndTactics value=document.system.motivesAndTactics label=(localize "DAGGERHEART.Sheets.Adversary.FIELDS.motivesAndTactics.label")}}
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<div class="fieldsets-section">
|
||||||
|
<fieldset class="flex">
|
||||||
|
<legend>{{localize "DAGGERHEART.Sheets.Adversary.HitPoints"}}</legend>
|
||||||
|
{{formGroup systemFields.resources.fields.hitPoints.fields.value value=document.system.resources.hitPoints.value}}
|
||||||
|
{{formGroup systemFields.resources.fields.hitPoints.fields.max value=document.system.resources.hitPoints.max}}
|
||||||
|
</fieldset>
|
||||||
|
<fieldset class="flex">
|
||||||
|
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Stress"}}</legend>
|
||||||
|
{{formGroup systemFields.resources.fields.stress.fields.value value=document.system.resources.stress.value}}
|
||||||
|
{{formGroup systemFields.resources.fields.stress.fields.max value=document.system.resources.stress.max}}
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<fieldset class="flex">
|
||||||
|
<legend>{{localize "DAGGERHEART.Sheets.Adversary.DamageThresholds"}}</legend>
|
||||||
|
{{formGroup systemFields.damageThresholds.fields.major value=document.system.damageThresholds.major}}
|
||||||
|
{{formGroup systemFields.damageThresholds.fields.severe value=document.system.damageThresholds.severe}}
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.experiences.cssClass}} {{tabs.experiences.id}}'
|
||||||
|
data-tab='{{tabs.experiences.id}}'
|
||||||
|
data-group='{{tabs.experiences.group}}'
|
||||||
|
>
|
||||||
|
<button class="add-experience-btn" type="button" data-action="addExperience">
|
||||||
|
<span>New Experience</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize tabs.experiences.label}}</legend>
|
||||||
|
<ul class="experience-list">
|
||||||
|
{{#each document.system.experiences as |experience key|}}
|
||||||
|
<li class="experience-item">
|
||||||
|
<input class="name" type="text" name="system.experiences.{{key}}.name" value="{{experience.name}}" />
|
||||||
|
<input class="modifier" type="text" name="system.experiences.{{key}}.modifier" value="{{experience.modifier}}" data-dtype="Number" />
|
||||||
|
<a data-action="removeExperience" data-experience="{{key}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.delete'}}"><i class="fa-solid fa-trash"></i></a>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<header class="dialog-header">
|
||||||
|
<h1>{{document.name}}</h1>
|
||||||
|
</header>
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
|
||||||
|
data-tab='{{tabs.actions.id}}'
|
||||||
|
data-group='{{tabs.actions.group}}'
|
||||||
|
>
|
||||||
|
<button class="add-action-btn" data-action="addAction">
|
||||||
|
New Action
|
||||||
|
</button>
|
||||||
|
<fieldset>
|
||||||
|
<legend>{{localize tabs.actions.label}}</legend>
|
||||||
|
<ul class="action-list">
|
||||||
|
{{#each document.system.actions as |action index|}}
|
||||||
|
<li class="action-item">
|
||||||
|
<img src="{{action.img}}" alt="">
|
||||||
|
<div class="label">
|
||||||
|
<span>{{action.name}}</span>
|
||||||
|
<div class="tags">
|
||||||
|
<div class="tag">
|
||||||
|
{{localize (concat 'DAGGERHEART.Actions.Types.' action.type '.name')}}
|
||||||
|
</div>
|
||||||
|
<div class="tag">
|
||||||
|
{{localize (concat 'DAGGERHEART.ActionType.' action.actionType)}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="controls">
|
||||||
|
<a data-action="editAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.edit'}}"><i class="fa-solid fa-pen-to-square"></i></a>
|
||||||
|
<a data-action="removeAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.delete'}}"><i class="fa-solid fa-trash"></i></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.adversaries.cssClass}} {{tabs.adversaries.id}}'
|
||||||
|
data-tab='{{tabs.adversaries.id}}'
|
||||||
|
data-group='{{tabs.adversaries.group}}'
|
||||||
|
>
|
||||||
|
<button class="add-action-btn" data-action="addCategory">
|
||||||
|
New Category
|
||||||
|
</button>
|
||||||
|
{{#each document.system.potentialAdversaries}}
|
||||||
|
<fieldset class="category-container" data-potential-adversary="{{@key}}">
|
||||||
|
<legend>{{this.label}}</legend>
|
||||||
|
<div class="category-name">
|
||||||
|
<input type="text" name="{{concat "system.potentialAdversaries." @key ".label" }}" value="{{this.label}}" />
|
||||||
|
<a><i class="fa-solid fa-trash" data-action="deleteProperty" data-path="system.potentialAdversaries" id={{@key}} data-tooltip='{{localize "DAGGERHEART.Tooltip.delete"}}'></i></a>
|
||||||
|
</div>
|
||||||
|
<div class="adversaries-container">
|
||||||
|
{{#each this.adversaries as |adversary|}}
|
||||||
|
<div class="adversary-container">
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=adversary type='adversary' isActor=true categoryAdversary=@../key}}
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
<div class="adversaries-dragger">
|
||||||
|
Drop Actors here
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
{{/each}}
|
||||||
|
</section>
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<section
|
||||||
|
class='tab {{tabs.details.cssClass}} {{tabs.details.id}}'
|
||||||
|
data-tab='{{tabs.details.id}}'
|
||||||
|
data-group='{{tabs.details.group}}'
|
||||||
|
>
|
||||||
|
<fieldset class="one-column">
|
||||||
|
<legend>{{localize 'DAGGERHEART.General.basics'}}</legend>
|
||||||
|
<div class="nest-inputs">
|
||||||
|
{{formGroup systemFields.tier value=document.system.tier localize=true}}
|
||||||
|
{{formGroup systemFields.type value=document.system.type localize=true}}
|
||||||
|
{{formGroup systemFields.difficulty value=document.system.difficulty localize=true}}
|
||||||
|
</div>
|
||||||
|
{{formField systemFields.description value=document.system.description label=(localize "DAGGERHEART.Sheets.Environment.FIELDS.description.label")}}
|
||||||
|
{{formField systemFields.impulses value=document.system.impulses label=(localize "DAGGERHEART.Sheets.Environment.FIELDS.impulses.label")}}
|
||||||
|
</fieldset>
|
||||||
|
</section>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<header class="dialog-header">
|
||||||
|
<h1>{{document.name}}</h1>
|
||||||
|
</header>
|
||||||
|
|
@ -1,151 +0,0 @@
|
||||||
<div class="old-sheet">
|
|
||||||
<header>
|
|
||||||
<div class="pc-sheet-header">
|
|
||||||
<div class="class-info">
|
|
||||||
<div class="flexrow">
|
|
||||||
{{#if document.system.class.value}}
|
|
||||||
<div class="flexcol">
|
|
||||||
<h2 class="class-title flex0" data-action="viewObject" data-value="{{document.system.class.value.uuid}}" data-tab="guide">
|
|
||||||
<img class="domain-image" src="{{domains.first}}" />
|
|
||||||
<span>{{document.system.class.value.name}}</span>
|
|
||||||
<img class="domain-image" src="{{domains.second}}" />
|
|
||||||
</h2>
|
|
||||||
<span class="domain-title flex0">
|
|
||||||
<span>{{document.system.class.value.system.domains.[0]}}</span>
|
|
||||||
<span>and</span>
|
|
||||||
<span>{{document.system.class.value.system.domains.[1]}}</span>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="flexcol">
|
|
||||||
<h2 class="class-add-container class-title">Class <button data-action="selectClass"><i class="fa-solid fa-plus"></i></button></h2>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="general-info">
|
|
||||||
<div class="flexrow">
|
|
||||||
<div class="flexcol">
|
|
||||||
<div class="flexrow">
|
|
||||||
<div class="flexrow">
|
|
||||||
<div class="general-input">
|
|
||||||
<span class="general-title">{{localize "DAGGERHEART.Sheets.PC.Name"}}</span>
|
|
||||||
<input name="name" value="{{document.name}}" type="text" style="padding-left: 50px;" />
|
|
||||||
</div>
|
|
||||||
<div class="general-input">
|
|
||||||
<span class="general-title">{{localize "DAGGERHEART.Sheets.PC.Pronouns"}}</span>
|
|
||||||
<input name="system.pronouns" value="{{document.system.pronouns}}" type="text" style="padding-left: 84px;" />
|
|
||||||
</div>
|
|
||||||
<div class="rest-container">
|
|
||||||
<button data-action="takeShortRest" title="{{localize "DAGGERHEART.Sheets.PC.ShortRest"}}"><i class="fa-solid fa-chair"></i></button>
|
|
||||||
<button data-action="takeLongRest" title="{{localize "DAGGERHEART.Sheets.PC.LongRest"}}"><i class="fa-solid fa-bed"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="level-container {{#if document.system.levelData.canLevelUp}}levelup{{/if}}" style="width: 30px; height: 30px;">
|
|
||||||
<div class="level-value-container">
|
|
||||||
<input class="level-value {{#if document.system.levelData.canLevelUp}}levelup{{/if}}" value="{{document.system.levelData.level.changed}}" type="text" data-dtype="Number" />
|
|
||||||
{{#if document.system.levelData.canLevelUp}}<div class="levelup-marker">*</div>{{/if}}
|
|
||||||
</div>
|
|
||||||
<img style="width: 30px; height: 30px;" src="systems/daggerheart/assets/AttributeShield.svg" />
|
|
||||||
<div data-action="levelup" class="level-title {{#if document.system.levelData.canLevelUp}}levelup{{/if}}">{{localize "DAGGERHEART.Sheets.PC.Level"}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flexrow">
|
|
||||||
{{#objectSelector title="Heritage" ids=(join document.system.community.uuid document.system.ancestry.uuid) values=(join document.system.community.name document.system.ancestry.name) titleFontSize=14 style="min-width: 272px;"}}
|
|
||||||
<button data-action="selectCommunity" class="option-select deeper"><i class="fa-solid fa-house-chimney"></i></button>
|
|
||||||
<button data-action="selectAncestry" class="option-select"><i class="fa-solid fa-user-large"></i></button>
|
|
||||||
{{/objectSelector}}
|
|
||||||
{{#objectSelector title="Subclass" ids=(join document.system.class.subclass.uuid) values=(join document.system.class.subclass.name) titleFontSize=14}}
|
|
||||||
<button data-action="selectSubclass" class="option-select" {{#if (not ../document.system.class.value)}}disabled{{/if}}><i class="fa-solid fa-fw fa-search"></i></button>
|
|
||||||
{{/objectSelector}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<nav class="sheet-tabs tabs">
|
|
||||||
{{#each tabs.primary as |tab|}}
|
|
||||||
<a class="{{tab.cssClass}}" data-action="tab" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
|
||||||
<i class="{{tab.icon}}"></i>
|
|
||||||
<label>{{localize tab.label}}</label>
|
|
||||||
</a>
|
|
||||||
{{/each}}
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<section class="sheet-body flexcol">
|
|
||||||
<div class="tab features {{this.tabs.primary.features.cssClass}}" data-group="primary" data-tab="features">
|
|
||||||
<div class="tab-container">
|
|
||||||
<div class="flexcol tab-inner-container">
|
|
||||||
<div class="feature-sheet-body flexrow">
|
|
||||||
<div class="body-section flex2">
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/defense.hbs" }}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/health.hbs" }}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/hope.hbs" }}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/gold.hbs" }}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/features.hbs" }}
|
|
||||||
</div>
|
|
||||||
<div class="body-section flex3">
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/attributes.hbs" }}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/weapons.hbs" primaryWeapon=document.system.primaryWeapon secondaryWeapon=document.system.secondaryWeapon weaponBurden=document.system.getWeaponBurden proficiency=document.system.proficiency }}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/armor.hbs" armor=document.system.armor }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tab domain-card-tab {{this.tabs.primary.loadout.cssClass}}" data-group="primary" data-tab="loadout">
|
|
||||||
{{> "systems/daggerheart/templates/sheets/character/sections/loadout.hbs" abilities=this.abilities actor=this.document config=this.config }}
|
|
||||||
</div>
|
|
||||||
<div class="tab {{this.tabs.primary.inventory.cssClass}}" data-group="primary" data-tab="inventory">
|
|
||||||
{{> "systems/daggerheart/templates/sheets/character/sections/inventory.hbs" inventory=this.inventory }}
|
|
||||||
</div>
|
|
||||||
<div class="tab {{this.tabs.primary.story.cssClass}}" data-group="primary" data-tab="story">
|
|
||||||
<div class="flexcol" style="height: 100%;">
|
|
||||||
<div class="story-container flexrow">
|
|
||||||
<fieldset class="story-fieldset">
|
|
||||||
<legend class="story-legend">{{localize "DAGGERHEART.Sheets.PC.Story.BackgroundTitle"}}</legend>
|
|
||||||
|
|
||||||
{{editor document.system.story.background target="system.story.background" button=true }}
|
|
||||||
</fieldset>
|
|
||||||
<fieldset class="story-fieldset">
|
|
||||||
<legend class="story-legend">{{localize "DAGGERHEART.Sheets.PC.Story.AppearanceTitle"}}</legend>
|
|
||||||
|
|
||||||
{{editor document.system.story.appearance target="system.story.appearance" button=true }}
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<div class="story-container flexrow">
|
|
||||||
<fieldset class="story-fieldset">
|
|
||||||
<legend class="story-legend">{{localize "DAGGERHEART.Sheets.PC.Story.ConnectionsTitle"}}</legend>
|
|
||||||
|
|
||||||
{{editor document.system.story.connections target="system.story.connections" button=true }}
|
|
||||||
</fieldset>
|
|
||||||
<fieldset class="story-fieldset scars-container">
|
|
||||||
<legend class="story-legend">
|
|
||||||
{{localize "DAGGERHEART.Sheets.PC.Story.Scars.Title"}}
|
|
||||||
<i data-action="addScar" class="fa-solid fa-plus icon-button {{#if (eq document.system.story.scars.length 5)}}disabled{{/if}}"></i>
|
|
||||||
</legend>
|
|
||||||
|
|
||||||
<div class="ability-choices">
|
|
||||||
{{#each document.system.story.scars as |scar index|}}
|
|
||||||
<div class="ability-chip {{#if (eq key ../selectedScar)}}selected{{/if}}" data-action="selectScar" data-value="{{index}}">
|
|
||||||
<input type="text" name="system.story.scars.{{index}}.name" value="{{scar.name}}" />
|
|
||||||
<button><i data-action="deleteScar" data-scar="{{index}}" class="fa-solid fa-x"></i></button>
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
{{#with (lookup document.system.story.scars this.selectedScar)}}
|
|
||||||
{{#if this}}
|
|
||||||
<div class="editor-form-group">
|
|
||||||
<label>{{this.name}} - {{localize "Description"}}</label>
|
|
||||||
{{editor this.description target=(concat "system.story.scars." ../selectedScar ".description") button=true}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
{{/with}}
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<footer>
|
|
||||||
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
<div class="abilities-card">
|
|
||||||
<div class="abilities-card-image-container">
|
|
||||||
<img class="abilities-card-image" src="{{card.img}}" />
|
|
||||||
<div class="abilities-card-level">
|
|
||||||
{{#each card.domains}}
|
|
||||||
<img src="{{this}}" />
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
<div class="abilities-card-type">
|
|
||||||
<div class="abilities-card-type-text">{{card.className}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="abilities-text-container">
|
|
||||||
<div class="abilities-card-title">{{card.subclassName}}</div>
|
|
||||||
<div class="abilities-card-sub-title">{{card.subtitle}}</div>
|
|
||||||
{{#if card.spellcast}}<div class="abilities-card-spellcast"><span class="title">Spellcast: </span> <span>{{localize card.spellcast}}</span></div>{{/if}}
|
|
||||||
<div class="abilities-card-description abilities-card-effect" data-action="useAdvancementCard" data-multiclass="{{card.multiclass}}" data-key="{{card.type}}">{{{card.description}}}</div>
|
|
||||||
<div class="abilities-card-abilities">
|
|
||||||
{{#each card.abilities as |ability key|}}
|
|
||||||
<div class="abilities-card-ability" data-action="useAdvancementAbility" data-id="{{ability.uuid}}" data-key="{{key}}">
|
|
||||||
<span class="abilities-text"><strong>{{ability.name}}</strong></span>
|
|
||||||
{{{ability.system.description}}}
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<div class="abilities-card">
|
|
||||||
<div class="abilities-card-image-container">
|
|
||||||
<img class="abilities-card-image" src="{{card.img}}" />
|
|
||||||
<div class="abilities-card-type"><div class="abilities-card-type-text">{{card.system.type}}</div></div>
|
|
||||||
</div>
|
|
||||||
<div class="abilities-text-container">
|
|
||||||
<div class="abilities-card-title">{{card.name}}</div>
|
|
||||||
<div class="abilities-card-description">{{{card.system.description}}}</div>
|
|
||||||
<div class="abilities-card-abilities">
|
|
||||||
{{#each card.system.abilities as |ability key|}}
|
|
||||||
<div class="abilities-card-ability" data-action="useAbility" data-feature="{{ability.uuid}}" data-type="{{ability.system.type}}">
|
|
||||||
<span class="abilities-text"><strong>{{ability.name}}</strong></span>
|
|
||||||
{{{ability.system.description}}}
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
<div class="inventory-container">
|
|
||||||
{{#each this.inventory as |section key|}}
|
|
||||||
<ol class="inventory-item-list inventory-item-header">
|
|
||||||
<li class="item inventory-title-row-container">
|
|
||||||
<div class="inventory-title-row">
|
|
||||||
<div class="inventory-item-title-container">{{section.titles.name}}</div>
|
|
||||||
<div class="inventory-item-quantity title">{{section.titles.quantity}}</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
<ol class="item-list inventory-item-list">
|
|
||||||
{{#each this.items as |item|}}
|
|
||||||
<li class="item inventory-item">
|
|
||||||
<div class="inventory-row" data-item-id="{{item.uuid}}">
|
|
||||||
<div class="inventory-item-title-container">
|
|
||||||
<div data-action="useItem" data-value="{{item.uuid}}" class="inventory-item-title">
|
|
||||||
<img src="{{item.img}}" />
|
|
||||||
{{item.name}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flexrow">
|
|
||||||
<button data-action="toggleEquipItem" id="{{item.id}}">{{localize "Equip"}}</button>
|
|
||||||
</div>
|
|
||||||
<div class="inventory-item-quantity spaced">
|
|
||||||
<i data-action="itemQuantityDecrease" class="fa-solid fa-chevron-left icon-button {{#if (lte item.system.quantity 1)}}disabled{{/if}}"></i>
|
|
||||||
<input type="text" data-item="system.quantity" value="{{item.system.quantity}}" data-dtype="Number" />
|
|
||||||
<i data-action="itemQuantityIncrease" class="fa-solid fa-chevron-right icon-button"></i>
|
|
||||||
</div>
|
|
||||||
<i data-action="deleteItem" class="fas fa-trash icon-button secondary row-icon"></i>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ol>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,137 +0,0 @@
|
||||||
<div class="domain-card-body">
|
|
||||||
<nav class="sheet-tabs tabs">
|
|
||||||
{{#each tabs.secondary as |tab|}}
|
|
||||||
<a class="item {{tab.cssClass}}" data-action="tab" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
|
||||||
<i class="{{tab.icon}}"></i>
|
|
||||||
<label>{{localize tab.label}}</label>
|
|
||||||
</a>
|
|
||||||
{{/each}}
|
|
||||||
</nav>
|
|
||||||
<section class="loadout-body flexcol">
|
|
||||||
<div class="tab" data-group="secondary" data-tab="foundation">
|
|
||||||
<div class="heritage-container">
|
|
||||||
<div class="card-row">
|
|
||||||
<div class="heritage-card {{#if (not abilities.foundation.ancestry)}}outlined{{/if}}">
|
|
||||||
{{#if abilities.foundation.ancestry}}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/character/parts/heritageCard.hbs" card=abilities.foundation.ancestry }}
|
|
||||||
{{else}}
|
|
||||||
<div class="empty-ability-container">
|
|
||||||
<div class="empty-ability-inner-container">
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.EmptyAncestry"}}</div>
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.EmptyAncestryTip"}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="empty-ability-inner-container"></div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<div class="heritage-card {{#if (not abilities.foundation.community)}}outlined{{/if}}">
|
|
||||||
{{#if abilities.foundation.community}}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/character/parts/heritageCard.hbs" card=abilities.foundation.community }}
|
|
||||||
{{else}}
|
|
||||||
<div class="empty-ability-container">
|
|
||||||
<div class="empty-ability-inner-container">
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.EmptyCommunity"}}</div>
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.EmptyCommunityTip"}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="empty-ability-inner-container"></div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-row">
|
|
||||||
<div class="heritage-card {{#if (not abilities.foundation.advancement.foundation)}}outlined{{/if}}">
|
|
||||||
{{#if abilities.foundation.advancement.foundation}}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/character/parts/advancementCard.hbs" card=abilities.foundation.advancement.foundation }}
|
|
||||||
{{else}}
|
|
||||||
<div class="empty-ability-container">
|
|
||||||
<div class="empty-ability-inner-container">
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.SubclassFoundation"}}</div>
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.SubclassFoundationTip"}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="empty-ability-inner-container"></div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<div class="heritage-card {{#if (not abilities.foundation.advancement.first)}}outlined{{/if}}">
|
|
||||||
{{#if abilities.foundation.advancement.first}}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/character/parts/advancementCard.hbs" card=abilities.foundation.advancement.first }}
|
|
||||||
{{else}}
|
|
||||||
<div class="empty-ability-container">
|
|
||||||
<div class="empty-ability-inner-container">
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.Subclass"}}</div>
|
|
||||||
<div>{{localize "DAGGERHEART.General.Or"}}</div>
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.Multiclass"}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="empty-ability-inner-container"><i class="fa-solid fa-lock"></i></div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<div class="heritage-card {{#if (not abilities.foundation.advancement.second)}}outlined{{/if}}">
|
|
||||||
{{#if abilities.foundation.advancement.second}}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/character/parts/advancementCard.hbs" card=abilities.foundation.advancement.second}}
|
|
||||||
{{else}}
|
|
||||||
<div class="empty-ability-container">
|
|
||||||
<div class="empty-ability-inner-container">
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.Subclass"}}</div>
|
|
||||||
<div>{{localize "DAGGERHEART.General.Or"}}</div>
|
|
||||||
<div>{{localize "DAGGERHEART.Sheets.PC.Heritage.Multiclass"}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="empty-ability-inner-container"><i class="fa-solid fa-lock"></i></div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tab" data-group="secondary" data-tab="loadout">
|
|
||||||
<div class="loadout-container">
|
|
||||||
<div class="top-card-row">
|
|
||||||
{{#times 2}}
|
|
||||||
<div class="domain-card {{#if (not (lookup ../abilities.loadout.top this))}}outlined{{/if}}">
|
|
||||||
{{#with (lookup ../abilities.loadout.top this)}}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/domainCard.hbs" card=this inVault=false }}
|
|
||||||
{{/with}}
|
|
||||||
{{#if (not (lookup ../abilities.loadout.top this))}}
|
|
||||||
<div class="empty-ability-container">
|
|
||||||
<div class="empty-ability-inner-container">{{localize "DAGGERHEART.Sheets.PC.DomainCard.AvailableDomainSlot"}}</div>
|
|
||||||
<div class="empty-ability-inner-container"></div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
{{/times}}
|
|
||||||
</div>
|
|
||||||
<div class="card-row">
|
|
||||||
{{#times 3}}
|
|
||||||
<div class="domain-card {{#if (not (lookup ../abilities.loadout.bottom this))}}outlined{{/if}}">
|
|
||||||
{{#with (lookup ../abilities.loadout.bottom this)}}
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/domainCard.hbs" card=this inVault=false }}
|
|
||||||
{{/with}}
|
|
||||||
{{#if (gt (add this 3) ../actor/system/domainData.maxLoadout)}}
|
|
||||||
<div class="empty-ability-container">
|
|
||||||
<div class="empty-ability-inner-container">{{localize "DAGGERHEART.Sheets.PC.DomainCard.UnavailableDomainSlot" level=(add this 2)}}</div>
|
|
||||||
<div class="empty-ability-inner-container"><i class="fa-solid fa-lock"></i></div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{#if (and (lte (add this 3) ../actor/system/domainData.maxLoadout) (lt ../abilities.loadout.bottom.length (add this 1)))}}
|
|
||||||
<div class="empty-ability-container">
|
|
||||||
<div class="empty-ability-inner-container">{{localize "DAGGERHEART.Sheets.PC.DomainCard.AvailableDomainSlot"}}</div>
|
|
||||||
<div class="empty-ability-inner-container"></div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
{{/times}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="tab" data-group="secondary" data-tab="vault">
|
|
||||||
<div class="vault-container">
|
|
||||||
{{#each abilities.vault}}
|
|
||||||
<div class="vault-card">
|
|
||||||
{{> "systems/daggerheart/templates/sheets/parts/domainCard.hbs" card=this inVault=true }}
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
||||||
<div>
|
|
||||||
<header class="adversary-header-container">
|
|
||||||
<div class="adversary-header flexrow">
|
|
||||||
<img class="flex0" src="{{source.img}}" data-action="onEditImage" data-edit="img" title="{{source.name}}" height="64" width="64"/>
|
|
||||||
<div class="adversary-title">
|
|
||||||
{{#if this.editMode}}
|
|
||||||
<input class="title-text" name="name" type="text" value="{{source.name}}" placeholder="{{ localize 'Name' }}"/>
|
|
||||||
{{else}}
|
|
||||||
<div class="title-text">{{source.name}}</div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<i class="fa-solid fa-wrench icon-button secondary {{#if this.editMode}}active{{/if}}" data-action="toggleSlider" style="position: absolute; right: 4px; top: 4px;"></i>
|
|
||||||
</header>
|
|
||||||
<section class="sheet-body">
|
|
||||||
{{#if this.editMode}}
|
|
||||||
<div>
|
|
||||||
<h2>{{localize "DAGGERHEART.Sheets.Adversary.Description"}}</h2>
|
|
||||||
<textarea name="system.description">{{source.system.description}}</textarea>
|
|
||||||
<h2>{{localize "DAGGERHEART.Sheets.Environment.ToneAndFeel"}}</h2>
|
|
||||||
<textarea name="system.toneAndFeel">{{source.system.toneAndFeel}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="flexrow" style="align-items: baseline;">
|
|
||||||
<div class="adversary-statistics-container">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Tier"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<select name="system.tier">
|
|
||||||
{{selectOptions config.GENERAL.tiers selected=source.system.tier labelAttr="key"}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Type"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<select name="system.type">
|
|
||||||
{{selectOptions config.ACTOR.adversaryTypes selected=source.system.type labelAttr="name" localize=true}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>{{localize "DAGGERHEART.Sheets.Adversary.Difficulty"}}</label>
|
|
||||||
<div class="form-fields">
|
|
||||||
<input type="text" name="system.difficulty" value="{{source.system.difficulty}}" data-dtype="Number" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2>{{localize "DAGGERHEART.Sheets.Environment.PotentialAdversaries"}}</h2>
|
|
||||||
<textarea name="system.potentialAdversaries">{{source.system.potentialAdversaries}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="adversary-moves-container">
|
|
||||||
<h2 class="moves-edit-container">{{localize "DAGGERHEART.Sheets.Adversary.Features"}} <i class="fa-solid fa-plus" data-action="addFeature"></i></h2>
|
|
||||||
{{#each data.features as |feature key|}}
|
|
||||||
<div class="chip-container">
|
|
||||||
<div class="chip-inner-container">
|
|
||||||
<img src="{{feature.img}}" />
|
|
||||||
<div class="move-title">{{feature.name}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="chip-inner-container">
|
|
||||||
<button data-action="viewFeature" data-feature={{feature.uuid}}><i class="fa-solid fa-fw fa-search"></i></button>
|
|
||||||
<button data-action="removeFeature" data-feature={{feature.uuid}}><i class="fa-solid fa-trash"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="motive-container">
|
|
||||||
<div class="motive-title">
|
|
||||||
<span class="motive-title-value"><strong>{{localize "DAGGERHEART.Sheets.Adversary.Description"}}:</strong> {{source.system.description}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="motive-title">
|
|
||||||
<span class="motive-title-value"><strong>{{localize "DAGGERHEART.Sheets.Environment.ToneAndFeel"}}:</strong> {{source.system.toneAndFeel}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flexrow" style="align-items: baseline;">
|
|
||||||
<div class="adversary-statistics-container">
|
|
||||||
<div class="statistic-section">
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Tier"}}:</label>
|
|
||||||
<span class="statistic-value">{{source.system.tier}}</span>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Type"}}:</label>
|
|
||||||
<span class="statistic-value">{{this.data.type}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-section">
|
|
||||||
<div class="statistic-row">
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Adversary.Difficulty"}}:</label>
|
|
||||||
<span class="statistic-value">{{source.system.difficulty}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-section">
|
|
||||||
|
|
||||||
<label class="statistic-title">{{localize "DAGGERHEART.Sheets.Environment.PotentialAdversaries"}}:</label>
|
|
||||||
<span>{{source.system.potentialAdversaries}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="adversary-moves-container">
|
|
||||||
<div class="moves-title">{{localize "DAGGERHEART.Sheets.Adversary.Features"}}</div>
|
|
||||||
{{#each data.features as |feature index|}}
|
|
||||||
<div class="move-container" data-action="useFeature" data-feature="{{feature.uuid}}" data-action-type="{{feature.system.actionType}}">
|
|
||||||
<label class="moves-name">{{feature.name}} - {{feature.system.actionType}}</label>
|
|
||||||
<div class="move-description">{{{feature.system.description}}}</div>
|
|
||||||
</div>
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
@ -34,6 +34,11 @@
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=effect type=../type}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=effect type=../type}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
{{#each document.system.actions as |action|}}
|
||||||
|
{{#if (or (eq ../type 'action'))}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=action type=../type}}
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
{{#each document.system.features as |feature|}}
|
{{#each document.system.features as |feature|}}
|
||||||
{{#if (or (eq ../type 'features'))}}
|
{{#if (or (eq ../type 'features'))}}
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=feature}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=feature}}
|
||||||
|
|
@ -44,6 +49,9 @@
|
||||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=feature companion=true}}
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=feature companion=true}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
{{#each adversaries as |adversary|}}
|
||||||
|
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=adversary type='adversary' hideControls=true isActor=true categoryAdversary=@../key}}
|
||||||
|
{{/each}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<li class="inventory-item" data-item-id="{{item.id}}" data-companion="{{companion}}">
|
<li class="inventory-item" data-item-id="{{item.id}}" data-companion="{{companion}}" data-tooltip="{{concat "#item#" item.uuid}}">
|
||||||
<img src="{{item.img}}" class="item-img" data-action="useItem"/>
|
<img src="{{item.img}}" class="item-img {{#if isActor}}actor-img{{/if}}" data-action="useItem"/>
|
||||||
<div class="item-label">
|
<div class="item-label">
|
||||||
<div class="item-name">{{item.name}}</div>
|
<div class="item-name">{{item.name}}</div>
|
||||||
{{#if (eq type 'weapon')}}
|
{{#if (eq type 'weapon')}}
|
||||||
|
|
@ -100,32 +100,59 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#if (eq type 'action')}}
|
||||||
|
<div class="item-tags">
|
||||||
|
<div class="tag">
|
||||||
|
{{localize (concat 'DAGGERHEART.Actions.Types.' item.type '.name')}}
|
||||||
|
</div>
|
||||||
|
<div class="tag">
|
||||||
|
{{localize (concat 'DAGGERHEART.ActionType.' item.actionType)}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="controls">
|
{{#unless hideControls}}
|
||||||
{{#if (eq type 'weapon')}}
|
{{#if isActor}}
|
||||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
|
<div class="controls">
|
||||||
<i class="fa-solid fa-hands"></i>
|
{{#if (eq type 'adversary')}}
|
||||||
</a>
|
<a data-action="viewAdversary" data-potential-adversary="{{categoryAdversary}}" data-adversary="{{item.uuid}}" data-tooltip='{{localize "DAGGERHEART.Tooltip.openActorWorld"}}'>
|
||||||
|
<i class="fa-solid fa-globe"></i>
|
||||||
|
</a>
|
||||||
|
<a data-action='deleteAdversary' data-potential-adversary="{{categoryAdversary}}" data-adversary="{{item.uuid}}" data-tooltip='{{localize "DAGGERHEART.Tooltip.delete"}}'>
|
||||||
|
<i class='fas fa-trash'></i>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="controls">
|
||||||
|
{{#if (eq type 'weapon')}}
|
||||||
|
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
|
||||||
|
<i class="fa-solid fa-hands"></i>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
{{#if (eq type 'armor')}}
|
||||||
|
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
|
||||||
|
<i class="fa-solid fa-shield"></i>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
{{#if (eq type 'domainCard')}}
|
||||||
|
{{#unless item.system.inVault}}
|
||||||
|
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToVault'}}">
|
||||||
|
<i class="fa-solid fa-arrow-down"></i>
|
||||||
|
</a>
|
||||||
|
{{else}}
|
||||||
|
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToLoadout'}}">
|
||||||
|
<i class="fa-solid fa-arrow-up"></i>
|
||||||
|
</a>
|
||||||
|
{{/unless}}
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
|
<a data-action="toChat" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToChat'}}"><i class="fa-regular fa-message"></i></a>
|
||||||
|
<a data-action="triggerContextMenu" data-tooltip="{{localize 'DAGGERHEART.Tooltip.moreOptions'}}"><i class="fa-solid fa-ellipsis-vertical"></i></a>
|
||||||
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq type 'armor')}}
|
{{else}}
|
||||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem" data-tooltip="{{#unless item.system.equipped}}{{localize 'DAGGERHEART.Tooltip.equip'}}{{else}}{{localize 'DAGGERHEART.Tooltip.unequip'}}{{/unless}}">
|
<span></span>
|
||||||
<i class="fa-solid fa-shield"></i>
|
{{/unless}}
|
||||||
</a>
|
|
||||||
{{/if}}
|
|
||||||
{{#if (eq type 'domainCard')}}
|
|
||||||
{{#unless item.system.inVault}}
|
|
||||||
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToVault'}}">
|
|
||||||
<i class="fa-solid fa-arrow-down"></i>
|
|
||||||
</a>
|
|
||||||
{{else}}
|
|
||||||
<a data-action="toggleVault" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToLoadout'}}">
|
|
||||||
<i class="fa-solid fa-arrow-up"></i>
|
|
||||||
</a>
|
|
||||||
{{/unless}}
|
|
||||||
|
|
||||||
{{/if}}
|
|
||||||
<a data-action="toChat" data-tooltip="{{localize 'DAGGERHEART.Tooltip.sendToChat'}}"><i class="fa-regular fa-message"></i></a>
|
|
||||||
<a data-action="triggerContextMenu" data-tooltip="{{localize 'DAGGERHEART.Tooltip.moreOptions'}}"><i class="fa-solid fa-ellipsis-vertical"></i></a>
|
|
||||||
</div>
|
|
||||||
<div class="item-description">{{#unless isSidebar}}{{{item.system.description}}}{{/unless}}</div>
|
<div class="item-description">{{#unless isSidebar}}{{{item.system.description}}}{{/unless}}</div>
|
||||||
</li>
|
</li>
|
||||||
5
templates/tooltip/armor.hbs
Normal file
5
templates/tooltip/armor.hbs
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<div>
|
||||||
|
<div>{{name}}</div>
|
||||||
|
<img src="{{img}}" />
|
||||||
|
<div>{{{system.description}}}</div>
|
||||||
|
</div>
|
||||||
5
templates/tooltip/domainCard.hbs
Normal file
5
templates/tooltip/domainCard.hbs
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<div>
|
||||||
|
<div>{{name}}</div>
|
||||||
|
<img src="{{img}}" />
|
||||||
|
<div>{{{system.description}}}</div>
|
||||||
|
</div>
|
||||||
5
templates/tooltip/weapon.hbs
Normal file
5
templates/tooltip/weapon.hbs
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<div>
|
||||||
|
<div>{{name}}</div>
|
||||||
|
<img src="{{img}}" />
|
||||||
|
<div>{{{system.description}}}</div>
|
||||||
|
</div>
|
||||||
|
|
@ -33,10 +33,8 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab {{this.tabs.config.cssClass}}" data-group="primary" data-tab="config">
|
<div class="tab {{this.tabs.config.cssClass}}" data-group="primary" data-tab="config">
|
||||||
{{#unless isNPC}}
|
|
||||||
{{> 'systems/daggerheart/templates/views/actionTypes/uses.hbs' fields=fields.uses.fields source=source.uses}}
|
{{> 'systems/daggerheart/templates/views/actionTypes/uses.hbs' fields=fields.uses.fields source=source.uses}}
|
||||||
{{> 'systems/daggerheart/templates/views/actionTypes/cost.hbs' fields=fields.cost.element.fields source=source.cost}}
|
{{> 'systems/daggerheart/templates/views/actionTypes/cost.hbs' fields=fields.cost.element.fields source=source.cost}}
|
||||||
{{/unless}}
|
|
||||||
{{#if fields.target}}{{> 'systems/daggerheart/templates/views/actionTypes/range-target.hbs' fields=(object range=fields.range target=fields.target.fields) source=(object target=source.target range=source.range)}}{{/if}}
|
{{#if fields.target}}{{> 'systems/daggerheart/templates/views/actionTypes/range-target.hbs' fields=(object range=fields.range target=fields.target.fields) source=(object target=source.target range=source.range)}}{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab {{this.tabs.effect.cssClass}}" data-group="primary" data-tab="effect">
|
<div class="tab {{this.tabs.effect.cssClass}}" data-group="primary" data-tab="effect">
|
||||||
|
|
|
||||||
|
|
@ -1,61 +1,57 @@
|
||||||
|
|
||||||
<fieldset class="action-category">
|
<fieldset class="flex wrap">
|
||||||
<legend class="action-category-label" data-action="toggleSection" data-section="effects">
|
<legend>Damage</legend>
|
||||||
<div>Damage</div>
|
{{#unless (eq path 'system.attack.')}}
|
||||||
</legend>
|
<div class="fas fa-plus icon-button" data-action="addDamage"></div>
|
||||||
<div class="action-category-data open">
|
{{/unless}}
|
||||||
{{#unless @root.isNPC}}
|
{{#unless @root.isNPC}}
|
||||||
<div class="fas fa-plus icon-button" data-action="addDamage"></div>
|
{{#if @root.hasBaseDamage}}
|
||||||
{{#if @root.hasBaseDamage}}
|
<div>
|
||||||
<div>
|
{{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" }}
|
||||||
{{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" }}
|
</div>
|
||||||
</div>
|
{{/if}}
|
||||||
{{/if}}
|
{{/unless}}
|
||||||
{{/unless}}
|
{{#each source.parts as |dmg index|}}
|
||||||
{{#each source.parts as |dmg index|}}
|
{{#if @root.isNPC}}
|
||||||
{{#if @root.isNPC}}
|
{{formField ../fields.value.fields.custom.fields.enabled value=dmg.value.custom.enabled name=(concat ../path "damage.parts." index ".value.custom.enabled") classes="checkbox"}}
|
||||||
{{formField ../fields.value.fields.custom.fields.enabled value=dmg.value.custom.enabled name=(concat ../path "damage.parts." index ".value.custom.enabled")}}
|
<input type="hidden" name="{{../path}}damage.parts.{{index}}.value.multiplier" value="{{dmg.value.multiplier}}">
|
||||||
<input type="hidden" name="{{../path}}damage.parts.{{index}}.value.multiplier" value="{{dmg.value.multiplier}}">
|
{{#if dmg.value.custom.enabled}}
|
||||||
{{#if dmg.value.custom.enabled}}
|
{{formField ../fields.value.fields.custom.fields.formula value=dmg.value.custom.formula name=(concat ../path "damage.parts." index ".value.custom.formula") localize=true}}
|
||||||
{{formField ../fields.value.fields.custom.fields.formula value=dmg.value.custom.formula name=(concat ../path "damage.parts." index ".value.custom.formula") localize=true}}
|
|
||||||
{{else}}
|
|
||||||
<div class="multi-display">
|
|
||||||
{{formField ../fields.value.fields.flatMultiplier value=dmg.value.flatMultiplier name=(concat ../path "damage.parts." index ".value.flatMultiplier") label="Multiplier" }}
|
|
||||||
{{formField ../fields.value.fields.dice value=dmg.value.dice name=(concat ../path "damage.parts." index ".value.dice")}}
|
|
||||||
{{formField ../fields.value.fields.bonus value=dmg.value.bonus name=(concat ../path "damage.parts." index ".value.bonus") localize=true}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#with (@root.getRealIndex index) as | realIndex |}}
|
{{formField ../fields.value.fields.flatMultiplier value=dmg.value.flatMultiplier name=(concat ../path "damage.parts." index ".value.flatMultiplier") label="Multiplier" classes="inline-child" }}
|
||||||
<fieldset{{#if dmg.base}} disabled{{/if}}>
|
{{formField ../fields.value.fields.dice value=dmg.value.dice name=(concat ../path "damage.parts." index ".value.dice") classes="inline-child"}}
|
||||||
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}}
|
{{formField ../fields.value.fields.bonus value=dmg.value.bonus name=(concat ../path "damage.parts." index ".value.bonus") localize=true classes="inline-child"}}
|
||||||
{{formField ../../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." realIndex ".resultBased") localize=true}}
|
|
||||||
{{/if}}
|
|
||||||
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}}
|
|
||||||
<fieldset>
|
|
||||||
<legend>
|
|
||||||
<div>With Hope</div>
|
|
||||||
</legend>
|
|
||||||
{{> formula fields=../../fields.value.fields type=../../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
|
||||||
</fieldset>
|
|
||||||
<fieldset>
|
|
||||||
<legend>
|
|
||||||
<div>With Fear</div>
|
|
||||||
</legend>
|
|
||||||
{{> formula fields=../../fields.valueAlt.fields type=../../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" realIndex=realIndex}}
|
|
||||||
</fieldset>
|
|
||||||
{{else}}
|
|
||||||
{{> formula fields=../../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
|
||||||
{{/if}}
|
|
||||||
{{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}}
|
|
||||||
<input type="hidden" name="damage.parts.{{realIndex}}.base" value="{{dmg.base}}">
|
|
||||||
{{#unless dmg.base}}<div class="fas fa-trash" data-action="removeDamage" data-index="{{realIndex}}"></div>{{/unless}}
|
|
||||||
</fieldset>
|
|
||||||
{{/with}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}}
|
||||||
</div>
|
{{else}}
|
||||||
|
{{#with (@root.getRealIndex index) as | realIndex |}}
|
||||||
|
<fieldset{{#if dmg.base}} disabled{{/if}}>
|
||||||
|
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}}
|
||||||
|
{{formField ../../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." realIndex ".resultBased") localize=true}}
|
||||||
|
{{/if}}
|
||||||
|
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}}
|
||||||
|
<fieldset>
|
||||||
|
<legend>
|
||||||
|
<div>With Hope</div>
|
||||||
|
</legend>
|
||||||
|
{{> formula fields=../../fields.value.fields type=../../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
||||||
|
</fieldset>
|
||||||
|
<fieldset>
|
||||||
|
<legend>
|
||||||
|
<div>With Fear</div>
|
||||||
|
</legend>
|
||||||
|
{{> formula fields=../../fields.valueAlt.fields type=../../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" realIndex=realIndex}}
|
||||||
|
</fieldset>
|
||||||
|
{{else}}
|
||||||
|
{{> formula fields=../../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
||||||
|
{{/if}}
|
||||||
|
{{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}}
|
||||||
|
<input type="hidden" name="damage.parts.{{realIndex}}.base" value="{{dmg.base}}">
|
||||||
|
{{#unless dmg.base}}<div class="fas fa-trash" data-action="removeDamage" data-index="{{realIndex}}"></div>{{/unless}}
|
||||||
|
</fieldset>
|
||||||
|
{{/with}}
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
{{#*inline "formula"}}
|
{{#*inline "formula"}}
|
||||||
|
|
|
||||||
|
|
@ -24,5 +24,8 @@
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#unless (eq source.type "diceSet")}}
|
||||||
|
{{formField fields.advState label= "Advantage State" name="roll.advState" value=source.advState localize=true}}
|
||||||
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
@ -2,7 +2,11 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label><strong>{{title}}</strong></label>
|
<label><strong>{{title}}</strong></label>
|
||||||
<div class="form-fields">
|
<div class="form-fields">
|
||||||
<input type="text" value="{{formula}}" disabled />
|
{{!-- <input type="text" value="{{formula}}" disabled /> --}}
|
||||||
|
<div>{{@root.formula}}</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="Situational Bonus">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{!-- {{#each bonusDamage as |damage index|}}
|
{{!-- {{#each bonusDamage as |damage index|}}
|
||||||
|
|
|
||||||
|
|
@ -2,25 +2,58 @@
|
||||||
{{#if @root.hasRoll}}
|
{{#if @root.hasRoll}}
|
||||||
<div class="roll-dialog-container">
|
<div class="roll-dialog-container">
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
{{#unless @root.isLite}}
|
|
||||||
<div class="roll-dialog-experience-container">
|
|
||||||
{{#each experiences}}
|
|
||||||
{{#if name}}
|
|
||||||
<div class="roll-dialog-chip {{#if (includes ../selectedExperiences id)}}selected{{/if}}" data-action="selectExperience" data-key="{{id}}">
|
|
||||||
<span>{{name}}</span>
|
|
||||||
<span>+{{value}}</span>
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
|
||||||
</div>
|
|
||||||
<div class="flexrow">
|
|
||||||
<button class="disadvantage flex1 {{#if (eq advantage 1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="1">{{localize "DAGGERHEART.General.Advantage.Full"}}</button>
|
|
||||||
<button class="disadvantage flex1 {{#if (eq advantage -1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="-1">{{localize "DAGGERHEART.General.Disadvantage.Full"}}</button>
|
|
||||||
</div>
|
|
||||||
{{/unless}}
|
|
||||||
<div>
|
<div>
|
||||||
<input type="text" value="{{@root.formula}}" disabled>
|
{{!-- <input type="text" value="{{@root.formula}}" disabled> --}}
|
||||||
|
<div>{{@root.formula}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{#unless @root.isLite}}
|
||||||
|
<div class="roll-dialog-experience-container">
|
||||||
|
{{#each experiences}}
|
||||||
|
{{#if name}}
|
||||||
|
<div class="roll-dialog-chip {{#if (includes ../selectedExperiences id)}}selected{{/if}}" data-action="selectExperience" data-key="{{id}}">
|
||||||
|
<span>{{name}}</span>
|
||||||
|
<span>+{{value}}</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
<div class="flexrow">
|
||||||
|
<button class="disadvantage flex1 {{#if (eq advantage 1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="1">{{localize "DAGGERHEART.General.Advantage.Full"}}</button>
|
||||||
|
<button class="disadvantage flex1 {{#if (eq advantage -1)}}selected{{/if}}" data-action="updateIsAdvantage" data-advantage="-1">{{localize "DAGGERHEART.General.Disadvantage.Full"}}</button>
|
||||||
|
</div>
|
||||||
|
{{#if (eq @root.rollType 'D20Roll')}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<select name="roll.dice.d20">
|
||||||
|
{{selectOptions diceOptions selected=@root.roll.d20.denomination}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if (eq @root.rollType 'DualityRoll')}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<div>Hope Dice</div>
|
||||||
|
<select name="roll.dice.dHope">
|
||||||
|
{{selectOptions diceOptions selected=@root.roll.dHope.denomination}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="flexrow">
|
||||||
|
<div>Fear Dice</div>
|
||||||
|
<select name="roll.dice.dFear">
|
||||||
|
{{selectOptions diceOptions selected=@root.roll.dFear.denomination}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{#if roll.advantage}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<div>Adv/Disadv Dice</div>
|
||||||
|
<select name="roll.dice.advantageFaces">
|
||||||
|
{{selectOptions diceOptions selected=@root.roll.dAdvantage.denomination}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
<div>
|
||||||
|
<input type="text" value="{{extraFormula}}" name="extraFormula" placeholder="Situational Bonus">
|
||||||
|
</div>
|
||||||
|
{{/unless}}
|
||||||
{{!-- {{#if (not isNpc)}} --}}
|
{{!-- {{#if (not isNpc)}} --}}
|
||||||
{{!-- <div class="form-group">
|
{{!-- <div class="form-group">
|
||||||
<label>Hope</label>
|
<label>Hope</label>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue