Gestion des armes dans hotbar
This commit is contained in:
parent
724c556b9e
commit
76a02d60ca
@ -3070,6 +3070,18 @@ export class RdDActor extends RdDBaseActor {
|
|||||||
this.currentTMR.render(true);
|
this.currentTMR.render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
getArmeCompetence(arme) {
|
||||||
|
let comp = arme.system.competence
|
||||||
|
if (!comp || comp.name == "") {
|
||||||
|
comp = arme.system.lancer
|
||||||
|
}
|
||||||
|
if ( !comp || comp.name == "") {
|
||||||
|
comp = arme.system.tir
|
||||||
|
}
|
||||||
|
return comp
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
rollArme(arme) {
|
rollArme(arme) {
|
||||||
if (!Targets.hasTargets()) {
|
if (!Targets.hasTargets()) {
|
||||||
@ -3081,19 +3093,20 @@ export class RdDActor extends RdDBaseActor {
|
|||||||
title: 'Ne pas utiliser les automatisation de combat',
|
title: 'Ne pas utiliser les automatisation de combat',
|
||||||
buttonLabel: "Pas d'automatisation",
|
buttonLabel: "Pas d'automatisation",
|
||||||
onAction: async () => {
|
onAction: async () => {
|
||||||
this.rollCompetence(arme.system.competence, { tryTarget: false })
|
this.rollCompetence(this.getArmeCompetence(arme), { tryTarget: false })
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Targets.selectOneToken(target => {
|
Targets.selectOneToken(target => {
|
||||||
if (Targets.isTargetEntite(target)) {
|
if (Targets.isTargetEntite(target)) {
|
||||||
ui.notifications.warn(`Vous ne pouvez pas attaquer une entité non incarnée avec votre ${arme.name}!!!!`);
|
ui.notifications.warn(`Vous ne pouvez pas attaquer une entité non incarnée avec votre ${arme.name}!!!!`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const competence = this.getCompetence(this.getArmeCompetence(arme))
|
||||||
const competence = this.getCompetence(arme.system.competence)
|
console.log("RollArme", competence, arme)
|
||||||
if (competence.isCompetencePossession()) {
|
if (competence.isCompetencePossession()) {
|
||||||
return RdDPossession.onAttaquePossession(target, this, competence);
|
return RdDPossession.onAttaquePossession(target, this, competence);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"id": "foundryvtt-reve-de-dragon",
|
"id": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"version": "11.0.17",
|
"version": "11.0.18",
|
||||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.0.17.zip",
|
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.0.18.zip",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json",
|
||||||
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
|
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user