Compare commits
No commits in common. "v1.5" and "foundryvtt-reve-de-dragon-1.5.87" have entirely different histories.
v1.5
...
foundryvtt
@ -1217,39 +1217,21 @@ export class RdDActor extends Actor {
|
||||
if (srcId != destId && itemId != destId) { // déplacement de l'objet
|
||||
const dest = this.getObjet(destId);
|
||||
const src = this.getObjet(srcId);
|
||||
if (dest?.isEquipementSimilaire(item)) {
|
||||
// changer de conteneur
|
||||
if (this.conteneurPeutContenir(dest, item)) {
|
||||
await this.enleverDeConteneur(item, src, params.onEnleverConteneur);
|
||||
await this.ajouterDansConteneur(item, dest, params.onAjouterDansConteneur);
|
||||
}
|
||||
else if (dest?.isEquipementSimilaire(item)) {
|
||||
await this.regrouperEquipementsSimilaires(item, dest);
|
||||
result = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
const cible = this.getContenantOrParent(dest);
|
||||
// changer de conteneur
|
||||
if (cible == undefined) {
|
||||
await this.enleverDeConteneur(item, src, params.onEnleverConteneur);
|
||||
}
|
||||
else if (this.conteneurPeutContenir(cible, item)) {
|
||||
await this.enleverDeConteneur(item, src, params.onEnleverConteneur);
|
||||
await this.ajouterDansConteneur(item, cible, params.onAjouterDansConteneur);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
await this.computeEncombrementTotalEtMalusArmure();
|
||||
return result;
|
||||
}
|
||||
|
||||
getContenantOrParent(dest) {
|
||||
if (!dest || dest.isConteneur()) {
|
||||
return dest;
|
||||
}
|
||||
return this.getContenant(dest);
|
||||
}
|
||||
|
||||
getContenant(item) {
|
||||
return this.items.find(it => it.isConteneur() && Misc.templateData(it).contenu.includes(item.id));
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
conteneurPeutContenir(dest, item) {
|
||||
if (!dest) {
|
||||
@ -3164,11 +3146,7 @@ export class RdDActor extends Actor {
|
||||
case 'chance-actuelle': case 'chance actuelle':
|
||||
return carac.chance;
|
||||
}
|
||||
const caracList = Object.entries(carac);
|
||||
let entry = Misc.findFirstLike(name, caracList, { mapper: it => it[0], description: 'caractéristique' });
|
||||
if (!entry || entry.length ==0) {
|
||||
entry = Misc.findFirstLike(name, caracList, { mapper: it => it[1].label, description: 'caractéristique' });
|
||||
}
|
||||
let entry = Misc.findFirstLike(name, Object.entries(carac), { mapper: it => it[1].label, description: 'caractéristique' });
|
||||
return entry && entry.length > 0 ? carac[entry[0]] : undefined;
|
||||
}
|
||||
|
||||
@ -3604,16 +3582,14 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
isEntite(typeentite = [] ) {
|
||||
return this.data.type == 'entite' && (typeentite.length == 0 || typeentite.includes(this.data.data.definition.typeentite));
|
||||
return this.data.type == 'entite' && (typeentite.length == 0 || typeentite.includes(this.data.data.typeentite));
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
isEntiteAccordee(attaquant) {
|
||||
if (!this.isEntite([ENTITE_INCARNE])) {
|
||||
return true;
|
||||
}
|
||||
if (!this.isEntite([ENTITE_INCARNE]))
|
||||
{ return true; }
|
||||
let resonnance = Misc.templateData(this).sante.resonnance;
|
||||
console.log("RESONN", resonnance)
|
||||
return (resonnance.actors.find(it => it == attaquant.id));
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,8 @@ export class RdDCombatManager extends Combat {
|
||||
}
|
||||
|
||||
static listActionsPossessions(actor) {
|
||||
return RdDCombatManager._indexActions(actor.getPossessions().map(p => {
|
||||
return RdDCombatManager._indexActions(actor.getPossessions().map(p =>
|
||||
{
|
||||
return {
|
||||
name: p.name,
|
||||
action: 'conjurer',
|
||||
@ -961,7 +962,8 @@ export class RdDCombat {
|
||||
const arme = this.defender.getArmeParade(armeParadeId);
|
||||
console.log("RdDCombat.parade >>>", attackerRoll, armeParadeId, arme);
|
||||
const competence = Misc.templateData(arme)?.competence;
|
||||
if (competence == undefined) {
|
||||
if (competence == undefined)
|
||||
{
|
||||
console.error("Pas de compétence de parade associée à ", arme) ;
|
||||
return;
|
||||
}
|
||||
@ -1245,8 +1247,6 @@ export class RdDCombat {
|
||||
/* -------------------------------------------- */
|
||||
/* retourne true si on peut continuer, false si on ne peut pas continuer */
|
||||
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")
|
||||
|| this.defender == undefined
|
||||
|| !this.defender.isEntite([ENTITE_INCARNE])
|
||||
|
@ -158,7 +158,6 @@ export class RdDResolutionTable {
|
||||
if (difficulte < -10) {
|
||||
return duplicate(levelDown.find(levelData => levelData.level == difficulte));
|
||||
}
|
||||
console.log("DATA :", caracValue, difficulte)
|
||||
return duplicate(RdDResolutionTable.resolutionTable[caracValue][difficulte + 10]);
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
|
||||
"license": "LICENSE.txt",
|
||||
"flags": {},
|
||||
"version": "1.5.90",
|
||||
"version": "1.5.87",
|
||||
"minimumCoreVersion": "0.8.0",
|
||||
"compatibleCoreVersion": "9",
|
||||
"scripts": [],
|
||||
@ -500,7 +500,7 @@
|
||||
"dependencies": [],
|
||||
"socket": true,
|
||||
"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.90.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-1.5.87.zip",
|
||||
"protected": false,
|
||||
"gridDistance": 1,
|
||||
"gridUnits": "m",
|
||||
|
Loading…
Reference in New Issue
Block a user