forked from public/foundryvtt-reve-de-dragon
Support des blurettes
On peut définir Blurette comme type d'entité. Pas de jet poour s'accorder aux blurettes.
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE } from "./constants";
|
||||
|
||||
/**
|
||||
* Extend the base Dialog entity by defining a custom window to perform roll.
|
||||
* @extends {Dialog}
|
||||
@ -7,15 +9,19 @@ export class RdDEncaisser extends Dialog {
|
||||
/* -------------------------------------------- */
|
||||
constructor(html, actor) {
|
||||
// Common conf
|
||||
const buttonsCreatures = {
|
||||
"mortel": { label: "Mortel", callback: html => this.performEncaisser("mortel") },
|
||||
"non-mortel": { label: "Non-mortel", callback: html => this.performEncaisser("non-mortel") },
|
||||
"sonne": { label: "Sonné", callback: html => this.actor.setSonne() },
|
||||
};
|
||||
const buttonsEntitesCauchemar = {
|
||||
"cauchemar": { label: "cauchemar", callback: html => this.performEncaisser("cauchemar") }
|
||||
};
|
||||
const buttons = actor.isEntiteCauchemar() ? buttonsEntitesCauchemar : buttonsCreatures;
|
||||
let buttons = {};
|
||||
if (!actor.isEntite()){
|
||||
buttons = {
|
||||
"mortel": { label: "Mortel", callback: html => this.performEncaisser("mortel") },
|
||||
"non-mortel": { label: "Non-mortel", callback: html => this.performEncaisser("non-mortel") },
|
||||
"sonne": { label: "Sonné", callback: html => this.actor.setSonne() },
|
||||
};
|
||||
}
|
||||
else if (actor.isEntite([ENTITE_BLURETTE, ENTITE_INCARNE])){
|
||||
buttons = {
|
||||
"cauchemar": { label: "cauchemar", callback: html => this.performEncaisser("cauchemar") }
|
||||
}
|
||||
}
|
||||
|
||||
let dialogConf = {
|
||||
title: "Jet d'Encaissement",
|
||||
|
Reference in New Issue
Block a user