Automatisations de combats, WIP
This commit is contained in:
parent
c331604393
commit
38059232cb
@ -49,9 +49,11 @@ export class HawkmoonActorSheet extends ActorSheet {
|
|||||||
combat: this.actor.getCombatValues(),
|
combat: this.actor.getCombatValues(),
|
||||||
equipements: duplicate(this.actor.getEquipments()),
|
equipements: duplicate(this.actor.getEquipments()),
|
||||||
artefacts: duplicate(this.actor.getArtefacts()),
|
artefacts: duplicate(this.actor.getArtefacts()),
|
||||||
monnaies: duplicate(this.actor.getMonnaies()),
|
|
||||||
richesse: this.actor.computeRichesse(),
|
richesse: this.actor.computeRichesse(),
|
||||||
|
coupDevastateur: this.actor.items.find(it => it.type =="talent" && it.name.toLowerCase() == "coup devastateur" && !it.system.used),
|
||||||
valeurEquipement: this.actor.computeValeurEquipement(),
|
valeurEquipement: this.actor.computeValeurEquipement(),
|
||||||
|
nbCombativite: this.actor.system.sante.nbcombativite,
|
||||||
|
combativiteList: HawkmoonUtility.getCombativiteList(this.actor.system.sante.nbcombativite),
|
||||||
initiative: this.actor.getFlag("world", "last-initiative") || -1,
|
initiative: this.actor.getFlag("world", "last-initiative") || -1,
|
||||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||||
habitat: await TextEditor.enrichHTML(this.object.system.biodata.habitat, {async: true}),
|
habitat: await TextEditor.enrichHTML(this.object.system.biodata.habitat, {async: true}),
|
||||||
|
@ -118,7 +118,7 @@ export class HawkmoonActor extends Actor {
|
|||||||
}
|
}
|
||||||
getArtefacts() {
|
getArtefacts() {
|
||||||
return this.getItemSorted(["artefact"])
|
return this.getItemSorted(["artefact"])
|
||||||
}
|
}
|
||||||
getArmors() {
|
getArmors() {
|
||||||
return this.getItemSorted(["protection"])
|
return this.getItemSorted(["protection"])
|
||||||
}
|
}
|
||||||
@ -382,10 +382,33 @@ export class HawkmoonActor extends Actor {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
changeEtatCombativite(value) {
|
||||||
|
let sante = duplicate(this.system.sante)
|
||||||
|
sante.etat += Number(value)
|
||||||
|
sante.etat = Math.max(sante.etat, 0)
|
||||||
|
sante.etat = Math.min(sante.etat, 5)
|
||||||
|
this.update({ 'system.sante': sante })
|
||||||
|
if (sante.etat == this.system.sante.nbcombativite) {
|
||||||
|
ChatMessage.create({ content: `<strong>${this.name} est vaincu !</strong>` })
|
||||||
|
}
|
||||||
|
// Gestion des états affaibli et très affaibli
|
||||||
|
if (sante.etat == this.system.sante.nbcombativite-2 || sante.etat == this.system.sante.nbcombativite-1) {
|
||||||
|
if (sante.etat == this.system.sante.nbcombativite-2 && this.items.find(item => item.type == "talent" && item.name.toLowerCase() == "encaissement")) {
|
||||||
|
ChatMessage.create({ content: `<strong>${this.name} ne subit pas les 2 adversités rouge grâce à Encaissement. Pensez à les ajouter à la fin de la scène !</strong>` })
|
||||||
|
} else if (sante.etat == this.system.sante.nbcombativite-1 && this.items.find(item => item.type == "talent" && item.name.toLowerCase().includes("vaillant"))) {
|
||||||
|
ChatMessage.create({ content: `<strong>${this.name} ne subit pas les 2 adversités rouge grâce à Vaillant. Pensez à les ajouter à la fin de la scène !</strong>` })
|
||||||
|
} else {
|
||||||
|
ChatMessage.create({ content: `<strong>${this.name} subit 2 adversités rouge !</strong>` })
|
||||||
|
this.incDecAdversite("rouge", 2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
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.data) {
|
if (item?.system?.data) {
|
||||||
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
|
||||||
}
|
}
|
||||||
@ -434,7 +457,7 @@ export class HawkmoonActor extends Actor {
|
|||||||
if (objetQ) {
|
if (objetQ) {
|
||||||
let newQ = objetQ.system.quantite + incDec
|
let newQ = objetQ.system.quantite + incDec
|
||||||
newQ = Math.max(newQ, 0)
|
newQ = Math.max(newQ, 0)
|
||||||
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'system.quantite': newQ }]); // pdates one EmbeddedEntity
|
await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'system.quantite': newQ }]); // pdates one EmbeddedEntity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -538,6 +561,8 @@ export class HawkmoonActor extends Actor {
|
|||||||
rollData.nbBA = this.system.bonneaventure.actuelle
|
rollData.nbBA = this.system.bonneaventure.actuelle
|
||||||
rollData.nbAdversites = this.getTotalAdversite()
|
rollData.nbAdversites = this.getTotalAdversite()
|
||||||
rollData.talents = []
|
rollData.talents = []
|
||||||
|
rollData.attrKey2 = "none"
|
||||||
|
rollData.coupDevastateur = this.items.find(it => it.type =="talent" && it.name.toLowerCase() == "coup dévastateur" && !it.system.used)
|
||||||
|
|
||||||
if (attrKey) {
|
if (attrKey) {
|
||||||
rollData.attrKey = attrKey
|
rollData.attrKey = attrKey
|
||||||
@ -597,31 +622,42 @@ export class HawkmoonActor extends Actor {
|
|||||||
if (arme.type == "arme") {
|
if (arme.type == "arme") {
|
||||||
arme = this.prepareArme(arme)
|
arme = this.prepareArme(arme)
|
||||||
}
|
}
|
||||||
console.log("DEGATS", arme)
|
console.log("DEGATS", arme, targetVigueur, rollDataInput)
|
||||||
let roll
|
let roll
|
||||||
let bonus = 0
|
let bonus = 0
|
||||||
|
let bonus2 = 0
|
||||||
|
|
||||||
|
if (rollDataInput?.applyCoupDevastateur) {
|
||||||
|
bonus2 = Math.floor(this.system.attributs.pui.value / 2)
|
||||||
|
let talent = this.items.find(item => item.type == "talent" && item.name.toLowerCase() == "coup dévastateur")
|
||||||
|
this.updateEmbeddedDocuments('Item', [{ _id: talent.id, 'system.used': true }])
|
||||||
|
}
|
||||||
|
|
||||||
if (rollDataInput?.isHeroique) {
|
if (rollDataInput?.isHeroique) {
|
||||||
if (rollDataInput?.attaqueCharge) {
|
if (rollDataInput?.attaqueCharge) {
|
||||||
bonus = 5
|
bonus = 5
|
||||||
}
|
}
|
||||||
roll = new Roll("2d10rr10+" + arme.system.totalDegats + "+" + bonus).roll({ async: false })
|
roll = new Roll("2d10rr10+" + arme.system.totalDegats + "+" + bonus + "+" + bonus2).roll({ async: false })
|
||||||
} else {
|
} else {
|
||||||
if (rollDataInput?.attaqueCharge) {
|
if (rollDataInput?.attaqueCharge) {
|
||||||
bonus = 3
|
bonus = 3
|
||||||
}
|
}
|
||||||
roll = new Roll("1d10+" + arme.system.totalDegats + "+" + bonus).roll({ async: false })
|
roll = new Roll("1d10+" + arme.system.totalDegats + "+" + bonus + "+" + bonus2).roll({ async: false })
|
||||||
}
|
}
|
||||||
await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"));
|
await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"));
|
||||||
let nbEtatPerdus = 0
|
let nbEtatPerdus = 0
|
||||||
if (targetVigueur) {
|
if (targetVigueur) {
|
||||||
nbEtatPerdus = Math.floor(roll.total / targetVigueur)
|
nbEtatPerdus = Math.floor(roll.total / targetVigueur)
|
||||||
}
|
}
|
||||||
|
console.log(roll)
|
||||||
let rollData = {
|
let rollData = {
|
||||||
arme: arme,
|
arme: arme,
|
||||||
finalResult: roll.total,
|
finalResult: roll.total,
|
||||||
|
formula: roll.formula,
|
||||||
alias: this.name,
|
alias: this.name,
|
||||||
actorImg: this.img,
|
actorImg: this.img,
|
||||||
actorId: this.id,
|
actorId: this.id,
|
||||||
|
defenderTokenId: rollDataInput?.defenderTokenId,
|
||||||
actionImg: arme.img,
|
actionImg: arme.img,
|
||||||
targetVigueur: targetVigueur,
|
targetVigueur: targetVigueur,
|
||||||
nbEtatPerdus: nbEtatPerdus
|
nbEtatPerdus: nbEtatPerdus
|
||||||
@ -630,5 +666,9 @@ export class HawkmoonActor extends Actor {
|
|||||||
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-degats-result.html`, rollData)
|
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-degats-result.html`, rollData)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (rollDataInput?.defenderTokenId && nbEtatPerdus) {
|
||||||
|
HawkmoonUtility.applyCombativite(rollDataInput, nbEtatPerdus)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,9 @@ export class HawkmoonRollDialog extends Dialog {
|
|||||||
html.find('#attrKey').change(async (event) => {
|
html.find('#attrKey').change(async (event) => {
|
||||||
this.rollData.attrKey = String(event.currentTarget.value)
|
this.rollData.attrKey = String(event.currentTarget.value)
|
||||||
})
|
})
|
||||||
|
html.find('#attrKey2').change(async (event) => {
|
||||||
|
this.rollData.attrKey2 = String(event.currentTarget.value)
|
||||||
|
})
|
||||||
html.find('#select-maitrise').change(async (event) => {
|
html.find('#select-maitrise').change(async (event) => {
|
||||||
this.rollData.maitriseId = String(event.currentTarget.value)
|
this.rollData.maitriseId = String(event.currentTarget.value)
|
||||||
})
|
})
|
||||||
|
@ -153,6 +153,15 @@ export class HawkmoonUtility {
|
|||||||
let actor = this.getActorFromRollData(rollData)
|
let actor = this.getActorFromRollData(rollData)
|
||||||
actor.rollArmeDegats(rollData.arme._id, rollData.targetVigueur, rollData)
|
actor.rollArmeDegats(rollData.arme._id, rollData.targetVigueur, rollData)
|
||||||
})
|
})
|
||||||
|
html.on("click", '.roll-chat-degat-devastateur', async event => {
|
||||||
|
let messageId = HawkmoonUtility.findChatMessageId(event.currentTarget)
|
||||||
|
let message = game.messages.get(messageId)
|
||||||
|
let rollData = message.getFlag("world", "hawkmoon-roll")
|
||||||
|
let actor = this.getActorFromRollData(rollData)
|
||||||
|
rollData.applyCoupDevastateur = true
|
||||||
|
actor.rollArmeDegats(rollData.arme._id, rollData.targetVigueur, rollData)
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -250,27 +259,12 @@ export class HawkmoonUtility {
|
|||||||
let newRollData = mergeObject(oldRollData, rollData);
|
let newRollData = mergeObject(oldRollData, rollData);
|
||||||
this.rollDataStore[id] = newRollData;
|
this.rollDataStore[id] = newRollData;
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
|
||||||
static saveRollData(rollData) {
|
|
||||||
game.socket.emit("system.fvtt-hawkmoon-cyd", {
|
|
||||||
name: "msg_update_roll", data: rollData
|
|
||||||
}); // Notify all other clients of the roll
|
|
||||||
this.updateRollData(rollData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
static getRollData(id) {
|
|
||||||
return this.rollDataStore[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static onSocketMesssage(msg) {
|
static onSocketMesssage(msg) {
|
||||||
//console.log("SOCKET MESSAGE", msg.name, game.user.character.id, msg.data.defenderId);
|
if (msg.name == "msg_apply_combativite") {
|
||||||
if (msg.name == "msg_update_defense_state") {
|
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||||
this.updateDefenseState(msg.data.defenderId, msg.data.rollId);
|
defender.changeEtatCombativite(msg.data.value)
|
||||||
}
|
|
||||||
if (msg.name == "msg_update_roll") {
|
|
||||||
this.updateRollData(msg.data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,7 +346,15 @@ export class HawkmoonUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static applyCombativite(rollData, value) {
|
||||||
|
if (game.user.isGM) {
|
||||||
|
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
|
||||||
|
defender.changeEtatCombativite(value)
|
||||||
|
} else {
|
||||||
|
game.socket.emit("system.fvtt-hawkmoon-cyd", { msg: "msg_apply_combativite", data: { defenderTokenId: rollData.defenderTokenId, value } });
|
||||||
|
}
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async rollHawkmoon(rollData) {
|
static async rollHawkmoon(rollData) {
|
||||||
|
|
||||||
@ -364,6 +366,9 @@ export class HawkmoonUtility {
|
|||||||
rollData.actionImg = "systems/fvtt-hawkmoon-cyd/assets/icons/" + actor.system.attributs[rollData.attrKey].labelnorm + ".webp"
|
rollData.actionImg = "systems/fvtt-hawkmoon-cyd/assets/icons/" + actor.system.attributs[rollData.attrKey].labelnorm + ".webp"
|
||||||
rollData.attr = duplicate(actor.system.attributs[rollData.attrKey])
|
rollData.attr = duplicate(actor.system.attributs[rollData.attrKey])
|
||||||
}
|
}
|
||||||
|
if (rollData.attrKey2 != "none") {
|
||||||
|
rollData.attr2 = duplicate(actor.system.attributs[rollData.attrKey2])
|
||||||
|
}
|
||||||
|
|
||||||
if (rollData.maitriseId != "none") {
|
if (rollData.maitriseId != "none") {
|
||||||
rollData.selectedMaitrise = rollData.maitrises.find(p => p.id == rollData.maitriseId)
|
rollData.selectedMaitrise = rollData.maitrises.find(p => p.id == rollData.maitriseId)
|
||||||
@ -377,7 +382,7 @@ export class HawkmoonUtility {
|
|||||||
rollData.predilections = duplicate(rollData.competence.system.predilections || [])
|
rollData.predilections = duplicate(rollData.competence.system.predilections || [])
|
||||||
let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
|
let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
|
||||||
rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.system.niveau}+${rollData.modificateur}+${compmod}`
|
rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.system.niveau}+${rollData.modificateur}+${compmod}`
|
||||||
|
|
||||||
if (rollData.selectedTalents && rollData.selectedTalents.length > 0) {
|
if (rollData.selectedTalents && rollData.selectedTalents.length > 0) {
|
||||||
for (let id of rollData.selectedTalents) {
|
for (let id of rollData.selectedTalents) {
|
||||||
let talent = rollData.talents.find(t => t._id == id)
|
let talent = rollData.talents.find(t => t._id == id)
|
||||||
@ -396,9 +401,12 @@ export class HawkmoonUtility {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
rollData.diceFormula += `+${rollData.bonusMalusContext}`
|
rollData.diceFormula += `+${rollData.bonusMalusContext}`
|
||||||
|
} else if (rollData.attr2) {
|
||||||
|
rollData.diceFormula += `+${rollData.attr.value}+${rollData.attr2.value}+${rollData.modificateur}+${rollData.bonusMalusContext}`
|
||||||
} else {
|
} else {
|
||||||
rollData.diceFormula += `+${rollData.attr.value}*${rollData.multiplier}+${rollData.modificateur}+${rollData.bonusMalusContext}`
|
rollData.diceFormula += `+${rollData.attr.value}*${rollData.multiplier}+${rollData.modificateur}+${rollData.bonusMalusContext}`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bonus arme naturelle en défense
|
// Bonus arme naturelle en défense
|
||||||
if (rollData.bonusArmeNaturelle) {
|
if (rollData.bonusArmeNaturelle) {
|
||||||
rollData.diceFormula += `+${rollData.bonusArmeNaturelle}`
|
rollData.diceFormula += `+${rollData.bonusArmeNaturelle}`
|
||||||
@ -453,8 +461,24 @@ export class HawkmoonUtility {
|
|||||||
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-generic-result.html`, rollData)
|
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-generic-result.html`, rollData)
|
||||||
}, rollData)
|
}, rollData)
|
||||||
|
|
||||||
|
if (rollData.arme && rollData.isSuccess && rollData.defenderTokenId) {
|
||||||
|
this.applyCombativite(rollData, 1)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static getCombativiteList(nbActivite) {
|
||||||
|
let list = [ { value: 0, label: "Combatif"}]
|
||||||
|
for (let i = 1; i < nbActivite-2; i++) {
|
||||||
|
list.push({ value: i, label:"Eprouvé " + i} )
|
||||||
|
}
|
||||||
|
list[nbActivite-2] = { value: nbActivite-2, label:"Affaibli"}
|
||||||
|
list[nbActivite-1] = { value: nbActivite-1, label:"Très Affaibli"}
|
||||||
|
list[nbActivite] = { value: nbActivite, label:"Vaincu"}
|
||||||
|
return list
|
||||||
|
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async bonusRollHawkmoon(rollData) {
|
static async bonusRollHawkmoon(rollData) {
|
||||||
rollData.bonusFormula = rollData.addedBonus
|
rollData.bonusFormula = rollData.addedBonus
|
||||||
|
@ -1374,6 +1374,12 @@ ul, li {
|
|||||||
max-width: 8rem;
|
max-width: 8rem;
|
||||||
min-width: 8rem;
|
min-width: 8rem;
|
||||||
}
|
}
|
||||||
|
.item-field-label-long1 {
|
||||||
|
padding-top: 6px;
|
||||||
|
flex-grow:1;
|
||||||
|
max-width: 12rem;
|
||||||
|
min-width: 12rem;
|
||||||
|
}
|
||||||
.item-field-label-long2 {
|
.item-field-label-long2 {
|
||||||
padding-top: 6px;
|
padding-top: 6px;
|
||||||
flex-grow:1;
|
flex-grow:1;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "fvtt-hawkmoon-cyd",
|
"id": "fvtt-hawkmoon-cyd",
|
||||||
"description": "Hawkmoon RPG for FoundryVTT (CYD system - French)",
|
"description": "Hawkmoon RPG for FoundryVTT (CYD system - French)",
|
||||||
"version": "11.0.9",
|
"version": "11.1.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Uberwald/LeRatierBretonnien",
|
"name": "Uberwald/LeRatierBretonnien",
|
||||||
@ -35,7 +35,7 @@
|
|||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-11.0.9.zip",
|
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-11.1.0.zip",
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
"lang": "fr",
|
"lang": "fr",
|
||||||
@ -188,7 +188,7 @@
|
|||||||
"url": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd",
|
||||||
"background": "systems/fvtt-hawkmoon-cyd/assets/ui/fond_hawkmoon.webp",
|
"background": "systems/fvtt-hawkmoon-cyd/assets/ui/fond_hawkmoon.webp",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "11",
|
"minimum": "10",
|
||||||
"verified": "11"
|
"verified": "11"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -70,7 +70,8 @@
|
|||||||
"sante": {
|
"sante": {
|
||||||
"vigueur": 0,
|
"vigueur": 0,
|
||||||
"etat": 0,
|
"etat": 0,
|
||||||
"vigueurmodifier": 0
|
"vigueurmodifier": 0,
|
||||||
|
"nbcombativite": 5
|
||||||
},
|
},
|
||||||
"adversite": {
|
"adversite": {
|
||||||
"bleue": 0,
|
"bleue": 0,
|
||||||
|
@ -38,7 +38,9 @@
|
|||||||
<select class="status-small-label color-class-common item-field-label-medium" type="text" name="system.sante.etat"
|
<select class="status-small-label color-class-common item-field-label-medium" type="text" name="system.sante.etat"
|
||||||
value="{{system.sante.etat}}" data-dtype="Number">
|
value="{{system.sante.etat}}" data-dtype="Number">
|
||||||
{{#select system.sante.etat}}
|
{{#select system.sante.etat}}
|
||||||
{{> systems/fvtt-hawkmoon-cyd/templates/partial-sante-etat.html}}
|
{{#each combativiteList as |combativite idx|}}*
|
||||||
|
<option value="{{idx}}">{{combativite.label}}</option>
|
||||||
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
|
@ -19,10 +19,11 @@
|
|||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Arme : {{arme.name}} (+{{arme.system.totalDegats}})</li>
|
<li>Arme : {{arme.name}} (+{{arme.system.totalDegats}})</li>
|
||||||
|
<li>Formule : {{formula}}</li>
|
||||||
<li>Dégats : {{finalResult}}</li>
|
<li>Dégats : {{finalResult}}</li>
|
||||||
{{#if targetVigueur}}
|
{{#if targetVigueur}}
|
||||||
<li>Vigueur de la cible : {{targetVigueur}}</li>
|
<li>Vigueur de la cible : {{targetVigueur}}</li>
|
||||||
<li>Etats Combativité supplémentaires perdus (manuel): {{nbEtatPerdus}} </li>
|
<li>Etats de Combativité supplémentaires perdus (auto): {{nbEtatPerdus}} </li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="hawkmoon-roll">Attribut : {{attr.label}} ({{attr.value}})</li>
|
<li class="hawkmoon-roll">Attribut : {{attr.label}} ({{attr.value}})</li>
|
||||||
|
{{#if attr2}}
|
||||||
|
<li>Attribut : {{attr2.label}} ({{attr2.value}})</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if competence}}
|
{{#if competence}}
|
||||||
<li>Compétence : {{competence.name}} ({{competence.system.niveau}})</li>
|
<li>Compétence : {{competence.name}} ({{competence.system.niveau}})</li>
|
||||||
@ -76,9 +79,12 @@
|
|||||||
|
|
||||||
{{#if isSuccess}}
|
{{#if isSuccess}}
|
||||||
{{#if arme}}
|
{{#if arme}}
|
||||||
<li>Votre adversaire perd 1 Etat de Combativité (manuel) </li>
|
<li>Votre adversaire a perdu 1 Etat de Combativité (auto)</li>
|
||||||
{{#if (not arme.system.onlevelonly)}}
|
{{#if (not arme.system.onlevelonly)}}
|
||||||
<button class="chat-card-button roll-chat-degat">Dégats de l'arme</button>
|
<button class="chat-card-button roll-chat-degat">Dégats de l'arme</button>
|
||||||
|
{{#if coupDevastateur}}
|
||||||
|
<button class="chat-card-button roll-chat-degat-devastateur">Dégats de l'arme avec Coup Dévastateur</button>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -58,20 +58,24 @@
|
|||||||
<img class="item-name-img" src="systems/fvtt-hawkmoon-cyd/assets/icons/vitesse.webp">
|
<img class="item-name-img" src="systems/fvtt-hawkmoon-cyd/assets/icons/vitesse.webp">
|
||||||
<span class="item-name-label competence-name item-field-label-medium">Vitesse</span>
|
<span class="item-name-label competence-name item-field-label-medium">Vitesse</span>
|
||||||
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.vitesse.value"
|
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.vitesse.value"
|
||||||
value="{{system.vitesse.value}}" data-dtype="Number" />
|
value="{{system.vitesse.value}}" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4 class="item-name-label competence-name">Santé</h4>
|
<h4 class="item-name-label competence-name">Santé</h4>
|
||||||
<ul class="item-list alternate-list">
|
<ul class="item-list alternate-list">
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<label class="label-name item-field-label-short">Vigueur</label>
|
<label class="label-name item-field-label-medium">Vigueur</label>
|
||||||
<input type="text" class="padd-right numeric-input item-field-label-short" data-dtype="Number" name="system.sante.vigueur" value="{{system.sante.vigueur}}" >
|
<input type="text" class="padd-right numeric-input item-field-label-short" data-dtype="Number"
|
||||||
|
name="system.sante.vigueur" value="{{system.sante.vigueur}}">
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<label class="label-name item-field-label-short">Etat</label>
|
<label class="label-name item-field-label-medium">Etat</label>
|
||||||
<select class="label-name item-field-label-medium" type="text" name="system.sante.etat" value="{{system.sante.etat}}" data-dtype="Number">
|
<select class="label-name item-field-label-medium" type="text" name="system.sante.etat"
|
||||||
|
value="{{system.sante.etat}}" data-dtype="Number">
|
||||||
{{#select system.sante.etat}}
|
{{#select system.sante.etat}}
|
||||||
{{> systems/fvtt-hawkmoon-cyd/templates/partial-sante-etat.html}}
|
{{#each combativiteList as |combativite idx|}}
|
||||||
|
<option value="{{idx}}">{{combativite.label}}</option>
|
||||||
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
@ -103,6 +107,13 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul class="item-list alternate-list">
|
||||||
|
<li class="item flexrow">
|
||||||
|
<label class="label-name item-field-label-long1">Niveaux de combativité</label>
|
||||||
|
<input type="text" class="padd-right numeric-input item-field-label-short" data-dtype="Number"
|
||||||
|
name="system.sante.nbcombativite" value="{{system.sante.nbcombativite}}">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -135,21 +146,21 @@
|
|||||||
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
|
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
|
||||||
data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
|
data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
|
||||||
{{#select skill.system.niveau}}
|
{{#select skill.system.niveau}}
|
||||||
{{> systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html}}
|
{{> systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
{{#if (ne skill.system.attribut1 "none")}}
|
{{#if (ne skill.system.attribut1 "none")}}
|
||||||
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut1}}">{{upper
|
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut1}}">{{upper
|
||||||
skill.system.attribut1}} : {{skill.system.attribut1total}}</button>
|
skill.system.attribut1}} : {{skill.system.attribut1total}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (ne skill.system.attribut2 "none")}}
|
{{#if (ne skill.system.attribut2 "none")}}
|
||||||
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut2}}">{{upper
|
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut2}}">{{upper
|
||||||
skill.system.attribut2}} : {{skill.system.attribut2total}}</button>
|
skill.system.attribut2}} : {{skill.system.attribut2total}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (ne skill.system.attribut3 "none")}}
|
{{#if (ne skill.system.attribut3 "none")}}
|
||||||
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut3}}">{{upper
|
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut3}}">{{upper
|
||||||
skill.system.attribut3}} : {{skill.system.attribut3total}}</button>
|
skill.system.attribut3}} : {{skill.system.attribut3total}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="item-filler"> </div>
|
<div class="item-filler"> </div>
|
||||||
@ -187,7 +198,7 @@
|
|||||||
<img class="item-name-img" src="{{talent.img}}" />
|
<img class="item-name-img" src="{{talent.img}}" />
|
||||||
<span class="item-name-label competence-name">{{talent.name}}</span>
|
<span class="item-name-label competence-name">{{talent.name}}</span>
|
||||||
<span class="item-name-label item-field-label-long2">{{talent.system.resumebonus}}</span>
|
<span class="item-name-label item-field-label-long2">{{talent.system.resumebonus}}</span>
|
||||||
|
|
||||||
<div class="item-filler"> </div>
|
<div class="item-filler"> </div>
|
||||||
<div class="item-controls item-controls-fixed">
|
<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-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||||
@ -269,10 +280,10 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
{{#if arme.system.isdefense}}
|
{{#if arme.system.isdefense}}
|
||||||
<span class="item-field-label-short arme-defensif item-field-label-short"><label
|
<span class="item-field-label-short arme-defensif item-field-label-short"><label
|
||||||
class="arme-defensif item-field-label-short defense-sheet">{{arme.system.totalDefensif}}</label></span>
|
class="arme-defensif item-field-label-short defense-sheet">{{arme.system.totalDefensif}}</label></span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="item-field-label-short arme-defensif item-field-label-short"><label
|
<span class="item-field-label-short arme-defensif item-field-label-short"><label
|
||||||
class="arme-defensif item-field-label-short defense-sheet">N/A</label></span>
|
class="arme-defensif item-field-label-short defense-sheet">N/A</label></span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -49,6 +49,18 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Second Attribut</span>
|
||||||
|
<select class="status-small-label color-class-common" id ="attrKey2" type="text" name="attrKey2" value="attrKey2" data-dtype="string" >
|
||||||
|
{{#select attrKey2}}
|
||||||
|
<option value="none">Aucun</option>
|
||||||
|
{{#each attributs as |attrLabel attrKey|}}
|
||||||
|
<option value="{{attrKey}}">{{attrLabel}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if (count talents)}}
|
{{#if (count talents)}}
|
||||||
|
Loading…
Reference in New Issue
Block a user