mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
finish actions setting tab
This commit is contained in:
parent
3b159d7c0c
commit
f48459114a
23 changed files with 365 additions and 175 deletions
42
lang/en.json
42
lang/en.json
|
|
@ -227,14 +227,15 @@
|
||||||
"details": "Details",
|
"details": "Details",
|
||||||
"attack": "Attack",
|
"attack": "Attack",
|
||||||
"experiences": "Experiences",
|
"experiences": "Experiences",
|
||||||
"features": "Features"
|
"features": "Features",
|
||||||
|
"actions": "Actions"
|
||||||
},
|
},
|
||||||
"basics": "Basics"
|
"basics": "Basics"
|
||||||
},
|
},
|
||||||
"ActionType": {
|
"ActionType": {
|
||||||
"Passive": "Passive",
|
"passive": "Passive",
|
||||||
"Action": "Action",
|
"action": "Action",
|
||||||
"Reaction": "Reaction"
|
"reaction": "Reaction"
|
||||||
},
|
},
|
||||||
"Abilities": {
|
"Abilities": {
|
||||||
"agility": {
|
"agility": {
|
||||||
|
|
@ -1530,6 +1531,7 @@
|
||||||
"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",
|
||||||
|
|
@ -1537,29 +1539,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": {
|
||||||
|
|
|
||||||
|
|
@ -28,19 +28,19 @@ export default class AdversarySheet extends DaggerheartSheet(ActorSheetV2) {
|
||||||
static PARTS = {
|
static PARTS = {
|
||||||
sidebar: { template: 'systems/daggerheart/templates/sheets/actors/adversary/sidebar.hbs' },
|
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' },
|
||||||
features: { template: 'systems/daggerheart/templates/sheets/actors/adversary/features.hbs' },
|
actions: { template: 'systems/daggerheart/templates/sheets/actors/adversary/actions.hbs' },
|
||||||
notes: { template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs' },
|
notes: { template: 'systems/daggerheart/templates/sheets/actors/adversary/notes.hbs' },
|
||||||
effects: { template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs' }
|
effects: { template: 'systems/daggerheart/templates/sheets/actors/adversary/effects.hbs' }
|
||||||
};
|
};
|
||||||
|
|
||||||
static TABS = {
|
static TABS = {
|
||||||
features: {
|
actions: {
|
||||||
active: true,
|
active: true,
|
||||||
cssClass: '',
|
cssClass: '',
|
||||||
group: 'primary',
|
group: 'primary',
|
||||||
id: 'features',
|
id: 'actions',
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.Sheets.Adversary.Tabs.features'
|
label: 'DAGGERHEART.General.tabs.actions'
|
||||||
},
|
},
|
||||||
notes: {
|
notes: {
|
||||||
active: false,
|
active: false,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
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 DHBaseItemSheet from '../api/base-item.mjs';
|
||||||
|
import { actionsTypes } from '../../../data/_module.mjs';
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
|
|
@ -24,8 +26,11 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
},
|
},
|
||||||
position: { width: 455, height: 'auto' },
|
position: { width: 455, height: 'auto' },
|
||||||
actions: {
|
actions: {
|
||||||
addExperience: this.addExperience,
|
addExperience: this.#addExperience,
|
||||||
removeExperience: this.removeExperience
|
removeExperience: this.#removeExperience,
|
||||||
|
addAction: this.#addAction,
|
||||||
|
editAction: this.#editAction,
|
||||||
|
removeAction: this.#removeAction
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
handler: this.updateForm,
|
handler: this.updateForm,
|
||||||
|
|
@ -52,9 +57,9 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
id: 'experiences',
|
id: 'experiences',
|
||||||
template: 'systems/daggerheart/templates/sheets/applications/adversary-settings/experiences.hbs'
|
template: 'systems/daggerheart/templates/sheets/applications/adversary-settings/experiences.hbs'
|
||||||
},
|
},
|
||||||
features: {
|
actions: {
|
||||||
id: 'features',
|
id: 'actions',
|
||||||
template: 'systems/daggerheart/templates/sheets/applications/adversary-settings/features.hbs'
|
template: 'systems/daggerheart/templates/sheets/applications/adversary-settings/actions.hbs'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -83,13 +88,13 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.General.tabs.experiences'
|
label: 'DAGGERHEART.General.tabs.experiences'
|
||||||
},
|
},
|
||||||
features: {
|
actions: {
|
||||||
active: false,
|
active: false,
|
||||||
cssClass: '',
|
cssClass: '',
|
||||||
group: 'primary',
|
group: 'primary',
|
||||||
id: 'features',
|
id: 'actions',
|
||||||
icon: null,
|
icon: null,
|
||||||
label: 'DAGGERHEART.General.tabs.features'
|
label: 'DAGGERHEART.General.tabs.actions'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -114,7 +119,7 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
return tabs;
|
return tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async addExperience() {
|
static async #addExperience() {
|
||||||
const newExperience = {
|
const newExperience = {
|
||||||
name: 'Experience',
|
name: 'Experience',
|
||||||
modifier: 0
|
modifier: 0
|
||||||
|
|
@ -123,11 +128,55 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
static async removeExperience(_, target) {
|
static async #removeExperience(_, target) {
|
||||||
await this.actor.update({ [`system.experiences.-=${target.dataset.experience}`]: null });
|
await this.actor.update({ [`system.experiences.-=${target.dataset.experience}`]: null });
|
||||||
this.render();
|
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
|
||||||
|
}
|
||||||
|
);
|
||||||
|
console.log(action);
|
||||||
|
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) {
|
static async updateForm(event, _, formData) {
|
||||||
await this.actor.update(formData.object);
|
await this.actor.update(formData.object);
|
||||||
this.render();
|
this.render();
|
||||||
|
|
|
||||||
|
|
@ -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'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -76,7 +76,7 @@ export const damageOnSave = {
|
||||||
label: 'Full damage',
|
label: 'Full damage',
|
||||||
mod: 1
|
mod: 1
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
export const diceCompare = {
|
export const diceCompare = {
|
||||||
below: {
|
below: {
|
||||||
|
|
@ -104,4 +104,4 @@ export const diceCompare = {
|
||||||
label: 'Above',
|
label: 'Above',
|
||||||
operator: '>'
|
operator: '>'
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
|
||||||
|
|
@ -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'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -43,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',
|
||||||
|
|
|
||||||
|
|
@ -4333,42 +4333,6 @@ div.daggerheart.views.multiclass {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-header-sheet .character-traits {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 0;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-header-sheet .character-traits .trait {
|
|
||||||
height: 60px;
|
|
||||||
width: 60px;
|
|
||||||
background: url(../assets/svg/trait-shield.svg) no-repeat;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.theme-light .application.sheet.daggerheart.actor.dh-style.adversary .adversary-header-sheet .character-traits .trait {
|
|
||||||
background: url('../assets/svg/trait-shield-light.svg') no-repeat;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-header-sheet .character-traits .trait .trait-name {
|
|
||||||
display: flex;
|
|
||||||
padding-top: 5px;
|
|
||||||
color: light-dark(#18162e, #f3c267);
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 3px;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-header-sheet .character-traits .trait .trait-name i {
|
|
||||||
line-height: 17px;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-header-sheet .character-traits .trait .trait-value {
|
|
||||||
font-family: 'Montserrat', sans-serif;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .window-content {
|
.application.sheet.daggerheart.actor.dh-style.adversary .window-content {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 275px 1fr;
|
grid-template-columns: 275px 1fr;
|
||||||
|
|
@ -4628,6 +4592,9 @@ div.daggerheart.views.multiclass {
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-sidebar-sheet .experience-section {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-sidebar-sheet .experience-section .title {
|
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-sidebar-sheet .experience-section .title {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
|
|
@ -4651,19 +4618,13 @@ div.daggerheart.views.multiclass {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-sidebar-sheet .experience-section .experience-list .experience-row input[type='text'] {
|
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-sidebar-sheet .experience-section .experience-list .experience-row .experience-name {
|
||||||
height: 32px;
|
|
||||||
width: 180px;
|
width: 180px;
|
||||||
border: 1px solid transparent;
|
text-align: start;
|
||||||
outline: 2px solid transparent;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: 'Montserrat', sans-serif;
|
font-family: 'Montserrat', sans-serif;
|
||||||
transition: all 0.3s ease;
|
|
||||||
color: light-dark(#222, #efe6d8);
|
color: light-dark(#222, #efe6d8);
|
||||||
}
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-sidebar-sheet .experience-section .experience-list .experience-row input[type='text']:hover {
|
|
||||||
outline: 2px solid light-dark(#222, #efe6d8);
|
|
||||||
}
|
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-sidebar-sheet .experience-section .experience-list .experience-value {
|
.application.sheet.daggerheart.actor.dh-style.adversary .adversary-sidebar-sheet .experience-section .experience-list .experience-value {
|
||||||
height: 25px;
|
height: 25px;
|
||||||
width: 35px;
|
width: 35px;
|
||||||
|
|
@ -4709,6 +4670,71 @@ div.daggerheart.views.multiclass {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.experiences .add-experience-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.experiences .experience-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.experiences .experience-list .experience-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 3fr 1fr 30px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.experiences .experience-list .experience-item a {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.actions .add-action-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.actions .action-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 40px 1fr auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label {
|
||||||
|
font-family: 'Montserrat', sans-serif;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label .tags {
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label .tags .tag {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 3px 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
background: light-dark(#22222215, #efe6d815);
|
||||||
|
border: 1px solid light-dark(#222, #efe6d8);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .label .tags .label {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .controls {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
.application.daggerheart.dh-style.dialog .tab.actions .action-list .action-item .controls a {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.adversary .window-content {
|
.application.sheet.daggerheart.actor.dh-style.adversary .window-content {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
@ -5717,13 +5743,13 @@ div.daggerheart.views.multiclass {
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
color: #efe6d8;
|
color: #efe6d8;
|
||||||
}
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.character .items-list {
|
.application.daggerheart.dh-style .items-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.application.sheet.daggerheart.actor.dh-style.character .card-list {
|
.application.daggerheart.dh-style .card-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@
|
||||||
@import './less/actors/adversary/sidebar.less';
|
@import './less/actors/adversary/sidebar.less';
|
||||||
|
|
||||||
@import './less/applications/header.less';
|
@import './less/applications/header.less';
|
||||||
@import './less/applications/adversary/sheet.less';
|
@import './less/applications/adversary-settings/sheet.less';
|
||||||
|
@import './less/applications/adversary-settings/experiences.less';
|
||||||
|
@import './less/applications/adversary-settings/actions.less';
|
||||||
|
|
||||||
@import './less/actors/adversary.less';
|
@import './less/actors/adversary.less';
|
||||||
@import './less/actors/environment.less';
|
@import './less/actors/environment.less';
|
||||||
|
|
|
||||||
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -148,49 +148,5 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.character-traits {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 0;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
|
|
||||||
.trait {
|
|
||||||
height: 60px;
|
|
||||||
width: 60px;
|
|
||||||
background: url(../assets/svg/trait-shield.svg) no-repeat;
|
|
||||||
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
.theme-light & {
|
|
||||||
background: url('../assets/svg/trait-shield-light.svg') no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.trait-name {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding-top: 5px;
|
|
||||||
color: light-dark(@dark-blue, @golden);
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 3px;
|
|
||||||
|
|
||||||
i {
|
|
||||||
line-height: 17px;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.trait-value {
|
|
||||||
font-family: @font-body;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.experience-section {
|
.experience-section {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
|
|
@ -302,19 +304,12 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
input[type='text'] {
|
.experience-name {
|
||||||
height: 32px;
|
|
||||||
width: 180px;
|
width: 180px;
|
||||||
border: 1px solid transparent;
|
text-align: start;
|
||||||
outline: 2px solid transparent;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: @font-body;
|
font-family: @font-body;
|
||||||
transition: all 0.3s ease;
|
|
||||||
color: light-dark(@dark, @beige);
|
color: light-dark(@dark, @beige);
|
||||||
|
|
||||||
&:hover {
|
|
||||||
outline: 2px solid light-dark(@dark, @beige);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
62
styles/less/applications/adversary-settings/actions.less
Normal file
62
styles/less/applications/adversary-settings/actions.less
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
@import '../../utils/colors.less';
|
||||||
|
@import '../../utils/fonts.less';
|
||||||
|
|
||||||
|
.application.daggerheart.dh-style.dialog {
|
||||||
|
.tab.actions {
|
||||||
|
.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;
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
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>
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
|
|
||||||
data-tab='{{tabs.features.id}}'
|
|
||||||
data-group='{{tabs.features.group}}'
|
|
||||||
>
|
|
||||||
<h2>features</h2>
|
|
||||||
{{#debug document}}
|
|
||||||
|
|
||||||
{{/debug}}
|
|
||||||
</section>
|
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
<div class="experience-value">
|
<div class="experience-value">
|
||||||
+{{experience.modifier}}
|
+{{experience.modifier}}
|
||||||
</div>
|
</div>
|
||||||
<span>{{experience.name}}</span>
|
<span class="experience-name">{{experience.name}}</span>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<a data-action="toChat" data-type="experience" data-uuid="{{id}}"><i class="fa-regular fa-message"></i></a>
|
<a data-action="toChat" data-type="experience" data-uuid="{{id}}"><i class="fa-regular fa-message"></i></a>
|
||||||
</div>
|
</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>
|
||||||
|
|
@ -3,15 +3,21 @@
|
||||||
data-tab='{{tabs.experiences.id}}'
|
data-tab='{{tabs.experiences.id}}'
|
||||||
data-group='{{tabs.experiences.group}}'
|
data-group='{{tabs.experiences.group}}'
|
||||||
>
|
>
|
||||||
<button type="button" data-action="addExperience">
|
<button class="add-experience-btn" type="button" data-action="addExperience">
|
||||||
New Experience
|
<span>New Experience</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{{#each document.system.experiences as |experience key|}}
|
<fieldset>
|
||||||
<div class="experience-chip">
|
<legend>{{localize tabs.experiences.label}}</legend>
|
||||||
<input class="experience.value" type="text" name="system.experiences.{{key}}.name" value="{{experience.name}}" />
|
<ul class="experience-list">
|
||||||
<input class="experience-value" type="text" name="system.experiences.{{key}}.modifier" value="{{experience.modifier}}" data-dtype="Number" />
|
{{#each document.system.experiences as |experience key|}}
|
||||||
<button type="button" class="experience-button" data-action="removeExperience" data-experience="{{key}}"><i class="fa-solid fa-x"></i></button>
|
<li class="experience-item">
|
||||||
</div>
|
<input class="name" type="text" name="system.experiences.{{key}}.name" value="{{experience.name}}" />
|
||||||
{{/each}}
|
<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>
|
</section>
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
<section
|
|
||||||
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
|
|
||||||
data-tab='{{tabs.features.id}}'
|
|
||||||
data-group='{{tabs.features.group}}'
|
|
||||||
>
|
|
||||||
<h2>Features</h2>
|
|
||||||
</section>
|
|
||||||
|
|
@ -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}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,16 @@
|
||||||
{{/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">
|
<div class="controls">
|
||||||
{{#if (eq type 'weapon')}}
|
{{#if (eq type 'weapon')}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue