Compare commits

...

16 Commits

19 changed files with 592 additions and 216 deletions

15
.gitignore vendored
View File

@ -1 +1,14 @@
.history/
.vscode/settings.json
.idea
.history
todo.md
/.vscode
/ignored/
/node_modules/
/jsconfig.json
/package.json
/package-lock.json
/packs/*/
/packs/*/CURRENT
/packs/*/LOG
/packs/*/LOCK

View File

@ -1,25 +1,25 @@
{
"ACTOR": {
"TypePersonnage": "Personnage",
"TypeCellule": "Cellule",
"TypeCreature": "Créature"
"TYPES": {
"Actor": {
"personnage": "Personnage",
"cellule": "Cellule",
"creature": "Créature"
},
"Item": {
"artefact": "Artefact",
"arme": "Arme",
"talent": "Talent",
"historique": "Historique",
"profil": "Profil",
"competence": "Compétence",
"protection": "Protection",
"monnaie": "Monnaie",
"equipement": "Equipement",
"ressource": "Ressource",
"contact": "Contact"
}
},
"ITEM": {
"TypeArtefact": "Artefact",
"TypeArme": "Arme",
"TypeTalent": "Talent",
"TypeHistorique": "Historique",
"TypeProfil": "Profil",
"TypeCompetence": "Compétence",
"TypeProtection": "Protection",
"TypeMonnaie": "Monnaie",
"TypeEquipement": "Equipement",
"TypeRessource": "Ressource",
"TypeContact": "Contact"
},
"HAWKMOON": {
"ui": {
"editContact": "Modifier le contact",

View File

@ -49,9 +49,11 @@ export class HawkmoonActorSheet extends ActorSheet {
combat: this.actor.getCombatValues(),
equipements: duplicate(this.actor.getEquipments()),
artefacts: duplicate(this.actor.getArtefacts()),
monnaies: duplicate(this.actor.getMonnaies()),
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(),
nbCombativite: this.actor.system.sante.nbcombativite,
combativiteList: HawkmoonUtility.getCombativiteList(this.actor.system.sante.nbcombativite),
initiative: this.actor.getFlag("world", "last-initiative") || -1,
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
habitat: await TextEditor.enrichHTML(this.object.system.biodata.habitat, {async: true}),
@ -124,7 +126,7 @@ export class HawkmoonActorSheet extends ActorSheet {
})
html.find('.roll-initiative').click((event) => {
this.actor.rollAttribut("pre", true)
this.actor.rollAttribut("adr", true)
})
html.find('.roll-attribut').click((event) => {

View File

@ -76,13 +76,18 @@ export class HawkmoonActor extends Actor {
arme.system.totalDegats = arme.system.degats + "+" + combat.bonusDegatsTotal
arme.system.totalOffensif = this.system.attributs.pui.value + arme.system.competence.system.niveau + arme.system.bonusmaniementoff
arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.seuildefense + bonusDefense
console.log("Arme", arme.system.totalDefensif, combat, arme.system.competence.system.niveau, arme.system.seuildefense, bonusDefense)
arme.system.isdefense = true
arme.system.isMelee = true
arme.system.isDistance = false
}
if (arme.system.typearme == "jet" || arme.system.typearme == "tir") {
arme.system.competence = duplicate(this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "armes à distance"))
arme.system.attrKey = "adr"
arme.system.totalOffensif = this.system.attributs.adr.value + arme.system.competence.system.niveau + arme.system.bonusmaniementoff
arme.system.totalDegats = arme.system.degats
arme.system.isMelee = false
arme.system.isDistance = true
if (arme.system.isdefense) {
arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.seuildefense
}
@ -114,7 +119,7 @@ export class HawkmoonActor extends Actor {
}
getArtefacts() {
return this.getItemSorted(["artefact"])
}
}
getArmors() {
return this.getItemSorted(["protection"])
}
@ -171,7 +176,7 @@ export class HawkmoonActor extends Actor {
/* -------------------------------------------- */
getDefenseBase() {
return Math.max(this.system.attributs.tre.value, this.system.attributs.pui.value)
return Math.max(this.system.attributs.tre.value, this.system.attributs.adr.value)
}
/* -------------------------------------------- */
@ -181,7 +186,7 @@ export class HawkmoonActor extends Actor {
/* -------------------------------------------- */
getProtection() {
let equipProtection = 0
for (let armor in this.items) {
for (let armor of this.items) {
if (armor.type == "protection" && armor.system.equipped) {
equipProtection += Number(armor.system.protection)
}
@ -222,7 +227,7 @@ export class HawkmoonActor extends Actor {
if (this.type == 'personnage') {
let talentBonus = this.getVigueurBonus()
let vigueur = Math.floor((this.system.attributs.pui.value + this.system.attributs.tre.value) / 2) + talentBonus
let vigueur = Math.floor((this.system.attributs.pui.value + this.system.attributs.tre.value) / 2) + talentBonus + this.system.sante.vigueurmodifier
if (vigueur != this.system.sante.vigueur) {
this.update({ 'system.sante.vigueur': vigueur })
}
@ -378,10 +383,33 @@ export class HawkmoonActor extends Actor {
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) {
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 };
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
}
@ -430,7 +458,7 @@ export class HawkmoonActor extends Actor {
if (objetQ) {
let newQ = objetQ.system.quantite + incDec
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
}
}
@ -534,6 +562,8 @@ export class HawkmoonActor extends Actor {
rollData.nbBA = this.system.bonneaventure.actuelle
rollData.nbAdversites = this.getTotalAdversite()
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) {
rollData.attrKey = attrKey
@ -588,24 +618,47 @@ export class HawkmoonActor extends Actor {
}
/* -------------------------------------------- */
async rollArmeDegats(armeId, targetVigueur = undefined) {
async rollArmeDegats(armeId, targetVigueur = undefined, rollDataInput = undefined) {
let arme = this.items.get(armeId)
if (arme.type == "arme") {
arme = this.prepareArme(arme)
}
console.log("DEGATS", arme)
let roll = new Roll("1d10+" + arme.system.totalDegats).roll({ async: false })
console.log("DEGATS", arme, targetVigueur, rollDataInput)
let roll
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?.attaqueCharge) {
bonus = 5
}
roll = new Roll("2d10rr10+" + arme.system.totalDegats + "+" + bonus + "+" + bonus2).roll({ async: false })
} else {
if (rollDataInput?.attaqueCharge) {
bonus = 3
}
roll = new Roll("1d10+" + arme.system.totalDegats + "+" + bonus + "+" + bonus2).roll({ async: false })
}
await HawkmoonUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"));
let nbEtatPerdus = 0
if (targetVigueur) {
nbEtatPerdus = Math.floor(roll.total / targetVigueur)
}
console.log(roll)
let rollData = {
arme: arme,
finalResult: roll.total,
formula: roll.formula,
alias: this.name,
actorImg: this.img,
actorId: this.id,
defenderTokenId: rollDataInput?.defenderTokenId,
actionImg: arme.img,
targetVigueur: targetVigueur,
nbEtatPerdus: nbEtatPerdus
@ -614,5 +667,9 @@ export class HawkmoonActor extends Actor {
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-degats-result.html`, rollData)
})
if (rollDataInput?.defenderTokenId && nbEtatPerdus) {
HawkmoonUtility.applyCombativite(rollDataInput, nbEtatPerdus)
}
}
}

View File

@ -185,7 +185,7 @@ export class HawkmoonItemSheet extends ItemSheet {
html.find('#add-automation').click(ev => {
let autom = duplicate(this.object.system.automations)
autom.push( { eventtype: "on-drop", name: "Automatisation 1", competence: "", minLevel: 0, id: randomID(16) })
autom.push( { eventtype: "on-drop", name: "Automatisation 1", bonusname: "vigueur", bonus: 0, competence: "", minLevel: 0, baCost: 0, id: randomID(16) })
this.object.update( { 'system.automations': autom })
})
html.find('.delete-automation').click(ev => {

View File

@ -18,6 +18,7 @@ import { HawkmoonCombat } from "./hawkmoon-combat.js";
import { HawkmoonItem } from "./hawkmoon-item.js";
import { HawkmoonAutomation } from "./hawkmoon-automation.js";
import { HawkmoonTokenHud } from "./hawkmoon-hud.js";
import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js"
/* -------------------------------------------- */
/* Foundry VTT Initialization */
@ -82,32 +83,6 @@ function welcomeMessage() {
` });
}
/* -------------------------------------------- */
// Register world usage statistics
function registerUsageCount(registerKey) {
if (game.user.isGM) {
game.settings.register(registerKey, "world-key", {
name: "Unique world key",
scope: "world",
config: false,
default: "",
type: String
});
let worldKey = game.settings.get(registerKey, "world-key")
if (worldKey == undefined || worldKey == "") {
worldKey = randomID(32)
game.settings.set(registerKey, "world-key", worldKey)
}
// Simple API counter
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"`
//$.ajaxSetup({
//headers: { 'Access-Control-Allow-Origin': '*' }
//})
$.ajax(regURL)
}
}
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
@ -124,14 +99,9 @@ Hooks.once("ready", function () {
});
}
registerUsageCount('fvtt-hawkmoon-cyd')
ClassCounter.registerUsageCount();
welcomeMessage()
// CSS patch for v9
if (game.version) {
let sidebar = document.getElementById("sidebar");
sidebar.style.width = "min-content";
}
});
/* -------------------------------------------- */

View File

@ -66,15 +66,52 @@ export class HawkmoonRollDialog extends Dialog {
html.find('#attrKey').change(async (event) => {
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) => {
this.rollData.maitriseId = String(event.currentTarget.value)
})
html.find('#competence-talents').change((event) => {
this.rollData.selectedTalents = $('#competence-talents').val()
})
html.find('#taille-cible').change((event) => {
this.rollData.tailleCible = String(event.currentTarget.value)
})
html.find('#tireur-deplacement').change((event) => {
this.rollData.tireurDeplacement = String(event.currentTarget.value)
})
html.find('#cible-couvert').change((event) => {
this.rollData.cibleCouvert = String(event.currentTarget.value)
})
html.find('#distance-tir').change((event) => {
this.rollData.distanceTir = String(event.currentTarget.value)
})
html.find('#bonus-malus-context').change((event) => {
this.rollData.bonusMalusContext = Number(event.currentTarget.value)
})
html.find('#defenseur-au-sol').change((event) => {
this.rollData.defenseurAuSol = event.currentTarget.checked
})
html.find('#defenseur-aveugle').change((event) => {
this.rollData.defenseurAveugle = event.currentTarget.checked
})
html.find('#defenseur-de-dos').change((event) => {
this.rollData.defenseurDeDos = event.currentTarget.checked
})
html.find('#defenseur-restreint').change((event) => {
this.rollData.defenseurRestreint = event.currentTarget.checked
})
html.find('#defenseur-immobilise').change((event) => {
this.rollData.defenseurImmobilise = event.currentTarget.checked
})
html.find('#attaque-charge').change((event) => {
this.rollData.attaqueCharge = event.currentTarget.checked
})
html.find('#attaque-desarme').change((event) => {
this.rollData.attaqueDesarme = event.currentTarget.checked
})
}
}

View File

@ -2,6 +2,12 @@
import { HawkmoonCombat } from "./hawkmoon-combat.js";
import { HawkmoonCommands } from "./hawkmoon-commands.js";
/* -------------------------------------------- */
const __distanceDifficulte = { "porteecourte": 5, "porteemoyenne": 9, "porteelongue": 14}
const __tireurDeplacement = { immobile: 0, lent: 3, rapide: 5}
const __cibleCouvert = { aucun: 0, leger: 5, complet: 10}
const __tailleCible = { normal: 0, main: 10, enfant: 3, maison: -10}
/* -------------------------------------------- */
export class HawkmoonUtility {
@ -145,8 +151,17 @@ export class HawkmoonUtility {
let message = game.messages.get(messageId)
let rollData = message.getFlag("world", "hawkmoon-roll")
let actor = this.getActorFromRollData(rollData)
actor.rollArmeDegats(rollData.arme._id, rollData.targetVigueur)
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)
})
}
/* -------------------------------------------- */
@ -244,27 +259,12 @@ export class HawkmoonUtility {
let newRollData = mergeObject(oldRollData, rollData);
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) {
//console.log("SOCKET MESSAGE", msg.name, game.user.character.id, msg.data.defenderId);
if (msg.name == "msg_update_defense_state") {
this.updateDefenseState(msg.data.defenderId, msg.data.rollId);
}
if (msg.name == "msg_update_roll") {
this.updateRollData(msg.data);
if (msg.name == "msg_apply_combativite") {
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
defender.changeEtatCombativite(msg.data.value)
}
}
@ -319,7 +319,7 @@ export class HawkmoonUtility {
let pa = Math.floor((valueSC - (po * 400)) / 20)
let sc = valueSC - (po * 400) - (pa * 20)
return {
po: po, pa: pa, sc: sc, valueSC: valueSC
po, pa, sc, valueSC
}
}
@ -346,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) {
@ -358,6 +366,9 @@ export class HawkmoonUtility {
rollData.actionImg = "systems/fvtt-hawkmoon-cyd/assets/icons/" + actor.system.attributs[rollData.attrKey].labelnorm + ".webp"
rollData.attr = duplicate(actor.system.attributs[rollData.attrKey])
}
if (rollData.attrKey2 != "none") {
rollData.attr2 = duplicate(actor.system.attributs[rollData.attrKey2])
}
if (rollData.maitriseId != "none") {
rollData.selectedMaitrise = rollData.maitrises.find(p => p.id == rollData.maitriseId)
@ -368,10 +379,10 @@ export class HawkmoonUtility {
//console.log("BEFORE COMP", rollData)
if (rollData.competence) {
rollData.predilections = duplicate(rollData.competence.system.predilections.filter(pred => pred.acquise && !pred.maitrise && !pred.used) || [])
rollData.predilections = duplicate(rollData.competence.system.predilections || [])
let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.system.niveau}+${rollData.modificateur}+${compmod}`
if (rollData.selectedTalents && rollData.selectedTalents.length > 0) {
for (let id of rollData.selectedTalents) {
let talent = rollData.talents.find(t => t._id == id)
@ -390,10 +401,44 @@ export class HawkmoonUtility {
}
}
rollData.diceFormula += `+${rollData.bonusMalusContext}`
} else if (rollData.attr2) {
rollData.diceFormula += `+${rollData.attr.value}+${rollData.attr2.value}+${rollData.modificateur}+${rollData.bonusMalusContext}`
} else {
rollData.diceFormula += `+${rollData.attr.value}*${rollData.multiplier}+${rollData.modificateur}+${rollData.bonusMalusContext}`
}
// Bonus arme naturelle en défense
if (rollData.bonusArmeNaturelle) {
rollData.diceFormula += `+${rollData.bonusArmeNaturelle}`
}
if (rollData.defenseurAuSol) {
rollData.diceFormula += `+3`
}
if (rollData.defenseurAveugle) {
rollData.diceFormula += `+10`
}
if (rollData.defenseurDeDos) {
rollData.diceFormula += `+5`
}
if (rollData.defenseurRestreint) {
rollData.diceFormula += `+3`
}
if (rollData.defenseurImmobilise) {
rollData.diceFormula += `+5`
}
if (rollData.arme?.system.isDistance) {
rollData.difficulte = __distanceDifficulte[rollData.distanceTir]
rollData.difficulte += __tireurDeplacement[rollData.tireurDeplacement]
rollData.difficulte += __cibleCouvert[rollData.cibleCouvert]
rollData.difficulte += __tailleCible[rollData.tailleCible]
rollData.difficulte += rollData.cibleDeplace ? 3 : 0
rollData.difficulte += rollData.cibleCaC ? 3 : 0
}
if (rollData.attaqueDesarme) {
rollData.difficulte += 10
}
// Ajout adversités
rollData.diceFormula += `-${rollData.nbAdversites}`
@ -403,7 +448,7 @@ export class HawkmoonUtility {
let myRoll = new Roll(rollData.diceFormula).roll({ async: false })
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
rollData.roll = myRoll
rollData.roll = duplicate(myRoll)
console.log(">>>> ", myRoll)
rollData.finalResult = myRoll.total
@ -416,15 +461,31 @@ export class HawkmoonUtility {
content: await renderTemplate(`systems/fvtt-hawkmoon-cyd/templates/chat-generic-result.html`, 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) {
rollData.bonusFormula = rollData.addedBonus
let bonusRoll = new Roll(rollData.bonusFormula).roll({ async: false })
await this.showDiceSoNice(bonusRoll, game.settings.get("core", "rollMode"));
rollData.bonusRoll = bonusRoll
rollData.bonusRoll = duplicate(bonusRoll)
rollData.finalResult += rollData.bonusRoll.total
@ -528,7 +589,19 @@ export class HawkmoonUtility {
pointAmeOptions: this.getPointAmeOptions(),
difficulte: 0,
modificateur: 0,
bonusMalusContext: 0
bonusMalusContext: 0,
bonusArmeNaturelle: 0,
defenseurAveugle: false,
defenseurDeDos: false,
defenseurAuSol: false,
defenseurRestreint: false,
defenseurImmobilise: false,
tailleCible: "normal",
tireurDeplacement: "immobile",
cibleCouvert: "aucun",
distanceTir: "porteemoyenne",
attaqueCharge: false,
attaqueDesarme: false
}
return rollData
}
@ -541,8 +614,14 @@ export class HawkmoonUtility {
let defender = game.canvas.tokens.get(rollData.defenderTokenId).actor
rollData.armeDefense = defender.getBestDefenseValue()
rollData.targetVigueur = defender.getVigueur()
rollData.protectionDefenseur = defender.getProtection()
if (rollData.armeDefense) {
rollData.difficulte = rollData.armeDefense.system.totalDefensif
if ( !rollData.arme.system.armenaturelle && !rollData.arme.system.armefortune ){
if (rollData.armeDefense.system.armenaturelle || rollData.armeDefense.system.armefortune) {
rollData.bonusArmeNaturelle = 3
}
}
} else {
ui.notifications.warn("Aucune arme de défense équipée, difficulté manuelle à positionner.")
}
@ -637,11 +716,11 @@ export class HawkmoonUtility {
/* -------------------------------------------- */
static async confirmDelete(actorSheet, li) {
let itemId = li.data("item-id");
let msgTxt = "<p>Are you sure to remove this Item ?";
let msgTxt = "<p>Etes vous certain de vouloir supprimer cet item ?";
let buttons = {
delete: {
icon: '<i class="fas fa-check"></i>',
label: "Yes, remove it",
label: "Oui !",
callback: () => {
actorSheet.actor.deleteEmbeddedDocuments("Item", [itemId]);
li.slideUp(200, () => actorSheet.render(false));
@ -649,12 +728,12 @@ export class HawkmoonUtility {
},
cancel: {
icon: '<i class="fas fa-times"></i>',
label: "Cancel"
label: "Non"
}
}
msgTxt += "</p>";
let d = new Dialog({
title: "Confirm removal",
title: "Confirmer la suppression",
content: msgTxt,
buttons: buttons,
default: "cancel"
@ -673,7 +752,6 @@ export class HawkmoonUtility {
console.log(entryData)
htmlTab += `<tr><td>@UUID[Compendium.${compName}.${entryData._id}]{${entryData.name}}</td>`
htmlTab += `<td>${entryData.system.description}</td>`;
//htmlTab += `<td>${entryData.system.resumebonus}</td>`;
htmlTab += "</tr>\n";
}
htmlTab += "</table>";

View File

@ -40,7 +40,6 @@
--debug-box-shadow-blue: inset 0 0 2px blue;
--debug-box-shadow-green: inset 0 0 2px green;
}
/*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/
/* Global styles & Font */
.window-app {
@ -527,7 +526,6 @@ section.sheet-body:after {
h1, h2, h3, h4 {
font-weight: bold;
}
ul, ol {
margin: 0;
padding: 0;
@ -828,7 +826,6 @@ ul, li {
#sidebar {
font-size: 1rem;
background-position: 100%;
color: rgba(220,220,220,0.75);
}
/* background: rgb(105,85,65) url("../images/ui/texture_feuille_perso_onglets.webp") no-repeat right bottom;*/
@ -946,22 +943,11 @@ ul, li {
height: 15%;
font-size: 15px;
padding: 10px;
padding-bottom: 20px;
/*padding-bottom: 20px;*/
padding-top: .2rem;
padding-bottom: .2rem;
}
.div-river-full {
height: 5rem;
align-items: flex-start;
}
.div-river {
align-content: center;
margin-left: 8px;
align-content:space-around;
justify-content: space-around;
}
.div-center {
align-self: center;
@ -999,13 +985,10 @@ ul, li {
}
#sidebar #sidebar-tabs i{
width: 25px;
height: 25px;
display: inline-block;
background-position:center;
background-size:cover;
text-shadow: 1px 1px 0 rgba(0,0,0,0.75);
}
/*#sidebar #sidebar-tabs i.fa-comments:before, #sidebar #sidebar-tabs i.fa-fist-raised:before, #sidebar #sidebar-tabs i.fa-users:before, #sidebar #sidebar-tabs i.fa-map:before, #sidebar #sidebar-tabs i.fa-suitcase:before, #sidebar #sidebar-tabs i.fa-book-open:before, #sidebar #sidebar-tabs i.fa-th-list:before, #sidebar #sidebar-tabs i.fa-music:before, #sidebar #sidebar-tabs i.fa-atlas:before, #sidebar #sidebar-tabs i.fa-cogs:before {content: "";}
@ -1277,24 +1260,6 @@ ul, li {
padding-left: 2rem;
}
.drop-equipment-effect,
.drop-power-effect,
.drop-perk-effect,
.drop-ability-effect,
.drop-effect-specaffected,
.drop-effect-spec,
.drop-ability-weapon,
.drop-ability-armor,
.drop-race-perk,
.drop-spec-perk,
.drop-ability-power,
.drop-ability-spec,
.drop-spec-power,
.drop-abilities,
.drop-optionnal-abilities,
.drop-specialperk1,
.drop-perk2,
.drop-spec1 ,
.drop-spec2 {
background: linear-gradient(to bottom, #6c95b9fc 5%, #105177ab 100%);
background-color: #7d5d3b00;
@ -1409,6 +1374,12 @@ ul, li {
max-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 {
padding-top: 6px;
flex-grow:1;
@ -1449,4 +1420,24 @@ ul, li {
}
.argent-total-text {
margin-left: 4px;
}
}
.compendium h4.entry-name.document-name {
color: black;
}
.page-title {
color: black;
}
textarea {
font-family: "Charlemagne";
font-size: 0.8rem;
}
.fxmaster {
background: #443e37E0;
background-color: #443e37E0;
}
.predilection-text {
padding-left: 8px;
font-style: italic;
font-size: 0.6rem;
}

View File

@ -1,7 +1,7 @@
{
"id": "fvtt-hawkmoon-cyd",
"description": "Hawkmoon RPG for FoundryVTT (CYD system - French)",
"version": "10.1.12",
"version": "11.1.1",
"authors": [
{
"name": "Uberwald/LeRatierBretonnien",
@ -35,7 +35,7 @@
"gridUnits": "m",
"license": "LICENSE.txt",
"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-10.1.12.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-11.1.1.zip",
"languages": [
{
"lang": "fr",
@ -49,100 +49,133 @@
"type": "Item",
"label": "Compétences",
"name": "skills",
"path": "packs/competences.db",
"path": "packs/competences",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Compétences de Créatures",
"name": "skills-creatures",
"path": "packs/competences-creatures.db",
"path": "packs/competences-creatures",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Historiques",
"name": "historiques",
"path": "packs/historiques.db",
"path": "packs/historiques",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Armes",
"name": "armes",
"path": "packs/armes.db",
"path": "packs/armes",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Protections",
"name": "protections",
"path": "packs/protections.db",
"path": "packs/protections",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Equipement",
"name": "equipement",
"path": "packs/equipement.db",
"path": "packs/equipement",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Profils",
"name": "profils",
"path": "packs/profils.db",
"path": "packs/profils",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Talents de Personnage",
"name": "talents",
"path": "packs/talents.db",
"path": "packs/talents",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "Item",
"label": "Talents de Cellule",
"name": "talents-cellule",
"path": "packs/talents-cellule.db",
"path": "packs/talents-cellule",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "RollTable",
"label": "Tables",
"name": "tables",
"path": "packs/tables.db",
"path": "packs/tables",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{
"type": "JournalEntry",
"label": "Aides de Jeu",
"name": "aides-de-jeu",
"path": "packs/aides-de-jeu.db",
"path": "packs/aides-de-jeu",
"system": "fvtt-hawkmoon-cyd",
"private": false,
"flags": {}
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
}
],
"primaryTokenAttribute": "sante.vigueur",
@ -156,6 +189,6 @@
"background": "systems/fvtt-hawkmoon-cyd/assets/ui/fond_hawkmoon.webp",
"compatibility": {
"minimum": "10",
"verified": "10"
"verified": "11"
}
}

View File

@ -69,7 +69,9 @@
},
"sante": {
"vigueur": 0,
"etat": 0
"etat": 0,
"vigueurmodifier": 0,
"nbcombativite": 5
},
"adversite": {
"bleue": 0,
@ -209,6 +211,8 @@
},
"arme": {
"typearme": "",
"armenaturelle": false,
"armefortune": false,
"bonusmaniementoff": 0,
"seuildefense": 0,
"onlevelonly": false,

View File

@ -38,7 +38,9 @@
<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">
{{#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>
</li>
@ -112,6 +114,13 @@
</li>
{{/each}}
</ul>
{{#if isGM}}
<div class="flexrow">
<span class="item-name-label competence-name item-field-label-medium">Modificateur de Vigueur</span>
<input type="text" class="item-field-label-short" name="system.sante.vigueurmodifier"
value="{{system.sante.vigueurmodifier}}" data-dtype="Number" />
</div>
{{/if}}
</div>
</div>
@ -125,6 +134,10 @@
<label class="short-label">Résumé</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="talent" title="Ajouter un Talent"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each talents as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="competence">
@ -153,7 +166,11 @@
<label class="short-label">Résumé</label>
</span>
<div class="item-filler">&nbsp;</div>
</li>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="talent" title="Ajouter un Talent"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each talentsCell as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="competence">
<img class="item-name-img" src="{{talent.img}}" />
@ -192,8 +209,20 @@
{{#each skills as |skill key|}}
<li class="item flexrow " data-item-id="{{skill._id}}" data-item-type="competence">
<img class="item-name-img" src="{{skill.img}}" />
<span class="item-name-label competence-name"><a class="roll-competence item-field-label-short"
<div class="flexcol item-name-label">
<span class="item-name-label competence-name"><a class="roll-competence item-field-label-short"
data-attr-key="tochoose">{{skill.name}}</a></span>
<span class="predilection-text">
{{#each skill.system.predilections as |pred key|}}
{{#if (and pred.acquise (not pred.used))}}
{{pred.name}},
{{/if}}
{{/each}}
</span>
</div>
<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">
{{#select skill.system.niveau}}
@ -325,6 +354,8 @@
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-equip" title="Worn">{{#if protection.system.equipped}}<i
class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<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>

View File

@ -81,6 +81,10 @@
<label class="short-label">Résumé</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="talent" title="Ajouter un Talent"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each talents as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="talent">

View File

@ -19,10 +19,11 @@
<div>
<ul>
<li>Arme : {{arme.name}} (+{{arme.system.totalDegats}})</li>
<li>Formule : {{formula}}</li>
<li>Dégats : {{finalResult}}</li>
{{#if targetVigueur}}
<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}}
</ul>
</div>

View File

@ -19,6 +19,9 @@
<div>
<ul>
<li class="hawkmoon-roll">Attribut : {{attr.label}} ({{attr.value}})</li>
{{#if attr2}}
<li>Attribut : {{attr2.label}} ({{attr2.value}})</li>
{{/if}}
{{#if competence}}
<li>Compétence : {{competence.name}} ({{competence.system.niveau}})</li>
@ -42,10 +45,19 @@
<li>Total : {{finalResult}}</li>
{{#if attaqueCharge}}
<li>Vous avez chargé : vos adversaires bénéficient de +3 pour vous attaquer</li>
{{/if}}
{{#if difficulte}}
<li>SD : {{difficulte}}</li>
{{#if isSuccess}}
<li class="chat-success">Succés...
</li>
{{#if attaqueDesarme}}
<li>Vous désarmez votre adversaire ! Son arme tombe hors de sa portée.</li>
{{/if}}
{{else}}
<li class="chat-failure">Echec...</li>
{{/if}}
@ -53,6 +65,9 @@
{{#if isHeroique}}
<li class="chat-success">Héroïque !!!</li>
{{#if attaqueDesarme}}
<li>... Et en plus vous récupérez l'arme de votre adversaire dans votre main (si vous le souhaitez) !.</li>
{{/if}}
{{/if}}
{{#if isDramatique}}
<li class="chat-failure">Dramatique !!!</li>
@ -64,9 +79,12 @@
{{#if isSuccess}}
{{#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)}}
<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}}
@ -74,8 +92,11 @@
{{#each predilections as |pred key|}}
<li>
<button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">Predilection :
{{pred.name}}</button>
{{#if (and (and pred.acquise (not pred.maitrise)) (not pred.used))}}
<button class="chat-card-button predilection-reroll" data-predilection-index="{{key}}">Predilection :
{{pred.name}}
</button>
{{/if}}
</li>
{{/each}}

View File

@ -58,20 +58,24 @@
<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>
<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>
</ul>
<h4 class="item-name-label competence-name">Santé</h4>
<ul class="item-list alternate-list">
<li class="item flexrow">
<label class="label-name item-field-label-short">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}}" >
<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}}">
</li>
<li class="item flexrow">
<label class="label-name item-field-label-short">Etat</label>
<select class="label-name item-field-label-medium" type="text" name="system.sante.etat" value="{{system.sante.etat}}" data-dtype="Number">
<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 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>
</li>
@ -103,6 +107,13 @@
</li>
{{/each}}
</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>
@ -135,21 +146,21 @@
<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">
{{#select skill.system.niveau}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html}}
{{/select}}
</select>
{{#if (ne skill.system.attribut1 "none")}}
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut1}}">{{upper
skill.system.attribut1}} : {{skill.system.attribut1total}}</button>
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut1}}">{{upper
skill.system.attribut1}} : {{skill.system.attribut1total}}</button>
{{/if}}
{{#if (ne skill.system.attribut2 "none")}}
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut2}}">{{upper
skill.system.attribut2}} : {{skill.system.attribut2total}}</button>
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut2}}">{{upper
skill.system.attribut2}} : {{skill.system.attribut2total}}</button>
{{/if}}
{{#if (ne skill.system.attribut3 "none")}}
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut3}}">{{upper
skill.system.attribut3}} : {{skill.system.attribut3total}}</button>
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut3}}">{{upper
skill.system.attribut3}} : {{skill.system.attribut3total}}</button>
{{/if}}
<div class="item-filler">&nbsp;</div>
@ -181,13 +192,17 @@
<label class="short-label">Résumé</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="talent" title="Ajouter un Talent"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each talents as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="competence">
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="talent">
<img class="item-name-img" src="{{talent.img}}" />
<span class="item-name-label competence-name">{{talent.name}}</span>
<span class="item-name-label item-field-label-long2">{{talent.system.resumebonus}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
@ -210,9 +225,13 @@
<label class="short-label">Résumé</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="talent" title="Ajouter un Talent"><i
class="fas fa-plus"></i></a>
</div>
</li>
{{#each talentsCell as |talent key|}}
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="competence">
<li class="item flexrow " data-item-id="{{talent._id}}" data-item-type="talent">
<img class="item-name-img" src="{{talent.img}}" />
<span class="item-name-label competence-name">{{talent.name}}</span>
<span class="item-name-label item-field-label-long2">{{talent.system.resumebonus}}</span>
@ -269,10 +288,10 @@
</span>
{{#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>
{{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>
{{/if}}

View File

@ -23,6 +23,14 @@
{{/select}}
</select>
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long2">Arme naturelle ? </label>
<input type="checkbox" name="system.armenaturelle" {{checked system.armenaturelle}} />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long2">Arme de fortune ? </label>
<input type="checkbox" name="system.armefortune" {{checked system.armefortune}} />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Bonus offensif : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.bonusmaniementoff"

View File

@ -49,6 +49,18 @@
</select>
</div>
{{/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 (count talents)}}
@ -62,6 +74,85 @@
</div>
{{/if}}
{{#if arme}}
{{#if arme.system.isMelee}}
{{#if bonusArmeNaturelle}}
<div class="flexrow">
<span class="roll-dialog-label">Arme naturelle/fortune en défense</span>
<span class="small-label roll-dialog-label">{{bonusArmeNaturelle}}</span>
</div>
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label">En surplomb ou défenseur au sol (+3)?</span>
<input type="checkbox" id="defenseur-au-sol" {{checked defenseurAuSol}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Défenseur aveuglé (+10)?</span>
<input type="checkbox" id="defenseur-aveugle" {{checked defenseurAveugle}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Défenseur de dos (+5)?</span>
<input type="checkbox" id="defenseur-de-dos" {{checked defenseurDeDos}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Défenseur dans espace restreint (+3)?</span>
<input type="checkbox" id="defenseur-restreint" {{checked defenseurRestreint}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Défenseur immobilisé (+5)?</span>
<input type="checkbox" id="defenseur-immobilise" {{checked defenseurImmobilise}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Charge ?</span>
<input type="checkbox" id="attaque-charge" {{checked attaqueCharge}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Désarmer (SD+10)?</span>
<input type="checkbox" id="attaque-desarme" {{checked attaqueDesarme}} />
</div>
{{else}}
<div class="flexrow">
<span class="roll-dialog-label">Tireur en déplacement ?</span>
<select class="item-field-label-long" type="text" id="tireur-deplacement" data-dtype="string">
{{#select tireurDeplacement}}
<option value="immobile">Immobile (SD+0)</option>
<option value="lent">Lent (SD+3)</option>
<option value="rapide">Rapide (SD+5)</option>
{{/select}}
</select>
</div>
<div class="flexrow">
<span class="roll-dialog-label">Couvert de la cible ?</span>
<select class="item-field-label-long" type="text" id="cible-couvert" data-dtype="string">
{{#select cibleCouvert}}
<option value="aucun">Aucun</option>
<option value="leger">Léger (SD+5)</option>
<option value="complet">Quasi complet (SD+10)</option>
{{/select}}
</select>
</div>
<div class="flexrow">
<span class="roll-dialog-label">Cible se déplace vite (SD+3)?</span>
<input type="checkbox" id="tireur-cible-deplace" {{checked cibleDeplace}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Cible corps à corps (SD+3)?</span>
<input type="checkbox" id="tireur-cible-cac" {{checked cibleCaC}} />
</div>
<div class="flexrow">
<span class="roll-dialog-label">Taille de la cible ?</span>
<select class="item-field-label-long" type="text" id="taille-cible" data-dtype="string">
{{#select tailleCible}}
<option value="normal">Normal (SD+0)</option>
<option value="main">Main (SD+10)</option>
<option value="enfant">Enfant (SD+3)</option>
<option value="maison">Maison (SD-10)</option>
{{/select}}
</select>
</div>
{{/if}}
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label">Bonus/Malus </span>
<select class="roll-dialog-label" id="bonus-malus-context" type="text" value="{{bonusMalusContext}}"
@ -80,31 +171,47 @@
</select>
</div>
{{#if armeDefense}}
<div class="flexrow">
<span class="roll-dialog-label">Défense adversaire : </span>
<span class="roll-dialog-label"><strong>{{difficulte}}</strong> </span>
</div>
{{#if (or armeDefense arme.system.isDistance)}}
{{#if arme.system.isDistance}}
<div class="flexrow">
<span class="roll-dialog-label">SD de distance</span>
<select class="item-field-label-long" type="text" id="distance-tir" data-dtype="string">
{{#select distanceTir}}
<option value="porteecourte">Courte ({{protectionDefenseur}}+5)</option>
<option value="porteemoyenne">Moyenne ({{protectionDefenseur}}+9)</option>
<option value="porteelongue">Longue ({{protectionDefenseur}}+14)</option>
{{/select}}
</select>
</div>
{{else}}
<div class="flexrow">
<span class="roll-dialog-label">Défense adversaire : </span>
<span class="roll-dialog-label"><strong>{{difficulte}}</strong> </span>
</div>
{{/if}}
{{else}}
{{#if isInit}}
{{else}}
<div class="flexrow">
<span class="roll-dialog-label">Difficulté : </span>
<select class="roll-dialog-label" id="difficulte" type="text" name="difficulte" value="{{difficulte}}"
data-dtype="Number">
{{#select difficulte}}
<option value="0">Aucune/Inconnue</option>
<option value="5">Facile (5)</option>
<option value="10">Moyenne (10)</option>
<option value="15">Ardue (15)</option>
<option value="20">Hasardeuse (20)</option>
<option value="25">Insensée (25)</option>
<option value="30">Pure Folie (30)</option>
{{/select}}
</select>
<div class="flexrow">
<span class="roll-dialog-label">Difficulté : </span>
<select class="roll-dialog-label" id="difficulte" type="text" name="difficulte" value="{{difficulte}}"
data-dtype="Number">
{{#select difficulte}}
<option value="0">Aucune/Inconnue</option>
<option value="5">Facile (5)</option>
<option value="10">Moyenne (10)</option>
<option value="15">Ardue (15)</option>
<option value="20">Hasardeuse (20)</option>
<option value="25">Insensée (25)</option>
<option value="30">Pure Folie (30)</option>
{{/select}}
</select>
</div>
{{/if}}
</div>
{{/if}}
</div>