Merge branch 'master-improve' into 'master'
Fix jet de moral/chance See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!178
This commit is contained in:
commit
d35f3ce5a2
@ -1427,9 +1427,8 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async moralIncDec(ajustementMoral) {
|
||||
|
||||
const actorData = Misc.data(this);
|
||||
if (ajustementMoral != 0) {
|
||||
const actorData = Misc.data(this);
|
||||
let moral = Misc.toInt(actorData.data.compteurs.moral.value) + ajustementMoral
|
||||
if (moral > 3) { // exaltation
|
||||
const exaltation = Misc.toInt(actorData.data.compteurs.exaltation.value) + moral - 3;
|
||||
@ -2281,7 +2280,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async chanceActuelleIncDec(value, limit = true) {
|
||||
chance = Math.max(Misc.templateData(this).compteurs.chance.value + value, 0);
|
||||
let chance = Math.max(Misc.templateData(this).compteurs.chance.value + value, 0);
|
||||
if (limit) {
|
||||
chance = Math.min(chance.value, this.getChance())
|
||||
}
|
||||
|
@ -24,6 +24,12 @@
|
||||
</span>
|
||||
</div>
|
||||
<hr>
|
||||
{{#if rolled.isETotal}}
|
||||
Le sort a des effets imprévus!
|
||||
{{else if rolled.isSuccess}}
|
||||
{{#unless isSortReserve}}
|
||||
<span class="poesie-extrait">
|
||||
{{{selectedSort.data.description}}}
|
||||
</span>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
Loading…
Reference in New Issue
Block a user