Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
b09b095897 | |||
d81965155c | |||
9fa8a2e6f3 | |||
da7f87fd45 | |||
6aba92900c | |||
4939e5564e | |||
40be65a94e | |||
633638a9ab | |||
88a3464eed | |||
921e470498 | |||
0009876a6d | |||
54785f0c3a | |||
df76c4bd78 | |||
5f3c678195 |
27
changelog.md
27
changelog.md
@ -1,17 +1,35 @@
|
||||
# 12.0
|
||||
|
||||
## 12.0.44 - Les errements d'Astrobazzarh, suite
|
||||
|
||||
- on peut de nouveau dormir et se réveiller reposé
|
||||
- les possessions utilisent maintenant correctement le rêve actuel
|
||||
- les sorts variables ne causent plus de soucis de voie pour le lancement de sorts
|
||||
- les acteurs ayant un sort avec un coût de rêve entier ne sont plus considérés
|
||||
comme pouvant avoir un rêve variable
|
||||
|
||||
## 12.0.42 - Les errements d'Astrobazzarh
|
||||
|
||||
- Correction de différentes automatisations de combat incorrectes
|
||||
- Correction des jets `@roll[vue/-2]` qui tentaient de chercher une compétence -2 (à cause des armes à 1/2 mains)
|
||||
|
||||
## 12.0.41 - La loupe d'Astrobazzarh
|
||||
|
||||
- On peut de nouveau effectuer des tirages cachés
|
||||
- Le stress transformé est bien diminué lorsqu'on met le stress dans une compétence
|
||||
|
||||
## 12.0.40 - Les mains d'Astrobazzarh
|
||||
|
||||
- correction des attaques particulières en combat
|
||||
- correction de message sur les min/max liés aux modificateurs de races (s'applique uniquement sur la taille)
|
||||
|
||||
## 12.0.39 - Les mains d'Astrobazzarh
|
||||
|
||||
- les armes à 1 ou 2 mains fonctionnent dans les liens de jets de dés
|
||||
- commande `/jet` pour poster une demande de jet de dés
|
||||
|
||||
## 12.0.38 - Les prévisions d'Astrobazzarh
|
||||
|
||||
- Correction de modifications de personnages qui ne s'affichaient pas:
|
||||
- changements d'endurance/vie/fatigue, transformé, ...
|
||||
- Migration des compétences "Ecriture" en "Écriture" dans les tâches, livres, oeuvres et méditations
|
||||
@ -21,12 +39,14 @@
|
||||
- utilisation de l'extension hbs pour tous les fichiers handlebars
|
||||
|
||||
## 12.0.37 - Les enchantements d'Astrobazzarh
|
||||
|
||||
- les potions ont un état, seules les potions liquides sont enchantables
|
||||
- les lancements de sorts du jour sont conservés jusqu'à chateau dormant
|
||||
- lorsqu'un joueur souhaite enchanter une potion, les sorts d'enchantements/purification/permanence doivent avoir été lancés auparavant
|
||||
- on peut enchanter des gemmes exactement comme des potions
|
||||
|
||||
## 12.0.36 - L'alchimie d'Astrobazzarh
|
||||
|
||||
- Nouveautés
|
||||
- ajout d'un bouton pour enchanter les potions
|
||||
- standardisation des boutons d'actions sur les items
|
||||
@ -41,9 +61,11 @@
|
||||
- Corrections de descriptions pour proposer les jet de dés
|
||||
|
||||
## 12.0.35 - La Solution d'Astrobazzarh
|
||||
|
||||
- Fix problème d'initialisation des feuilles d'items
|
||||
|
||||
## 12.0.34 - la tête d'Astrobazzarh
|
||||
|
||||
- support de liens "jets de dés"
|
||||
- on peut ajouter des liens "jet de dés" dans les journaux, descriptions, notes, maladresses, ...
|
||||
- avec la syntaxe `@roll[...]` on peut ajouter le lien vers:
|
||||
@ -58,21 +80,26 @@
|
||||
- gestion des blocs secrets dans les descriptions
|
||||
|
||||
## 12.0.33 - la vieillesse d'Astrobazzarh
|
||||
|
||||
- retour de l'expérience pour les joueurs
|
||||
- suppression du message "Pas de caractéristique" sur les jets d'odorat-goût
|
||||
|
||||
## 12.0.32 - les rêveries d'Astrobazzarh
|
||||
|
||||
- Ajout des Items Race pour gérer les ajustements liés aux races
|
||||
|
||||
## 12.0.31 - le mausolée d'Astrobazzarh
|
||||
|
||||
- Correction: les automatisation de combat jouer-MJ fonctionnentde nouveau
|
||||
|
||||
## 12.0.30 - le cauchemar d'Astrobazzarh
|
||||
|
||||
- calcul automatique du niveau des entités selon leur rêve
|
||||
- la description des créatures venimeuses contient un lien vers leur venin
|
||||
- Correction: les messages de combats ne marchaient plus (Changement combiné Foundry + rêve de Dragon)
|
||||
|
||||
## 12.0.29 - L'indexation d'Astrobazzarh
|
||||
|
||||
- les liens dans la descriptions des sorts pointent vers les sorts du compendium
|
||||
- la description du chrasme contient le lien vers son venin plutôt qu'un tableau
|
||||
|
||||
|
@ -243,7 +243,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
await this.resetInfoSommeil()
|
||||
ChatMessage.create(message);
|
||||
this.sheet.render(true);
|
||||
setTimeout(() => this.sheet.render(), 20)
|
||||
}
|
||||
|
||||
async _recuperationSante(message) {
|
||||
@ -299,7 +299,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
ChatMessage.create(message);
|
||||
}
|
||||
await this.resetInfoSommeil();
|
||||
this.sheet.render(true);
|
||||
setTimeout(() => this.sheet.render(), 20)
|
||||
}
|
||||
}
|
||||
|
||||
@ -442,10 +442,9 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
message.content += 'Vous ne trouvez pas le sommeil';
|
||||
}
|
||||
else {
|
||||
let jetsReve = [];
|
||||
let dormi = await this.dormirDesHeures(jetsReve, message, heures, options);
|
||||
if (jetsReve.length > 0) {
|
||||
message.content += `Vous récupérez ${jetsReve.map(it => it < 0 ? '0 (réveil)' : it).reduce(Misc.joining("+"))} Points de rêve. `;
|
||||
let dormi = await this.$dormirDesHeures(message, heures, options);
|
||||
if (dormi.jetsReve.length > 0) {
|
||||
message.content += `Vous récupérez ${dormi.jetsReve.map(it => it < 0 ? '0 (réveil)' : it).reduce(Misc.joining("+"))} Points de rêve. `;
|
||||
}
|
||||
if (dormi.etat == 'eveil') {
|
||||
await this.reveilReveDeDragon(message, dormi.heures);
|
||||
@ -461,7 +460,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
await this.dormirChateauDormant();
|
||||
}
|
||||
else {
|
||||
this.sheet.render(true);
|
||||
setTimeout(() => this.sheet.render(), 20)
|
||||
}
|
||||
}
|
||||
|
||||
@ -472,18 +471,18 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
}
|
||||
|
||||
async dormirDesHeures(jetsReve, message, heures, options) {
|
||||
const dormi = { heures: 0, etat: 'dort' };
|
||||
async $dormirDesHeures(message, heures, options) {
|
||||
const dormi = { heures: 0, etat: 'dort', jetsReve: [] };
|
||||
for (; dormi.heures < heures && dormi.etat == 'dort'; dormi.heures++) {
|
||||
await this._recupererEthylisme(message);
|
||||
await this.$recupererEthylisme(message);
|
||||
if (options.grisReve) {
|
||||
await this.recupererFatigue(message);
|
||||
await this.$recupererFatigue(message);
|
||||
}
|
||||
else if (!this.system.sommeil?.insomnie) {
|
||||
await this.recupererFatigue(message);
|
||||
dormi.etat = await this.jetRecuperationReve(jetsReve, message);
|
||||
await this.$recupererFatigue(message);
|
||||
await this.$jetRecuperationReve(dormi, message);
|
||||
if (dormi.etat == 'dort' && EffetsDraconiques.isDonDoubleReve(this)) {
|
||||
dormi.etat = await this.jetRecuperationReve(jetsReve, message);
|
||||
dormi.etat = await this.$jetRecuperationReve(dormi, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -491,35 +490,36 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async jetRecuperationReve(jetsReve, message) {
|
||||
async $jetRecuperationReve(dormi, message) {
|
||||
if (this.getReveActuel() < this.system.reve.seuil.value) {
|
||||
let reve = await RdDDice.rollTotal("1dr");
|
||||
const reve = await RdDDice.rollTotal("1dr")
|
||||
if (reve >= 7) {
|
||||
// Rêve de Dragon !
|
||||
message.content += `Vous faites un <strong>Rêve de Dragon</strong> de ${reve} Points de rêve qui vous réveille! `;
|
||||
await this.combattreReveDeDragon(reve);
|
||||
jetsReve.push(-1);
|
||||
return 'eveil';
|
||||
dormi.jetsReve.push(-1);
|
||||
dormi.etat = 'eveil'
|
||||
return
|
||||
}
|
||||
else {
|
||||
if (!ReglesOptionnelles.isUsing("recuperation-reve")) {
|
||||
ChatMessage.create({
|
||||
whisper: ChatUtility.getOwners(this),
|
||||
content: `Pas de récupération de rêve (${reve} points ignorés)`
|
||||
});
|
||||
jetsReve.push(0);
|
||||
})
|
||||
dormi.jetsReve.push(0)
|
||||
}
|
||||
else {
|
||||
await this.reveActuelIncDec(reve);
|
||||
jetsReve.push(reve);
|
||||
await this.reveActuelIncDec(reve)
|
||||
dormi.jetsReve.push(reve)
|
||||
}
|
||||
}
|
||||
}
|
||||
return 'dort';
|
||||
dormi.etat = 'dort'
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _recupererEthylisme(message) {
|
||||
async $recupererEthylisme(message) {
|
||||
if (!ReglesOptionnelles.isUsing("recuperation-ethylisme")) { return; }
|
||||
let value = Math.min(Number.parseInt(this.system.compteurs.ethylisme.value) + 1, 1);
|
||||
if (value <= 0) {
|
||||
@ -549,15 +549,16 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async recupererFatigue(message) {
|
||||
async $recupererFatigue(message) {
|
||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
||||
let fatigue = this.system.sante.fatigue.value;
|
||||
const fatigueMin = this.getFatigueMin();
|
||||
let fatigue = this.system.sante.fatigue.value
|
||||
const fatigueMin = this.getFatigueMin()
|
||||
if (fatigue <= fatigueMin) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue));
|
||||
await this.update({ "system.sante.fatigue.value": fatigue });
|
||||
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue))
|
||||
await this.update({ 'system.sante.fatigue.value': fatigue });
|
||||
await new Promise(resolve => setTimeout(resolve, 200));
|
||||
if (fatigue == 0) {
|
||||
message.content += "Vous êtes complêtement reposé. ";
|
||||
}
|
||||
@ -1800,8 +1801,10 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
};
|
||||
RollDataAjustements.calcul(rollData, this);
|
||||
await RdDResolutionTable.rollData(rollData);
|
||||
this.gererExperience(rollData);
|
||||
await RdDRollResult.displayRollData(rollData, this)
|
||||
|
||||
this.gererExperience(rollData);
|
||||
|
||||
return rollData.rolled;
|
||||
}
|
||||
|
||||
@ -2643,12 +2646,13 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async incDecItemUse(itemId, inc = 1) {
|
||||
const currentItemUse = this.getFlag(SYSTEM_RDD, 'itemUse');
|
||||
let itemUse = currentItemUse ? foundry.utils.duplicate(currentItemUse) : {};
|
||||
itemUse[itemId] = (itemUse[itemId] ?? 0) + inc;
|
||||
await this.setFlag(SYSTEM_RDD, 'itemUse', itemUse);
|
||||
console.log("ITEM USE INC", inc, itemUse);
|
||||
async incDecItemUse(itemId, shouldIncrease = true) {
|
||||
if (shouldIncrease) {
|
||||
const currentItemUse = this.getFlag(SYSTEM_RDD, 'itemUse');
|
||||
let itemUse = currentItemUse ? foundry.utils.duplicate(currentItemUse) : {};
|
||||
itemUse[itemId] = (itemUse[itemId] ?? 0) + 1;
|
||||
await this.setFlag(SYSTEM_RDD, 'itemUse', itemUse);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -277,14 +277,9 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
||||
return dialog
|
||||
}
|
||||
|
||||
createEmptyCallback() {
|
||||
return {
|
||||
condition: r => false,
|
||||
action: r => { }
|
||||
};
|
||||
}
|
||||
createCallbackExperience() { return this.createEmptyCallback(); }
|
||||
createCallbackAppelAuMoral() { return this.createEmptyCallback(); }
|
||||
createCallbackExperience() { return { action: r => { } } }
|
||||
createCallbackAppelAuMoral() { return { action: r => { } } }
|
||||
|
||||
async _onCloseRollDialog(html) { }
|
||||
|
||||
async rollCaracCompetence(caracName, compName, diff, options = { title: "" }) {
|
||||
|
@ -747,7 +747,7 @@ export class RdDBaseActor extends Actor {
|
||||
async jetDeMoral() { this.actionImpossible("jet de moral") }
|
||||
|
||||
async resetItemUse() { }
|
||||
async incDecItemUse(itemId, inc = 1) { }
|
||||
async incDecItemUse(itemId, shouldIncrease = true) { }
|
||||
getItemUse(itemId) { return 0; }
|
||||
|
||||
async finDeRound(options = { terminer: false }) { }
|
||||
|
@ -5,7 +5,7 @@ import { RdDUtility } from "../../rdd-utility.js";
|
||||
import { TextRollManager } from "./text-roll-formatter.js";
|
||||
|
||||
const REGECP_CARAC = "(?<carac>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+)"
|
||||
const REGEXP_COMP = "(\\/(?<competence>[A-Za-z0-9À-ÖØ-öø-ÿ -]+))?"
|
||||
const REGEXP_COMP = "(\\/(?<competence>[A-Za-zÀ-ÖØ-öø-ÿ ]+([1-2]?[A-Za-zÀ-ÖØ-öø-ÿ ]+)?))?"
|
||||
const REGEXP_DIFF = "(/(?<diff>[\\+\\-]?\\d+(d\\d+)?))?"
|
||||
const REGEXP_ROLL_CARAC_COMP = REGECP_CARAC + REGEXP_COMP + REGEXP_DIFF
|
||||
const XREGEXP_ROLL_CARAC_COMP = XRegExp("@roll\\[" + REGEXP_ROLL_CARAC_COMP + "\\]", 'giu')
|
||||
|
@ -56,6 +56,10 @@ export class RdDItemSort extends Item {
|
||||
return voies.map(voie => RdDItemCompetence.getVoieDraconic(competencesDraconic, voie))
|
||||
}
|
||||
|
||||
static getBestDraconicSort(competencesDraconic, sort) {
|
||||
return RdDItemSort.getDraconicsSort(competencesDraconic, sort).sort(Misc.descending(it => it.system.niveau)).find(it=>true)
|
||||
}
|
||||
|
||||
static getOrdreCode(code) {
|
||||
return (VOIES_DRACONIC.find(it => it.code == code)?.ordre ?? '?')
|
||||
}
|
||||
@ -92,7 +96,7 @@ export class RdDItemSort extends Item {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static isCoutVariable(sort) {
|
||||
return sort && (sort.system.ptreve.toLowerCase() == "variable" || sort.system.ptreve.indexOf("+") >= 0);
|
||||
return sort && !Number.isInteger(sort.system.ptreve) && (sort.system.ptreve.toLowerCase() == "variable" || sort.system.ptreve.indexOf("+") >= 0);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -265,7 +265,7 @@ export class Misc {
|
||||
const subset = elements.filter(options.preFilter)
|
||||
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value))
|
||||
.sort(Misc.ascending(it => options.mapper(it)))
|
||||
if (subset.length == 0) {
|
||||
if (subset.length == 0 && options?.onMessage) {
|
||||
options.onMessage(`Pas de ${options.description} correspondant à ${value}`);
|
||||
}
|
||||
return subset;
|
||||
|
@ -743,23 +743,13 @@ export class RdDCombat {
|
||||
this.attacker.createCallbackExperience(),
|
||||
this.attacker.createCallbackAppelAuMoral(),
|
||||
{ action: r => this.removeChatMessageActionsPasseArme(r.passeArme) },
|
||||
{ action: r => this._increaseItemUse(r, arme) },
|
||||
{ action: r => this._onAttaqueNormale(r) },
|
||||
{ action: r => this._onAttaqueParticuliere(r) },
|
||||
{ action: r => this._onAttaqueEchec(r) },
|
||||
{ action: r => this._onAttaqueEchecTotal(r) },
|
||||
{ action: async r => await this.attacker.incDecItemUse(arme._id, arme && !RdDCombat.isParticuliere(r)) },
|
||||
{ action: r => this._onAttaque(r) },
|
||||
]
|
||||
});
|
||||
dialog.render(true);
|
||||
}
|
||||
|
||||
_increaseItemUse(rollData, arme) {
|
||||
if (!arme || RdDCombat.isParticuliere(rollData)) {
|
||||
return
|
||||
}
|
||||
this.attacker.incDecItemUse(arme._id)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
_prepareAttaque(competence, arme) {
|
||||
let rollData = {
|
||||
@ -790,11 +780,23 @@ export class RdDCombat {
|
||||
return rollData;
|
||||
}
|
||||
|
||||
async _onAttaque(attackerRoll) {
|
||||
if (RdDCombat.isParticuliere(attackerRoll)) {
|
||||
return await this._onAttaqueParticuliere(attackerRoll)
|
||||
}
|
||||
if (RdDCombat.isReussite(attackerRoll)) {
|
||||
return await this._onAttaqueNormale(attackerRoll)
|
||||
}
|
||||
// if (RdDCombat.isParticuliere(attackerRoll) && attackerRoll.particuliere == undefined) {
|
||||
// return
|
||||
// }
|
||||
if (RdDCombat.isEchecTotal(attackerRoll)) {
|
||||
return await this._onAttaqueEchecTotal(attackerRoll)
|
||||
}
|
||||
return await this._onAttaqueEchec(attackerRoll)
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async _onAttaqueParticuliere(rollData) {
|
||||
if (!RdDCombat.isParticuliere(rollData)) {
|
||||
return
|
||||
}
|
||||
const isMeleeDiffNegative = (rollData.competence.type == 'competencecreature' || rollData.selectedCarac.label == "Mêlée") && rollData.diffLibre < 0;
|
||||
// force toujours, sauf empoignade
|
||||
// finesse seulement en mélée, pour l'empoignade, ou si la difficulté libre est de -1 minimum
|
||||
@ -832,12 +834,6 @@ export class RdDCombat {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onAttaqueNormale(attackerRoll) {
|
||||
if (!RdDCombat.isReussite(attackerRoll)) {
|
||||
return
|
||||
}
|
||||
if (RdDCombat.isParticuliere(attackerRoll) && attackerRoll.particuliere == undefined) {
|
||||
return
|
||||
}
|
||||
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
||||
|
||||
attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker, this.defender.isEntite());
|
||||
@ -954,9 +950,6 @@ export class RdDCombat {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onAttaqueEchecTotal(attackerRoll) {
|
||||
if (!RdDCombat.isEchecTotal(attackerRoll)) {
|
||||
return
|
||||
}
|
||||
const choixEchecTotal = await ChatMessage.create({
|
||||
whisper: ChatUtility.getOwners(this.attacker),
|
||||
content: await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-demande-attaque-etotal.hbs', {
|
||||
@ -983,22 +976,16 @@ export class RdDCombat {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onAttaqueEchec(rollData) {
|
||||
if (!RdDCombat.isEchec(rollData)) {
|
||||
return
|
||||
}
|
||||
console.log("RdDCombat.onAttaqueEchec >>>", rollData);
|
||||
await RdDRollResult.displayRollData(rollData, this.attacker, 'chat-resultat-attaque.hbs');
|
||||
|
||||
async _onAttaqueEchec(attackerRoll) {
|
||||
console.log("RdDCombat.onAttaqueEchec >>>", attackerRoll);
|
||||
await RdDRollResult.displayRollData(attackerRoll, this.attacker, 'chat-resultat-attaque.hbs');
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async choixParticuliere(rollData, choix) {
|
||||
console.log("RdDCombat.choixParticuliere >>>", rollData, choix);
|
||||
|
||||
if (choix != "rapidite") {
|
||||
this.attacker.incDecItemUse(rollData.arme.id);
|
||||
}
|
||||
await this.attacker.incDecItemUse(rollData.arme.id, choix != "rapidite")
|
||||
|
||||
this.removeChatMessageActionsPasseArme(rollData.passeArme);
|
||||
rollData.particuliere = choix;
|
||||
@ -1026,10 +1013,8 @@ export class RdDCombat {
|
||||
this.defender.createCallbackExperience(),
|
||||
this.defender.createCallbackAppelAuMoral(),
|
||||
{ action: r => this.removeChatMessageActionsPasseArme(r.passeArme) },
|
||||
{ condition: r => !RdDCombat.isParticuliere(r), action: r => this.defender.incDecItemUse(armeParadeId) },
|
||||
{ condition: RdDCombat.isReussite, action: r => this._onParadeNormale(r) },
|
||||
{ condition: RdDCombat.isParticuliere, action: r => this._onParadeParticuliere(r) },
|
||||
{ condition: RdDCombat.isEchec, action: r => this._onParadeEchec(r) },
|
||||
{ action: async r => await this.defender.incDecItemUse(armeParadeId, !RdDCombat.isParticuliere(r)) },
|
||||
{ action: r => this._onParade(r) },
|
||||
]
|
||||
});
|
||||
dialog.render(true);
|
||||
@ -1060,8 +1045,19 @@ export class RdDCombat {
|
||||
return defenderRoll;
|
||||
}
|
||||
|
||||
|
||||
async _onParade(defenderRoll) {
|
||||
if (RdDCombat.isParticuliere(defenderRoll)) {
|
||||
return await this._onParadeParticuliere(defenderRoll)
|
||||
}
|
||||
if (RdDCombat.isReussite(defenderRoll)) {
|
||||
return await this._onParadeNormale(defenderRoll)
|
||||
}
|
||||
await this._onParadeEchec(defenderRoll)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
_onParadeParticuliere(defenderRoll) {
|
||||
async _onParadeParticuliere(defenderRoll) {
|
||||
console.log("RdDCombat._onParadeParticuliere >>>", defenderRoll);
|
||||
if (!defenderRoll.attackerRoll.isPart) {
|
||||
// TODO: attaquant doit jouer résistance et peut être désarmé p132
|
||||
@ -1070,7 +1066,6 @@ export class RdDCombat {
|
||||
this.defender)
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onParadeNormale(defenderRoll) {
|
||||
console.log("RdDCombat._onParadeNormale >>>", defenderRoll);
|
||||
@ -1109,11 +1104,9 @@ export class RdDCombat {
|
||||
callbacks: [
|
||||
this.defender.createCallbackExperience(),
|
||||
this.defender.createCallbackAppelAuMoral(),
|
||||
{ condition: r => !RdDCombat.isParticuliere(r), action: r => this.defender.incDecItemUse(esquive._id) },
|
||||
{ action: async r => await this.defender.incDecItemUse(esquive._id, !RdDCombat.isParticuliere(r)) },
|
||||
{ action: r => this.removeChatMessageActionsPasseArme(r.passeArme) },
|
||||
{ condition: RdDCombat.isReussite, action: r => this._onEsquiveNormale(r) },
|
||||
{ condition: RdDCombat.isParticuliere, action: r => this._onEsquiveParticuliere(r) },
|
||||
{ condition: RdDCombat.isEchec, action: r => this._onEsquiveEchec(r) },
|
||||
{ action: r => this._onEsquive(r) },
|
||||
]
|
||||
});
|
||||
dialog.render(true);
|
||||
@ -1141,9 +1134,18 @@ export class RdDCombat {
|
||||
return rollData;
|
||||
}
|
||||
|
||||
async _onEsquive(defenderRoll) {
|
||||
if (RdDCombat.isParticuliere(defenderRoll)) {
|
||||
return await this._onEsquiveParticuliere(defenderRoll)
|
||||
}
|
||||
if (RdDCombat.isReussite(defenderRoll)) {
|
||||
return await this._onEsquiveNormale(defenderRoll)
|
||||
}
|
||||
return await this._onEsquiveEchec(defenderRoll)
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
_onEsquiveParticuliere(rollData) {
|
||||
console.log("RdDCombat._onEsquiveParticuliere >>>", rollData);
|
||||
async _onEsquiveParticuliere(defenderRoll) {
|
||||
console.log("RdDCombat._onEsquiveParticuliere >>>", defenderRoll);
|
||||
ChatUtility.createChatWithRollMode(
|
||||
{ content: "<strong>Vous pouvez esquiver une deuxième fois!</strong>" },
|
||||
this.defender);
|
||||
|
@ -104,8 +104,8 @@ export class RdDPossession {
|
||||
rollData.selectedCarac = carac.reve
|
||||
}
|
||||
else {
|
||||
rollData.selectedCarac = rollingActor.system.carac.reve
|
||||
rollData.forceCarac = { 'reve-actuel': { label: "Rêve Actuel", value: rollingActor.getReveActuel() } }
|
||||
rollData.selectedCarac = rollData.forceCarac['reve-actuel']
|
||||
rollData.competence.system.defaut_carac = 'reve-actuel'
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { ChatUtility } from "./chat-utility.js";
|
||||
import { Misc } from "./misc.js";
|
||||
import { RdDDice } from "./rdd-dice.js";
|
||||
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
||||
|
@ -279,7 +279,7 @@ export class RdDRoll extends Dialog {
|
||||
|
||||
async setSelectedSort(sort) {
|
||||
this.rollData.selectedSort = sort; // Update the selectedCarac
|
||||
this.rollData.competence = RdDItemCompetence.getVoieDraconic(this.rollData.draconicList, sort.system.draconic);
|
||||
this.rollData.competence = RdDItemSort.getBestDraconicSort(this.rollData.draconicList, sort)
|
||||
this.rollData.bonus = RdDItemSort.getCaseBonus(sort, this.rollData.tmr.coord);
|
||||
this.rollData.diffLibre = RdDItemSort.getDifficulte(sort, -7);
|
||||
RdDItemSort.setCoutReveReel(sort);
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"scripts": {
|
||||
"build": "npx vite build",
|
||||
"run": "npx vite serve",
|
||||
"packCompendiumsToDist": "node ./tools/packCompendiumsToDist.mjs",
|
||||
"packCompendiumsToPublic": "node ./tools/packCompendiumsToPublic.mjs",
|
||||
"unpackCompendiumsFromPublic": "node ./tools/unpackCompendiumsFromPublic.mjs"
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"id": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"version": "12.0.38",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.38/rddsystem.zip",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.38/system.json",
|
||||
"version": "12.0.44",
|
||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.44/rddsystem.zip",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/releases/download/12.0.44/system.json",
|
||||
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
|
||||
"compatibility": {
|
||||
"minimum": "11",
|
||||
|
Loading…
x
Reference in New Issue
Block a user