Ajout des impacts
This commit is contained in:
parent
dbb22bbeb7
commit
0392263666
18
lang/en.json
18
lang/en.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"TYPES": {
|
"TYPES": {
|
||||||
"Actor":{
|
"Actor": {
|
||||||
"Personnage": "PC"
|
"Personnage": "PC"
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
@ -54,12 +54,12 @@
|
|||||||
"ecrymology": "Ecrymology",
|
"ecrymology": "Ecrymology",
|
||||||
"traumatology": "Traumatology",
|
"traumatology": "Traumatology",
|
||||||
"traversology": "Traversology",
|
"traversology": "Traversology",
|
||||||
"urbatechnology": "Urbatechnology",
|
"urbatechnology": "Urbatechnology",
|
||||||
"quibbling": "Quibbling",
|
"quibbling": "Quibbling",
|
||||||
"creativity": "Creativity",
|
"creativity": "Creativity",
|
||||||
"loquacity": "Loquacity",
|
"loquacity": "Loquacity",
|
||||||
"guile": "Guile",
|
"guile": "Guile",
|
||||||
"performance" :"Performance",
|
"performance": "Performance",
|
||||||
"skill": "Skill",
|
"skill": "Skill",
|
||||||
"troublesome": "Troublesome",
|
"troublesome": "Troublesome",
|
||||||
"occasional": "Occasional",
|
"occasional": "Occasional",
|
||||||
@ -84,8 +84,16 @@
|
|||||||
"confrontation": "Confrontation",
|
"confrontation": "Confrontation",
|
||||||
"rollnormal": "Normal (4d6)",
|
"rollnormal": "Normal (4d6)",
|
||||||
"rollspleen": "With Spleen (5d6, worst 4 are kept)",
|
"rollspleen": "With Spleen (5d6, worst 4 are kept)",
|
||||||
"rollideal": "With Ideal (5d6, best 4 are kept)"
|
"rollideal": "With Ideal (5d6, best 4 are kept)",
|
||||||
|
"superficial": "Superficial",
|
||||||
|
"light": "Light",
|
||||||
|
"serious": "Serious",
|
||||||
|
"major": "Major",
|
||||||
|
"impactType": "Impact type",
|
||||||
|
"impactLevel": "Impact level",
|
||||||
|
"impactphysical": "Physical",
|
||||||
|
"impactmental": "Mental",
|
||||||
|
"impactsocial": "Social"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
11
lang/fr.json
11
lang/fr.json
@ -84,7 +84,16 @@
|
|||||||
"confrontation": "Confrontation",
|
"confrontation": "Confrontation",
|
||||||
"rollnormal": "Normal (4d6)",
|
"rollnormal": "Normal (4d6)",
|
||||||
"rollspleen": "Avec le Spleen (5d6, 4 plus bas conservés)",
|
"rollspleen": "Avec le Spleen (5d6, 4 plus bas conservés)",
|
||||||
"rollideal": "Avec l'Idéal (5d6, 4 plus haut conservés)"
|
"rollideal": "Avec l'Idéal (5d6, 4 plus haut conservés)",
|
||||||
|
"superficial": "Superficiel",
|
||||||
|
"light": "Léger",
|
||||||
|
"serious": "Grave",
|
||||||
|
"major": "Majeur",
|
||||||
|
"impactType": "Type d'Impact",
|
||||||
|
"impactLevel": "Niveau d'impact",
|
||||||
|
"impactphysical": "Physique",
|
||||||
|
"impactmental": "Mental",
|
||||||
|
"impactsocial": "Social"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -39,9 +39,9 @@ export class EcrymeActorSheet extends ActorSheet {
|
|||||||
traits: this.actor.getRollTraits(),
|
traits: this.actor.getRollTraits(),
|
||||||
ideal: this.actor.getIdeal(),
|
ideal: this.actor.getIdeal(),
|
||||||
spleen: this.actor.getSpleen(),
|
spleen: this.actor.getSpleen(),
|
||||||
system: duplicate(this.object.system),
|
impacts: this.object.getImpacts(),
|
||||||
config: duplicate(game.system.ecryme.config),
|
config: duplicate(game.system.ecryme.config),
|
||||||
weapons: duplicate(this.actor.getWeapons()),
|
weapons: this.actor.getWeapons(),
|
||||||
archetype: duplicate(this.actor.getArchetype()),
|
archetype: duplicate(this.actor.getArchetype()),
|
||||||
equipements: duplicate(this.actor.getEquipements()),
|
equipements: duplicate(this.actor.getEquipements()),
|
||||||
subActors: duplicate(this.actor.getSubActors()),
|
subActors: duplicate(this.actor.getSubActors()),
|
||||||
@ -121,6 +121,13 @@ export class EcrymeActorSheet extends ActorSheet {
|
|||||||
this.actor.rollSkillConfront(categKey, skillKey)
|
this.actor.rollSkillConfront(categKey, skillKey)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
html.find('.impact-modify').click((event) => {
|
||||||
|
let impactType = $(event.currentTarget).data("impact-type")
|
||||||
|
let impactLevel = $(event.currentTarget).data("impact-level")
|
||||||
|
let modifier = Number($(event.currentTarget).data("impact-modifier"))
|
||||||
|
this.actor.modifyImpact(impactType, impactLevel, modifier)
|
||||||
|
});
|
||||||
|
|
||||||
html.find('.roll-weapon').click((event) => {
|
html.find('.roll-weapon').click((event) => {
|
||||||
const armeId = $(event.currentTarget).data("arme-id")
|
const armeId = $(event.currentTarget).data("arme-id")
|
||||||
this.actor.rollArme(armeId)
|
this.actor.rollArme(armeId)
|
||||||
|
@ -107,7 +107,8 @@ export class EcrymeActor extends Actor {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getSpecialization(id) {
|
getSpecialization(id) {
|
||||||
return this.items.find(it => it.type == "specialization" && it.id == id)
|
let spec = this.items.find(it => it.type == "specialization" && it.id == id)
|
||||||
|
return spec
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getSpecializations(skillKey) {
|
getSpecializations(skillKey) {
|
||||||
@ -126,6 +127,11 @@ export class EcrymeActor extends Actor {
|
|||||||
return skills
|
return skills
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
getImpacts() {
|
||||||
|
let comp = duplicate(this.items.filter(item => item.type == 'impact') || [])
|
||||||
|
return comp;
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
getWeapons() {
|
getWeapons() {
|
||||||
let comp = duplicate(this.items.filter(item => item.type == 'weapon') || [])
|
let comp = duplicate(this.items.filter(item => item.type == 'weapon') || [])
|
||||||
EcrymeUtility.sortArrayObjectsByName(comp)
|
EcrymeUtility.sortArrayObjectsByName(comp)
|
||||||
@ -214,12 +220,26 @@ export class EcrymeActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async equipGear(equipmentId) {
|
async equipGear(equipmentId) {
|
||||||
let item = this.items.find(item => item.id == equipmentId);
|
let item = this.items.find(item => item.id == equipmentId);
|
||||||
if (item && item.system) {
|
if (item?.system) {
|
||||||
let update = { _id: item.id, "system.equipped": !item.system.equipped };
|
let update = { _id: item.id, "system.equipped": !item.system.equipped };
|
||||||
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
modifyImpact(impactType, impactLevel, modifier) {
|
||||||
|
console.log(impactType, impactLevel, modifier)
|
||||||
|
let current = this.system.impacts[impactType][impactLevel]
|
||||||
|
if (modifier > 0) {
|
||||||
|
while ( EcrymeUtility.getImpactMax(impactLevel) == current && impactLevel != "major") {
|
||||||
|
impactLevel = EcrymeUtility.getNextImpactLevel(impactLevel)
|
||||||
|
current = this.system.impacts[impactType][impactLevel]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let newImpact = Math.max(this.system.impacts[impactType][impactLevel] + modifier, 0)
|
||||||
|
this.update({ [`system.impacts.${impactType}.${impactLevel}`]: newImpact})
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
clearInitiative() {
|
clearInitiative() {
|
||||||
this.getFlag("world", "initiative", -1)
|
this.getFlag("world", "initiative", -1)
|
||||||
|
@ -6,6 +6,7 @@ export const ECRYME_CONFIG = {
|
|||||||
spleen: "Spleen",
|
spleen: "Spleen",
|
||||||
ideal: "Ideal"
|
ideal: "Ideal"
|
||||||
},
|
},
|
||||||
|
|
||||||
traitLevel: [
|
traitLevel: [
|
||||||
{value: -3, text: "-3"},
|
{value: -3, text: "-3"},
|
||||||
{value: -2, text: "-2"},
|
{value: -2, text: "-2"},
|
||||||
@ -14,6 +15,17 @@ export const ECRYME_CONFIG = {
|
|||||||
{value: +2, text: "+2"},
|
{value: +2, text: "+2"},
|
||||||
{value: +3, text: "+3"}
|
{value: +3, text: "+3"}
|
||||||
],
|
],
|
||||||
|
impactTypes: {
|
||||||
|
physical: "ECRY.ui.physical",
|
||||||
|
mental: "ECRY.ui.mental",
|
||||||
|
social: "ECRY.ui.social"
|
||||||
|
},
|
||||||
|
impactLevels: {
|
||||||
|
superficial: "ECRY.ui.superficial",
|
||||||
|
light: "ECRY.ui.light",
|
||||||
|
serious: "ECRY.ui.serious",
|
||||||
|
major: "ECRY.ui.major"
|
||||||
|
},
|
||||||
difficulty: {
|
difficulty: {
|
||||||
"-1": {difficulty: "ECRY.ui.none", frequency: "ECRY.ui.none", value: "-"},
|
"-1": {difficulty: "ECRY.ui.none", frequency: "ECRY.ui.none", value: "-"},
|
||||||
"8": { difficulty: "ECRY.ui.troublesome", frequency: "ECRY.ui.occasional", value: 8 },
|
"8": { difficulty: "ECRY.ui.troublesome", frequency: "ECRY.ui.occasional", value: 8 },
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
import { EcrymeCommands } from "../app/ecryme-commands.js";
|
import { EcrymeCommands } from "../app/ecryme-commands.js";
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
const __maxImpacts = {superficial: 4, light: 3, serious: 2, major: 1}
|
||||||
|
const __nextImpacts = {superficial: "light", light: "serious", serious: "major", major: "major"}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class EcrymeUtility {
|
export class EcrymeUtility {
|
||||||
@ -150,7 +153,8 @@ export class EcrymeUtility {
|
|||||||
'systems/fvtt-ecryme/templates/items/partial-item-nav.hbs',
|
'systems/fvtt-ecryme/templates/items/partial-item-nav.hbs',
|
||||||
'systems/fvtt-ecryme/templates/items/partial-item-equipment.hbs',
|
'systems/fvtt-ecryme/templates/items/partial-item-equipment.hbs',
|
||||||
'systems/fvtt-ecryme/templates/items/partial-item-description.hbs',
|
'systems/fvtt-ecryme/templates/items/partial-item-description.hbs',
|
||||||
'systems/fvtt-ecryme/templates/dialogs/partial-common-roll-dialog.hbs'
|
'systems/fvtt-ecryme/templates/dialogs/partial-common-roll-dialog.hbs',
|
||||||
|
'systems/fvtt-ecryme/templates/actors/partial-impacts.hbs'
|
||||||
]
|
]
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
}
|
}
|
||||||
@ -264,7 +268,13 @@ export class EcrymeUtility {
|
|||||||
|
|
||||||
return chatData;
|
return chatData;
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static getImpactMax(impactLevel) {
|
||||||
|
return __maxImpacts[impactLevel]
|
||||||
|
}
|
||||||
|
static getNextImpactLevel(impactLevel) {
|
||||||
|
return __nextImpacts[impactLevel]
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async showDiceSoNice(roll, rollMode) {
|
static async showDiceSoNice(roll, rollMode) {
|
||||||
if (game.modules.get("dice-so-nice")?.active) {
|
if (game.modules.get("dice-so-nice")?.active) {
|
||||||
@ -304,7 +314,7 @@ export class EcrymeUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static computeRollFormula(rollData, isConfrontation = false) {
|
static computeRollFormula(rollData, actor, isConfrontation = false) {
|
||||||
// Build the dice formula
|
// Build the dice formula
|
||||||
let diceFormula = (isConfrontation) ? "4d6" : "2d6"
|
let diceFormula = (isConfrontation) ? "4d6" : "2d6"
|
||||||
if (rollData.useIdeal) {
|
if (rollData.useIdeal) {
|
||||||
@ -358,7 +368,7 @@ export class EcrymeUtility {
|
|||||||
}
|
}
|
||||||
rollData.difficulty = Number(rollData.difficulty)
|
rollData.difficulty = Number(rollData.difficulty)
|
||||||
|
|
||||||
let diceFormula = this.computeRollFormula(rollData)
|
let diceFormula = this.computeRollFormula(rollData, actor)
|
||||||
|
|
||||||
// Performs roll
|
// Performs roll
|
||||||
let myRoll = new Roll(diceFormula).roll({ async: false })
|
let myRoll = new Roll(diceFormula).roll({ async: false })
|
||||||
@ -369,7 +379,7 @@ export class EcrymeUtility {
|
|||||||
|
|
||||||
this.computeResults(rollData)
|
this.computeResults(rollData)
|
||||||
|
|
||||||
console.log("ERRRRR", rollData)
|
console.log("rollData", rollData)
|
||||||
let msg = await this.createChatWithRollMode(rollData.alias, {
|
let msg = await this.createChatWithRollMode(rollData.alias, {
|
||||||
content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData)
|
content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData)
|
||||||
})
|
})
|
||||||
|
@ -69,7 +69,7 @@ export class EcrymeConfrontDialog extends Dialog {
|
|||||||
let dataJSON = event.dataTransfer.getData('text/plain')
|
let dataJSON = event.dataTransfer.getData('text/plain')
|
||||||
let data = JSON.parse(dataJSON)
|
let data = JSON.parse(dataJSON)
|
||||||
let idx = Number(data.diceIndex)
|
let idx = Number(data.diceIndex)
|
||||||
console.log("DATA", data, event, event.srcElement.className)
|
//console.log("DATA", data, event, event.srcElement.className)
|
||||||
if ( event.srcElement.className.includes("execution")) {
|
if ( event.srcElement.className.includes("execution")) {
|
||||||
this.rollData.availableDices[idx].location = "execution"
|
this.rollData.availableDices[idx].location = "execution"
|
||||||
}
|
}
|
||||||
|
@ -1201,7 +1201,17 @@ ul, li {
|
|||||||
color: rgba(19, 18, 18, 0.95);
|
color: rgba(19, 18, 18, 0.95);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.impact-box {
|
||||||
|
border-width: 2px;
|
||||||
|
border-color: #000000;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 2px ridge #443307;
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
.items-title-text {
|
.items-title-text {
|
||||||
|
text-align: center;
|
||||||
|
font-family: MailartRubberstamp;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
.lock-icon {
|
.lock-icon {
|
||||||
|
@ -1181,7 +1181,16 @@ ul, li {
|
|||||||
color: rgba(19, 18, 18, 0.95);
|
color: rgba(19, 18, 18, 0.95);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.impact-box {
|
||||||
|
border-width: 2px;
|
||||||
|
border-color: #000000;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 2px ridge #443307;
|
||||||
|
}
|
||||||
|
|
||||||
.items-title-text {
|
.items-title-text {
|
||||||
|
text-align: center;
|
||||||
|
font-family: MailartRubberstamp;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
.lock-icon {
|
.lock-icon {
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
],
|
],
|
||||||
"title": "Ecryme, le Jeu de Rôles",
|
"title": "Ecryme, le Jeu de Rôles",
|
||||||
"url": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme",
|
"url": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme",
|
||||||
"version": "10.0.4",
|
"version": "11.0.1",
|
||||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme/archive/fvtt-ecryme-v10.0.0.zip",
|
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme/archive/fvtt-ecryme-v10.0.0.zip",
|
||||||
"background": "systems/fvtt-ecryme/images/assets/ecryme_extract_panel_01.webp"
|
"background": "systems/fvtt-ecryme/images/assets/ecryme_extract_panel_01.webp"
|
||||||
}
|
}
|
@ -115,6 +115,26 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"impacts": {
|
||||||
|
"physical": {
|
||||||
|
"superficial": 0,
|
||||||
|
"light": 0,
|
||||||
|
"serious": 0,
|
||||||
|
"major": 0
|
||||||
|
},
|
||||||
|
"mental": {
|
||||||
|
"superficial": 0,
|
||||||
|
"light": 0,
|
||||||
|
"serious": 0,
|
||||||
|
"major": 0
|
||||||
|
},
|
||||||
|
"social": {
|
||||||
|
"superficial": 0,
|
||||||
|
"light": 0,
|
||||||
|
"serious": 0,
|
||||||
|
"major": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npccore": {
|
"npccore": {
|
||||||
@ -130,7 +150,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"types": ["equipment", "trait", "weapon", "specialization","annency", "boheme", "contact"],
|
"types": [
|
||||||
|
"equipment",
|
||||||
|
"trait",
|
||||||
|
"weapon",
|
||||||
|
"specialization",
|
||||||
|
"annency",
|
||||||
|
"boheme",
|
||||||
|
"contact",
|
||||||
|
"impact"
|
||||||
|
],
|
||||||
"templates": {
|
"templates": {
|
||||||
"common": {
|
"common": {
|
||||||
"description": ""
|
"description": ""
|
||||||
@ -141,46 +170,75 @@
|
|||||||
"costunit": ""
|
"costunit": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"impact": {
|
||||||
|
"templates": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
|
"impacttype": "physical",
|
||||||
|
"impactlevel": "superficial"
|
||||||
|
},
|
||||||
"equipment": {
|
"equipment": {
|
||||||
"templates": ["common","equipement"],
|
"templates": [
|
||||||
|
"common",
|
||||||
|
"equipement"
|
||||||
|
],
|
||||||
"quantity": 1,
|
"quantity": 1,
|
||||||
"weight": 0
|
"weight": 0
|
||||||
},
|
},
|
||||||
"trait": {
|
"trait": {
|
||||||
"templates": ["common"],
|
"templates": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
"traitype": "normal",
|
"traitype": "normal",
|
||||||
"level": 1
|
"level": 1
|
||||||
},
|
},
|
||||||
"weapon": {
|
"weapon": {
|
||||||
"templates": ["common", "equipement"],
|
"templates": [
|
||||||
|
"common",
|
||||||
|
"equipement"
|
||||||
|
],
|
||||||
"effect": 0
|
"effect": 0
|
||||||
},
|
},
|
||||||
"specialization": {
|
"specialization": {
|
||||||
"templates": ["common"],
|
"templates": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
"skillkey": ""
|
"skillkey": ""
|
||||||
},
|
},
|
||||||
"scar": {
|
"scar": {
|
||||||
"templates": ["common"],
|
"templates": [
|
||||||
"skillcategory": ["physical", "mental", "social", "cephalie"],
|
"common"
|
||||||
|
],
|
||||||
|
"skillcategory": [
|
||||||
|
"physical",
|
||||||
|
"mental",
|
||||||
|
"social",
|
||||||
|
"cephalie"
|
||||||
|
],
|
||||||
"scarLevel": 1
|
"scarLevel": 1
|
||||||
},
|
},
|
||||||
"annency": {
|
"annency": {
|
||||||
"templates": ["common"],
|
"templates": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
"collective": false,
|
"collective": false,
|
||||||
"multiple": false,
|
"multiple": false,
|
||||||
"improvements": ""
|
"improvements": ""
|
||||||
},
|
},
|
||||||
"boheme": {
|
"boheme": {
|
||||||
"templates": ["common"],
|
"templates": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
"ideals": "",
|
"ideals": "",
|
||||||
"political": ""
|
"political": ""
|
||||||
},
|
},
|
||||||
"contact": {
|
"contact": {
|
||||||
"templates": ["common"],
|
"templates": [
|
||||||
|
"common"
|
||||||
|
],
|
||||||
"attitude": "neutral",
|
"attitude": "neutral",
|
||||||
"organization": "",
|
"organization": "",
|
||||||
"location":""
|
"location": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -8,11 +8,11 @@
|
|||||||
<div class="profile-img-container">
|
<div class="profile-img-container">
|
||||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
||||||
|
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="flexrow item" data-item-id="{{spleen.id}}">
|
<li class="flexrow item" data-item-id="{{spleen.id}}">
|
||||||
<label class="item-name-label-medium">Spleen :</label>
|
<label class="item-name-label-medium">Spleen :</label>
|
||||||
@ -39,10 +39,19 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="flexrow">
|
||||||
|
{{> systems/fvtt-ecryme/templates/actors/partial-impacts.hbs impacts=system.impacts.physical
|
||||||
|
impacttype="physical"}}
|
||||||
|
{{> systems/fvtt-ecryme/templates/actors/partial-impacts.hbs impacts=system.impacts.mental
|
||||||
|
impacttype="mental"}}
|
||||||
|
{{> systems/fvtt-ecryme/templates/actors/partial-impacts.hbs impacts=system.impacts.social
|
||||||
|
impacttype="social"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@ -60,56 +69,60 @@
|
|||||||
|
|
||||||
{{!-- Skills Tab --}}
|
{{!-- Skills Tab --}}
|
||||||
<div class="tab competences" data-group="primary" data-tab="competences">
|
<div class="tab competences" data-group="primary" data-tab="competences">
|
||||||
|
|
||||||
|
|
||||||
<div class="grid grid-3col">
|
<div class="grid grid-3col">
|
||||||
|
|
||||||
{{#each skills as |category categkey|}}
|
{{#each skills as |category categkey|}}
|
||||||
<div>
|
<div>
|
||||||
<ul class="stat-list alternate-list item-list">
|
<ul class="stat-list alternate-list item-list">
|
||||||
<li class="item flexrow list-item items-title-bg">
|
<li class="item flexrow list-item items-title-bg">
|
||||||
<span class="item-name-label-header">
|
<span class="item-name-label-header title-center">
|
||||||
<h3><label class="items-title-text">{{localize category.name}}</label></h3>
|
<h3><label class="items-title-text">{{localize category.name}}</label></h3>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{{#each category.skilllist as |skill skillkey|}}
|
{{#each category.skilllist as |skill skillkey|}}
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<span class="item-name-label-long">
|
<span class="item-name-label-long">
|
||||||
<a class="roll-skill-confront" data-category-key="{{categkey}}" data-skill-key="{{skillkey}}">
|
<a class="roll-skill-confront" data-category-key="{{categkey}}" data-skill-key="{{skillkey}}">
|
||||||
<i class="fa-regular fa-swords"></i>
|
<i class="fa-regular fa-swords"></i>
|
||||||
</a>
|
</a>
|
||||||
<a class="roll-skill" data-category-key="{{categkey}}" data-skill-key="{{skillkey}}">
|
<a class="roll-skill" data-category-key="{{categkey}}" data-skill-key="{{skillkey}}">
|
||||||
|
<i class="fa-solid fa-dice-d6"></i>
|
||||||
|
{{localize skill.name}}
|
||||||
|
</a></span>
|
||||||
|
<select class="item-field-label-short" type="text"
|
||||||
|
name="system.skills.{{categkey}}.skilllist.{{skillkey}}.value" value="{{skill.value}}"
|
||||||
|
data-dtype="Number">
|
||||||
|
{{#select skill.value}}
|
||||||
|
{{#each @root.config.skillLevel as |level key| }}
|
||||||
|
<option value="{{level}}">{{level}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li class="item flexrow list-item">
|
||||||
|
<ul class="ul-level1">
|
||||||
|
{{#each skill.spec as |spec idx|}}
|
||||||
|
<li class="item flexrow list-item" data-item-id="{{spec._id}}" data-item-type="specialization">
|
||||||
|
<a class="roll-spec" data-spec-id="{{spec._id}}">
|
||||||
<i class="fa-solid fa-dice-d6"></i>
|
<i class="fa-solid fa-dice-d6"></i>
|
||||||
{{localize skill.name}}
|
{{spec.name}}
|
||||||
</a></span>
|
</a>
|
||||||
<select class="item-field-label-short" type="text" name="system.skills.{{categkey}}.skilllist.{{skillkey}}.value" value="{{skill.value}}" data-dtype="Number">
|
<div class="item-controls item-controls-fixed">
|
||||||
{{#select skill.value}}
|
<a class="item-control item-edit" data-type="specialization" title="Edit Item"><i
|
||||||
{{#each @root.config.skillLevel as |level key| }}
|
class="fas fa-edit"></i></a>
|
||||||
<option value="{{level}}">{{level}}</option>
|
<a class="item-control item-add" data-type="specialization" title="Delete Item"><i
|
||||||
{{/each}}
|
class="fas fa-plus"></i></a>
|
||||||
{{/select}}
|
</div>
|
||||||
</select>
|
</li>
|
||||||
</li>
|
{{/each}}
|
||||||
<li class="item flexrow list-item">
|
</ul>
|
||||||
<ul class="ul-level1">
|
</li>
|
||||||
{{#each skill.spec as |spec idx|}}
|
{{/each}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{spec._id}}" data-item-type="specialization">
|
</ul>
|
||||||
<a class="roll-spec" data-spec-id="{{spec._id}}">
|
|
||||||
<i class="fa-solid fa-dice-d6"></i>
|
|
||||||
{{spec.name}}
|
|
||||||
</a>
|
|
||||||
<div class="item-controls item-controls-fixed">
|
|
||||||
<a class="item-control item-edit" data-type="specialization" title="Edit Item"><i class="fas fa-edit"></i></a>
|
|
||||||
<a class="item-control item-add" data-type="specialization" title="Delete Item"><i class="fas fa-plus"></i></a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -150,7 +163,7 @@
|
|||||||
<div class="tab equipment" data-group="primary" data-tab="equipment">
|
<div class="tab equipment" data-group="primary" data-tab="equipment">
|
||||||
|
|
||||||
<span class="item-name-label-header items-title-bg">
|
<span class="item-name-label-header items-title-bg">
|
||||||
<h3><label class="items-title-text">Equipements (saisie libre)</label></h3>
|
<h3><label class="items-title-text">Equipements (saisie libre)</label></h3>
|
||||||
</span>
|
</span>
|
||||||
<div class="form-group small-editor">
|
<div class="form-group small-editor">
|
||||||
{{editor equipementlibre target="system.equipementlibre" button=true owner=owner editable=editable}}
|
{{editor equipementlibre target="system.equipementlibre" button=true owner=owner editable=editable}}
|
||||||
@ -266,33 +279,37 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<label class="item-name-label-medium">Age</label>
|
<label class="item-name-label-medium">Age</label>
|
||||||
<input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}" data-dtype="String" />
|
<input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}"
|
||||||
|
data-dtype="String" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<label class="item-name-label-medium">Résidence</label>
|
<label class="item-name-label-medium">Résidence</label>
|
||||||
<input type="text" class="" name="system.biodata.residence" value="{{system.biodata.residence}}" data-dtype="String" />
|
<input type="text" class="" name="system.biodata.residence" value="{{system.biodata.residence}}"
|
||||||
|
data-dtype="String" />
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<label class="item-name-label-medium">Nationalité</label>
|
<label class="item-name-label-medium">Nationalité</label>
|
||||||
<input type="text" class="" name="system.biodata.nationalite" value="{{system.biodata.nationalite}}" data-dtype="String" />
|
<input type="text" class="" name="system.biodata.nationalite" value="{{system.biodata.nationalite}}"
|
||||||
|
data-dtype="String" />
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<label class="item-name-label-medium">Enfance</label>
|
<label class="item-name-label-medium">Enfance</label>
|
||||||
<input type="text" class="" name="system.biodata.enfance" value="{{system.biodata.enfance}}" data-dtype="String" />
|
<input type="text" class="" name="system.biodata.enfance" value="{{system.biodata.enfance}}"
|
||||||
|
data-dtype="String" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab notes" data-group="primary" data-tab="notes">
|
<div class="tab notes" data-group="primary" data-tab="notes">
|
||||||
<hr>
|
<hr>
|
||||||
<span class="item-name-label-header items-title-bg">
|
<span class="item-name-label-header items-title-bg">
|
||||||
<h3><label class="items-title-text">Background</label></h3>
|
<h3><label class="items-title-text">Background</label></h3>
|
||||||
</span>
|
</span>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor description target="system.biodata.description" button=true owner=owner
|
{{editor description target="system.biodata.description" button=true owner=owner
|
||||||
@ -300,7 +317,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<span class="item-name-label-header items-title-bg">
|
<span class="item-name-label-header items-title-bg">
|
||||||
<h3><label class="items-title-text">Notes</label></h3>
|
<h3><label class="items-title-text">Notes</label></h3>
|
||||||
</span>
|
</span>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor notes target="system.biodata.notes" button=true owner=owner editable=editable}}
|
{{editor notes target="system.biodata.notes" button=true owner=owner editable=editable}}
|
||||||
@ -308,7 +325,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
14
templates/actors/partial-impacts.hbs
Normal file
14
templates/actors/partial-impacts.hbs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<div class="impact-box">
|
||||||
|
|
||||||
|
<span class="item-field-label-medium"><label>{{localize (concat "ECRY.ui.impact" impacttype)}}</label></span>
|
||||||
|
<ul>
|
||||||
|
{{#each impacts as |value key|}}
|
||||||
|
<li class="flexrow" data-impact-type="{{../impacttype}}">
|
||||||
|
<span class="item-field-label-medium"><label>{{localize (concat "ECRY.ui." key)}}</label></span>
|
||||||
|
<a class="impact-modify" data-impact-modifier="+1" data-impact-type="{{../impacttype}}" data-impact-level="{{key}}"><i class="fas fa-plus-square"></i></a>
|
||||||
|
<span class="">{{value}}</span>
|
||||||
|
<a class="impact-modify" data-impact-modifier="-1" data-impact-type="{{../impacttype}}" data-impact-level="{{key}}"><i class="fas fa-minus-square"></i></a>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
@ -20,8 +20,8 @@
|
|||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span class="roll-dialog-label">{{localize "ECRY.ui.spec"}} : </span>
|
<span class="roll-dialog-label">{{localize "ECRY.ui.spec"}} : </span>
|
||||||
<select class="" id="roll-specialization" data-type="String" multiple>
|
<select class="" id="roll-specialization" data-type="String" multiple>
|
||||||
{{#each skill.spec as | spec idx|}}
|
{{#each skill.spec as |spec idx|}}
|
||||||
<option value="{{spec._id}}">{{spec.name}}</option>
|
<option value="{{spec.id}}">{{spec.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
48
templates/items/item-impact-sheet.hbs
Normal file
48
templates/items/item-impact-sheet.hbs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
|
<div class="header-fields">
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}}
|
||||||
|
|
||||||
|
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
{{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}}
|
||||||
|
|
||||||
|
<div class="tab details" data-group="primary" data-tab="details">
|
||||||
|
|
||||||
|
<div class="tab" data-group="primary">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-name-label-long">{{localize "ECRY.ui.impactType"}}</label>
|
||||||
|
<select class="item-field-label-medium" type="text" name="system.impacttype" value="{{system.impacttype}}" data-dtype="String">
|
||||||
|
{{#select system.impacttype}}
|
||||||
|
{{#each config.impactTypes as |type key| }}
|
||||||
|
<option value="{{key}}">{{localize type}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-name-label-long">{{localize "ECRY.ui.impactLevel"}}</label>
|
||||||
|
<select class="item-field-label-medium" type="text" name="system.impactlevel" value="{{system.impactlevel}}" data-dtype="String">
|
||||||
|
{{#select system.impactlevel}}
|
||||||
|
{{#each config.impactLevels as |level key| }}
|
||||||
|
<option value="{{key}}">{{localize level}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</form>
|
Loading…
x
Reference in New Issue
Block a user