Fix entite
This commit is contained in:
parent
6271c75508
commit
7198eb621d
@ -3582,14 +3582,16 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
isEntite(typeentite = [] ) {
|
isEntite(typeentite = [] ) {
|
||||||
return this.data.type == 'entite' && (typeentite.length == 0 || typeentite.includes(this.data.data.typeentite));
|
return this.data.type == 'entite' && (typeentite.length == 0 || typeentite.includes(this.data.data.definition.typeentite));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
isEntiteAccordee(attaquant) {
|
isEntiteAccordee(attaquant) {
|
||||||
if (!this.isEntite([ENTITE_INCARNE]))
|
if (!this.isEntite([ENTITE_INCARNE])) {
|
||||||
{ return true; }
|
return true;
|
||||||
|
}
|
||||||
let resonnance = Misc.templateData(this).sante.resonnance;
|
let resonnance = Misc.templateData(this).sante.resonnance;
|
||||||
|
console.log("RESONN", resonnance)
|
||||||
return (resonnance.actors.find(it => it == attaquant.id));
|
return (resonnance.actors.find(it => it == attaquant.id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,8 +197,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static listActionsPossessions(actor) {
|
static listActionsPossessions(actor) {
|
||||||
return RdDCombatManager._indexActions(actor.getPossessions().map(p =>
|
return RdDCombatManager._indexActions(actor.getPossessions().map(p => {
|
||||||
{
|
|
||||||
return {
|
return {
|
||||||
name: p.name,
|
name: p.name,
|
||||||
action: 'conjurer',
|
action: 'conjurer',
|
||||||
@ -962,8 +961,7 @@ export class RdDCombat {
|
|||||||
const arme = this.defender.getArmeParade(armeParadeId);
|
const arme = this.defender.getArmeParade(armeParadeId);
|
||||||
console.log("RdDCombat.parade >>>", attackerRoll, armeParadeId, arme);
|
console.log("RdDCombat.parade >>>", attackerRoll, armeParadeId, arme);
|
||||||
const competence = Misc.templateData(arme)?.competence;
|
const competence = Misc.templateData(arme)?.competence;
|
||||||
if (competence == undefined)
|
if (competence == undefined) {
|
||||||
{
|
|
||||||
console.error("Pas de compétence de parade associée à ", arme);
|
console.error("Pas de compétence de parade associée à ", arme);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1247,6 +1245,8 @@ export class RdDCombat {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* retourne true si on peut continuer, false si on ne peut pas continuer */
|
/* retourne true si on peut continuer, false si on ne peut pas continuer */
|
||||||
async accorderEntite(when = 'avant-encaissement') {
|
async accorderEntite(when = 'avant-encaissement') {
|
||||||
|
console.log("TETETET", game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar"), this.defender.isEntite([ENTITE_INCARNE]), this.defender.isEntiteAccordee(this.attacker))
|
||||||
|
|
||||||
if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar")
|
if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar")
|
||||||
|| this.defender == undefined
|
|| this.defender == undefined
|
||||||
|| !this.defender.isEntite([ENTITE_INCARNE])
|
|| !this.defender.isEntite([ENTITE_INCARNE])
|
||||||
|
@ -158,6 +158,7 @@ export class RdDResolutionTable {
|
|||||||
if (difficulte < -10) {
|
if (difficulte < -10) {
|
||||||
return duplicate(levelDown.find(levelData => levelData.level == difficulte));
|
return duplicate(levelDown.find(levelData => levelData.level == difficulte));
|
||||||
}
|
}
|
||||||
|
console.log("DATA :", caracValue, difficulte)
|
||||||
return duplicate(RdDResolutionTable.resolutionTable[caracValue][difficulte + 10]);
|
return duplicate(RdDResolutionTable.resolutionTable[caracValue][difficulte + 10]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
|
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"flags": {},
|
"flags": {},
|
||||||
"version": "1.5.87",
|
"version": "1.5.88",
|
||||||
"minimumCoreVersion": "0.8.0",
|
"minimumCoreVersion": "0.8.0",
|
||||||
"compatibleCoreVersion": "9",
|
"compatibleCoreVersion": "9",
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
@ -500,7 +500,7 @@
|
|||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v1.5/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v1.5/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-1.5.87.zip",
|
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-1.5.88.zip",
|
||||||
"protected": false,
|
"protected": false,
|
||||||
"gridDistance": 1,
|
"gridDistance": 1,
|
||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
|
Loading…
Reference in New Issue
Block a user