Jets d'alchimie dans descriptions/journaux
On ne se limite plus aux manipulations alchimiques, et les jets apparaissent comme tous les autres types de jets
This commit is contained in:
parent
ab0f7e563f
commit
d53da1f011
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
- gestion des blocs secrets dans les descriptions
|
- gestion des blocs secrets dans les descriptions
|
||||||
- on peut ajouter des liens "jet de dés" pour appeler une formule dés de foundry
|
- on peut ajouter des liens "jet de dés" pour appeler une formule dés de foundry
|
||||||
|
- les liens "manipulation alchimiques" peuvent être dans les descriptions, notes, ...
|
||||||
|
- les "manipulation alchimiques" fonctionnent comme tous les autres jets
|
||||||
|
|
||||||
|
|
||||||
## 12.0.33 - la vieillesse d'Astrobazzarh
|
## 12.0.33 - la vieillesse d'Astrobazzarh
|
||||||
|
@ -34,7 +34,6 @@ const XREGEXP_WEAPON_MANIEMENT = "(?<maniement>(" + Misc.join(Object.keys(MANIEM
|
|||||||
|
|
||||||
const XREGEXP_SORT_VOIE = "(?<voies>[OHNT](\\/[OHNT])*)"
|
const XREGEXP_SORT_VOIE = "(?<voies>[OHNT](\\/[OHNT])*)"
|
||||||
const XREGEXP_SORT_NAME = "(?<name>[^\\(]+)"
|
const XREGEXP_SORT_NAME = "(?<name>[^\\(]+)"
|
||||||
// const XREGEXP_SORT_CASE = "(?<coord>([A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+|[A-M]\\d{1,2})+)"
|
|
||||||
const XREGEXP_SORT_CASE = "(?<coord>([A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+|[A-M]\\d{1,2}))"
|
const XREGEXP_SORT_CASE = "(?<coord>([A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+|[A-M]\\d{1,2}))"
|
||||||
|
|
||||||
const XREGEXP_SORT = "(" + XREGEXP_SORT_VOIE
|
const XREGEXP_SORT = "(" + XREGEXP_SORT_VOIE
|
||||||
|
@ -2,8 +2,15 @@ import "./xregexp-all.js";
|
|||||||
import { RdDCarac } from "../rdd-carac.js";
|
import { RdDCarac } from "../rdd-carac.js";
|
||||||
import { SystemCompendiums } from "../settings/system-compendiums.js";
|
import { SystemCompendiums } from "../settings/system-compendiums.js";
|
||||||
import { RdDItemCompetence } from "../item-competence.js";
|
import { RdDItemCompetence } from "../item-competence.js";
|
||||||
import { ACTOR_TYPES } from "../item.js";
|
import { ACTOR_TYPES, ITEM_TYPES } from "../item.js";
|
||||||
import { RdDUtility } from "../rdd-utility.js";
|
import { RdDUtility } from "../rdd-utility.js";
|
||||||
|
import { Misc } from "../misc.js";
|
||||||
|
import { RdDAlchimie } from "../rdd-alchimie.js";
|
||||||
|
|
||||||
|
const REGEX_ALCHIMIE_TERMES = "(?<termes>(\\w|-)+)"
|
||||||
|
const REGEX_ALCHIMIE_MANIP = "(?<manip>(couleur|consistance))"
|
||||||
|
const XREGEXP_ROLL_ALCHIMIE = XRegExp("@roll\\[" + REGEX_ALCHIMIE_MANIP + "\\s+" + REGEX_ALCHIMIE_TERMES + "\\]", 'giu')
|
||||||
|
const XREGEXP_ROLL_ALCHIMIE_MANIP = XRegExp("@" + REGEX_ALCHIMIE_MANIP + "\\{" + REGEX_ALCHIMIE_TERMES + "\\}", 'giu')
|
||||||
|
|
||||||
const REGEXP_ROLL_CARAC_COMP = "(?<carac>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+)(\\/(?<competence>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+))?(/(?<diff>[\\+\\-]?\\d+))?"
|
const REGEXP_ROLL_CARAC_COMP = "(?<carac>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+)(\\/(?<competence>[A-Za-zÀ-ÖØ-öø-ÿ\\s\\-]+))?(/(?<diff>[\\+\\-]?\\d+))?"
|
||||||
const XREGEXP_ROLL_CARAC_COMP = XRegExp("@roll\\[" + REGEXP_ROLL_CARAC_COMP + "\\]", 'giu')
|
const XREGEXP_ROLL_CARAC_COMP = XRegExp("@roll\\[" + REGEXP_ROLL_CARAC_COMP + "\\]", 'giu')
|
||||||
@ -11,42 +18,109 @@ const XREGEXP_ROLL_CARAC_COMP = XRegExp("@roll\\[" + REGEXP_ROLL_CARAC_COMP + "\
|
|||||||
const REGEXP_ROLL_FORMULA = "(?<formula>[^\\[\\]]+)"
|
const REGEXP_ROLL_FORMULA = "(?<formula>[^\\[\\]]+)"
|
||||||
const XREGEXP_ROLL_FORMULA = XRegExp("@roll\\[" + REGEXP_ROLL_FORMULA + "\\]", 'giu')
|
const XREGEXP_ROLL_FORMULA = XRegExp("@roll\\[" + REGEXP_ROLL_FORMULA + "\\]", 'giu')
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* classe pour gérer les jets d'alchimie
|
||||||
|
*/
|
||||||
|
class TextRollAlchimie {
|
||||||
|
static async onRollText(event, actor) {
|
||||||
|
actor = TextRollAlchimie.getSelectedActor(actor)
|
||||||
|
if (actor) {
|
||||||
|
const recetteId = event.currentTarget.attributes['data-recette-id']?.value
|
||||||
|
const manip = event.currentTarget.attributes['data-manip'].value
|
||||||
|
const termes = event.currentTarget.attributes['data-termes'].value
|
||||||
|
if (recetteId) {
|
||||||
|
await actor.effectuerTacheAlchimie(recetteId, manip, termes)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const carac = RdDCarac.caracDetails(RdDAlchimie.getCaracTache(manip))
|
||||||
|
const diff = RdDAlchimie.getDifficulte(termes)
|
||||||
|
await actor.rollCaracCompetence(carac.code, 'Alchimie', diff)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSelectedActor(actor) {
|
||||||
|
actor = actor ?? RdDUtility.getSelectedActor()
|
||||||
|
if (actor && actor.type == ACTOR_TYPES.personnage) {
|
||||||
|
return actor
|
||||||
|
}
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
static async onReplaceRoll(context) {
|
||||||
|
const handler = new TextRollAlchimie(context)
|
||||||
|
context.text = await handler.replaceManipulationAlchimie()
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(context) {
|
||||||
|
this.context = context
|
||||||
|
}
|
||||||
|
|
||||||
|
async replaceManipulationAlchimie() {
|
||||||
|
await XRegExp.forEach(this.context.text, XREGEXP_ROLL_ALCHIMIE, async (rollMatch, i) => await this._replaceOneAlchimie(rollMatch, i))
|
||||||
|
await XRegExp.forEach(this.context.text, XREGEXP_ROLL_ALCHIMIE_MANIP, async (rollMatch, i) => await this._replaceOneAlchimie(rollMatch, i))
|
||||||
|
return this.context.text
|
||||||
|
}
|
||||||
|
|
||||||
|
async _replaceOneAlchimie(rollMatch, i) {
|
||||||
|
if (rollMatch.termes && rollMatch.manip) {
|
||||||
|
const manip = rollMatch.manip
|
||||||
|
await this._replaceManip(manip, rollMatch, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async _replaceManip(manip, rollMatch, i) {
|
||||||
|
const termes = rollMatch.termes
|
||||||
|
const carac = RdDCarac.caracDetails(RdDAlchimie.getCaracTache(manip))
|
||||||
|
const diff = RdDAlchimie.getDifficulte(termes)
|
||||||
|
const recette = (this.context.object instanceof Item && this.context.object.type == ITEM_TYPES.recettealchimique) ? this.context.object : undefined
|
||||||
|
const replacement = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/apps/link-text-roll-alchimie.hbs`, {
|
||||||
|
manip,
|
||||||
|
termes,
|
||||||
|
recette,
|
||||||
|
carac,
|
||||||
|
diff
|
||||||
|
})
|
||||||
|
this.context.text = this.context.text.replace(rollMatch[0], replacement);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* classe pour gérer les jets de caractéristique/compétence depuis
|
* classe pour gérer les jets de caractéristique/compétence depuis
|
||||||
* les journaux/descriptions
|
* les journaux/descriptions
|
||||||
*/
|
*/
|
||||||
class TextRollCaracCompetence {
|
class TextRollCaracCompetence {
|
||||||
|
|
||||||
static async onReplaceRoll(context) {
|
|
||||||
const competences = await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage);
|
|
||||||
const handler = new TextRollCaracCompetence(context.text, competences)
|
|
||||||
context.text = await handler.replaceRollCaracCompetence()
|
|
||||||
}
|
|
||||||
|
|
||||||
static async onRollText(event, actor) {
|
static async onRollText(event, actor) {
|
||||||
const caracCode = event.currentTarget.attributes['data-carac-code']?.value
|
const caracCode = event.currentTarget.attributes['data-carac-code']?.value
|
||||||
if (caracCode) {
|
if (caracCode) {
|
||||||
const competence = event.currentTarget.attributes['data-competence']?.value
|
const competence = event.currentTarget.attributes['data-competence']?.value
|
||||||
const diff = event.currentTarget.attributes['data-diff']?.value
|
const diff = event.currentTarget.attributes['data-diff']?.value
|
||||||
const actors = TextRollCaracCompetence.getSelectedActors(actor)
|
const actors = TextRollCaracCompetence.getSelectedActors(actor)
|
||||||
actors.forEach(it => TextRollCaracCompetence.doRoll(it, caracCode, competence, diff))
|
actors.forEach(async it => await TextRollCaracCompetence.doRoll(it, caracCode, competence, diff))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static async doRoll(actor, caracCode, competence, diff) {
|
static async doRoll(actor, caracCode, competence, diff) {
|
||||||
caracCode = actor.mapCarac(caracCode)
|
caracCode = actor.mapCarac(caracCode)
|
||||||
if (competence) {
|
if (competence) {
|
||||||
if (actor.type == ACTOR_TYPES.personnage) {
|
if (actor.type == ACTOR_TYPES.personnage) {
|
||||||
actor.rollCaracCompetence(caracCode, competence, diff)
|
await actor.rollCaracCompetence(caracCode, competence, diff)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
actor.doRollCaracCompetence(caracCode, competence, diff)
|
await actor.doRollCaracCompetence(caracCode, competence, diff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
actor.rollCarac(caracCode, { diff })
|
await actor.rollCarac(caracCode, { diff })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async onReplaceRoll(context) {
|
||||||
|
const handler = new TextRollCaracCompetence(context)
|
||||||
|
context.text = await handler.replaceRollCaracCompetence()
|
||||||
|
}
|
||||||
|
|
||||||
static getSelectedActors(actor) {
|
static getSelectedActors(actor) {
|
||||||
const selected = canvas.tokens.controlled.map(it => it.actor).filter(it => it)
|
const selected = canvas.tokens.controlled.map(it => it.actor).filter(it => it)
|
||||||
if (selected.length > 0) {
|
if (selected.length > 0) {
|
||||||
@ -59,30 +133,32 @@ class TextRollCaracCompetence {
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(text, competences) {
|
constructor(context) {
|
||||||
this.text = text
|
this.context = context
|
||||||
this.competences = competences
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async replaceRollCaracCompetence() {
|
async replaceRollCaracCompetence() {
|
||||||
await XRegExp.forEach(this.text, XREGEXP_ROLL_CARAC_COMP, async (rollMatch, i) => await this._replaceOne(rollMatch, i))
|
await XRegExp.forEach(this.context.text, XREGEXP_ROLL_CARAC_COMP, async (rollMatch, i) => await this._replaceOne(rollMatch, i))
|
||||||
return this.text
|
return this.context.text
|
||||||
}
|
}
|
||||||
|
|
||||||
async _replaceOne(rollMatch, i) {
|
async _replaceOne(rollMatch, i) {
|
||||||
const carac = RdDCarac.caracDetails(rollMatch.carac)
|
const carac = RdDCarac.caracDetails(rollMatch.carac)
|
||||||
if (carac) {
|
if (carac) {
|
||||||
const competence = rollMatch.competence ? RdDItemCompetence.findCompetence(this.competences, rollMatch.competence) : undefined
|
const competence = rollMatch.competence ? RdDItemCompetence.findCompetence(this.context.competences, rollMatch.competence) : undefined
|
||||||
const replacement = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/apps/link-text-roll-carac-competence.hbs`, {
|
const replacement = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/apps/link-text-roll-carac-competence.hbs`, {
|
||||||
carac: carac,
|
carac: carac,
|
||||||
competence: competence?.name,
|
competence: competence?.name,
|
||||||
diff: rollMatch.diff
|
diff: rollMatch.diff
|
||||||
})
|
})
|
||||||
this.text = this.text.replace(rollMatch[0], replacement)
|
this.context.text = this.context.text.replace(rollMatch[0], replacement)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* classe pour gérer les jets de dés (formules Foundry)
|
||||||
|
*/
|
||||||
class TextRollFoundry {
|
class TextRollFoundry {
|
||||||
|
|
||||||
static async onReplaceRoll(context) {
|
static async onReplaceRoll(context) {
|
||||||
@ -118,11 +194,12 @@ class TextRollFoundry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export class RdDTextEditor {
|
export class RdDTextEditor {
|
||||||
|
|
||||||
static async enrichHTML(text, object) {
|
static async enrichHTML(text, object) {
|
||||||
const context = { text }
|
const competences = await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage);
|
||||||
|
const context = { text, competences, object }
|
||||||
|
await TextRollAlchimie.onReplaceRoll(context)
|
||||||
await TextRollCaracCompetence.onReplaceRoll(context)
|
await TextRollCaracCompetence.onReplaceRoll(context)
|
||||||
await TextRollFoundry.onReplaceRoll(context)
|
await TextRollFoundry.onReplaceRoll(context)
|
||||||
return await TextEditor.enrichHTML(context.text, {
|
return await TextEditor.enrichHTML(context.text, {
|
||||||
@ -133,8 +210,15 @@ export class RdDTextEditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static async rollText(event, actor) {
|
static async rollText(event, actor) {
|
||||||
await TextRollCaracCompetence.onRollText(event, actor)
|
const rollMode = event.currentTarget.attributes['data-roll-mode']?.value;
|
||||||
await TextRollFoundry.onRollText(event, actor)
|
switch (rollMode) {
|
||||||
|
case 'foundry':
|
||||||
|
return await TextRollFoundry.onRollText(event, actor)
|
||||||
|
case 'carac':
|
||||||
|
return await TextRollCaracCompetence.onRollText(event, actor)
|
||||||
|
case 'alchimie':
|
||||||
|
return await TextRollAlchimie.onRollText(event, actor)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
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 { RdDAlchimie } from "./rdd-alchimie.js";
|
|
||||||
import { RdDItemCompetence } from "./item-competence.js";
|
import { RdDItemCompetence } from "./item-competence.js";
|
||||||
import { RdDHerbes } from "./rdd-herbes.js";
|
import { RdDHerbes } from "./rdd-herbes.js";
|
||||||
import { RdDGemme } from "./rdd-gemme.js";
|
import { RdDGemme } from "./rdd-gemme.js";
|
||||||
@ -128,8 +127,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
formData.texte = await RdDTextEditor.enrichHTML(this.item.system.texte, this.item)
|
formData.texte = await RdDTextEditor.enrichHTML(this.item.system.texte, this.item)
|
||||||
}
|
}
|
||||||
if (this.item.type == ITEM_TYPES.recettealchimique) {
|
if (this.item.type == ITEM_TYPES.recettealchimique) {
|
||||||
const manipulation = RdDAlchimie.processManipulation(this.item, this.actor?.id);
|
formData.manipulation = await RdDTextEditor.enrichHTML(this.item.system.manipulation, this.item)
|
||||||
formData.manipulation = await RdDTextEditor.enrichHTML(manipulation, this.item)
|
|
||||||
formData.utilisation = await RdDTextEditor.enrichHTML(this.item.system.utilisation, this.item)
|
formData.utilisation = await RdDTextEditor.enrichHTML(this.item.system.utilisation, this.item)
|
||||||
formData.enchantement = await RdDTextEditor.enrichHTML(this.item.system.enchantement, this.item)
|
formData.enchantement = await RdDTextEditor.enrichHTML(this.item.system.enchantement, this.item)
|
||||||
formData.sureffet = await RdDTextEditor.enrichHTML(this.item.system.sureffet, this.item)
|
formData.sureffet = await RdDTextEditor.enrichHTML(this.item.system.sureffet, this.item)
|
||||||
@ -209,17 +207,6 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
this.html.find('input[name="system.cacher_points_de_tache"]').change(async event => await this.item.update({ 'system.cacher_points_de_tache': event.currentTarget.checked }));
|
this.html.find('input[name="system.cacher_points_de_tache"]').change(async event => await this.item.update({ 'system.cacher_points_de_tache': event.currentTarget.checked }));
|
||||||
|
|
||||||
this.html.find('.roll-text').click(async event => await RdDTextEditor.rollText(event, this.actor))
|
this.html.find('.roll-text').click(async event => await RdDTextEditor.rollText(event, this.actor))
|
||||||
this.html.find('.alchimie-tache a').click((event) => {
|
|
||||||
let actor = this._getEventActor(event);
|
|
||||||
if (actor) {
|
|
||||||
let recetteId = event.currentTarget.attributes['data-recette-id'].value;
|
|
||||||
let tacheName = event.currentTarget.attributes['data-alchimie-tache'].value;
|
|
||||||
let tacheData = event.currentTarget.attributes['data-alchimie-data'].value;
|
|
||||||
actor.effectuerTacheAlchimie(recetteId, tacheName, tacheData);
|
|
||||||
} else {
|
|
||||||
ui.notifications.info("Impossible trouver un acteur pour réaliser cette tache Alchimique.");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this.actor) {
|
if (this.actor) {
|
||||||
this.html.find('.item-split').click(async event => RdDSheetUtility.splitItem(RdDSheetUtility.getItem(event, this.actor), this.actor, this.getActionRenderItem()));
|
this.html.find('.item-split').click(async event => RdDSheetUtility.splitItem(RdDSheetUtility.getItem(event, this.actor), this.actor, this.getActionRenderItem()));
|
||||||
|
@ -1,48 +1,8 @@
|
|||||||
/* -------------------------------------------- */
|
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
|
|
||||||
const matchOperations = new RegExp(/@(\w*){([\w\-]+)}/ig);
|
|
||||||
const matchOperationTerms = new RegExp(/@(\w*){([\w\-]+)}/i);
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
export class RdDAlchimie {
|
export class RdDAlchimie {
|
||||||
|
static getDifficulte(termes) {
|
||||||
/* -------------------------------------------- */
|
let elements = termes.split('-');
|
||||||
static processManipulation(recette, actorId = undefined) {
|
|
||||||
let manip = recette.system.manipulation;
|
|
||||||
let matchArray = manip.match(matchOperations);
|
|
||||||
if (matchArray) {
|
|
||||||
for (let matchStr of matchArray) {
|
|
||||||
let result = matchStr.match(matchOperationTerms);
|
|
||||||
if (result[1] && result[2]) {
|
|
||||||
let commande = Misc.upperFirst(result[1]);
|
|
||||||
let replacement = this[`_alchimie${commande}`](recette, result[2], actorId);
|
|
||||||
manip = manip.replace(result[0], replacement);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return manip;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
static _alchimieCouleur(recette, couleurs, actorId) {
|
|
||||||
return RdDAlchimie._alchimieLink(recette, couleurs, actorId, 'couleur', 'Température');
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
static _alchimieConsistance(recette, consistances, actorId) {
|
|
||||||
return RdDAlchimie._alchimieLink(recette, consistances, actorId, 'consistance', 'Consistance');
|
|
||||||
}
|
|
||||||
|
|
||||||
static _alchimieLink(recette, termes, actorId, tacheAlchimie, labelTache) {
|
|
||||||
const difficulte = RdDAlchimie.getDifficulte(termes);
|
|
||||||
const link = actorId ? ` <a data-recette-id="${recette._id}" data-actor-id="${actorId}" data-alchimie-tache="${tacheAlchimie}" data-alchimie-data="${termes}">` : '';
|
|
||||||
const endLink = actorId ? '</a>' : '';
|
|
||||||
return `<span class="alchimie-tache">${link}${labelTache} ${termes} (${difficulte})${endLink}</span>`;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
static getDifficulte(aspects) {
|
|
||||||
let elements = aspects.split('-');
|
|
||||||
let composantes = elements.length;
|
let composantes = elements.length;
|
||||||
let distincts = Object.keys(Misc.classifyFirst(elements, it => it)).length;
|
let distincts = Object.keys(Misc.classifyFirst(elements, it => it)).length;
|
||||||
if (distincts == 1) {
|
if (distincts == 1) {
|
||||||
@ -58,5 +18,4 @@ export class RdDAlchimie {
|
|||||||
}
|
}
|
||||||
return 'intellect';
|
return 'intellect';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1067,12 +1067,13 @@ li label.compteur {
|
|||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alchimie-tache {
|
a.roll-text.content-link {
|
||||||
|
color: hsla(300, 70%, 40%, 0.5);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: rgb(182, 180, 179);
|
border: 1px solid var(--color-border-dark-tertiary);
|
||||||
border: 1px solid rgba(72, 46, 28, 1);
|
|
||||||
border-radius: 0.25rem;
|
border-radius: 0.25rem;
|
||||||
color: rgba(212, 27, 27, 0.5);
|
white-space: nowrap;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-app.sheet .window-content .tooltip:hover .tooltiptext {
|
.window-app.sheet .window-content .tooltip:hover .tooltiptext {
|
||||||
|
8
templates/apps/link-text-roll-alchimie.hbs
Normal file
8
templates/apps/link-text-roll-alchimie.hbs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<span><a class="roll-text content-link"
|
||||||
|
data-roll-mode="alchimie"
|
||||||
|
{{#if recette}}data-recette-id="{{recette.id}}"{{/if}}
|
||||||
|
data-manip="{{manip}}"
|
||||||
|
data-termes="{{termes}}"
|
||||||
|
data-tooltip="{{upperFirst carac.label}}/Alchimie à {{diff}}">
|
||||||
|
{{~manip}} {{termes~}}
|
||||||
|
</a></span>
|
@ -1,4 +1,5 @@
|
|||||||
<span><a class="roll-text content-link"
|
<span><a class="roll-text content-link"
|
||||||
|
data-roll-mode="carac"
|
||||||
{{#if competence}}data-competence="{{competence}}"{{/if~}}
|
{{#if competence}}data-competence="{{competence}}"{{/if~}}
|
||||||
{{#if diff}}data-diff="{{diff}}"{{/if~}}
|
{{#if diff}}data-diff="{{diff}}"{{/if~}}
|
||||||
data-carac-code="{{carac.code}}">
|
data-carac-code="{{carac.code}}">
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
<span><a class="roll-text content-link" data-roll-foundry="{{formula}}">
|
<span><a class="roll-text content-link"
|
||||||
|
data-roll-mode="foundry"
|
||||||
|
data-roll-foundry="{{formula}}">
|
||||||
{{~formula~}}
|
{{~formula~}}
|
||||||
</a></span>
|
</a></span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user