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) {
|
async moralIncDec(ajustementMoral) {
|
||||||
|
const actorData = Misc.data(this);
|
||||||
if (ajustementMoral != 0) {
|
if (ajustementMoral != 0) {
|
||||||
const actorData = Misc.data(this);
|
|
||||||
let moral = Misc.toInt(actorData.data.compteurs.moral.value) + ajustementMoral
|
let moral = Misc.toInt(actorData.data.compteurs.moral.value) + ajustementMoral
|
||||||
if (moral > 3) { // exaltation
|
if (moral > 3) { // exaltation
|
||||||
const exaltation = Misc.toInt(actorData.data.compteurs.exaltation.value) + moral - 3;
|
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) {
|
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) {
|
if (limit) {
|
||||||
chance = Math.min(chance.value, this.getChance())
|
chance = Math.min(chance.value, this.getChance())
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,12 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
{{#if rolled.isETotal}}
|
||||||
|
Le sort a des effets imprévus!
|
||||||
|
{{else if rolled.isSuccess}}
|
||||||
|
{{#unless isSortReserve}}
|
||||||
<span class="poesie-extrait">
|
<span class="poesie-extrait">
|
||||||
{{{selectedSort.data.description}}}
|
{{{selectedSort.data.description}}}
|
||||||
</span>
|
</span>
|
||||||
|
{{/unless}}
|
||||||
|
{{/if}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user