Add Enemy sheet

This commit is contained in:
2025-05-25 21:52:09 +02:00
parent 4aa22195a3
commit f2e6415f33
13 changed files with 79 additions and 16 deletions

View File

@@ -410,15 +410,15 @@ i.fvtt-hellborn {
} }
.fvtt-hellborn .tab.character-maleficas .main-div .maleficas { .fvtt-hellborn .tab.character-maleficas .main-div .maleficas {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(1, 1fr);
gap: 4px; gap: 4px;
} }
.fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica { .fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 4px; gap: 4px;
min-width: 18rem; min-width: 24rem;
max-width: 18rem; max-width: 24rem;
} }
.fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .controls { .fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .controls {
font-size: 0.7rem; font-size: 0.7rem;
@@ -426,8 +426,12 @@ i.fvtt-hellborn {
max-width: 1.8rem; max-width: 1.8rem;
} }
.fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .name { .fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .name {
min-width: 12rem; min-width: 28rem;
max-width: 12rem; max-width: 28rem;
}
.fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .damage {
min-width: 6rem;
max-width: 6rem;
} }
.fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .domain { .fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .domain {
min-width: 5rem; min-width: 5rem;
@@ -460,8 +464,8 @@ i.fvtt-hellborn {
max-width: 1.8rem; max-width: 1.8rem;
} }
.fvtt-hellborn .tab.character-maleficas .main-div .rituals .ritual .ingredients { .fvtt-hellborn .tab.character-maleficas .main-div .rituals .ritual .ingredients {
min-width: 26rem; min-width: 24rem;
max-width: 26rem; max-width: 24rem;
} }
.fvtt-hellborn .tab.character-maleficas .main-div .rituals .ritual .name { .fvtt-hellborn .tab.character-maleficas .main-div .rituals .ritual .name {
min-width: 12rem; min-width: 12rem;
@@ -2174,6 +2178,11 @@ i.fvtt-hellborn {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.fvtt-hellborn .malefica-content fieldset .form-fields input[type="checkbox"] {
min-width: 2rem;
max-width: 2rem;
text-align: center;
}
.fvtt-hellborn .malefica-content fieldset .form-group input { .fvtt-hellborn .malefica-content fieldset .form-group input {
min-width: 12rem; min-width: 12rem;
max-width: 12rem; max-width: 12rem;
@@ -2345,7 +2354,9 @@ i.fvtt-hellborn {
color: var(--color-dark-1); color: var(--color-dark-1);
} }
.item-to-chat h2 { .item-to-chat h2 {
margin-top: 10px;
margin-left: 10px; margin-left: 10px;
margin-bottom: 4px;
font-family: var(--font-title); font-family: var(--font-title);
font-size: calc(var(--font-size-standard) * 1.4); font-size: calc(var(--font-size-standard) * 1.4);
color: var(--title-color); color: var(--title-color);

View File

@@ -479,6 +479,15 @@
"description": { "description": {
"label": "Description" "label": "Description"
}, },
"hasDamage": {
"label": "Has Damage"
},
"damage": {
"label": "Damage"
},
"damageType": {
"label": "Damage Type"
},
"domain": { "domain": {
"label": "Domain" "label": "Domain"
}, },
@@ -631,6 +640,9 @@
"damage": { "damage": {
"label": "Damage" "label": "Damage"
}, },
"damageType": {
"label": "Damage Type"
},
"description": { "description": {
"label": "Description" "label": "Description"
}, },

View File

@@ -211,6 +211,9 @@ export default class HellbornActorSheet extends HandlebarsApplicationMixin(found
if (item.type === "ritual") { if (item.type === "ritual") {
content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-hellborn/templates/chat-ritual.hbs", item.toObject()) content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-hellborn/templates/chat-ritual.hbs", item.toObject())
} }
if (item.type === "species-trait") {
content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-hellborn/templates/chat-trait.hbs", item.toObject())
}
const chatData = { const chatData = {
user: game.user.id, user: game.user.id,
speaker: ChatMessage.getSpeaker({ actor: this.actor }), speaker: ChatMessage.getSpeaker({ actor: this.actor }),

View File

@@ -93,7 +93,7 @@ export default class HellbornRoll extends Roll {
let damageRoll = new Roll(formula) let damageRoll = new Roll(formula)
await damageRoll.evaluate() await damageRoll.evaluate()
await damageRoll.toMessage({ await damageRoll.toMessage({
flavor: `${options.rollItem.name} - Damage Roll` flavor: `${options.rollItem.name} - Damage Roll - ${options.rollItem.system.damageType}`,
}); });
return return
} }

View File

@@ -11,6 +11,9 @@ export default class HellbornMalefica extends foundry.abstract.TypeDataModel {
schema.domain = new fields.StringField({ required: true, nullable: false, choices: SYSTEM.MALEFICA_DOMAINS, initial: "adfectus" }) schema.domain = new fields.StringField({ required: true, nullable: false, choices: SYSTEM.MALEFICA_DOMAINS, initial: "adfectus" })
schema.level = new fields.StringField({ required: true, nullable: false, choices: SYSTEM.MALEFICA_LEVELS, initial: "1" }) schema.level = new fields.StringField({ required: true, nullable: false, choices: SYSTEM.MALEFICA_LEVELS, initial: "1" })
schema.time = new fields.StringField({ required: true, initial : "" }) schema.time = new fields.StringField({ required: true, initial : "" })
schema.hasDamage = new fields.BooleanField({ required: true, initial: false })
schema.damage = new fields.StringField({ required: false, initial : "" })
schema.damageType = new fields.StringField({ required: false, initial : "" })
schema.range = new fields.StringField({ required: true, initial : "" }) schema.range = new fields.StringField({ required: true, initial : "" })
schema.target = new fields.StringField({ required: true, initial : "" }) schema.target = new fields.StringField({ required: true, initial : "" })

View File

@@ -13,6 +13,8 @@ export default class HellbornWeapon extends foundry.abstract.TypeDataModel {
schema.properties = new fields.StringField({required: true, initial: ""}) schema.properties = new fields.StringField({required: true, initial: ""})
schema.damage = new fields.StringField({required: true, initial: "1d6"}) schema.damage = new fields.StringField({required: true, initial: "1d6"})
schema.damageType = new fields.StringField({ required: false, initial : "Physical" })
schema.ammo = new fields.StringField({ required: false, initial: "" }) schema.ammo = new fields.StringField({ required: false, initial: "" })
schema.range = new fields.StringField({ required: false, initial: "" }) schema.range = new fields.StringField({ required: false, initial: "" })
schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 }) schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })

View File

@@ -280,22 +280,26 @@
.maleficas { .maleficas {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(1, 1fr);
gap: 4px; gap: 4px;
.malefica { .malefica {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 4px; gap: 4px;
min-width: 18rem; min-width: 24rem;
max-width: 18rem; max-width: 24rem;
.controls { .controls {
font-size: 0.7rem; font-size: 0.7rem;
min-width: 1.8rem; min-width: 1.8rem;
max-width: 1.8rem; max-width: 1.8rem;
} }
.name { .name {
min-width: 12rem; min-width: 28rem;
max-width: 12rem; max-width: 28rem;
}
.damage {
min-width: 6rem;
max-width: 6rem;
} }
.domain { .domain {
min-width: 5rem; min-width: 5rem;
@@ -329,8 +333,8 @@
max-width: 1.8rem; max-width: 1.8rem;
} }
.ingredients { .ingredients {
min-width: 26rem; min-width: 24rem;
max-width: 26rem; max-width: 24rem;
} }
.name { .name {
min-width: 12rem; min-width: 12rem;

View File

@@ -8,7 +8,10 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.form-group label { .form-fields input[type="checkbox"] {
min-width: 2rem;
max-width: 2rem;
text-align: center;
} }
.form-group input { .form-group input {
min-width: 12rem; min-width: 12rem;

View File

@@ -56,7 +56,9 @@
.item-to-chat { .item-to-chat {
h2 { h2 {
margin-top: 10px;
margin-left:10px; margin-left:10px;
margin-bottom: 4px;
font-family: var(--font-title); font-family: var(--font-title);
font-size: calc(var(--font-size-standard) * 1.4); font-size: calc(var(--font-size-standard) * 1.4);
color: var(--title-color); color: var(--title-color);

View File

@@ -17,6 +17,14 @@
</div> </div>
<span class="domain" data-tooltip="Domain">{{upperFirst item.system.domain}}</span> <span class="domain" data-tooltip="Domain">{{upperFirst item.system.domain}}</span>
<span class="level" data-tooltip="Level">{{getRomanLevel item.system.level}}</span> <span class="level" data-tooltip="Level">{{getRomanLevel item.system.level}}</span>
{{#if item.system.hasDamage}}
<a class="damage rollable" data-tooltip="Damage" data-item-id="{{item.id}}" data-action="roll"
data-roll-type="damage" data-roll-value="{{item.system.damage}}">
<i class="fa-regular fa-dice"></i>
{{item.system.damage}}</a>
{{else}}
<span class="damage" data-tooltip="Damage">-</span>
{{/if}}
<div class="controls"> <div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}" <a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}"

9
templates/chat-trait.hbs Normal file
View File

@@ -0,0 +1,9 @@
<div class="item-to-chat">
<div class="intro-chat">
<h2>{{name}}</h2>
<ul>
<li>{{{system.description}}}</li>
</ul>
</div>
</div>

View File

@@ -10,6 +10,11 @@
{{formField systemFields.time value=system.time localize=true }} {{formField systemFields.time value=system.time localize=true }}
{{formField systemFields.range value=system.range localize=true}} {{formField systemFields.range value=system.range localize=true}}
{{formField systemFields.target value=system.target localize=true}} {{formField systemFields.target value=system.target localize=true}}
{{formField systemFields.hasDamage value=system.hasDamage localize=true}}
{{#if system.hasDamage}}
{{formField systemFields.damage value=system.damage}}
{{formField systemFields.damageType value=system.damageType}}
{{/if}}
</fieldset> </fieldset>
<fieldset> <fieldset>

View File

@@ -14,6 +14,7 @@
{{formField systemFields.properties value=system.properties classes="long-input"}} {{formField systemFields.properties value=system.properties classes="long-input"}}
{{formField systemFields.damage value=system.damage}} {{formField systemFields.damage value=system.damage}}
{{formField systemFields.damageType value=system.damageType}}
{{formField systemFields.cost value=system.cost}} {{formField systemFields.cost value=system.cost}}
</fieldset> </fieldset>