Possession pour non haut-rêvant
This commit is contained in:
parent
5868bf16e0
commit
59ece09357
@ -2568,7 +2568,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
conjurerPossession(possession) {
|
conjurerPossession(possession) {
|
||||||
let draconic = this.getBestDraconic()
|
let draconic = this.getBestDraconic();
|
||||||
RdDPossession.managePossession(this, draconic, possession)
|
RdDPossession.managePossession(this, draconic, possession)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,18 +139,18 @@ export class RdDPossession {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const defender = target.actor
|
const defender = target.actor;
|
||||||
if ( !possession) {
|
if ( !possession) {
|
||||||
possession = this.searchPossessionFromEntite( attacker, defender)
|
possession = this.searchPossessionFromEntite( attacker, defender)
|
||||||
if ( !possession) {
|
if ( !possession) {
|
||||||
possession = await this.createPossession(attacker, defender)
|
possession = await this.createPossession(attacker, defender)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
possession = duplicate(possession)
|
possession = duplicate(possession);
|
||||||
|
|
||||||
this.updateEtatPossession(possession)
|
this.updateEtatPossession(possession)
|
||||||
let rollData = {
|
let rollData = {
|
||||||
competence: competence,
|
competence: competence.data.data.niveau >=0 ? competence : RdDPossession.competenceNonHautRevant(),
|
||||||
possession: possession,
|
possession: possession,
|
||||||
possede: defender.name,
|
possede: defender.name,
|
||||||
possesseur: attacker.name,
|
possesseur: attacker.name,
|
||||||
@ -177,6 +177,19 @@ export class RdDPossession {
|
|||||||
dialog.render(true)
|
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 ) {
|
static async createPossession( attacker, defender ) {
|
||||||
let possessionData = {
|
let possessionData = {
|
||||||
|
Loading…
Reference in New Issue
Block a user