Gestion des signes draconiques #455
@ -541,9 +541,8 @@ export class RdDActor extends Actor {
|
||||
ChatMessage.create(message);
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async dormir(heures = 1) {
|
||||
async dormir(heures) {
|
||||
let message = {
|
||||
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
||||
content: `${this.name}: Vous dormez ${heures == 1 ? 'une' : heures} heure${heures == 1 ? '' : 's'}.`
|
||||
@ -552,9 +551,9 @@ export class RdDActor extends Actor {
|
||||
for (let i = 0; i < heures; i++) {
|
||||
await this._recupererEthylisme(message);
|
||||
await this.recupererFatigue(message);
|
||||
await this.recuperationReve(message);
|
||||
await this.recuperationReve(message, 1);
|
||||
if (EffetsDraconiques.isDonDoubleReve(this)) {
|
||||
await this.recuperationReve(message);
|
||||
await this.recuperationReve(message, 2);
|
||||
}
|
||||
}
|
||||
ChatMessage.create(message);
|
||||
@ -620,12 +619,14 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async recuperationReve(message) {
|
||||
async recuperationReve(message, demiHeure) {
|
||||
const seuil = Misc.templateData(this).reve.seuil.value;
|
||||
const reveActuel = this.getReveActuel();
|
||||
if (reveActuel >= seuil) {
|
||||
if (demiHeure == 1) {
|
||||
message.content += `Vous avez suffisament rêvé, au delà de votre seuil. `;
|
||||
}
|
||||
}
|
||||
else {
|
||||
let deRecuperation = (await DeDraconique.ddr("selfroll")).total;
|
||||
console.log("recuperationReve", deRecuperation);
|
||||
|
Loading…
Reference in New Issue
Block a user