foundryvtt-reve-de-dragon/module/item-competencecreature.js

24 lines
668 B
JavaScript
Raw Normal View History

/* -------------------------------------------- */
export class RdDItemCompetenceCreature extends Item {
/* -------------------------------------------- */
static toArme(item) {
if (item.type == 'competencecreature' && item.data.iscombat) {
let arme = { name: item.name, data: duplicate(item.data) };
mergeObject(arme.data,
{
competence: item.name,
resistance: 100,
equipe: true,
penetration: 0,
force: 0,
rapide: true
});
return arme;
}
console.error("RdDItem.toArme(", item, ") : impossible de transformer l'Item en arme");
return undefined;
}
}