Corrige competence humanoide

This commit is contained in:
sladecraven 2020-11-25 20:30:48 +01:00
parent 192a530d58
commit 253073fff9
4 changed files with 13 additions and 8 deletions

View File

@ -263,13 +263,17 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
_calculBonusDommages(carac, arme, isForce=false) {
const dmgArme = parseInt(arme.data.dommages) + (isForce)? 5 : 0;
if ( arme.name.toLowerCase() == "esquive") return 0; // Specific case management
let dmgArme = 0;
const dmgPerso = parseInt(this.data.data.attributs.plusdom.value);
if (carac.label == "Tir") {
return dmgArme;
}
if (carac.label == "Lancer") {
return dmgArme + Math.min(dmgArme, dmgPerso);
if ( arme.data.dommages ) {
dmgArme = parseInt(arme.data.dommages) + (isForce)? 5 : 0;
if (carac.label == "Tir") {
return dmgArme;
}
if (carac.label == "Lancer") {
return dmgArme + Math.min(dmgArme, dmgPerso);
}
}
return dmgArme + dmgPerso;
}

View File

@ -499,6 +499,7 @@ section.sheet-body:after, section.sheet-body div:after {
font-weight: bold;
flex-grow: 0;
}
.arme-label,
.competence-label,
.description-label {
flex-grow: 2;

View File

@ -2,7 +2,7 @@
"name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT",
"version": "0.9.89",
"version": "0.9.90",
"minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.6",
"templateVersion": 48,

View File

@ -320,7 +320,7 @@
</li>
{{#each data.combat as |arme key|}}
<li class="item flexrow list-item" data-item-id="{{arme._id}}">
<span class="arme-label competence-label" name="data.armes[{{key}}].name"><a data-competence-name="{{arme.data.competence}}">{{arme.name}}</a></span>
<span class="arme-label" name="data.armes[{{key}}].name"><a data-competence-name="{{arme.data.competence}}">{{arme.name}}</a></span>
<span class="competence-label" name="data.armes[{{key}}].data.competence">{{arme.data.competence}}</span>
<span class="competence-value" name="data.armes[{{key}}].data.niveau">{{numberFormat arme.data.niveau decimals=0 sign=true}}</span>
<span class="competence-value" name="data.armes[{{key}}].data.dommages">{{numberFormat arme.data.dommages decimals=0 sign=true}}</span>