Cleanup
This commit is contained in:
parent
3543ce60cb
commit
5424763ad6
@ -28,7 +28,7 @@ export class RdDItemArme extends Item {
|
||||
switch (arme ? arme.type : '') {
|
||||
case 'arme': return arme;
|
||||
case 'competencecreature':
|
||||
return RdDItemCompetenceCreature.toActionArme(arme);
|
||||
return RdDItemCompetenceCreature.armeNaturelle(arme);
|
||||
}
|
||||
return RdDItemArme.mainsNues();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Misc } from "./misc.js";
|
||||
|
||||
import { RdDCombatManager } from "./rdd-combat.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -12,12 +12,12 @@ export class RdDItemCompetenceCreature extends Item {
|
||||
rollData.competence.system.categorie = "creature"
|
||||
rollData.selectedCarac = rollData.carac.carac_creature
|
||||
if (rollData.competence.system.iscombat) {
|
||||
rollData.arme = RdDItemCompetenceCreature.toActionArme(rollData.competence);
|
||||
rollData.arme = RdDItemCompetenceCreature.armeNaturelle(rollData.competence);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static toActionArme(competencecreature) {
|
||||
static armeNaturelle(competencecreature) {
|
||||
if (RdDItemCompetenceCreature.isCompetenceAttaque(competencecreature)) {
|
||||
// si c'est un Item compétence: cloner pour ne pas modifier lma compétence
|
||||
let arme = (competencecreature instanceof Item) ? competencecreature.clone(): competencecreature;
|
||||
|
@ -222,7 +222,7 @@ export class RdDCombatManager extends Combat {
|
||||
|
||||
static listActionsCreature(competences) {
|
||||
return competences.filter(it => RdDItemCompetenceCreature.isCompetenceAttaque(it))
|
||||
.map(it => RdDItemCompetenceCreature.toActionArme(it));
|
||||
.map(it => RdDItemCompetenceCreature.armeNaturelle(it));
|
||||
}
|
||||
|
||||
static listActionsPossessions(actor) {
|
||||
|
Loading…
Reference in New Issue
Block a user