Gestion des signes draconiques #455

Closed
vincent.vandeme wants to merge 233 commits from v1.4-signes-draconiques into master
Showing only changes of commit cc24471926 - Show all commits

View File

@ -3309,6 +3309,23 @@ export class RdDActor extends Actor {
}
}
/* -------------------------------------------- */
consommerPotionGenerique( potionData ) {
potionData.alias = this.name;
if (potionData.data.categorie.includes('Enchante')) {
potionData.enchanteTexte = "enchantée";
potionData.isEnchante = true;
} else {
potionData.enchanteTexte = "";
potionData.isEnchante = false;
}
ChatMessage.create({
whisper: ChatUtility.getWhisperRecipientsAndGMs(game.user.name),
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-consommer-potion-generique.html`, potionData )
});
}
/* -------------------------------------------- */
async consommerPotion( potion ) {
const potionData = Misc.data(potion);
@ -3318,9 +3335,9 @@ export class RdDActor extends Actor {
} else if( potionData.data.categorie.includes('Repos')) {
this.consommerPotionRepos(potionData);
} else {
//TODO
this.consommerPotionGenerique(potionData);
}
await this.deleteEmbeddedDocuments('Item', [ potion._id ] );
await this.deleteEmbeddedDocuments('Item', [ potion.id ] );
}
/* -------------------------------------------- */