Compare commits
No commits in common. "v11" and "12.0.38" have entirely different histories.
@ -1,12 +1,4 @@
|
|||||||
# 12.0
|
# 12.0
|
||||||
## 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
|
## 12.0.38 - Les prévisions d'Astrobazzarh
|
||||||
- Correction de modifications de personnages qui ne s'affichaient pas:
|
- Correction de modifications de personnages qui ne s'affichaient pas:
|
||||||
- changements d'endurance/vie/fatigue, transformé, ...
|
- changements d'endurance/vie/fatigue, transformé, ...
|
||||||
|
@ -1800,14 +1800,17 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
};
|
};
|
||||||
RollDataAjustements.calcul(rollData, this);
|
RollDataAjustements.calcul(rollData, this);
|
||||||
await RdDResolutionTable.rollData(rollData);
|
await RdDResolutionTable.rollData(rollData);
|
||||||
this.gererExperience(rollData);
|
this._gererExperience(rollData);
|
||||||
await RdDRollResult.displayRollData(rollData, this)
|
await RdDRollResult.displayRollData(rollData, this)
|
||||||
return rollData.rolled;
|
return rollData.rolled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
gererExperience(rollData) {
|
gererExperience(rollData) {
|
||||||
this.createCallbackExperience().action(rollData);
|
const callback = this.createCallbackExperience();
|
||||||
|
if (callback.condition(rollData)) {
|
||||||
|
callback.action(rollData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -5,7 +5,7 @@ import { RdDUtility } from "../../rdd-utility.js";
|
|||||||
import { TextRollManager } from "./text-roll-formatter.js";
|
import { TextRollManager } from "./text-roll-formatter.js";
|
||||||
|
|
||||||
const REGECP_CARAC = "(?<carac>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+)"
|
const REGECP_CARAC = "(?<carac>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+)"
|
||||||
const REGEXP_COMP = "(\\/(?<competence>[A-Za-z0-9À-ÖØ-öø-ÿ -]+))?"
|
const REGEXP_COMP = "(\\/(?<competence>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+))?"
|
||||||
const REGEXP_DIFF = "(/(?<diff>[\\+\\-]?\\d+(d\\d+)?))?"
|
const REGEXP_DIFF = "(/(?<diff>[\\+\\-]?\\d+(d\\d+)?))?"
|
||||||
const REGEXP_ROLL_CARAC_COMP = REGECP_CARAC + REGEXP_COMP + REGEXP_DIFF
|
const REGEXP_ROLL_CARAC_COMP = REGECP_CARAC + REGEXP_COMP + REGEXP_DIFF
|
||||||
const XREGEXP_ROLL_CARAC_COMP = XRegExp("@roll\\[" + REGEXP_ROLL_CARAC_COMP + "\\]", 'giu')
|
const XREGEXP_ROLL_CARAC_COMP = XRegExp("@roll\\[" + REGEXP_ROLL_CARAC_COMP + "\\]", 'giu')
|
||||||
|
@ -19,12 +19,10 @@ export class RdDItemRace extends RdDItem {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (code == LIST_CARAC_PERSONNAGE.taille.code) {
|
const carac = RdDCarac.carac(code)
|
||||||
const carac = RdDCarac.carac(code)
|
if (race.isMax(actor, code, value - 1)) {
|
||||||
if (race.isMax(actor, code, value - 1)) {
|
ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`)
|
||||||
ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`)
|
return false
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -61,8 +59,7 @@ export class RdDItemRace extends RdDItem {
|
|||||||
if (code == LIST_CARAC_PERSONNAGE.force.code) {
|
if (code == LIST_CARAC_PERSONNAGE.force.code) {
|
||||||
return value >= this.getForceMax(actor)
|
return value >= this.getForceMax(actor)
|
||||||
}
|
}
|
||||||
const pathMax = path.replace(".value", ".max");
|
const max = foundry.utils.getProperty(this, path) ?? -1
|
||||||
const max = foundry.utils.getProperty(this, pathMax) ?? -1
|
|
||||||
return (max > 0 && value >= max)
|
return (max > 0 && value >= max)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,9 +4,9 @@ const RARETE_FREQUENTE = { code: 'Frequente', label: 'Fréquente', frequence: 18
|
|||||||
const RARETE_RARE = { code: 'Rare', label: 'Rare', frequence: 6, min: 3, max: 12 };
|
const RARETE_RARE = { code: 'Rare', label: 'Rare', frequence: 6, min: 3, max: 12 };
|
||||||
const RARETE_RARISSIME = { code: 'Rarissime', label: 'Rarissime', frequence: 2, min: 1, max: 4 };
|
const RARETE_RARISSIME = { code: 'Rarissime', label: 'Rarissime', frequence: 2, min: 1, max: 4 };
|
||||||
const RARETE_INEXISTANT = { code: 'Inexistant', label: 'Inexistant', frequence: 0, min: 0, max: 0 };
|
const RARETE_INEXISTANT = { code: 'Inexistant', label: 'Inexistant', frequence: 0, min: 0, max: 0 };
|
||||||
const RARETE_EGALE = { code: 'egal', label: 'Egal', frequence: 1, min: 1, max: 1 };
|
const RARETE_EGALE = { code: 'eqal', label: 'Egal', frequence: 1, min: 1, max: 1 };
|
||||||
|
|
||||||
export const RARETES = [
|
const RARETES = [
|
||||||
RARETE_COMMUNE,
|
RARETE_COMMUNE,
|
||||||
RARETE_FREQUENTE,
|
RARETE_FREQUENTE,
|
||||||
RARETE_RARE,
|
RARETE_RARE,
|
||||||
|
@ -238,7 +238,7 @@ export class Misc {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static findFirstLike(value, elements, options = {}) {
|
static findFirstLike(value, elements, options = {}) {
|
||||||
options = foundry.utils.mergeObject(DEFAULT_FIND_OPTIONS, options, { overwrite: true, inplace: false });
|
options = foundry.utils.mergeObject(DEFAULT_FIND_OPTIONS, options, { overwrite: true, inplace: false });
|
||||||
const subset = this.findAllLike(value, elements, options)
|
const subset = this.findAllLike(value, elements, options);
|
||||||
if (subset.length == 0) {
|
if (subset.length == 0) {
|
||||||
console.log(`Aucune ${options.description} pour ${value}`);
|
console.log(`Aucune ${options.description} pour ${value}`);
|
||||||
return undefined
|
return undefined
|
||||||
@ -263,8 +263,7 @@ export class Misc {
|
|||||||
}
|
}
|
||||||
value = Grammar.toLowerCaseNoAccent(value);
|
value = Grammar.toLowerCaseNoAccent(value);
|
||||||
const subset = elements.filter(options.preFilter)
|
const subset = elements.filter(options.preFilter)
|
||||||
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value))
|
.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(`Pas de ${options.description} correspondant à ${value}`);
|
options.onMessage(`Pas de ${options.description} correspondant à ${value}`);
|
||||||
}
|
}
|
||||||
|
@ -776,7 +776,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
if (this.attacker.isCreatureEntite()) {
|
if (this.attacker.isCreatureEntite()) {
|
||||||
RdDItemCompetenceCreature.setRollDataCreature(rollData);
|
RdDItemCompetenceCreature.setRollDataCreature(rollData);
|
||||||
}
|
}
|
||||||
else if (arme) {
|
else if (arme) {
|
||||||
// Usual competence
|
// Usual competence
|
||||||
rollData.arme = RdDItemArme.armeUneOuDeuxMains(arme, RdDItemCompetence.isArmeUneMain(competence));
|
rollData.arme = RdDItemArme.armeUneOuDeuxMains(arme, RdDItemCompetence.isArmeUneMain(competence));
|
||||||
@ -832,10 +832,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onAttaqueNormale(attackerRoll) {
|
async _onAttaqueNormale(attackerRoll) {
|
||||||
if (!RdDCombat.isReussite(attackerRoll)) {
|
if (!RdDCombat.isReussite(attackerRoll) || RdDCombat.isParticuliere(attackerRoll)) {
|
||||||
return
|
|
||||||
}
|
|
||||||
if (RdDCombat.isParticuliere(attackerRoll) && attackerRoll.particuliere == undefined) {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
||||||
@ -852,7 +849,7 @@ export class RdDCombat {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.defender) {
|
if (this.target) {
|
||||||
await this._sendMessageDefense(attackerRoll, defenderRoll);
|
await this._sendMessageDefense(attackerRoll, defenderRoll);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1002,7 +999,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
this.removeChatMessageActionsPasseArme(rollData.passeArme);
|
this.removeChatMessageActionsPasseArme(rollData.passeArme);
|
||||||
rollData.particuliere = choix;
|
rollData.particuliere = choix;
|
||||||
await this._onAttaqueNormale(rollData)
|
await this._onAttaqueNormale(rollData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -129,16 +129,6 @@ export class RdDCommands {
|
|||||||
<br><strong>/rdd vol déser +2</strong> effectue un jet de Volonté/Survie en désert à +2 pour les tokens sélectionnés
|
<br><strong>/rdd vol déser +2</strong> effectue un jet de Volonté/Survie en désert à +2 pour les tokens sélectionnés
|
||||||
`
|
`
|
||||||
});
|
});
|
||||||
this.registerCommand({
|
|
||||||
path: ["/jet"], func: (content, msg, params) => this.askRollRdd(msg, params),
|
|
||||||
descr: `Poste dans le tchat un jet de dés à effectuer. Exemples:
|
|
||||||
<br><strong>/jet Vue Vigilance</strong> poste une demande de jet de VUE / Vigilance à 0
|
|
||||||
<br><strong>/jet Vue</strong> poste une demande de jet de VUE à 0
|
|
||||||
<br><strong>/jet Vue -2</strong> poste une demande de jet de VUE à -2
|
|
||||||
<br><strong>/jet Vue Vigilance -2</strong> poste une demande de jet de VUE / Vigilance à -2
|
|
||||||
<br><strong>/jet vol déser +2</strong> poste une demande de jet de VOLONTÉ / Survie en désert à +2
|
|
||||||
`
|
|
||||||
});
|
|
||||||
this.registerCommand({ path: ["/ddr"], func: (content, msg, params) => this.rollDeDraconique(msg), descr: "Lance un Dé Draconique" });
|
this.registerCommand({ path: ["/ddr"], func: (content, msg, params) => this.rollDeDraconique(msg), descr: "Lance un Dé Draconique" });
|
||||||
|
|
||||||
this.registerCommand({
|
this.registerCommand({
|
||||||
@ -350,25 +340,6 @@ export class RdDCommands {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async askRollRdd(msg, params) {
|
|
||||||
if (params.length == 0) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
let length = params.length;
|
|
||||||
let diff = Number(params[length - 1]);
|
|
||||||
if (Number.isInteger(Number(diff))) {
|
|
||||||
length--;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
diff = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const carac = params[0];
|
|
||||||
const competence = length > 1 ? '/' + Misc.join(params.slice(1, length), ' ') : ''
|
|
||||||
ChatMessage.create({ content: `@roll[${carac}${competence}/${diff}]` })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async rollRdDNumeric(msg, carac, diff, significative = false) {
|
async rollRdDNumeric(msg, carac, diff, significative = false) {
|
||||||
|
@ -2,22 +2,19 @@
|
|||||||
<h4 class="rdd-roll-part">{{alias}} réussit une attaque particulière!</strong></h4>
|
<h4 class="rdd-roll-part">{{alias}} réussit une attaque particulière!</strong></h4>
|
||||||
{{#if isForce}}
|
{{#if isForce}}
|
||||||
<br>
|
<br>
|
||||||
<a class="chat-card-button particuliere-attaque" data-mode="force" data-attackerId="{{attackerId}}"
|
<a class="chat-card-button particuliere-attaque" data-mode="force" data-attackerId="{{attackerId}}">
|
||||||
data-defenderTokenId="{{defenderToken.id}}" data-attackerTokenId="{{attackerToken.id}}">
|
|
||||||
Attaquer en Force
|
Attaquer en Force
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if isRapide}}
|
{{#if isRapide}}
|
||||||
<br>
|
<br>
|
||||||
<a class="chat-card-button particuliere-attaque" data-mode="rapidite" data-attackerId="{{attackerId}}"
|
<a class="chat-card-button particuliere-attaque" data-mode="rapidite" data-attackerId="{{attackerId}}">
|
||||||
data-defenderTokenId="{{defenderToken.id}}" data-attackerTokenId="{{attackerToken.id}}">
|
|
||||||
Attaquer en Rapidité
|
Attaquer en Rapidité
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if isFinesse}}
|
{{#if isFinesse}}
|
||||||
<br>
|
<br>
|
||||||
<a class="chat-card-button particuliere-attaque" data-mode="finesse" data-attackerId="{{attackerId}}"
|
<a class="chat-card-button particuliere-attaque" data-mode="finesse" data-attackerId="{{attackerId}}">
|
||||||
data-defenderTokenId="{{defenderToken.id}}" data-attackerTokenId="{{attackerToken.id}}">
|
|
||||||
Attaquer en Finesse
|
Attaquer en Finesse
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user