Préparation ajout empoignade, ActiveEffect #502
@ -2155,10 +2155,7 @@ export class RdDActor extends Actor {
|
|||||||
async appliquerAjoutExperience(rollData, display) {
|
async appliquerAjoutExperience(rollData, display) {
|
||||||
if (!this.isPersonnage()) return;
|
if (!this.isPersonnage()) return;
|
||||||
let xpData = await this._appliquerExperience(rollData.rolled, rollData.selectedCarac.label, rollData.competence);
|
let xpData = await this._appliquerExperience(rollData.rolled, rollData.selectedCarac.label, rollData.competence);
|
||||||
if (!xpData) {
|
if (xpData && display) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (display) {
|
|
||||||
let message = {
|
let message = {
|
||||||
whisher: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
whisher: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
||||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-gain-xp.html`, xpData)
|
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-gain-xp.html`, xpData)
|
||||||
@ -2168,7 +2165,7 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _appliquerAppelMoral(rollData, display = true) {
|
async _appliquerAppelMoral(rollData) {
|
||||||
if (!this.isPersonnage()) return;
|
if (!this.isPersonnage()) return;
|
||||||
if (!rollData.useMoral) return;
|
if (!rollData.useMoral) return;
|
||||||
if (rollData.rolled.isEchec ||
|
if (rollData.rolled.isEchec ||
|
||||||
|
@ -727,7 +727,7 @@ export class RdDCombat {
|
|||||||
if (!await this.accorderEntite('avant-attaque')) {
|
if (!await this.accorderEntite('avant-attaque')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (arme.data.cac =='empoignade' && this.attacker.isCombatTouche()){
|
if (arme.data.cac == 'empoignade' && this.attacker.isCombatTouche()) {
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
alias: this.attacker.name,
|
alias: this.attacker.name,
|
||||||
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.attacker.name),
|
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.attacker.name),
|
||||||
@ -736,7 +736,7 @@ export class RdDCombat {
|
|||||||
competence: competence
|
competence: competence
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let rollData = this._prepareAttaque(competence, arme);
|
let rollData = this._prepareAttaque(competence, arme);
|
||||||
@ -963,7 +963,7 @@ export class RdDCombat {
|
|||||||
console.log("RdDCombat._onEchecTotal >>>", rollData);
|
console.log("RdDCombat._onEchecTotal >>>", rollData);
|
||||||
|
|
||||||
const arme = rollData.arme;
|
const arme = rollData.arme;
|
||||||
const avecArme = !['', 'sans-armes', 'armes-naturelles'].includes( arme?.data.categorie_parade ?? '');
|
const avecArme = !['', 'sans-armes', 'armes-naturelles'].includes(arme?.data.categorie_parade ?? '');
|
||||||
const action = (rollData.attackerRoll ? (arme ? "la parade" : "l'esquive") : "l'attaque");
|
const action = (rollData.attackerRoll ? (arme ? "la parade" : "l'esquive") : "l'attaque");
|
||||||
ChatUtility.createChatWithRollMode(this.defender.name, {
|
ChatUtility.createChatWithRollMode(this.defender.name, {
|
||||||
content: `<strong>Maladresse à ${action}!</strong> ` + await RdDRollTables.getMaladresse({ arme: avecArme })
|
content: `<strong>Maladresse à ${action}!</strong> ` + await RdDRollTables.getMaladresse({ arme: avecArme })
|
||||||
|
Loading…
Reference in New Issue
Block a user