forked from public/foundryvtt-reve-de-dragon
Préparation roll-dialog attaques
Les attaques ne sont plus des armes modifiées
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { ITEM_TYPES } from "./constants.js";
|
||||
import { Grammar } from "./grammar.js";
|
||||
import { RdDInitiative } from "./initiative.mjs";
|
||||
import { RdDItem } from "./item.js";
|
||||
|
||||
export const CATEGORIES_COMPETENCES_CREATURES = {
|
||||
"generale": { base: 0, label: "Générale" },
|
||||
@@ -49,6 +50,41 @@ export class RdDItemCompetenceCreature extends Item {
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
static attaqueCreature(comp) {
|
||||
const categorieAttaque = RdDItemCompetenceCreature.getCategorieAttaque(comp)
|
||||
if (categorieAttaque != undefined) {
|
||||
const initative = RdDInitiative.calculInitiative(comp.system.niveau, comp.system.carac_value);
|
||||
return {
|
||||
name: comp.name,
|
||||
action: comp.isCompetencePossession() ? 'possession' : 'attaque',
|
||||
initOnly: false,
|
||||
arme: new RdDItem({
|
||||
name: comp.name,
|
||||
type: ITEM_TYPES.arme,
|
||||
img: comp.img,
|
||||
system: {
|
||||
competence: comp.name,
|
||||
cac: categorieAttaque == "naturelle" ? "naturelle" : "",
|
||||
niveau: comp.system.niveau,
|
||||
initiative: initative,
|
||||
equipe: true,
|
||||
resistance: 100,
|
||||
dommagesReels: comp.system.dommages,
|
||||
penetration: 0,
|
||||
force: 0,
|
||||
rapide: true,
|
||||
}
|
||||
}),
|
||||
comp: comp,
|
||||
// main: '',
|
||||
carac: { key: comp.name, value: comp.system.carac_value },
|
||||
equipe: true,
|
||||
dmg: comp.system.dommages,
|
||||
initiative: initative
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static isAttaque(item) {
|
||||
|
Reference in New Issue
Block a user