Rework combat
This commit is contained in:
parent
a72108db5b
commit
5e5ddd1c3b
@ -334,7 +334,7 @@ export class HeritiersUtility {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static computeArmeDegats(rollData, actor) {
|
||||
rollData.degatsArme = rollData.arme.system.degats + rollData.marge
|
||||
@ -416,18 +416,19 @@ export class HeritiersUtility {
|
||||
actor.setFlag("world", "last-initiative", rollData.finalResult)
|
||||
}
|
||||
|
||||
// Compute damages, cf p 187
|
||||
if (rollData.arme && rollData.isSuccess) {
|
||||
this.computeArmeDegats(rollData, actor)
|
||||
}
|
||||
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-les-heritiers/templates/chat-generic-result.html`, rollData)
|
||||
}, rollData)
|
||||
|
||||
if (rollData.defenderTokenId && rollData.arme && rollData.arme.system.categorie != "trait") {
|
||||
await this.displayUneDefense(rollData, actor, "Parade", rollData.defenderParade)
|
||||
await this.displayUneDefense(rollData, actor, "Esquive", rollData.defenderEsquive)
|
||||
if (rollData.defenderTokenId && rollData.arme) {
|
||||
if (rollData.arme.system.categorie != "trait" && rollData.arme.system.categorie != "poing" && rollData.arme.system.categorie != "epaule" ) {
|
||||
await this.displayUneDefense(rollData, actor, "Parade", rollData.defenderParade)
|
||||
await this.displayUneDefense(rollData, actor, "Esquive", rollData.defenderEsquive)
|
||||
} else if (rollData.sdValue) {
|
||||
this.displayUneDefense(rollData, actor, "A Distance", rollData.sdValue)
|
||||
} else {
|
||||
ui.notifications.warn("Pas de difficulté positionnée pour l'attaque à distance.")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -559,7 +560,7 @@ export class HeritiersUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static createChatWithRollMode(name, chatOptions, rollData = undefined, rollMode = undefined) {
|
||||
if ( rollMode == undefined) {
|
||||
if (rollMode == undefined) {
|
||||
rollMode = game.settings.get("core", "rollMode")
|
||||
}
|
||||
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions, rollData)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "fvtt-les-heritiers",
|
||||
"description": "Les Héritiers pour FoundryVTT",
|
||||
"version": "10.0.34",
|
||||
"version": "10.0.35",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Uberwald/LeRatierBretonnien",
|
||||
@ -19,7 +19,7 @@
|
||||
"gridUnits": "m",
|
||||
"license": "LICENSE.txt",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/raw/branch/master/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.34.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.35.zip",
|
||||
"languages": [
|
||||
{
|
||||
"lang": "fr",
|
||||
|
@ -47,9 +47,6 @@
|
||||
{{#if (gt sdValue "-1")}}
|
||||
{{#if isSuccess}}
|
||||
<li class="chat-success">Succès...
|
||||
{{#if arme}}
|
||||
<li>Dégats : {{degatsArme}}</li>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{else}}
|
||||
<li class="chat-failure">Echec...</li>
|
||||
@ -65,9 +62,6 @@
|
||||
|
||||
{{#if isCriticalSuccess}}
|
||||
<li class="chat-success">Réussite Critique !!!</li>
|
||||
{{#if arme}}
|
||||
<li>Vous pouvez augmenter les dégats de +2 ou bien bénéficier d'une Aubaine.</li>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if isCriticalFailure}}
|
||||
<li class="chat-failure">Echec Critique !!!</li>
|
||||
|
Loading…
Reference in New Issue
Block a user