v1.5 #3
@ -2568,7 +2568,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
conjurerPossession(possession) {
|
||||
let draconic = this.getBestDraconic()
|
||||
let draconic = this.getBestDraconic();
|
||||
RdDPossession.managePossession(this, draconic, possession)
|
||||
}
|
||||
|
||||
|
@ -139,18 +139,18 @@ export class RdDPossession {
|
||||
return;
|
||||
}
|
||||
|
||||
const defender = target.actor
|
||||
const defender = target.actor;
|
||||
if ( !possession) {
|
||||
possession = this.searchPossessionFromEntite( attacker, defender)
|
||||
if ( !possession) {
|
||||
possession = await this.createPossession(attacker, defender)
|
||||
}
|
||||
}
|
||||
possession = duplicate(possession)
|
||||
possession = duplicate(possession);
|
||||
|
||||
this.updateEtatPossession(possession)
|
||||
let rollData = {
|
||||
competence: competence,
|
||||
competence: competence.data.data.niveau >=0 ? competence : RdDPossession.competenceNonHautRevant(),
|
||||
possession: possession,
|
||||
possede: defender.name,
|
||||
possesseur: attacker.name,
|
||||
@ -177,6 +177,19 @@ export class RdDPossession {
|
||||
dialog.render(true)
|
||||
}
|
||||
|
||||
static competenceNonHautRevant() {
|
||||
return {
|
||||
img: 'systems/foundryvtt-reve-de-dragon/icons/competence_vigilance.webp',
|
||||
name: 'non Haut-rêvant',
|
||||
data: {
|
||||
data: {
|
||||
niveau: 0,
|
||||
defaut_carac: "reve",
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async createPossession( attacker, defender ) {
|
||||
let possessionData = {
|
||||
|
Loading…
Reference in New Issue
Block a user