forked from public/foundryvtt-reve-de-dragon
		
	v10 migration, ongoing WIP
This commit is contained in:
		@@ -1345,7 +1345,6 @@ export class RdDActor extends Actor {
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async computeMalusArmure() {
 | 
			
		||||
    let arm = this.filterItemsData(it => it.type == 'armure' && it.system.equipe)
 | 
			
		||||
    console.log(">>>>>>>>>ARM", arm)
 | 
			
		||||
    const newMalusArmure = this.filterItemsData(it => it.type == 'armure' && it.system.equipe)
 | 
			
		||||
      .map(it => it.system.malus ?? 0)
 | 
			
		||||
      .reduce(Misc.sum(), 0)
 | 
			
		||||
@@ -2592,19 +2591,19 @@ export class RdDActor extends Actor {
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async rollTache(id) {
 | 
			
		||||
    const tacheData = Misc.data(this.getTache(id));
 | 
			
		||||
    const compData = Misc.data(this.getCompetence(tacheData.data.competence));
 | 
			
		||||
    compData.data.defaut_carac = tacheData.data.carac; // Patch !
 | 
			
		||||
    const tacheData = this.getTache(id)
 | 
			
		||||
    const compData = this.getCompetence(tacheData.system.competence)
 | 
			
		||||
    compData.system.defaut_carac = tacheData.system.carac // Patch !
 | 
			
		||||
 | 
			
		||||
    let rollData = {
 | 
			
		||||
      competence: compData,
 | 
			
		||||
      tache: tacheData,
 | 
			
		||||
      diffLibre: tacheData.data.difficulte,
 | 
			
		||||
      diffLibre: tacheData.system.difficulte,
 | 
			
		||||
      diffConditions: 0,
 | 
			
		||||
      use: { libre: false, conditions: true },
 | 
			
		||||
      carac: {}
 | 
			
		||||
    };
 | 
			
		||||
    rollData.carac[tacheData.data.carac] = duplicate(this.system.carac[tacheData.data.carac]); // Single carac
 | 
			
		||||
    rollData.carac[tacheData.system.carac] = duplicate(this.system.carac[tacheData.system.carac]); // Single carac
 | 
			
		||||
 | 
			
		||||
    console.log("rollTache !!!", rollData);
 | 
			
		||||
 | 
			
		||||
@@ -2617,29 +2616,29 @@ export class RdDActor extends Actor {
 | 
			
		||||
        { action: r => this._tacheResult(r) }
 | 
			
		||||
      ]
 | 
			
		||||
    });
 | 
			
		||||
    dialog.render(true);
 | 
			
		||||
    dialog.render(true)
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async _tacheResult(rollData) {
 | 
			
		||||
    // Mise à jour de la tache
 | 
			
		||||
    rollData.appliquerFatigue = ReglesOptionelles.isUsing("appliquer-fatigue");
 | 
			
		||||
    rollData.tache = duplicate(rollData.tache);
 | 
			
		||||
    rollData.tache.data.points_de_tache_courant += rollData.rolled.ptTache;
 | 
			
		||||
    rollData.appliquerFatigue = ReglesOptionelles.isUsing("appliquer-fatigue")
 | 
			
		||||
    rollData.tache = duplicate(rollData.tache)
 | 
			
		||||
    rollData.tache.system.points_de_tache_courant += rollData.rolled.ptTache
 | 
			
		||||
    if (rollData.rolled.isETotal) {
 | 
			
		||||
      rollData.tache.data.difficulte--;
 | 
			
		||||
      rollData.tache.system.difficulte--
 | 
			
		||||
    }
 | 
			
		||||
    if (rollData.rolled.isSuccess) {
 | 
			
		||||
      rollData.tache.data.nb_jet_succes++;
 | 
			
		||||
      rollData.tache.system.nb_jet_succes++
 | 
			
		||||
    } else {
 | 
			
		||||
      rollData.tache.data.nb_jet_echec++;
 | 
			
		||||
      rollData.tache.system.nb_jet_echec++
 | 
			
		||||
    }
 | 
			
		||||
    rollData.tache.data.tentatives = rollData.tache.data.nb_jet_succes + rollData.tache.data.nb_jet_echec;
 | 
			
		||||
    rollData.tache.system.tentatives = rollData.tache.system.nb_jet_succes + rollData.tache.system.nb_jet_echec
 | 
			
		||||
 | 
			
		||||
    this.updateEmbeddedDocuments('Item', [rollData.tache]);
 | 
			
		||||
    this.santeIncDec("fatigue", rollData.tache.data.fatigue);
 | 
			
		||||
    this.updateEmbeddedDocuments('Item', [rollData.tache])
 | 
			
		||||
    this.santeIncDec("fatigue", rollData.tache.system.fatigue)
 | 
			
		||||
 | 
			
		||||
    await RdDResolutionTable.displayRollData(rollData, this, 'chat-resultat-tache.html');
 | 
			
		||||
    await RdDResolutionTable.displayRollData(rollData, this, 'chat-resultat-tache.html')
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
@@ -2648,14 +2647,14 @@ export class RdDActor extends Actor {
 | 
			
		||||
      {
 | 
			
		||||
        oeuvre: oeuvre,
 | 
			
		||||
        art: oeuvre.type,
 | 
			
		||||
        competence: duplicate(Misc.data(this.getCompetence(artData.compName ?? oeuvre.data.competence ?? artData.art))),
 | 
			
		||||
        diffLibre: - (oeuvre.data.niveau ?? 0),
 | 
			
		||||
        competence: duplicate( this.getCompetence(artData.compName ?? oeuvre.system.competence ?? artData.art)),
 | 
			
		||||
        diffLibre: - (oeuvre.system.niveau ?? 0),
 | 
			
		||||
        diffConditions: 0,
 | 
			
		||||
        use: { libre: false, conditions: true },
 | 
			
		||||
        selectedCarac: duplicate(this.system.carac[selected])
 | 
			
		||||
      },
 | 
			
		||||
      { overwrite: false });
 | 
			
		||||
    artData.competence.data.defaut_carac = selected;
 | 
			
		||||
    artData.competence.system.defaut_carac = selected
 | 
			
		||||
    if (!artData.forceCarac) {
 | 
			
		||||
      artData.forceCarac = {};
 | 
			
		||||
      artData.forceCarac[selected] = duplicate(this.system.carac[selected]);
 | 
			
		||||
@@ -2682,8 +2681,8 @@ export class RdDActor extends Actor {
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async _resultArt(artData) {
 | 
			
		||||
    const baseQualite = (artData.rolled.isSuccess ? artData.oeuvre.data.niveau : artData.competence.data.niveau);
 | 
			
		||||
    artData.qualiteFinale = Math.min(baseQualite, artData.oeuvre.data.niveau) + artData.rolled.ptQualite;
 | 
			
		||||
    const baseQualite = (artData.rolled.isSuccess ? artData.oeuvre.system.niveau : artData.competence.system.niveau);
 | 
			
		||||
    artData.qualiteFinale = Math.min(baseQualite, artData.oeuvre.system.niveau) + artData.rolled.ptQualite;
 | 
			
		||||
 | 
			
		||||
    await RdDResolutionTable.displayRollData(artData, this.name, `chat-resultat-${artData.art}.html`);
 | 
			
		||||
  }
 | 
			
		||||
@@ -2699,10 +2698,10 @@ export class RdDActor extends Actor {
 | 
			
		||||
  async rollDanse(id) {
 | 
			
		||||
    const artData = { art: 'danse', verbe: 'Danser', forceCarac: {} };
 | 
			
		||||
    const oeuvre = duplicate(this.getItemOfType(id, artData.art));
 | 
			
		||||
    if (oeuvre.data.agilite) {
 | 
			
		||||
    if (oeuvre.system.agilite) {
 | 
			
		||||
      artData.forceCarac['agilite'] = duplicate(this.system.carac.agilite);
 | 
			
		||||
    }
 | 
			
		||||
    if (oeuvre.data.apparence) {
 | 
			
		||||
    if (oeuvre.system.apparence) {
 | 
			
		||||
      artData.forceCarac['apparence'] = duplicate(this.system.carac.apparence);
 | 
			
		||||
    }
 | 
			
		||||
    const selectedCarac = this._getCaracDanse(oeuvre);
 | 
			
		||||
@@ -2711,9 +2710,9 @@ export class RdDActor extends Actor {
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  _getCaracDanse(oeuvre) {
 | 
			
		||||
    if (oeuvre.data.agilite) { return "agilite"; }
 | 
			
		||||
    else if (oeuvre.data.apparence) { return "apparence"; }
 | 
			
		||||
    const compData = Misc.data(this.getCompetence(oeuvre.data.competence));
 | 
			
		||||
    if (oeuvre.system.agilite) { return "agilite"; }
 | 
			
		||||
    else if (oeuvre.system.apparence) { return "apparence"; }
 | 
			
		||||
    const compData = Misc.data(this.getCompetence(oeuvre.system.competence));
 | 
			
		||||
    return compData.data.defaut_carac;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -2738,17 +2737,17 @@ export class RdDActor extends Actor {
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async _resultRecetteCuisine(artData) {
 | 
			
		||||
    const baseQualite = (artData.rolled.isSuccess ? artData.oeuvre.data.niveau : artData.competence.data.niveau);
 | 
			
		||||
    const sust = artData.oeuvre.data.sust * artData.proportions;
 | 
			
		||||
    artData.qualiteFinale = Math.min(baseQualite, artData.oeuvre.data.niveau) + artData.rolled.ptQualite;
 | 
			
		||||
    artData.exotismeFinal = Math.min(Math.min(artData.qualiteFinale, artData.oeuvre.data.exotisme ?? 0), 0);
 | 
			
		||||
    const baseQualite = (artData.rolled.isSuccess ? artData.oeuvre.system.niveau : artData.competence.system.niveau);
 | 
			
		||||
    const sust = artData.oeuvre.system.sust * artData.proportions;
 | 
			
		||||
    artData.qualiteFinale = Math.min(baseQualite, artData.oeuvre.system.niveau) + artData.rolled.ptQualite;
 | 
			
		||||
    artData.exotismeFinal = Math.min(Math.min(artData.qualiteFinale, artData.oeuvre.system.exotisme ?? 0), 0);
 | 
			
		||||
    console.log("OEUVRE", artData.art, artData)
 | 
			
		||||
    const platCuisine = {
 | 
			
		||||
      name: artData.oeuvre.name,
 | 
			
		||||
      type: 'nourritureboisson',
 | 
			
		||||
      img: 'systems/foundryvtt-reve-de-dragon/icons/objets/provision_cuite.webp',
 | 
			
		||||
      data: {
 | 
			
		||||
        "description": artData.oeuvre.data.description,
 | 
			
		||||
        "description": artData.oeuvre.system.description,
 | 
			
		||||
        "sust": Math.min(sust, 1),
 | 
			
		||||
        "qualite": artData.qualiteFinale,
 | 
			
		||||
        "exotisme": artData.exotismeFinal,
 | 
			
		||||
@@ -2759,7 +2758,7 @@ export class RdDActor extends Actor {
 | 
			
		||||
    };
 | 
			
		||||
    if (artData.ajouterEquipement) {
 | 
			
		||||
      await this.createEmbeddedDocuments('Item', [platCuisine]);
 | 
			
		||||
      ui.notifications.info(`${platCuisine.data.quantite} rations de ${platCuisine.name} ont été ajoutés à votre équipement`);
 | 
			
		||||
      ui.notifications.info(`${platCuisine.system.quantite} rations de ${platCuisine.name} ont été ajoutés à votre équipement`);
 | 
			
		||||
    }
 | 
			
		||||
    artData.platCuisine = platCuisine;
 | 
			
		||||
    await RdDResolutionTable.displayRollData(artData, this.name, `chat-resultat-${artData.art}.html`);
 | 
			
		||||
@@ -2769,7 +2768,7 @@ export class RdDActor extends Actor {
 | 
			
		||||
  async rollJeu(id) {
 | 
			
		||||
    const oeuvre = Misc.data(this.getJeu(id));
 | 
			
		||||
 | 
			
		||||
    const listCarac = oeuvre.data.caraccomp.toLowerCase().split(/[.,:\/-]/).map(it => it.trim());
 | 
			
		||||
    const listCarac = oeuvre.system.caraccomp.toLowerCase().split(/[.,:\/-]/).map(it => it.trim());
 | 
			
		||||
    const carac = listCarac.length > 0 ? listCarac[0] : 'chance'
 | 
			
		||||
    const artData = {
 | 
			
		||||
      art: 'jeu', verbe: 'Jeu',
 | 
			
		||||
@@ -2778,22 +2777,22 @@ export class RdDActor extends Actor {
 | 
			
		||||
      forceCarac: {}
 | 
			
		||||
    };
 | 
			
		||||
    listCarac.forEach(c => artData.forceCarac[c] = this.system.carac[c]);
 | 
			
		||||
    artData.competence.data.niveauReel = artData.competence.data.niveau;
 | 
			
		||||
    artData.competence.data.niveau = Math.max(artData.competence.data.niveau, oeuvre.data.base);
 | 
			
		||||
    artData.competence.system.niveauReel = artData.competence.system.niveau;
 | 
			
		||||
    artData.competence.system.niveau = Math.max(artData.competence.system.niveau, oeuvre.system.base);
 | 
			
		||||
    await this._rollArt(artData, carac, oeuvre);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async rollOeuvre(id) {
 | 
			
		||||
    const artData = { art: 'oeuvre', verbe: 'Interpréter' };
 | 
			
		||||
    const oeuvre = duplicate(this.getItemOfType(id, artData.art));
 | 
			
		||||
    await this._rollArt(artData, oeuvre.data.default_carac, oeuvre);
 | 
			
		||||
    await this._rollArt(artData, oeuvre.system.default_carac, oeuvre);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async rollMeditation(id) {
 | 
			
		||||
    const meditation = duplicate(Misc.data(this.getMeditation(id)));
 | 
			
		||||
    const competence = duplicate(Misc.data(this.getCompetence(meditation.data.competence)));
 | 
			
		||||
    competence.data.defaut_carac = "intellect"; // Meditation = toujours avec intellect
 | 
			
		||||
    const competence = duplicate(Misc.data(this.getCompetence(meditation.system.competence)));
 | 
			
		||||
    competence.system.defaut_carac = "intellect"; // Meditation = toujours avec intellect
 | 
			
		||||
    let meditationData = {
 | 
			
		||||
      competence: competence,
 | 
			
		||||
      meditation: meditation,
 | 
			
		||||
@@ -2841,7 +2840,7 @@ export class RdDActor extends Actor {
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  _getSignesDraconiques(coord) {
 | 
			
		||||
    const type = TMRUtility.getTMRType(coord);
 | 
			
		||||
    return this.listItemsData("signedraconique").filter(it => it.data.typesTMR.includes(type));
 | 
			
		||||
    return this.listItemsData("signedraconique").filter(it => it.system.typesTMR.includes(type));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
@@ -3188,7 +3187,6 @@ export class RdDActor extends Actor {
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  rollArme(arme) {
 | 
			
		||||
    let itemData = arme.system && arme.system || arme.data
 | 
			
		||||
    console.log("ARME", arme, itemData)
 | 
			
		||||
    let competence = this.getCompetence( itemData.competence )
 | 
			
		||||
    if (arme || (competence.type == 'competencecreature' && competence.system.iscombat)) {
 | 
			
		||||
      if (competence.system.ispossession) {
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ export class DialogCreateSigneDraconique extends Dialog {
 | 
			
		||||
    const signe = await RdDItemSigneDraconique.randomSigneDraconique({ephemere: true});
 | 
			
		||||
    let dialogData = {
 | 
			
		||||
      signe: signe,
 | 
			
		||||
      tmrs: TMRUtility.listSelectedTMR(signe.data.typesTMR ?? []),
 | 
			
		||||
      tmrs: TMRUtility.listSelectedTMR(signe.system.typesTMR ?? []),
 | 
			
		||||
      actors: game.actors.filter(actor => actor.isHautRevant()).map(actor => {
 | 
			
		||||
        let actorData = duplicate(Misc.data(actor));
 | 
			
		||||
        actorData.selected = actor.hasPlayerOwner;
 | 
			
		||||
@@ -51,26 +51,26 @@ export class DialogCreateSigneDraconique extends Dialog {
 | 
			
		||||
      whisper: ChatUtility.getWhisperRecipientsAndGMs(Misc.data(actor).name),
 | 
			
		||||
      content: await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/chat-signe-draconique-actor.html", {
 | 
			
		||||
        signe: signe,
 | 
			
		||||
        alias: Misc.data(actor).name
 | 
			
		||||
        alias: actor.name
 | 
			
		||||
      })
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  validerSigne() {
 | 
			
		||||
    this.dialogData.signe.name = $("[name='signe.name']").val();
 | 
			
		||||
    this.dialogData.signe.data.valeur.norm = $("[name='signe.data.valeur.norm']").val();
 | 
			
		||||
    this.dialogData.signe.data.valeur.sign = $("[name='signe.data.valeur.sign']").val();
 | 
			
		||||
    this.dialogData.signe.data.valeur.part = $("[name='signe.data.valeur.part']").val();
 | 
			
		||||
    this.dialogData.signe.data.difficulte = $("[name='signe.data.difficulte']").val();
 | 
			
		||||
    this.dialogData.signe.data.ephemere = $("[name='signe.data.ephemere']").prop("checked");
 | 
			
		||||
    this.dialogData.signe.data.duree = $("[name='signe.data.duree']").val();
 | 
			
		||||
    this.dialogData.signe.data.typesTMR = $(".select-tmr").val();
 | 
			
		||||
    this.dialogData.signe.system.valeur.norm = $("[name='signe.data.valeur.norm']").val();
 | 
			
		||||
    this.dialogData.signe.system.valeur.sign = $("[name='signe.data.valeur.sign']").val();
 | 
			
		||||
    this.dialogData.signe.system.valeur.part = $("[name='signe.data.valeur.part']").val();
 | 
			
		||||
    this.dialogData.signe.system.difficulte = $("[name='signe.data.difficulte']").val();
 | 
			
		||||
    this.dialogData.signe.system.ephemere = $("[name='signe.data.ephemere']").prop("checked");
 | 
			
		||||
    this.dialogData.signe.system.duree = $("[name='signe.data.duree']").val();
 | 
			
		||||
    this.dialogData.signe.system.typesTMR = $(".select-tmr").val();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  activateListeners(html) {
 | 
			
		||||
    super.activateListeners(html);
 | 
			
		||||
    this.setEphemere(this.dialogData.signe.data.ephemere);
 | 
			
		||||
    this.setEphemere(this.dialogData.signe.system.ephemere);
 | 
			
		||||
    html.find(".signe-aleatoire").click(event => this.setSigneAleatoire());
 | 
			
		||||
    html.find("[name='signe.data.ephemere']").change((event) => this.setEphemere(event.currentTarget.checked));
 | 
			
		||||
    html.find(".select-actor").change((event) => this.onSelectActor(event));
 | 
			
		||||
@@ -81,14 +81,14 @@ export class DialogCreateSigneDraconique extends Dialog {
 | 
			
		||||
    const newSigne = await RdDItemSigneDraconique.randomSigneDraconique({ephemere: true});
 | 
			
		||||
 | 
			
		||||
    $("[name='signe.name']").val(newSigne.name);
 | 
			
		||||
    $("[name='signe.data.valeur.norm']").val(newSigne.data.valeur.norm);
 | 
			
		||||
    $("[name='signe.data.valeur.sign']").val(newSigne.data.valeur.sign);
 | 
			
		||||
    $("[name='signe.data.valeur.part']").val(newSigne.data.valeur.part);
 | 
			
		||||
    $("[name='signe.data.difficulte']").val(newSigne.data.difficulte);
 | 
			
		||||
    $("[name='signe.data.duree']").val(newSigne.data.duree);
 | 
			
		||||
    $("[name='signe.data.ephemere']").prop("checked", newSigne.data.ephemere);
 | 
			
		||||
    $(".select-tmr").val(newSigne.data.typesTMR);
 | 
			
		||||
    this.setEphemere(newSigne.data.ephemere);
 | 
			
		||||
    $("[name='signe.data.valeur.norm']").val(newSigne.system.valeur.norm);
 | 
			
		||||
    $("[name='signe.data.valeur.sign']").val(newSigne.system.valeur.sign);
 | 
			
		||||
    $("[name='signe.data.valeur.part']").val(newSigne.system.valeur.part);
 | 
			
		||||
    $("[name='signe.data.difficulte']").val(newSigne.system.difficulte);
 | 
			
		||||
    $("[name='signe.data.duree']").val(newSigne.system.duree);
 | 
			
		||||
    $("[name='signe.data.ephemere']").prop("checked", newSigne.system.ephemere);
 | 
			
		||||
    $(".select-tmr").val(newSigne.system.typesTMR);
 | 
			
		||||
    this.setEphemere(newSigne.system.ephemere);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async setEphemere(ephemere) {
 | 
			
		||||
@@ -111,8 +111,8 @@ export class DialogCreateSigneDraconique extends Dialog {
 | 
			
		||||
  onValeurXpSort(event) {
 | 
			
		||||
    const codeReussite = event.currentTarget.attributes['data-typereussite']?.value ?? 0;
 | 
			
		||||
    const xp = Number(event.currentTarget.value);
 | 
			
		||||
    const oldValeur = this.dialogData.signe.data.valeur;
 | 
			
		||||
    this.dialogData.signe.data.valeur = RdDItemSigneDraconique.calculValeursXpSort(codeReussite, xp, oldValeur);
 | 
			
		||||
    const oldValeur = this.dialogData.signe.system.valeur;
 | 
			
		||||
    this.dialogData.signe.system.valeur = RdDItemSigneDraconique.calculValeursXpSort(codeReussite, xp, oldValeur);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -40,18 +40,21 @@ export class RdDSigneDraconiqueItemSheet extends ItemSheet {
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  async getData() {
 | 
			
		||||
    const formData = duplicate(Misc.data(this.object));
 | 
			
		||||
    mergeObject(formData, {
 | 
			
		||||
      title: formData.name,
 | 
			
		||||
    let formData = {
 | 
			
		||||
      name: this.object.name,
 | 
			
		||||
      img: this.object.img,
 | 
			
		||||
      title: this.object.name,
 | 
			
		||||
      isGM: game.user.isGM,
 | 
			
		||||
      owner: this.document.isOwner,
 | 
			
		||||
      data: this.object.system,
 | 
			
		||||
      isOwned: this.actor ? true : false,
 | 
			
		||||
      actorId: this.actor?.id,
 | 
			
		||||
      editable: this.isEditable,
 | 
			
		||||
      cssClass: this.isEditable ? "editable" : "locked",
 | 
			
		||||
    });
 | 
			
		||||
    formData.tmrs = TMRUtility.listSelectedTMR(formData.data.typesTMR ?? []);
 | 
			
		||||
    return formData;
 | 
			
		||||
    }
 | 
			
		||||
    formData.tmrs = TMRUtility.listSelectedTMR(this.object.system.typesTMR ?? [])
 | 
			
		||||
    console.log("SIG", formData)
 | 
			
		||||
    return formData
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
@@ -72,17 +75,17 @@ export class RdDSigneDraconiqueItemSheet extends ItemSheet {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async onSelectTmr(event) {
 | 
			
		||||
    event.preventDefault();
 | 
			
		||||
    const selectedTMR = $(".select-tmr").val();
 | 
			
		||||
    this.object.update({ 'data.typesTMR': selectedTMR });
 | 
			
		||||
    event.preventDefault()
 | 
			
		||||
    const selectedTMR = $(".select-tmr").val()
 | 
			
		||||
    this.object.update({ 'data.typesTMR': selectedTMR })
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async onValeurXpSort(event) {
 | 
			
		||||
    const codeReussite = event.currentTarget.attributes['data-typereussite']?.value ?? 0;
 | 
			
		||||
    const xp = Number(event.currentTarget.value);
 | 
			
		||||
    const oldValeur = Misc.templateData(this.object).valeur;
 | 
			
		||||
    const oldValeur = this.object.system.valeur
 | 
			
		||||
    const newValeur = RdDItemSigneDraconique.calculValeursXpSort(codeReussite, xp, oldValeur);
 | 
			
		||||
    await this.object.update({ 'data.valeur': newValeur });
 | 
			
		||||
    await this.object.update({ 'data.valeur': newValeur })
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
 
 | 
			
		||||
@@ -246,7 +246,7 @@ export class RdDItem extends Item {
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  getProprietes() {
 | 
			
		||||
    return this[`_${Misc.data(this).type}ChatData`]();
 | 
			
		||||
    return this[`_${this.type}ChatData`]();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
 
 | 
			
		||||
@@ -6,27 +6,27 @@
 | 
			
		||||
  {{else}}
 | 
			
		||||
  <span class="item-name flex-grow">{{item.name}}</span>
 | 
			
		||||
  {{/if}}
 | 
			
		||||
  <span class="item-quantite">{{item.data.quantite}}
 | 
			
		||||
    {{#if (gt item.data.quantite 1)}}
 | 
			
		||||
  <span class="item-quantite">{{item.system.quantite}}
 | 
			
		||||
    {{#if (gt item.system.quantite 1)}}
 | 
			
		||||
    <a class="item-control item-split" title="Séparer"><i class="fas fa-unlink"></i></a>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
  </span>
 | 
			
		||||
  <span class="item-quantite">{{numberFormat item.data.encTotal decimals=2}}</span>
 | 
			
		||||
  <span class="item-quantite">{{numberFormat item.system.encTotal decimals=2}}</span>
 | 
			
		||||
  <div class="item-controls flex-grow">
 | 
			
		||||
    {{#unless item.estContenu}}
 | 
			
		||||
    {{#if (ne item.type 'conteneur')}}
 | 
			
		||||
    <a class="item-control item-equip" title="Equiper">{{#if item.data.equipe}}<i class="fas fa-hand-rock"></i>{{else}}<i class="far fa-hand-paper"></i>{{/if}}</a>
 | 
			
		||||
    <a class="item-control item-equip" title="Equiper">{{#if item.system.equipe}}<i class="fas fa-hand-rock"></i>{{else}}<i class="far fa-hand-paper"></i>{{/if}}</a>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
    {{/unless}}
 | 
			
		||||
    <a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
 | 
			
		||||
    <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
 | 
			
		||||
    {{#if (or (eq item.type 'arme') (eq item.type 'conteneur') item.data.quantite)}}
 | 
			
		||||
    {{#if (or (eq item.type 'arme') (eq item.type 'conteneur') item.system.quantite)}}
 | 
			
		||||
     
 | 
			
		||||
    <a class="item-control item-vendre" title="Vendre ou donner"><i class="fas fa-comments-dollar"></i></a>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
    <a class="item-control item-montrer" title="Montrer"><i class="fas fa-comment"></i></a>
 | 
			
		||||
    {{#if item.data.actionPrincipale}}
 | 
			
		||||
    <a class="item-name item-action">{{item.data.actionPrincipale}}</a>
 | 
			
		||||
    {{#if item.system.actionPrincipale}}
 | 
			
		||||
    <a class="item-name item-action">{{item.system.actionPrincipale}}</a>
 | 
			
		||||
    {{/if}}
 | 
			
		||||
  </div>
 | 
			
		||||
</li>
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
  <li class="item flexrow list-item" data-item-id="{{piece._id}}">
 | 
			
		||||
    <img class="sheet-competence-img" src="{{piece.img}}" title="{{piece.name}}"/>
 | 
			
		||||
    <span class="competence-title competence-label">{{piece.name}}</span>
 | 
			
		||||
    <span class="competence-title competence-label">{{piece.data.quantite}}</span>
 | 
			
		||||
    <span class="competence-title competence-label">{{piece.system.quantite}}</span>
 | 
			
		||||
    <span class="competence-title">
 | 
			
		||||
      <a class="monnaie-plus plus-moins">+</a>
 | 
			
		||||
      <a class="monnaie-moins plus-moins">-</a>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<li class="item flexrow list-item" data-item-id="{{oeuvre._id}}">
 | 
			
		||||
  <span>{{upperFirst typeOeuvre}}</span>
 | 
			
		||||
  <span class="competence-title {{classOeuvre}}">
 | 
			
		||||
    <a>{{oeuvre.name}} (niveau {{oeuvre.data.niveau}})</a>
 | 
			
		||||
    <a>{{oeuvre.name}} (niveau {{oeuvre.system.niveau}})</a>
 | 
			
		||||
  </span>
 | 
			
		||||
  <div class="item-controls">
 | 
			
		||||
    <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
 | 
			
		||||
 
 | 
			
		||||
@@ -92,10 +92,10 @@
 | 
			
		||||
          <li class="item flexrow list-item" data-item-id="{{item._id}}">
 | 
			
		||||
              <img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/>
 | 
			
		||||
              <span class="item-name flex-grow">{{item.name}}</span>
 | 
			
		||||
              <span class="item-quantite">{{item.data.quantite}}</span>
 | 
			
		||||
              <span class="item-quantite">{{numberFormat item.data.encTotal decimals=2}}</span>
 | 
			
		||||
              <span class="item-quantite">{{item.system.quantite}}</span>
 | 
			
		||||
              <span class="item-quantite">{{numberFormat item.system.encTotal decimals=2}}</span>
 | 
			
		||||
              <div class="item-controls">
 | 
			
		||||
                  <a class="item-control item-equip" title="Equiper">{{#if item.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
 | 
			
		||||
                  <a class="item-control item-equip" title="Equiper">{{#if item.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
 | 
			
		||||
                  <a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
 | 
			
		||||
                  <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
 | 
			
		||||
              </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,33 +8,33 @@
 | 
			
		||||
    </h4>
 | 
			
		||||
  </div>
 | 
			
		||||
  <div class="form-group">
 | 
			
		||||
    <label for="signe.data.difficulte">Difficulte</label>
 | 
			
		||||
    <input type="number" name="signe.data.difficulte" value="{{signe.data.difficulte}}" data-dtype="Number" />
 | 
			
		||||
    <label for="signe.system.difficulte">Difficulte</label>
 | 
			
		||||
    <input type="number" name="data.difficulte" value="{{system.difficulte}}" data-dtype="Number" />
 | 
			
		||||
  </div>
 | 
			
		||||
  <div class="form-group">
 | 
			
		||||
    <label for="signe.data.valeur.norm">Expérience en sorts</label>
 | 
			
		||||
    <div class="flexrow">
 | 
			
		||||
      <input class="signe-xp-sort" type="number" name="signe.data.valeur.norm" data-typereussite="norm"
 | 
			
		||||
        value="{{signe.data.valeur.norm}}" min="1" max="100" data-dtype="Number" />
 | 
			
		||||
      <input class="signe-xp-sort" type="number" name="data.valeur.norm" data-typereussite="norm"
 | 
			
		||||
        value="{{system.valeur.norm}}" min="1" max="100" data-dtype="Number" />
 | 
			
		||||
      <span>Sign.</span>
 | 
			
		||||
      <input class="signe-xp-sort" type="number" name="signe.data.valeur.sign" data-typereussite="sign"
 | 
			
		||||
        value="{{signe.data.valeur.sign}}" min="1" max="100" data-dtype="Number" />
 | 
			
		||||
      <input class="signe-xp-sort" type="number" name="data.valeur.sign" data-typereussite="sign"
 | 
			
		||||
        value="{{system.valeur.sign}}" min="1" max="100" data-dtype="Number" />
 | 
			
		||||
      <span>Part.</span>
 | 
			
		||||
      <input class="signe-xp-sort" type="number" name="signe.data.valeur.part" data-typereussite="part"
 | 
			
		||||
        value="{{signe.data.valeur.part}}" min="1" max="100" data-dtype="Number" />
 | 
			
		||||
      <input class="signe-xp-sort" type="number" name="data.valeur.part" data-typereussite="part"
 | 
			
		||||
        value="{{system.valeur.part}}" min="1" max="100" data-dtype="Number" />
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
  <div class="form-group flexrow">
 | 
			
		||||
      <label for="signe.data.ephemere">Ephémère</label>
 | 
			
		||||
      <input class="flex-shrink" type="checkbox" name="signe.data.ephemere" {{#if signe.data.ephemere}}checked{{/if}} />
 | 
			
		||||
      <input class="flex-shrink" type="checkbox" name="data.ephemere" {{#if system.ephemere}}checked{{/if}} />
 | 
			
		||||
      <span>
 | 
			
		||||
        <input type="text" name="signe.data.duree" value="{{signe.data.duree}}" data-dtype="String" />
 | 
			
		||||
        <input type="text" name="data.duree" value="{{system.duree}}" data-dtype="String" />
 | 
			
		||||
      </span>
 | 
			
		||||
  </div>
 | 
			
		||||
  <div class="form-group">
 | 
			
		||||
    <label for="tmrs">Terres médianes</label>
 | 
			
		||||
    <select class="select-tmr" name="tmrs" id="tmrs" size="{{tmrs.length}}" multiple>
 | 
			
		||||
      {{#each tmrs as |tmr key|}}
 | 
			
		||||
      {{#each @root.tmrs as |tmr key|}}
 | 
			
		||||
      <option value="{{tmr.name}}" {{#if tmr.selected}}selected{{/if}}>{{tmr.name}}</option>
 | 
			
		||||
      {{/each}}
 | 
			
		||||
    </select>
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
      <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
 | 
			
		||||
      <div class="grid grid-2col">
 | 
			
		||||
        <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label>
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
      </div>
 | 
			
		||||
      {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
 | 
			
		||||
    </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
      <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
 | 
			
		||||
      <div class="grid grid-2col">
 | 
			
		||||
        <label for="carac">Caractéristique:</label>{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
      </div>
 | 
			
		||||
      {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
 | 
			
		||||
    </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -7,8 +7,8 @@
 | 
			
		||||
      <div class="grid grid-2col">
 | 
			
		||||
        <label>Type:</label><label class="flex-grow">{{oeuvre.data.type}}</label>
 | 
			
		||||
        <label for="carac">Caractéristique:</label>{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveauReel decimals=0 sign=true}}</label></label>
 | 
			
		||||
        <label>Niveau de base:</label><label class="flex-grow">{{oeuvre.data.base}}</label>
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveauReel decimals=0 sign=true}}</label></label>
 | 
			
		||||
        <label>Niveau de base:</label><label class="flex-grow">{{oeuvre.system.base}}</label>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="flex-group-left">
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@
 | 
			
		||||
      <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
 | 
			
		||||
      <div class="grid grid-2col">
 | 
			
		||||
        <label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label>
 | 
			
		||||
        <label for="draconic">{{competence.name}}:</label><label class="flex-grow" name="draconic">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label>
 | 
			
		||||
        <label for="draconic">{{competence.name}}:</label><label class="flex-grow" name="draconic">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="flex-group-left">
 | 
			
		||||
 
 | 
			
		||||
@@ -4,14 +4,14 @@
 | 
			
		||||
    <div class="flex-group-left">
 | 
			
		||||
      <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
 | 
			
		||||
      <div class="flexcol">
 | 
			
		||||
        <label><strong>{{meditation.data.theme}}</strong></label>
 | 
			
		||||
        <label><strong>{{meditation.system.theme}}</strong></label>
 | 
			
		||||
        <hr>
 | 
			
		||||
        <label>Support: <strong>{{upperFirst meditation.data.support}}</strong></label>
 | 
			
		||||
        <label>Case TMR: <strong>{{typeTmr-name meditation.data.tmr}}</strong></label>
 | 
			
		||||
        <label>Support: <strong>{{upperFirst meditation.system.support}}</strong></label>
 | 
			
		||||
        <label>Case TMR: <strong>{{typeTmr-name meditation.system.tmr}}</strong></label>
 | 
			
		||||
        <label>Durée: 60 minutes</label>
 | 
			
		||||
        <hr>
 | 
			
		||||
        <label>Intellect / {{competence.name}}:
 | 
			
		||||
          {{numberFormat carac.intellect.value decimals=0 sign=false}} / {{numberFormat competence.data.niveau decimals=0 sign=true}}</label>
 | 
			
		||||
          {{numberFormat carac.intellect.value decimals=0 sign=false}} / {{numberFormat competence.system.niveau decimals=0 sign=true}}</label>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="flex-group-left">
 | 
			
		||||
@@ -19,19 +19,19 @@
 | 
			
		||||
        <label><strong>Conditions Optionnelles : </strong></label>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <label>Comportement antérieur : {{upperFirst meditation.data.comportement}}</label>
 | 
			
		||||
        <label>Comportement antérieur : {{upperFirst meditation.system.comportement}}</label>
 | 
			
		||||
        <input class="attribute-value conditionMeditation" type="checkbox" id="isComportement" {{#if conditionMeditation.isComportement}}checked{{/if}} />
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <label>Heure : {{upperFirst meditation.data.heure}}</label>
 | 
			
		||||
        <label>Heure : {{upperFirst meditation.system.heure}}</label>
 | 
			
		||||
        <input class="attribute-value conditionMeditation" type="checkbox" id="isHeure" {{#if conditionMeditation.isHeure}}checked{{/if}} />
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <label>Purification : {{upperFirst meditation.data.purification}}</label>
 | 
			
		||||
        <label>Purification : {{upperFirst meditation.system.purification}}</label>
 | 
			
		||||
        <input class="attribute-value conditionMeditation" type="checkbox" id="isPurification" {{#if conditionMeditation.isPurification}}checked{{/if}} />
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="flexrow">
 | 
			
		||||
        <label>Vêture : {{upperFirst meditation.data.veture}}</label>
 | 
			
		||||
        <label>Vêture : {{upperFirst meditation.system.veture}}</label>
 | 
			
		||||
        <input class="attribute-value conditionMeditation" type="checkbox" id="isVeture" {{#if conditionMeditation.isVeture}}checked{{/if}} />
 | 
			
		||||
      </div>
 | 
			
		||||
      <hr>
 | 
			
		||||
 
 | 
			
		||||
@@ -6,9 +6,9 @@
 | 
			
		||||
      <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
 | 
			
		||||
      <div class="grid grid-2col">
 | 
			
		||||
        <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label>
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
      </div>
 | 
			
		||||
      {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
 | 
			
		||||
      {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="flex-group-left">
 | 
			
		||||
      {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffFixe.html"}}
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
      <div class="grid grid-2col">
 | 
			
		||||
        <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}
 | 
			
		||||
        </label>
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
        <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
      </div>
 | 
			
		||||
      {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}}
 | 
			
		||||
    </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -9,10 +9,10 @@
 | 
			
		||||
          <label>Caractéristique: </label><label>{{selectedCarac.label}}</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flexrow">
 | 
			
		||||
          <label>{{competence.name}}: </label><label>{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
          <label>{{competence.name}}: </label><label>{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flexrow">
 | 
			
		||||
          <label>Exotisme: </label><label>{{oeuvre.data.exotisme}}</label>
 | 
			
		||||
          <label>Exotisme: </label><label>{{oeuvre.system.exotisme}}</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="flexrow">
 | 
			
		||||
          <label for="proportions">Proportions: </label>
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@
 | 
			
		||||
      <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
 | 
			
		||||
      <div class="grid grid-2col">
 | 
			
		||||
        <label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label>
 | 
			
		||||
        <label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label>
 | 
			
		||||
        <label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="flex-group-left">
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@
 | 
			
		||||
        <select name="competence" class="roll-draconic" data-dtype="String">
 | 
			
		||||
          {{#select draconic}}
 | 
			
		||||
          {{#each draconicList as |draconic key|}}
 | 
			
		||||
          <option value={{key}}>{{draconic.name}} : {{numberFormat draconic.data.niveau decimals=0 sign=true}}
 | 
			
		||||
          <option value={{key}}>{{draconic.name}} : {{numberFormat draconic.system.niveau decimals=0 sign=true}}
 | 
			
		||||
          </option>
 | 
			
		||||
          {{/each}}
 | 
			
		||||
          {{/select}}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,9 +2,9 @@
 | 
			
		||||
  <img class="rdd-hud-togglebutton" src="systems/foundryvtt-reve-de-dragon/icons/heures/hd06.svg" width="36" height="36" title="Attaque"/>
 | 
			
		||||
  <div class="rdd-hud-list tokenhudext left">
 | 
			
		||||
    {{#each armes as |arme key|}}
 | 
			
		||||
    {{#unless arme.data.initOnly}}
 | 
			
		||||
    {{#unless arme.system.initOnly}}
 | 
			
		||||
    <div class="control-icon tokenhudicon rdd-hud-menu rdd-attaque" data-combatant-id="{{../combatant.id}}" data-arme-id="{{arme.index}}"  title="{{arme.name}}">
 | 
			
		||||
      <label>C:{{arme.name}}  {{arme.data.mainInfo}}</label>
 | 
			
		||||
      <label>C:{{arme.name}}  {{arme.system.mainInfo}}</label>
 | 
			
		||||
    </div>
 | 
			
		||||
    {{/unless}}
 | 
			
		||||
    {{/each}}
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@
 | 
			
		||||
  <div class="rdd-hud-list tokenhudext right">
 | 
			
		||||
    {{#each armes as |arme key|}}
 | 
			
		||||
    <div class="control-icon tokenhudicon rdd-hud-menu" data-command="{{arme.command}}" data-combatant-id="{{../combatant.id}}" data-arme-id="{{arme.index}}" title="{{arme.name}}">
 | 
			
		||||
      <label>I:{{arme.name}} {{arme.data.mainInfo}}</label>
 | 
			
		||||
      <label>I:{{arme.name}} {{arme.system.mainInfo}}</label>
 | 
			
		||||
    </div>
 | 
			
		||||
    {{/each}}
 | 
			
		||||
    {{#each commandes as |commande key|}}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
<div class="flex-group-left details-sort">
 | 
			
		||||
  {{#if sort.data.cible}}<label><strong>Cible</strong>: {{sort.data.cible}}  </label>{{/if}}
 | 
			
		||||
  {{#if sort.data.JR}}<label><strong>JR</strong>: {{sort.data.JR}}  </label>{{/if}}
 | 
			
		||||
  {{#if sort.data.portee}}<label><strong>Portée</strong>: {{sort.data.portée}}  </label>{{/if}}
 | 
			
		||||
  {{#if sort.data.duree}}<label><strong>Durée</strong>: {{sort.data.duree}}  </label>{{/if}}
 | 
			
		||||
  {{#if sort.data.coutseuil}}<label><strong>Coût de seuil</strong>: {{sort.data.coutseuil}}</label>{{/if}}
 | 
			
		||||
  {{#if sort.system.cible}}<label><strong>Cible</strong>: {{sort.system.cible}}  </label>{{/if}}
 | 
			
		||||
  {{#if sort.system.JR}}<label><strong>JR</strong>: {{sort.system.JR}}  </label>{{/if}}
 | 
			
		||||
  {{#if sort.system.portee}}<label><strong>Portée</strong>: {{sort.system.portée}}  </label>{{/if}}
 | 
			
		||||
  {{#if sort.system.duree}}<label><strong>Durée</strong>: {{sort.system.duree}}  </label>{{/if}}
 | 
			
		||||
  {{#if sort.system.coutseuil}}<label><strong>Coût de seuil</strong>: {{sort.system.coutseuil}}</label>{{/if}}
 | 
			
		||||
</div>
 | 
			
		||||
<div class="details-sort">
 | 
			
		||||
  {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" sort.data}}
 | 
			
		||||
  {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" sort.system}}
 | 
			
		||||
</div>
 | 
			
		||||
@@ -1,14 +1,14 @@
 | 
			
		||||
<div class="flexcol">
 | 
			
		||||
  <span><label>Description : </label></span>
 | 
			
		||||
  <div class="form-group editor">
 | 
			
		||||
    {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
 | 
			
		||||
    {{editor content=system.description target="system.description" button=true owner=owner editable=editable}}
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
{{#if isGM}}
 | 
			
		||||
<div class="flexcol">
 | 
			
		||||
  <span><label>Description (MJ seulement): </label></span>
 | 
			
		||||
  <div class="form-group editor">
 | 
			
		||||
    {{editor content=data.descriptionmj target="data.descriptionmj" button=true owner=owner editable=editable}}
 | 
			
		||||
    {{editor content=system.descriptionmj target="system.descriptionmj" button=true owner=owner editable=editable}}
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
{{/if}}
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
  <img class="chat-icon" src="{{img}}" title="{{name}}" />
 | 
			
		||||
  {{/if}}
 | 
			
		||||
  
 | 
			
		||||
  <p class="card-content">{{{data.description}}}</p>
 | 
			
		||||
  <p class="card-content">{{{system.description}}}</p>
 | 
			
		||||
  <p>
 | 
			
		||||
    {{#each properties as |property p|}}
 | 
			
		||||
    <span>{{{property}}}</span><br>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user