Nouveau roll-dialog: mode attaque
This commit is contained in:
@@ -54,34 +54,37 @@ export class RdDItemCompetenceCreature extends Item {
|
||||
const categorieAttaque = RdDItemCompetenceCreature.getCategorieAttaque(comp)
|
||||
if (categorieAttaque != undefined) {
|
||||
const initative = RdDInitiative.calculInitiative(comp.system.niveau, comp.system.carac_value);
|
||||
return {
|
||||
const armeComp = 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,
|
||||
mortalite: comp.system.mortalite,
|
||||
dommages: comp.system.dommages,
|
||||
equipe: true,
|
||||
resistance: 100,
|
||||
penetration: 0,
|
||||
force: 0,
|
||||
rapide: true,
|
||||
}
|
||||
});
|
||||
const attaque = {
|
||||
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,
|
||||
}
|
||||
}),
|
||||
arme: armeComp,
|
||||
comp: comp,
|
||||
// main: '',
|
||||
carac: { key: comp.name, value: comp.system.carac_value },
|
||||
equipe: true,
|
||||
mortalite: comp.system.mortalite,
|
||||
dmg: comp.system.dommages,
|
||||
initiative: initative
|
||||
}
|
||||
};
|
||||
return attaque
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
Reference in New Issue
Block a user