Merge pull request '11.2.12 - Le somnifère d'Akarlikarlikar' (#693) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: #693
This commit is contained in:
commit
c1c192f710
@ -1,4 +1,7 @@
|
||||
# 11.2
|
||||
## 11.2.12 - Le somnifère d'Akarlikarlikar
|
||||
- Fix: les potions enchantées n'empêchent plus de finir correctement Château Dormant
|
||||
|
||||
## 11.2.11 - Le miroir d'Akarlikarlikar
|
||||
- Changement des images de compétence de créatures morsure/pinces pour être dans le thème
|
||||
- Suppression de la bordure autour des portraits d'acteurs, remplacés par un légèr éclaircissement du fond
|
||||
|
@ -152,23 +152,26 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
/* -------------------------------------------- */
|
||||
async $perteRevePotionsEnchantees() {
|
||||
let potions = this.itemTypes[TYPES.potion]
|
||||
.filter(it => it.system.categorie.toLowerCase().includes('enchant') && !potion.system.prpermanent)
|
||||
.filter(it => Grammar.includesLowerCaseNoAccent(it.system.categorie, 'enchanté') && !it.system.prpermanent)
|
||||
|
||||
const potionUpdates = await Promise.all(potions.map(async potion => {
|
||||
console.log(potion)
|
||||
let nouveauReve = (potion.system.pr > 0) ? potion.system.pr - 1 : 0;
|
||||
const message = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-potionenchantee-chateaudormant.html`, {
|
||||
pr: nouveauReve,
|
||||
alias: this.name,
|
||||
potionName: potion.name,
|
||||
potionImg: potion.img
|
||||
})
|
||||
const potionUpdates = await Promise.all(potions.map(async it => {
|
||||
const nouveauReve = Math.max(it.system.pr - 1, 0)
|
||||
ChatMessage.create({
|
||||
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
||||
content: message
|
||||
});
|
||||
return { _id: potion._id, 'system.pr': nouveauReve };
|
||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-potionenchantee-chateaudormant.html`, {
|
||||
pr: nouveauReve,
|
||||
alias: this.name,
|
||||
potionName: it.name,
|
||||
potionImg: it.img
|
||||
})
|
||||
})
|
||||
return {
|
||||
_id: it._id,
|
||||
'system.pr': nouveauReve,
|
||||
'system.quantite': nouveauReve > 0 ? it.system.quantite : 0
|
||||
}
|
||||
}))
|
||||
|
||||
await this.updateEmbeddedDocuments('Item', potionUpdates);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"id": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"version": "11.2.11",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.2.11.zip",
|
||||
"version": "11.2.12",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.2.12.zip",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json",
|
||||
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
|
||||
"compatibility": {
|
||||
|
Loading…
Reference in New Issue
Block a user