Compare commits

...

6 Commits

Author SHA1 Message Date
f26cd7670c Various fixes 2023-03-11 12:11:27 +01:00
02f8207fb7 Tri alpha + ajout contacts 2023-03-10 13:21:06 +01:00
439797e71e Fix predilection 2023-03-10 09:30:43 +01:00
1d82a6aa60 Fix predilection 2023-03-10 09:08:10 +01:00
11b0f22aa7 Diverses ameliorations 2023-03-09 13:16:19 +01:00
b0a3cb08cb Fix sur armes et affichage 2023-03-09 00:26:52 +01:00
14 changed files with 347 additions and 154 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@@ -14,8 +14,8 @@ export class HeritiersActorSheet extends ActorSheet {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-les-heritiers", "sheet", "actor"],
template: "systems/fvtt-les-heritiers/templates/actor-sheet.html",
width: 640,
height: 720,
width: 780,
height: 840,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editScore: false
@@ -38,7 +38,8 @@ export class HeritiersActorSheet extends ActorSheet {
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited,
skills: this.actor.getSkills(),
utileSkills :this.actor.organizeUtileSkills(),
utileSkillsMental :this.actor.organizeUtileSkills("mental"),
utileSkillsPhysical :this.actor.organizeUtileSkills("physical"),
futileSkills :this.actor.organizeFutileSkills(),
contacts: this.actor.organizeContacts(),
armes: duplicate(this.actor.getWeapons()),
@@ -136,11 +137,25 @@ export class HeritiersActorSheet extends ActorSheet {
const key = $(event.currentTarget).data("key")
this.actor.rollCarac(key, false)
})
html.find('.roll-rang').click((event) => {
const key = $(event.currentTarget).data("rang-key")
this.actor.rollRang(key, false)
})
html.find('.roll-competence').click((event) => {
const li = $(event.currentTarget).parents(".item")
let compId = li.data("item-id")
this.actor.rollCompetence(compId)
})
html.find('.roll-attaque-arme').click((event) => {
const li = $(event.currentTarget).parents(".item")
let armeId = li.data("item-id")
this.actor.rollAttaqueArme(armeId)
})
html.find('.roll-pouvoir').click((event) => {
const li = $(event.currentTarget).parents(".item")
let pouvoirId = li.data("item-id")
this.actor.rollPouvoir(pouvoirId)
})
html.find('.item-add').click((event) => {
const itemType = $(event.currentTarget).data("type")

View File

@@ -42,8 +42,8 @@ export class HeritiersActor extends Actor {
data.items = []
for (let skill of skills) {
if (skill.system.categorie == "utile") {
data.items.push( skill.toObject())
}
data.items.push(skill.toObject())
}
}
}
if (data.type == 'creature') {
@@ -108,43 +108,46 @@ export class HeritiersActor extends Actor {
}
/* ----------------------- --------------------- */
getItemSorted( types) {
let items = this.items.filter(item => types.includes(item.type )) || []
HeritiersUtility.sortArrayObjectsByName(items)
return items
}
getEquipments() {
return this.items.filter(item => item.type == "equipement" || item.type == "accessoire")
return this.getItemSorted( ["equipement", "accessoire"] )
}
getAvantages() {
return this.items.filter(item => item.type == "avantage")
return this.getItemSorted( ["avantage"])
}
getDesavantages() {
return this.items.filter(item => item.type == "desavantage")
return this.getItemSorted( ["desavantage"])
}
getMonnaies() {
return this.items.filter(item => item.type == "monnaie")
return this.getItemSorted( ["monnaie"])
}
getArmors() {
return this.items.filter(item => item.type == "protection")
return this.getItemSorted( ["protection"])
}
getTalents() {
return this.items.filter(item => item.type == "talent")
return this.getItemSorted( ["talent"])
}
getContacts() {
return this.items.filter(item => item.type == "contact")
return this.getItemSorted( ["contact"])
}
getAtouts() {
return this.items.filter(item => item.type == "atoutfeerique")
return this.getItemSorted( ["atoutfeerique"])
}
getCapacites() {
return this.items.filter(item => item.type == "capacitenaturelle")
return this.getItemSorted( ["capacitenaturelle"])
}
getFee() {
return this.items.find(item => item.type == "fee")
return this.items.find(item => item.type =="fee")
}
getProfils() {
return this.items.filter(item => item.type == "profil")
return this.getItemSorted( ["profil"])
}
getPouvoirs() {
let pouvoirs = this.items.filter(item => item.type == "pouvoir")
HeritiersUtility.sortArrayObjectsByName(pouvoirs)
return pouvoirs
return this.getItemSorted( ["pouvoir"])
}
/* -------------------------------------------- */
getSkills() {
@@ -162,7 +165,7 @@ export class HeritiersActor extends Actor {
prepareUtileSkill(item) {
let specList = []
if (item.system.categorie == "utile") {
for (let spec of item.system.specialites) {
for (let spec of item.system.specialites) {
specList.push(spec.name)
}
}
@@ -171,32 +174,39 @@ export class HeritiersActor extends Actor {
}
/* -------------------------------------------- */
organizeUtileSkills() {
organizeUtileSkills(kind = "mental") {
let comp = {}
for (let key in game.system.lesheritiers.config.competenceProfil) {
if ( game.system.lesheritiers.config.competenceProfil[key].kind == kind)
comp[key] = []
}
for (let item of this.items) {
if (item.type == "competence") {
if (item.system.categorie == "utile") {
if (item.system.categorie == "utile" && comp[item.system.profil]) {
this.prepareUtileSkill(item)
comp[item.system.profil].push(item)
}
}
}
HeritiersUtility.sortArrayObjectsByName(comp)
return comp
for (let key in comp) {
HeritiersUtility.sortArrayObjectsByName(comp[key])
}
return Object.fromEntries(Object.entries(comp).sort())
}
/* -------------------------------------------- */
organizeContacts( ) {
organizeContacts() {
let contactList = {}
for (let item of this.items) {
if (item.type == "contact") {
let c = contactList[item.system.contacttype] || { label: game.system.lesheritiers.config.contactType[item.system.contacttype], list: [] }
c.list.push( item )
c.list.push(item)
contactList[item.system.contacttype] = c
}
}
for (let key in contactList) {
HeritiersUtility.sortArrayObjectsByName(contactList[key].list)
}
return contactList
}
@@ -291,10 +301,12 @@ export class HeritiersActor extends Actor {
let item = this.items.find(item => item.id == itemId)
if (item) {
console.log("Item ", item, itemField, dataType, value)
if (dataType.toLowerCase() == "number") {
value = Number(value)
} else {
value = String(value)
if (dataType) {
if (dataType.toLowerCase() == "number") {
value = Number(value)
} else {
value = String(value)
}
}
let update = { _id: item.id, [`system.${itemField}`]: value };
this.updateEmbeddedDocuments("Item", [update])
@@ -522,7 +534,7 @@ export class HeritiersActor extends Actor {
/* -------------------------------------------- */
async rollInitiative() {
let rollData = this.getCommonRollData(undefined, "Art de la guerre")
rollData.mode = "init"
rollData.mode = "init"
if (this.system.caracteristiques["san"].value > this.system.caracteristiques["per"].value) {
rollData.caracKey = "san"
} else {
@@ -532,17 +544,27 @@ export class HeritiersActor extends Actor {
let rollDialog = await HeritiersRollDialog.create(this, rollData)
rollDialog.render(true)
}
/* -------------------------------------------- */
async rollCarac(key, isInit = false) {
let rollData = this.getCommonRollData()
rollData.mode = "carac"
rollData.mode = "carac"
rollData.carac = this.system.caracteristiques[key]
rollData.caracKey = key
let rollDialog = await HeritiersRollDialog.create(this, rollData)
rollDialog.render(true)
}
/* -------------------------------------------- */
async rollRang(key, isInit = false) {
let rollData = this.getCommonRollData()
rollData.mode = "rang"
rollData.rang = this.system.rang[key]
rollData.rangKey = key
let rollDialog = await HeritiersRollDialog.create(this, rollData)
rollDialog.render(true)
}
/* -------------------------------------------- */
async rollCompetence(compId) {
let rollData = this.getCommonRollData(compId)
@@ -551,7 +573,43 @@ export class HeritiersActor extends Actor {
let rollDialog = await HeritiersRollDialog.create(this, rollData)
rollDialog.render(true)
}
/* -------------------------------------------- */
async rollAttaqueArme(armeId) {
let arme = this.items.get(armeId)
if (arme) {
let competenceName = "Tir"
let key = "prec"
if (arme.system.categorie == "blanche" || arme.system.categorie == "improvise") {
competenceName = "Mêlée"
key = "agi"
}
let rollData = this.getCommonRollData(undefined, competenceName)
rollData.carac = this.system.caracteristiques[key]
rollData.caracKey = key
rollData.arme = duplicate(arme)
rollData.mode = "arme"
let rollDialog = await HeritiersRollDialog.create(this, rollData)
rollDialog.render(true)
}
}
/* -------------------------------------------- */
async rollPouvoir(pouvoirId) {
let pouvoir = this.items.get(pouvoirId)
if (pouvoir) {
let rollData = this.getCommonRollData(undefined, undefined)
if ( pouvoir.system.feeriemasque != "autre") {
rollData.pouvoirBase = duplicate(this.system.rang[pouvoir.system.feeriemasque.toLowerCase()])
rollData.pouvoirBase.label = "Féerie"
rollData.carac = duplicate(this.system.caracteristiques[pouvoir.system.carac])
rollData.caracKey = pouvoir.system.carac
}
rollData.pouvoir = duplicate(pouvoir)
rollData.mode = "pouvoir"
let rollDialog = await HeritiersRollDialog.create(this, rollData)
rollDialog.render(true)
}
}
/* -------------------------------------------- */
async rollArmeOffensif(armeId) {
let arme = this.items.get(armeId)

View File

@@ -8,7 +8,7 @@ export const HERITIERS_CONFIG = {
"prec": "Précision",
"esp": "Esprit",
"per": "Perception",
"pres": "Préstance",
"pres": "Prestance",
"san": "Sang-Froid"
},
@@ -25,16 +25,16 @@ export const HERITIERS_CONFIG = {
},
competenceProfil : {
"aventurier": "Aventurier",
"roublard": "Roublard",
"combattant": "Combattant",
"erudit": "Erudit",
"savant": "Savant",
"gentleman": "Gentleman"
"aventurier": {kind: "physical", name: "Aventurier"},
"roublard": {kind: "physical",name: "Roublard"},
"combattant": {kind: "physical",name:"Combattant"},
"erudit": {kind: "mental",name:"Erudit"},
"savant": {kind: "mental",name:"Savant"},
"gentleman": {kind: "mental",name:"Gentleman"}
},
baseTestPouvoir: {
"feerie": "Féerie",
"Masque": "Masque",
"masque": "Masque",
"autre": "Autre"
},
resistancePouvoir: {

View File

@@ -16,7 +16,8 @@ export const defaultItemImg = {
accessoire: "systems/fvtt-les-heritiers/assets/icons/item.webp",
protection: "systems/fvtt-les-heritiers/assets/icons/armor.webp",
fee: "systems/fvtt-les-heritiers/assets/icons/faery_type.webp",
profil: "systems/fvtt-les-heritiers/assets/icons/profil.webp"
profil: "systems/fvtt-les-heritiers/assets/icons/profil.webp",
equipement: "systems/fvtt-les-heritiers/assets/icons/equipement.webp",
}
/**

View File

@@ -44,30 +44,14 @@ export class HeritiersUtility {
/* -------------------------------------------- */
static sortByName(table) {
return table.sort(function (a, b) {
let fa = a.name.toLowerCase(),
fb = b.name.toLowerCase();
if (fa < fb) {
return -1;
}
if (fa > fb) {
return 1;
}
return 0;
return a.name.localeCompare(b.name);
})
}
/* -------------------------------------------- */
static sortArrayObjectsByName(myArray) {
myArray.sort((a, b) => {
let fa = a.name.toLowerCase();
let fb = b.name.toLowerCase();
if (fa < fb) {
return -1;
}
if (fa > fb) {
return 1;
}
return 0;
return a.name.localeCompare(b.name);
})
}
@@ -130,6 +114,7 @@ export class HeritiersUtility {
'systems/fvtt-les-heritiers/templates/partial-item-header.html',
'systems/fvtt-les-heritiers/templates/partial-item-description.html',
'systems/fvtt-les-heritiers/templates/partial-item-nav.html',
'systems/fvtt-les-heritiers/templates/partial-utile-skills.html',
'systems/fvtt-les-heritiers/templates/partial-list-niveau.html'
]
return loadTemplates(templatePaths);
@@ -358,19 +343,22 @@ export class HeritiersUtility {
rollData.nbDice = (rollData.useTricherie || rollData.useHeritage) ? 3 : 1
rollData.diceFormula = rollData.nbDice + rollData.mainDice + "kh1"
//console.log("BEFORE COMP", rollData)
let rangValue = 0
if (rollData.rang) {
rangValue = rollData.rang.value
}
if (rollData.competence) {
let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
let specBonus = (rollData.useSpecialite) ? 1 : 0
rollData.diceFormula += `+${rollData.carac.value}+${rollData.competence.system.niveau}+${specBonus}+${rollData.bonusMalusContext}+${compmod}`
rollData.diceFormula += `+${rollData.carac.value}+${rangValue}+${rollData.competence.system.niveau}+${specBonus}+${rollData.bonusMalusContext}+${compmod}`
} else if (rollData.pouvoirBase) {
rollData.diceFormula += `+${rollData.pouvoirBase.value}+${rangValue}+${rollData.bonusMalusContext}`
} else {
rollData.diceFormula += `+${rollData.carac.value}+${rollData.bonusMalusContext}`
rollData.diceFormula += `+${rollData.carac.value}+${rangValue}+${rollData.bonusMalusContext}`
}
rollData.diceFormula += `+${rollData.pvMalus}`
if (rollData.arme && rollData.arme.type == "arme") {
rollData.diceFormula += `+${rollData.arme.system.bonusmaniementoff}`
}
let myRoll = new Roll(rollData.diceFormula).roll({ async: false })
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
rollData.roll = myRoll
@@ -382,6 +370,17 @@ export class HeritiersUtility {
actor.setFlag("world", "last-initiative", rollData.finalResult)
}
// Compute damages, cf p 187
if (rollData.arme && rollData.isSuccess) {
rollData.degatsArme = rollData.arme.system.degats + rollData.marge
if (rollData.arme.system.categorie == "lourde" ) {
rollData.degatsArme += actor.system.caracteristiques.for.value
}
if (rollData.arme.system.categorie == "blanche" || rollData.arme.system.categorie == "improvise" ) {
rollData.degatsArme += Math.max(0, actor.system.caracteristiques.for.value - 2)
}
}
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-les-heritiers/templates/chat-generic-result.html`, rollData)
}, rollData)

File diff suppressed because one or more lines are too long

View File

@@ -647,7 +647,15 @@ ul, li {
margin: 4px 0;
padding-top: 7px;
}
.roll-style {
background-color: rgba(56, 32, 32, 0.4);
border-radius: 0.25rem;
padding-left: 0.25rem;
margin-right: 0.25rem;
}
.specialisarion-margin {
margin-left: 1.5rem;
}
.short-label {
flex-grow: 1;
}

View File

@@ -1,7 +1,7 @@
{
"id": "fvtt-les-heritiers",
"description": "Les Héritiers pour FoundryVTT",
"version": "10.0.20",
"version": "10.0.26",
"authors": [
{
"name": "Uberwald/LeRatierBretonnien",
@@ -19,7 +19,7 @@
"gridUnits": "m",
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/raw/branch/master/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.20.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.26.zip",
"languages": [
{
"lang": "fr",

View File

@@ -117,18 +117,22 @@
},
"rang": {
"tricherie": {
"label": "Tricherie",
"value": 0,
"max": 0
},
"feerie": {
"label": "Féerie",
"value": 0,
"max": 0
},
"masque": {
"label": "Masque",
"value": 0,
"max": 0
},
"heritage": {
"label": "Héritage",
"value": 0,
"max": 0,
"scenarios": 0

View File

@@ -14,7 +14,7 @@
{{#each system.caracteristiques as |carac key|}}
{{#if (eq kind "physical")}}
<li class="item flexrow ">
<h4 class="item-name-label competence-name"><a class="roll-carac" data-key="{{key}}">{{carac.label}}</a></h4>
<h4 class="item-name-label competence-name roll-style"><a class="roll-carac" data-key="{{key}}">{{carac.label}}</a></h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.caracteristiques.{{key}}.value" value="{{carac.value}}" data-dtype="Number" />
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
@@ -30,7 +30,7 @@
{{#each system.caracteristiques as |carac key|}}
{{#if (eq kind "mental")}}
<li class="item flexrow ">
<h4 class="item-name-label competence-name"><a class="roll-carac" data-key="{{key}}">{{carac.label}}</a></h4>
<h4 class="item-name-label competence-name roll-style"><a class="roll-carac" data-key="{{key}}">{{carac.label}}</a></h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="system.caracteristiques.{{key}}.value" value="{{carac.value}}" data-dtype="Number" />
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
@@ -78,42 +78,21 @@
<div class="flexcol">
{{#each utileSkills as |skillList keyProfil|}}
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-field-label-long">
<h3><label class="items-title-text">{{upperFirst keyProfil}}</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Niveau</label>
</span>
<div class="item-filler">&nbsp;</div>
</li>
{{#each skillList as |skill key|}}
<li class="item flexrow " data-item-id="{{skill._id}}" data-item-type="competence">
<span class="item-field-label-long"><a class="roll-competence item-field-label-short"
data-attr-key="tochoose">{{skill.name}}</a></span>
<select class="item-field-label-short edit-item-data" type="text"
data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
{{#select skill.system.niveau}}
{{> systems/fvtt-les-heritiers/templates/partial-list-niveau.html}}
{{/select}}
</select>
<div class="grid-2col">
<input type="checkbox" class="item-field-label-short" name="skill.system.predilection" {{checked skill.system.predilection}}/>
<span class="item-field-label-long2">{{skill.specList}}</span>
<div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
<div>
{{#each utileSkillsPhysical as |skillList keyProfil|}}
{{> systems/fvtt-les-heritiers/templates/partial-utile-skills.html skillList=skillList keyProfil=keyProfil}}
{{/each}}
</ul>
</div>
<div>
{{#each utileSkillsMental as |skillList keyProfil|}}
{{> systems/fvtt-les-heritiers/templates/partial-utile-skills.html skillList=skillList keyProfil=keyProfil}}
{{/each}}
</div>
</div>
{{/each}}
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
@@ -128,10 +107,10 @@
</li>
{{#each futileSkills as |skill key|}}
<li class="item flexrow " data-item-id="{{skill._id}}" data-item-type="competence">
<span class="item-field-label-long2"><a class="roll-competence item-field-label-short"
<span class="item-field-label-long2 roll-style"><a class="roll-competence item-field-label-short"
data-attr-key="tochoose">{{skill.name}}</a></span>
<select class="item-field-label-short" type="text"
<select class="item-field-label-short edit-item-data" type="text"
data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
{{#select skill.system.niveau}}
{{> systems/fvtt-les-heritiers/templates/partial-list-niveau.html}}
@@ -208,9 +187,6 @@
<span class="item-field-label-short">
<label class="short-label">Attaque</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Défense</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Dégats</label>
</span>
@@ -226,11 +202,11 @@
<span class="item-name-label competence-name">{{arme.name}}</span>
<span class="item-field-label-short">
<button class="roll-arme-offensif button-sheet-roll">Attaquer</button>
<button class="roll-attaque-arme button-sheet-roll">Attaquer</button>
</span>
<span class="item-field-label-short">
<button class="roll-arme-degats button-sheet-roll">{{arme.system.totalDegats}}</button>
{{arme.system.degats}}
</span>
<div class="item-filler">&nbsp;</div>
@@ -298,11 +274,11 @@
<div class="flexrow">
<ul>
<li class="flexrow item">
<label class="item-field-label-medium">Féerie</label>
<label class="item-field-label-medium roll-style"><a class="roll-rang item-field-label-short" data-rang-key="feerie">Féerie</a></label>
<input type="text" class="item-field-label-short" name="system.rang.feerie.value" value="{{system.rang.feerie.value}}" data-dtype="Number" />
<input type="text" class="item-field-label-short" name="system.rang.feerie.max" value="{{system.rang.feerie.max}}" data-dtype="Number" />
<span class="item-field-label-long"></span>
<label class="item-field-label-medium">Masque</label>
<label class="item-field-label-medium roll-style"><a class="roll-rang item-field-label-short" data-rang-key="masque">Masque</a></label>
<input type="text" class="item-field-label-short" name="system.rang.masque.value" value="{{system.rang.masque.value}}" data-dtype="Number" />
<input type="text" class="item-field-label-short" name="system.rang.masque.max" value="{{system.rang.masque.max}}" data-dtype="Number" />
</li>
@@ -405,7 +381,11 @@
{{#each pouvoirs as |pouvoir key|}}
<li class="item flexrow " data-item-id="{{pouvoir._id}}" data-item-type="pouvoir">
<img class="item-name-img" src="{{pouvoir.img}}" />
{{#if pouvoir.system.istest}}
<span class="item-field-label-long2 roll-style"><a class="roll-pouvoir">{{pouvoir.name}}</a></span>
{{else}}
<span class="item-field-label-long2">{{pouvoir.name}}</span>
{{/if}}
<span class="item-field-label-medium">{{upperFirst pouvoir.system.masquetype}}</span>
<span class="item-field-label-medium">{{upperFirst pouvoir.system.pouvoirtype}}</span>
<span class="item-field-label-medium">{{upperFirst pouvoir.system.niveau}}</span>
@@ -460,7 +440,8 @@
<h3><label class="items-title-text">Equipements</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="equipement" title="Créer un équipement"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each equipements as |equip key|}}
@@ -480,7 +461,20 @@
{{!-- Contact Tab --}}
<div class="tab contact" data-group="primary" data-tab="contact">
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header item-field-label-long3">
<h3><label class="items-title-text">Contacts, Allies et Ennemis</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="contact" title="Créer un contact"><i class="fas fa-plus"></i></a>
</div>
</li>
</div>
{{#each contacts as |contactList idx|}}
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
@@ -489,7 +483,8 @@
<h3><label class="items-title-text">{{contactList.label}}</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="contact" title="Créer un contact"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each contactList.list as |contact key|}}

View File

@@ -20,6 +20,10 @@
<ul>
<li class="heritiers-roll">Caractéristique : {{carac.label}} ({{carac.value}})</li>
{{#if rang}}
<li>{{rang.label}} : {{rang.value}}</li>
{{/if}}
{{#if competence}}
<li>Compétence : {{competence.name}} ({{competence.system.niveau}})</li>
{{#if useSpecialite}}
@@ -27,14 +31,26 @@
{{/if}}
{{/if}}
<li>Formule : {{diceFormula}}</li>
<li>Résultat du dé : {{diceResult}}</li>
{{#if arme}}
<li>Attaque avec : {{arme.name}}</li>
{{/if}}
{{#if pouvoir}}
<li>Pouvoir : {{pouvoir.name}}</li>
<li>Effet : {{pouvoir.system.effet}}</li>
{{/if}}
<li>Formule : {{diceFormula}}</li>
<li>Résultat du dé : {{diceResult}} </li>
<li>Total : {{finalResult}} (Marge : {{marge}})</li>
<li>Total : {{finalResult}}</li>
{{#if sdValue}}
{{#if isSuccess}}
<li class="chat-success">Succés...
{{#if arme}}
<li>Dégats : {{degatsArme}}</li>
{{/if}}
</li>
{{else}}
<li class="chat-failure">Echec...</li>
@@ -43,6 +59,9 @@
{{#if isCriticalSuccess}}
<li class="chat-success">Réussite Critique !!!</li>
{{#if arme}}
<li>Vous pouvez augmenter les dégats de +2 ou bien bénéficier d'une Aubaine.</li>
{{/if}}
{{/if}}
{{#if isCriticalFailure}}
<li class="chat-failure">Echec Critique !!!</li>

View File

@@ -0,0 +1,36 @@
<div class="sheet-box color-bg-archetype">
<ul class="item-list alternate-list">
<li class="item flexrow">
<span class="item-field-label-long">
<h3><label class="items-title-text">{{upperFirst keyProfil}}</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Niveau</label>
</span>
<div class="item-filler">&nbsp;</div>
</li>
{{#each skillList as |skill key|}}
<li class="item flexrow " data-item-id="{{skill._id}}" data-item-type="competence">
<span class="item-field-label-long roll-style"><a class="roll-competence item-field-label-short"
data-attr-key="tochoose">{{skill.name}}</a></span>
<select class="item-field-label-short edit-item-data" type="text"
data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
{{#select skill.system.niveau}}
{{> systems/fvtt-les-heritiers/templates/partial-list-niveau.html}}
{{/select}}
</select>
<input type="checkbox" class="item-field-label-short edit-item-data" data-item-field="predilection" {{checked skill.system.predilection}}/>
<div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{#if (count skill.specList)}}
<li class="item flexrow" data-item-id="{{skill._id}}" data-item-type="competence">
<span class="specialisarion-margin item-field-label-long2">{{skill.specList}}</span>
</li>
{{/if}}
{{/each}}
</ul>
</div>

View File

@@ -8,6 +8,13 @@
<div class="flexcol">
{{#if (eq mode "rang")}}
<div class="flexrow">
<span class="roll-dialog-label">{{rang.label}}</span>
<span class="roll-dialog-label">{{rang.value}}</span>
</div>
{{/if}}
{{#if (eq mode "carac")}}
<div class="flexrow">
<span class="roll-dialog-label">Caracteristique</span>
@@ -42,6 +49,23 @@
{{/if}}
{{/if}}
{{#if pouvoir}}
<div class="flexrow">
<span class="roll-dialog-label">Pouvoir : </span>
<span class="small-label roll-dialog-label">{{pouvoir.name}}</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label">Activation : </span>
<span class="small-label roll-dialog-label">{{pouvoir.system.activation}}</span>
</div>
{{#if pouvoirBase}}
<div class="flexrow">
<span class="roll-dialog-label">{{pouvoirBase.label}} : </span>
<span class="small-label roll-dialog-label">{{pouvoirBase.value}}</span>
</div>
{{/if}}
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label">Malus de Santé</span>
<span class="small-label roll-dialog-label">{{pvMalus}}</span>