Statut inconscient pour les créatures
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
- lors de la consoimmation suite à un achat, les jets d'appréciation/éthylisme
|
||||
sont faits par l'acheteur. Du coup, c'est lui qui lance le jet d'appréciation
|
||||
(pour un service ou un plat de qualité), et ses dés sont utilisés avec dice-so-nice
|
||||
- les créatures ont le statut Inconscient quand leur endurance est à 0
|
||||
- Fenêtre de jets V2
|
||||
- Les soins de blessures sont correctement appliqués
|
||||
|
||||
|
||||
@@ -2931,15 +2931,6 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
await this.diminuerQuantiteObjet(potion.id, 1, { supprimerSiZero: potion.supprimer });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async onUpdateActor(update, options, actorId) {
|
||||
const updatedEndurance = update?.system?.sante?.endurance
|
||||
if (updatedEndurance && options.diff) {
|
||||
await this.setEffect(STATUSES.StatusUnconscious, updatedEndurance.value == 0)
|
||||
}
|
||||
await super.onUpdateActor(update, options, actorId)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async onPreUpdateItem(item, change, options, id) {
|
||||
if (item.isCompetencePersonnage() && item.system.defaut_carac && item.system.xp) {
|
||||
|
||||
@@ -242,6 +242,14 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
|
||||
return Math.max(0, Math.min(maxEndVie, maxEndGraves, maxEndCritiques));
|
||||
}
|
||||
|
||||
async onUpdateActor(update, options, actorId) {
|
||||
const updatedEndurance = update?.system?.sante?.endurance
|
||||
if (updatedEndurance && options.diff) {
|
||||
await this.setEffect(STATUSES.StatusUnconscious, updatedEndurance.value == 0)
|
||||
}
|
||||
await super.onUpdateActor(update, options, actorId)
|
||||
}
|
||||
|
||||
async onCreateItem(item, options, id) {
|
||||
await this.changeItemEffects(item)
|
||||
await super.onCreateItem(item, options, id)
|
||||
|
||||
Reference in New Issue
Block a user