Fix competencecreatures/competences
This commit is contained in:
@@ -11,7 +11,6 @@ import { MAINS_DIRECTRICES } from "./actor.js";
|
|||||||
import { RdDBaseActorReveSheet } from "./actor/base-actor-reve-sheet.js";
|
import { RdDBaseActorReveSheet } from "./actor/base-actor-reve-sheet.js";
|
||||||
import { ITEM_TYPES } from "./constants.js";
|
import { ITEM_TYPES } from "./constants.js";
|
||||||
import { RdDItem } from "./item.js";
|
import { RdDItem } from "./item.js";
|
||||||
import { RdDItemArme } from "./item/arme.js";
|
|
||||||
import { RdDItemCompetence } from "./item-competence.js";
|
import { RdDItemCompetence } from "./item-competence.js";
|
||||||
import { RdDItemBlessure } from "./item/blessure.js";
|
import { RdDItemBlessure } from "./item/blessure.js";
|
||||||
import { RdDEmpoignade } from "./rdd-empoignade.js";
|
import { RdDEmpoignade } from "./rdd-empoignade.js";
|
||||||
|
@@ -16,7 +16,6 @@ import { RdDRollResult } from "../rdd-roll-result.js";
|
|||||||
|
|
||||||
import { RdDItemArme } from "../item/arme.js";
|
import { RdDItemArme } from "../item/arme.js";
|
||||||
import { RdDItemCompetence } from "../item-competence.js";
|
import { RdDItemCompetence } from "../item-competence.js";
|
||||||
import { RdDItemCompetenceCreature } from "../item-competencecreature.js";
|
|
||||||
|
|
||||||
import { ChatUtility } from "../chat-utility.js";
|
import { ChatUtility } from "../chat-utility.js";
|
||||||
import { DialogValidationEncaissement } from "../dialog-validation-encaissement.js";
|
import { DialogValidationEncaissement } from "../dialog-validation-encaissement.js";
|
||||||
@@ -25,6 +24,7 @@ import { RdDEmpoignade } from "../rdd-empoignade.js";
|
|||||||
import { RdDPossession } from "../rdd-possession.js";
|
import { RdDPossession } from "../rdd-possession.js";
|
||||||
import { BASE_CORPS_A_CORPS, BASE_ESQUIVE, POSSESSION_SANS_DRACONIC } from "../item/base-items.js";
|
import { BASE_CORPS_A_CORPS, BASE_ESQUIVE, POSSESSION_SANS_DRACONIC } from "../item/base-items.js";
|
||||||
import { RollDataAjustements } from "../rolldata-ajustements.js";
|
import { RollDataAjustements } from "../rolldata-ajustements.js";
|
||||||
|
import { MappingCreatureArme } from "../item/mapping-creature-arme.mjs";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classe de base pour les acteurs disposant de rêve (donc, pas des objets)
|
* Classe de base pour les acteurs disposant de rêve (donc, pas des objets)
|
||||||
@@ -114,7 +114,7 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
|||||||
listActions({ isAttaque = false, isEquipe = false }) {
|
listActions({ isAttaque = false, isEquipe = false }) {
|
||||||
return this.itemTypes[ITEM_TYPES.competencecreature]
|
return this.itemTypes[ITEM_TYPES.competencecreature]
|
||||||
.filter(it => it.isAttaque())
|
.filter(it => it.isAttaque())
|
||||||
.map(it => RdDItemCompetenceCreature.attaqueCreature(it))
|
.map(it => it.attaqueCreature())
|
||||||
.filter(it => it != undefined);
|
.filter(it => it != undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
|||||||
}
|
}
|
||||||
if (competence.type == ITEM_TYPES.competencecreature) {
|
if (competence.type == ITEM_TYPES.competencecreature) {
|
||||||
const token = RdDUtility.getSelectedToken(this)
|
const token = RdDUtility.getSelectedToken(this)
|
||||||
const arme = RdDItemCompetenceCreature.armeCreature(competence)
|
const arme = MappingCreatureArme.armeCreature(competence)
|
||||||
if (arme && options.tryTarget && Targets.hasTargets()) {
|
if (arme && options.tryTarget && Targets.hasTargets()) {
|
||||||
Targets.selectOneTargetToken(target => {
|
Targets.selectOneTargetToken(target => {
|
||||||
if (arme.action == "possession") {
|
if (arme.action == "possession") {
|
||||||
@@ -430,7 +430,7 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Transformer la competence de créature
|
// Transformer la competence de créature
|
||||||
RdDItemCompetenceCreature.setRollDataCreature(rollData)
|
MappingCreatureArme.setRollDataCreature(rollData)
|
||||||
}
|
}
|
||||||
const dialogLabel = 'Jet ' + Grammar.apostrophe('de', competence.name);
|
const dialogLabel = 'Jet ' + Grammar.apostrophe('de', competence.name);
|
||||||
await this.openRollDialog({
|
await this.openRollDialog({
|
||||||
|
@@ -9,6 +9,7 @@ import { RdDAudio } from "../rdd-audio.js";
|
|||||||
import { RdDConfirm } from "../rdd-confirm.js";
|
import { RdDConfirm } from "../rdd-confirm.js";
|
||||||
import { RdDUtility } from "../rdd-utility.js";
|
import { RdDUtility } from "../rdd-utility.js";
|
||||||
import { SystemCompendiums } from "../settings/system-compendiums.js";
|
import { SystemCompendiums } from "../settings/system-compendiums.js";
|
||||||
|
import { RdDItem } from "../item.js";
|
||||||
|
|
||||||
export class RdDBaseActor extends Actor {
|
export class RdDBaseActor extends Actor {
|
||||||
|
|
||||||
@@ -499,7 +500,8 @@ export class RdDBaseActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async computeEncTotal() {
|
async computeEncTotal() {
|
||||||
if (!this.pack) {
|
if (!this.pack) {
|
||||||
this.encTotal = this.items.map(it => it.getEncTotal()).reduce(Misc.sum(), 0);
|
this.encTotal = this.items.filter(it => RdDItem.getItemTypesInventaire().includes(it.type))
|
||||||
|
.map(it => it.getEncTotal()).reduce(Misc.sum(), 0)
|
||||||
return this.encTotal;
|
return this.encTotal;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -758,10 +760,10 @@ export class RdDBaseActor extends Actor {
|
|||||||
getCaracInit(competence) { return 0 }
|
getCaracInit(competence) { return 0 }
|
||||||
|
|
||||||
listAttaques() {
|
listAttaques() {
|
||||||
return this.listActions({ isAttaque: true, isEquipe:false })
|
return this.listActions({ isAttaque: true, isEquipe: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
listActions({ isAttaque = false, isEquipe=false }) { return [] }
|
listActions({ isAttaque = false, isEquipe = false }) { return [] }
|
||||||
|
|
||||||
listActionsPossessions() {
|
listActionsPossessions() {
|
||||||
return this.itemTypes[ITEM_TYPES.possession]
|
return this.itemTypes[ITEM_TYPES.possession]
|
||||||
|
@@ -3,7 +3,7 @@ import { SYSTEM_RDD } from "../../constants.js";
|
|||||||
import { Misc } from "../../misc.js";
|
import { Misc } from "../../misc.js";
|
||||||
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js";
|
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js";
|
||||||
import { ExportScriptarium } from "./export-scriptarium.js";
|
import { ExportScriptarium } from "./export-scriptarium.js";
|
||||||
import { CATEGORIES_COMPETENCES, CATEGORIES_DRACONIC, Mapping } from "./mapping.js";
|
import { CATEGORIES_COMPETENCES_BASE, CATEGORIES_DRACONIC, Mapping } from "./mapping.js";
|
||||||
|
|
||||||
export class RdDActorExportSheet extends RdDActorSheet {
|
export class RdDActorExportSheet extends RdDActorSheet {
|
||||||
static init() {
|
static init() {
|
||||||
@@ -44,7 +44,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
|
|||||||
formData.context = Mapping.prepareContext(this.actor)
|
formData.context = Mapping.prepareContext(this.actor)
|
||||||
formData.attaques = this.actor.listActionsAttaque()
|
formData.attaques = this.actor.listActionsAttaque()
|
||||||
formData.export = this.getMappingValues(formData.context, this.actor)
|
formData.export = this.getMappingValues(formData.context, this.actor)
|
||||||
formData.competences = this.getCompetences(CATEGORIES_COMPETENCES)
|
formData.competences = this.getCompetences(CATEGORIES_COMPETENCES_BASE)
|
||||||
formData.draconic = this.getCompetences(CATEGORIES_DRACONIC)
|
formData.draconic = this.getCompetences(CATEGORIES_DRACONIC)
|
||||||
const legeres = this.actor.nbBlessuresLegeres()
|
const legeres = this.actor.nbBlessuresLegeres()
|
||||||
const graves = this.actor.nbBlessuresGraves()
|
const graves = this.actor.nbBlessuresGraves()
|
||||||
|
@@ -9,7 +9,7 @@ import { RdDBonus } from "../../rdd-bonus.js"
|
|||||||
import { TMRType } from "../../tmr-utility.js"
|
import { TMRType } from "../../tmr-utility.js"
|
||||||
|
|
||||||
|
|
||||||
export const CATEGORIES_COMPETENCES = [
|
export const CATEGORIES_COMPETENCES_BASE = [
|
||||||
"generale",
|
"generale",
|
||||||
"particuliere",
|
"particuliere",
|
||||||
"specialisee",
|
"specialisee",
|
||||||
@@ -88,7 +88,7 @@ const MAPPING_BASE = [
|
|||||||
{ column: "endurance_actuel", rollClass: 'jet-endurance', getter: (actor, context) => actor.system.sante.endurance.value },
|
{ column: "endurance_actuel", rollClass: 'jet-endurance', getter: (actor, context) => actor.system.sante.endurance.value },
|
||||||
{ column: "esquive", getter: (actor, context) => Mapping.getEsquive(context) },
|
{ column: "esquive", getter: (actor, context) => Mapping.getEsquive(context) },
|
||||||
{ column: "esquive_armure", getter: (actor, context) => Mapping.getEsquiveArmure(context) },
|
{ column: "esquive_armure", getter: (actor, context) => Mapping.getEsquiveArmure(context) },
|
||||||
{ column: "competences", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_COMPETENCES) },
|
{ column: "competences", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_COMPETENCES_BASE) },
|
||||||
{ column: "draconic", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_DRACONIC) },
|
{ column: "draconic", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_DRACONIC) },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@@ -106,3 +106,14 @@ export const ITEM_TYPES = {
|
|||||||
nombreastral: 'nombreastral',
|
nombreastral: 'nombreastral',
|
||||||
extraitpoetique: 'extraitpoetique',
|
extraitpoetique: 'extraitpoetique',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const CATEGORIES_COMPETENCES = {
|
||||||
|
"generale": { base: -4, label: "Générales" },
|
||||||
|
"particuliere": { base: -8, label: "Particulières" },
|
||||||
|
"specialisee": { base: -11, label: "Spécialisées" },
|
||||||
|
"connaissance": { base: -11, label: "Connaissances" },
|
||||||
|
"draconic": { base: -11, label: "Draconic" },
|
||||||
|
"melee": { base: -6, label: "Mêlée" },
|
||||||
|
"tir": { base: -8, label: "Tir" },
|
||||||
|
"lancer": { base: -8, label: "Lancer" }
|
||||||
|
}
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
import { Grammar } from "./grammar.js";
|
import { Grammar } from "./grammar.js";
|
||||||
import { RdDItem } from "./item.js";
|
import { RdDItem } from "./item.js";
|
||||||
import { SANS_COMPETENCE } from "./item/base-items.js";
|
import { CATEGORIES_COMPETENCES, SANS_COMPETENCE } from "./item/base-items.js";
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
|
|
||||||
const competenceTroncs = [["Esquive", "Dague", "Corps à corps"],
|
const competenceTroncs = [["Esquive", "Dague", "Corps à corps"],
|
||||||
@@ -25,16 +26,6 @@ const limitesArchetypes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export const CATEGORIES_COMPETENCES = {
|
|
||||||
"generale": { base: -4, label: "Générales" },
|
|
||||||
"particuliere": { base: -8, label: "Particulières" },
|
|
||||||
"specialisee": { base: -11, label: "Spécialisées" },
|
|
||||||
"connaissance": { base: -11, label: "Connaissances" },
|
|
||||||
"draconic": { base: -11, label: "Draconic" },
|
|
||||||
"melee": { base: -6, label: "Mêlée" },
|
|
||||||
"tir": { base: -8, label: "Tir" },
|
|
||||||
"lancer": { base: -8, label: "Lancer" }
|
|
||||||
}
|
|
||||||
|
|
||||||
function _buildCumulXP() {
|
function _buildCumulXP() {
|
||||||
let cumulXP = { "-11": 0 };
|
let cumulXP = { "-11": 0 };
|
||||||
@@ -49,7 +40,12 @@ function _buildCumulXP() {
|
|||||||
|
|
||||||
const competence_xp_cumul = _buildCumulXP();
|
const competence_xp_cumul = _buildCumulXP();
|
||||||
|
|
||||||
export class RdDItemCompetence extends Item {
|
export class RdDItemCompetence extends RdDItem {
|
||||||
|
|
||||||
|
static get ITEM_TYPE() { return ITEM_TYPES.competence }
|
||||||
|
|
||||||
|
static get defaultIcon() { return "systems/foundryvtt-reve-de-dragon/icons/competence_defaut.webp" }
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static getLabelCategorie(category) {
|
static getLabelCategorie(category) {
|
||||||
return CATEGORIES_COMPETENCES[category].label;
|
return CATEGORIES_COMPETENCES[category].label;
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import { ITEM_TYPES } from "./constants.js";
|
import { ITEM_TYPES } from "./constants.js";
|
||||||
import { RdDItem } from "./item.js";
|
import { RdDItem } from "./item.js";
|
||||||
import { RdDInitiative } from "./initiative.mjs";
|
import { RdDInitiative } from "./initiative.mjs";
|
||||||
|
import { RdDItemArme } from "./item/arme.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class RdDItemCompetenceCreature extends RdDItem {
|
export class RdDItemCompetenceCreature extends RdDItem {
|
||||||
@@ -12,38 +13,37 @@ export class RdDItemCompetenceCreature extends RdDItem {
|
|||||||
isParade() { return this.system.iscombat && (this.system.categorie_parade ?? '') != '' }
|
isParade() { return this.system.iscombat && (this.system.categorie_parade ?? '') != '' }
|
||||||
isBouclier() { return this.system.categorie_parade.includes('bouclier') }
|
isBouclier() { return this.system.categorie_parade.includes('bouclier') }
|
||||||
|
|
||||||
static attaqueCreature(comp) {
|
attaqueCreature() {
|
||||||
const categorieAttaque = comp.getCategorieAttaque()
|
const categorieAttaque = this.getCategorieAttaque()
|
||||||
if (categorieAttaque != undefined) {
|
if (categorieAttaque != undefined) {
|
||||||
const initative = RdDInitiative.calculInitiative(comp.system.niveau, comp.system.carac_value);
|
const initative = RdDInitiative.calculInitiative(this.system.niveau, this.system.carac_value);
|
||||||
const armeComp = new RdDItem({
|
|
||||||
name: comp.name,
|
|
||||||
type: ITEM_TYPES.arme,
|
|
||||||
img: comp.img,
|
|
||||||
system: {
|
|
||||||
competence: comp.name,
|
|
||||||
cac: categorieAttaque == "naturelle" ? "naturelle" : "",
|
|
||||||
niveau: comp.system.niveau,
|
|
||||||
initiative: initative,
|
|
||||||
mortalite: comp.system.mortalite,
|
|
||||||
dommages: comp.system.dommages,
|
|
||||||
equipe: true,
|
|
||||||
resistance: 100,
|
|
||||||
penetration: 0,
|
|
||||||
force: 0,
|
|
||||||
rapide: true,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const attaque = {
|
const attaque = {
|
||||||
name: comp.name,
|
name: this.name,
|
||||||
action: comp.isCompetencePossession() ? 'possession' : 'attaque',
|
action: this.isCompetencePossession() ? 'possession' : 'attaque',
|
||||||
initOnly: false,
|
initOnly: false,
|
||||||
arme: armeComp,
|
arme: new RdDItemArme({
|
||||||
comp: comp,
|
name: this.name,
|
||||||
carac: { key: comp.name, value: comp.system.carac_value },
|
type: ITEM_TYPES.arme,
|
||||||
|
img: this.img,
|
||||||
|
system: {
|
||||||
|
competence: this.name,
|
||||||
|
cac: categorieAttaque == "naturelle" ? "naturelle" : "",
|
||||||
|
niveau: this.system.niveau,
|
||||||
|
initiative: initative,
|
||||||
|
mortalite: this.system.mortalite,
|
||||||
|
dommages: this.system.dommages,
|
||||||
|
equipe: true,
|
||||||
|
resistance: 100,
|
||||||
|
penetration: 0,
|
||||||
|
force: 0,
|
||||||
|
rapide: true,
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
comp: this,
|
||||||
|
carac: { key: this.name, value: this.system.carac_value },
|
||||||
equipe: true,
|
equipe: true,
|
||||||
mortalite: comp.system.mortalite,
|
mortalite: this.system.mortalite,
|
||||||
dmg: comp.system.dommages,
|
dmg: this.system.dommages,
|
||||||
initiative: initative
|
initiative: initative
|
||||||
};
|
};
|
||||||
return attaque
|
return attaque
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
import { ACTOR_TYPES, ITEM_TYPES } from "./constants.js";
|
import { ACTOR_TYPES, ITEM_TYPES } from "./constants.js";
|
||||||
|
|
||||||
|
import { RdDItem } from "./item.js";
|
||||||
|
import { RdDItemCompetence } from "./item-competence.js";
|
||||||
import { RdDItemSort } from "./item-sort.js";
|
import { RdDItemSort } from "./item-sort.js";
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
import { RdDUtility } from "./rdd-utility.js";
|
||||||
import { RdDItemCompetence } from "./item-competence.js";
|
|
||||||
import { HtmlUtility } from "./html-utility.js";
|
import { HtmlUtility } from "./html-utility.js";
|
||||||
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
||||||
import { SYSTEM_RDD } from "./constants.js";
|
import { SYSTEM_RDD } from "./constants.js";
|
||||||
@@ -9,7 +11,6 @@ import { RdDSheetUtility } from "./rdd-sheet-utility.js";
|
|||||||
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
import { RdDTimestamp } from "./time/rdd-timestamp.js";
|
import { RdDTimestamp } from "./time/rdd-timestamp.js";
|
||||||
import { RdDItem } from "./item.js";
|
|
||||||
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
|
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
|
||||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||||
import { ItemAction } from "./item/item-actions.js";
|
import { ItemAction } from "./item/item-actions.js";
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import { ITEM_TYPES } from "./constants.js";
|
import { ITEM_TYPES } from "./constants.js";
|
||||||
import { CATEGORIES_COMPETENCES } from "./item-competence.js";
|
import { BASE_CORPS_A_CORPS, BASE_ESQUIVE, CATEGORIES_COMPETENCES, CATEGORIES_COMPETENCES_CREATURES } from "./item/base-items.js";
|
||||||
import { BASE_CORPS_A_CORPS, BASE_ESQUIVE, CATEGORIES_COMPETENCES_CREATURES } from "./item/base-items.js";
|
|
||||||
import { ITEM_ACTIONS, DEFAULT_ACTIONS, COMMON_ACTIONS } from "./item/item-actions.js";
|
import { ITEM_ACTIONS, DEFAULT_ACTIONS, COMMON_ACTIONS } from "./item/item-actions.js";
|
||||||
|
|
||||||
import { Grammar } from "./grammar.js";
|
import { Grammar } from "./grammar.js";
|
||||||
|
@@ -25,6 +25,7 @@ export const ATTAQUE_TYPE = {
|
|||||||
TIR: '(tir)',
|
TIR: '(tir)',
|
||||||
LANCER: '(lancer)'
|
LANCER: '(lancer)'
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class RdDItemArme extends RdDItem {
|
export class RdDItemArme extends RdDItem {
|
||||||
|
|
||||||
|
@@ -18,6 +18,17 @@ export const SANS_COMPETENCE = {
|
|||||||
img: "systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp"
|
img: "systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const CATEGORIES_COMPETENCES = {
|
||||||
|
"generale": { base: -4, label: "Générales" },
|
||||||
|
"particuliere": { base: -8, label: "Particulières" },
|
||||||
|
"specialisee": { base: -11, label: "Spécialisées" },
|
||||||
|
"connaissance": { base: -11, label: "Connaissances" },
|
||||||
|
"draconic": { base: -11, label: "Draconic" },
|
||||||
|
"melee": { base: -6, label: "Mêlée" },
|
||||||
|
"tir": { base: -8, label: "Tir" },
|
||||||
|
"lancer": { base: -8, label: "Lancer" }
|
||||||
|
}
|
||||||
|
|
||||||
export const CATEGORIES_COMPETENCES_CREATURES = {
|
export const CATEGORIES_COMPETENCES_CREATURES = {
|
||||||
"generale": { base: 0, label: "Générale" },
|
"generale": { base: 0, label: "Générale" },
|
||||||
"naturelle": { base: 0, label: "Arme naturelle" },
|
"naturelle": { base: 0, label: "Arme naturelle" },
|
||||||
|
@@ -7,19 +7,18 @@ import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
|||||||
import { RdDRoll } from "./rdd-roll.js";
|
import { RdDRoll } from "./rdd-roll.js";
|
||||||
import { RdDRollTables } from "./rdd-rolltables.js";
|
import { RdDRollTables } from "./rdd-rolltables.js";
|
||||||
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
||||||
import { STATUSES } from "./settings/status-effects.js";
|
|
||||||
import { Targets } from "./targets.js";
|
import { Targets } from "./targets.js";
|
||||||
import { RdDEmpoignade } from "./rdd-empoignade.js";
|
import { RdDEmpoignade } from "./rdd-empoignade.js";
|
||||||
import { RdDRollResult } from "./rdd-roll-result.js";
|
import { RdDRollResult } from "./rdd-roll-result.js";
|
||||||
import { RdDItemArme } from "./item/arme.js";
|
import { RdDItemArme } from "./item/arme.js";
|
||||||
import { RdDItemCompetence } from "./item-competence.js";
|
import { RdDItemCompetence } from "./item-competence.js";
|
||||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
|
||||||
import { RdDInitiative } from "./initiative.mjs";
|
import { RdDInitiative } from "./initiative.mjs";
|
||||||
import RollDialog from "./roll/roll-dialog.mjs";
|
import RollDialog from "./roll/roll-dialog.mjs";
|
||||||
import { PART_DEFENSE } from "./roll/roll-part-defense.mjs";
|
import { PART_DEFENSE } from "./roll/roll-part-defense.mjs";
|
||||||
import { RollDialogAdapter } from "./roll/roll-dialog-adapter.mjs";
|
import { RollDialogAdapter } from "./roll/roll-dialog-adapter.mjs";
|
||||||
import { ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE } from "./roll/roll-constants.mjs";
|
import { ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE } from "./roll/roll-constants.mjs";
|
||||||
import { OptionsAvancees, ROLL_DIALOG_V2_TEST } from "./settings/options-avancees.js";
|
import { OptionsAvancees, ROLL_DIALOG_V2_TEST } from "./settings/options-avancees.js";
|
||||||
|
import { MappingCreatureArme } from "./item/mapping-creature-arme.mjs";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
const premierRoundInit = [
|
const premierRoundInit = [
|
||||||
@@ -716,7 +715,7 @@ export class RdDCombat {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (this.attacker.isCreatureEntite()) {
|
if (this.attacker.isCreatureEntite()) {
|
||||||
RdDItemCompetenceCreature.setRollDataCreature(rollData);
|
MappingCreatureArme.setRollDataCreature(rollData);
|
||||||
}
|
}
|
||||||
else if (arme) {
|
else if (arme) {
|
||||||
// Usual competence
|
// Usual competence
|
||||||
@@ -1023,7 +1022,7 @@ export class RdDCombat {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (this.defender.isCreatureEntite()) {
|
if (this.defender.isCreatureEntite()) {
|
||||||
RdDItemCompetenceCreature.setRollDataCreature(defenderRoll);
|
MappingCreatureArme.setRollDataCreature(defenderRoll);
|
||||||
}
|
}
|
||||||
|
|
||||||
return defenderRoll;
|
return defenderRoll;
|
||||||
@@ -1155,7 +1154,7 @@ export class RdDCombat {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (this.defender.isCreatureEntite()) {
|
if (this.defender.isCreatureEntite()) {
|
||||||
RdDItemCompetenceCreature.setRollDataCreature(rollData);
|
MappingCreatureArme.setRollDataCreature(rollData);
|
||||||
}
|
}
|
||||||
return rollData;
|
return rollData;
|
||||||
}
|
}
|
||||||
|
@@ -45,6 +45,8 @@ import * as sheets from "./applications/sheets/_module.mjs"
|
|||||||
import { RdDItemArme } from "./item/arme.js"
|
import { RdDItemArme } from "./item/arme.js"
|
||||||
import { RdDItemArmure } from "./item/armure.js"
|
import { RdDItemArmure } from "./item/armure.js"
|
||||||
import { RdDItemBlessure } from "./item/blessure.js"
|
import { RdDItemBlessure } from "./item/blessure.js"
|
||||||
|
import { RdDItemCompetence } from "./item-competence.js"
|
||||||
|
import { RdDItemCompetenceCreature } from "./item-competencecreature.js"
|
||||||
import { RdDItemGemme } from "./item/gemme.js"
|
import { RdDItemGemme } from "./item/gemme.js"
|
||||||
import { RdDItemMaladie } from "./item/maladie.js"
|
import { RdDItemMaladie } from "./item/maladie.js"
|
||||||
import { RdDItemOmbre } from "./item/ombre.js"
|
import { RdDItemOmbre } from "./item/ombre.js"
|
||||||
@@ -113,6 +115,8 @@ export class SystemReveDeDragon {
|
|||||||
arme: RdDItemArme,
|
arme: RdDItemArme,
|
||||||
armure: RdDItemArmure,
|
armure: RdDItemArmure,
|
||||||
blessure: RdDItemBlessure,
|
blessure: RdDItemBlessure,
|
||||||
|
competence: RdDItemCompetence,
|
||||||
|
competencecreature: RdDItemCompetenceCreature,
|
||||||
gemme: RdDItemGemme,
|
gemme: RdDItemGemme,
|
||||||
maladie: RdDItemMaladie,
|
maladie: RdDItemMaladie,
|
||||||
ombre: RdDItemOmbre,
|
ombre: RdDItemOmbre,
|
||||||
|
@@ -11,7 +11,6 @@ import { RdDItem } from "./item.js";
|
|||||||
import { RdDPossession } from "./rdd-possession.js";
|
import { RdDPossession } from "./rdd-possession.js";
|
||||||
import { RdDNameGen } from "./rdd-namegen.js";
|
import { RdDNameGen } from "./rdd-namegen.js";
|
||||||
import { RdDConfirm } from "./rdd-confirm.js";
|
import { RdDConfirm } from "./rdd-confirm.js";
|
||||||
import { RdDItemCompetence } from "./item-competence.js";
|
|
||||||
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
||||||
import { RdDTimestamp } from "./time/rdd-timestamp.js";
|
import { RdDTimestamp } from "./time/rdd-timestamp.js";
|
||||||
import { RdDRaretes } from "./item/raretes.js";
|
import { RdDRaretes } from "./item/raretes.js";
|
||||||
@@ -23,6 +22,8 @@ import { ITEM_TYPES, RDD_CONFIG, SYSTEM_RDD } from "./constants.js";
|
|||||||
import { RdDBaseActor } from "./actor/base-actor.js";
|
import { RdDBaseActor } from "./actor/base-actor.js";
|
||||||
import { RdDCarac } from "./rdd-carac.js";
|
import { RdDCarac } from "./rdd-carac.js";
|
||||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||||
|
|
||||||
|
import { RdDItemCompetence } from "./item-competence.js";
|
||||||
import { Monnaie } from "./item-monnaie.js";
|
import { Monnaie } from "./item-monnaie.js";
|
||||||
import { ItemAction } from "./item/item-actions.js";
|
import { ItemAction } from "./item/item-actions.js";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user