forked from public/foundryvtt-reve-de-dragon
Ajout item Blessure
This commit is contained in:
19
module/item/blessure.js
Normal file
19
module/item/blessure.js
Normal file
@ -0,0 +1,19 @@
|
||||
import { RdDItem } from "../item.js";
|
||||
|
||||
export class RdDItemBlessure extends RdDItem {
|
||||
|
||||
static get defaultIcon() {
|
||||
return "systems/foundryvtt-reve-de-dragon/icons/sante/blessure.webp";
|
||||
}
|
||||
|
||||
async calculerFinPeriodeTemporel(debut) {
|
||||
return await debut.nouveauJour().addJours(this.system.gravite);
|
||||
}
|
||||
|
||||
async onFinPeriode(oldTimestamp, newTimestamp) {
|
||||
if (this.system.gravite <= 0) {
|
||||
await super.onFinPeriode(oldTimestamp, newTimestamp)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user