Enhance armes+armures
This commit is contained in:
parent
9c93134d1c
commit
029ad04e26
@ -48,6 +48,9 @@ export class TeDeumActorPJSheet extends ActorSheet {
|
|||||||
maladies: this.actor.getMaladies(),
|
maladies: this.actor.getMaladies(),
|
||||||
poisons: this.actor.getPoisons(),
|
poisons: this.actor.getPoisons(),
|
||||||
combat: this.actor.prepareCombat(),
|
combat: this.actor.prepareCombat(),
|
||||||
|
bonusDegats: this.actor.getBonusDegats(),
|
||||||
|
pointsArmuresLourdes: this.actor.getNbArmures(),
|
||||||
|
nbArmuresLourdes: this.actor.getNbArmuresLourdesActuel(),
|
||||||
santeModifier: this.actor.getSanteModifier(),
|
santeModifier: this.actor.getSanteModifier(),
|
||||||
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
|
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
|
||||||
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),
|
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),
|
||||||
|
@ -86,7 +86,16 @@ export class TeDeumActor extends Actor {
|
|||||||
getNbActions() {
|
getNbActions() {
|
||||||
return game.system.tedeum.config.ACTIONS_PAR_TOUR[this.system.caracteristiques.adresse.value]
|
return game.system.tedeum.config.ACTIONS_PAR_TOUR[this.system.caracteristiques.adresse.value]
|
||||||
}
|
}
|
||||||
|
getNbArmuresLourdesActuel() {
|
||||||
|
let armures = this.getArmures()
|
||||||
|
let nb = 0
|
||||||
|
for (let armure of armures) {
|
||||||
|
if (armure.system.equipe) {
|
||||||
|
nb += armure.system.coutArmureLourde
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nb
|
||||||
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getCompetences() {
|
getCompetences() {
|
||||||
let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'competence') || [])
|
let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'competence') || [])
|
||||||
@ -156,7 +165,7 @@ export class TeDeumActor extends Actor {
|
|||||||
modTotal += maladieDef.modifier
|
modTotal += maladieDef.modifier
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let simples= foundry.utils.duplicate(this.items.filter(item => item.type == 'simple') || [])
|
let simples = foundry.utils.duplicate(this.items.filter(item => item.type == 'simple') || [])
|
||||||
for (let c of simples) {
|
for (let c of simples) {
|
||||||
if (c.system.appliquee) {
|
if (c.system.appliquee) {
|
||||||
let simpleDef = game.system.tedeum.config.virulencePoison[c.system.virulence]
|
let simpleDef = game.system.tedeum.config.virulencePoison[c.system.virulence]
|
||||||
@ -170,11 +179,43 @@ export class TeDeumActor extends Actor {
|
|||||||
}
|
}
|
||||||
// Si le nombre de blessures est supérieur au score d'endurance, alors malus supplémentaire
|
// Si le nombre de blessures est supérieur au score d'endurance, alors malus supplémentaire
|
||||||
let endurance = this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "endurance")
|
let endurance = this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "endurance")
|
||||||
if ( blessures.length > endurance.system.score) {
|
if (blessures.length > endurance.system.score) {
|
||||||
modTotal += -1
|
modTotal += -1
|
||||||
}
|
}
|
||||||
return modTotal
|
return modTotal
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async appliquerDegats(rollData) {
|
||||||
|
let combat = this.prepareCombat()
|
||||||
|
rollData.defenderName = this.name
|
||||||
|
let touche = combat[rollData.loc.id].touche
|
||||||
|
if (rollData.degats > 0 && rollData.degats > touche) {
|
||||||
|
let diff = rollData.degats - touche
|
||||||
|
for (let bId in game.system.tedeum.config.blessures) {
|
||||||
|
let blessure = game.system.tedeum.config.blessures[bId]
|
||||||
|
if (diff >= blessure.degatsMin && diff <= blessure.degatsMax) {
|
||||||
|
// Create a new blessure object
|
||||||
|
let blessureObj = {
|
||||||
|
name: blessure.label,
|
||||||
|
type: "blessure",
|
||||||
|
system: {
|
||||||
|
typeBlessure: bId,
|
||||||
|
localisation: rollData.loc.id,
|
||||||
|
appliquee: true,
|
||||||
|
description: "Blessure infligée par un coup de " + rollData.arme.name + " de " + rollData.alias,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rollData.blessure = blessureObj
|
||||||
|
this.createEmbeddedDocuments('Item', [blessureObj]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Display the relevant chat message
|
||||||
|
let msg = await TeDeumUtility.createChatWithRollMode(rollData.alias, {
|
||||||
|
content: await renderTemplate(`systems/fvtt-te-deum/templates/chat/chat-blessure-result.hbs`, rollData)
|
||||||
|
})
|
||||||
|
await msg.setFlag("world", "te-deum-rolldata", rollData)
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
updateCarac(c, key) {
|
updateCarac(c, key) {
|
||||||
@ -234,13 +275,13 @@ export class TeDeumActor extends Actor {
|
|||||||
modifyProvidence(value) {
|
modifyProvidence(value) {
|
||||||
let providence = foundry.utils.duplicate(this.system.providence)
|
let providence = foundry.utils.duplicate(this.system.providence)
|
||||||
providence.value = Math.min(Math.max(providence.value + value, 0), 6)
|
providence.value = Math.min(Math.max(providence.value + value, 0), 6)
|
||||||
this.update( { "system.providence": providence } )
|
this.update({ "system.providence": providence })
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
modifyXP(key, value) {
|
modifyXP(key, value) {
|
||||||
let xp = this.system.caracteristiques[key].experience
|
let xp = this.system.caracteristiques[key].experience
|
||||||
xp = Math.max(xp + value, 0)
|
xp = Math.max(xp + value, 0)
|
||||||
this.update( { [`system.caracteristiques.${key}.experience`]: xp } )
|
this.update({ [`system.caracteristiques.${key}.experience`]: xp })
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -253,7 +294,7 @@ export class TeDeumActor extends Actor {
|
|||||||
let caracDice = game.system.tedeum.config.descriptionValeur[this.system.caracteristiques[c.system.caracteristique].value].dice
|
let caracDice = game.system.tedeum.config.descriptionValeur[this.system.caracteristiques[c.system.caracteristique].value].dice
|
||||||
c.system.formula = caracDice + "+" + c.system.score
|
c.system.formula = caracDice + "+" + c.system.score
|
||||||
})
|
})
|
||||||
return foundry.utils.deepClone( comp || {} )
|
return foundry.utils.deepClone(comp || {})
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -279,10 +320,55 @@ export class TeDeumActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async equipItem(itemId) {
|
async equipItem(itemId) {
|
||||||
let item = this.items.find(item => item.id == itemId)
|
let item = this.items.find(item => item.id == itemId)
|
||||||
|
if (!this.checkArmure(item)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
let update = { _id: item.id, "system.equipe": !item.system.equipe };
|
let update = { _id: item.id, "system.equipe": !item.system.equipe };
|
||||||
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------- */
|
||||||
|
checkArmure(item) {
|
||||||
|
if (item.type != "armure") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (item.system.equipe) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
let nbArmuresLourdes = this.getNbArmuresLourdesActuel()
|
||||||
|
if (nbArmuresLourdes + item.system.coutArmureLourde > this.getNbArmures().value) {
|
||||||
|
ui.notifications.warn("Impossible d'équiper cette armure, nombre d'armures lourdes maximum atteint")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Loop thru localisation
|
||||||
|
let armures = this.getArmures()
|
||||||
|
for (let loc in item.system.localisation) {
|
||||||
|
if (item.system.localisation[loc].protege) {
|
||||||
|
for (let armure of armures) {
|
||||||
|
if (armure.system.equipe && armure.system.localisation[loc].protege) {
|
||||||
|
let flag = true
|
||||||
|
//console.log("Check armure", armure, item)=
|
||||||
|
if (item.system.typeArmure == "cuir") {
|
||||||
|
flag = armure.system.superposableCuir
|
||||||
|
}
|
||||||
|
if (item.system.typeArmure == "maille") {
|
||||||
|
flag = armure.system.superposableMaille
|
||||||
|
}
|
||||||
|
if (item.system.typeArmure == "plate") {
|
||||||
|
flag = armure.system.superposablePlate
|
||||||
|
}
|
||||||
|
if (!flag) {
|
||||||
|
ui.notifications.warn("Impossible d'équiper cette armure, non superposable")
|
||||||
|
return flag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------------------------- */
|
/* ------------------------------------------- */
|
||||||
async buildContainerTree() {
|
async buildContainerTree() {
|
||||||
let equipments = foundry.utils.duplicate(this.items.filter(item => item.type == "equipment") || [])
|
let equipments = foundry.utils.duplicate(this.items.filter(item => item.type == "equipment") || [])
|
||||||
@ -342,8 +428,8 @@ export class TeDeumActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getInitiativeScore() {
|
getInitiativeScore() {
|
||||||
let initiative = this.items.find(it=>it.type == "competence" && it.name.toLowerCase() == "initiative")
|
let initiative = this.items.find(it => it.type == "competence" && it.name.toLowerCase() == "initiative")
|
||||||
if ( initiative ) {
|
if (initiative) {
|
||||||
return initiative.system.score
|
return initiative.system.score
|
||||||
}
|
}
|
||||||
ui.notifications.warn("Impossible de trouver la compétence Initiative pour l'acteur " + this.name)
|
ui.notifications.warn("Impossible de trouver la compétence Initiative pour l'acteur " + this.name)
|
||||||
@ -392,11 +478,11 @@ export class TeDeumActor extends Actor {
|
|||||||
getCommonCompetence(compId) {
|
getCommonCompetence(compId) {
|
||||||
let rollData = this.getCommonRollData()
|
let rollData = this.getCommonRollData()
|
||||||
|
|
||||||
let competence = foundry.utils.duplicate(this.items.find(it => it.type =="competence" && it.id == compId))
|
let competence = foundry.utils.duplicate(this.items.find(it => it.type == "competence" && it.id == compId))
|
||||||
|
|
||||||
rollData.competence = competence
|
rollData.competence = competence
|
||||||
let c = foundry.utils.duplicate(this.system.caracteristiques[competence.system.caracteristique])
|
let c = foundry.utils.duplicate(this.system.caracteristiques[competence.system.caracteristique])
|
||||||
this.updateCarac( c, competence.system.caracteristique)
|
this.updateCarac(c, competence.system.caracteristique)
|
||||||
rollData.carac = c
|
rollData.carac = c
|
||||||
rollData.img = competence.img
|
rollData.img = competence.img
|
||||||
|
|
||||||
@ -419,19 +505,29 @@ export class TeDeumActor extends Actor {
|
|||||||
weapon = foundry.utils.duplicate(weapon)
|
weapon = foundry.utils.duplicate(weapon)
|
||||||
let rollData = this.getCommonRollData()
|
let rollData = this.getCommonRollData()
|
||||||
rollData.mode = "arme"
|
rollData.mode = "arme"
|
||||||
|
rollData.isTir = weapon.system.typeArme == "tir"
|
||||||
rollData.arme = weapon
|
rollData.arme = weapon
|
||||||
rollData.img = weapon.img
|
rollData.img = weapon.img
|
||||||
rollData.title = weapon.name
|
rollData.title = weapon.name
|
||||||
|
rollData.porteeTir = "courte"
|
||||||
|
rollData.porteeLabel = game.system.tedeum.config.ARME_PORTEES.courte.label
|
||||||
|
rollData.isViser = false
|
||||||
|
rollData.isMouvement = false
|
||||||
|
|
||||||
|
// Display warning if not target defined
|
||||||
|
if (!rollData.defenderTokenId) {
|
||||||
|
ui.notifications.warn("Vous attaquez avec une arme : afin de bénéficier des automatisations, il est conseillé de selectionner une cible")
|
||||||
|
}
|
||||||
|
|
||||||
// Setup competence + carac
|
// Setup competence + carac
|
||||||
if (!compName) {
|
if (!compName) {
|
||||||
compName = weapon.system.competence
|
compName = weapon.system.competence
|
||||||
}
|
}
|
||||||
let competence = this.items.find(item => item.type == "competence" && item.name.toLowerCase() == compName.toLowerCase())
|
let competence = this.items.find(item => item.type == "competence" && item.name.toLowerCase() == compName.toLowerCase())
|
||||||
if ( competence) {
|
if (competence) {
|
||||||
rollData.competence = competence
|
rollData.competence = competence
|
||||||
let c = foundry.utils.duplicate(this.system.caracteristiques[competence.system.caracteristique])
|
let c = foundry.utils.duplicate(this.system.caracteristiques[competence.system.caracteristique])
|
||||||
this.updateCarac( c, competence.system.caracteristique)
|
this.updateCarac(c, competence.system.caracteristique)
|
||||||
rollData.carac = c
|
rollData.carac = c
|
||||||
} else {
|
} else {
|
||||||
ui.notifications.warn("Impossible de trouver la compétence " + compName)
|
ui.notifications.warn("Impossible de trouver la compétence " + compName)
|
||||||
|
@ -86,7 +86,12 @@ export const TEDEUM_CONFIG = {
|
|||||||
puissance: { id: "puissance", value: "puissance", label: "Puissance" },
|
puissance: { id: "puissance", value: "puissance", label: "Puissance" },
|
||||||
adresse: { id: "adresse", value: "adresse", label: "Adresse" },
|
adresse: { id: "adresse", value: "adresse", label: "Adresse" },
|
||||||
},
|
},
|
||||||
|
allonges: {
|
||||||
|
courte: { courte: {malus: 0}, moyenne: {malus:-1}, longue: {malus:-2}, treslongue:{malus:0, esquive: 2 } },
|
||||||
|
moyenne: { courte: {malus: 0}, moyenne: {malus:0}, longue: {malus:-1}, treslongue:{malus:0, esquive: 2 } },
|
||||||
|
longue: { courte: {malus: -2}, moyenne: {malus:-1}, longue: {malus:0}, treslongue:{malus:-1, esquive: 1 } },
|
||||||
|
treslongue: { courte: {malus:0, esquive: 2 }, moyenne:{malus:0, esquive: 2 }, longue: {malus:0, esquive: 1 }, treslongue:{malus:0 } },
|
||||||
|
},
|
||||||
providence: [
|
providence: [
|
||||||
{ labelM: "Brebis égarée", labelF: "Brebis égarée", value: 0, diceValue: "0" },
|
{ labelM: "Brebis égarée", labelF: "Brebis égarée", value: 0, diceValue: "0" },
|
||||||
{ labelM: "Pauvre pêcheur", labelF: "Pauvre pêcheresse", value: 1, diceValue: "d4" },
|
{ labelM: "Pauvre pêcheur", labelF: "Pauvre pêcheresse", value: 1, diceValue: "d4" },
|
||||||
@ -96,7 +101,11 @@ export const TEDEUM_CONFIG = {
|
|||||||
{ labelM: "Oint du Seigneur", labelF: "Ointe du Seigneur", value: 5, diceValue: "d12" },
|
{ labelM: "Oint du Seigneur", labelF: "Ointe du Seigneur", value: 5, diceValue: "d12" },
|
||||||
{ labelM: "Dans la main de Dieu", labelF: "Dans la main de Dieu", value: 6, diceValue: "d20" },
|
{ labelM: "Dans la main de Dieu", labelF: "Dans la main de Dieu", value: 6, diceValue: "d20" },
|
||||||
],
|
],
|
||||||
|
armureTypes: {
|
||||||
|
cuir: { label: "Cuir", value: "cuir" },
|
||||||
|
maille: { label: "Maille", value: "maille" },
|
||||||
|
plate: { label: "Plate", value: "plate" },
|
||||||
|
},
|
||||||
armeTypes: {
|
armeTypes: {
|
||||||
melee: { label: "Mêlée", value: "melee" },
|
melee: { label: "Mêlée", value: "melee" },
|
||||||
tir: { label: "Tir", value: "tir" }
|
tir: { label: "Tir", value: "tir" }
|
||||||
@ -162,11 +171,11 @@ export const TEDEUM_CONFIG = {
|
|||||||
],
|
],
|
||||||
blessures: {
|
blessures: {
|
||||||
indemne: { value: 0, label: "Indemne", key: "indemne", degatsMax: -1, count: 0, modifier: 0 },
|
indemne: { value: 0, label: "Indemne", key: "indemne", degatsMax: -1, count: 0, modifier: 0 },
|
||||||
estafilade: { value: 1, label: "Estafilade", key: "estafilade", degatsMax: 2, count: 1, modifier: 0 },
|
estafilade: { value: 1, label: "Estafilade", key: "estafilade", degatsMin: 0, degatsMax: 2, count: 1, modifier: 0 },
|
||||||
plaie: { value: 2, label: "Plaie", key: "plaie", degatsMax: 4, count: 1, modifier: -1 },
|
plaie: { value: 2, label: "Plaie", key: "plaie", degatsMin: 3, degatsMax: 4, count: 1, modifier: -1 },
|
||||||
plaiebeante: { value: 3, label: "Plaie béante", key: "plaiebeante", degatsMax: 6, count: 1, modifier: -2 },
|
plaiebeante: { value: 3, label: "Plaie béante", key: "plaiebeante", degatsMin: 5, degatsMax: 6, count: 1, modifier: -2 },
|
||||||
plaieatroce: { value: 4, label: "Plaie atroce", key: "plaieatroce", degatsMax: 6, count: 1, horsCombat: true, modifier: -12 },
|
plaieatroce: { value: 4, label: "Plaie atroce", key: "plaieatroce", degatsMin: 7, degatsMax: 8, count: 1, horsCombat: true, modifier: -12 },
|
||||||
tunenet: { value: 5, label: "Tué net", key: "tuenet", degatsMax: 100, count: 1, horsCombat: true, mort: true, modifier: -12 }
|
tunenet: { value: 5, label: "Tué net", key: "tuenet", degatsMin: 9, degatsMax: 100, count: 1, horsCombat: true, mort: true, modifier: -12 }
|
||||||
},
|
},
|
||||||
virulence: {
|
virulence: {
|
||||||
fatigue: { label: "Fatigue", value: "fatigue", modifier: 0 },
|
fatigue: { label: "Fatigue", value: "fatigue", modifier: 0 },
|
||||||
|
@ -59,7 +59,7 @@ export class TeDeumUtility {
|
|||||||
})
|
})
|
||||||
|
|
||||||
Handlebars.registerHelper('getConfigLabelWithGender', function (configName, key, genderKey) {
|
Handlebars.registerHelper('getConfigLabelWithGender', function (configName, key, genderKey) {
|
||||||
return game.system.tedeum.config[configName][key]["label"+genderKey]
|
return game.system.tedeum.config[configName][key]["label" + genderKey]
|
||||||
})
|
})
|
||||||
Handlebars.registerHelper('getCaracDescription', function (key, value) {
|
Handlebars.registerHelper('getCaracDescription', function (key, value) {
|
||||||
return game.system.tedeum.config.descriptionValeur[Number(value)][key]
|
return game.system.tedeum.config.descriptionValeur[Number(value)][key]
|
||||||
@ -74,7 +74,7 @@ export class TeDeumUtility {
|
|||||||
this.competences = competences.map(i => i.toObject())
|
this.competences = competences.map(i => i.toObject())
|
||||||
this.competencesList = {}
|
this.competencesList = {}
|
||||||
for (let i of this.competences) {
|
for (let i of this.competences) {
|
||||||
this.competencesList[i.name.toLowerCase()] = {name:i.name, id: i._id}
|
this.competencesList[i.name.toLowerCase()] = { name: i.name, id: i._id }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ export class TeDeumUtility {
|
|||||||
if (!this.currentOpposition) {
|
if (!this.currentOpposition) {
|
||||||
// Store rollData as current GM opposition
|
// Store rollData as current GM opposition
|
||||||
this.currentOpposition = rollData
|
this.currentOpposition = rollData
|
||||||
ui.notifications.info("Opposition démarrée avec " + rollData.alias );
|
ui.notifications.info("Opposition démarrée avec " + rollData.alias);
|
||||||
} else {
|
} else {
|
||||||
// Perform the opposition
|
// Perform the opposition
|
||||||
let rWinner = this.currentOpposition
|
let rWinner = this.currentOpposition
|
||||||
@ -260,7 +260,7 @@ export class TeDeumUtility {
|
|||||||
console.log("SOCKET MESSAGE", msg)
|
console.log("SOCKET MESSAGE", msg)
|
||||||
if (msg.name == "msg_gm_chat_message") {
|
if (msg.name == "msg_gm_chat_message") {
|
||||||
let rollData = msg.data.rollData
|
let rollData = msg.data.rollData
|
||||||
if ( game.user.isGM ) {
|
if (game.user.isGM) {
|
||||||
let chatMsg = await this.createChatMessage(rollData.alias, "blindroll", {
|
let chatMsg = await this.createChatMessage(rollData.alias, "blindroll", {
|
||||||
content: await renderTemplate(msg.data.template, rollData),
|
content: await renderTemplate(msg.data.template, rollData),
|
||||||
whisper: game.user.id
|
whisper: game.user.id
|
||||||
@ -376,7 +376,14 @@ export class TeDeumUtility {
|
|||||||
static computeRollFormula(rollData, actor, isConfrontation = false) {
|
static computeRollFormula(rollData, actor, isConfrontation = false) {
|
||||||
let diceFormula = ""
|
let diceFormula = ""
|
||||||
if (rollData.competence) {
|
if (rollData.competence) {
|
||||||
let diceBase = this.modifyDice(rollData.carac.dice, Number(rollData.bonusMalus)+rollData.santeModifier)
|
let localModifier = 0
|
||||||
|
if (rollData.isViser) {
|
||||||
|
localModifier += 1
|
||||||
|
}
|
||||||
|
if (rollData.isMouvement) {
|
||||||
|
localModifier -= 1
|
||||||
|
}
|
||||||
|
let diceBase = this.modifyDice(rollData.carac.dice, localModifier + Number(rollData.bonusMalus) + rollData.santeModifier)
|
||||||
if (!diceBase) return;
|
if (!diceBase) return;
|
||||||
diceFormula = diceBase + "x + " + rollData.competence.system.score
|
diceFormula = diceBase + "x + " + rollData.competence.system.score
|
||||||
}
|
}
|
||||||
@ -386,6 +393,52 @@ export class TeDeumUtility {
|
|||||||
return diceFormula
|
return diceFormula
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static async getLocalisation(rollData) {
|
||||||
|
let locRoll = await new Roll("1d20").roll()
|
||||||
|
await this.showDiceSoNice(locRoll, game.settings.get("core", "rollMode"))
|
||||||
|
rollData.locRoll = foundry.utils.duplicate(locRoll)
|
||||||
|
for (let key in game.system.tedeum.config.LOCALISATION) {
|
||||||
|
let loc = game.system.tedeum.config.LOCALISATION[key]
|
||||||
|
if (locRoll.total >= loc.score.min && locRoll.total <= loc.score.max) {
|
||||||
|
rollData.loc = foundry.utils.duplicate(loc)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static async processAttaqueMelee(rollData) {
|
||||||
|
if (rollData.arme?.system.typeArme != "melee") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (rollData.isSuccess) {
|
||||||
|
await this.getLocalisation(rollData)
|
||||||
|
let actor = game.actors.get(rollData.actorId)
|
||||||
|
let bDegats = actor.getBonusDegats()
|
||||||
|
let degatsRoll = await new Roll(rollData.arme.system.degats+"+"+bDegats.value ).roll()
|
||||||
|
await this.showDiceSoNice(locRoll, game.settings.get("core", "rollMode"))
|
||||||
|
rollData.degatsRoll = foundry.utils.duplicate(degatsRoll)
|
||||||
|
rollData.degats = degatsRoll.total
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static async processAttaqueDistance(rollData) {
|
||||||
|
if (rollData.arme?.system.typeArme != "tir") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (rollData.isSuccess) {
|
||||||
|
// Roll the location
|
||||||
|
await this.getLocalisation(rollData)
|
||||||
|
// Now the degats
|
||||||
|
let degatsRoll = await new Roll(rollData.arme.system.degats).roll()
|
||||||
|
await this.showDiceSoNice(locRoll, game.settings.get("core", "rollMode"))
|
||||||
|
rollData.degatsRoll = foundry.utils.duplicate(degatsRoll)
|
||||||
|
rollData.degats = degatsRoll.total
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async rollTeDeum(rollData) {
|
static async rollTeDeum(rollData) {
|
||||||
|
|
||||||
@ -397,7 +450,7 @@ export class TeDeumUtility {
|
|||||||
rollData.difficulty = game.system.tedeum.config.difficulte[rollData.difficulty].value
|
rollData.difficulty = game.system.tedeum.config.difficulte[rollData.difficulty].value
|
||||||
let diceFormula = this.computeRollFormula(rollData, actor)
|
let diceFormula = this.computeRollFormula(rollData, actor)
|
||||||
if (!diceFormula) return;
|
if (!diceFormula) return;
|
||||||
console.log("RollData", rollData, diceFormula )
|
console.log("RollData", rollData, diceFormula)
|
||||||
|
|
||||||
// Performs roll
|
// Performs roll
|
||||||
let myRoll = await new Roll(diceFormula).roll()
|
let myRoll = await new Roll(diceFormula).roll()
|
||||||
@ -409,6 +462,9 @@ export class TeDeumUtility {
|
|||||||
|
|
||||||
await this.computeResults(rollData)
|
await this.computeResults(rollData)
|
||||||
|
|
||||||
|
await this.processAttaqueDistance(rollData)
|
||||||
|
await this.processAttaqueMelee(rollData)
|
||||||
|
|
||||||
let msg = await this.createChatWithRollMode(rollData.alias, {
|
let msg = await this.createChatWithRollMode(rollData.alias, {
|
||||||
content: await renderTemplate(`systems/fvtt-te-deum/templates/chat/chat-generic-result.hbs`, rollData)
|
content: await renderTemplate(`systems/fvtt-te-deum/templates/chat/chat-generic-result.hbs`, rollData)
|
||||||
})
|
})
|
||||||
@ -423,6 +479,15 @@ export class TeDeumUtility {
|
|||||||
if (rollData.isReussiteCritique || rollData.isEchecCritique) {
|
if (rollData.isReussiteCritique || rollData.isEchecCritique) {
|
||||||
actor.modifyXP(rollData.carac.key, 1)
|
actor.modifyXP(rollData.carac.key, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// gestion degats automatique
|
||||||
|
if (rollData.arme && rollData.defenderTokenId) {
|
||||||
|
let defenderToken = canvas.tokens.placeables.find(t => t.id == rollData.defenderTokenId)
|
||||||
|
if (defenderToken) {
|
||||||
|
let actor = defenderToken.actor
|
||||||
|
await actor.appliquerDegats(rollData)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -515,9 +580,9 @@ export class TeDeumUtility {
|
|||||||
type: "roll-data",
|
type: "roll-data",
|
||||||
rollMode: game.settings.get("core", "rollMode"),
|
rollMode: game.settings.get("core", "rollMode"),
|
||||||
difficulty: "pardefaut",
|
difficulty: "pardefaut",
|
||||||
bonusMalus : "0",
|
bonusMalus: "0",
|
||||||
isReroll : false,
|
isReroll: false,
|
||||||
enableProvidence : false,
|
enableProvidence: false,
|
||||||
malusBlessures: 0,
|
malusBlessures: 0,
|
||||||
config: foundry.utils.duplicate(game.system.tedeum.config)
|
config: foundry.utils.duplicate(game.system.tedeum.config)
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,9 @@ export class TeDeumArmeSchema extends foundry.abstract.TypeDataModel {
|
|||||||
|
|
||||||
schema.initiativeBonus = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 });
|
schema.initiativeBonus = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 });
|
||||||
|
|
||||||
schema.degats = new fields.StringField({ required: false, blank: true, initial: undefined });
|
schema.degats = new fields.StringField({ required: false, blank: true, initial: "0" });
|
||||||
|
schema.degatscrosse = new fields.StringField({ required: false, blank: true, initial: "0" });
|
||||||
|
|
||||||
let comp = []
|
let comp = []
|
||||||
for (let key of Object.keys(game.system.tedeum.config.armeCompetences)) {
|
for (let key of Object.keys(game.system.tedeum.config.armeCompetences)) {
|
||||||
comp.push(key);
|
comp.push(key);
|
||||||
|
@ -6,6 +6,8 @@ export class TeDeumArmureSchema extends foundry.abstract.TypeDataModel {
|
|||||||
|
|
||||||
const schema = {};
|
const schema = {};
|
||||||
|
|
||||||
|
schema.typeArmure = new fields.StringField({required: true, choices: ["cuir", "maille", "plate"], initial: "cuir"});
|
||||||
|
|
||||||
schema.localisation = new fields.SchemaField(
|
schema.localisation = new fields.SchemaField(
|
||||||
Object.values(game.system.tedeum.config.LOCALISATION).reduce((obj, loc) => {
|
Object.values(game.system.tedeum.config.LOCALISATION).reduce((obj, loc) => {
|
||||||
obj[loc.id] = new fields.SchemaField({
|
obj[loc.id] = new fields.SchemaField({
|
||||||
@ -15,6 +17,12 @@ export class TeDeumArmureSchema extends foundry.abstract.TypeDataModel {
|
|||||||
}, {})
|
}, {})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
schema.coutArmureLourde = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 });
|
||||||
|
|
||||||
|
schema.superposableCuir = new fields.BooleanField({initial: false});
|
||||||
|
schema.superposableMaille = new fields.BooleanField({initial: false});
|
||||||
|
schema.superposablePlate = new fields.BooleanField({initial: false});
|
||||||
|
|
||||||
schema.protection = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 });
|
schema.protection = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 });
|
||||||
|
|
||||||
schema.prix = new fields.NumberField({ ...requiredDouble, initial: 0, min: 0 });
|
schema.prix = new fields.NumberField({ ...requiredDouble, initial: 0, min: 0 });
|
||||||
|
@ -69,6 +69,18 @@ export class TeDeumRollDialog extends Dialog {
|
|||||||
html.find('#roll-enable-providence').change((event) => {
|
html.find('#roll-enable-providence').change((event) => {
|
||||||
this.rollData.enableProvidence = event.currentTarget.checked
|
this.rollData.enableProvidence = event.currentTarget.checked
|
||||||
})
|
})
|
||||||
|
html.find('#roll-portee-tir').change((event) => {
|
||||||
|
this.rollData.porteeTir = event.currentTarget.value
|
||||||
|
this.rollData.difficulty = game.system.tedeum.config.ARME_PORTEES[this.rollData.porteeTir].difficulty
|
||||||
|
this.rollData.porteeLabel = game.system.tedeum.config.ARME_PORTEES[this.rollData.porteeTir].label
|
||||||
|
})
|
||||||
|
html.find('#roll-tir-viser').change((event) => {
|
||||||
|
this.rollData.isViser = event.currentTarget.checked
|
||||||
|
})
|
||||||
|
html.find('#roll-tir-mouvement').change((event) => {
|
||||||
|
this.rollData.isMouvement = event.currentTarget.checked
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
MANIFEST-000150
|
MANIFEST-000178
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
2024/07/08-23:17:26.473944 7f0c0e0006c0 Recovering log #148
|
2024/09/13-16:56:38.223976 7f25efe006c0 Recovering log #176
|
||||||
2024/07/08-23:17:26.485257 7f0c0e0006c0 Delete type=3 #146
|
2024/09/13-16:56:38.233897 7f25efe006c0 Delete type=3 #174
|
||||||
2024/07/08-23:17:26.485363 7f0c0e0006c0 Delete type=0 #148
|
2024/09/13-16:56:38.233948 7f25efe006c0 Delete type=0 #176
|
||||||
2024/07/09-07:41:46.369958 7f0c07e006c0 Level-0 table #153: started
|
2024/09/13-22:14:00.926232 7f25eda006c0 Level-0 table #181: started
|
||||||
2024/07/09-07:41:46.369997 7f0c07e006c0 Level-0 table #153: 0 bytes OK
|
2024/09/13-22:14:00.926286 7f25eda006c0 Level-0 table #181: 0 bytes OK
|
||||||
2024/07/09-07:41:46.376145 7f0c07e006c0 Delete type=0 #151
|
2024/09/13-22:14:00.932359 7f25eda006c0 Delete type=0 #179
|
||||||
2024/07/09-07:41:46.376375 7f0c07e006c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end)
|
2024/09/13-22:14:00.932695 7f25eda006c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end)
|
||||||
2024/07/09-07:41:46.387648 7f0c07e006c0 Manual compaction at level-1 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end)
|
2024/09/13-22:14:00.944069 7f25eda006c0 Manual compaction at level-1 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
2024/07/07-21:34:33.552483 7fdbf4c006c0 Recovering log #144
|
2024/09/13-16:44:56.323710 7f25eea006c0 Recovering log #172
|
||||||
2024/07/07-21:34:33.562583 7fdbf4c006c0 Delete type=3 #142
|
2024/09/13-16:44:56.333849 7f25eea006c0 Delete type=3 #170
|
||||||
2024/07/07-21:34:33.562681 7fdbf4c006c0 Delete type=0 #144
|
2024/09/13-16:44:56.334005 7f25eea006c0 Delete type=0 #172
|
||||||
2024/07/08-07:54:26.000826 7fdbefe006c0 Level-0 table #149: started
|
2024/09/13-16:48:37.649738 7f25eda006c0 Level-0 table #177: started
|
||||||
2024/07/08-07:54:26.000937 7fdbefe006c0 Level-0 table #149: 0 bytes OK
|
2024/09/13-16:48:37.649778 7f25eda006c0 Level-0 table #177: 0 bytes OK
|
||||||
2024/07/08-07:54:26.043881 7fdbefe006c0 Delete type=0 #147
|
2024/09/13-16:48:37.678209 7f25eda006c0 Delete type=0 #175
|
||||||
2024/07/08-07:54:26.179609 7fdbefe006c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end)
|
2024/09/13-16:48:37.751232 7f25eda006c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end)
|
||||||
2024/07/08-07:54:26.179705 7fdbefe006c0 Manual compaction at level-1 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end)
|
2024/09/13-16:48:37.751329 7f25eda006c0 Manual compaction at level-1 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!zwC0H39ar5Pl1l92' @ 0 : 0; will stop at (end)
|
||||||
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
MANIFEST-000210
|
MANIFEST-000238
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
2024/07/08-23:17:26.460912 7f0c0ea006c0 Recovering log #208
|
2024/09/13-16:56:38.211583 7f25f4c006c0 Recovering log #236
|
||||||
2024/07/08-23:17:26.470623 7f0c0ea006c0 Delete type=3 #206
|
2024/09/13-16:56:38.222013 7f25f4c006c0 Delete type=3 #234
|
||||||
2024/07/08-23:17:26.470703 7f0c0ea006c0 Delete type=0 #208
|
2024/09/13-16:56:38.222108 7f25f4c006c0 Delete type=0 #236
|
||||||
2024/07/09-07:41:46.363059 7f0c07e006c0 Level-0 table #213: started
|
2024/09/13-22:14:00.913425 7f25eda006c0 Level-0 table #241: started
|
||||||
2024/07/09-07:41:46.363133 7f0c07e006c0 Level-0 table #213: 0 bytes OK
|
2024/09/13-22:14:00.913460 7f25eda006c0 Level-0 table #241: 0 bytes OK
|
||||||
2024/07/09-07:41:46.369813 7f0c07e006c0 Delete type=0 #211
|
2024/09/13-22:14:00.919824 7f25eda006c0 Delete type=0 #239
|
||||||
2024/07/09-07:41:46.376359 7f0c07e006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end)
|
2024/09/13-22:14:00.932639 7f25eda006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
2024/07/07-21:34:33.538979 7fdbf60006c0 Recovering log #204
|
2024/09/13-16:44:56.310788 7f25efe006c0 Recovering log #232
|
||||||
2024/07/07-21:34:33.549574 7fdbf60006c0 Delete type=3 #202
|
2024/09/13-16:44:56.321004 7f25efe006c0 Delete type=3 #230
|
||||||
2024/07/07-21:34:33.549666 7fdbf60006c0 Delete type=0 #204
|
2024/09/13-16:44:56.321148 7f25efe006c0 Delete type=0 #232
|
||||||
2024/07/08-07:54:26.137628 7fdbefe006c0 Level-0 table #209: started
|
2024/09/13-16:48:37.727963 7f25eda006c0 Level-0 table #237: started
|
||||||
2024/07/08-07:54:26.137703 7fdbefe006c0 Level-0 table #209: 0 bytes OK
|
2024/09/13-16:48:37.728006 7f25eda006c0 Level-0 table #237: 0 bytes OK
|
||||||
2024/07/08-07:54:26.179305 7fdbefe006c0 Delete type=0 #207
|
2024/09/13-16:48:37.751035 7f25eda006c0 Delete type=0 #235
|
||||||
2024/07/08-07:54:26.179685 7fdbefe006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end)
|
2024/09/13-16:48:37.751306 7f25eda006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end)
|
||||||
|
Binary file not shown.
BIN
packs/equipment/MANIFEST-000238
Normal file
BIN
packs/equipment/MANIFEST-000238
Normal file
Binary file not shown.
@ -136,6 +136,11 @@ select {
|
|||||||
color: #1c2058;
|
color: #1c2058;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li.folder > .folder-header h3 {
|
||||||
|
color:#AAA;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border: 1px solid #7a7971;
|
border: 1px solid #7a7971;
|
||||||
}
|
}
|
||||||
@ -375,15 +380,7 @@ table {
|
|||||||
height: 120px;
|
height: 120px;
|
||||||
padding: 0 3px;
|
padding: 0 3px;
|
||||||
}
|
}
|
||||||
li {
|
|
||||||
&.folder {
|
|
||||||
& > .folder-header {
|
|
||||||
h3 {
|
|
||||||
color: rgba(19, 18, 18, 0.95);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
input[type="text"], select[type="text"] {
|
input[type="text"], select[type="text"] {
|
||||||
background: white;
|
background: white;
|
||||||
color: #494e6b;
|
color: #494e6b;
|
||||||
|
@ -120,6 +120,11 @@ select {
|
|||||||
select:disabled {
|
select:disabled {
|
||||||
color: #1c2058;
|
color: #1c2058;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li.folder > .folder-header h3 {
|
||||||
|
color:#AAA;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border: 1px solid #7a7971;
|
border: 1px solid #7a7971;
|
||||||
}
|
}
|
||||||
@ -130,7 +135,6 @@ table {
|
|||||||
grid-gap: 10px;
|
grid-gap: 10px;
|
||||||
grid-gap: 10px;
|
grid-gap: 10px;
|
||||||
grid-gap: 10px;
|
grid-gap: 10px;
|
||||||
grid-gap: 10px;
|
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -270,6 +274,7 @@ table {
|
|||||||
font-weight: bold
|
font-weight: bold
|
||||||
}
|
}
|
||||||
.fvtt-te-deum .tabs .item.active {
|
.fvtt-te-deum .tabs .item.active {
|
||||||
|
-webkit-text-decoration: underline;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
@ -355,9 +360,7 @@ table {
|
|||||||
height: 120px;
|
height: 120px;
|
||||||
padding: 0 3px;
|
padding: 0 3px;
|
||||||
}
|
}
|
||||||
li.folder > .folder-header h3 {
|
|
||||||
color: rgba(19, 18, 18, 0.95);
|
|
||||||
}
|
|
||||||
input[type="text"], select[type="text"] {
|
input[type="text"], select[type="text"] {
|
||||||
background: white;
|
background: white;
|
||||||
color: #494e6b;
|
color: #494e6b;
|
||||||
@ -898,6 +901,7 @@ ul, li {
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
padding: 4px 12px 0px 12px;
|
padding: 4px 12px 0px 12px;
|
||||||
|
-webkit-text-decoration: none;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-shadow: 0px 1px 0px #4d3534;
|
text-shadow: 0px 1px 0px #4d3534;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -922,6 +926,7 @@ ul, li {
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin: 2px 2px 2px 2px;
|
margin: 2px 2px 2px 2px;
|
||||||
padding: 2px 2px 2px 2px;
|
padding: 2px 2px 2px 2px;
|
||||||
|
-webkit-text-decoration: none;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-shadow: 0px 1px 0px #4d3534;
|
text-shadow: 0px 1px 0px #4d3534;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -1084,8 +1089,8 @@ ul, li {
|
|||||||
flex-shrink: 7;
|
flex-shrink: 7;
|
||||||
}
|
}
|
||||||
.item-controls-fixed {
|
.item-controls-fixed {
|
||||||
min-width: 2.8rem;
|
min-width: 2rem;
|
||||||
max-width: 2.8rem;
|
max-width: 2rem;
|
||||||
}
|
}
|
||||||
.item-controls-fixed-full {
|
.item-controls-fixed-full {
|
||||||
min-width: 3rem;
|
min-width: 3rem;
|
||||||
@ -1105,6 +1110,7 @@ ul, li {
|
|||||||
max-height: 12px;
|
max-height: 12px;
|
||||||
}
|
}
|
||||||
.character-summary-rollable {
|
.character-summary-rollable {
|
||||||
|
-webkit-text-decoration: underline;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
.te-deum-roll-dialog .window-header {
|
.te-deum-roll-dialog .window-header {
|
||||||
|
@ -101,7 +101,6 @@ table {border: 1px solid #7a7971;}
|
|||||||
grid-column: span 2 / span 2;
|
grid-column: span 2 / span 2;
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
grid-gap: 10px;
|
grid-gap: 10px;
|
||||||
grid-gap: 10px;
|
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -333,6 +332,7 @@ textarea,
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fvtt-te-deum .tabs .item.active {
|
.fvtt-te-deum .tabs .item.active {
|
||||||
|
-webkit-text-decoration: underline;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
@ -1046,6 +1046,7 @@ ul, li {
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
padding: 4px 12px 0px 12px;
|
padding: 4px 12px 0px 12px;
|
||||||
|
-webkit-text-decoration: none;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-shadow: 0px 1px 0px #4d3534;
|
text-shadow: 0px 1px 0px #4d3534;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -1072,6 +1073,7 @@ ul, li {
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin: 2px 2px 2px 2px;
|
margin: 2px 2px 2px 2px;
|
||||||
padding: 2px 2px 2px 2px;
|
padding: 2px 2px 2px 2px;
|
||||||
|
-webkit-text-decoration: none;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-shadow: 0px 1px 0px #4d3534;
|
text-shadow: 0px 1px 0px #4d3534;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -1272,6 +1274,7 @@ ul, li {
|
|||||||
max-height: 12px;
|
max-height: 12px;
|
||||||
}
|
}
|
||||||
.character-summary-rollable {
|
.character-summary-rollable {
|
||||||
|
-webkit-text-decoration: underline;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
system.json
12
system.json
@ -3,8 +3,10 @@
|
|||||||
"esmodules": [
|
"esmodules": [
|
||||||
"modules/tedeum-main.js"
|
"modules/tedeum-main.js"
|
||||||
],
|
],
|
||||||
"gridDistance": 1,
|
"grid": {
|
||||||
"gridUnits": "m",
|
"distance": 2,
|
||||||
|
"units": "m"
|
||||||
|
},
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
"lang": "fr",
|
"lang": "fr",
|
||||||
@ -48,7 +50,7 @@
|
|||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-te-deum/raw/branch/master/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/fvtt-te-deum/raw/branch/master/system.json",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "11",
|
"minimum": "12",
|
||||||
"verified": "12"
|
"verified": "12"
|
||||||
},
|
},
|
||||||
"id": "fvtt-te-deum",
|
"id": "fvtt-te-deum",
|
||||||
@ -62,8 +64,8 @@
|
|||||||
},
|
},
|
||||||
"title": "Te Deum pour Un Massacre, le Jeu de Rôles",
|
"title": "Te Deum pour Un Massacre, le Jeu de Rôles",
|
||||||
"url": "https://www.uberwald.me/gitea/public/fvtt-te-deum",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-te-deum",
|
||||||
"version": "12.0.2",
|
"version": "12.0.3",
|
||||||
"download": "https://www.uberwald.me/gitea/public/fvtt-te-deum/archive/fvtt-te-deum-v12.0.2.zip",
|
"download": "https://www.uberwald.me/gitea/public/fvtt-te-deum/archive/fvtt-te-deum-v12.0.3.zip",
|
||||||
"background": "",
|
"background": "",
|
||||||
"flags": {
|
"flags": {
|
||||||
"hotReload": {
|
"hotReload": {
|
||||||
|
@ -150,9 +150,14 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item carac-box">
|
<li class="item flexrow list-item carac-box">
|
||||||
<label class="item-left-pad item-field item-field-label-medium">Bienveillance</label>
|
<label class="item-left-pad item-field item-field-label-medium">Bienveillance</label>
|
||||||
<input class="input-numeric-short" type="text" name="system.bienveillance.value" data-dtype="Number" />
|
<input class="input-numeric-short" type="text" name="system.bienveillance.value" value="{{system.bienveillance.value}}" data-dtype="Number" />
|
||||||
<label class="item-field item-field-label-long"></label>
|
<label class="item-left-pad item-field item-field-label-medium">Bonus dégats</label>
|
||||||
<label class="item-field item-field -label-short"></label>
|
<input class="input-numeric-short" type="text" value="{{bonusDegats.label}}" disabled data-dtype="Number" />
|
||||||
|
</li>
|
||||||
|
<li class="item flexrow list-item carac-box">
|
||||||
|
<label class="item-left-pad item-field item-field-label-medium">Armures Lourdes</label>
|
||||||
|
<input class="input-numeric-short" type="text" value="{{nbArmuresLourdes}}" disabled data-dtype="Number" /> /
|
||||||
|
<input class="input-numeric-short" type="text" value="{{pointsArmuresLourdes.value}}" disabled data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
31
templates/chat/chat-blessure-result.hbs
Normal file
31
templates/chat/chat-blessure-result.hbs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<div class="chat-message-header">
|
||||||
|
{{#if actorImg}}
|
||||||
|
<img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
|
||||||
|
{{/if}}
|
||||||
|
<h4 class="chat-actor-name">{{alias}}</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
{{#if img}}
|
||||||
|
<div >
|
||||||
|
<img class="chat-icon" src="{{img}}" alt="{{name}}" />
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="flexcol">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<ul>
|
||||||
|
{{#if blessure}}
|
||||||
|
<li>{{defenderName}} a subi une blessure!</li>
|
||||||
|
<li>Gravité : {{blessure.name}}</li>
|
||||||
|
<li>Localisation : {{loc.label}}</li>
|
||||||
|
{{else}}
|
||||||
|
<li>Aucune blessure subie par {{defenderName}}</li>
|
||||||
|
{{/if}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
@ -33,9 +33,19 @@
|
|||||||
{{#if enableProvidence}}
|
{{#if enableProvidence}}
|
||||||
<li>Un niveau de Providence a été utilisé !</li>
|
<li>Un niveau de Providence a été utilisé !</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#if isViser}}
|
||||||
|
<li>Bonus de visée (+1 niveau)</li>
|
||||||
|
{{/if}}
|
||||||
|
{{#if isMouvement}}
|
||||||
|
<li>Malus de cible petite ou en mouvement (-1 niveau)</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<li>Dés: {{diceFormula}} </li>
|
<li>Dés: {{diceFormula}} </li>
|
||||||
<li>Difficulté: {{difficulty}} </li>
|
{{#if isTir}}
|
||||||
|
<li>Portée: {{porteeLabel}} ( {{difficulty}} )</li>
|
||||||
|
{{else}}
|
||||||
|
<li>Difficulté: {{difficulty}} </li>
|
||||||
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -53,6 +63,12 @@
|
|||||||
<li><strong class="chat-result-failure">Echec critique ! 1 XP gagné en {{carac.name}}.</strong> </li>
|
<li><strong class="chat-result-failure">Echec critique ! 1 XP gagné en {{carac.name}}.</strong> </li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if loc}}
|
||||||
|
<li><strong>Attaque réussie !!</strong> </li>
|
||||||
|
<li>Localisation: {{loc.label}} </li>
|
||||||
|
<li>Dégats: {{degats}} {{#if isReussiteCritique}}(Augmentez la gravité de la blessure d'un niveau){{/if}}</li>
|
||||||
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
<div>
|
<div>
|
||||||
<a class="chat-command-button" data-chat-command="opposition">
|
<a class="chat-command-button" data-chat-command="opposition">
|
||||||
|
@ -40,12 +40,37 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if arme}}
|
||||||
|
{{#if isTir}}
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Portée : </span>
|
||||||
|
<select class="" type="text" id="roll-portee-tir" value="{{porteeTir}}" data-dtype="String">
|
||||||
|
{{#select porteeTir}}
|
||||||
|
{{#each config.ARME_PORTEES as |portee key|}}
|
||||||
|
<option value="{{key}}">{{portee.label}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Viser : </span>
|
||||||
|
<input type="checkbox" id="roll-tir-viser" {{checked isViser}} />
|
||||||
|
</div>
|
||||||
|
<div class="flexrow">
|
||||||
|
<span class="roll-dialog-label">Cible petite/en mouvement : </span>
|
||||||
|
<input type="checkbox" id="roll-tir-mouvement" {{checked isMouvement}} />
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span class="roll-dialog-label">Difficulté : </span>
|
<span class="roll-dialog-label">Difficulté : </span>
|
||||||
<select class="" type="text" id="roll-difficulty" value="{{difficulty}}" data-dtype="String">
|
<select class="" type="text" id="roll-difficulty" value="{{difficulty}}" data-dtype="String">
|
||||||
{{selectOptions config.difficulte selected=difficulty valueAttr="key" labelAttr="label"}}
|
{{selectOptions config.difficulte selected=difficulty valueAttr="key" labelAttr="label"}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -45,6 +45,12 @@
|
|||||||
name="system.degats" value="{{system.degats}}" data-dtype="String" />
|
name="system.degats" value="{{system.degats}}" data-dtype="String" />
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-name-label-long">Valeur d'echec critique (ie 1 par défaut)</label>
|
||||||
|
<input type="text" class="padd-right numeric-input item-field-label-short"
|
||||||
|
name="system.valeurEchecCritique" value="{{system.valeurEchecCritique}}" data-dtype="Numeric" />
|
||||||
|
</li>
|
||||||
|
|
||||||
{{#if (eq system.typeArme "melee")}}
|
{{#if (eq system.typeArme "melee")}}
|
||||||
<li class="flexrow">
|
<li class="flexrow">
|
||||||
<label class="item-name-label-long">Allonge</label>
|
<label class="item-name-label-long">Allonge</label>
|
||||||
@ -66,6 +72,11 @@
|
|||||||
{{selectOptions config.competencesRecharge selected=system.competenceRecharge labelAttr="label"}}
|
{{selectOptions config.competencesRecharge selected=system.competenceRecharge labelAttr="label"}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-name-label-long">Dégâts avec crosse (si applicable)</label>
|
||||||
|
<input type="text" class="padd-right numeric-input item-field-label-short"
|
||||||
|
name="system.degatscrosse" value="{{system.degatscrosse}}" data-dtype="String" />
|
||||||
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#each system.specificites as |spec specId|}}
|
{{#each system.specificites as |spec specId|}}
|
||||||
|
@ -18,6 +18,12 @@
|
|||||||
|
|
||||||
<div class="tab" data-group="primary">
|
<div class="tab" data-group="primary">
|
||||||
<ul>
|
<ul>
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-name-label-long">Type d'armure</label>
|
||||||
|
<select name="system.typeArmure">
|
||||||
|
{{selectOptions config.armureTypes selected=system.typeArmure labelAttr="label"}}
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
|
||||||
{{#each system.localisation as |armure armId|}}
|
{{#each system.localisation as |armure armId|}}
|
||||||
<li class="flexrow">
|
<li class="flexrow">
|
||||||
@ -32,6 +38,24 @@
|
|||||||
name="system.protection" value="{{system.protection}}" data-dtype="Number" />
|
name="system.protection" value="{{system.protection}}" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-name-label-long">Cout en pièces d'Armure Lourde</label>
|
||||||
|
<input type="text" class="padd-right numeric-input item-field-label-short"
|
||||||
|
name="system.coutArmureLourde" value="{{system.coutArmureLourde}}" data-dtype="Number" />
|
||||||
|
</li>
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-name-label-long">Superposable avec du cuir?</label>
|
||||||
|
<input type="checkbox" name="system.superposableCuir" {{checked system.superposableCuir}} />
|
||||||
|
</li>
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-name-label-long">Superposable avec armures de maille?</label>
|
||||||
|
<input type="checkbox" name="system.superposableMaille" {{checked system.superposableMaille}} />
|
||||||
|
</li>
|
||||||
|
<li class="flexrow">
|
||||||
|
<label class="item-name-label-long">Superposable avec armures de plate?</label>
|
||||||
|
<input type="checkbox" name="system.superposablePlate" {{checked system.superposablePlate}} />
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="flexrow">
|
<li class="flexrow">
|
||||||
<label class="item-name-label-long">Equipé?</label>
|
<label class="item-name-label-long">Equipé?</label>
|
||||||
<input type="checkbox" name="system.equipe" {{checked system.equipe}} />
|
<input type="checkbox" name="system.equipe" {{checked system.equipe}} />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user