Fix calcul defense
This commit is contained in:
parent
2c12ec38fb
commit
9e023d3f01
@ -76,6 +76,7 @@ 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
|
||||
@ -175,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)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -185,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)
|
||||
}
|
||||
|
@ -716,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));
|
||||
@ -728,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"
|
||||
@ -752,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>";
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "fvtt-hawkmoon-cyd",
|
||||
"description": "Hawkmoon RPG for FoundryVTT (CYD system - French)",
|
||||
"version": "11.1.0",
|
||||
"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-11.1.0.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-11.1.1.zip",
|
||||
"languages": [
|
||||
{
|
||||
"lang": "fr",
|
||||
|
@ -134,6 +134,10 @@
|
||||
<label class="short-label">Résumé</label>
|
||||
</span>
|
||||
<div class="item-filler"> </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">
|
||||
@ -162,6 +166,10 @@
|
||||
<label class="short-label">Résumé</label>
|
||||
</span>
|
||||
<div class="item-filler"> </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">
|
||||
@ -346,6 +354,8 @@
|
||||
</span>
|
||||
<div class="item-filler"> </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>
|
||||
|
@ -81,6 +81,10 @@
|
||||
<label class="short-label">Résumé</label>
|
||||
</span>
|
||||
<div class="item-filler"> </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">
|
||||
|
@ -192,9 +192,13 @@
|
||||
<label class="short-label">Résumé</label>
|
||||
</span>
|
||||
<div class="item-filler"> </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>
|
||||
@ -221,9 +225,13 @@
|
||||
<label class="short-label">Résumé</label>
|
||||
</span>
|
||||
<div class="item-filler"> </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>
|
||||
|
Loading…
Reference in New Issue
Block a user