Fix "esthétiques" de messages
- verrouiller - ajout de détails de particulières dans le message de défense - le personnage monte dans les TMRs - indiquer quel personnage dort (plutôt que le joueur)
This commit is contained in:
parent
a56471eb21
commit
9ee1b0250d
@ -409,7 +409,7 @@ export class RdDActor extends Actor {
|
|||||||
async dormir(heures = 1) {
|
async dormir(heures = 1) {
|
||||||
let message = {
|
let message = {
|
||||||
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
||||||
content: "Vous dormez " + heures + " heure" + (heures > 1 ? "s" : "")
|
content: this.name +": Vous dormez " + heures + " heure" + (heures > 1 ? "s" : "")
|
||||||
};
|
};
|
||||||
await this.recupereEndurance(message);
|
await this.recupereEndurance(message);
|
||||||
for (let i = 0; i < heures; i++) {
|
for (let i = 0; i < heures; i++) {
|
||||||
@ -2105,7 +2105,7 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Notification au MJ
|
// Notification au MJ
|
||||||
ChatMessage.create({ content: game.user.name + " est monté dans les TMR en mode : " + mode, whisper: ChatMessage.getWhisperRecipients("GM") });
|
ChatMessage.create({ content: this.name + " est monté dans les TMR en mode : " + mode, whisper: ChatMessage.getWhisperRecipients("GM") });
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
fatigue: {
|
fatigue: {
|
||||||
|
@ -59,7 +59,7 @@ export class ChatUtility {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static getWhisperRecipientsAndGMs(name) {
|
static getWhisperRecipientsAndGMs(name) {
|
||||||
return ChatMessage.getWhisperRecipients(name)
|
return ChatMessage.getWhisperRecipients(name)
|
||||||
.concat(this.getUsers(user => user.isGM));
|
.concat(ChatMessage.getWhisperRecipients('GM'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -64,7 +64,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
data.actorId = this.actor._id;
|
data.actorId = this.actor._id;
|
||||||
}
|
}
|
||||||
data.bonusCaseList = RdDItemSort.getBonusCaseList(data, true);
|
data.bonusCaseList = RdDItemSort.getBonusCaseList(data, true);
|
||||||
data.isGM = game.user.isGM; // Pour vérouiller certaines éditions
|
data.isGM = game.user.isGM; // Pour verrouiller certaines éditions
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
@ -458,14 +458,13 @@ export class RdDCombat {
|
|||||||
const paramDemandeDefense = {
|
const paramDemandeDefense = {
|
||||||
passeArme: attackerRoll.passeArme,
|
passeArme: attackerRoll.passeArme,
|
||||||
essais: attackerRoll.essais,
|
essais: attackerRoll.essais,
|
||||||
// surprise: this.defender.getSurprise(true),
|
|
||||||
// surprise: attackerRoll.ajustements.attaqueDefenseurSurpris.used,
|
|
||||||
defender: this.defender,
|
defender: this.defender,
|
||||||
attackerId: this.attackerId,
|
attackerId: this.attackerId,
|
||||||
defenderTokenId: this.defenderTokenId,
|
defenderTokenId: this.defenderTokenId,
|
||||||
mainsNues: attackerRoll.dmg.mortalite != 'mortel' && this.defender.getCompetence("Corps à corps"),
|
mainsNues: attackerRoll.dmg.mortalite != 'mortel' && this.defender.getCompetence("Corps à corps"),
|
||||||
armes: this._filterArmesParade(this.defender.data.items, attackerRoll.competence, attackerRoll.arme),
|
armes: this._filterArmesParade(this.defender.data.items, attackerRoll.competence, attackerRoll.arme),
|
||||||
diffLibre: attackerRoll.ajustements?.diffLibre?.value ?? 0,
|
diffLibre: attackerRoll.ajustements?.diffLibre?.value ?? 0,
|
||||||
|
attaqueParticuliere: attackerRoll.particuliere,
|
||||||
dmg: attackerRoll.dmg
|
dmg: attackerRoll.dmg
|
||||||
};
|
};
|
||||||
let message = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-demande-defense.html', paramDemandeDefense);
|
let message = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-demande-defense.html', paramDemandeDefense);
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
<div class="flex-group-left flexcol">
|
<div class="flex-group-left flexcol">
|
||||||
<span><a class="lock-unlock-sheet"><img class="small-button-container"
|
<span><a class="lock-unlock-sheet"><img class="small-button-container"
|
||||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
|
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
|
||||||
>{{#if data.editCaracComp}}Vérouiller{{else}}Dévérouiller{{/if}}</a></span>
|
>{{#if data.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
||||||
<ul class="carac-list alterne-list">
|
<ul class="carac-list alterne-list">
|
||||||
{{#each data.carac as |carac key|}}
|
{{#each data.carac as |carac key|}}
|
||||||
{{#if carac.isLevelUp}}
|
{{#if carac.isLevelUp}}
|
||||||
@ -214,7 +214,7 @@
|
|||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span><a class="lock-unlock-sheet"><img class="small-button-container"
|
<span><a class="lock-unlock-sheet"><img class="small-button-container"
|
||||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
|
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
|
||||||
>{{#if data.editCaracComp}}Vérouiller{{else}}Dévérouiller{{/if}}</a></span>
|
>{{#if data.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
||||||
<span><a id="show-hide-competences"><img class="small-button-container"
|
<span><a id="show-hide-competences"><img class="small-button-container"
|
||||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.showCompNiveauBase}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer tout"
|
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.showCompNiveauBase}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer tout"
|
||||||
>{{#if data.showCompNiveauBase}}Montrer tout{{else}}Filtrer{{/if}}</a></span>
|
>{{#if data.showCompNiveauBase}}Montrer tout{{else}}Filtrer{{/if}}</a></span>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div data-passearme="{{passeArme}}">
|
<div data-passearme="{{passeArme}}">
|
||||||
<h4 class="rdd-roll-part"><strong>Réussite particulière en attaque</strong></h4>
|
<h4 class="rdd-roll-part">{{alias}} réussit une attaque particulière!</strong></h4>
|
||||||
<br>
|
<br>
|
||||||
<a class="chat-card-button" id="particuliere-attaque" data-mode="force" data-attackerId="{{attackerId}}">
|
<a class="chat-card-button" id="particuliere-attaque" data-mode="force" data-attackerId="{{attackerId}}">
|
||||||
Attaquer en Force
|
Attaquer en Force
|
||||||
|
@ -5,7 +5,13 @@
|
|||||||
<span><strong>{{defender.name}}</strong> doit :</span>
|
<span><strong>{{defender.name}}</strong> doit :</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span><strong>{{defender.name}}</strong> doit se défendre
|
<span><strong>{{defender.name}}</strong> doit se défendre
|
||||||
{{#if (eq surprise 'demi')}} avec une significative {{/if}} :
|
{{~#if (eq surprise 'demi')}} avec une significative {{/if~}}
|
||||||
|
{{~#if attaqueParticuliere}} contre une <strong>particulière en
|
||||||
|
{{~#if (eq attaqueParticuliere 'finesse')}} finesse
|
||||||
|
{{else if (eq attaqueParticuliere 'force')}} force
|
||||||
|
{{else}} rapidité
|
||||||
|
{{/if~}}</strong>
|
||||||
|
{{/if~}} :
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<span class='chat-card-button-area'>
|
<span class='chat-card-button-area'>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{{~#if (eq dmg.mortalite 'non-mortel')}}
|
{{~#if (eq dmg.mortalite 'non-mortel')}}
|
||||||
<span class="rdd-roll-norm">({{numberFormat dmg.total decimals=0 sign=true}})</span> (dommages non-mortel)
|
<span class="rdd-roll-norm">({{numberFormat dmg.total decimals=0 sign=true}})</span> (dommages non-mortel)
|
||||||
{{else if (eq dmg.mortalite 'mortel')}}
|
{{else if (eq dmg.mortalite 'mortel')}}
|
||||||
<span class="rdd-roll-echec">{{numberFormat dmg.total decimals=0 sign=true}}</span>.
|
<span class="rdd-roll-echec">{{numberFormat dmg.total decimals=0 sign=true}}</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="rdd-roll-etotal">{{numberFormat dmg.total decimals=0 sign=true}}</span> (entités de cauchemar)
|
<span class="rdd-roll-etotal">{{numberFormat dmg.total decimals=0 sign=true}}</span> (entités de cauchemar)
|
||||||
{{~/if}}.
|
{{~/if}}.
|
||||||
|
Loading…
Reference in New Issue
Block a user