Version 12.0.23 - La bibliothèque d'Astrobazzarh #723
@ -1,3 +1,4 @@
|
|||||||
|
import { Grammar } from "./grammar.js";
|
||||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js"
|
import { RdDItemCompetenceCreature } from "./item-competencecreature.js"
|
||||||
import { ITEM_TYPES } from "./item.js";
|
import { ITEM_TYPES } from "./item.js";
|
||||||
import { RdDCombatManager } from "./rdd-combat.js";
|
import { RdDCombatManager } from "./rdd-combat.js";
|
||||||
@ -56,8 +57,8 @@ export class RdDItemArme extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static niveauCompetenceArme(arme, competences) {
|
static niveauCompetenceArme(arme, competences) {
|
||||||
const compArme = competences.find(it => it.name == arme.system.competence);
|
const compArme = competences.find(it => Grammar.equalsInsensitive(it.name, arme.system.competence))
|
||||||
return compArme?.system.niveau ?? -8;
|
return compArme?.system.niveau ?? -8
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -226,7 +226,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static $prepareAttaqueArme(infoAttaque) {
|
static $prepareAttaqueArme(infoAttaque) {
|
||||||
const comp = infoAttaque.competences.find(c => c.name == infoAttaque.competence);
|
const comp = infoAttaque.competences.find(it => Grammar.equalsInsensitive(it.name, infoAttaque.competence))
|
||||||
const arme = infoAttaque.arme;
|
const arme = infoAttaque.arme;
|
||||||
const attaque = foundry.utils.duplicate(arme);
|
const attaque = foundry.utils.duplicate(arme);
|
||||||
attaque.action = 'attaque';
|
attaque.action = 'attaque';
|
||||||
|
@ -7,6 +7,7 @@ import { RdDBonus } from "./rdd-bonus.js";
|
|||||||
import { RdDCarac } from "./rdd-carac.js";
|
import { RdDCarac } from "./rdd-carac.js";
|
||||||
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
||||||
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
||||||
|
import { Grammar } from "./grammar.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the base Dialog entity to select roll parameters
|
* Extend the base Dialog entity to select roll parameters
|
||||||
@ -173,8 +174,8 @@ export class RdDRoll extends Dialog {
|
|||||||
this.html.find("[name='diffLibre']").val(this.rollData.diffLibre);
|
this.html.find("[name='diffLibre']").val(this.rollData.diffLibre);
|
||||||
});
|
});
|
||||||
this.html.find('.roll-carac-competence').change((event) => {
|
this.html.find('.roll-carac-competence').change((event) => {
|
||||||
const competence = event.currentTarget.value;
|
const competence = event.currentTarget.value
|
||||||
this.rollData.competence = this.rollData.competences.find(it => it.name == competence);
|
this.rollData.competence = this.rollData.competences.find(it => Grammar.equalsInsensitive(it.name, competence))
|
||||||
this.updateRollResult(html);
|
this.updateRollResult(html);
|
||||||
});
|
});
|
||||||
this.html.find('.select-suivant-coeur').change((event) => {
|
this.html.find('.select-suivant-coeur').change((event) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user