diff --git a/module/actor.js b/module/actor.js
index 79d9cd52..f62d8fb8 100644
--- a/module/actor.js
+++ b/module/actor.js
@@ -189,6 +189,8 @@ export class RdDActor extends Actor {
explications += "
Attaque parée/esquivée !";
} else {
explications += "
Esquive/Parade échouée, encaissement !";
+ if (rollData.needSignificative)
+ explications += "Significative nécessaire!";
encaisser = true;
}
} else { // This is the attack roll!
@@ -770,7 +772,9 @@ export class RdDActor extends Actor {
async santeIncDec(name, inc ) {
const sante = duplicate(this.data.data.sante);
let data = sante[name];
- let minValue = name == "vie" ? Number(-this.data.data.attributs.sconst.value) : 0;
+ let minValue = 0;
+ if (this.type == 'personnage')
+ minValue = name == "vie" ? Number(-this.data.data.attributs.sconst.value) : 0;
let newValue = Math.max(minValue, Math.min(data.value + inc, data.max));
if (name == "endurance" && this.data.type != 'entite' ) {
@@ -1131,13 +1135,20 @@ export class RdDActor extends Actor {
const blessureLegere = (result.legeres > 0 ? "une blessure légère" : "");
const blessureGrave = (result.graves > 0 ? "une blessure grave" : "");
const blessureCritique = (result.critiques > 0 ? "une blessure critique" : "");
- ChatMessage.create({
- title: "Blessures !", content: this.data.name + " a encaissé : " +
- "
Encaissement final : " + degatsReel +
- "
" + blessureLegere + blessureGrave + blessureCritique +
- "
Et a perdu : " +
- "
" + result.endurance + " Endurance et " + result.vie + " Points de Vie"
- });
+ let commonMsg = { title: "Blessures !", content: this.data.name + " a encaissé : " +
+ "
Encaissement final : " + degatsReel +
+ "
" + blessureLegere + blessureGrave + blessureCritique }
+ let addonMsg = "
Et a perdu :
" + result.endurance + " Endurance et " + result.vie + " Points de Vie";
+ if ( this.hasPlayerOwner ) {
+ commonMsg.content += addonMsg; // Message pour tout le monde
+ ChatMessage.create( commonMsg );
+ } else { // Le defenseur n'est pas un PJ, donc message complet uniquement pour le MJ
+ ChatMessage.create( commonMsg ); // Message pour tout le monde
+ let gmMsg = duplicate(commonMsg);
+ gmMsg.content = addonMsg; // Et message complémentaire uniquement pour le MJ
+ gmMsg.whisper = ChatMessage.getWhisperRecipients( "GM" );
+ ChatMessage.create( gmMsg );
+ }
this.computeEtatGeneral();
this.sheet.render(true);
diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js
index 6f4f7706..9882191b 100644
--- a/module/rdd-tmr-dialog.js
+++ b/module/rdd-tmr-dialog.js
@@ -167,7 +167,7 @@ export class RdDTMRDialog extends Dialog {
}
/* -------------------------------------------- */
- checkQuitterTMR() {
+ checkQuitterTMR() {
if ( this.actor.data.data.reve.reve.value == 0) {
ChateMessage.create( { content: "Vos Points de Rêve sont à 0 : vous quittez les Terres médianes !"} );
this.close();
@@ -398,6 +398,7 @@ export class RdDTMRDialog extends Dialog {
if (this.viewOnly) {
return;
}
+
let origEvent = event.data.originalEvent;
let myself = event.target.tmrObject;
diff --git a/styles/simple.css b/styles/simple.css
index b89b550e..d9c3cec4 100644
--- a/styles/simple.css
+++ b/styles/simple.css
@@ -342,10 +342,11 @@ table {border: 1px solid #7a7971;}
text-align: right;
}
-.rdddialog {
+.rdddialog .dialog-roll-sort s{
width: 600px;
height: 430px;
- z-index: 99999;
+ z-index: 9999;
+ display: block;
}
.table-resolution-carac {
diff --git a/system.json b/system.json
index 63754909..657e00fd 100644
--- a/system.json
+++ b/system.json
@@ -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.74",
+ "version": "0.9.75",
"minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.6",
"templateVersion": 47,
diff --git a/templates/actor-entite-sheet.html b/templates/actor-entite-sheet.html
index 4ca8b509..9880315e 100644
--- a/templates/actor-entite-sheet.html
+++ b/templates/actor-entite-sheet.html
@@ -74,7 +74,7 @@
name="data.competencecreature[{{key}}].data.niveau" compname="{{comp.name}}"
value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" />