Statut inconscient pour les créatures
This commit is contained in:
@@ -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