Gestion de la tête Augmentation de seuil
This commit is contained in:
18
module/tmr/augmentation-seuil.js
Normal file
18
module/tmr/augmentation-seuil.js
Normal file
@ -0,0 +1,18 @@
|
||||
import { Grammar } from "../grammar.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
import { Misc } from "../misc.js";
|
||||
|
||||
export class AugmentationSeuil extends Draconique {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
type() { return 'tete' }
|
||||
match(item) { return Draconique.isTeteDragon(item) && Grammar.toLowerCaseNoAccent(item.name).includes('augmentation du seuil de reve'); }
|
||||
manualMessage() { return false }
|
||||
async onActorCreateOwned(actor, tete) {
|
||||
const seuil = Misc.toInt(actor.system.reve.seuil.value) + 2;
|
||||
await actor.update({ "system.reve.seuil.value": seuil })
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user