Corrections des TMRs et météo #539

Merged
uberwald merged 6 commits from VincentVk/foundryvtt-reve-de-dragon:v1.5-tmrs into v1.5 2022-06-26 16:23:58 +02:00
2 changed files with 17 additions and 4 deletions
Showing only changes of commit 59ece09357 - Show all commits

View File

@ -2568,7 +2568,7 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
conjurerPossession(possession) {
let draconic = this.getBestDraconic()
let draconic = this.getBestDraconic();
RdDPossession.managePossession(this, draconic, possession)
}

View File

@ -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 = {