Gestion attaques v2 et initiative
This commit is contained in:
@@ -10,15 +10,15 @@ export class RdDItemCompetenceCreature extends RdDItem {
|
||||
|
||||
static get defaultIcon() { return "systems/foundryvtt-reve-de-dragon/icons/competence_defaut.webp" }
|
||||
|
||||
isAttaque() { return this.getCategorieAttaque() != undefined }
|
||||
isParade() { return this.system.iscombat && (this.system.categorie_parade ?? '') != '' }
|
||||
isBouclier() { return this.system.categorie_parade.includes('bouclier') }
|
||||
|
||||
attaqueCreature() {
|
||||
const categorieAttaque = this.getCategorieAttaque()
|
||||
if (categorieAttaque != undefined) {
|
||||
const initative = RdDInitiative.calculInitiative(this.system.niveau, this.system.carac_value);
|
||||
const initative = RdDInitiative.getRollInitiative(this.system.carac_value, this.system.niveau);
|
||||
const attaque = {
|
||||
name: this.name,
|
||||
label: this.name,
|
||||
action: this.isCompetencePossession() ? 'possession' : 'attaque',
|
||||
initOnly: false,
|
||||
arme: new RdDItemArme({
|
||||
@@ -51,10 +51,6 @@ export class RdDItemCompetenceCreature extends RdDItem {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
isAttaque() {
|
||||
return this.getCategorieAttaque() != undefined
|
||||
}
|
||||
|
||||
getCategorieAttaque() {
|
||||
switch (this.system.categorie) {
|
||||
case "melee":
|
||||
|
||||
Reference in New Issue
Block a user