Compare commits
No commits in common. "5a32cf26dca8522e56521d1b97fb2f73a0c4bb64" and "59613c3bf83afd29cc484056e1221c4bba7b8821" have entirely different histories.
5a32cf26dc
...
59613c3bf8
@ -39,6 +39,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
const objectData = this.object.system
|
const objectData = this.object.system
|
||||||
this.timerRecherche = undefined;
|
this.timerRecherche = undefined;
|
||||||
|
|
||||||
|
console.log("New actor", objectData)
|
||||||
let formData = {
|
let formData = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
id: this.object.id,
|
id: this.object.id,
|
||||||
@ -75,12 +76,15 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
surEncombrementMessage: this.actor.getMessageSurEncombrement()
|
surEncombrementMessage: this.actor.getMessageSurEncombrement()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* TODO - TO FIX for v10
|
||||||
formData.competences.forEach(item => {
|
formData.competences.forEach(item => {
|
||||||
item.system.isVisible = this.options.recherche
|
console.log("ITEM1", item)
|
||||||
|
item.visible = this.options.recherche
|
||||||
? RdDItemCompetence.nomContientTexte(item, this.options.recherche.text)
|
? RdDItemCompetence.nomContientTexte(item, this.options.recherche.text)
|
||||||
: (!this.options.showCompNiveauBase || !RdDItemCompetence.isNiveauBase(item));
|
: (!this.options.showCompNiveauBase || !RdDItemCompetence.isNiveauBase(item));
|
||||||
RdDItemCompetence.levelUp(item, formData.data.compteurs.experience.value);
|
RdDItemCompetence.levelUp(item, formData.data.compteurs.experience.value);
|
||||||
});
|
});*/
|
||||||
|
|
||||||
Object.values(formData.data.carac).forEach(c => {
|
Object.values(formData.data.carac).forEach(c => {
|
||||||
RdDCarac.levelUp(c);
|
RdDCarac.levelUp(c);
|
||||||
});
|
});
|
||||||
@ -90,7 +94,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
formData.combat = duplicate(formData.armes ?? []);
|
formData.combat = duplicate(formData.armes ?? []);
|
||||||
RdDItemArme.computeNiveauArmes(formData.combat, formData.competences);
|
RdDItemArme.computeNiveauArmes(formData.combat, formData.competences);
|
||||||
RdDItemArme.ajoutCorpsACorps(formData.combat, formData.competences, formData.data.carac);
|
RdDItemArme.ajoutCorpsACorps(formData.combat, formData.competences, formData.data.carac);
|
||||||
formData.esquives = this.actor.getCompetences("Esquive");
|
formData.esquives = this.actor.getCompetences("Esquive").map(i => foundry.utils.deepClone(i.system));
|
||||||
formData.combat = RdDCombatManager.listActionsArmes(formData.combat, formData.competences, formData.data.carac);
|
formData.combat = RdDCombatManager.listActionsArmes(formData.combat, formData.competences, formData.data.carac);
|
||||||
|
|
||||||
this.armesList = formData.combat;
|
this.armesList = formData.combat;
|
||||||
@ -128,9 +132,9 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onDropActor(event, dragData) {
|
async _onDropActor(event, dragData) {
|
||||||
const dropActor = fromUuidSync(dragData.uuid);
|
console.log("_onDropActor", this.actor.id, dragData)
|
||||||
this.actor.addSubActeur(dropActor);
|
this.actor.addSubActeur(dragData.id || dragData.data._id)
|
||||||
super._onDropActor(event, dragData);
|
super._onDropActor(event, dragData)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -381,11 +385,13 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
if (this.options.editCaracComp) {
|
if (this.options.editCaracComp) {
|
||||||
// On carac change
|
// On carac change
|
||||||
html.find('.carac-value').change(async event => {
|
html.find('.carac-value').change(async event => {
|
||||||
let caracName = event.currentTarget.name.replace(".value", "").replace("data.carac.", "");
|
let caracName = event.currentTarget.name.replace(".value", "").replace("system.carac.", "");
|
||||||
|
//console.log("Value changed :", event, caracName);
|
||||||
this.actor.updateCarac(caracName, parseInt(event.target.value));
|
this.actor.updateCarac(caracName, parseInt(event.target.value));
|
||||||
});
|
});
|
||||||
html.find('input.carac-xp').change(async event => {
|
html.find('.carac-xp').change(async event => {
|
||||||
let caracName = event.currentTarget.name.replace(".xp", "").replace("data.carac.", "");
|
let caracName = event.currentTarget.name.replace(".xp", "").replace("system.carac.", "");
|
||||||
|
//console.log("Value changed :", event, caracName);
|
||||||
this.actor.updateCaracXP(caracName, parseInt(event.target.value));
|
this.actor.updateCaracXP(caracName, parseInt(event.target.value));
|
||||||
});
|
});
|
||||||
// On competence change
|
// On competence change
|
||||||
@ -395,12 +401,12 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
this.actor.updateCompetence(compName, parseInt(event.target.value));
|
this.actor.updateCompetence(compName, parseInt(event.target.value));
|
||||||
});
|
});
|
||||||
// On competence xp change
|
// On competence xp change
|
||||||
html.find('input.competence-xp').change(async event => {
|
html.find('.competence-xp').change(async event => {
|
||||||
let compName = event.currentTarget.attributes.compname.value;
|
let compName = event.currentTarget.attributes.compname.value;
|
||||||
this.actor.updateCompetenceXP(compName, parseInt(event.target.value));
|
this.actor.updateCompetenceXP(compName, parseInt(event.target.value));
|
||||||
});
|
});
|
||||||
// On competence xp change
|
// On competence xp change
|
||||||
html.find('input.competence-xp-sort').change(async event => {
|
html.find('.competence-xp-sort').change(async event => {
|
||||||
let compName = event.currentTarget.attributes.compname.value;
|
let compName = event.currentTarget.attributes.compname.value;
|
||||||
this.actor.updateCompetenceXPSort(compName, parseInt(event.target.value));
|
this.actor.updateCompetenceXPSort(compName, parseInt(event.target.value));
|
||||||
});
|
});
|
||||||
@ -577,9 +583,9 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _onSplitItem(item, split) {
|
async _onSplitItem(item, split) {
|
||||||
if (split >= 1 && split < item.system.quantite) {
|
if (split >= 1 && split < Misc.data(item).data.quantite) {
|
||||||
await item.diminuerQuantite(split);
|
await item.diminuerQuantite(split);
|
||||||
const itemData = duplicate(item.system);
|
const itemData = duplicate(Misc.data(item));
|
||||||
itemData.data.quantite = split;
|
itemData.data.quantite = split;
|
||||||
await this.actor.createEmbeddedDocuments('Item', [itemData])
|
await this.actor.createEmbeddedDocuments('Item', [itemData])
|
||||||
}
|
}
|
||||||
|
@ -609,6 +609,7 @@ export class RdDActor extends Actor {
|
|||||||
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
||||||
content: "Remise à neuf de " + this.name
|
content: "Remise à neuf de " + this.name
|
||||||
};
|
};
|
||||||
|
const actorData = Misc.data(this);
|
||||||
if (this.isEntite([ENTITE_NONINCARNE])) {
|
if (this.isEntite([ENTITE_NONINCARNE])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1040,6 +1041,7 @@ export class RdDActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async updateExperienceLog(modeXP, valeurXP, raisonXP = 'Inconnue') {
|
async updateExperienceLog(modeXP, valeurXP, raisonXP = 'Inconnue') {
|
||||||
let d = new Date();
|
let d = new Date();
|
||||||
|
console.log(modeXP, valeurXP, raisonXP);
|
||||||
let expLog = duplicate(this.system.experiencelog);
|
let expLog = duplicate(this.system.experiencelog);
|
||||||
expLog.push({
|
expLog.push({
|
||||||
mode: Misc.upperFirst(modeXP), valeur: valeurXP, raison: Misc.upperFirst(raisonXP),
|
mode: Misc.upperFirst(modeXP), valeur: valeurXP, raison: Misc.upperFirst(raisonXP),
|
||||||
@ -2168,7 +2170,7 @@ export class RdDActor extends Actor {
|
|||||||
createCallbackExperience() {
|
createCallbackExperience() {
|
||||||
return {
|
return {
|
||||||
condition: r => r.rolled.isPart && r.finalLevel < 0 && game.settings.get("core", "rollMode") != 'selfroll',
|
condition: r => r.rolled.isPart && r.finalLevel < 0 && game.settings.get("core", "rollMode") != 'selfroll',
|
||||||
action: r => this.appliquerAjoutExperience(r)
|
action: r => this.appliquerAjoutExperience(r, (game.settings.get("core", "rollMode") != 'blindroll' && !game.user.isGM))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2240,11 +2242,10 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async appliquerAjoutExperience(rollData, hideChatMessage = 'show') {
|
async appliquerAjoutExperience(rollData, display) {
|
||||||
if (!this.isPersonnage()) return;
|
if (!this.isPersonnage()) return;
|
||||||
hideChatMessage = hideChatMessage == 'hide' || (game.settings.get("core", "rollMode") != 'blindroll' && !game.user.isGM)
|
|
||||||
let xpData = await this._appliquerExperience(rollData.rolled, rollData.selectedCarac.label, rollData.competence);
|
let xpData = await this._appliquerExperience(rollData.rolled, rollData.selectedCarac.label, rollData.competence);
|
||||||
if (xpData && !hideChatMessage) {
|
if (xpData && display) {
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name),
|
||||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-gain-xp.html`, xpData)
|
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-gain-xp.html`, xpData)
|
||||||
@ -3035,7 +3036,7 @@ export class RdDActor extends Actor {
|
|||||||
let update = { _id: xpData.competence._id, 'system.xp': newXp };
|
let update = { _id: xpData.competence._id, 'system.xp': newXp };
|
||||||
await this.updateEmbeddedDocuments('Item', [update]);
|
await this.updateEmbeddedDocuments('Item', [update]);
|
||||||
xpData.checkComp = await this.checkCompetenceXP(xpData.competence.name, undefined, false);
|
xpData.checkComp = await this.checkCompetenceXP(xpData.competence.name, undefined, false);
|
||||||
this.updateExperienceLog("XP", xpData.xpCompetence, "XP gagné en " + xpData.competence.name);
|
this.updateExperienceLog("XP", xpData.xp, "XP gagné en " + xpData.competence.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3067,7 +3068,7 @@ export class RdDActor extends Actor {
|
|||||||
// Gestion expérience (si existante)
|
// Gestion expérience (si existante)
|
||||||
data.competence = this.getCompetence("astrologie")
|
data.competence = this.getCompetence("astrologie")
|
||||||
data.selectedCarac = this.system.carac["vue"];
|
data.selectedCarac = this.system.carac["vue"];
|
||||||
this.appliquerAjoutExperience(data, 'hide');
|
this.appliquerAjoutExperience(data, false);
|
||||||
|
|
||||||
// Ajout du nombre astral
|
// Ajout du nombre astral
|
||||||
const item = {
|
const item = {
|
||||||
@ -3890,21 +3891,19 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
addSubActeur(subActor) {
|
addSubActeur(subActorId) {
|
||||||
if(subActor?.id == this.id){
|
let subActor = game.actors.get(subActorId);
|
||||||
ui.notifications.warn("Vous ne pouvez pas attacher un acteur à lui même")
|
//console.log("Ajout acteur : ", actor, this);
|
||||||
}
|
if (subActor && !subActor.owner) {
|
||||||
else if (!subActor?.isOwner) {
|
if (subActortype == 'vehicule') {
|
||||||
ui.notifications.warn("Vous n'avez pas les droits sur l'acteur que vous attachez.")
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (subActor.type == 'vehicule') {
|
|
||||||
this.pushSubacteur(subActor, this.system.subacteurs.vehicules, 'system.subacteurs.vehicules', 'Ce Véhicule');
|
this.pushSubacteur(subActor, this.system.subacteurs.vehicules, 'system.subacteurs.vehicules', 'Ce Véhicule');
|
||||||
} else if (subActor.type == 'creature') {
|
} else if (subActor.type == 'creature') {
|
||||||
this.pushSubacteur(subActor, this.system.subacteurs.montures, 'system.subacteurs.montures', 'Cette Monture');
|
this.pushSubacteur(subActor, this.system.subacteurs.montures, 'system.subacteurs.montures', 'Cette Monture');
|
||||||
} else if (subActor.type == 'personnage') {
|
} else if (subActor.type == 'personnage') {
|
||||||
this.pushSubacteur(subActor, this.system.subacteurs.suivants, 'system.subacteurs.suivants', 'Ce Suivant');
|
this.pushSubacteur(subActor, this.system.subacteurs.suivants, 'system.subacteurs.suivants', 'Ce Suivant');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ui.notifications.warn("Vous n'avez pas les droits sur l'acteur que vous attachez.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ export class ChatUtility {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static getUsers(filter) {
|
static getUsers(filter) {
|
||||||
return Misc.getUsers().filter(filter).map(user => user.id);
|
return Misc.getUsers().filter(filter).map(user => user.data._id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -9,7 +9,7 @@ export class DialogFabriquerPotion extends Dialog {
|
|||||||
let potionData = DialogFabriquerPotion.prepareData(actor, item);
|
let potionData = DialogFabriquerPotion.prepareData(actor, item);
|
||||||
|
|
||||||
let conf = {
|
let conf = {
|
||||||
title: `Fabriquer une potion de ${potionData.system.categorie}`,
|
title: `Fabriquer une potion de ${potionData.data.categorie}`,
|
||||||
content: await renderTemplate(dialogConfig.html, potionData),
|
content: await renderTemplate(dialogConfig.html, potionData),
|
||||||
default: potionData.buttonName,
|
default: potionData.buttonName,
|
||||||
};
|
};
|
||||||
@ -25,8 +25,8 @@ export class DialogFabriquerPotion extends Dialog {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static prepareData(actor, item) {
|
static prepareData(actor, item) {
|
||||||
let potionData = duplicate(item)
|
let potionData = duplicate(item)
|
||||||
potionData.nbBrinsSelect = RdDUtility.buildListOptions(1, potionData.system.quantite);
|
potionData.nbBrinsSelect = RdDUtility.buildListOptions(1, potionData.data.quantite);
|
||||||
potionData.nbBrins = Math.min(potionData.system.quantite, DialogFabriquerPotion.getNombreBrinOptimal(potionData));
|
potionData.nbBrins = Math.min(potionData.data.quantite, DialogFabriquerPotion.getNombreBrinOptimal(potionData));
|
||||||
potionData.buttonName = "Fabriquer";
|
potionData.buttonName = "Fabriquer";
|
||||||
return potionData;
|
return potionData;
|
||||||
}
|
}
|
||||||
@ -46,9 +46,9 @@ export class DialogFabriquerPotion extends Dialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static getNombreBrinOptimal(herbeData) {
|
static getNombreBrinOptimal(herbeData) {
|
||||||
switch (herbeData.system.categorie ?? '') {
|
switch (herbeData.data.categorie ?? '') {
|
||||||
case "Soin": return 12 - herbeData.system.niveau;
|
case "Soin": return 12 - herbeData.data.niveau;
|
||||||
case "Repos": return 7 - herbeData.system.niveau;
|
case "Repos": return 7 - herbeData.data.niveau;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ export class DialogSplitItem extends Dialog {
|
|||||||
const itemData = item
|
const itemData = item
|
||||||
const splitData = {
|
const splitData = {
|
||||||
item: itemData,
|
item: itemData,
|
||||||
choix: { quantite: 1, max: itemData.system.quantite - 1 }
|
choix: { quantite: 1, max: itemData.data.quantite - 1 }
|
||||||
};
|
};
|
||||||
const html = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/dialog-item-split.html`, splitData);
|
const html = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/dialog-item-split.html`, splitData);
|
||||||
return new DialogSplitItem(item, splitData, html, callback)
|
return new DialogSplitItem(item, splitData, html, callback)
|
||||||
|
@ -183,14 +183,14 @@ export class RdDItemCompetence extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static levelUp(item, stressTransforme) {
|
static levelUp(itemData, stressTransforme) {
|
||||||
item.system.xpNext = RdDItemCompetence.getCompetenceNextXp(item.system.niveau);
|
itemData.system.xpNext = RdDItemCompetence.getCompetenceNextXp(itemData.system.niveau);
|
||||||
const xpManquant = item.system.xpNext - item.system.xp;
|
const xpManquant = itemData.system.xpNext - itemData.system.xp;
|
||||||
item.system.isLevelUp = xpManquant <= 0;
|
itemData.system.isLevelUp = xpManquant <= 0;
|
||||||
item.system.isStressLevelUp = (xpManquant > 0 && stressTransforme >= xpManquant && item.system.niveau < item.system.niveau_archetype);
|
itemData.system.isStressLevelUp = (xpManquant > 0 && stressTransforme >= xpManquant && itemData.system.niveau < itemData.system.niveau_archetype);
|
||||||
item.system.stressXpMax = 0;
|
itemData.system.stressXpMax = 0;
|
||||||
if (xpManquant > 0 && stressTransforme > 0 && item.system.niveau < item.system.niveau_archetype) {
|
if (xpManquant > 0 && stressTransforme > 0 && itemData.system.niveau < itemData.system.niveau_archetype) {
|
||||||
item.system.stressXpMax = Math.min(xpManquant , stressTransforme);
|
itemData.system.stressXpMax = Math.min(xpManquant , stressTransforme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,22 +4,22 @@ const monnaiesData = [
|
|||||||
{
|
{
|
||||||
name: "Etain (1 denier)", type: 'monnaie',
|
name: "Etain (1 denier)", type: 'monnaie',
|
||||||
img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp",
|
img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp",
|
||||||
system: { quantite: 0, valeur_deniers: 1, encombrement: 0.001, description: "" }
|
data: { quantite: 0, valeur_deniers: 1, encombrement: 0.001, description: "" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Bronze (10 deniers)", type: 'monnaie',
|
name: "Bronze (10 deniers)", type: 'monnaie',
|
||||||
img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_bronze_epees.webp",
|
img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_bronze_epees.webp",
|
||||||
system: { quantite: 0, valeur_deniers: 10, encombrement: 0.002, description: "" }
|
data: { quantite: 0, valeur_deniers: 10, encombrement: 0.002, description: "" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Argent (1 sol)", type: 'monnaie',
|
name: "Argent (1 sol)", type: 'monnaie',
|
||||||
img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_argent_sol.webp",
|
img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_argent_sol.webp",
|
||||||
system: { quantite: 0, valeur_deniers: 100, encombrement: 0.003, description: "" }
|
data: { quantite: 0, valeur_deniers: 100, encombrement: 0.003, description: "" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Or (10 sols)", type: 'monnaie',
|
name: "Or (10 sols)", type: 'monnaie',
|
||||||
img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_or_sol.webp",
|
img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_or_sol.webp",
|
||||||
system: { quantite: 0, valeur_deniers: 1000, encombrement: 0.004, description: "" }
|
data: { quantite: 0, valeur_deniers: 1000, encombrement: 0.004, description: "" }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
}
|
}
|
||||||
RdDHerbes.updatePotionData(formData);
|
RdDHerbes.updatePotionData(formData);
|
||||||
}
|
}
|
||||||
if (formData.isOwned && formData.type == 'herbe' && (formData.system.categorie == 'Soin' || formData.system.categorie == 'Repos')) {
|
if (formData.isOwned && formData.type == 'herbe' && (formData.data.categorie == 'Soin' || formData.data.categorie == 'Repos')) {
|
||||||
formData.isIngredientPotionBase = true;
|
formData.isIngredientPotionBase = true;
|
||||||
}
|
}
|
||||||
formData.bonusCaseList = RdDItemSort.getBonusCaseList(formData, true);
|
formData.bonusCaseList = RdDItemSort.getBonusCaseList(formData, true);
|
||||||
|
@ -117,7 +117,7 @@ export class RdDItem extends Item {
|
|||||||
if (this.isPotion()) {
|
if (this.isPotion()) {
|
||||||
this.prepareDataPotion()
|
this.prepareDataPotion()
|
||||||
}
|
}
|
||||||
this.system.actionPrincipale = this.getActionPrincipale({ warnIfNot: false });
|
this.actionPrincipale = this.getActionPrincipale({ warnIfNot: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,28 +192,22 @@ export class RdDItem extends Item {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// détermine si deux équipements sont similaires: de même type, et avec les même champs hormis la quantité
|
// détermine si deux équipements sont similaires: de même type, et avec les même champs hormis la quantité
|
||||||
isEquipementSimilaire(other) {
|
isEquipementSimilaire(other) {
|
||||||
|
const itemData = this
|
||||||
|
const otherData = other
|
||||||
|
const tplData = this
|
||||||
|
const otherTplData = other
|
||||||
if (!this.isEquipement()) return false;
|
if (!this.isEquipement()) return false;
|
||||||
let message = undefined;
|
if (itemData.type != otherData.type) return false;
|
||||||
if (this.type != other.type) {
|
if (itemData.name != otherData.name) return false;
|
||||||
message = `Impossible de regrouper ${this.type} avec ${other.type}`;
|
if (tplData.quantite == undefined) return false;
|
||||||
}
|
|
||||||
else if (this.name != other.name) {
|
const differences = Object.entries(tplData).filter(([key, value]) => !['quantite', 'encTotal', 'prixTotal', 'cout'].includes(key))
|
||||||
message = `Impossible de regrouper ${this.name} avec ${other.name}`;
|
.filter(([key, value]) => value != otherTplData[key]);
|
||||||
}
|
if (differences.length > 0) {
|
||||||
else if (this.system.quantite == undefined) {
|
let message = `Impossible de regrouper les ${itemData.type} ${itemData.name}: `;
|
||||||
message = `Impossible de regrouper des ${this.type}, ils ne sont pas empilables`;
|
for (const [key, value] of differences) {
|
||||||
}
|
message += `<br>${key}: ${value} vs ${otherTplData[key]}`;
|
||||||
else {
|
|
||||||
const differences = Object.entries(this.system)
|
|
||||||
.filter(([key, value]) => !['quantite', 'encTotal', 'prixTotal', 'cout'].includes(key) && value != other.system[key]);
|
|
||||||
if (differences.length > 0) {
|
|
||||||
message = `Impossible de regrouper les ${this.type} ${this.name}: `;
|
|
||||||
for (const [key, value] of differences) {
|
|
||||||
message += `<br>${key}: ${value} vs ${other.system[key]}`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (message){
|
|
||||||
ui.notifications.info(message)
|
ui.notifications.info(message)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
if (competence) {
|
if (competence) {
|
||||||
const carac = combatant.actor.system.carac[competence.system.defaut_carac].value;
|
const carac = combatant.actor.system.carac[competence.system.defaut_carac].value;
|
||||||
const niveau = competence.system.niveau;
|
const niveau = competence.system.niveau;
|
||||||
const bonusEcaille = (armeCombat?.system.magique) ? armeCombat.system.ecaille_efficacite : 0;
|
const bonusEcaille = (armeCombat?.data.magique) ? armeCombat.system.ecaille_efficacite : 0;
|
||||||
rollFormula = RdDCombatManager.formuleInitiative(2, carac, niveau, bonusEcaille);
|
rollFormula = RdDCombatManager.formuleInitiative(2, carac, niveau, bonusEcaille);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
action: 'conjurer',
|
action: 'conjurer',
|
||||||
data: {
|
data: {
|
||||||
competence: p.name,
|
competence: p.name,
|
||||||
possessionid: p.system.possessionid,
|
possessionid: p.data.data.possessionid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@ -228,9 +228,9 @@ export class RdDCombatManager extends Combat {
|
|||||||
.concat(RdDItemArme.mainsNues());
|
.concat(RdDItemArme.mainsNues());
|
||||||
|
|
||||||
let competences = items.filter(it => it.type == 'competence');
|
let competences = items.filter(it => it.type == 'competence');
|
||||||
actions = actions.concat(RdDCombatManager.listActionsArmes(armes, competences, actor.system.carac));
|
actions = actions.concat(RdDCombatManager.listActionsArmes(armes, competences, actor.data.data.carac));
|
||||||
|
|
||||||
if (actor.system.attributs.hautrevant.value) {
|
if (actor.data.data.attributs.hautrevant.value) {
|
||||||
actions.push({ name: "Draconic", action: 'haut-reve', data: { initOnly: true, competence: "Draconic" } });
|
actions.push({ name: "Draconic", action: 'haut-reve', data: { initOnly: true, competence: "Draconic" } });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -256,7 +256,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
//console.log("Parsed !!!", combatant, initDone, game.combat.current, arme);
|
//console.log("Parsed !!!", combatant, initDone, game.combat.current, arme);
|
||||||
if (action && action.type == "arme") {
|
if (action && action.type == "arme") {
|
||||||
for (let initData of premierRoundInit) {
|
for (let initData of premierRoundInit) {
|
||||||
if (Grammar.toLowerCaseNoAccentNoSpace(action.system.initpremierround).includes(initData.pattern)) {
|
if (Grammar.toLowerCaseNoAccentNoSpace(action.data.initpremierround).includes(initData.pattern)) {
|
||||||
let msg = `<h4>L'initiative de ${combatant.actor.name} a été modifiée !</h4>
|
let msg = `<h4>L'initiative de ${combatant.actor.name} a été modifiée !</h4>
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div>
|
||||||
@ -329,10 +329,10 @@ export class RdDCombatManager extends Combat {
|
|||||||
} else {
|
} else {
|
||||||
compData = RdDItemCompetence.findCompetence(combatant.actor.items, arme.system.competence);
|
compData = RdDItemCompetence.findCompetence(combatant.actor.items, arme.system.competence);
|
||||||
compNiveau = compData.system.niveau;
|
compNiveau = compData.system.niveau;
|
||||||
initInfo = action.name + " / " + action.system.competence;
|
initInfo = action.name + " / " + action.data.competence;
|
||||||
|
|
||||||
if (combatant.actor.type == 'creature' || combatant.actor.type == 'entite') {
|
if (combatant.actor.type == 'creature' || combatant.actor.type == 'entite') {
|
||||||
caracForInit = compData.system.carac_value;
|
caracForInit = compData.data.carac_value;
|
||||||
if (compData.system.categorie == "lancer") {
|
if (compData.system.categorie == "lancer") {
|
||||||
initOffset = 7;
|
initOffset = 7;
|
||||||
}
|
}
|
||||||
@ -361,7 +361,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
// Offset de principe pour les armes de jet
|
// Offset de principe pour les armes de jet
|
||||||
switch (arme.system.cac) {
|
switch (arme.data.cac) {
|
||||||
case "empoignade": return 3;
|
case "empoignade": return 3;
|
||||||
case "pugilat": return 4;
|
case "pugilat": return 4;
|
||||||
}
|
}
|
||||||
@ -384,7 +384,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
let menuItems = [];
|
let menuItems = [];
|
||||||
for (let action of actions) {
|
for (let action of actions) {
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
name: action.system.competence,
|
name: action.data.competence,
|
||||||
icon: "<i class='fas fa-dice-d6'></i>",
|
icon: "<i class='fas fa-dice-d6'></i>",
|
||||||
callback: target => { RdDCombatManager.rollInitiativeAction(combatantId, action) }
|
callback: target => { RdDCombatManager.rollInitiativeAction(combatantId, action) }
|
||||||
});
|
});
|
||||||
|
@ -77,10 +77,8 @@ export class RdDHotbar {
|
|||||||
if (speaker.token) actor = game.actors.tokens[speaker.token];
|
if (speaker.token) actor = game.actors.tokens[speaker.token];
|
||||||
if (!actor) actor = game.actors.get(speaker.actor);
|
if (!actor) actor = game.actors.get(speaker.actor);
|
||||||
|
|
||||||
let item = actor?.items.find(it => it.name === itemName && it.type == itemType) ?? undefined;
|
let item = Misc.data(actor?.items.find(it => it.name === itemName && it.type == itemType));
|
||||||
if (!item){
|
if (!item) return ui.notifications.warn(`Impossible de trouver l'objet de cette macro`);
|
||||||
return ui.notifications.warn(`Impossible de trouver l'objet de cette macro`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Trigger the item roll
|
// Trigger the item roll
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
|
@ -165,7 +165,7 @@ export class RdDRoll extends Dialog {
|
|||||||
|
|
||||||
function onLoad() {
|
function onLoad() {
|
||||||
let rollData = dialog.rollData;
|
let rollData = dialog.rollData;
|
||||||
console.log('Ouverture RdDRoll', rollData);
|
console.log(rollData);
|
||||||
// Update html, according to data
|
// Update html, according to data
|
||||||
if (rollData.competence) {
|
if (rollData.competence) {
|
||||||
const defaut_carac = rollData.competence.system.defaut_carac
|
const defaut_carac = rollData.competence.system.defaut_carac
|
||||||
@ -294,7 +294,7 @@ export class RdDRoll extends Dialog {
|
|||||||
|
|
||||||
async setSelectedSigneDraconique(signe){
|
async setSelectedSigneDraconique(signe){
|
||||||
this.rollData.signe = signe;
|
this.rollData.signe = signe;
|
||||||
this.rollData.diffLibre = signe.system.difficulte,
|
this.rollData.diffLibre = Misc.data(signe).data.difficulte,
|
||||||
$(".signe-difficulte").text(Misc.toSignedString(this.rollData.diffLibre));
|
$(".signe-difficulte").text(Misc.toSignedString(this.rollData.diffLibre));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ export class RdDSheetUtility {
|
|||||||
destId: destItemId,
|
destId: destItemId,
|
||||||
targetActorId: actorId,
|
targetActorId: actorId,
|
||||||
itemId: itemId,
|
itemId: itemId,
|
||||||
sourceActorId: item.actor.id,
|
sourceActorId: dragData.actorId,
|
||||||
srcId: objetVersConteneur[itemId],
|
srcId: objetVersConteneur[itemId],
|
||||||
onEnleverConteneur: () => { delete objetVersConteneur[itemId]; },
|
onEnleverConteneur: () => { delete objetVersConteneur[itemId]; },
|
||||||
onAjouterDansConteneur: (itemId, conteneurId) => { objetVersConteneur[itemId] = conteneurId; }
|
onAjouterDansConteneur: (itemId, conteneurId) => { objetVersConteneur[itemId] = conteneurId; }
|
||||||
|
@ -239,7 +239,7 @@ export class RdDUtility {
|
|||||||
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
||||||
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
||||||
|
|
||||||
Handlebars.registerHelper('filtreTriCompetences', competences => competences.filter(it => it.system.isVisible)
|
Handlebars.registerHelper('filtreTriCompetences', competences => competences.filter(it => it.visible)
|
||||||
.sort((a, b) => {
|
.sort((a, b) => {
|
||||||
if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) {
|
if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) {
|
||||||
if (a.name.includes("Cité")) return -1;
|
if (a.name.includes("Cité")) return -1;
|
||||||
@ -831,7 +831,7 @@ export class RdDUtility {
|
|||||||
static confirmerSuppressionSubacteur(actorSheet, li) {
|
static confirmerSuppressionSubacteur(actorSheet, li) {
|
||||||
let actorId = li.data("actor-id");
|
let actorId = li.data("actor-id");
|
||||||
let actor = game.actors.get(actorId);
|
let actor = game.actors.get(actorId);
|
||||||
let msgTxt = "<p>Etes vous certain de vouloir supprimer le lien vers ce véhicule/monture/suivant : " + actor.name + " ?</p>";
|
let msgTxt = "<p>Etes vous certain de vouloir supprimer le lien vers ce véhicule/monture/suivant : " + actor.data.name + " ?</p>";
|
||||||
let d = new Dialog({
|
let d = new Dialog({
|
||||||
title: "Confirmer la suppression du lien",
|
title: "Confirmer la suppression du lien",
|
||||||
content: msgTxt,
|
content: msgTxt,
|
||||||
@ -881,7 +881,8 @@ export class RdDUtility {
|
|||||||
label: "Annuler"
|
label: "Annuler"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (objet.type == 'conteneur' && objet.system.contenu.length > 0) {
|
const docData = objet
|
||||||
|
if (docData.type == 'conteneur' && docData.data.contenu.length > 0) {
|
||||||
msgTxt += "<br>Ce conteneur n'est pas vide. Choisissez l'option de suppression";
|
msgTxt += "<br>Ce conteneur n'est pas vide. Choisissez l'option de suppression";
|
||||||
buttons['deleteall'] = {
|
buttons['deleteall'] = {
|
||||||
icon: '<i class="fas fa-check"></i>',
|
icon: '<i class="fas fa-check"></i>',
|
||||||
|
@ -486,7 +486,7 @@ export class TMRRencontres {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async onPostSuccessReveDeDragon(tmrDialog, tmrData) {
|
static async onPostSuccessReveDeDragon(tmrDialog, tmrData) {
|
||||||
if (tmrData.rolled.isPart) {
|
if (tmrData.rolled.isPart) {
|
||||||
await tmrData.actor.appliquerAjoutExperience(tmrData);
|
await tmrData.actor.appliquerAjoutExperience(tmrData, true);
|
||||||
}
|
}
|
||||||
await tmrData.actor.resultCombatReveDeDragon(tmrData);
|
await tmrData.actor.resultCombatReveDeDragon(tmrData);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{#if system.isVisible}}
|
{{#if visible}}
|
||||||
<li class="item flexrow list-item {{#if system.isLevelUp}}xp-level-up tooltip{{/if}}" data-item-id="{{_id}}">
|
<li class="item flexrow list-item {{#if system.isLevelUp}}xp-level-up tooltip{{/if}}" data-item-id="{{_id}}">
|
||||||
<a class="competence-label" name="{{name}}">
|
<a class="competence-label" name="{{name}}">
|
||||||
<img class="sheet-competence-img" src="{{img}}"/>
|
<img class="sheet-competence-img" src="{{img}}"/>
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
<a class="item-vendre" title="Vendre ou donner"><i class="fas fa-comments-dollar"></i></a>
|
<a class="item-vendre" title="Vendre ou donner"><i class="fas fa-comments-dollar"></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<a class="item-montrer" title="Montrer"><i class="fas fa-comment"></i></a>
|
<a class="item-montrer" title="Montrer"><i class="fas fa-comment"></i></a>
|
||||||
{{#if item.actionPrincipale}}
|
{{#if item.system.actionPrincipale}}
|
||||||
<a class="item-action">{{item.actionPrincipale}}</a>
|
<a class="item-action">{{item.system.actionPrincipale}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<!-- <span class="equipement-detail">
|
<!-- <span class="equipement-detail">
|
||||||
<span class="flex-shrink"><a class="monnaie-moins"><i class="fas fa-minus-square"></i></a></span>
|
<span class="flex-shrink"><a class="monnaie-moins"><i class="fas fa-minus-square"></i></a></span>
|
||||||
<span>{{piece.system.quantite}}</span>
|
<span>{{piece.data.quantite}}</span>
|
||||||
<span class="flex-shrink"><a class="monnaie-plus"><i class="fas fa-plus-square"></i></a></span>
|
<span class="flex-shrink"><a class="monnaie-plus"><i class="fas fa-plus-square"></i></a></span>
|
||||||
</span> -->
|
</span> -->
|
||||||
<span class="equipement-actions item-controls">
|
<span class="equipement-actions item-controls">
|
||||||
|
@ -300,7 +300,7 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each esquives as |esq key|}}
|
{{#each esquives as |esq key|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{esq._id}}">
|
<li class="item flexrow list-item">
|
||||||
<span class="competence-label">
|
<span class="competence-label">
|
||||||
<a class="competence-label" name="{{esq.name}}">
|
<a class="competence-label" name="{{esq.name}}">
|
||||||
<img class="sheet-competence-img" src="{{esq.img}}"/>
|
<img class="sheet-competence-img" src="{{esq.img}}"/>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<span>
|
<span>
|
||||||
<img class="chat-icon" src="{{platCuisine.img}}" alt="{{platCuisine.name}}" />
|
<img class="chat-icon" src="{{platCuisine.img}}" alt="{{platCuisine.name}}" />
|
||||||
<br>{{alias}} a préparé {{platCuisine.system.quantite}} portions de {{platCuisine.name}}
|
<br>{{alias}} a préparé {{platCuisine.data.quantite}} portions de {{platCuisine.name}}
|
||||||
{{~#if ajouterEquipement}}, qui ont été ajoutées à son équipement{{/if}}.
|
{{~#if ajouterEquipement}}, qui ont été ajoutées à son équipement{{/if}}.
|
||||||
{{#if rolled.isSuccess}}
|
{{#if rolled.isSuccess}}
|
||||||
Il a réussi la recette, pour un plat de qualité {{qualiteFinale}}
|
Il a réussi la recette, pour un plat de qualité {{qualiteFinale}}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
{{alias}} ne parvient pas à vaincre le Rêve de Dragon, et prend un violent coup de queue.
|
{{alias}} ne parvient pas à vaincre le Rêve de Dragon, et prend un violent coup de queue.
|
||||||
Il subit {{#if rolled.isETotal}}deux queues{{else}}une queue{{/if}} de dragon!
|
Il subit {{#if rolled.isETotal}}deux queues{{else}}une queue{{/if}} de dragon!
|
||||||
{{#each queues as | queue key|}}
|
{{#each queues as | queue key|}}
|
||||||
<br>{{queue.name}}: {{{queue.system.description}}}
|
<br>{{queue.name}}: {{{queue.data.description}}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||||
<h4>
|
<h4>
|
||||||
{{alias}} {{#if isSortReserve}}met en réserve{{else}}lance{{/if}}
|
{{alias}} {{#if isSortReserve}}met en réserve{{else}}lance{{/if}}
|
||||||
le {{#if selectedSort.system.isrituel}}rituel{{else}}sort{{/if}}
|
le {{#if selectedSort.data.isrituel}}rituel{{else}}sort{{/if}}
|
||||||
{{selectedSort.name}}
|
{{selectedSort.name}}
|
||||||
</h4>
|
</h4>
|
||||||
<div>Pour {{selectedSort.system.ptreve_reel}} point{{~#if (gt selectedSort.system.ptreve_reel 1)}}s{{/if}} de rêve en {{tmr.label}} ({{tmr.coord}}).
|
<div>Pour {{selectedSort.data.ptreve_reel}} point{{~#if (gt selectedSort.data.ptreve_reel 1)}}s{{/if}} de rêve en {{tmr.label}} ({{tmr.coord}}).
|
||||||
{{#if show.reveInsuffisant}}
|
{{#if show.reveInsuffisant}}
|
||||||
<span>Pas assez de rêve!</span>
|
<span>Pas assez de rêve!</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
</h4>
|
</h4>
|
||||||
<p>Pour le lire ce signe draconique, {{alias}} doit se rendre dans les
|
<p>Pour le lire ce signe draconique, {{alias}} doit se rendre dans les
|
||||||
Terres Médianes du Rêve et trouvez une case de résonnance.
|
Terres Médianes du Rêve et trouvez une case de résonnance.
|
||||||
{{#if signe.system.ephemere}}C'est un signe éphémère, qui ne restera présent que pour {{signe.system.duree}}{{/if}}
|
{{#if signe.data.ephemere}}C'est un signe éphémère, qui ne restera présent que pour {{signe.data.duree}}{{/if}}
|
||||||
</p>
|
</p>
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group flexrow">
|
<div class="form-group flexrow">
|
||||||
<label for="signe.system.ephemere">Ephémère</label>
|
<label for="signe.system.ephemere">Ephémère</label>
|
||||||
<input class="flex-shrink" type="checkbox" name="signe.system.ephemere" {{#if signe.system.ephemere}}checked{{/if}} />
|
<input class="flex-shrink" type="checkbox" name="signe.system.ephemere" {{#if signe.data.ephemere}}checked{{/if}} />
|
||||||
<span>
|
<span>
|
||||||
<input type="text" name="signe.system.duree" value="{{signe.system.duree}}" data-dtype="String" />
|
<input type="text" name="signe.system.duree" value="{{signe.systemata.duree}}" data-dtype="String" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<label class="flex-grow">Quantité à {{#if item.system.boisson}}boire{{else}}manger{{/if}}</label>
|
<label class="flex-grow">Quantité à {{#if item.system.boisson}}boire{{else}}manger{{/if}}</label>
|
||||||
<input class="attribute-value consommer-doses flex-shrink" type="number" name="doses" value="{{choix.doses}}"
|
<input class="attribute-value consommer-doses flex-shrink" type="number" name="doses" value="{{choix.doses}}"
|
||||||
min="0" max="{{item.system.quantite}}" data-dtype="Number" />
|
min="0" max="{{item.data.quantite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
{{#if item.system.sust}}
|
{{#if item.system.sust}}
|
||||||
<p>Cette {{#if item.system.boisson}}boisson{{else}}nourriture{{/if}} vous apportera <span
|
<p>Cette {{#if item.system.boisson}}boisson{{else}}nourriture{{/if}} vous apportera <span
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
<img class="rdd-hud-togglebutton" src="systems/foundryvtt-reve-de-dragon/icons/heures/hd06.svg" width="36" height="36" title="Attaque"/>
|
<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">
|
<div class="rdd-hud-list tokenhudext left">
|
||||||
{{#each actions as |action key|}}
|
{{#each actions as |action key|}}
|
||||||
{{#unless action.system.initOnly}}
|
{{#unless action.data.initOnly}}
|
||||||
<div class="control-icon tokenhudicon rdd-hud-menu rdd-attaque"
|
<div class="control-icon tokenhudicon rdd-hud-menu rdd-attaque"
|
||||||
data-combatant-id="{{../combatant.id}}"
|
data-combatant-id="{{../combatant.id}}"
|
||||||
data-action-index="{{action.index}}"
|
data-action-index="{{action.index}}"
|
||||||
title="{{action.name}}">
|
title="{{action.name}}">
|
||||||
<label>{{action.name}} {{action.system.mainInfo}}</label>
|
<label>{{action.name}} {{action.data.mainInfo}}</label>
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
data-combatant-id="{{../combatant.id}}"
|
data-combatant-id="{{../combatant.id}}"
|
||||||
data-action-index="{{action.index}}"
|
data-action-index="{{action.index}}"
|
||||||
title="{{action.name}}">
|
title="{{action.name}}">
|
||||||
<label>init: {{action.name}} {{action.system.mainInfo}}</label>
|
<label>init: {{action.name}} {{action.data.mainInfo}}</label>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each commandes as |commande key|}}
|
{{#each commandes as |commande key|}}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="flex-group-left details-sort">
|
<div class="flex-group-left details-sort">
|
||||||
{{#if sort.system.cible}}<label><strong>Cible</strong>: {{sort.system.cible}} </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.JR}}<label><strong>JR</strong>: {{sort.system.JR}} </label>{{/if}}
|
||||||
{{#if sort.system.portee}}<label><strong>Portée</strong>: {{sort.system.portee}} </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.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}}
|
{{#if sort.system.coutseuil}}<label><strong>Coût de seuil</strong>: {{sort.system.coutseuil}}</label>{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user