Utilisation de system dans les Item/Actor Sheet
Utilisation de system dans les data de formulaire pour tous les Item/Actor (à la base, ou les sous-éléments) Corrections sur les sorts en réserve (ce ne sont pas des Item) Petites améliorations: * `actor.itemTypes[type]` revient à faire (sans besoin de filtrer) `actor.items.filter(it => it.type == type)` * dans les ItemSheet, this.object et this.document remplacés par this.item * dans les ActorSheet, this.object et this.document remplacés par this.actor Quelques corrections en plus: * parade ne marchait pas * problèmes sur le commerce
This commit is contained in:
parent
5cd9fb3a1c
commit
509b7f97dc
@ -30,8 +30,8 @@ export class RdDActorCreatureSheet extends RdDActorSheet {
|
|||||||
let formData = await super.getData()
|
let formData = await super.getData()
|
||||||
//console.log("Creature : ", formData, formData.system)
|
//console.log("Creature : ", formData, formData.system)
|
||||||
formData.calc = {
|
formData.calc = {
|
||||||
caracTotal: RdDCarac.computeTotal(formData.data.carac),
|
caracTotal: RdDCarac.computeTotal(formData.system.carac),
|
||||||
resumeBlessures: this.actor.computeResumeBlessure(formData.data.blessures),
|
resumeBlessures: this.actor.computeResumeBlessure(formData.system.blessures),
|
||||||
encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
|
encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
|
||||||
surEncombrementMessage: this.actor.getMessageSurEncombrement()
|
surEncombrementMessage: this.actor.getMessageSurEncombrement()
|
||||||
}
|
}
|
||||||
|
@ -25,23 +25,21 @@ export class RdDActorEntiteSheet extends ActorSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getData() {
|
async getData() {
|
||||||
const objectData = this.object;
|
|
||||||
let formData = {
|
let formData = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
id: objectData.id,
|
id: this.actor.id,
|
||||||
type: objectData.type,
|
type: this.actor.type,
|
||||||
img: objectData.img,
|
img: this.actor.img,
|
||||||
name: objectData.name,
|
name: this.actor.name,
|
||||||
// actor: this.object,
|
|
||||||
editable: this.isEditable,
|
editable: this.isEditable,
|
||||||
cssClass: this.isEditable ? "editable" : "locked",
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
data: foundry.utils.deepClone(this.actor.system),
|
system: foundry.utils.deepClone(this.actor.system),
|
||||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e)),
|
effects: this.actor.effects.map(e => foundry.utils.deepClone(e)),
|
||||||
// items: items,
|
// items: items,
|
||||||
limited: this.object.limited,
|
limited: this.actor.limited,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner,
|
owner: this.actor.isOwner,
|
||||||
itemsByType: Misc.classify(this.object.items.map(i => foundry.utils.deepClone(i))),
|
itemsByType: Misc.classify(this.actor.items.map(i => foundry.utils.deepClone(i))),
|
||||||
};
|
};
|
||||||
|
|
||||||
formData.options.isGM = game.user.isGM;
|
formData.options.isGM = game.user.isGM;
|
||||||
@ -141,6 +139,6 @@ export class RdDActorEntiteSheet extends ActorSheet {
|
|||||||
/** @override */
|
/** @override */
|
||||||
_updateObject(event, formData) {
|
_updateObject(event, formData) {
|
||||||
// Update the Actor
|
// Update the Actor
|
||||||
return this.object.update(formData);
|
return this.actor.update(formData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,23 +36,22 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getData() {
|
async getData() {
|
||||||
const objectData = this.object.system
|
|
||||||
this.timerRecherche = undefined;
|
this.timerRecherche = undefined;
|
||||||
|
|
||||||
let formData = {
|
let formData = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
id: this.object.id,
|
id: this.actor.id,
|
||||||
type: this.object.type,
|
type: this.actor.type,
|
||||||
img: this.object.img,
|
img: this.actor.img,
|
||||||
name: this.object.name,
|
name: this.actor.name,
|
||||||
editable: this.isEditable,
|
editable: this.isEditable,
|
||||||
cssClass: this.isEditable ? "editable" : "locked",
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
data: foundry.utils.deepClone(this.actor.system),
|
system: foundry.utils.deepClone(this.actor.system),
|
||||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e)),
|
effects: this.actor.effects.map(e => foundry.utils.deepClone(e)),
|
||||||
limited: this.object.limited,
|
limited: this.actor.limited,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner,
|
owner: this.actor.isOwner,
|
||||||
itemsByType: Misc.classify(this.object.items.map(i => foundry.utils.deepClone(i))),
|
itemsByType: Misc.classify(this.actor.items.map(i => foundry.utils.deepClone(i))),
|
||||||
}
|
}
|
||||||
RdDUtility.filterItemsPerTypeForSheet(formData)
|
RdDUtility.filterItemsPerTypeForSheet(formData)
|
||||||
|
|
||||||
@ -65,13 +64,13 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
formData.calc = {
|
formData.calc = {
|
||||||
comptageArchetype: RdDItemCompetence.computeResumeArchetype(formData.competences),
|
comptageArchetype: RdDItemCompetence.computeResumeArchetype(formData.competences),
|
||||||
competenceXPTotal: RdDItemCompetence.computeTotalXP(formData.competences),
|
competenceXPTotal: RdDItemCompetence.computeTotalXP(formData.competences),
|
||||||
caracTotal: RdDCarac.computeTotal(formData.data.carac, formData.data.beaute),
|
caracTotal: RdDCarac.computeTotal(formData.system.carac, formData.system.beaute),
|
||||||
// Mise à jour de l'encombrement total et du prix de l'équipement
|
// Mise à jour de l'encombrement total et du prix de l'équipement
|
||||||
encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
|
encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
|
||||||
prixTotalEquipement: this.actor.computePrixTotalEquipement(),
|
prixTotalEquipement: this.actor.computePrixTotalEquipement(),
|
||||||
surprise: RdDBonus.find(this.actor.getSurprise(false)).descr,
|
surprise: RdDBonus.find(this.actor.getSurprise(false)).descr,
|
||||||
fatigue: RdDUtility.calculFatigueHtml(formData.data.sante.fatigue.value, formData.data.sante.endurance.max),
|
fatigue: RdDUtility.calculFatigueHtml(formData.system.sante.fatigue.value, formData.system.sante.endurance.max),
|
||||||
resumeBlessures: this.actor.computeResumeBlessure(formData.data.blessures),
|
resumeBlessures: this.actor.computeResumeBlessure(formData.system.blessures),
|
||||||
surEncombrementMessage: this.actor.getMessageSurEncombrement()
|
surEncombrementMessage: this.actor.getMessageSurEncombrement()
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -79,9 +78,9 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
item.system.isVisible = this.options.recherche
|
item.system.isVisible = 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.system.compteurs.experience.value);
|
||||||
});
|
});
|
||||||
Object.values(formData.data.carac).forEach(c => {
|
Object.values(formData.system.carac).forEach(c => {
|
||||||
RdDCarac.levelUp(c);
|
RdDCarac.levelUp(c);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -89,9 +88,9 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
// toujours avoir une liste d'armes (pour mettre esquive et corps à corps)
|
// toujours avoir une liste d'armes (pour mettre esquive et corps à corps)
|
||||||
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.system.carac);
|
||||||
formData.esquives = this.actor.getCompetences("Esquive");
|
formData.esquives = this.actor.getCompetences("Esquive");
|
||||||
formData.combat = RdDCombatManager.listActionsArmes(formData.combat, formData.competences, formData.data.carac);
|
formData.combat = RdDCombatManager.listActionsArmes(formData.combat, formData.competences, formData.system.carac);
|
||||||
|
|
||||||
this.armesList = formData.combat;
|
this.armesList = formData.combat;
|
||||||
|
|
||||||
@ -101,8 +100,8 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
|
|
||||||
formData.hautreve = {
|
formData.hautreve = {
|
||||||
isDemiReve: this.actor.getEffectByLabel("Demi-rêve"),
|
isDemiReve: this.actor.getEffectByLabel("Demi-rêve"),
|
||||||
sortsReserve: formData.data.reve.reserve.list,
|
sortsReserve: formData.system.reve.reserve.list,
|
||||||
rencontres: duplicate(formData.data.reve.rencontre.list),
|
rencontres: duplicate(formData.system.reve.rencontre.list),
|
||||||
casesTmr: formData.itemsByType.casetmr,
|
casesTmr: formData.itemsByType.casetmr,
|
||||||
cacheTMR: this.actor.isTMRCache()
|
cacheTMR: this.actor.isTMRCache()
|
||||||
}
|
}
|
||||||
@ -330,7 +329,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
});
|
});
|
||||||
// Initiative pour l'arme
|
// Initiative pour l'arme
|
||||||
html.find('.arme-initiative a').click(async event => {
|
html.find('.arme-initiative a').click(async event => {
|
||||||
let combatant = game.combat.combatants.find(c => c.actor._id == this.actor._id);
|
let combatant = game.combat.combatants.find(c => c.actor.id == this.actor.id);
|
||||||
if (combatant) {
|
if (combatant) {
|
||||||
let action = this._getEventArmeCombat(event);
|
let action = this._getEventArmeCombat(event);
|
||||||
RdDCombatManager.rollInitiativeAction(combatant._id, action);
|
RdDCombatManager.rollInitiativeAction(combatant._id, action);
|
||||||
@ -451,7 +450,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
// On pts de reve change
|
// On pts de reve change
|
||||||
html.find('.pointsreve-value').change(async event => {
|
html.find('.pointsreve-value').change(async event => {
|
||||||
let reveValue = event.currentTarget.value;
|
let reveValue = event.currentTarget.value;
|
||||||
this.actor.update({ "data.reve.reve.value": reveValue });
|
this.actor.update({ "system.reve.reve.value": reveValue });
|
||||||
});
|
});
|
||||||
|
|
||||||
// On seuil de reve change
|
// On seuil de reve change
|
||||||
@ -568,7 +567,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
/** @override */
|
/** @override */
|
||||||
_updateObject(event, formData) {
|
_updateObject(event, formData) {
|
||||||
// Update the Actor
|
// Update the Actor
|
||||||
return this.object.update(formData);
|
return this.actor.update(formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
async splitItem(item) {
|
async splitItem(item) {
|
||||||
@ -579,9 +578,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 < item.system.quantite) {
|
||||||
await item.diminuerQuantite(split);
|
await item.diminuerQuantite(split);
|
||||||
const itemData = duplicate(item);
|
const splitItem = duplicate(item);
|
||||||
itemData.system.quantite = split;
|
splitItem.system.quantite = split;
|
||||||
await this.actor.createEmbeddedDocuments('Item', [itemData])
|
await this.actor.createEmbeddedDocuments('Item', [splitItem])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,21 +27,20 @@ export class RdDActorVehiculeSheet extends ActorSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getData() {
|
async getData() {
|
||||||
const objectData = this.object
|
|
||||||
let formData = {
|
let formData = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
id: objectData.id,
|
id: this.actor.id,
|
||||||
type: objectData.type,
|
type: this.actor.type,
|
||||||
img: objectData.img,
|
img: this.actor.img,
|
||||||
name: objectData.name,
|
name: this.actor.name,
|
||||||
editable: this.isEditable,
|
editable: this.isEditable,
|
||||||
cssClass: this.isEditable ? "editable" : "locked",
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
data: foundry.utils.deepClone(this.object.system),
|
system: foundry.utils.deepClone(this.actor.system),
|
||||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e)),
|
effects: this.actor.effects.map(e => foundry.utils.deepClone(e)),
|
||||||
limited: this.object.limited,
|
limited: this.actor.limited,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner,
|
owner: this.actor.isOwner,
|
||||||
itemsByType: Misc.classify(this.object.items.map(i => foundry.utils.deepClone(i))),
|
itemsByType: Misc.classify(this.actor.items.map(i => foundry.utils.deepClone(i))),
|
||||||
};
|
};
|
||||||
|
|
||||||
RdDUtility.filterItemsPerTypeForSheet(formData);
|
RdDUtility.filterItemsPerTypeForSheet(formData);
|
||||||
@ -160,6 +159,6 @@ export class RdDActorVehiculeSheet extends ActorSheet {
|
|||||||
/** @override */
|
/** @override */
|
||||||
_updateObject(event, formData) {
|
_updateObject(event, formData) {
|
||||||
// Update the Actor
|
// Update the Actor
|
||||||
return this.object.update(formData);
|
return this.actor.update(formData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
219
module/actor.js
219
module/actor.js
@ -35,6 +35,14 @@ import { RdDItem } from "./item.js";
|
|||||||
import { RdDPossession } from "./rdd-possession.js";
|
import { RdDPossession } from "./rdd-possession.js";
|
||||||
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||||
|
|
||||||
|
const POSSESSION_SANS_DRACONIC = {
|
||||||
|
img: 'systems/foundryvtt-reve-de-dragon/icons/entites/possession.webp',
|
||||||
|
name: 'Sans draconic',
|
||||||
|
system: {
|
||||||
|
niveau: 0,
|
||||||
|
defaut_carac: "reve",
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
@ -63,23 +71,23 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static remoteActorCall(data, canExecuteLocally = () => Misc.isUniqueConnectedGM()) {
|
static remoteActorCall(callData, canExecuteLocally = () => Misc.isUniqueConnectedGM()) {
|
||||||
if (canExecuteLocally()) {
|
if (canExecuteLocally()) {
|
||||||
RdDActor.onRemoteActorCall(data);
|
RdDActor.onRemoteActorCall(callData);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
game.socket.emit(SYSTEM_SOCKET_ID, { msg: "msg_remote_actor_call", data: data });
|
game.socket.emit(SYSTEM_SOCKET_ID, { msg: "msg_remote_actor_call", data: callData });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static onRemoteActorCall(data) {
|
static onRemoteActorCall(callData) {
|
||||||
const actor = game.actors.get(data?.actorId);
|
const actor = game.actors.get(callData?.actorId);
|
||||||
if (Misc.isOwnerPlayerOrUniqueConnectedGM(actor)) { // Seul le joueur choisi effectue l'appel: le joueur courant si propriétaire de l'actor, ou le MJ sinon
|
if (Misc.isOwnerPlayerOrUniqueConnectedGM(actor)) { // Seul le joueur choisi effectue l'appel: le joueur courant si propriétaire de l'actor, ou le MJ sinon
|
||||||
const args = data.args;
|
const args = callData.args;
|
||||||
console.info(`RdDActor.onRemoteActorCall: pour l'Actor ${data.actorId}, appel de RdDActor.${data.method}(`, ...args, ')');
|
console.info(`RdDActor.onRemoteActorCall: pour l'Actor ${callData.actorId}, appel de RdDActor.${callData.method}(`, ...args, ')');
|
||||||
actor[data.method](...args);
|
actor[callData.method](...args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,8 +103,8 @@ export class RdDActor extends Actor {
|
|||||||
* This overrided create() function adds initial items
|
* This overrided create() function adds initial items
|
||||||
* Namely: Basic skills, money,
|
* Namely: Basic skills, money,
|
||||||
*
|
*
|
||||||
* @param {Object} actorData Barebones actor data which this function adds onto.
|
* @param {Object} actorData Barebones actor template data which this function adds onto.
|
||||||
* @param {Object} options (Unused) Additional options which customize the creation workflow.
|
* @param {Object} options Additional options which customize the creation workflow.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static async create(actorData, options) {
|
static async create(actorData, options) {
|
||||||
@ -110,7 +118,7 @@ export class RdDActor extends Actor {
|
|||||||
if (actorData.items) {
|
if (actorData.items) {
|
||||||
let actor = await super.create(actorData, options);
|
let actor = await super.create(actorData, options);
|
||||||
if (isPersonnage) {
|
if (isPersonnage) {
|
||||||
await actor.checkMonnaiePresence(actorData.items);
|
await actor.checkMonnaiePresence();
|
||||||
}
|
}
|
||||||
return actor;
|
return actor;
|
||||||
}
|
}
|
||||||
@ -175,7 +183,7 @@ export class RdDActor extends Actor {
|
|||||||
this.computePrixTotalEquipement();
|
this.computePrixTotalEquipement();
|
||||||
this.computeEtatGeneral();
|
this.computeEtatGeneral();
|
||||||
// Sanity check
|
// Sanity check
|
||||||
await this.checkMonnaiePresence(actorData.items);
|
await this.checkMonnaiePresence();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -189,9 +197,9 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async checkMonnaiePresence(items) { // Ajout opportuniste si les pièces n'existent pas.
|
async checkMonnaiePresence() { // Ajout opportuniste si les pièces n'existent pas.
|
||||||
if (!items) return; // Sanity check during import
|
if (!this.items) return; // Sanity check during import
|
||||||
let manquantes = Monnaie.monnaiesManquantes(items);
|
let manquantes = Monnaie.monnaiesManquantes(this.itemTypes['monnaie']);
|
||||||
//console.log("Manque : ", manquantes);
|
//console.log("Manque : ", manquantes);
|
||||||
if (manquantes.length > 0) {
|
if (manquantes.length > 0) {
|
||||||
await this.createEmbeddedDocuments('Item', manquantes, { renderSheet: false });
|
await this.createEmbeddedDocuments('Item', manquantes, { renderSheet: false });
|
||||||
@ -313,13 +321,11 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listItemsData(type) {
|
listItemsData(type) {
|
||||||
return this.filterItemsData(it => it.type == type);
|
return this.itemTypes[type];
|
||||||
}
|
|
||||||
filterItemsData(filter) {
|
|
||||||
return this.items.map(it => it).filter(filter)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
filterItems(filter) {
|
filterItems(filter) {
|
||||||
return this.items.filter(it => filter(it))
|
return this.items.filter(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
getItemOfType(idOrName, type) {
|
getItemOfType(idOrName, type) {
|
||||||
@ -358,32 +364,26 @@ export class RdDActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getDraconicList() {
|
getDraconicList() {
|
||||||
return this.items.filter(it => it.type == 'competence' && it.system.categorie == 'draconic')
|
return this.items.filter(it => it.type == 'competence' && it.system.categorie == 'draconic')
|
||||||
.sort(Misc.descending(it => it.system.niveau))
|
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getBestDraconic() {
|
getBestDraconic() {
|
||||||
const list = this.getDraconicList()
|
const list = this.getDraconicList()
|
||||||
|
.sort(Misc.descending(it => it.system.niveau))
|
||||||
return duplicate(list[0])
|
return duplicate(list[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
getDraconicOuPossession() {
|
getDraconicOuPossession() {
|
||||||
const possessions = this.items.filter(it => it.type == 'competencecreature' && it.system.ispossession)
|
const possessions = this.items.filter(it => it.type == 'competencecreature' && it.system.ispossession)
|
||||||
.sort(Misc.descending(it => it.system.niveau));
|
.sort(Misc.descending(it => it.system.niveau));
|
||||||
if (possessions.length > 0) {
|
if (possessions.length > 0) {
|
||||||
return duplicate(possessions[0]);
|
return duplicate(possessions[0]);
|
||||||
}
|
}
|
||||||
const draconics = this.getDraconicList().filter(it => it.system.niveau >= 0);
|
const draconics = [...this.getDraconicList().filter(it => it.system.niveau >= 0),
|
||||||
if (draconics.length > 0) {
|
POSSESSION_SANS_DRACONIC]
|
||||||
return duplicate(draconics[0]);
|
.sort(Misc.descending(it => it.system.niveau));
|
||||||
}
|
return duplicate(draconics[0]);
|
||||||
return {
|
|
||||||
img: 'systems/foundryvtt-reve-de-dragon/icons/entites/possession.webp',
|
|
||||||
name: 'Sans draconic',
|
|
||||||
data: {
|
|
||||||
niveau: 0,
|
|
||||||
defaut_carac: "reve",
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getPossession(possessionId) {
|
getPossession(possessionId) {
|
||||||
return this.items.find(it => it.type == 'possession' && it.system.possessionid == possessionId);
|
return this.items.find(it => it.type == 'possession' && it.system.possessionid == possessionId);
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async verifierPotionsEnchantees() {
|
async verifierPotionsEnchantees() {
|
||||||
let potionsEnchantees = this.filterItemsData(it => it.type == 'potion' && it.system.categorie.toLowerCase().includes('enchant'));
|
let potionsEnchantees = this.filterItems(it => it.type == 'potion' && it.system.categorie.toLowerCase().includes('enchant'));
|
||||||
for (let potion of potionsEnchantees) {
|
for (let potion of potionsEnchantees) {
|
||||||
if (!potion.system.prpermanent) {
|
if (!potion.system.prpermanent) {
|
||||||
console.log(potion);
|
console.log(potion);
|
||||||
@ -882,8 +882,6 @@ export class RdDActor extends Actor {
|
|||||||
if (caracName == 'Taille') {
|
if (caracName == 'Taille') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if ( isNaN(caracXP) || typeof(caracXP) != 'number') caracXP = 0;
|
|
||||||
//await this.update({ [`data.carac.${caracName}.xp`]: caracXP });
|
|
||||||
this.checkCaracXP(caracName);
|
this.checkCaracXP(caracName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1181,7 +1179,7 @@ export class RdDActor extends Actor {
|
|||||||
item.estContenu = undefined;
|
item.estContenu = undefined;
|
||||||
}
|
}
|
||||||
if (item.type == 'conteneur' && item.system.contenu.length > 0) {
|
if (item.type == 'conteneur' && item.system.contenu.length > 0) {
|
||||||
corrections.push({ _id: itemData._id, 'system.contenu': [] });
|
corrections.push({ _id: item.id, 'system.contenu': [] });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (corrections.length > 0) {
|
if (corrections.length > 0) {
|
||||||
@ -1352,7 +1350,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async computeMalusArmure() {
|
async computeMalusArmure() {
|
||||||
const newMalusArmure = this.filterItemsData(it => it.type == 'armure' && it.system.equipe)
|
const newMalusArmure = this.filterItems(it => it.type == 'armure' && it.system.equipe)
|
||||||
.map(it => it.system.malus ?? 0)
|
.map(it => it.system.malus ?? 0)
|
||||||
.reduce(Misc.sum(), 0);
|
.reduce(Misc.sum(), 0);
|
||||||
// Mise à jour éventuelle du malus armure
|
// Mise à jour éventuelle du malus armure
|
||||||
@ -1364,7 +1362,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
computePrixTotalEquipement() {
|
computePrixTotalEquipement() {
|
||||||
this.prixTotalEquipement = this.filterItemsData(it => it.system.prixTotal)
|
this.prixTotalEquipement = this.filterItems(it => it.system.prixTotal)
|
||||||
.map(it => it.system.prixTotal ?? 0)
|
.map(it => it.system.prixTotal ?? 0)
|
||||||
.reduce(Misc.sum(), 0);
|
.reduce(Misc.sum(), 0);
|
||||||
// Mise à jour valeur totale de l'équipement
|
// Mise à jour valeur totale de l'équipement
|
||||||
@ -1374,6 +1372,9 @@ export class RdDActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
computeResumeBlessure(blessures = undefined) {
|
computeResumeBlessure(blessures = undefined) {
|
||||||
blessures = blessures ?? this.system.blessures;
|
blessures = blessures ?? this.system.blessures;
|
||||||
|
if (!blessures) {
|
||||||
|
return "Pas de blessures possibles";
|
||||||
|
}
|
||||||
let nbLegeres = this.countBlessures(blessures.legeres.liste);
|
let nbLegeres = this.countBlessures(blessures.legeres.liste);
|
||||||
let nbGraves = this.countBlessures(blessures.graves.liste);
|
let nbGraves = this.countBlessures(blessures.graves.liste);
|
||||||
let nbCritiques = this.countBlessures(blessures.critiques.liste);
|
let nbCritiques = this.countBlessures(blessures.critiques.liste);
|
||||||
@ -1393,11 +1394,11 @@ export class RdDActor extends Actor {
|
|||||||
resume += ",";
|
resume += ",";
|
||||||
resume += " une CRITIQUE !";
|
resume += " une CRITIQUE !";
|
||||||
}
|
}
|
||||||
|
return resume;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
resume = "Aucune blessure";
|
return "Aucune blessure";
|
||||||
}
|
}
|
||||||
return resume;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -1515,7 +1516,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
buildTMRInnaccessible() {
|
buildTMRInnaccessible() {
|
||||||
const tmrInnaccessibles = this.filterItemsData(it => Draconique.isCaseTMR(it) &&
|
const tmrInnaccessibles = this.filterItems(it => Draconique.isCaseTMR(it) &&
|
||||||
EffetsDraconiques.isInnaccessible(it));
|
EffetsDraconiques.isInnaccessible(it));
|
||||||
return tmrInnaccessibles.map(it => it.system.coord);
|
return tmrInnaccessibles.map(it => it.system.coord);
|
||||||
}
|
}
|
||||||
@ -1648,8 +1649,11 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
countBlessuresNonSoigneeByName(name) {
|
countBlessuresNonSoigneeByName(name) {
|
||||||
let blessures = this.system.blessures[name].liste;
|
if (this.system.blessures) {
|
||||||
return blessures.filter(b => b.active && !b.psdone).length;
|
let blessures = this.system.blessures[name].liste;
|
||||||
|
return blessures.filter(b => b.active && !b.psdone).length;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -1766,7 +1770,6 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compteur.value = result.newValue;
|
compteur.value = result.newValue;
|
||||||
//console.log(name, inc, data.value, result.newValue, minValue, data.max);
|
|
||||||
// If endurance lost, then the same amount of fatigue cannot be recovered
|
// If endurance lost, then the same amount of fatigue cannot be recovered
|
||||||
if (ReglesOptionelles.isUsing("appliquer-fatigue") && sante.fatigue && fatigue > 0) {
|
if (ReglesOptionelles.isUsing("appliquer-fatigue") && sante.fatigue && fatigue > 0) {
|
||||||
sante.fatigue.value = Math.max(sante.fatigue.value + fatigue, this._computeFatigueMin());
|
sante.fatigue.value = Math.max(sante.fatigue.value + fatigue, this._computeFatigueMin());
|
||||||
@ -1948,15 +1951,16 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async consommerNourritureboisson(item, choix = { doses: 1, seForcer: false, supprimerSiZero: false }) {
|
async consommerNourritureboisson(item, choix = { doses: 1, seForcer: false, supprimerSiZero: false }) {
|
||||||
if (itemData.type != 'nourritureboisson') {
|
|
||||||
|
if (item.type != 'nourritureboisson') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (choix.doses > itemData.system.quantite) {
|
if (choix.doses > item.system.quantite) {
|
||||||
ui.notifications.warn(`Il n'y a pas assez de ${itemData.name} pour manger ${choix.doses}`)
|
ui.notifications.warn(`Il n'y a pas assez de ${item.name} pour manger ${choix.doses}`)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this._apprecierCuisine(itemData, choix.seForcer)) {
|
if (!this._apprecierCuisine(item, choix.seForcer)) {
|
||||||
ui.notifications.info(`${this.name} ne n'arrive pas à manger de ${itemData.name}`)
|
ui.notifications.info(`${this.name} ne n'arrive pas à manger de ${item.name}`)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await this.manger(item, choix.doses, { diminuerQuantite: false });
|
await this.manger(item, choix.doses, { diminuerQuantite: false });
|
||||||
@ -1964,10 +1968,10 @@ export class RdDActor extends Actor {
|
|||||||
await item.diminuerQuantite(choix.doses, choix);
|
await item.diminuerQuantite(choix.doses, choix);
|
||||||
}
|
}
|
||||||
|
|
||||||
async _apprecierCuisine(itemData, seForcer) {
|
async _apprecierCuisine(item, seForcer) {
|
||||||
const surmonteExotisme = await this._surmonterExotisme(itemData, seForcer);
|
const surmonteExotisme = await this._surmonterExotisme(item, seForcer);
|
||||||
if (surmonteExotisme) {
|
if (surmonteExotisme) {
|
||||||
await this.apprecier('gout', 'cuisine', itemData.system.qualite, itemData.system.boisson ? "apprécie la boisson" : "apprécie le plat");
|
await this.apprecier('gout', 'cuisine', item.system.qualite, item.system.boisson ? "apprécie la boisson" : "apprécie le plat");
|
||||||
}
|
}
|
||||||
else if (seForcer) {
|
else if (seForcer) {
|
||||||
await this.jetDeMoral('malheureux');
|
await this.jetDeMoral('malheureux');
|
||||||
@ -1979,10 +1983,10 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _surmonterExotisme(itemData) {
|
async _surmonterExotisme(item) {
|
||||||
const exotisme = Math.min(itemData.system.exotisme, itemData.system.qualite, 0);
|
const exotisme = Math.min(item.system.exotisme, item.system.qualite, 0);
|
||||||
if (exotisme < 0) {
|
if (exotisme < 0) {
|
||||||
const rolled = await this.rollCaracCompetence('volonte', 'cuisine', exotisme, { title: `tente de surmonter l'exotisme de ${itemData.name}` });
|
const rolled = await this.rollCaracCompetence('volonte', 'cuisine', exotisme, { title: `tente de surmonter l'exotisme de ${item.name}` });
|
||||||
return rolled.isSuccess;
|
return rolled.isSuccess;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -2007,14 +2011,13 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async boire(item, doses, options = { diminuerQuantite: true }) {
|
async boire(item, doses, options = { diminuerQuantite: true }) {
|
||||||
const itemData = item;
|
const desaltere = item.system.desaltere;
|
||||||
const desaltere = itemData.system.desaltere;
|
|
||||||
if (desaltere > 0) {
|
if (desaltere > 0) {
|
||||||
await this.updateCompteurValue('eau', Misc.keepDecimals(this.system.compteurs.eau.value + desaltere * doses, 1));
|
await this.updateCompteurValue('eau', Misc.keepDecimals(this.system.compteurs.eau.value + desaltere * doses, 1));
|
||||||
}
|
}
|
||||||
if (item.isAlcool()) {
|
if (item.isAlcool()) {
|
||||||
for (let i = 0; i < doses; i++) {
|
for (let i = 0; i < doses; i++) {
|
||||||
await this.saouler(itemData.system.force, item);
|
await this.saouler(item.system.force, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await item.diminuerQuantite(doses, options);
|
await item.diminuerQuantite(doses, options);
|
||||||
@ -2268,7 +2271,6 @@ export class RdDActor extends Actor {
|
|||||||
let tmr = TMRUtility.getTMR(coord);
|
let tmr = TMRUtility.getTMR(coord);
|
||||||
let letfilteredList = []
|
let letfilteredList = []
|
||||||
for (let sort of sortList) {
|
for (let sort of sortList) {
|
||||||
//console.log(sort.name, sort.data.caseTMR.toLowerCase(), sort.data.caseTMRspeciale.toLowerCase(), coord.toLowerCase() );
|
|
||||||
if (sort.system.caseTMR.toLowerCase().includes('variable')) {
|
if (sort.system.caseTMR.toLowerCase().includes('variable')) {
|
||||||
letfilteredList.push(sort);
|
letfilteredList.push(sort);
|
||||||
} else if (sort.system.caseTMRspeciale.toLowerCase().includes('variable')) {
|
} else if (sort.system.caseTMRspeciale.toLowerCase().includes('variable')) {
|
||||||
@ -2575,8 +2577,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async creerTacheDepuisLivre(item, options = { renderSheet: true }) {
|
async creerTacheDepuisLivre(item, options = { renderSheet: true }) {
|
||||||
const itemData = item
|
const nomTache = "Lire " + item.name;
|
||||||
const nomTache = "Lire " + itemData.name;
|
|
||||||
const filterTacheLecture = it => it.type == 'tache' && it.name == nomTache;
|
const filterTacheLecture = it => it.type == 'tache' && it.name == nomTache;
|
||||||
let tachesExistantes = this.filterItems(filterTacheLecture);
|
let tachesExistantes = this.filterItems(filterTacheLecture);
|
||||||
if (tachesExistantes.length == 0) {
|
if (tachesExistantes.length == 0) {
|
||||||
@ -2585,12 +2586,12 @@ export class RdDActor extends Actor {
|
|||||||
system: {
|
system: {
|
||||||
carac: 'intellect',
|
carac: 'intellect',
|
||||||
competence: 'Ecriture',
|
competence: 'Ecriture',
|
||||||
difficulte: itemData.system.difficulte,
|
difficulte: item.system.difficulte,
|
||||||
periodicite: "60 minutes",
|
periodicite: "60 minutes",
|
||||||
fatigue: 2,
|
fatigue: 2,
|
||||||
points_de_tache: itemData.system.points_de_tache,
|
points_de_tache: item.system.points_de_tache,
|
||||||
points_de_tache_courant: 0,
|
points_de_tache_courant: 0,
|
||||||
description: "Lecture du livre " + item.name + " - XP : " + itemData.system.xp + " - Compétences : " + itemData.system.competence
|
description: "Lecture du livre " + item.name + " - XP : " + item.system.xp + " - Compétences : " + item.system.competence
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await this.createEmbeddedDocuments('Item', [tache], options);
|
await this.createEmbeddedDocuments('Item', [tache], options);
|
||||||
@ -2870,8 +2871,11 @@ export class RdDActor extends Actor {
|
|||||||
if (this.currentTMR) this.currentTMR.minimize(); // Hide
|
if (this.currentTMR) this.currentTMR.minimize(); // Hide
|
||||||
|
|
||||||
let draconicList = this.getDraconicList()
|
let draconicList = this.getDraconicList()
|
||||||
.map(draconic => duplicate(draconic))
|
.map(draconic => {
|
||||||
.map(draconic => { draconic.system.defaut_carac = "intellect"; return draconic; });
|
let draconicLecture = duplicate(draconic);
|
||||||
|
draconicLecture.system.defaut_carac = "intellect";
|
||||||
|
return draconicLecture;
|
||||||
|
});
|
||||||
|
|
||||||
const intellect = this.system.carac.intellect;
|
const intellect = this.system.carac.intellect;
|
||||||
let rollData = {
|
let rollData = {
|
||||||
@ -2989,7 +2993,7 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
checkDesirLancinant() {
|
checkDesirLancinant() {
|
||||||
let queue = this.filterItemsData(it => it.type == 'queue' || it.type == 'ombre')
|
let queue = this.filterItems(it => it.type == 'queue' || it.type == 'ombre')
|
||||||
.filter(it => Grammar.toLowerCaseNoAccent(it.name).includes('desir lancinant'));
|
.filter(it => Grammar.toLowerCaseNoAccent(it.name).includes('desir lancinant'));
|
||||||
return (queue.length > 0);
|
return (queue.length > 0);
|
||||||
}
|
}
|
||||||
@ -3056,23 +3060,23 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async resetNombreAstral(data) {
|
async resetNombreAstral() {
|
||||||
let toDelete = this.listItemsData('nombreastral');
|
let toDelete = this.listItemsData('nombreastral');
|
||||||
const deletions = toDelete.map(it => it._id);
|
const deletions = toDelete.map(it => it._id);
|
||||||
await this.deleteEmbeddedDocuments("Item", deletions);
|
await this.deleteEmbeddedDocuments("Item", deletions);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async ajouteNombreAstral(data) {
|
async ajouteNombreAstral(callData) {
|
||||||
// Gestion expérience (si existante)
|
// Gestion expérience (si existante)
|
||||||
data.competence = this.getCompetence("astrologie")
|
callData.competence = this.getCompetence("astrologie")
|
||||||
data.selectedCarac = this.system.carac["vue"];
|
callData.selectedCarac = this.system.carac["vue"];
|
||||||
this.appliquerAjoutExperience(data, 'hide');
|
this.appliquerAjoutExperience(callData, 'hide');
|
||||||
|
|
||||||
// Ajout du nombre astral
|
// Ajout du nombre astral
|
||||||
const item = {
|
const item = {
|
||||||
name: "Nombre Astral", type: "nombreastral", data:
|
name: "Nombre Astral", type: "nombreastral", system:
|
||||||
{ value: data.nbAstral, istrue: data.isvalid, jourindex: Number(data.date), jourlabel: game.system.rdd.calendrier.getDateFromIndex(Number(data.date)) }
|
{ value: callData.nbAstral, istrue: callData.isvalid, jourindex: Number(callData.date), jourlabel: game.system.rdd.calendrier.getDateFromIndex(Number(callData.date)) }
|
||||||
};
|
};
|
||||||
await this.createEmbeddedDocuments("Item", [item]);
|
await this.createEmbeddedDocuments("Item", [item]);
|
||||||
|
|
||||||
@ -3218,15 +3222,15 @@ export class RdDActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getArmeParade(armeParadeId) {
|
getArmeParade(armeParadeId) {
|
||||||
const item = armeParadeId ? this.getEmbeddedDocument('Item', armeParadeId) : undefined;
|
const item = armeParadeId ? this.getEmbeddedDocument('Item', armeParadeId) : undefined;
|
||||||
return RdDItemArme.getArmeData(item);
|
return RdDItemArme.getArme(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
verifierForceMin(itemData) {
|
verifierForceMin(item) {
|
||||||
if (itemData.type == 'arme' && itemData.system.force > this.system.carac.force.value) {
|
if (item.type == 'arme' && item.system.force > this.system.carac.force.value) {
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
content: `<strong>${this.name} s'est équipé(e) de l'arme ${itemData.name}, mais n'a pas une force suffisante pour l'utiliser normalement </strong>
|
content: `<strong>${this.name} s'est équipé(e) de l'arme ${item.name}, mais n'a pas une force suffisante pour l'utiliser normalement </strong>
|
||||||
(${itemData.system.force} nécessaire pour une Force de ${this.system.carac.force.value})`
|
(${item.system.force} nécessaire pour une Force de ${this.system.carac.force.value})`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3251,10 +3255,10 @@ export class RdDActor extends Actor {
|
|||||||
let armeData = attackerRoll.arme;
|
let armeData = attackerRoll.arme;
|
||||||
let protection = 0;
|
let protection = 0;
|
||||||
const armures = this.items.filter(it => it.type == "armure" && it.system.equipe);
|
const armures = this.items.filter(it => it.type == "armure" && it.system.equipe);
|
||||||
for (const itemData of armures) {
|
for (const armure of armures) {
|
||||||
protection += await RdDDice.rollTotal(itemData.system.protection.toString());
|
protection += await RdDDice.rollTotal(armure.system.protection.toString());
|
||||||
if (dmg > 0) {
|
if (dmg > 0) {
|
||||||
this._deteriorerArmure(itemData, dmg);
|
this._deteriorerArmure(armure, dmg);
|
||||||
dmg = 0;
|
dmg = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3273,39 +3277,39 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
_deteriorerArmure(item, dmg) {
|
_deteriorerArmure(armure, dmg) {
|
||||||
let itemData = duplicate(item);
|
armure = duplicate(armure);
|
||||||
if (!ReglesOptionelles.isUsing('deteriorationArmure') || itemData.system.protection == '0') {
|
if (!ReglesOptionelles.isUsing('deteriorationArmure') || armure.system.protection == '0') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
itemData.system.deterioration = (itemData.system.deterioration ?? 0) + dmg;
|
armure.system.deterioration = (armure.system.deterioration ?? 0) + dmg;
|
||||||
if (itemData.system.deterioration >= 10) {
|
if (armure.system.deterioration >= 10) {
|
||||||
itemData.system.deterioration -= 10;
|
armure.system.deterioration -= 10;
|
||||||
let res = /(\d+)?d(\d+)(\-\d+)?/.exec(itemData.system.protection);
|
let res = /(\d+)?d(\d+)(\-\d+)?/.exec(armure.system.protection);
|
||||||
if (res) {
|
if (res) {
|
||||||
let malus = Misc.toInt(res[3]) - 1;
|
let malus = Misc.toInt(res[3]) - 1;
|
||||||
let armure = Misc.toInt(res[2]);
|
let armure = Misc.toInt(res[2]);
|
||||||
if (armure + malus <= 0) {
|
if (armure + malus <= 0) {
|
||||||
itemData.system.protection = 0;
|
armure.system.protection = 0;
|
||||||
} else {
|
} else {
|
||||||
itemData.system.protection = '' + (res[1] ?? '1') + 'd' + armure + malus;
|
armure.system.protection = '' + (res[1] ?? '1') + 'd' + armure + malus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (/\d+/.exec(itemData.system.protection)) {
|
else if (/\d+/.exec(armure.system.protection)) {
|
||||||
itemData.system.protection = "1d" + itemData.system.protection;
|
armure.system.protection = "1d" + armure.system.protection;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui.notifications.warn(`La valeur d'armure de votre ${item.name} est incorrecte`);
|
ui.notifications.warn(`La valeur d'armure de votre ${armure.name} est incorrecte`);
|
||||||
}
|
}
|
||||||
ChatMessage.create({ content: "Votre armure s'est détériorée, elle protège maintenant de " + itemData.system.protection });
|
ChatMessage.create({ content: "Votre armure s'est détériorée, elle protège maintenant de " + armure.system.protection });
|
||||||
}
|
}
|
||||||
this.updateEmbeddedDocuments('Item', [itemData]);
|
this.updateEmbeddedDocuments('Item', [armure]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async encaisser() {
|
async encaisser() {
|
||||||
let data = { ajustementsEncaissement: RdDUtility.getAjustementsEncaissement() };
|
let dialogData = { ajustementsEncaissement: RdDUtility.getAjustementsEncaissement() };
|
||||||
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-encaisser.html', data);
|
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-encaisser.html', dialogData);
|
||||||
new RdDEncaisser(html, this).render(true);
|
new RdDEncaisser(html, this).render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3486,8 +3490,8 @@ export class RdDActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/** @override */
|
/** @override */
|
||||||
getRollData() {
|
getRollData() {
|
||||||
const data = super.getRollData();
|
const rollData = super.getRollData();
|
||||||
return data;
|
return rollData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -3578,20 +3582,19 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getFortune() {
|
getFortune() {
|
||||||
let monnaies = Monnaie.filtrerMonnaies(this.items);
|
let monnaies = this.itemTypes['monnaie'];
|
||||||
if (monnaies.length < 4) {
|
if (monnaies.length < 4) {
|
||||||
ui.notifications.error("Problème de monnaies manquantes, impossible de payer correctement!")
|
ui.notifications.error("Problème de monnaies manquantes, impossible de payer correctement!")
|
||||||
throw "Problème de monnaies manquantes, impossible de payer correctement!";
|
throw "Problème de monnaies manquantes, impossible de payer correctement!";
|
||||||
}
|
}
|
||||||
return monnaies.map(m => this.system)
|
return monnaies.map(m => Number(m.system.valeur_deniers) * Number(m.system.quantite))
|
||||||
.map(tpl => tpl.valeur_deniers * Number(tpl.quantite))
|
|
||||||
.reduce(Misc.sum(), 0);
|
.reduce(Misc.sum(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async optimizeArgent(fortuneTotale) {
|
async optimizeArgent(fortuneTotale) {
|
||||||
let monnaies = Monnaie.filtrerMonnaies(this.items);
|
let monnaies = this.itemTypes['monnaie'];
|
||||||
let parValeur = Misc.classifyFirst(monnaies, it => this.system.valeur_deniers);
|
let parValeur = Misc.classifyFirst(monnaies, it => it.system.valeur_deniers);
|
||||||
let nouvelleFortune = {
|
let nouvelleFortune = {
|
||||||
1000: Math.floor(fortuneTotale / 1000), // or
|
1000: Math.floor(fortuneTotale / 1000), // or
|
||||||
100: Math.floor(fortuneTotale / 100) % 10, // argent
|
100: Math.floor(fortuneTotale / 100) % 10, // argent
|
||||||
@ -3716,7 +3719,7 @@ export class RdDActor extends Actor {
|
|||||||
const buttonAcheter = html.find(".button-acheter")[0];
|
const buttonAcheter = html.find(".button-acheter")[0];
|
||||||
const vente = DialogItemAchat.prepareVenteData(buttonAcheter, achat.vendeurId, vendeur, acheteur);
|
const vente = DialogItemAchat.prepareVenteData(buttonAcheter, achat.vendeurId, vendeur, acheteur);
|
||||||
const itemId = vente.item._id;
|
const itemId = vente.item._id;
|
||||||
const isItemEmpilable = "quantite" in vente.item.data;
|
const isItemEmpilable = "quantite" in vente.item.system;
|
||||||
|
|
||||||
const coutDeniers = Math.floor((achat.prixTotal ?? 0) * 100);
|
const coutDeniers = Math.floor((achat.prixTotal ?? 0) * 100);
|
||||||
achat.quantiteTotal = (achat.choix.nombreLots ?? 1) * (vente.tailleLot);
|
achat.quantiteTotal = (achat.choix.nombreLots ?? 1) * (vente.tailleLot);
|
||||||
@ -3748,7 +3751,7 @@ export class RdDActor extends Actor {
|
|||||||
type: vente.item.type,
|
type: vente.item.type,
|
||||||
img: vente.item.img,
|
img: vente.item.img,
|
||||||
name: vente.item.name,
|
name: vente.item.name,
|
||||||
data: mergeObject(vente.item.system, { quantite: isItemEmpilable ? achat.quantiteTotal : undefined }),
|
system: mergeObject(vente.item.system, { quantite: isItemEmpilable ? achat.quantiteTotal : undefined }),
|
||||||
}
|
}
|
||||||
let listeAchat = isItemEmpilable ? [achatData] : Array.from({ length: achat.quantiteTotal }, (_, i) => achatData)
|
let listeAchat = isItemEmpilable ? [achatData] : Array.from({ length: achat.quantiteTotal }, (_, i) => achatData)
|
||||||
let items = await acheteur.createEmbeddedDocuments("Item", listeAchat)
|
let items = await acheteur.createEmbeddedDocuments("Item", listeAchat)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||||
|
|
||||||
export const MESSAGE_DATA = 'message-data';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class providing helper methods to get the list of users, and
|
* Class providing helper methods to get the list of users, and
|
||||||
@ -19,61 +18,50 @@ export class ChatUtility {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static notifyUser(userId, level = 'info', message) {
|
static notifyUser(userId, level = 'info', message) {
|
||||||
const data = {
|
const socketData = {
|
||||||
userId: userId, level: level, message: message
|
userId: userId, level: level, message: message
|
||||||
};
|
};
|
||||||
if (game.user.id == userId) {
|
if (game.user.id == userId) {
|
||||||
ChatUtility.onNotifyUser(data);
|
ChatUtility.onNotifyUser(socketData);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
game.socket.emit(SYSTEM_SOCKET_ID, {
|
game.socket.emit(SYSTEM_SOCKET_ID, {
|
||||||
msg: "msg_user_ui_notifications", data: data
|
msg: "msg_user_ui_notifications", data: socketData
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static onNotifyUser(data) {
|
static onNotifyUser(socketData) {
|
||||||
if (game.user.id == data.userId) {
|
if (game.user.id == socketData.userId) {
|
||||||
switch (data.level) {
|
switch (socketData.level) {
|
||||||
case 'warn': ui.notifications.warn(data.message); break;
|
case 'warn': ui.notifications.warn(socketData.message); break;
|
||||||
case 'error': ui.notifications.error(data.message); break;
|
case 'error': ui.notifications.error(socketData.message); break;
|
||||||
default: ui.notifications.info(data.message); break;
|
default: ui.notifications.info(socketData.message); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static onRemoveMessages(data) {
|
static onRemoveMessages(socketData) {
|
||||||
if (Misc.isUniqueConnectedGM()) {
|
if (Misc.isUniqueConnectedGM()) {
|
||||||
if (data.part) {
|
if (socketData.part) {
|
||||||
const toDelete = game.messages.filter(it => it.data.content.includes(data.part));
|
const toDelete = game.messages.filter(it => it.content.includes(socketData.part));
|
||||||
toDelete.forEach(it => it.delete());
|
toDelete.forEach(it => it.delete());
|
||||||
}
|
}
|
||||||
if (data.messageId) {
|
if (socketData.messageId) {
|
||||||
game.messages.get(data.messageId)?.delete();
|
game.messages.get(socketData.messageId)?.delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static onRemoveMessages(data) {
|
|
||||||
if (Misc.isUniqueConnectedGM()) {
|
|
||||||
if (data.part) {
|
|
||||||
const toDelete = game.messages.filter(it => it.content.includes(data.part));
|
|
||||||
toDelete.forEach(it => it.delete());
|
|
||||||
}
|
|
||||||
if (data.messageId) {
|
|
||||||
game.messages.get(data.messageId)?.delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
static removeMessages(data) {
|
static removeMessages(socketData) {
|
||||||
if (Misc.isUniqueConnectedGM()) {
|
if (Misc.isUniqueConnectedGM()) {
|
||||||
ChatUtility.onRemoveMessages(data);
|
ChatUtility.onRemoveMessages(socketData);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
game.socket.emit(SYSTEM_SOCKET_ID, { msg: "msg_delete_chat_message", data: data });
|
game.socket.emit(SYSTEM_SOCKET_ID, { msg: "msg_delete_chat_message", data: socketData });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,17 +142,17 @@ export class ChatUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static handleGMChatMessage(data) {
|
static handleGMChatMessage(socketData) {
|
||||||
console.log("blindMessageToGM", data);
|
console.log("blindMessageToGM", socketData);
|
||||||
if (game.user.isGM) { // message privé pour GM only
|
if (game.user.isGM) { // message privé pour GM only
|
||||||
data.user = game.user.id;
|
socketData.user = game.user.id;
|
||||||
ChatMessage.create(data);
|
ChatMessage.create(socketData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static async setMessageData(chatMessage, key, data) {
|
static async setMessageData(chatMessage, key, flag) {
|
||||||
if (data) {
|
if (flag) {
|
||||||
await chatMessage.setFlag(SYSTEM_RDD, key, JSON.stringify(data));
|
await chatMessage.setFlag(SYSTEM_RDD, key, JSON.stringify(flag));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ export class DialogCreateSigneDraconique extends Dialog {
|
|||||||
|
|
||||||
async setEphemere(ephemere) {
|
async setEphemere(ephemere) {
|
||||||
this.dialogData.signe.system.ephemere = ephemere;
|
this.dialogData.signe.system.ephemere = ephemere;
|
||||||
HtmlUtility._showControlWhen($(".signe-data-duree"), ephemere);
|
HtmlUtility._showControlWhen($(".signe-system-duree"), ephemere);
|
||||||
}
|
}
|
||||||
|
|
||||||
async onSelectActor(event) {
|
async onSelectActor(event) {
|
||||||
|
@ -38,22 +38,22 @@ export class DialogConsommer extends Dialog {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static prepareData(actor, item) {
|
static prepareData(actor, item) {
|
||||||
const itemData = duplicate(item);
|
item = duplicate(item);
|
||||||
let consommerData = {
|
let consommerData = {
|
||||||
item: itemData,
|
item: item,
|
||||||
cuisine: actor.getCompetence('cuisine'),
|
cuisine: actor.getCompetence('cuisine'),
|
||||||
choix: {
|
choix: {
|
||||||
doses: 1,
|
doses: 1,
|
||||||
seForcer: false,
|
seForcer: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (itemData.type) {
|
switch (item.type) {
|
||||||
case 'nourritureboisson':
|
case 'nourritureboisson':
|
||||||
consommerData.title = itemData.system.boisson ? `${itemData.name}: boire une dose` : `${itemData.name}: manger une portion`;
|
consommerData.title = item.system.boisson ? `${item.name}: boire une dose` : `${item.name}: manger une portion`;
|
||||||
consommerData.buttonName = itemData.system.boisson ? "Boire" : "Manger";
|
consommerData.buttonName = item.system.boisson ? "Boire" : "Manger";
|
||||||
break;
|
break;
|
||||||
case 'potion':
|
case 'potion':
|
||||||
consommerData.title = `${itemData.name}: boire la potion`;
|
consommerData.title = `${item.name}: boire la potion`;
|
||||||
consommerData.buttonName = "Boire";
|
consommerData.buttonName = "Boire";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -61,11 +61,11 @@ export class DialogConsommer extends Dialog {
|
|||||||
return consommerData;
|
return consommerData;
|
||||||
}
|
}
|
||||||
|
|
||||||
static calculDoses(consommerData) {
|
static calculDoses(consommer) {
|
||||||
const doses = consommerData.choix.doses;
|
const doses = consommer.choix.doses;
|
||||||
consommerData.totalSust = Misc.keepDecimals(doses * (consommerData.item.system.sust ?? 0), 2);
|
consommer.totalSust = Misc.keepDecimals(doses * (consommer.item.system.sust ?? 0), 2);
|
||||||
consommerData.totalDesaltere = consommerData.item.system.boisson
|
consommer.totalDesaltere = consommer.item.system.boisson
|
||||||
? Misc.keepDecimals(doses * (consommerData.item.system.desaltere ?? 0), 2)
|
? Misc.keepDecimals(doses * (consommer.item.system.desaltere ?? 0), 2)
|
||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,15 +4,14 @@ import { Misc } from "./misc.js";
|
|||||||
export class DialogItemVente extends Dialog {
|
export class DialogItemVente extends Dialog {
|
||||||
|
|
||||||
static async create(item, callback) {
|
static async create(item, callback) {
|
||||||
const itemData = item
|
const quantite = item.isConteneur() ? 1 : item.system.quantite;
|
||||||
const quantite = item.isConteneur() ? 1 : itemData.system.quantite;
|
|
||||||
const venteData = {
|
const venteData = {
|
||||||
item: itemData,
|
item: item,
|
||||||
alias: item.actor?.name ?? game.user.name,
|
alias: item.actor?.name ?? game.user.name,
|
||||||
vendeurId: item.actor?.id,
|
vendeurId: item.actor?.id,
|
||||||
prixOrigine: itemData.system.cout,
|
prixOrigine: item.system.cout,
|
||||||
prixUnitaire: itemData.system.cout,
|
prixUnitaire: item.system.cout,
|
||||||
prixLot: itemData.system.cout,
|
prixLot: item.system.cout,
|
||||||
tailleLot: 1,
|
tailleLot: 1,
|
||||||
quantiteNbLots: quantite,
|
quantiteNbLots: quantite,
|
||||||
quantiteMaxLots: quantite,
|
quantiteMaxLots: quantite,
|
||||||
|
@ -3,10 +3,9 @@ import { Misc } from "./misc.js";
|
|||||||
export class DialogSplitItem extends Dialog {
|
export class DialogSplitItem extends Dialog {
|
||||||
|
|
||||||
static async create(item, callback) {
|
static async create(item, callback) {
|
||||||
const itemData = item
|
|
||||||
const splitData = {
|
const splitData = {
|
||||||
item: itemData,
|
item: item,
|
||||||
choix: { quantite: 1, max: itemData.system.quantite - 1 }
|
choix: { quantite: 1, max: item.system.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)
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
/* -------------------------------------------- */
|
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
// Activate chat listeners defined
|
|
||||||
// Hooks.on('renderChatLog', (log, html, data) => {
|
|
||||||
// RdDUtility.chatListeners(html);
|
|
||||||
// });
|
|
||||||
|
|
@ -19,18 +19,16 @@ const nomCategorieParade = {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class RdDItemArme extends Item {
|
export class RdDItemArme extends Item {
|
||||||
|
|
||||||
static isArme(itemData) {
|
static isArme(item) {
|
||||||
itemData = itemData
|
return (item.type == 'competencecreature' && item.system.iscombat) || item.type == 'arme';
|
||||||
return (itemData.type == 'competencecreature' && itemData.system.iscombat) || itemData.type == 'arme';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static getArmeData(armeData) {
|
static getArme(arme) {
|
||||||
armeData = armeData
|
switch (arme ? arme.type : '') {
|
||||||
switch (armeData ? armeData.type : '') {
|
case 'arme': return arme;
|
||||||
case 'arme': return armeData;
|
|
||||||
case 'competencecreature':
|
case 'competencecreature':
|
||||||
return RdDItemCompetenceCreature.toActionArme(armeData);
|
return RdDItemCompetenceCreature.toActionArme(arme);
|
||||||
}
|
}
|
||||||
return RdDItemArme.mainsNues();
|
return RdDItemArme.mainsNues();
|
||||||
}
|
}
|
||||||
@ -160,17 +158,18 @@ export class RdDItemArme extends Item {
|
|||||||
return armeData;
|
return armeData;
|
||||||
}
|
}
|
||||||
|
|
||||||
static isArmeUtilisable(itemData) {
|
static isArmeUtilisable(arme) {
|
||||||
return itemData.type == 'arme' && itemData.system.equipe && (itemData.system.resistance > 0 || itemData.system.portee_courte > 0);
|
return arme.type == 'arme' && arme.system.equipe && (arme.system.resistance > 0 || arme.system.portee_courte > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ajoutCorpsACorps(armes, competences, carac) {
|
static ajoutCorpsACorps(armes, competences, carac) {
|
||||||
let corpsACorps = competences.find(it => it.name == 'Corps à corps') ?? { system: { niveau: -6 } };
|
let corpsACorps = competences.find(it => it.name == 'Corps à corps') ?? { system: { niveau: -6 } };
|
||||||
let init = RdDCombatManager.calculInitiative(corpsACorps.system.niveau, carac['melee'].value);
|
let init = RdDCombatManager.calculInitiative(corpsACorps.system.niveau, carac['melee'].value);
|
||||||
armes.push(RdDItemArme.mainsNues({ niveau: corpsACorps.system.niveau, initiative: init }));
|
armes.push(RdDItemArme.mainsNues({ niveau: corpsACorps.system.niveau, initiative: init }));
|
||||||
|
//armes.push(RdDItemArme.empoignade({ niveau: corpsACorps.system.niveau, initiative: init }));
|
||||||
}
|
}
|
||||||
|
|
||||||
static corpsACorps(actorData) {
|
static corpsACorps(mainsNuesActor) {
|
||||||
const corpsACorps = {
|
const corpsACorps = {
|
||||||
name: 'Corps à corps',
|
name: 'Corps à corps',
|
||||||
img: 'systems/foundryvtt-reve-de-dragon/icons/competence_corps_a_corps.webp',
|
img: 'systems/foundryvtt-reve-de-dragon/icons/competence_corps_a_corps.webp',
|
||||||
@ -185,20 +184,20 @@ export class RdDItemArme extends Item {
|
|||||||
categorie_parade: 'sans-armes'
|
categorie_parade: 'sans-armes'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mergeObject(corpsACorps.system, actorData ?? {}, { overwrite: false });
|
mergeObject(corpsACorps.system, mainsNuesActor ?? {}, { overwrite: false });
|
||||||
return corpsACorps;
|
return corpsACorps;
|
||||||
}
|
}
|
||||||
|
|
||||||
static mainsNues(actorData) {
|
static mainsNues(mainsNuesActor) {
|
||||||
const mainsNues = RdDItemArme.corpsACorps(actorData)
|
const mainsNues = RdDItemArme.corpsACorps(mainsNuesActor)
|
||||||
mainsNues.name = 'Mains nues'
|
mainsNues.name = 'Mains nues'
|
||||||
mainsNues.system.cac = 'pugilat'
|
mainsNues.system.cac = 'pugilat'
|
||||||
mainsNues.system.baseInit = 4
|
mainsNues.system.baseInit = 4
|
||||||
return mainsNues;
|
return mainsNues;
|
||||||
}
|
}
|
||||||
|
|
||||||
static empoignade(actorData) {
|
static empoignade(mainsNuesActor) {
|
||||||
const empoignade = RdDItemArme.corpsACorps(actorData)
|
const empoignade = RdDItemArme.corpsACorps(mainsNuesActor)
|
||||||
empoignade.name = 'Empoignade'
|
empoignade.name = 'Empoignade'
|
||||||
empoignade.system.cac = 'empoignade'
|
empoignade.system.cac = 'empoignade'
|
||||||
empoignade.system.baseInit = 3
|
empoignade.system.baseInit = 3
|
||||||
|
@ -195,17 +195,17 @@ export class RdDItemCompetence extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static isVisible(itemData) {
|
static isVisible(item) {
|
||||||
return Number(itemData.system.niveau) != RdDItemCompetence.getNiveauBase(itemData.system.categorie);
|
return Number(item.system.niveau) != RdDItemCompetence.getNiveauBase(item.system.categorie);
|
||||||
}
|
}
|
||||||
|
|
||||||
static nomContientTexte(itemData, texte) {
|
static nomContientTexte(item, texte) {
|
||||||
return Grammar.toLowerCaseNoAccent(itemData.name).includes(Grammar.toLowerCaseNoAccent(texte))
|
return Grammar.toLowerCaseNoAccent(item.name).includes(Grammar.toLowerCaseNoAccent(texte))
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static isNiveauBase(itemData) {
|
static isNiveauBase(item) {
|
||||||
return Number(itemData.system.niveau) == RdDItemCompetence.getNiveauBase(itemData.system.categorie);
|
return Number(item.system.niveau) == RdDItemCompetence.getNiveauBase(item.system.categorie);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -38,14 +38,12 @@ export class RdDItemCompetenceCreature extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static isCompetenceAttaque(itemData) {
|
static isCompetenceAttaque(item) {
|
||||||
itemData = itemData
|
return item.type == 'competencecreature' && item.system.iscombat;
|
||||||
return itemData.type == 'competencecreature' && itemData.system.iscombat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static isCompetenceParade(itemData) {
|
static isCompetenceParade(item) {
|
||||||
itemData = itemData
|
return item.type == 'competencecreature' && item.system.isparade;
|
||||||
return itemData.type == 'competencecreature' && itemData.system.isparade;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
|
|
||||||
const monnaiesData = [
|
const MONNAIES_STANDARD = [
|
||||||
{
|
{
|
||||||
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",
|
||||||
@ -26,27 +26,28 @@ const monnaiesData = [
|
|||||||
export class Monnaie {
|
export class Monnaie {
|
||||||
|
|
||||||
static isSystemMonnaie(item) {
|
static isSystemMonnaie(item) {
|
||||||
let present = monnaiesData.find(monnaie => monnaie.system.valeur_deniers == item?.system?.valeur_deniers);
|
let present = MONNAIES_STANDARD.find(monnaie => monnaie.system.valeur_deniers == item?.system?.valeur_deniers);
|
||||||
return present;
|
return present;
|
||||||
}
|
}
|
||||||
|
|
||||||
static monnaiesData() {
|
static monnaiesData() {
|
||||||
return monnaiesData;
|
return MONNAIES_STANDARD;
|
||||||
}
|
}
|
||||||
|
|
||||||
static filtrerMonnaies(items) {
|
static filtrerMonnaies(items) {
|
||||||
return items.filter(it => it.type == 'monnaie');
|
return items.filter(it => it.type == 'monnaie');
|
||||||
}
|
}
|
||||||
|
|
||||||
static monnaiesManquantes(items) {
|
static monnaiesManquantes(disponibles) {
|
||||||
const valeurs = Monnaie.filtrerMonnaies(items)
|
const manquantes = MONNAIES_STANDARD.filter(standard => !disponibles.find(disponible => Monnaie.deValeur(disponible, standard.system?.valeur_deniers)));
|
||||||
.map(it => it.system.valeur_deniers);
|
if (manquantes.length>0) {
|
||||||
const manquantes = monnaiesData.filter(monnaie => !valeurs.find(v => v != monnaie.system?.valeur_deniers))
|
console.error('monnaiesManquantes', manquantes, ' avec monnaies', disponibles, MONNAIES_STANDARD);
|
||||||
|
}
|
||||||
return []; //manquantes;
|
return []; //manquantes;
|
||||||
}
|
}
|
||||||
|
|
||||||
static deValeur(monnaie, v) {
|
static deValeur(monnaie, valeur) {
|
||||||
return v != monnaie.system.valeur_deniers
|
return valeur == monnaie.system.valeur_deniers
|
||||||
}
|
}
|
||||||
|
|
||||||
static arrondiDeniers(sols) {
|
static arrondiDeniers(sols) {
|
||||||
|
@ -32,7 +32,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
let buttons = super._getHeaderButtons();
|
let buttons = super._getHeaderButtons();
|
||||||
// Add "Post to chat" button
|
// Add "Post to chat" button
|
||||||
// We previously restricted this to GM and editable items only. If you ever find this comment because it broke something: eh, sorry!
|
// We previously restricted this to GM and editable items only. If you ever find this comment because it broke something: eh, sorry!
|
||||||
if ("cout" in this.object.system && this.object.isVideOuNonConteneur()) {
|
if ("cout" in this.item.system && this.item.isVideOuNonConteneur()) {
|
||||||
buttons.unshift({
|
buttons.unshift({
|
||||||
class: "vendre",
|
class: "vendre",
|
||||||
icon: "fas fa-comments-dollar",
|
icon: "fas fa-comments-dollar",
|
||||||
@ -61,22 +61,24 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getData() {
|
async getData() {
|
||||||
let formData = {
|
let formData = {
|
||||||
id: this.object.id,
|
id: this.item.id,
|
||||||
title: this.object.name,
|
title: this.item.name,
|
||||||
type: this.object.type,
|
type: this.item.type,
|
||||||
img: this.object.img,
|
img: this.item.img,
|
||||||
name: this.object.name,
|
name: this.item.name,
|
||||||
data: this.object.system,
|
system: this.item.system,
|
||||||
|
// TODO: v10 remove
|
||||||
|
data: this.item.system,
|
||||||
isGM: game.user.isGM,
|
isGM: game.user.isGM,
|
||||||
actorId: this.actor?.id,
|
actorId: this.actor?.id,
|
||||||
owner: this.document.isOwner,
|
owner: this.item.isOwner,
|
||||||
editable: this.isEditable,
|
editable: this.isEditable,
|
||||||
cssClass: this.isEditable ? "editable" : "locked",
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
isSoins: false
|
isSoins: false
|
||||||
}
|
}
|
||||||
if (this.actor) {
|
if (this.actor) {
|
||||||
formData.isOwned = true;
|
formData.isOwned = true;
|
||||||
if (this.object.type == 'conteneur') {
|
if (this.item.type == 'conteneur') {
|
||||||
this.prepareConteneurData(formData);
|
this.prepareConteneurData(formData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -92,15 +94,15 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
console.log(formData.competences)
|
console.log(formData.competences)
|
||||||
}
|
}
|
||||||
if (formData.type == 'recettealchimique') {
|
if (formData.type == 'recettealchimique') {
|
||||||
RdDAlchimie.processManipulation(this.object, this.actor && this.actor.id);
|
RdDAlchimie.processManipulation(this.item, this.actor && this.actor.id);
|
||||||
}
|
}
|
||||||
if (formData.type == 'gemme') {
|
if (formData.type == 'gemme') {
|
||||||
formData.gemmeTypeList = RdDGemme.getGemmeTypeOptionList();
|
formData.gemmeTypeList = RdDGemme.getGemmeTypeOptionList();
|
||||||
RdDGemme.calculDataDerivees(formData.data);
|
RdDGemme.calculDataDerivees(this.item);
|
||||||
}
|
}
|
||||||
if (formData.type == 'potion') {
|
if (formData.type == 'potion') {
|
||||||
if (this.dateUpdated) {
|
if (this.dateUpdated) {
|
||||||
formData.data.prdate = this.dateUpdated;
|
formData.system.prdate = this.dateUpdated;
|
||||||
this.dateUpdated = undefined;
|
this.dateUpdated = undefined;
|
||||||
}
|
}
|
||||||
RdDHerbes.updatePotionData(formData);
|
RdDHerbes.updatePotionData(formData);
|
||||||
@ -119,7 +121,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
RdDUtility.filterEquipementParType(formData)
|
RdDUtility.filterEquipementParType(formData)
|
||||||
|
|
||||||
this.objetVersConteneur = RdDUtility.buildArbreDeConteneurs(formData.conteneurs, formData.objets);
|
this.objetVersConteneur = RdDUtility.buildArbreDeConteneurs(formData.conteneurs, formData.objets);
|
||||||
formData.subItems = formData.conteneurs.find(it => it._id == this.object.id)?.subItems;
|
formData.subItems = formData.conteneurs.find(it => it._id == this.item.id)?.subItems;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,15 +130,15 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
if (this.object.type == 'conteneur') {
|
if (this.item.type == 'conteneur') {
|
||||||
this.form.ondragstart = (event) => this._onDragStart(event);
|
this.form.ondragstart = (event) => this._onDragStart(event);
|
||||||
this.form.ondrop = (event) => this._onDrop(event);
|
this.form.ondrop = (event) => this._onDrop(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
let itemSheetDialog = this;
|
let itemSheetDialog = this;
|
||||||
|
|
||||||
HtmlUtility._showControlWhen($(".item-cout"), ReglesOptionelles.isUsing('afficher-prix-joueurs') || game.user.isGM || !this.object.isOwned);
|
HtmlUtility._showControlWhen($(".item-cout"), ReglesOptionelles.isUsing('afficher-prix-joueurs') || game.user.isGM || !this.item.isOwned);
|
||||||
HtmlUtility._showControlWhen($(".item-magique"), this.object.isMagique());
|
HtmlUtility._showControlWhen($(".item-magique"), this.item.isMagique());
|
||||||
|
|
||||||
// Everything below here is only needed if the sheet is editable
|
// Everything below here is only needed if the sheet is editable
|
||||||
if (!this.options.editable) return;
|
if (!this.options.editable) return;
|
||||||
@ -145,8 +147,8 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
html.find(".categorie").change(event => this._onSelectCategorie(event));
|
html.find(".categorie").change(event => this._onSelectCategorie(event));
|
||||||
|
|
||||||
html.find('.sheet-competence-xp').change((event) => {
|
html.find('.sheet-competence-xp').change((event) => {
|
||||||
if (this.object.type == 'competence') {
|
if (this.item.type == 'competence') {
|
||||||
RdDUtility.checkThanatosXP(this.object.name);
|
RdDUtility.checkThanatosXP(this.item.name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -219,16 +221,16 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
async _onSelectCategorie(event) {
|
async _onSelectCategorie(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
if (this.object.isCompetence()) {
|
if (this.item.isCompetence()) {
|
||||||
let level = RdDItemCompetence.getNiveauBase(event.currentTarget.value);
|
let level = RdDItemCompetence.getNiveauBase(event.currentTarget.value);
|
||||||
this.object.system.base = level;
|
this.item.system.base = level;
|
||||||
$("#base").val(level);
|
$("#base").val(level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
get template() {
|
get template() {
|
||||||
let type = this.object.type
|
let type = this.item.type
|
||||||
return `systems/foundryvtt-reve-de-dragon/templates/item-${type}-sheet.html`;
|
return `systems/foundryvtt-reve-de-dragon/templates/item-${type}-sheet.html`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +241,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
// Données de bonus de cases ?
|
// Données de bonus de cases ?
|
||||||
formData = RdDItemSort.buildBonusCaseStringFromFormData(formData);
|
formData = RdDItemSort.buildBonusCaseStringFromFormData(formData);
|
||||||
|
|
||||||
return this.object.update(formData);
|
return this.item.update(formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
async _onDragStart(event) {
|
async _onDragStart(event) {
|
||||||
@ -252,28 +254,28 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
const dragData = {
|
const dragData = {
|
||||||
actorId: this.actor.id,
|
actorId: this.actor.id,
|
||||||
type: "Item",
|
type: "Item",
|
||||||
data: item
|
data: item.system
|
||||||
};
|
};
|
||||||
|
|
||||||
event.dataTransfer.setData("text/plain", JSON.stringify(dragData));
|
event.dataTransfer.setData("text/plain", JSON.stringify(dragData));
|
||||||
}
|
}
|
||||||
|
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
// Try to extract the data
|
// Try to extract the dragData
|
||||||
let data;
|
let dragData;
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(event.dataTransfer.getData('text/plain'));
|
dragData = JSON.parse(event.dataTransfer.getData('text/plain'));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const allowed = Hooks.call("dropActorSheetData", this.actor, this, data);
|
const allowed = Hooks.call("dropActorSheetData", this.actor, this, dragData);
|
||||||
if (allowed === false) return;
|
if (allowed === false) return;
|
||||||
|
|
||||||
// Handle different data types
|
// Handle different dragData types
|
||||||
switch (data.type) {
|
switch (dragData.type) {
|
||||||
case "Item":
|
case "Item":
|
||||||
return this._onDropItem(event, data);
|
return this._onDropItem(event, dragData);
|
||||||
}
|
}
|
||||||
return super._onDrop(event);
|
return super._onDrop(event);
|
||||||
}
|
}
|
||||||
@ -281,7 +283,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onDropItem(event, dragData) {
|
async _onDropItem(event, dragData) {
|
||||||
if (this.actor) {
|
if (this.actor) {
|
||||||
const dropParams = RdDSheetUtility.prepareItemDropParameters(this.object.id, this.actor.id, dragData, this.objetVersConteneur);
|
const dropParams = RdDSheetUtility.prepareItemDropParameters(this.item.id, this.actor.id, dragData, this.objetVersConteneur);
|
||||||
await this.actor.processDropItem(dropParams);
|
await this.actor.processDropItem(dropParams);
|
||||||
await this.render(true);
|
await this.render(true);
|
||||||
}
|
}
|
||||||
|
@ -40,17 +40,17 @@ export class RdDSigneDraconiqueItemSheet extends ItemSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getData() {
|
async getData() {
|
||||||
const formData = duplicate(this.object);
|
const formData = duplicate(this.item);
|
||||||
mergeObject(formData, {
|
mergeObject(formData, {
|
||||||
title: formData.name,
|
title: formData.name,
|
||||||
isGM: game.user.isGM,
|
isGM: game.user.isGM,
|
||||||
owner: this.document.isOwner,
|
owner: this.actor.isOwner,
|
||||||
isOwned: this.actor ? true : false,
|
isOwned: this.actor ? true : false,
|
||||||
actorId: this.actor?.id,
|
actorId: this.actor?.id,
|
||||||
editable: this.isEditable,
|
editable: this.isEditable,
|
||||||
cssClass: this.isEditable ? "editable" : "locked",
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
});
|
});
|
||||||
formData.tmrs = TMRUtility.listSelectedTMR(formData.data.typesTMR ?? []);
|
formData.tmrs = TMRUtility.listSelectedTMR(formData.system.typesTMR ?? []);
|
||||||
return formData;
|
return formData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,21 +68,21 @@ export class RdDSigneDraconiqueItemSheet extends ItemSheet {
|
|||||||
|
|
||||||
async setSigneAleatoire() {
|
async setSigneAleatoire() {
|
||||||
const newSigne = await RdDItemSigneDraconique.randomSigneDraconique();
|
const newSigne = await RdDItemSigneDraconique.randomSigneDraconique();
|
||||||
this.object.update(newSigne);
|
this.item.update(newSigne);
|
||||||
}
|
}
|
||||||
|
|
||||||
async onSelectTmr(event) {
|
async onSelectTmr(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const selectedTMR = $(".select-tmr").val();
|
const selectedTMR = $(".select-tmr").val();
|
||||||
this.object.update({ 'data.typesTMR': selectedTMR });
|
this.item.update({ 'system.typesTMR': selectedTMR });
|
||||||
}
|
}
|
||||||
|
|
||||||
async onValeurXpSort(event) {
|
async onValeurXpSort(event) {
|
||||||
const codeReussite = event.currentTarget.attributes['data-typereussite']?.value ?? 0;
|
const codeReussite = event.currentTarget.attributes['data-typereussite']?.value ?? 0;
|
||||||
const xp = Number(event.currentTarget.value);
|
const xp = Number(event.currentTarget.value);
|
||||||
const oldValeur = this.object.system.valeur;
|
const oldValeur = this.item.system.valeur;
|
||||||
const newValeur = RdDItemSigneDraconique.calculValeursXpSort(codeReussite, xp, oldValeur);
|
const newValeur = RdDItemSigneDraconique.calculValeursXpSort(codeReussite, xp, oldValeur);
|
||||||
await this.object.update({ 'data.valeur': newValeur });
|
await this.item.update({ 'system.valeur': newValeur });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -18,12 +18,11 @@ const DIFFICULTE_LECTURE_SIGNE_MANQUE = +11;
|
|||||||
export class RdDItemSigneDraconique {
|
export class RdDItemSigneDraconique {
|
||||||
|
|
||||||
static prepareSigneDraconiqueMeditation(meditation, rolled) {
|
static prepareSigneDraconiqueMeditation(meditation, rolled) {
|
||||||
meditation = meditation
|
|
||||||
return {
|
return {
|
||||||
name: "de la " + meditation.name,
|
name: "de la " + meditation.name,
|
||||||
type: "signedraconique",
|
type: "signedraconique",
|
||||||
img: meditation.img,
|
img: meditation.img,
|
||||||
data: {
|
system: {
|
||||||
typesTMR: [TMRUtility.typeTmrName(meditation.system.tmr)],
|
typesTMR: [TMRUtility.typeTmrName(meditation.system.tmr)],
|
||||||
difficulte: rolled.isSuccess ? RdDItemSigneDraconique.getDiffSigneMeditation(rolled.code) : DIFFICULTE_LECTURE_SIGNE_MANQUE,
|
difficulte: rolled.isSuccess ? RdDItemSigneDraconique.getDiffSigneMeditation(rolled.code) : DIFFICULTE_LECTURE_SIGNE_MANQUE,
|
||||||
ephemere: true,
|
ephemere: true,
|
||||||
@ -75,7 +74,7 @@ export class RdDItemSigneDraconique {
|
|||||||
name: await RdDItemSigneDraconique.randomSigneDescription(),
|
name: await RdDItemSigneDraconique.randomSigneDescription(),
|
||||||
type: "signedraconique",
|
type: "signedraconique",
|
||||||
img: defaultItemImg.signedraconique,
|
img: defaultItemImg.signedraconique,
|
||||||
data: {
|
system: {
|
||||||
typesTMR: await RdDItemSigneDraconique.randomTmrs(modele.nbCases),
|
typesTMR: await RdDItemSigneDraconique.randomTmrs(modele.nbCases),
|
||||||
ephemere: options?.ephemere == undefined ? RdDDice.rollTotal("1d2") == 2 : options.ephemere,
|
ephemere: options?.ephemere == undefined ? RdDDice.rollTotal("1d2") == 2 : options.ephemere,
|
||||||
duree: "1 round",
|
duree: "1 round",
|
||||||
|
@ -59,30 +59,30 @@ export class RdDItemSort extends Item {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/** Met à jour les données de formulaire
|
/** Met à jour les données de formulaire
|
||||||
* si static des bonus de cases sont présents
|
* si static des bonus de cases sont présents
|
||||||
* */
|
* */
|
||||||
static buildBonusCaseStringFromFormData( formData ) {
|
static buildBonusCaseStringFromFormData( formData ) {
|
||||||
if ( formData.bonusValue ) {
|
if ( formData.bonusValue ) {
|
||||||
let list = [];
|
let list = [];
|
||||||
let caseCheck = {};
|
let caseCheck = {};
|
||||||
for(let i=0; i<formData.bonusValue.length; i++) {
|
for(let i=0; i<formData.bonusValue.length; i++) {
|
||||||
let coord = formData.caseValue[i] || 'A1';
|
let coord = formData.caseValue[i] || 'A1';
|
||||||
coord = coord.toUpperCase();
|
coord = coord.toUpperCase();
|
||||||
if ( TMRUtility.verifyTMRCoord( coord ) ) { // Sanity check
|
if ( TMRUtility.verifyTMRCoord( coord ) ) { // Sanity check
|
||||||
let bonus = formData.bonusValue[i] || 0;
|
let bonus = formData.bonusValue[i] || 0;
|
||||||
if ( bonus > 0 && caseCheck[coord] == undefined ) {
|
if ( bonus > 0 && caseCheck[coord] == undefined ) {
|
||||||
caseCheck[coord] = bonus;
|
caseCheck[coord] = bonus;
|
||||||
list.push( coord+":"+bonus );
|
list.push( coord+":"+bonus );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
formData.bonusValue = undefined;
|
|
||||||
formData.caseValue = undefined;
|
|
||||||
formData['data.bonuscase'] = list.toString(); // Reset
|
|
||||||
}
|
}
|
||||||
return formData;
|
formData.bonusValue = undefined;
|
||||||
|
formData.caseValue = undefined;
|
||||||
|
formData.system.bonuscase = list.toString(); // Reset
|
||||||
|
}
|
||||||
|
return formData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -106,7 +106,7 @@ export class RdDItemSort extends Item {
|
|||||||
// Sauvegarde/update
|
// Sauvegarde/update
|
||||||
let bonuscase = StringList.toString();
|
let bonuscase = StringList.toString();
|
||||||
//console.log("Bonus cae :", bonuscase);
|
//console.log("Bonus cae :", bonuscase);
|
||||||
actor.updateEmbeddedDocuments('Item', [{ _id: sort._id, 'data.bonuscase': bonuscase }] );
|
actor.updateEmbeddedDocuments('Item', [{ _id: sort._id, 'system.bonuscase': bonuscase }] );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { DialogItemVente } from "./dialog-item-vente.js";
|
import { DialogItemVente } from "./dialog-item-vente.js";
|
||||||
import { Grammar } from "./grammar.js";
|
import { Grammar } from "./grammar.js";
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
|
import { RdDHerbes } from "./rdd-herbes.js";
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
import { RdDUtility } from "./rdd-utility.js";
|
||||||
|
|
||||||
const typesObjetsEquipement = ["objet", "arme", "armure", "gemme", "conteneur", "herbe", "ingredient", "livre", "potion", "munition", "nourritureboisson", "monnaie"]
|
const typesObjetsEquipement = ["objet", "arme", "armure", "gemme", "conteneur", "herbe", "ingredient", "livre", "potion", "munition", "nourritureboisson", "monnaie"]
|
||||||
@ -41,11 +42,11 @@ export const defaultItemImg = {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class RdDItem extends Item {
|
export class RdDItem extends Item {
|
||||||
|
|
||||||
constructor(data, context) {
|
constructor(itemData, context) {
|
||||||
if (!data.img) {
|
if (!itemData.img) {
|
||||||
data.img = defaultItemImg[data.type];
|
itemData.img = defaultItemImg[itemData.type];
|
||||||
}
|
}
|
||||||
super(data, context);
|
super(itemData, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static getTypeObjetsEquipement() {
|
static getTypeObjetsEquipement() {
|
||||||
@ -126,7 +127,8 @@ export class RdDItem extends Item {
|
|||||||
this.system.magique = categorie.includes('enchante');
|
this.system.magique = categorie.includes('enchante');
|
||||||
if (this.system.magique) {
|
if (this.system.magique) {
|
||||||
if (categorie.includes('soin') || categorie.includes('repos')) {
|
if (categorie.includes('soin') || categorie.includes('repos')) {
|
||||||
this.system.puissance = this.system.herbebonus * this.system.pr;
|
// TODO: utiliser calculePointsRepos / calculePointsGuerison
|
||||||
|
this.system.puissance = RdDHerbes.calculePuissancePotion(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -180,11 +182,11 @@ export class RdDItem extends Item {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui.notifications.notify(`Il ne vous reste plus de ${this.name}, vous pouvez le supprimer de votre équipement, ou trouver un moyen de vous en procurer.`);
|
ui.notifications.notify(`Il ne vous reste plus de ${this.name}, vous pouvez le supprimer de votre équipement, ou trouver un moyen de vous en procurer.`);
|
||||||
await this.update({ "data.quantite": 0 });
|
await this.update({ "system.quantite": 0 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await this.update({ "data.quantite": reste });
|
await this.update({ "system.quantite": reste });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,12 @@ export class RdDAlchimie {
|
|||||||
//console.log("RESULT ", result);
|
//console.log("RESULT ", result);
|
||||||
if (result[1] && result[2]) {
|
if (result[1] && result[2]) {
|
||||||
let commande = Misc.upperFirst(result[1]);
|
let commande = Misc.upperFirst(result[1]);
|
||||||
let replacement = this[`_alchimie${commande}`](recetteData, result[2], actorId);
|
let replacement = this[`_alchimie${commande}`](recette, result[2], actorId);
|
||||||
manip = manip.replace(result[0], replacement);
|
manip = manip.replace(result[0], replacement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
recetteData.recette.manipulation_update = manip;
|
recette.system.manipulation_update = manip;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -12,23 +12,23 @@ export class RdDAstrologieJoueur extends Dialog {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async create(actor, dialogConfig) {
|
static async create(actor, dialogConfig) {
|
||||||
|
|
||||||
let data = {
|
let dialogData = {
|
||||||
nombres: this.organizeNombres(actor),
|
nombres: this.organizeNombres(actor),
|
||||||
dates: game.system.rdd.calendrier.getJoursSuivants(10),
|
dates: game.system.rdd.calendrier.getJoursSuivants(10),
|
||||||
etat: actor.getEtatGeneral(),
|
etat: actor.getEtatGeneral(),
|
||||||
ajustementsConditions: CONFIG.RDD.ajustementsConditions,
|
ajustementsConditions: CONFIG.RDD.ajustementsConditions,
|
||||||
astrologie: RdDItemCompetence.findCompetence(actor.items, 'Astrologie')
|
astrologie: RdDItemCompetence.findCompetence(actor.items, 'Astrologie')
|
||||||
}
|
}
|
||||||
const html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-astrologie-joueur.html', data);
|
const html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-astrologie-joueur.html', dialogData);
|
||||||
let options = { classes: ["rdddialog"], width: 600, height: 500, 'z-index': 99999 };
|
let options = { classes: ["rdddialog"], width: 600, height: 500, 'z-index': 99999 };
|
||||||
if (dialogConfig.options) {
|
if (dialogConfig.options) {
|
||||||
mergeObject(options, dialogConfig.options, { overwrite: true });
|
mergeObject(options, dialogConfig.options, { overwrite: true });
|
||||||
}
|
}
|
||||||
return new RdDAstrologieJoueur(html, actor, data);
|
return new RdDAstrologieJoueur(html, actor, dialogData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
constructor(html, actor, data) {
|
constructor(html, actor, dialogData) {
|
||||||
|
|
||||||
let myButtons = {
|
let myButtons = {
|
||||||
saveButton: { label: "Fermer", callback: html => this.quitDialog() }
|
saveButton: { label: "Fermer", callback: html => this.quitDialog() }
|
||||||
@ -41,7 +41,7 @@ export class RdDAstrologieJoueur extends Dialog {
|
|||||||
super(dialogConf, dialogOptions);
|
super(dialogConf, dialogOptions);
|
||||||
|
|
||||||
this.actor = actor;
|
this.actor = actor;
|
||||||
this.dataNombreAstral = duplicate(data);
|
this.dataNombreAstral = duplicate(dialogData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -63,7 +63,7 @@ export class RdDAstrologieJoueur extends Dialog {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
requestJetAstrologie() {
|
requestJetAstrologie() {
|
||||||
let data = {
|
let socketData = {
|
||||||
id: this.actor.id,
|
id: this.actor.id,
|
||||||
carac_vue: this.actor.system.carac['vue'].value,
|
carac_vue: this.actor.system.carac['vue'].value,
|
||||||
etat: this.dataNombreAstral.etat,
|
etat: this.dataNombreAstral.etat,
|
||||||
@ -73,11 +73,11 @@ export class RdDAstrologieJoueur extends Dialog {
|
|||||||
userId: game.user.id
|
userId: game.user.id
|
||||||
}
|
}
|
||||||
if (Misc.isUniqueConnectedGM()) {
|
if (Misc.isUniqueConnectedGM()) {
|
||||||
game.system.rdd.calendrier.requestNombreAstral(data);
|
game.system.rdd.calendrier.requestNombreAstral(socketData);
|
||||||
} else {
|
} else {
|
||||||
game.socket.emit(SYSTEM_SOCKET_ID, {
|
game.socket.emit(SYSTEM_SOCKET_ID, {
|
||||||
msg: "msg_request_nombre_astral",
|
msg: "msg_request_nombre_astral",
|
||||||
data: data
|
data: socketData
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.close();
|
this.close();
|
||||||
|
@ -223,7 +223,7 @@ export class RdDCalendrier extends Application {
|
|||||||
checkMaladie( periode) {
|
checkMaladie( periode) {
|
||||||
for (let actor of game.actors) {
|
for (let actor of game.actors) {
|
||||||
if (actor.type == 'personnage') {
|
if (actor.type == 'personnage') {
|
||||||
let maladies = actor.filterItems( item => (item.type == 'maladie' || (item.type == 'poison' && item.system.active) ) && item.system.periodicite.toLowerCase().includes(periode) );
|
let maladies = actor.items.find( item => (item.type == 'maladie' || (item.type == 'poison' && item.system.active) ) && item.system.periodicite.toLowerCase().includes(periode) );
|
||||||
for (let maladie of maladies) {
|
for (let maladie of maladies) {
|
||||||
if ( maladie.system.identifie) {
|
if ( maladie.system.identifie) {
|
||||||
ChatMessage.create({ content: `${actor.name} souffre de ${maladie.name} (${maladie.type}): vérifiez que les effets ne se sont pas aggravés !` });
|
ChatMessage.create({ content: `${actor.name} souffre de ${maladie.name} (${maladie.type}): vérifiez que les effets ne se sont pas aggravés !` });
|
||||||
@ -444,9 +444,9 @@ export class RdDCalendrier extends Application {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
updateDisplay() {
|
updateDisplay() {
|
||||||
let data = this.fillCalendrierData();
|
let calendrier = this.fillCalendrierData();
|
||||||
// Rebuild data
|
// Rebuild text du calendrier
|
||||||
let dateHTML = `Jour ${data.jourMois} de ${data.nomMois} (${data.nomSaison})`
|
let dateHTML = `Jour ${calendrier.jourMois} de ${calendrier.nomMois} (${calendrier.nomSaison})`
|
||||||
if (game.user.isGM) {
|
if (game.user.isGM) {
|
||||||
dateHTML = dateHTML + " - NA: " + (this.getCurrentNombreAstral() ?? "indéterminé");
|
dateHTML = dateHTML + " - NA: " + (this.getCurrentNombreAstral() ?? "indéterminé");
|
||||||
}
|
}
|
||||||
@ -454,13 +454,13 @@ export class RdDCalendrier extends Application {
|
|||||||
handle.innerHTML = dateHTML;
|
handle.innerHTML = dateHTML;
|
||||||
}
|
}
|
||||||
for (let heure of document.getElementsByClassName("calendar-heure-texte")) {
|
for (let heure of document.getElementsByClassName("calendar-heure-texte")) {
|
||||||
heure.innerHTML = data.nomHeure;
|
heure.innerHTML = calendrier.nomHeure;
|
||||||
}
|
}
|
||||||
for (const minute of document.getElementsByClassName("calendar-time-disp")) {
|
for (const minute of document.getElementsByClassName("calendar-time-disp")) {
|
||||||
minute.innerHTML = `${data.minutesRelative} minutes`;
|
minute.innerHTML = `${calendrier.minutesRelative} minutes`;
|
||||||
}
|
}
|
||||||
for (const heureImg of document.getElementsByClassName("calendar-heure-img")) {
|
for (const heureImg of document.getElementsByClassName("calendar-heure-img")) {
|
||||||
heureImg.src = data.iconHeure;
|
heureImg.src = calendrier.iconHeure;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,35 +101,35 @@ export class RdDCarac {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static computeCarac(data) {
|
static computeCarac(system) {
|
||||||
data.carac.force.value = Math.min(data.carac.force.value, parseInt(data.carac.taille.value) + 4);
|
system.carac.force.value = Math.min(system.carac.force.value, parseInt(system.carac.taille.value) + 4);
|
||||||
|
|
||||||
data.carac.derobee.value = Math.floor(parseInt(((21 - data.carac.taille.value)) + parseInt(data.carac.agilite.value)) / 2);
|
system.carac.derobee.value = Math.floor(parseInt(((21 - system.carac.taille.value)) + parseInt(system.carac.agilite.value)) / 2);
|
||||||
let bonusDomKey = Math.floor((parseInt(data.carac.force.value) + parseInt(data.carac.taille.value)) / 2);
|
let bonusDomKey = Math.floor((parseInt(system.carac.force.value) + parseInt(system.carac.taille.value)) / 2);
|
||||||
bonusDomKey = Math.min(Math.max(bonusDomKey, 0), 32); // Clamp de securite
|
bonusDomKey = Math.min(Math.max(bonusDomKey, 0), 32); // Clamp de securite
|
||||||
|
|
||||||
let tailleData = tableCaracDerivee[bonusDomKey];
|
let tailleData = tableCaracDerivee[bonusDomKey];
|
||||||
data.attributs.plusdom.value = tailleData.plusdom;
|
system.attributs.plusdom.value = tailleData.plusdom;
|
||||||
|
|
||||||
data.attributs.sconst.value = RdDCarac.calculSConst(data.carac.constitution.value);
|
system.attributs.sconst.value = RdDCarac.calculSConst(system.carac.constitution.value);
|
||||||
data.attributs.sust.value = tableCaracDerivee[Number(data.carac.taille.value)].sust;
|
system.attributs.sust.value = tableCaracDerivee[Number(system.carac.taille.value)].sust;
|
||||||
|
|
||||||
data.attributs.encombrement.value = (parseInt(data.carac.force.value) + parseInt(data.carac.taille.value)) / 2;
|
system.attributs.encombrement.value = (parseInt(system.carac.force.value) + parseInt(system.carac.taille.value)) / 2;
|
||||||
data.carac.melee.value = Math.floor((parseInt(data.carac.force.value) + parseInt(data.carac.agilite.value)) / 2);
|
system.carac.melee.value = Math.floor((parseInt(system.carac.force.value) + parseInt(system.carac.agilite.value)) / 2);
|
||||||
data.carac.tir.value = Math.floor((parseInt(data.carac.vue.value) + parseInt(data.carac.dexterite.value)) / 2);
|
system.carac.tir.value = Math.floor((parseInt(system.carac.vue.value) + parseInt(system.carac.dexterite.value)) / 2);
|
||||||
data.carac.lancer.value = Math.floor((parseInt(data.carac.tir.value) + parseInt(data.carac.force.value)) / 2);
|
system.carac.lancer.value = Math.floor((parseInt(system.carac.tir.value) + parseInt(system.carac.force.value)) / 2);
|
||||||
|
|
||||||
data.sante.vie.max = Math.ceil((parseInt(data.carac.taille.value) + parseInt(data.carac.constitution.value)) / 2);
|
system.sante.vie.max = Math.ceil((parseInt(system.carac.taille.value) + parseInt(system.carac.constitution.value)) / 2);
|
||||||
|
|
||||||
data.sante.vie.value = Math.min(data.sante.vie.value, data.sante.vie.max)
|
system.sante.vie.value = Math.min(system.sante.vie.value, system.sante.vie.max)
|
||||||
data.sante.endurance.max = Math.max(parseInt(data.carac.taille.value) + parseInt(data.carac.constitution.value), parseInt(data.sante.vie.max) + parseInt(data.carac.volonte.value));
|
system.sante.endurance.max = Math.max(parseInt(system.carac.taille.value) + parseInt(system.carac.constitution.value), parseInt(system.sante.vie.max) + parseInt(system.carac.volonte.value));
|
||||||
data.sante.endurance.value = Math.min(data.sante.endurance.value, data.sante.endurance.max);
|
system.sante.endurance.value = Math.min(system.sante.endurance.value, system.sante.endurance.max);
|
||||||
data.sante.fatigue.max = data.sante.endurance.max * 2;
|
system.sante.fatigue.max = system.sante.endurance.max * 2;
|
||||||
data.sante.fatigue.value = Math.min(data.sante.fatigue.value, data.sante.fatigue.max);
|
system.sante.fatigue.value = Math.min(system.sante.fatigue.value, system.sante.fatigue.max);
|
||||||
|
|
||||||
//Compteurs
|
//Compteurs
|
||||||
data.reve.reve.max = data.carac.reve.value;
|
system.reve.reve.max = system.carac.reve.value;
|
||||||
data.compteurs.chance.max = data.carac.chance.value;
|
system.compteurs.chance.max = system.carac.chance.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
async rollInitiative(ids, formula = undefined, messageOptions = {}) {
|
async rollInitiative(ids, formula = undefined, messageOptions = {}) {
|
||||||
console.log(`${game.system.title} | Combat.rollInitiative()`, ids, formula, messageOptions);
|
console.log(`${game.system.title} | Combat.rollInitiative()`, ids, formula, messageOptions);
|
||||||
// Structure input data
|
|
||||||
ids = typeof ids === "string" ? [ids] : ids;
|
ids = typeof ids === "string" ? [ids] : ids;
|
||||||
const currentId = this.combatant._id;
|
const currentId = this.combatant._id;
|
||||||
// calculate initiative
|
// calculate initiative
|
||||||
@ -93,7 +93,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
rollFormula = RdDCombatManager.formuleInitiative(2, competence.system.carac_value, competence.system.niveau, 0);
|
rollFormula = RdDCombatManager.formuleInitiative(2, competence.system.carac_value, competence.system.niveau, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const armeCombat = combatant.actor.items.find(it => it.type == 'arme' && itemData.system.equipe)
|
const armeCombat = combatant.actor.itemTypes['arme'].find(it => it.system.equipe)
|
||||||
const compName = (armeCombat == undefined) ? "Corps à corps" : armeCombat.system.competence;
|
const compName = (armeCombat == undefined) ? "Corps à corps" : armeCombat.system.competence;
|
||||||
const competence = RdDItemCompetence.findCompetence(combatant.actor.items, compName);
|
const competence = RdDItemCompetence.findCompetence(combatant.actor.items, compName);
|
||||||
if (competence) {
|
if (competence) {
|
||||||
@ -202,7 +202,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
return {
|
return {
|
||||||
name: p.name,
|
name: p.name,
|
||||||
action: 'conjurer',
|
action: 'conjurer',
|
||||||
data: {
|
system: {
|
||||||
competence: p.name,
|
competence: p.name,
|
||||||
possessionid: p.system.possessionid,
|
possessionid: p.system.possessionid,
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ export class RdDCombatManager extends Combat {
|
|||||||
actions = actions.concat(RdDCombatManager.listActionsArmes(armes, competences, actor.system.carac));
|
actions = actions.concat(RdDCombatManager.listActionsArmes(armes, competences, actor.system.carac));
|
||||||
|
|
||||||
if (actor.system.attributs.hautrevant.value) {
|
if (actor.system.attributs.hautrevant.value) {
|
||||||
actions.push({ name: "Draconic", action: 'haut-reve', data: { initOnly: true, competence: "Draconic" } });
|
actions.push({ name: "Draconic", action: 'haut-reve', system: { initOnly: true, competence: "Draconic" } });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -892,8 +892,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
_filterArmesParade(defender, competence) {
|
_filterArmesParade(defender, competence) {
|
||||||
let items = defender.items;
|
let items = defender.items.filter(it => RdDItemArme.isArmeUtilisable(it) || RdDItemCompetenceCreature.isCompetenceParade(it))
|
||||||
items = items.filter(it => RdDItemArme.isArmeUtilisable(it) || RdDItemCompetenceCreature.isCompetenceParade(it))
|
|
||||||
for (let item of items) {
|
for (let item of items) {
|
||||||
item.system.nbUsage = defender.getItemUse(item.id); // Ajout du # d'utilisation ce round
|
item.system.nbUsage = defender.getItemUse(item.id); // Ajout du # d'utilisation ce round
|
||||||
}
|
}
|
||||||
@ -960,10 +959,10 @@ export class RdDCombat {
|
|||||||
async parade(attackerRoll, armeParadeId) {
|
async parade(attackerRoll, armeParadeId) {
|
||||||
const arme = this.defender.getArmeParade(armeParadeId);
|
const arme = this.defender.getArmeParade(armeParadeId);
|
||||||
console.log("RdDCombat.parade >>>", attackerRoll, armeParadeId, arme);
|
console.log("RdDCombat.parade >>>", attackerRoll, armeParadeId, arme);
|
||||||
const competence = this.system?.competence;
|
const competence = arme?.system?.competence;
|
||||||
if (competence == undefined)
|
if (competence == undefined)
|
||||||
{
|
{
|
||||||
console.error("Pas de compétence de parade associée à ", arme) ;
|
console.error("Pas de compétence de parade associée à ", arme?.name, armeParadeId) ;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1144,7 +1143,7 @@ export class RdDCombat {
|
|||||||
resistance -= perteResistance;
|
resistance -= perteResistance;
|
||||||
defenderRoll.show.deteriorationArme = resistance <= 0 ? 'brise' : 'perte';
|
defenderRoll.show.deteriorationArme = resistance <= 0 ? 'brise' : 'perte';
|
||||||
defenderRoll.show.perteResistance = perteResistance;
|
defenderRoll.show.perteResistance = perteResistance;
|
||||||
this.defender.updateEmbeddedDocuments('Item', [{ _id: defenderRoll.arme._id, 'data.resistance': resistance }]);
|
this.defender.updateEmbeddedDocuments('Item', [{ _id: defenderRoll.arme._id, 'system.resistance': resistance }]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1160,7 +1159,7 @@ export class RdDCombat {
|
|||||||
resistance -= dmg;
|
resistance -= dmg;
|
||||||
defenderRoll.show.deteriorationArme = resistance <= 0 ? 'brise' : 'perte';
|
defenderRoll.show.deteriorationArme = resistance <= 0 ? 'brise' : 'perte';
|
||||||
defenderRoll.show.perteResistance = dmg;
|
defenderRoll.show.perteResistance = dmg;
|
||||||
this.defender.updateEmbeddedDocuments('Item', [{ _id: defenderRoll.arme._id, 'data.resistance': resistance }]);
|
this.defender.updateEmbeddedDocuments('Item', [{ _id: defenderRoll.arme._id, 'system.resistance': resistance }]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Si l'arme de parade n'est pas un bouclier, jet de désarmement (p.132)
|
// Si l'arme de parade n'est pas un bouclier, jet de désarmement (p.132)
|
||||||
@ -1274,7 +1273,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async displayActorCombatStatus(combat, actor) {
|
static async displayActorCombatStatus(combat, actor) {
|
||||||
let data = {
|
let formData = {
|
||||||
combatId: combat._id,
|
combatId: combat._id,
|
||||||
alias: actor.name,
|
alias: actor.name,
|
||||||
etatGeneral: actor.getEtatGeneral(),
|
etatGeneral: actor.getEtatGeneral(),
|
||||||
@ -1286,13 +1285,13 @@ export class RdDCombat {
|
|||||||
isCritique: false
|
isCritique: false
|
||||||
}
|
}
|
||||||
if (actor.countBlessuresNonSoigneeByName("critiques") > 0) { // Pour éviter le cumul grave + critique
|
if (actor.countBlessuresNonSoigneeByName("critiques") > 0) { // Pour éviter le cumul grave + critique
|
||||||
data.isCritique = true;
|
formData.isCritique = true;
|
||||||
} else if (actor.countBlessuresNonSoigneeByName("graves") > 0) {
|
} else if (actor.countBlessuresNonSoigneeByName("graves") > 0) {
|
||||||
data.isGrave = true;
|
formData.isGrave = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatUtility.createChatWithRollMode(actor.name, {
|
ChatUtility.createChatWithRollMode(actor.name, {
|
||||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-turn-summary.html`, data)
|
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-turn-summary.html`, formData)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ export class RdDCommands {
|
|||||||
|
|
||||||
async supprimerSignesDraconiquesEphemeres() {
|
async supprimerSignesDraconiquesEphemeres() {
|
||||||
game.actors.forEach(actor => {
|
game.actors.forEach(actor => {
|
||||||
const ephemeres = actor.filterItems(item => item.type = 'signedraconique' && item.system.ephemere)
|
const ephemeres = actor.items.find(item => item.type = 'signedraconique' && item.system.ephemere)
|
||||||
.map(item => item.id);
|
.map(item => item.id);
|
||||||
if (ephemeres.length > 0) {
|
if (ephemeres.length > 0) {
|
||||||
actor.deleteEmbeddedDocuments("Item", ephemeres);
|
actor.deleteEmbeddedDocuments("Item", ephemeres);
|
||||||
|
@ -3,11 +3,11 @@ import { Misc } from "./misc.js";
|
|||||||
|
|
||||||
export class RddCompendiumOrganiser {
|
export class RddCompendiumOrganiser {
|
||||||
static init() {
|
static init() {
|
||||||
Hooks.on('renderCompendium', async (pack, html, data) => RddCompendiumOrganiser.onRenderCompendium(pack, html, data))
|
Hooks.on('renderCompendium', async (pack, html, compendiumData) => RddCompendiumOrganiser.onRenderCompendium(pack, html, compendiumData))
|
||||||
}
|
}
|
||||||
|
|
||||||
static async onRenderCompendium(compendium, html, data) {
|
static async onRenderCompendium(compendium, html, compendiumData) {
|
||||||
console.log('onRenderCompendium', compendium, html, data);
|
console.log('onRenderCompendium', compendium, html, compendiumData);
|
||||||
const pack = compendium.collection
|
const pack = compendium.collection
|
||||||
if (pack.metadata.system === SYSTEM_RDD) {
|
if (pack.metadata.system === SYSTEM_RDD) {
|
||||||
html.find('.directory-item').each((i, element) => {
|
html.find('.directory-item').each((i, element) => {
|
||||||
|
@ -18,18 +18,19 @@ const tableGemmes = {
|
|||||||
export class RdDGemme extends Item {
|
export class RdDGemme extends Item {
|
||||||
|
|
||||||
static getGemmeTypeOptionList() {
|
static getGemmeTypeOptionList() {
|
||||||
|
// TODO: look how to map object key-value pairs
|
||||||
let options = ""
|
let options = ""
|
||||||
for (let gemmeKey in tableGemmes) {
|
for (let gemmeKey in tableGemmes) {
|
||||||
let gemmeData = tableGemmes[gemmeKey];
|
options += `<option value="${gemmeKey}">${tableGemmes[gemmeKey].label}</option>`
|
||||||
options += `<option value="${gemmeKey}">${gemmeData.label}</option>`
|
|
||||||
}
|
}
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
static calculDataDerivees(data) {
|
|
||||||
data.cout = (data.taille * data.purete) + data.qualite;
|
static calculDataDerivees(gemme) {
|
||||||
data.inertie = 7 - data.purete;
|
gemme.system.cout = (gemme.system.taille * gemme.system.purete) + gemme.system.qualite;
|
||||||
data.enchantabilite = data.taille - data.inertie;
|
gemme.system.inertie = 7 - gemme.system.purete;
|
||||||
|
gemme.system.enchantabilite = gemme.system.taille - gemme.system.inertie;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
/* -------------------------------------------- */
|
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
import { RdDUtility } from "./rdd-utility.js";
|
||||||
import { Misc } from "./misc.js";
|
|
||||||
import { RdDCalendrier } from "./rdd-calendrier.js";
|
import { RdDCalendrier } from "./rdd-calendrier.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -22,12 +20,11 @@ export class RdDHerbes extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static buildHerbesList(listHerbes, max) {
|
static buildHerbesList(listeHerbes, max) {
|
||||||
let list = {}
|
let list = {}
|
||||||
for ( let herbe of listHerbes) {
|
for ( let herbe of listeHerbes) {
|
||||||
let herbeData = herbe.system
|
let brins = max - herbe.system.niveau;
|
||||||
let brins = max - herbeData.niveau;
|
list[herbe.system.name] = `${herbe.system.name} (Bonus: ${herbe.system.niveau}, Brins: ${brins})`;
|
||||||
list[herbe.name] = `${herbe.name} (Bonus: ${herbeData.niveau}, Brins: ${brins})`;
|
|
||||||
}
|
}
|
||||||
list['Autre'] = 'Autre (Bonus: variable, Brins: variable)'
|
list['Autre'] = 'Autre (Bonus: variable, Brins: variable)'
|
||||||
return list;
|
return list;
|
||||||
@ -39,36 +36,39 @@ export class RdDHerbes extends Item {
|
|||||||
formData.herbesRepos = this.buildHerbesList(this.herbesRepos, 7);
|
formData.herbesRepos = this.buildHerbesList(this.herbesRepos, 7);
|
||||||
formData.jourMoisOptions = RdDCalendrier.buildJoursMois();
|
formData.jourMoisOptions = RdDCalendrier.buildJoursMois();
|
||||||
formData.dateActuelle = game.system.rdd.calendrier.getDateFromIndex();
|
formData.dateActuelle = game.system.rdd.calendrier.getDateFromIndex();
|
||||||
formData.splitDate = game.system.rdd.calendrier.getNumericDateFromIndex(formData.data.prdate);
|
formData.splitDate = game.system.rdd.calendrier.getNumericDateFromIndex(formData.system.prdate);
|
||||||
|
|
||||||
if (formData.data.categorie.includes('Soin') ) {
|
if (formData.system.categorie.includes('Soin') ) {
|
||||||
formData.isHerbe = true;
|
formData.isHerbe = true;
|
||||||
this.computeHerbeBonus(formData, this.herbesSoins, 12);
|
this.computeHerbeBonus(formData, this.herbesSoins, 12);
|
||||||
} else if (formData.data.categorie.includes('Repos')) {
|
} else if (formData.system.categorie.includes('Repos')) {
|
||||||
formData.isRepos = true;
|
formData.isRepos = true;
|
||||||
this.computeHerbeBonus(formData, this.herbesRepos, 7);
|
this.computeHerbeBonus(formData, this.herbesRepos, 7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static calculePointsRepos( data ) {
|
static calculePuissancePotion( potion ) {
|
||||||
return data.herbebonus * data.pr;
|
return potion.system.herbebonus * potion.system.pr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static calculePointsGuerison( data ){
|
static calculePointsRepos( potion ) {
|
||||||
return data.herbebonus * data.pr;
|
return potion.system.herbebonus * potion.system.pr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static calculePointsGuerison( potion ){
|
||||||
|
return potion.system.herbebonus * potion.system.pr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static computeHerbeBonus( formData, herbesList, max) {
|
static computeHerbeBonus( formData, herbesList, max) {
|
||||||
if ( Number(formData.data.herbebrins) ) {
|
if ( Number(formData.system.herbebrins) ) {
|
||||||
let herbe = herbesList.find(item => item.name.toLowerCase() == formData.data.herbe.toLowerCase() );
|
let herbe = herbesList.find(item => item.name.toLowerCase() == formData.system.herbe.toLowerCase() );
|
||||||
if( herbe ) {
|
if( herbe ) {
|
||||||
let herbeData = herbe.system;
|
let brinsBase = max - herbe.system.niveau;
|
||||||
let brinsBase = max - herbeData.niveau;
|
formData.system.herbebonus = Math.max(herbe.system.niveau - Math.max(brinsBase - formData.system.herbebrins, 0), 0);
|
||||||
//console.log(herbeData, brinsBase, formData.data.herbebrins);
|
|
||||||
formData.data.herbebonus = Math.max(herbeData.niveau - Math.max(brinsBase - formData.data.herbebrins, 0), 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ export class RdDPossession {
|
|||||||
let possessionData = {
|
let possessionData = {
|
||||||
name: "Possession en cours de " + attacker.name, type: 'possession',
|
name: "Possession en cours de " + attacker.name, type: 'possession',
|
||||||
img: "systems/foundryvtt-reve-de-dragon/icons/entites/possession2.webp",
|
img: "systems/foundryvtt-reve-de-dragon/icons/entites/possession2.webp",
|
||||||
data: { description: "", typepossession: attacker.name, possede: false, possessionid: randomID(16), possesseurid: attacker.id, possedeid: defender.id, date: 0, compteur: 0 }
|
system: { description: "", typepossession: attacker.name, possede: false, possessionid: randomID(16), possesseurid: attacker.id, possedeid: defender.id, date: 0, compteur: 0 }
|
||||||
}
|
}
|
||||||
// Creates only the possession on the personnage side
|
// Creates only the possession on the personnage side
|
||||||
let poss = await defender.createEmbeddedDocuments('Item', [possessionData])
|
let poss = await defender.createEmbeddedDocuments('Item', [possessionData])
|
||||||
|
@ -166,7 +166,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('Ouverture RdDRoll', rollData);
|
||||||
// Update html, according to data
|
// Update html, according to rollData
|
||||||
if (rollData.competence) {
|
if (rollData.competence) {
|
||||||
const defaut_carac = rollData.competence.system.defaut_carac
|
const defaut_carac = rollData.competence.system.defaut_carac
|
||||||
// Set the default carac from the competence item
|
// Set the default carac from the competence item
|
||||||
|
@ -21,17 +21,14 @@ export class RdDSheetUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static prepareItemDropParameters(destItemId, actorId, dragData, objetVersConteneur) {
|
static prepareItemDropParameters(destItemId, actorId, dragData, objetVersConteneur) {
|
||||||
console.log("ID", dragData)
|
|
||||||
const item = fromUuidSync(dragData.uuid)
|
const item = fromUuidSync(dragData.uuid)
|
||||||
let itemId = item.id
|
|
||||||
//const itemId = dragData.id || dragData.data._id
|
|
||||||
return {
|
return {
|
||||||
destId: destItemId,
|
destId: destItemId,
|
||||||
targetActorId: actorId,
|
targetActorId: actorId,
|
||||||
itemId: itemId,
|
itemId: item.id,
|
||||||
sourceActorId: item.actor.id,
|
sourceActorId: item.actor.id,
|
||||||
srcId: objetVersConteneur[itemId],
|
srcId: objetVersConteneur[item.id],
|
||||||
onEnleverConteneur: () => { delete objetVersConteneur[itemId]; },
|
onEnleverConteneur: () => { delete objetVersConteneur[item.id]; },
|
||||||
onAjouterDansConteneur: (itemId, conteneurId) => { objetVersConteneur[itemId] = conteneurId; }
|
onAjouterDansConteneur: (itemId, conteneurId) => { objetVersConteneur[itemId] = conteneurId; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -47,10 +44,10 @@ export class RdDSheetUtility {
|
|||||||
static async _onSplitItem(item, split, actor) {
|
static async _onSplitItem(item, split, actor) {
|
||||||
if (split >= 1 && split < item.system.quantite) {
|
if (split >= 1 && split < item.system.quantite) {
|
||||||
await item.diminuerQuantite(split);
|
await item.diminuerQuantite(split);
|
||||||
const itemData = duplicate(item);
|
const splitItem = duplicate(item);
|
||||||
// todo: ajouter dans le même conteneur?
|
// todo: ajouter dans le même conteneur?
|
||||||
itemData.system.quantite = split;
|
splitItem.system.quantite = split;
|
||||||
await actor.createEmbeddedDocuments('Item', [itemData])
|
await actor.createEmbeddedDocuments('Item', [splitItem])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -267,7 +267,6 @@ export class RdDTMRDialog extends Dialog {
|
|||||||
|
|
||||||
if (ReglesOptionelles.isUsing("appliquer-fatigue")) {
|
if (ReglesOptionelles.isUsing("appliquer-fatigue")) {
|
||||||
let fatigueItem = document.getElementById("tmr-fatigue-table");
|
let fatigueItem = document.getElementById("tmr-fatigue-table");
|
||||||
//console.log("Refresh : ", actorData.data.sante.fatigue.value);
|
|
||||||
fatigueItem.innerHTML = "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(this.actor.system.sante.fatigue.value, this.actor.system.sante.endurance.max).html() + "</table>";
|
fatigueItem.innerHTML = "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(this.actor.system.sante.fatigue.value, this.actor.system.sante.endurance.max).html() + "</table>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -819,7 +818,7 @@ export class RdDTMRDialog extends Dialog {
|
|||||||
//this.updateSortReserve();
|
//this.updateSortReserve();
|
||||||
console.log("declencheSortEnReserve", sortReserve)
|
console.log("declencheSortEnReserve", sortReserve)
|
||||||
this._tellToUserAndGM(`Vous avez déclenché le sort en réserve <strong> ${sortReserve.sort.name}</strong>
|
this._tellToUserAndGM(`Vous avez déclenché le sort en réserve <strong> ${sortReserve.sort.name}</strong>
|
||||||
avec ${sortReserve.sort.system.ptreve_reel} points de Rêve
|
avec ${sortReserve.sort.data.ptreve_reel} points de Rêve
|
||||||
en ${sortReserve.coord} (${TMRUtility.getTMRLabel(sortReserve.coord)})
|
en ${sortReserve.coord} (${TMRUtility.getTMRLabel(sortReserve.coord)})
|
||||||
`);
|
`);
|
||||||
this.close();
|
this.close();
|
||||||
@ -873,7 +872,6 @@ export class RdDTMRDialog extends Dialog {
|
|||||||
if (this.viewOnly) {
|
if (this.viewOnly) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let clickOddq = RdDTMRDialog._computeEventOddq(event.data.originalEvent);
|
let clickOddq = RdDTMRDialog._computeEventOddq(event.data.originalEvent);
|
||||||
await this._onClickTMRPos(clickOddq); // Vérifier l'état des compteurs reve/fatigue/vie
|
await this._onClickTMRPos(clickOddq); // Vérifier l'état des compteurs reve/fatigue/vie
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ export class RdDTokenHud {
|
|||||||
|
|
||||||
static init() {
|
static init() {
|
||||||
// Integration du TokenHUD
|
// Integration du TokenHUD
|
||||||
Hooks.on('renderTokenHUD', (app, html, data) => { RdDTokenHud.addTokenHudExtensions(app, html, data._id) });
|
Hooks.on('renderTokenHUD', (app, html, token) => { RdDTokenHud.addTokenHudExtensions(app, html, token._id) });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -63,7 +63,7 @@ export class RdDTokenHud {
|
|||||||
const actionIndex = event.currentTarget.attributes['data-action-index']?.value;
|
const actionIndex = event.currentTarget.attributes['data-action-index']?.value;
|
||||||
const action = actionsCombat[actionIndex];
|
const action = actionsCombat[actionIndex];
|
||||||
if (action.action == 'conjurer') {
|
if (action.action == 'conjurer') {
|
||||||
actor.conjurerPossession(actor.getPossession(action.data.possessionid));
|
actor.conjurerPossession(actor.getPossession(action.system.possessionid));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
actor.rollArme(action);
|
actor.rollArme(action);
|
||||||
@ -76,7 +76,7 @@ export class RdDTokenHud {
|
|||||||
case 'inc': return RdDCombatManager.incDecInit(combatantId, 0.01);
|
case 'inc': return RdDCombatManager.incDecInit(combatantId, 0.01);
|
||||||
case 'dec': return RdDCombatManager.incDecInit(combatantId, -0.01);
|
case 'dec': return RdDCombatManager.incDecInit(combatantId, -0.01);
|
||||||
case 'autre': return RdDCombatManager.rollInitiativeAction(combatantId,
|
case 'autre': return RdDCombatManager.rollInitiativeAction(combatantId,
|
||||||
{ name: "Autre action", action: 'autre', data: { initOnly: true, competence: "Autre action" } });
|
{ name: "Autre action", action: 'autre', system: { initOnly: true, competence: "Autre action" } });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ export class RdDUtility {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async init() {
|
static async init() {
|
||||||
Hooks.on("renderChatMessage", async (app, html, msg) => RdDUtility.onRenderChatMessage(app, html, msg));
|
Hooks.on("renderChatMessage", async (app, html, msg) => RdDUtility.onRenderChatMessage(app, html, msg));
|
||||||
Hooks.on('renderChatLog', (log, html, data) => RdDUtility.chatListeners(html));
|
Hooks.on('renderChatLog', (log, html, chatLog) => RdDUtility.chatListeners(html));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -445,16 +445,16 @@ export class RdDUtility {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static calculEncContenu(conteneur, objets) {
|
static calculEncContenu(conteneur, objets) {
|
||||||
const contenuDatas = (conteneur.system.contenu ?? []).filter(id => id != undefined)
|
const contenus = (conteneur.system.contenu ?? []).filter(id => id != undefined)
|
||||||
.map(id => objets.find(it => (id == it._id)))
|
.map(id => objets.find(it => (id == it.id)))
|
||||||
.filter(it => it);
|
.filter(it => it);
|
||||||
let enc = Number(conteneur.system.encombrement ?? 0) * Number(conteneur.system.quantite ?? 1);
|
let enc = Number(conteneur.system.encombrement ?? 0) * Number(conteneur.system.quantite ?? 1);
|
||||||
for (let itemData of contenuDatas) {
|
for (let contenu of contenus) {
|
||||||
if (itemData.type == 'conteneur') {
|
if (contenu.type == 'conteneur') {
|
||||||
enc += RdDUtility.calculEncContenu(itemData, objets);
|
enc += RdDUtility.calculEncContenu(contenu, objets);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
enc += Number(itemData.system.encombrement ?? 0) * Number(itemData.system.quantite ?? 1)
|
enc += Number(contenu.system.encombrement ?? 0) * Number(contenu.system.quantite ?? 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return enc
|
return enc
|
||||||
@ -653,9 +653,9 @@ export class RdDUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async responseNombreAstral(data) {
|
static async responseNombreAstral(callData) {
|
||||||
let actor = game.actors.get(data.id);
|
let actor = game.actors.get(callData.id);
|
||||||
actor.ajouteNombreAstral(data);
|
actor.ajouteNombreAstral(callData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -753,7 +753,7 @@ export class RdDUtility {
|
|||||||
static getSelectedActor(msgPlayer = undefined) {
|
static getSelectedActor(msgPlayer = undefined) {
|
||||||
if (canvas.tokens.controlled.length == 1) {
|
if (canvas.tokens.controlled.length == 1) {
|
||||||
let token = canvas.tokens.controlled[0];
|
let token = canvas.tokens.controlled[0];
|
||||||
if (token.actor && token.actorLink) {
|
if (token.actor) {
|
||||||
return token.actor;
|
return token.actor;
|
||||||
}
|
}
|
||||||
if (msgPlayer != undefined) {
|
if (msgPlayer != undefined) {
|
||||||
@ -776,7 +776,7 @@ export class RdDUtility {
|
|||||||
static createMonnaie(name, valeur_deniers, img = "", enc = 0.01) {
|
static createMonnaie(name, valeur_deniers, img = "", enc = 0.01) {
|
||||||
let piece = {
|
let piece = {
|
||||||
name: name, type: 'monnaie', img: img, _id: randomID(16),
|
name: name, type: 'monnaie', img: img, _id: randomID(16),
|
||||||
data: {
|
dasystemta: {
|
||||||
quantite: 0,
|
quantite: 0,
|
||||||
valeur_deniers: valeur_deniers,
|
valeur_deniers: valeur_deniers,
|
||||||
encombrement: enc,
|
encombrement: enc,
|
||||||
|
@ -468,10 +468,10 @@ export class TMRRencontres {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async onPostEchecTourbillonRouge(tmrDialog, data) {
|
static async onPostEchecTourbillonRouge(tmrDialog, rencontre) {
|
||||||
await data.actor.reveActuelIncDec(-2); // -2 pts de Reve a chaque itération
|
await rencontre.actor.reveActuelIncDec(-2); // -2 pts de Reve a chaque itération
|
||||||
TMRRencontres._toubillonner(tmrDialog, data.actor, 4);
|
TMRRencontres._toubillonner(tmrDialog, rencontre.actor, 4);
|
||||||
await data.actor.santeIncDec("vie", -1); // Et -1 PV
|
await rencontre.actor.santeIncDec("vie", -1); // Et -1 PV
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -9,11 +9,11 @@ const registeredEffects = [
|
|||||||
* Définition des informations d'une "draconique" (queue, ombre, tête, souffle) qui influence les TMR
|
* Définition des informations d'une "draconique" (queue, ombre, tête, souffle) qui influence les TMR
|
||||||
*/
|
*/
|
||||||
export class Draconique {
|
export class Draconique {
|
||||||
static isCaseTMR(itemData) { return itemData.type == 'casetmr'; }
|
static isCaseTMR(item) { return item.type == 'casetmr'; }
|
||||||
static isQueueDragon(itemData) { return itemData.type == 'queue' || itemData.type == 'ombre'; }
|
static isQueueDragon(item) { return item.type == 'queue' || item.type == 'ombre'; }
|
||||||
static isSouffleDragon(itemData) { return itemData.type == 'souffle'; }
|
static isSouffleDragon(item) { return item.type == 'souffle'; }
|
||||||
static isTeteDragon(itemData) { return itemData.type == 'tete'; }
|
static isTeteDragon(item) { return item.type == 'tete'; }
|
||||||
static isQueueSouffle(itemData) { return Draconique.isQueueDragon(itemData) || Draconique.isSouffleDragon(itemData); }
|
static isQueueSouffle(item) { return Draconique.isQueueDragon(item) || Draconique.isSouffleDragon(item); }
|
||||||
|
|
||||||
tmrLabel(linkData) { return TMRUtility.getTMRLabel(linkData.system.coord); }
|
tmrLabel(linkData) { return TMRUtility.getTMRLabel(linkData.system.coord); }
|
||||||
|
|
||||||
@ -38,8 +38,7 @@ export class Draconique {
|
|||||||
* @returns true si l'item correspond
|
* @returns true si l'item correspond
|
||||||
*/
|
*/
|
||||||
match(item) {
|
match(item) {
|
||||||
const itemData = item;
|
return Draconique.isQueueDragon(item) || Draconique.isSouffleDragon(item) || Draconique.isTeteDragon(item);
|
||||||
return Draconique.isQueueDragon(itemData) || Draconique.isSouffleDragon(itemData) || Draconique.isTeteDragon(itemData);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,7 +112,7 @@ export class EffetsDraconiques {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static filterItems(actor, filter, name) {
|
static filterItems(actor, filter, name) {
|
||||||
return actor.filter(filter)
|
return actor.filterItems(filter)
|
||||||
.filter(it => Grammar.includesLowerCaseNoAccent(it.name, name));
|
.filter(it => Grammar.includesLowerCaseNoAccent(it.name, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ export class PixiTMR {
|
|||||||
for (const [name, img] of Object.entries(PixiTMR.textures)) {
|
for (const [name, img] of Object.entries(PixiTMR.textures)) {
|
||||||
loader = loader.add(name, img);
|
loader = loader.add(name, img);
|
||||||
}
|
}
|
||||||
loader.onLoad.add((error, reason) => { console.log("ERROR", error, reason) });
|
loader.onError.add((error, reason) => { console.log("ERROR", error, reason) });
|
||||||
loader.load( (loader, resources) => {
|
loader.load( (loader, resources) => {
|
||||||
onLoad(loader, resources);
|
onLoad(loader, resources);
|
||||||
for (let onAnimate of this.callbacksOnAnimate) {
|
for (let onAnimate of this.callbacksOnAnimate) {
|
||||||
|
@ -13,7 +13,7 @@ export class SortReserve extends Draconique {
|
|||||||
async onActorCreateOwned(actor, item) { }
|
async onActorCreateOwned(actor, item) { }
|
||||||
|
|
||||||
code() { return 'sort' }
|
code() { return 'sort' }
|
||||||
tooltip(sort) { return `${sort.name}, r${sort.system.ptreve_reel}` }
|
tooltip(sort) { return `${sort.name}, r${sort.data.ptreve_reel}` }
|
||||||
img() { return 'systems/foundryvtt-reve-de-dragon/icons/tmr/scroll.webp' }
|
img() { return 'systems/foundryvtt-reve-de-dragon/icons/tmr/scroll.webp' }
|
||||||
|
|
||||||
createSprite(pixiTMR) {
|
createSprite(pixiTMR) {
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<div class="grid grid-2col">
|
<div class="grid grid-2col">
|
||||||
<div class="flex-group-left flexcol">
|
<div class="flex-group-left flexcol">
|
||||||
<ol class="carac-list alterne-list">
|
<ol class="carac-list alterne-list">
|
||||||
{{#each data.carac as |carac key|}}
|
{{#each system.carac as |carac key|}}
|
||||||
<li class="flexrow list-item" data-attribute="{{key}}">
|
<li class="flexrow list-item" data-attribute="{{key}}">
|
||||||
{{#if (eq key 'taille')}}
|
{{#if (eq key 'taille')}}
|
||||||
<span class="carac-label flexrow" name="system.carac.{{key}}.label">{{carac.label}}</span>
|
<span class="carac-label flexrow" name="system.carac.{{key}}.label">{{carac.label}}</span>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-group-left flexcol">
|
<div class="flex-group-left flexcol">
|
||||||
<ol class="carac-list alterne-list">
|
<ol class="carac-list alterne-list">
|
||||||
{{#each data.attributs as |attr key|}}
|
{{#each system.attributs as |attr key|}}
|
||||||
<li class="flexrow list-item" data-attribute="{{key}}">
|
<li class="flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label" name="system.attributs.{{key}}.label">{{attr.label}}</span>
|
<span class="carac-label" name="system.attributs.{{key}}.label">{{attr.label}}</span>
|
||||||
<input type="text" name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="{{attr.type}}" />
|
<input type="text" name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="{{attr.type}}" />
|
||||||
@ -70,20 +70,20 @@
|
|||||||
<li class="flexrow list-item" data-attribute="vie">
|
<li class="flexrow list-item" data-attribute="vie">
|
||||||
<span class="competence-label" name="system.sante.vie.label">Vie</span>
|
<span class="competence-label" name="system.sante.vie.label">Vie</span>
|
||||||
<span class="flexrow" >
|
<span class="flexrow" >
|
||||||
<input type="text" name="system.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number" /> /
|
<input type="text" name="system.sante.vie.value" value="{{system.sante.vie.value}}" data-dtype="Number" /> /
|
||||||
<input type="text" name="system.sante.vie.max" value="{{data.sante.vie.max}}" data-dtype="Number" />
|
<input type="text" name="system.sante.vie.max" value="{{system.sante.vie.max}}" data-dtype="Number" />
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow list-item" data-attribute="endurance">
|
<li class="flexrow list-item" data-attribute="endurance">
|
||||||
<span class="competence-label" name="system.sante.endurance.label">Endurance</span>
|
<span class="competence-label" name="system.sante.endurance.label">Endurance</span>
|
||||||
<span class="flexrow" >
|
<span class="flexrow" >
|
||||||
<input type="text" name="system.sante.endurance.value" value="{{data.sante.endurance.value}}" data-dtype="Number" /> /
|
<input type="text" name="system.sante.endurance.value" value="{{system.sante.endurance.value}}" data-dtype="Number" /> /
|
||||||
<input type="text" name="system.sante.endurance.max" value="{{data.sante.endurance.max}}" data-dtype="Number" />
|
<input type="text" name="system.sante.endurance.max" value="{{system.sante.endurance.max}}" data-dtype="Number" />
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow list-item" data-attribute="etat">
|
<li class="flexrow list-item" data-attribute="etat">
|
||||||
<span class="competence-label" name="system.compteurs.etat.label">Etat Général</span>
|
<span class="competence-label" name="system.compteurs.etat.label">Etat Général</span>
|
||||||
<input type="text" value="{{data.compteurs.etat.value}}" disabled />
|
<input type="text" value="{{system.compteurs.etat.value}}" disabled />
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
@ -134,12 +134,12 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span class="item-name"><h4>Race</h4></span>
|
<span class="item-name"><h4>Race</h4></span>
|
||||||
<input type="text" name="system.race" value="{{data.race}}" data-dtype="String" />
|
<input type="text" name="system.race" value="{{system.race}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
<span class="item-name"><h4>Description</h4>
|
<span class="item-name"><h4>Description</h4>
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=true}}
|
{{editor system.description target="system.description" button=true owner=owner editable=true}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<div class="grid grid-2col">
|
<div class="grid grid-2col">
|
||||||
<div class="flex-group-left flexcol">
|
<div class="flex-group-left flexcol">
|
||||||
<ol class="carac-list alterne-list">
|
<ol class="carac-list alterne-list">
|
||||||
{{#each data.carac as |carac key|}}
|
{{#each system.carac as |carac key|}}
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
{{#if (eq key 'taille')}}
|
{{#if (eq key 'taille')}}
|
||||||
<span class="carac-label flexrow" name="system.carac.{{key}}.label">{{carac.label}}</span>
|
<span class="carac-label flexrow" name="system.carac.{{key}}.label">{{carac.label}}</span>
|
||||||
@ -52,8 +52,8 @@
|
|||||||
<ol class="carac-list alterne-list">
|
<ol class="carac-list alterne-list">
|
||||||
<li class="caracteristique flexrow list-item">
|
<li class="caracteristique flexrow list-item">
|
||||||
<span class="carac-label flexrow" name="catEntite">Catégorie : </span>
|
<span class="carac-label flexrow" name="catEntite">Catégorie : </span>
|
||||||
<select name="system.definition.categorieentite" value="{{data.definition.categorieentite}}" data-dtype="String">
|
<select name="system.definition.categorieentite" value="{{system.definition.categorieentite}}" data-dtype="String">
|
||||||
{{#select data.definition.categorieentite}}
|
{{#select system.definition.categorieentite}}
|
||||||
<option value="cauchemar">Cauchemar</option>
|
<option value="cauchemar">Cauchemar</option>
|
||||||
<option value="reve">Rêve</option>
|
<option value="reve">Rêve</option>
|
||||||
{{/select}}
|
{{/select}}
|
||||||
@ -61,15 +61,15 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="caracteristique flexrow list-item">
|
<li class="caracteristique flexrow list-item">
|
||||||
<span class="carac-label flexrow" name="typeEntite">Type d'entité : </span>
|
<span class="carac-label flexrow" name="typeEntite">Type d'entité : </span>
|
||||||
<select name="system.definition.typeentite" value="{{data.definition.typeentite}}" data-dtype="String">
|
<select name="system.definition.typeentite" value="{{system.definition.typeentite}}" data-dtype="String">
|
||||||
{{#select data.definition.typeentite}}
|
{{#select system.definition.typeentite}}
|
||||||
<option value="incarne">Incarnée</option>
|
<option value="incarne">Incarnée</option>
|
||||||
<option value="nonincarne">Non Incarnée</option>
|
<option value="nonincarne">Non Incarnée</option>
|
||||||
<option value="blurette">Blurete</option>
|
<option value="blurette">Blurette</option>
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
{{#each data.attributs as |attr key|}}
|
{{#each system.attributs as |attr key|}}
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label flexrow" name="system.attributs.{{key}}.label">{{attr.label}} : </span>
|
<span class="carac-label flexrow" name="system.attributs.{{key}}.label">{{attr.label}} : </span>
|
||||||
<span><input class="attribut-value flexrow" type="text" name="system.attributs.{{key}}.value"
|
<span><input class="attribut-value flexrow" type="text" name="system.attributs.{{key}}.value"
|
||||||
@ -79,9 +79,9 @@
|
|||||||
<li class="caracteristique flexrow list-item" data-attribute="endurance">
|
<li class="caracteristique flexrow list-item" data-attribute="endurance">
|
||||||
<span class="competence-label flexrow" name="system.sante.endurance.label">Endurance : </span>
|
<span class="competence-label flexrow" name="system.sante.endurance.label">Endurance : </span>
|
||||||
<span><input class="sante-value flexrow" type="text" name="system.sante.endurance.value"
|
<span><input class="sante-value flexrow" type="text" name="system.sante.endurance.value"
|
||||||
value="{{data.sante.endurance.value}}" data-dtype="Number" /></span><span>/ </span>
|
value="{{system.sante.endurance.value}}" data-dtype="Number" /></span><span>/ </span>
|
||||||
<span><input class="sante-value flexrow" type="text" name="system.sante.endurance.max"
|
<span><input class="sante-value flexrow" type="text" name="system.sante.endurance.max"
|
||||||
value="{{data.sante.endurance.max}}" data-dtype="Number" /></span>
|
value="{{system.sante.endurance.max}}" data-dtype="Number" /></span>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
@ -131,7 +131,7 @@
|
|||||||
{{!-- Biography Tab --}}
|
{{!-- Biography Tab --}}
|
||||||
<div class="tab description" data-group="primary" data-tab="description">
|
<div class="tab description" data-group="primary" data-tab="description">
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=true}}
|
{{editor system.description target="system.description" button=true owner=owner editable=true}}
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,15 +13,15 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="table-row alterne-row" ><td/><td colspan="4">Légères</td></tr>
|
<tr class="table-row alterne-row" ><td/><td colspan="4">Légères</td></tr>
|
||||||
{{#each data.blessures.legeres.liste as |bless key|}}
|
{{#each system.blessures.legeres.liste as |bless key|}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="legere" title="Légère"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="legere" title="Légère"}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<tr class="table-row alterne-row"><td/><td colspan="4">Graves</td></tr>
|
<tr class="table-row alterne-row"><td/><td colspan="4">Graves</td></tr>
|
||||||
{{#each data.blessures.graves.liste as |bless key|}}
|
{{#each system.blessures.graves.liste as |bless key|}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="grave" title="Grave"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="grave" title="Grave"}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
<tr class="table-row alterne-row"><td/><td colspan="4">Critiques</td></tr>
|
<tr class="table-row alterne-row"><td/><td colspan="4">Critiques</td></tr>
|
||||||
{{#each data.blessures.critiques.liste as |bless key|}}
|
{{#each system.blessures.critiques.liste as |bless key|}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="critique" title="Critique"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="critique" title="Critique"}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}}
|
||||||
|
|
||||||
<span class="item-name"><h4>Equipement</h4></span>
|
<span class="item-name"><h4>Equipement</h4></span>
|
||||||
<span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> -
|
<span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{system.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> -
|
||||||
<span class="item-name"><a class="creer-un-objet">Créer un objet</a></span>
|
<span class="item-name"><a class="creer-un-objet">Créer un objet</a></span>
|
||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
<span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span>
|
<span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span>
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<label class="compteur">
|
<label class="compteur">
|
||||||
<a class="jet-vie">Vie</a>
|
<a class="jet-vie">Vie</a>
|
||||||
<a class="vie-moins"><i class="fas fa-minus-square"></i></a>
|
<a class="vie-moins"><i class="fas fa-minus-square"></i></a>
|
||||||
<input class="resource-content" type="text" name="system.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number"/>
|
<input class="resource-content" type="text" name="system.sante.vie.value" value="{{system.sante.vie.value}}" data-dtype="Number"/>
|
||||||
<span>/ {{data.sante.vie.max}}</span>
|
<span>/ {{system.sante.vie.max}}</span>
|
||||||
<a class="vie-plus"><i class="fas fa-plus-square"></i></a>
|
<a class="vie-plus"><i class="fas fa-plus-square"></i></a>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
@ -22,8 +22,8 @@
|
|||||||
<label class="compteur">
|
<label class="compteur">
|
||||||
<a class="jet-endurance">Endurance</a>
|
<a class="jet-endurance">Endurance</a>
|
||||||
<a class="endurance-moins"><i class="fas fa-minus-square"></i></a>
|
<a class="endurance-moins"><i class="fas fa-minus-square"></i></a>
|
||||||
<input class="resource-content" type="text" name="system.sante.endurance.value" value="{{data.sante.endurance.value}}" data-dtype="Number"/>
|
<input class="resource-content" type="text" name="system.sante.endurance.value" value="{{system.sante.endurance.value}}" data-dtype="Number"/>
|
||||||
<span>/ {{data.sante.endurance.max}}</span>
|
<span>/ {{system.sante.endurance.max}}</span>
|
||||||
<a class="endurance-plus"><i class="fas fa-plus-square"></i></a>
|
<a class="endurance-plus"><i class="fas fa-plus-square"></i></a>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
@ -32,8 +32,8 @@
|
|||||||
<span class="tooltiptext ttt-fatigue">{{{calc.fatigue.html}}}</span>
|
<span class="tooltiptext ttt-fatigue">{{{calc.fatigue.html}}}</span>
|
||||||
Fatigue
|
Fatigue
|
||||||
<a class="fatigue-moins"><i class="fas fa-minus-square"></i></a>
|
<a class="fatigue-moins"><i class="fas fa-minus-square"></i></a>
|
||||||
<input class="resource-content" id="fatigue-value" type="text" name="system.sante.fatigue.value" value="{{data.sante.fatigue.value}}" data-dtype="Number" />
|
<input class="resource-content" id="fatigue-value" type="text" name="system.sante.fatigue.value" value="{{system.sante.fatigue.value}}" data-dtype="Number" />
|
||||||
<span>/ {{data.sante.fatigue.max}}</span>
|
<span>/ {{system.sante.fatigue.max}}</span>
|
||||||
<a class="fatigue-plus"><i class="fas fa-plus-square"></i></a>
|
<a class="fatigue-plus"><i class="fas fa-plus-square"></i></a>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
@ -41,8 +41,8 @@
|
|||||||
<label class="compteur">
|
<label class="compteur">
|
||||||
<span class="ptreve-actuel"><a>Rêve</a></span>
|
<span class="ptreve-actuel"><a>Rêve</a></span>
|
||||||
<a class="ptreve-actuel-moins"><i class="fas fa-minus-square"></i></a>
|
<a class="ptreve-actuel-moins"><i class="fas fa-minus-square"></i></a>
|
||||||
<input class="resource-content" id="pointsreve-value" type="text" name="system.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number" />
|
<input class="resource-content" id="pointsreve-value" type="text" name="system.reve.reve.value" value="{{system.reve.reve.value}}" data-dtype="Number" />
|
||||||
<span>/ {{data.reve.seuil.value}}</span>
|
<span>/ {{system.reve.seuil.value}}</span>
|
||||||
<a class="ptreve-actuel-plus"><i class="fas fa-plus-square"></i></a>
|
<a class="ptreve-actuel-plus"><i class="fas fa-plus-square"></i></a>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<span class="encaisser-direct"><a title="Encaisser des dommages"><img class="button-img" src="icons/svg/bones.svg" alt="Encaisser des dommages"/></a></span>
|
<span class="encaisser-direct"><a title="Encaisser des dommages"><img class="button-img" src="icons/svg/bones.svg" alt="Encaisser des dommages"/></a></span>
|
||||||
<span class="gm-only remise-a-neuf"><a title="Remise à neuf"><img class="button-img" src="icons/svg/regen.svg" alt="Remise à neuf"/></a></span>
|
<span class="gm-only remise-a-neuf"><a title="Remise à neuf"><img class="button-img" src="icons/svg/regen.svg" alt="Remise à neuf"/></a></span>
|
||||||
<span class="repos"><a title="Repos"><img class="button-img" src="icons/svg/sleep.svg" alt="Se reposer"/></a></span>
|
<span class="repos"><a title="Repos"><img class="button-img" src="icons/svg/sleep.svg" alt="Se reposer"/></a></span>
|
||||||
{{#if data.attributs.hautrevant.value}}
|
{{#if system.attributs.hautrevant.value}}
|
||||||
<span class="monte-tmr"><a title="Montée dans les Terres Médianes !" {{#if hautreve.isDemiReve}}disabled{{/if}}><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg" alt="Montée dans les Terres Médianes !"/></a></span>
|
<span class="monte-tmr"><a title="Montée dans les Terres Médianes !" {{#if hautreve.isDemiReve}}disabled{{/if}}><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg" alt="Montée dans les Terres Médianes !"/></a></span>
|
||||||
<span class="monte-tmr-rapide"><a title="Montée accélérée dans les Terres Médianes !"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres Médianes !"/></a></span>
|
<span class="monte-tmr-rapide"><a title="Montée accélérée dans les Terres Médianes !"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres Médianes !"/></a></span>
|
||||||
<span class="visu-tmr"><a title="Regarder les Terres Médianes"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg" alt="Regarder les Terres Médianes"/></a></span>
|
<span class="visu-tmr"><a title="Regarder les Terres Médianes"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg" alt="Regarder les Terres Médianes"/></a></span>
|
||||||
@ -65,8 +65,8 @@
|
|||||||
<span>{{calc.resumeBlessures}}</span>
|
<span>{{calc.resumeBlessures}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span>{{data.compteurs.etat.label}}: {{data.compteurs.etat.value}}</span>
|
<span>{{system.compteurs.etat.label}}: {{system.compteurs.etat.value}}</span>
|
||||||
<span>{{data.compteurs.surenc.label}}: {{data.compteurs.surenc.value}}</span>
|
<span>{{system.compteurs.surenc.label}}: {{system.compteurs.surenc.value}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-effects-partial.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-effects-partial.html"}}
|
||||||
@ -100,7 +100,7 @@
|
|||||||
<div class="grid grid-2col">
|
<div class="grid grid-2col">
|
||||||
<div class="flex-group-left flexcol">
|
<div class="flex-group-left flexcol">
|
||||||
<ul class="carac-list alterne-list">
|
<ul class="carac-list alterne-list">
|
||||||
{{#each data.carac as |carac key|}}
|
{{#each system.carac as |carac key|}}
|
||||||
{{#if carac.isLevelUp}}
|
{{#if carac.isLevelUp}}
|
||||||
<li class="caracteristique flexrow item-list xp-level-up" data-attribute="{{key}}">
|
<li class="caracteristique flexrow item-list xp-level-up" data-attribute="{{key}}">
|
||||||
{{else}}
|
{{else}}
|
||||||
@ -149,10 +149,10 @@
|
|||||||
<ul class="carac-list">
|
<ul class="carac-list">
|
||||||
<li class="caracteristique flexrow list-item">
|
<li class="caracteristique flexrow list-item">
|
||||||
<span class="carac-label" name="beaute">Beauté :</span>
|
<span class="carac-label" name="beaute">Beauté :</span>
|
||||||
<input class="description-value" type="text" name="system.beaute" value="{{data.beaute}}" data-dtype="String" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
<input class="description-value" type="text" name="system.beaute" value="{{system.beaute}}" data-dtype="String" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||||
<label class="carac-xp"/>
|
<label class="carac-xp"/>
|
||||||
</li>
|
</li>
|
||||||
{{#each data.attributs as |attr key|}}
|
{{#each system.attributs as |attr key|}}
|
||||||
{{#unless (eq key 'hautrevant')}}
|
{{#unless (eq key 'hautrevant')}}
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label" name="system.attributs.{{key}}.label">{{attr.label}} :</span>
|
<span class="carac-label" name="system.attributs.{{key}}.label">{{attr.label}} :</span>
|
||||||
@ -169,10 +169,10 @@
|
|||||||
<ul class="carac-list alterne-list">
|
<ul class="carac-list alterne-list">
|
||||||
<li class="caracteristique flexrow list-item">
|
<li class="caracteristique flexrow list-item">
|
||||||
<span class="attribut-label chance-actuelle"><a>Chance actuelle</a></span>
|
<span class="attribut-label chance-actuelle"><a>Chance actuelle</a></span>
|
||||||
<input class="description-value compteur-edit" type="text" name="chance" value="{{data.compteurs.chance.value}}" data-dtype="number"/>
|
<input class="description-value compteur-edit" type="text" name="chance" value="{{system.compteurs.chance.value}}" data-dtype="number"/>
|
||||||
<span class="utiliser-attribut" style="padding-left: 5px"><a class="chance-appel">Utiliser</a></span>
|
<span class="utiliser-attribut" style="padding-left: 5px"><a class="chance-appel">Utiliser</a></span>
|
||||||
</li>
|
</li>
|
||||||
{{#each data.compteurs as |compteur key|}}
|
{{#each system.compteurs as |compteur key|}}
|
||||||
{{#if (eq compteur.label 'Chance')}}
|
{{#if (eq compteur.label 'Chance')}}
|
||||||
{{else if (eq compteur.label 'Experience')}}
|
{{else if (eq compteur.label 'Experience')}}
|
||||||
{{else if compteur.isInput}}
|
{{else if compteur.isInput}}
|
||||||
@ -240,7 +240,7 @@
|
|||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.tir) categorie="Compétences de Tir"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.tir) categorie="Compétences de Tir"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.lancer) categorie="Compétences de Lancer"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.lancer) categorie="Compétences de Lancer"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.connaissance) categorie="Connaissances"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.connaissance) categorie="Connaissances"}}
|
||||||
{{#if (or data.attributs.hautrevant.value options.vueDetaillee)}}
|
{{#if (or system.attributs.hautrevant.value options.vueDetaillee)}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.draconic) categorie="Draconic"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.draconic) categorie="Draconic"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
@ -248,7 +248,7 @@
|
|||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<span class="generic-label">Stress transformé</span>
|
<span class="generic-label">Stress transformé</span>
|
||||||
<input class="compteur-edit" type="text" name="experience" value="{{data.compteurs.experience.value}}" data-dtype="number" size="3"/>
|
<input class="compteur-edit" type="text" name="experience" value="{{system.compteurs.experience.value}}" data-dtype="number" size="3"/>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
@ -444,13 +444,13 @@
|
|||||||
{{!-- hautreve Tab --}}
|
{{!-- hautreve Tab --}}
|
||||||
<div class="tab hautreve " data-group="primary" data-tab="hautreve" style="height:200px">
|
<div class="tab hautreve " data-group="primary" data-tab="hautreve" style="height:200px">
|
||||||
<div>
|
<div>
|
||||||
{{#if data.attributs.hautrevant.value}}
|
{{#if system.attributs.hautrevant.value}}
|
||||||
<h3>Haut rêvant</h3>
|
<h3>Haut rêvant</h3>
|
||||||
{{else}}
|
{{else}}
|
||||||
<h3>Vous n'avez pas le don de haut-rêve! Il faut attribuer la Tête de Dragon 'Don de Haut Rêve' si votre personnage est ou devient Haut-Rêvant.</h3>
|
<h3>Vous n'avez pas le don de haut-rêve! Il faut attribuer la Tête de Dragon 'Don de Haut Rêve' si votre personnage est ou devient Haut-Rêvant.</h3>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#if data.attributs.hautrevant.value}}
|
{{#if system.attributs.hautrevant.value}}
|
||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<span>
|
<span>
|
||||||
@ -464,23 +464,23 @@
|
|||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
<span class="competence-label flex-shrink">Demi rêve :
|
<span class="competence-label flex-shrink">Demi rêve :
|
||||||
<span>{{caseTmr-label data.reve.tmrpos.coord}}</span>
|
<span>{{caseTmr-label system.reve.tmrpos.coord}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<input class="competence-value" type="text" name="system.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/>
|
<input class="competence-value" type="text" name="system.reve.tmrpos.coord" value="{{system.reve.tmrpos.coord}}" data-dtype="String"/>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="competence-label flex-shrink">Demi rêve :
|
<span class="competence-label flex-shrink">Demi rêve :
|
||||||
{{#unless hautreve.cacheTMR}}
|
{{#unless hautreve.cacheTMR}}
|
||||||
<span>{{caseTmr-label data.reve.tmrpos.coord}}</span>
|
<span>{{caseTmr-label system.reve.tmrpos.coord}}</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
{{#if hautreve.cacheTMR}}
|
{{#if hautreve.cacheTMR}}
|
||||||
??
|
??
|
||||||
{{else}}
|
{{else}}
|
||||||
{{data.reve.tmrpos.coord}}
|
{{system.reve.tmrpos.coord}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -490,9 +490,9 @@
|
|||||||
<span class="competence-label">Seuil de Rêve :</span>
|
<span class="competence-label">Seuil de Rêve :</span>
|
||||||
<span>
|
<span>
|
||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
<input class="seuil-reve-value" type="text" name="system.reve.seuil.value" value="{{data.reve.seuil.value}}" data-dtype="Number"/>
|
<input class="seuil-reve-value" type="text" name="system.reve.seuil.value" value="{{system.reve.seuil.value}}" data-dtype="Number"/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{data.reve.seuil.value}}
|
{{system.reve.seuil.value}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@ -500,9 +500,9 @@
|
|||||||
<span class="competence-label">Refoulement : </span>
|
<span class="competence-label">Refoulement : </span>
|
||||||
<span>
|
<span>
|
||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
<input class="competence-value" type="text" name="system.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/>
|
<input class="competence-value" type="text" name="system.reve.refoulement.value" value="{{system.reve.refoulement.value}}" data-dtype="Number"/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{data.reve.refoulement.value}}
|
{{system.reve.refoulement.value}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
@ -562,7 +562,7 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if data.attributs.hautrevant.value}}
|
{{#if system.attributs.hautrevant.value}}
|
||||||
{{#if (and options.isGM signesdraconiques.length)}}
|
{{#if (and options.isGM signesdraconiques.length)}}
|
||||||
<h3>Signes draconiques</h3>
|
<h3>Signes draconiques</h3>
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
@ -676,50 +676,50 @@
|
|||||||
<article class="flexrow">
|
<article class="flexrow">
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label for="data.race">Race :</label>
|
<label for="system.race">Race :</label>
|
||||||
<input class="flex-grow" type="text" name="system.race" value="{{data.race}}" data-dtype="String"/>
|
<input class="flex-grow" type="text" name="system.race" value="{{system.race}}" data-dtype="String"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label for="data.sexe">Sexe :</label>
|
<label for="system.sexe">Sexe :</label>
|
||||||
<input class="flex-grow" type="text" name="system.sexe" value="{{data.sexe}}" data-dtype="String"/>
|
<input class="flex-grow" type="text" name="system.sexe" value="{{system.sexe}}" data-dtype="String"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label for="data.age">Age :</label>
|
<label for="system.age">Age :</label>
|
||||||
<input class="flex-grow" type="text" name="system.age" value="{{data.age}}" data-dtype="String"/>
|
<input class="flex-grow" type="text" name="system.age" value="{{system.age}}" data-dtype="String"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label for="data.poids">Poids :</label>
|
<label for="system.poids">Poids :</label>
|
||||||
<input class="flex-grow" type="text" name="system.poids" value="{{data.poids}}" data-dtype="String"/>
|
<input class="flex-grow" type="text" name="system.poids" value="{{system.poids}}" data-dtype="String"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label for="data.taille">Taille :</label>
|
<label for="system.taille">Taille :</label>
|
||||||
<input class="flex-grow" type="text" name="system.taille" value="{{data.taille}}" data-dtype="String"/>
|
<input class="flex-grow" type="text" name="system.taille" value="{{system.taille}}" data-dtype="String"/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label for="data.main">Main directrice :</label>
|
<label for="system.main">Main directrice :</label>
|
||||||
<input type="text" name="system.main" value="{{data.main}}" data-dtype="String"/>
|
<input type="text" name="system.main" value="{{system.main}}" data-dtype="String"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label for="data.heure">Heure de naissance :</label>
|
<label for="system.heure">Heure de naissance :</label>
|
||||||
<select type="text" name="system.heure" value="{{data.heure}}" data-dtype="String">
|
<select type="text" name="system.heure" value="{{system.heure}}" data-dtype="String">
|
||||||
{{#select data.heure}}
|
{{#select system.heure}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label>Beauté :</label>
|
<label>Beauté :</label>
|
||||||
<input type="text" value="{{data.beaute}}" data-dtype="String" disabled/>
|
<input type="text" value="{{system.beaute}}" data-dtype="String" disabled/>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label for="data.cheveux">Cheveux :</label>
|
<label for="system.cheveux">Cheveux :</label>
|
||||||
<input class="flex-grow" type="text" name="system.cheveux" value="{{data.cheveux}}" data-dtype="String"/>
|
<input class="flex-grow" type="text" name="system.cheveux" value="{{system.cheveux}}" data-dtype="String"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label for="data.yeux">Yeux :</label>
|
<label for="system.yeux">Yeux :</label>
|
||||||
<input class="flex-grow" type="text" name="system.yeux" value="{{data.yeux}}" data-dtype="String"/>
|
<input class="flex-grow" type="text" name="system.yeux" value="{{system.yeux}}" data-dtype="String"/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</article>
|
</article>
|
||||||
@ -727,16 +727,16 @@
|
|||||||
<article class="flexcol">
|
<article class="flexcol">
|
||||||
<h3>Biographie : </h3>
|
<h3>Biographie : </h3>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor data.biographie target="system.biographie" button=true owner=owner editable=editable}}
|
{{editor system.biographie target="system.biographie" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
<h3>Notes : </h3>
|
<h3>Notes : </h3>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor data.notes target="system.notes" button=true owner=owner editable=editable}}
|
{{editor system.notes target="system.notes" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
<h3>Journal d'Experience</h3>
|
<h3>Journal d'Experience</h3>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
{{#each data.experiencelog as |xp key|}}
|
{{#each system.experiencelog as |xp key|}}
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<label class="flex-shrink">{{xp.mode}} </label>
|
<label class="flex-shrink">{{xp.mode}} </label>
|
||||||
<label class="flex-grow">{{xp.valeur}} {{xp.raison}} </label>
|
<label class="flex-grow">{{xp.valeur}} {{xp.raison}} </label>
|
||||||
|
@ -28,38 +28,38 @@
|
|||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label flexrow" name="categorie">Catégorie</span>
|
<span class="carac-label flexrow" name="categorie">Catégorie</span>
|
||||||
<select name="system.categorie" class="categorie" data-dtype="String">
|
<select name="system.categorie" class="categorie" data-dtype="String">
|
||||||
{{#select data.categorie}}
|
{{#select system.categorie}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-vehicule.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-vehicule.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label flexrow" name="categorie">Résistance</span>
|
<span class="carac-label flexrow" name="categorie">Résistance</span>
|
||||||
<input class="competence-value flexrow" type="text" name="system.resistance" value="{{data.resistance}}" data-dtype="Number" />
|
<input class="competence-value flexrow" type="text" name="system.resistance" value="{{system.resistance}}" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label flexrow" name="categorie">Structure</span>
|
<span class="carac-label flexrow" name="categorie">Structure</span>
|
||||||
<input class="competence-value flexrow" type="text" name="system.structure" value="{{data.structure}}" data-dtype="Number" />
|
<input class="competence-value flexrow" type="text" name="system.structure" value="{{system.structure}}" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label flexrow" name="categorie">Vitesse</span>
|
<span class="carac-label flexrow" name="categorie">Vitesse</span>
|
||||||
<input class="competence-value flexrow" type="text" name="system.vitesse" value="{{data.vitesse}}" data-dtype="String" />
|
<input class="competence-value flexrow" type="text" name="system.vitesse" value="{{system.vitesse}}" data-dtype="String" />
|
||||||
</li>
|
</li>
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label flexrow" name="categorie">Bonus</span>
|
<span class="carac-label flexrow" name="categorie">Bonus</span>
|
||||||
<input class="competence-value flexrow" type="text" name="system.bonus" value="{{data.bonus}}" data-dtype="String" />
|
<input class="competence-value flexrow" type="text" name="system.bonus" value="{{system.bonus}}" data-dtype="String" />
|
||||||
</li>
|
</li>
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label flexrow" name="categorie">Manoeuvrabilité</span>
|
<span class="carac-label flexrow" name="categorie">Manoeuvrabilité</span>
|
||||||
<input class="competence-value flexrow" type="text" name="system.manoeuvrabilite" value="{{data.manoeuvrabilite}}" data-dtype="String" />
|
<input class="competence-value flexrow" type="text" name="system.manoeuvrabilite" value="{{system.manoeuvrabilite}}" data-dtype="String" />
|
||||||
</li>
|
</li>
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label flexrow" name="categorie">Equipage</span>
|
<span class="carac-label flexrow" name="categorie">Equipage</span>
|
||||||
<input class="competence-value flexrow" type="text" name="system.equipage" value="{{data.equipage}}" data-dtype="Number" />
|
<input class="competence-value flexrow" type="text" name="system.equipage" value="{{system.equipage}}" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
<li class="caracteristique flexrow list-item" data-attribute="{{key}}">
|
||||||
<span class="carac-label flexrow" name="categorie">Capacité d'Encombrement</span>
|
<span class="carac-label flexrow" name="categorie">Capacité d'Encombrement</span>
|
||||||
<input class="competence-value flexrow" type="text" name="system.capacite_encombrement" value="{{data.capacite_encombrement}}" data-dtype="Number" />
|
<input class="competence-value flexrow" type="text" name="system.capacite_encombrement" value="{{system.capacite_encombrement}}" data-dtype="Number" />
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
@ -75,7 +75,7 @@
|
|||||||
{{!-- Biography Tab --}}
|
{{!-- Biography Tab --}}
|
||||||
<div class="tab description" data-group="primary" data-tab="description">
|
<div class="tab description" data-group="primary" data-tab="description">
|
||||||
<div class="form-group editor">
|
<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>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
{{#if vendeur}}à {{vendeur.name}}{{/if}}:
|
{{#if vendeur}}à {{vendeur.name}}{{/if}}:
|
||||||
{{quantiteTotal}} {{item.name}} pour {{prixTotal}} sols.
|
{{quantiteTotal}} {{item.name}} pour {{prixTotal}} sols.
|
||||||
</p>
|
</p>
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.html" item.data}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.html" item.system}}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<img class="chat-icon" src="{{img}}" alt="potion de repos" />
|
<img class="chat-icon" src="{{img}}" alt="potion de repos" />
|
||||||
<h4>
|
<h4>
|
||||||
{{alias}} a bu une <strong>{{name}}{{#if data.magique}} enchantée{{/if}}</strong>
|
{{alias}} a bu une <strong>{{name}}{{#if system.magique}} enchantée{{/if}}</strong>
|
||||||
</h4>
|
</h4>
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div>
|
||||||
{{#if data.magique}}
|
{{#if system.magique}}
|
||||||
Le Jet de Résistance est {{#if rolled.isSuccess}}réussi{{else}}échoué{{/if}}.
|
Le Jet de Résistance est {{#if rolled.isSuccess}}réussi{{else}}échoué{{/if}}.
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<br>Les effets de la potions sont à gérer manuellement, en fonction de sa nature
|
<br>Les effets de la potions sont à gérer manuellement, en fonction de sa nature
|
||||||
{{#if data.magique}}
|
{{#if system.magique}}
|
||||||
{{#if rolled.isEchec}}et de son enchantement ({{data.pr}} Points de Rêve)
|
{{#if rolled.isEchec}}et de son enchantement ({{system.pr}} Points de Rêve)
|
||||||
{{else}}son enchantement n'a pas d'effet
|
{{else}}son enchantement n'a pas d'effet
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}.
|
{{/if}}.
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
<img class="chat-icon" src="{{img}}" alt="potion de repos" />
|
<img class="chat-icon" src="{{img}}" alt="potion de repos" />
|
||||||
<h4>
|
<h4>
|
||||||
{{alias}} a bu une <strong>{{name}}{{#if data.magique}} enchantée{{/if}}</strong>
|
{{alias}} a bu une <strong>{{name}}{{#if system.magique}} enchantée{{/if}}</strong>
|
||||||
</h4>
|
</h4>
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div>
|
||||||
{{#if data.magique}}
|
{{#if system.magique}}
|
||||||
Le Jet de Résistance est {{#if rolled.isSuccess}}réussi{{else}}échoué{{/if}}.
|
Le Jet de Résistance est {{#if rolled.isSuccess}}réussi{{else}}échoué{{/if}}.
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||||
{{#if rolled.isEchec}}
|
{{#if rolled.isEchec}}
|
||||||
<br>La potion fait effet !
|
<br>La potion fait effet !
|
||||||
{{alias}} a perdu 1 point de rêve et s'endort pour {{guerisonDureeValue}} {{guerisonDureeUnite}} et
|
{{alias}} a perdu 1 point de rêve et s'endort pour {{guerisonDureeValue}} {{guerisonDureeUnite}} et
|
||||||
se récupère {{caseFatigueReel}} cases de fatigue.<br>
|
se récupère {{caseFatigueReel}} cases de fatigue.<br>
|
||||||
{{#if data.reposalchimique}}
|
{{#if system.reposalchimique}}
|
||||||
De plus, la potion étant alchimique, {{alias}} est en aphasie pendant cette durée.
|
De plus, la potion étant alchimique, {{alias}} est en aphasie pendant cette durée.
|
||||||
{{#if aphasiePermanente}}
|
{{#if aphasiePermanente}}
|
||||||
Malheureusement, l'aphasie est permanente tant que {{alias}} ne réussit pas un jet de VOLONTE à 0 à Chateau Dormant (le moral compte).
|
Malheureusement, l'aphasie est permanente tant que {{alias}} ne réussit pas un jet de VOLONTE à 0 à Chateau Dormant (le moral compte).
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<br>La potion ne fait pas effet ! Elle vous octroie tout de même un bonus de {{data.herbebonus}} segments de fatigue récupérés en plus à la fin de Chateau Dormant (à gérer manuellement).
|
<br>La potion ne fait pas effet ! Elle vous octroie tout de même un bonus de {{system.herbebonus}} segments de fatigue récupérés en plus à la fin de Chateau Dormant (à gérer manuellement).
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
Une fois consommée (vers fin Lyre), elle vous octroie un bonus de {{data.herbebonus}} segments de fatigue récupérés en plus à la fin de Chateau Dormant (à gérer manuellement).
|
Une fois consommée (vers fin Lyre), elle vous octroie un bonus de {{system.herbebonus}} segments de fatigue récupérés en plus à la fin de Chateau Dormant (à gérer manuellement).
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<br>La potion a été supprimée de l'équipement.
|
<br>La potion a été supprimée de l'équipement.
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<img class="chat-icon" src="{{img}}" alt="potion de soin" />
|
<img class="chat-icon" src="{{img}}" alt="potion de soin" />
|
||||||
<h4>
|
<h4>
|
||||||
{{alias}} a bu une <strong>{{name}}{{#if data.magique}} enchantée{{/if}}</strong>
|
{{alias}} a bu une <strong>{{name}}{{#if system.magique}} enchantée{{/if}}</strong>
|
||||||
</h4>
|
</h4>
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div>
|
||||||
{{#if data.magique}}
|
{{#if system.magique}}
|
||||||
Le Jet de Résistance est {{#if rolled.isSuccess}}réussi{{else}}échoué{{/if}}.
|
Le Jet de Résistance est {{#if rolled.isSuccess}}réussi{{else}}échoué{{/if}}.
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||||
{{#if rolled.isEchec}}
|
{{#if rolled.isEchec}}
|
||||||
@ -16,10 +16,10 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
{{else}}
|
{{else}}
|
||||||
<br>La potion ne fait pas effet ! Lors de votre prochain jet de récupération à Chateau Dormant, vous bénéficierez d'un bonus de {{data.herbebonus}} (appliqué automatiquement).
|
<br>La potion ne fait pas effet ! Lors de votre prochain jet de récupération à Chateau Dormant, vous bénéficierez d'un bonus de {{system.herbebonus}} (appliqué automatiquement).
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
Lors de votre prochain jet de récupération à Chateau Dormant, vous bénéficierez d'un bonus de {{data.herbebonus}} (appliqué automatiquement).
|
Lors de votre prochain jet de récupération à Chateau Dormant, vous bénéficierez d'un bonus de {{system.herbebonus}} (appliqué automatiquement).
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<br>La potion a été supprimée de l'équipement.
|
<br>La potion a été supprimée de l'équipement.
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<form class="skill-roll-dialog">
|
<form class="skill-roll-dialog">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Fabriquer une potion de {{data.categorie}} de {{name}}</label>
|
<label>Fabriquer une potion de {{system.categorie}} de {{name}}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<div id="tableAjustements" class="flexrow"></div>
|
<div id="tableAjustements" class="flexrow"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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 id="tableResolution"></div>
|
<div id="tableResolution"></div>
|
||||||
<div id="tableProbaReussite"></div>
|
<div id="tableProbaReussite"></div>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label>
|
<label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label>
|
||||||
<label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.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>
|
</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>
|
||||||
<div class="flex-group-left">
|
<div class="flex-group-left">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffFixe.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffFixe.html"}}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<div id="tableAjustements" class="flexrow"></div>
|
<div id="tableAjustements" class="flexrow"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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 id="tableResolution"></div>
|
<div id="tableResolution"></div>
|
||||||
<div id="tableProbaReussite"></div>
|
<div id="tableProbaReussite"></div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -9,85 +9,85 @@
|
|||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.competence">Compétence associée</label>
|
<label for="system.competence">Compétence associée</label>
|
||||||
<select name="data.competence" id="competence" data-dtype="String">
|
<select name="system.competence" id="competence" data-dtype="String">
|
||||||
{{#select data.competence}}
|
{{#select system.competence}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.dommages">Dommages </label>
|
<label for="system.dommages">Dommages </label>
|
||||||
<input class="attribute-value" type="text" name="data.dommages" value="{{data.dommages}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.dommages" value="{{system.dommages}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.resistance">Résistance </label>
|
<label for="system.resistance">Résistance </label>
|
||||||
<input class="attribute-value" type="text" name="data.resistance" value="{{data.resistance}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.resistance" value="{{system.resistance}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.categorie_parade">Catégorie parade </label>
|
<label for="system.categorie_parade">Catégorie parade </label>
|
||||||
<select name="data.categorie_parade" id="categorie_parade" data-dtype="String">
|
<select name="system.categorie_parade" id="categorie_parade" data-dtype="String">
|
||||||
{{#select data.categorie_parade}}
|
{{#select system.categorie_parade}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-parade.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-parade.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.encombrement">Encombrement </label>
|
<label for="system.encombrement">Encombrement </label>
|
||||||
<input class="attribute-value" type="text" name="data.encombrement" value="{{data.encombrement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.force">Force min. </label>
|
<label for="system.force">Force min. </label>
|
||||||
<input class="attribute-value" type="text" name="data.force" value="{{data.force}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.force" value="{{system.force}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.rapide">Arme rapide ? </label>
|
<label for="system.rapide">Arme rapide ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="data.rapide" {{#if data.rapide}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.rapide" {{#if system.rapide}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.unemain">A Une main ? </label>
|
<label for="system.unemain">A Une main ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="data.unemain" {{#if data.unemain}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.unemain" {{#if system.unemain}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.deuxmains">A Deux mains ? </label>
|
<label for="system.deuxmains">A Deux mains ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="data.deuxmains" {{#if data.deuxmains}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.deuxmains" {{#if system.deuxmains}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.portee_courte">Portée courte </label>
|
<label for="system.portee_courte">Portée courte </label>
|
||||||
<input class="attribute-value" type="text" name="data.portee_courte" value="{{data.portee_courte}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.portee_courte" value="{{system.portee_courte}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.portee_moyenne">Portée moyenne </label>
|
<label for="system.portee_moyenne">Portée moyenne </label>
|
||||||
<input class="attribute-value" type="text" name="data.portee_moyenne" value="{{data.portee_moyenne}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.portee_moyenne" value="{{system.portee_moyenne}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.portee_extreme">Portée extrême </label>
|
<label for="system.portee_extreme">Portée extrême </label>
|
||||||
<input class="attribute-value" type="text" name="data.portee_extreme" value="{{data.portee_extreme}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.portee_extreme" value="{{system.portee_extreme}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.penetration">Pénétration </label>
|
<label for="system.penetration">Pénétration </label>
|
||||||
<input class="attribute-value" type="text" name="data.penetration" value="{{data.penetration}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.penetration" value="{{system.penetration}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label for="data.cout">Prix (sols) </label>
|
<label for="system.cout">Prix (sols) </label>
|
||||||
<input class="attribute-value" type="text" name="data.cout" value="{{data.cout}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.magique">Magique ? </label>
|
<label for="system.magique">Magique ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="data.magique" {{#if data.magique}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.magique" {{#if system.magique}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-magique">
|
<div class="form-group item-magique">
|
||||||
<label for="data.resistance_magique">Résistance magique </label>
|
<label for="system.resistance_magique">Résistance magique </label>
|
||||||
<input class="attribute-value" type="text" name="data.resistance_magique" value="{{data.resistance_magique}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.resistance_magique" value="{{system.resistance_magique}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-magique">
|
<div class="form-group item-magique">
|
||||||
<label for="data.ecaille_efficacite">Nombre d'Ecailles d'Efficacité </label>
|
<label for="system.ecaille_efficacite">Nombre d'Ecailles d'Efficacité </label>
|
||||||
<input class="attribute-value" type="text" name="data.ecaille_efficacite" value="{{data.ecaille_efficacite}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.ecaille_efficacite" value="{{system.ecaille_efficacite}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.initpremierround">Classe d'initiative au premier round (mêlée seulement) </label>
|
<label for="system.initpremierround">Classe d'initiative au premier round (mêlée seulement) </label>
|
||||||
<select name="data.initpremierround" id="initpremierround" data-dtype="String">
|
<select name="system.initpremierround" id="initpremierround" data-dtype="String">
|
||||||
{{#select data.initpremierround}}
|
{{#select system.initpremierround}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-initpremierround.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-initpremierround.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
@ -10,23 +10,23 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Protection</label>
|
<label for="xp">Protection</label>
|
||||||
<input class="attribute-value" type="text" name="data.protection" value="{{data.protection}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.protection" value="{{system.protection}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Encombrement </label>
|
<label for="xp">Encombrement </label>
|
||||||
<input class="attribute-value" type="text" name="data.encombrement" value="{{data.encombrement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Détérioration</label>
|
<label for="xp">Détérioration</label>
|
||||||
<input class="attribute-value" type="text" name="data.deterioration" value="{{data.deterioration}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.deterioration" value="{{system.deterioration}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Malus Armure </label>
|
<label for="xp">Malus Armure </label>
|
||||||
<input class="attribute-value" type="text" name="data.malus" value="{{data.malus}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.malus" value="{{system.malus}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label for="xp">Prix (sols) </label>
|
<label for="xp">Prix (sols) </label>
|
||||||
<input class="attribute-value" type="text" name="data.cout" value="{{data.cout}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -10,12 +10,12 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="niveau">Coordonnées TMR </label>
|
<label for="niveau">Coordonnées TMR </label>
|
||||||
<input class="attribute-value" type="text" name="data.coord" value="{{data.coord}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.coord" value="{{system.coord}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="niveau">Mode spécifique</label>
|
<label for="niveau">Mode spécifique</label>
|
||||||
<select name="data.specific" id="specific" data-dtype="String">
|
<select name="system.specific" id="specific" data-dtype="String">
|
||||||
{{#select data.specific}}
|
{{#select system.specific}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/casetmr-specific-list.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/casetmr-specific-list.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">Niveau</label>
|
<label class="alchimie-title" for="xp">Niveau</label>
|
||||||
<input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Référence / Auteur</label>
|
<label>Référence / Auteur</label>
|
||||||
<input class="attribute-value" type="text" name="data.reference" value="{{data.reference}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -17,52 +17,52 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Catégorie </label>
|
<label>Catégorie </label>
|
||||||
<select name="system.categorie" class="categorie" data-dtype="String">
|
<select name="system.categorie" class="categorie" data-dtype="String">
|
||||||
{{#select data.categorie}}
|
{{#select system.categorie}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-competence.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-competence.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="niveau">Niveau </label>
|
<label for="niveau">Niveau </label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">XP </label>
|
<label for="xp">XP </label>
|
||||||
<input class="attribute-value sheet-competence-xp" type="text" name="system.xp" value="{{data.xp}}" data-dtype="Number"/>
|
<input class="attribute-value sheet-competence-xp" type="text" name="system.xp" value="{{system.xp}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="base">Niveau de base </label>
|
<label for="base">Niveau de base </label>
|
||||||
{{#if isGM}}
|
{{#if isGM}}
|
||||||
<select name="system.base" id="base" data-dtype="Number">
|
<select name="system.base" id="base" data-dtype="Number">
|
||||||
{{#select data.base}}
|
{{#select system.base}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-base.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-base.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
{{else}}
|
{{else}}
|
||||||
<label id="base">{{data.base}}</label>
|
<label id="base">{{system.base}}</label>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="defaut_carac">Caractéristique par défaut </label>
|
<label for="defaut_carac">Caractéristique par défaut </label>
|
||||||
<select name="system.defaut_carac" id="defaut_carac" data-dtype="String">
|
<select name="system.defaut_carac" id="defaut_carac" data-dtype="String">
|
||||||
{{#select data.defaut_carac}}
|
{{#select system.defaut_carac}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="default_diffLibre">Difficulté libre par défaut</label>
|
<label for="default_diffLibre">Difficulté libre par défaut</label>
|
||||||
<input class="attribute-value" type="text" name="system.default_diffLibre" value="{{data.default_diffLibre}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.default_diffLibre" value="{{system.default_diffLibre}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{#if (eq data.categorie 'draconic')}}
|
{{#if (eq system.categorie 'draconic')}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">XP Sort </label>
|
<label for="xp">XP Sort </label>
|
||||||
<input class="attribute-value" type="text" name="system.xp_sort" value="{{data.xp_sort}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.xp_sort" value="{{system.xp_sort}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="niveau_archetype">Niveau d'Archetype</label>
|
<label for="niveau_archetype">Niveau d'Archetype</label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau_archetype" value="{{data.niveau_archetype}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau_archetype" value="{{system.niveau_archetype}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -10,39 +10,39 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="niveau">Niveau </label>
|
<label for="niveau">Niveau </label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="niveau">Valeur de Caractéristique </label>
|
<label for="niveau">Valeur de Caractéristique </label>
|
||||||
<input class="attribute-value" type="text" name="system.carac_value" value="{{data.carac_value}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.carac_value" value="{{system.carac_value}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="default_diffLibre">Difficulté libre par défaut</label>
|
<label for="default_diffLibre">Difficulté libre par défaut</label>
|
||||||
<input class="attribute-value" type="text" name="system.default_diffLibre" value="{{data.default_diffLibre}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.default_diffLibre" value="{{system.default_diffLibre}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Arme ? </label>
|
<label for="xp">Arme ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.iscombat" {{#if data.iscombat}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.iscombat" {{#if system.iscombat}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Parade ? </label>
|
<label for="xp">Parade ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.isparade" {{#if data.isparade}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.isparade" {{#if system.isparade}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Possession ? </label>
|
<label for="xp">Possession ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.ispossession" {{#if data.ispossession}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.ispossession" {{#if system.ispossession}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Catégorie parade </label>
|
<label>Catégorie parade </label>
|
||||||
<select name="system.categorie_parade" id="categorie_parade" data-dtype="String">
|
<select name="system.categorie_parade" id="categorie_parade" data-dtype="String">
|
||||||
{{#select data.categorie_parade}}
|
{{#select system.categorie_parade}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-parade.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-parade.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="niveau">Dommages (+dom), si applicable </label>
|
<label for="niveau">Dommages (+dom), si applicable </label>
|
||||||
<input class="attribute-value" type="text" name="system.dommages" value="{{data.dommages}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.dommages" value="{{system.dommages}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -10,19 +10,19 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Encombrement </label>
|
<label for="xp">Encombrement </label>
|
||||||
<input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Capacite (points d'Encombrement portable)</label>
|
<label for="xp">Capacite (points d'Encombrement portable)</label>
|
||||||
<input class="attribute-value" type="text" name="system.capacite" value="{{data.capacite}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.capacite" value="{{system.capacite}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Qualité</label>
|
<label for="xp">Qualité</label>
|
||||||
<input class="attribute-value" type="text" name="system.qualite" value="{{data.qualite}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.qualite" value="{{system.qualite}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label for="xp">Prix (sols) </label>
|
<label for="xp">Prix (sols) </label>
|
||||||
<input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{#if isOwned}}
|
{{#if isOwned}}
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">Type</label>
|
<label class="alchimie-title" for="xp">Type</label>
|
||||||
<select name="system.type" data-dtype="String">
|
<select name="system.type" data-dtype="String">
|
||||||
{{#select data.type}}
|
{{#select system.type}}
|
||||||
<option value="recreative">Récréative</option>
|
<option value="recreative">Récréative</option>
|
||||||
<option value="soliste">Soliste</option>
|
<option value="soliste">Soliste</option>
|
||||||
{{/select}}
|
{{/select}}
|
||||||
@ -19,19 +19,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">Agilité ?</label>
|
<label class="alchimie-title" for="xp">Agilité ?</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.agilite" {{#if data.agilite}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.agilite" {{#if system.agilite}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">Apparence ?</label>
|
<label class="alchimie-title" for="xp">Apparence ?</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.apparence" {{#if data.apparence}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.apparence" {{#if system.apparence}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">Niveau</label>
|
<label class="alchimie-title" for="xp">Niveau</label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Référence / Auteur</label>
|
<label>Référence / Auteur</label>
|
||||||
<input class="attribute-value" type="text" name="system.reference" value="{{data.reference}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -11,42 +11,42 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Type</label>
|
<label>Type</label>
|
||||||
<select name="system.type" id="type" data-dtype="String">
|
<select name="system.type" id="type" data-dtype="String">
|
||||||
{{#select data.type}}
|
{{#select system.type}}
|
||||||
{{{gemmeTypeList}}}
|
{{{gemmeTypeList}}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Taille</label>
|
<label>Taille</label>
|
||||||
<input class="attribute-value" type="text" name="system.taille" value="{{data.taille}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.taille" value="{{system.taille}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Pureté</label>
|
<label>Pureté</label>
|
||||||
<input class="attribute-value" type="text" name="system.purete" value="{{data.purete}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.purete" value="{{system.purete}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Qualité</label>
|
<label>Qualité</label>
|
||||||
<input class="attribute-value" type="text" name="system.qualite" value="{{data.qualite}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.qualite" value="{{system.qualite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Encombrement</label>
|
<label>Encombrement</label>
|
||||||
<input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Quantité</label>
|
<label>Quantité</label>
|
||||||
<input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.quantite" value="{{system.quantite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Inertie</label>
|
<label>Inertie</label>
|
||||||
<input class="attribute-value" type="text" name="system.inertie" value="{{data.inertie}}" data-dtype="Number" disabled/>
|
<input class="attribute-value" type="text" name="system.inertie" value="{{system.inertie}}" data-dtype="Number" disabled/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Enchantabilité</label>
|
<label>Enchantabilité</label>
|
||||||
<input class="attribute-value" type="text" name="system.enchantabilite" value="{{data.enchantabilite}}" data-dtype="Number" disabled/>
|
<input class="attribute-value" type="text" name="system.enchantabilite" value="{{system.enchantabilite}}" data-dtype="Number" disabled/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Prix</label>
|
<label>Prix</label>
|
||||||
<input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number" disabled/>
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number" disabled/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -16,24 +16,24 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Niveau (si applicable)</label>
|
<label>Niveau (si applicable)</label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Quantité (Pépins ou Brins)</label>
|
<label>Quantité (Pépins ou Brins)</label>
|
||||||
<input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.quantite" value="{{system.quantite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label>Prix (sols)</label>
|
<label>Prix (sols)</label>
|
||||||
<input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Milieu</label>
|
<label>Milieu</label>
|
||||||
<input class="attribute-value" type="text" name="system.milieu" value="{{data.milieu}}" data-dtype="String" />
|
<input class="attribute-value" type="text" name="system.milieu" value="{{system.milieu}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Fréquence</label>
|
<label>Fréquence</label>
|
||||||
<select name="system.rarete" class="rarete" data-dtype="String">
|
<select name="system.rarete" class="rarete" data-dtype="String">
|
||||||
{{#select data.rarete}}
|
{{#select system.rarete}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Catégorie</label>
|
<label>Catégorie</label>
|
||||||
<select name="system.categorie" class="categorie" data-dtype="String">
|
<select name="system.categorie" class="categorie" data-dtype="String">
|
||||||
{{#select data.categorie}}
|
{{#select system.categorie}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-ingredient.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-ingredient.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
@ -11,29 +11,29 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Niveau (si applicable) </label>
|
<label>Niveau (si applicable) </label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Quantité (Pépins ou Brins)</label>
|
<label>Quantité (Pépins ou Brins)</label>
|
||||||
<input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.quantite" value="{{system.quantite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Encombrement</label>
|
<label>Encombrement</label>
|
||||||
<input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label>Prix (sols)</label>
|
<label>Prix (sols)</label>
|
||||||
<input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Milieu</label>
|
<label>Milieu</label>
|
||||||
<input class="attribute-value" type="text" name="system.milieu" value="{{data.milieu}}" data-dtype="String" />
|
<input class="attribute-value" type="text" name="system.milieu" value="{{system.milieu}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Fréquence</label>
|
<label>Fréquence</label>
|
||||||
<select name="system.rarete" class="rarete" data-dtype="String">
|
<select name="system.rarete" class="rarete" data-dtype="String">
|
||||||
{{#select data.rarete}}
|
{{#select system.rarete}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Catégorie</label>
|
<label>Catégorie</label>
|
||||||
<select name="system.categorie" class="categorie" data-dtype="String">
|
<select name="system.categorie" class="categorie" data-dtype="String">
|
||||||
{{#select data.categorie}}
|
{{#select system.categorie}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-ingredient.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-ingredient.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">Type</label>
|
<label class="alchimie-title" for="xp">Type</label>
|
||||||
<select name="system.type" data-dtype="String">
|
<select name="system.type" data-dtype="String">
|
||||||
{{#select data.type}}
|
{{#select system.type}}
|
||||||
<option value="adressehasard">Adresse/Hasard</option>
|
<option value="adressehasard">Adresse/Hasard</option>
|
||||||
<option value="de">Dés</option>
|
<option value="de">Dés</option>
|
||||||
<option value="carte">Cartes</option>
|
<option value="carte">Cartes</option>
|
||||||
@ -21,15 +21,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">Base</label>
|
<label class="alchimie-title" for="xp">Base</label>
|
||||||
<input class="attribute-value" type="text" name="system.base" value="{{data.base}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.base" value="{{system.base}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">Caractéristique/Compétence</label>
|
<label class="alchimie-title" for="xp">Caractéristique/Compétence</label>
|
||||||
<input class="attribute-value" type="text" name="system.caraccomp" value="{{data.caraccomp}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.caraccomp" value="{{system.caraccomp}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Référence / Auteur</label>
|
<label>Référence / Auteur</label>
|
||||||
<input class="attribute-value" type="text" name="system.reference" value="{{data.reference}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Auteur</label>
|
<label for="xp">Auteur</label>
|
||||||
<input class="attribute-value" type="text" name="system.auteur" value="{{data.auteur}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.auteur" value="{{system.auteur}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Compétence</label>
|
<label for="xp">Compétence</label>
|
||||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||||
{{#select data.competence}}
|
{{#select system.competence}}
|
||||||
{{#each competences as |competence key|}}
|
{{#each competences as |competence key|}}
|
||||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -29,35 +29,35 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Difficulté</label>
|
<label for="xp">Difficulté</label>
|
||||||
<input class="attribute-value" type="number" name="system.difficulte" value="{{data.difficulte}}" data-dtype="Number"/>
|
<input class="attribute-value" type="number" name="system.difficulte" value="{{system.difficulte}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Points de tâches</label>
|
<label for="xp">Points de tâches</label>
|
||||||
<input class="attribute-value" type="number" name="system.points_de_tache" value="{{data.points_de_tache}}" data-dtype="Number"/>
|
<input class="attribute-value" type="number" name="system.points_de_tache" value="{{system.points_de_tache}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Expérience</label>
|
<label for="xp">Expérience</label>
|
||||||
<input class="attribute-value" type="number" name="system.xp" value="{{data.xp}}" data-dtype="Number"/>
|
<input class="attribute-value" type="number" name="system.xp" value="{{system.xp}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Niveau minimum</label>
|
<label for="xp">Niveau minimum</label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau_minimum" value="{{data.niveau_minimum}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau_minimum" value="{{system.niveau_minimum}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Niveau maximum</label>
|
<label for="xp">Niveau maximum</label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau_maximum" value="{{data.niveau_maximum}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau_maximum" value="{{system.niveau_maximum}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Encombrement </label>
|
<label for="xp">Encombrement </label>
|
||||||
<input class="attribute-value" type="number" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="number" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Quantité </label>
|
<label>Quantité </label>
|
||||||
<input class="attribute-value" type="number" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" />
|
<input class="attribute-value" type="number" name="system.quantite" value="{{system.quantite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label for="xp">Prix (sols) </label>
|
<label for="xp">Prix (sols) </label>
|
||||||
<input class="attribute-value" type="number" name="system.cout" value="{{data.cout}}" data-dtype="Number"/>
|
<input class="attribute-value" type="number" name="system.cout" value="{{system.cout}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<header class="sheet-header">
|
<header class="sheet-header">
|
||||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
<div class="header-fields">
|
<div class="header-fields">
|
||||||
{{#if (or isGM data.identifie)}}
|
{{#if (or isGM system.identifie)}}
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
{{else}}
|
{{else}}
|
||||||
<h1 class="charname">Inconnue</h1>
|
<h1 class="charname">Inconnue</h1>
|
||||||
@ -12,31 +12,31 @@
|
|||||||
|
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{#if (or isGM data.identifie)}}
|
{{#if (or isGM system.identifie)}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Identifiée ? </label>
|
<label for="xp">Identifiée ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if data.identifie}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if system.identifie}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Malignité </label>
|
<label for="xp">Malignité </label>
|
||||||
<input class="attribute-value" type="text" name="system.malignite" value="{{data.malignite}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.malignite" value="{{system.malignite}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Périodicité</label>
|
<label for="xp">Périodicité</label>
|
||||||
<input class="attribute-value" type="text" name="system.periodicite" value="{{data.periodicite}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.periodicite" value="{{system.periodicite}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Dommages</label>
|
<label for="xp">Dommages</label>
|
||||||
<input class="attribute-value" type="text" name="system.dommages" value="{{data.dommages}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.dommages" value="{{system.dommages}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Remedes Connus ? </label>
|
<label for="xp">Remedes Connus ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if data.remedesconnus}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
{{#if (or isGM data.remedesconnus)}}
|
{{#if (or isGM system.remedesconnus)}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Remèdes </label>
|
<label for="xp">Remèdes </label>
|
||||||
<input class="attribute-value" type="text" name="system.remedes" value="{{data.remedes}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Compétence</label>
|
<label for="xp">Compétence</label>
|
||||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||||
{{#select data.competence}}
|
{{#select system.competence}}
|
||||||
{{#each competences as |competence key|}}
|
{{#each competences as |competence key|}}
|
||||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -20,36 +20,36 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Thème</label>
|
<label for="xp">Thème</label>
|
||||||
<input class="attribute-value" type="text" name="system.theme" value="{{data.theme}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.theme" value="{{system.theme}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Support</label>
|
<label for="xp">Support</label>
|
||||||
<input class="attribute-value" type="text" name="system.support" value="{{data.support}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.support" value="{{system.support}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Heure</label>
|
<label for="xp">Heure</label>
|
||||||
<select name="system.heure" id="heure" data-dtype="String">
|
<select name="system.heure" id="heure" data-dtype="String">
|
||||||
{{#select data.heure}}
|
{{#select system.heure}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Purification</label>
|
<label for="xp">Purification</label>
|
||||||
<input class="attribute-value" type="text" name="system.purification" value="{{data.purification}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.purification" value="{{system.purification}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Vêture</label>
|
<label for="xp">Vêture</label>
|
||||||
<input class="attribute-value" type="text" name="system.veture" value="{{data.veture}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.veture" value="{{system.veture}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Comportement</label>
|
<label for="xp">Comportement</label>
|
||||||
<input class="attribute-value" type="text" name="system.comportement" value="{{data.comportement}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.comportement" value="{{system.comportement}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Case TMR</label>
|
<label for="xp">Case TMR</label>
|
||||||
<select name="system.tmr" id="tmr" data-dtype="String">
|
<select name="system.tmr" id="tmr" data-dtype="String">
|
||||||
{{#select data.tmr}}
|
{{#select system.tmr}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<label for="xp">Malus</label>
|
<label for="xp">Malus</label>
|
||||||
{{#if isGM}}
|
{{#if isGM}}
|
||||||
<select name="system.malus" id="malus" data-dtype="Number">
|
<select name="system.malus" id="malus" data-dtype="Number">
|
||||||
{{#select data.malus}}
|
{{#select system.malus}}
|
||||||
<option value="0">0</option>
|
<option value="0">0</option>
|
||||||
<option value="-1">-1</option>
|
<option value="-1">-1</option>
|
||||||
<option value="-2">-2</option>
|
<option value="-2">-2</option>
|
||||||
@ -73,7 +73,7 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
{{else}}
|
{{else}}
|
||||||
<label>>{{data.malus}}</label>
|
<label>>{{system.malus}}</label>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -10,19 +10,19 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Quantité</label>
|
<label for="xp">Quantité</label>
|
||||||
<input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.quantite" value="{{system.quantite}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Valeur en Deniers</label>
|
<label for="xp">Valeur en Deniers</label>
|
||||||
{{#if isGM}}
|
{{#if isGM}}
|
||||||
<input class="attribute-value" type="text" name="system.valeur_deniers" value="{{data.valeur_deniers}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.valeur_deniers" value="{{system.valeur_deniers}}" data-dtype="Number"/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<label for="xp">{{data.valeur_deniers}}</label>
|
<label for="xp">{{system.valeur_deniers}}</label>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Encombrement</label>
|
<label for="xp">Encombrement</label>
|
||||||
<input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -10,19 +10,19 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Encombrement </label>
|
<label for="xp">Encombrement </label>
|
||||||
<input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Quantité </label>
|
<label>Quantité </label>
|
||||||
<input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.quantite" value="{{system.quantite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Qualité</label>
|
<label for="xp">Qualité</label>
|
||||||
<input class="attribute-value" type="text" name="system.qualite" value="{{data.qualite}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.qualite" value="{{system.qualite}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label for="xp">Prix (sols) </label>
|
<label for="xp">Prix (sols) </label>
|
||||||
<input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">Niveau</label>
|
<label class="alchimie-title" for="xp">Niveau</label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Référence / Auteur</label>
|
<label>Référence / Auteur</label>
|
||||||
<input class="attribute-value" type="text" name="system.reference" value="{{data.reference}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -10,19 +10,19 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Nombre</label>
|
<label for="xp">Nombre</label>
|
||||||
<input class="attribute-value" type="text" name="system.value" value="{{data.value}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.value" value="{{system.value}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Nombre valide ? </label>
|
<label for="xp">Nombre valide ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.istrue" {{#if data.istrue}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.istrue" {{#if system.istrue}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Index du jour concerné</label>
|
<label for="xp">Index du jour concerné</label>
|
||||||
<input class="attribute-value" type="text" name="system.jourindex" value="{{data.jourindex}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.jourindex" value="{{system.jourindex}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Label du jour</label>
|
<label for="xp">Label du jour</label>
|
||||||
<input class="attribute-value" type="text" name="system.jourlabel" value="{{data.jourlabel}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.jourlabel" value="{{system.jourlabel}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -9,49 +9,49 @@
|
|||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.sust">Sustentation</label>
|
<label for="system.sust">Sustentation</label>
|
||||||
<input class="attribute-value" type="text" name="system.sust" value="{{data.sust}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.sust" value="{{system.sust}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.boisson">Boisson</label>
|
<label for="system.boisson">Boisson</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.boisson" {{#if data.boisson}}checked{{/if}} />
|
<input class="attribute-value" type="checkbox" name="system.boisson" {{#if system.boisson}}checked{{/if}} />
|
||||||
</div>
|
</div>
|
||||||
{{#if data.boisson}}
|
{{#if system.boisson}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.desaltere">Désaltère de</label>
|
<label for="system.desaltere">Désaltère de</label>
|
||||||
<input class="attribute-value" type="text" name="system.desaltere" value="{{data.desaltere}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.desaltere" value="{{system.desaltere}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.alcoolise">Alcoolisée</label>
|
<label for="system.alcoolise">Alcoolisée</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.alcoolise" {{#if data.alcoolise}}checked{{/if}} />
|
<input class="attribute-value" type="checkbox" name="system.alcoolise" {{#if system.alcoolise}}checked{{/if}} />
|
||||||
</div>
|
</div>
|
||||||
{{#if data.alcoolise}}
|
{{#if system.alcoolise}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Force de l'alcool par dose</label>
|
<label>Force de l'alcool par dose</label>
|
||||||
<input class="attribute-value" type="text" name="system.force" value="{{data.force}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.force" value="{{system.force}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.qualite">Qualité</label>
|
<label for="system.qualite">Qualité</label>
|
||||||
<input class="attribute-value" type="text" name="dasystemta.qualite" value="{{data.qualite}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="dasystemta.qualite" value="{{system.qualite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.exotisme">Exotisme</label>
|
<label for="system.exotisme">Exotisme</label>
|
||||||
<input class="attribute-value" type="text" name="system.exotisme" value="{{data.exotisme}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.exotisme" value="{{system.exotisme}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.encombrement">Encombrement</label>
|
<label for="system.encombrement">Encombrement</label>
|
||||||
<input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}"
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.quantite">Quantité</label>
|
<label for="system.quantite">Quantité</label>
|
||||||
<input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.quantite" value="{{system.quantite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label for="data.cout">Prix (sols) </label>
|
<label for="system.cout">Prix (sols) </label>
|
||||||
<input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -10,23 +10,23 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Encombrement </label>
|
<label for="xp">Encombrement </label>
|
||||||
<input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Quantité </label>
|
<label>Quantité </label>
|
||||||
<input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.quantite" value="{{system.quantite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Résistance</label>
|
<label for="xp">Résistance</label>
|
||||||
<input class="attribute-value" type="text" name="system.resistance" value="{{data.resistance}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.resistance" value="{{system.resistance}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Qualité</label>
|
<label for="xp">Qualité</label>
|
||||||
<input class="attribute-value" type="text" name="system.qualite" value="{{data.qualite}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.qualite" value="{{system.qualite}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label for="xp">Prix (sols) </label>
|
<label for="xp">Prix (sols) </label>
|
||||||
<input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Caractéristique</label>
|
<label>Caractéristique</label>
|
||||||
<select name="system.default_carac" id="default_carac" data-dtype="String">
|
<select name="system.default_carac" id="default_carac" data-dtype="String">
|
||||||
{{#select data.default_carac}}
|
{{#select system.default_carac}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Compétence</label>
|
<label>Compétence</label>
|
||||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||||
{{#select data.competence}}
|
{{#select system.competence}}
|
||||||
{{#each competences as |competence key|}}
|
{{#each competences as |competence key|}}
|
||||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -28,11 +28,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Référence / Auteur</label>
|
<label>Référence / Auteur</label>
|
||||||
<input class="attribute-value" type="text" name="system.reference" value="{{data.reference}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Niveau</label>
|
<label>Niveau</label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Refoulement</label>
|
<label for="xp">Refoulement</label>
|
||||||
<input class="attribute-value" type="text" name="system.refoulement" value="{{data.refoulement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.refoulement" value="{{system.refoulement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<header class="sheet-header">
|
<header class="sheet-header">
|
||||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
<div class="header-fields">
|
<div class="header-fields">
|
||||||
{{#if (or isGM data.identifie)}}
|
{{#if (or isGM system.identifie)}}
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
{{else}}
|
{{else}}
|
||||||
<h1 class="charname">Inconnue</h1>
|
<h1 class="charname">Inconnue</h1>
|
||||||
@ -14,33 +14,33 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Actif ? </label>
|
<label for="xp">Actif ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.active" {{#if data.active}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.active" {{#if system.active}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
{{#if (or isGM data.identifie)}}
|
{{#if (or isGM system.identifie)}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Identifiée ? </label>
|
<label for="xp">Identifiée ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if data.identifie}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if system.identifie}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Malignité </label>
|
<label for="xp">Malignité </label>
|
||||||
<input class="attribute-value" type="text" name="system.malignite" value="{{data.malignite}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.malignite" value="{{system.malignite}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Périodicité</label>
|
<label for="xp">Périodicité</label>
|
||||||
<input class="attribute-value" type="text" name="system.periodicite" value="{{data.periodicite}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.periodicite" value="{{system.periodicite}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Dommages</label>
|
<label for="xp">Dommages</label>
|
||||||
<input class="attribute-value" type="text" name="system.dommages" value="{{data.dommages}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.dommages" value="{{system.dommages}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Remedes Connus ? </label>
|
<label for="xp">Remedes Connus ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if data.remedesconnus}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
{{#if (or isGM data.remedesconnus)}}
|
{{#if (or isGM system.remedesconnus)}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Remèdes </label>
|
<label for="xp">Remèdes </label>
|
||||||
<input class="attribute-value" type="text" name="system.remedes" value="{{data.remedes}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -10,15 +10,15 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Type de possession </label>
|
<label for="xp">Type de possession </label>
|
||||||
<input class="attribute-value" type="text" name="system.typepossession" value="{{data.typepossession}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.typepossession" value="{{system.typepossession}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Possédé ? </label>
|
<label for="xp">Possédé ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.istrue" {{#if data.istrue}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.istrue" {{#if system.istrue}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Compteur </label>
|
<label for="xp">Compteur </label>
|
||||||
<input class="attribute-value" type="text" name="system.compteur" value="{{data.compteur}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.compteur" value="{{system.compteur}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,20 +15,20 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Encombrement</label>
|
<label>Encombrement</label>
|
||||||
<input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.encombrement" value="{{system.encombrement}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Quantité </label>
|
<label>Quantité </label>
|
||||||
<input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.quantite" value="{{system.quantite}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group item-cout">
|
<div class="form-group item-cout">
|
||||||
<label>Prix (sols)</label>
|
<label>Prix (sols)</label>
|
||||||
<input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Fréquence</label>
|
<label>Fréquence</label>
|
||||||
<select name="system.rarete" class="rarete" data-dtype="String">
|
<select name="system.rarete" class="rarete" data-dtype="String">
|
||||||
{{#select data.rarete}}
|
{{#select system.rarete}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Catégorie</label>
|
<label>Catégorie</label>
|
||||||
<select name="system.categorie" class="categoriepotion" data-dtype="String">
|
<select name="system.categorie" class="categoriepotion" data-dtype="String">
|
||||||
{{#select data.categorie}}
|
{{#select system.categorie}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-potion.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-potion.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
@ -45,46 +45,46 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Herbe</label>
|
<label>Herbe</label>
|
||||||
<select name="system.herbe" class="herbe" data-dtype="String">
|
<select name="system.herbe" class="herbe" data-dtype="String">
|
||||||
{{selectOptions herbesSoins selected=data.herbe localize=false}}
|
{{selectOptions herbesSoins selected=system.herbe localize=false}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Nombre de brins</label>
|
<label>Nombre de brins</label>
|
||||||
<input class="attribute-value" type="text" name="system.herbebrins" value="{{data.herbebrins}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.herbebrins" value="{{system.herbebrins}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Bonus</label>
|
<label>Bonus</label>
|
||||||
<input class="attribute-value" type="text" name="system.herbebonus" value="{{data.herbebonus}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.herbebonus" value="{{system.herbebonus}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if isRepos}}
|
{{#if isRepos}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Herbe</label>
|
<label>Herbe</label>
|
||||||
<select name="system.herbe" class="herbe" data-dtype="String">
|
<select name="system.herbe" class="herbe" data-dtype="String">
|
||||||
{{selectOptions herbesRepos selected=data.herbe localize=false}}
|
{{selectOptions herbesRepos selected=system.herbe localize=false}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Nombre de brins</label>
|
<label>Nombre de brins</label>
|
||||||
<input class="attribute-value" type="text" name="system.herbebrins" value="{{data.herbebrins}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.herbebrins" value="{{system.herbebrins}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Bonus</label>
|
<label>Bonus</label>
|
||||||
<input class="attribute-value" type="text" name="system.herbebonus" value="{{data.herbebonus}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.herbebonus" value="{{system.herbebonus}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Repos Alchimique ?</label>
|
<label>Repos Alchimique ?</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.reposalchimique" {{#if data.reposalchimique}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.reposalchimique" {{#if system.reposalchimique}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if data.magique}}
|
{{#if system.magique}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Points de rêve</label>
|
<label>Points de rêve</label>
|
||||||
<input class="attribute-value" type="text" name="system.pr" value="{{data.pr}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.pr" value="{{system.pr}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Permanente ? </label>
|
<label for="xp">Permanente ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.prpermanent" {{#if data.prpermanent}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.prpermanent" {{#if system.prpermanent}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
{{#if isHerbe}}
|
{{#if isHerbe}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Refoulement</label>
|
<label for="xp">Refoulement</label>
|
||||||
<input class="attribute-value" type="text" name="system.refoulement" value="{{data.refoulement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.refoulement" value="{{system.refoulement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -10,30 +10,30 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="alchimie-title" for="xp">But</label>
|
<label class="alchimie-title" for="xp">But</label>
|
||||||
<input class="attribute-value" type="text" name="system.but" value="{{data.but}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.but" value="{{system.but}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label class="alchimie-title">Manipulation : </label></span>
|
<span><label class="alchimie-title">Manipulation : </label></span>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor data.manipulation_update target="system.manipulation" button=true owner=owner editable=editable}}
|
{{editor system.manipulation_update target="system.manipulation" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label class="alchimie-title">Utilisation : </label></span>
|
<span><label class="alchimie-title">Utilisation : </label></span>
|
||||||
<div class="form-group small-editor">
|
<div class="form-group small-editor">
|
||||||
{{editor data.utilisation target="system.utilisation" button=true owner=owner editable=editable}}
|
{{editor system.utilisation target="system.utilisation" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label class="alchimie-title">Enchantement : </label></span>
|
<span><label class="alchimie-title">Enchantement : </label></span>
|
||||||
<div class="form-group small-editor">
|
<div class="form-group small-editor">
|
||||||
{{editor data.enchantement target="system.enchantement" button=true owner=owner editable=editable}}
|
{{editor system.enchantement target="system.enchantement" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label class="alchimie-title">Sur-effet : </label></span>
|
<span><label class="alchimie-title">Sur-effet : </label></span>
|
||||||
<div class="form-group small-editor">
|
<div class="form-group small-editor">
|
||||||
{{editor data.sureffet target="system.sureffet" button=true owner=owner editable=editable}}
|
{{editor system.sureffet target="system.sureffet" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -10,28 +10,28 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Niveau</label>
|
<label>Niveau</label>
|
||||||
<input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Durée</label>
|
<label>Durée</label>
|
||||||
<input class="attribute-value" type="text" name="system.duree" value="{{data.duree}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.duree" value="{{system.duree}}" data-dtype="String"/>
|
||||||
</div>system
|
</div>system
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Sust</label>
|
<label>Sust</label>
|
||||||
<input class="attribute-value" type="text" name="system.sust" value="{{data.sust}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.sust" value="{{system.sust}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Exotisme</label>
|
<label>Exotisme</label>
|
||||||
<input class="attribute-value" type="text" name="system.exotisme" value="{{data.exotisme}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.exotisme" value="{{system.exotisme}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Référence / Auteur</label>
|
<label>Référence / Auteur</label>
|
||||||
<input class="attribute-value" type="text" name="system.reference" value="{{data.reference}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label>Ingrédients : </label></span>
|
<span><label>Ingrédients : </label></span>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor data.ingredients target="system.ingredients" button=true owner=owner editable=editable}}
|
{{editor system.ingredients target="system.ingredients" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
<div class="resource">
|
<div class="resource">
|
||||||
<label>Quantity</label>
|
<label>Quantity</label>
|
||||||
<input type="text" name="system.quantity" value="{{data.quantity}}" data-dtype="Number"/>
|
<input type="text" name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="resource">
|
<div class="resource">
|
||||||
<label>Weight</label>
|
<label>Weight</label>
|
||||||
<input type="text" name="system.weight" value="{{data.weight}}" data-dtype="Number"/>
|
<input type="text" name="system.weight" value="{{system.weight}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
{{!-- Description Tab --}}
|
{{!-- Description Tab --}}
|
||||||
<div class="tab" data-group="primary" data-tab="description">
|
<div class="tab" data-group="primary" data-tab="description">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor system.description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{!-- Attributes Tab --}}
|
{{!-- Attributes Tab --}}
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<ol class="attributes-list">
|
<ol class="attributes-list">
|
||||||
{{#each data.attributes as |attr key|}}
|
{{#each system.attributes as |attr key|}}
|
||||||
<li class="attribute flexrow" data-attribute="{{key}}">
|
<li class="attribute flexrow" data-attribute="{{key}}">
|
||||||
<input class="attribute-key" type="text" name="system.attributes.{{key}}.key" value="{{key}}"/>
|
<input class="attribute-key" type="text" name="system.attributes.{{key}}.key" value="{{key}}"/>
|
||||||
{{#if attr.isCheckbox}}
|
{{#if attr.isCheckbox}}
|
||||||
|
@ -10,31 +10,31 @@
|
|||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.difficulte">Difficulte</label>
|
<label for="system.difficulte">Difficulte</label>
|
||||||
<input class="attribute-value" type="number" name="system.difficulte" value="{{data.difficulte}}"
|
<input class="attribute-value" type="number" name="system.difficulte" value="{{system.difficulte}}"
|
||||||
data-dtype="Number" />
|
data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.valeur.norm">Expérience en sorts</label>
|
<label for="system.valeur.norm">Expérience en sorts</label>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<input class="signe-xp-sort" type="number" name="system.valeur.norm" data-typereussite="norm"
|
<input class="signe-xp-sort" type="number" name="system.valeur.norm" data-typereussite="norm"
|
||||||
value="{{data.valeur.norm}}" min="1" max="100" data-dtype="Number" />
|
value="{{system.valeur.norm}}" min="1" max="100" data-dtype="Number" />
|
||||||
<span>Sign.</span>
|
<span>Sign.</span>
|
||||||
<input class="signe-xp-sort" type="number" name="system.valeur.sign" data-typereussite="sign"
|
<input class="signe-xp-sort" type="number" name="system.valeur.sign" data-typereussite="sign"
|
||||||
value="{{data.valeur.sign}}" min="1" max="100" data-dtype="Number" />
|
value="{{system.valeur.sign}}" min="1" max="100" data-dtype="Number" />
|
||||||
<span>Part.</span>
|
<span>Part.</span>
|
||||||
<input class="signe-xp-sort" type="number" name="system.valeur.part" data-typereussite="part"
|
<input class="signe-xp-sort" type="number" name="system.valeur.part" data-typereussite="part"
|
||||||
value="{{data.valeur.part}}" min="1" max="100" data-dtype="Number" />
|
value="{{system.valeur.part}}" min="1" max="100" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.ephemere">Ephémère</label>
|
<label for="system.ephemere">Ephémère</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.ephemere" {{#if data.ephemere}}checked{{/if}} />
|
<input class="attribute-value" type="checkbox" name="system.ephemere" {{#if system.ephemere}}checked{{/if}} />
|
||||||
</div>
|
</div>
|
||||||
{{#if data.ephemere}}
|
{{#if system.ephemere}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="data.duree">Durée</label>
|
<label for="system.duree">Durée</label>
|
||||||
<input class="attribute-value" type="text" name="system.duree" value="{{data.duree}}" data-dtype="String" />
|
<input class="attribute-value" type="text" name="system.duree" value="{{system.duree}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Draconic </label>
|
<label>Draconic </label>
|
||||||
<select name="system.draconic" id="draconic" data-dtype="String">
|
<select name="system.draconic" id="draconic" data-dtype="String">
|
||||||
{{#select data.draconic}}
|
{{#select system.draconic}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/sort-draconic.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/sort-draconic.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Case TMR </label>
|
<label for="xp">Case TMR </label>
|
||||||
<select name="system.caseTMR" id="caseTMR" data-dtype="String">
|
<select name="system.caseTMR" id="caseTMR" data-dtype="String">
|
||||||
{{#select data.caseTMR}}
|
{{#select system.caseTMR}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html"}}
|
||||||
<option value="special">Case spéciale TMR (saisie ci-dessous)</option>
|
<option value="special">Case spéciale TMR (saisie ci-dessous)</option>
|
||||||
{{/select}}
|
{{/select}}
|
||||||
@ -27,43 +27,43 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Case TMR Spéciale </label>
|
<label for="xp">Case TMR Spéciale </label>
|
||||||
<input class="attribute-value" type="text" name="system.caseTMRspeciale" value="{{data.caseTMRspeciale}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.caseTMRspeciale" value="{{system.caseTMRspeciale}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Difficulté </label>
|
<label for="xp">Difficulté </label>
|
||||||
<input class="attribute-value" type="text" name="system.difficulte" value="{{data.difficulte}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.difficulte" value="{{system.difficulte}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Coût en Rêve </label>
|
<label for="xp">Coût en Rêve </label>
|
||||||
<input class="attribute-value" type="text" name="system.ptreve" value="{{data.ptreve}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.ptreve" value="{{system.ptreve}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Coût en Seuil </label>
|
<label for="xp">Coût en Seuil </label>
|
||||||
<input class="attribute-value" type="text" name="system.coutseuil" value="{{data.coutseuil}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.coutseuil" value="{{system.coutseuil}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="rituel">Rituel </label>
|
<label for="rituel">Rituel </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.isrituel" {{#if data.isrituel}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.isrituel" {{#if system.isrituel}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Durée </label>
|
<label for="xp">Durée </label>
|
||||||
<input class="attribute-value" type="text" name="system.duree" value="{{data.duree}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.duree" value="{{system.duree}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Portée </label>
|
<label for="xp">Portée </label>
|
||||||
<input class="attribute-value" type="text" name="system.portee" value="{{data.portee}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.portee" value="{{system.portee}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Cible </label>
|
<label for="xp">Cible </label>
|
||||||
<input class="attribute-value" type="text" name="system.cible" value="{{data.cible}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.cible" value="{{system.cible}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Jet de Resistance</label>
|
<label for="xp">Jet de Resistance</label>
|
||||||
<input class="attribute-value" type="text" name="system.JR" value="{{data.JR}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.JR" value="{{system.JR}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">XP </label>
|
<label for="xp">XP </label>
|
||||||
<input class="attribute-value" type="text" name="system.xp" value="{{data.xp}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.xp" value="{{system.xp}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{#if owner}}
|
{{#if owner}}
|
||||||
{{#each bonusCaseList as |bcData key|}}
|
{{#each bonusCaseList as |bcData key|}}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Caractéristique</label>
|
<label for="xp">Caractéristique</label>
|
||||||
<select name="system.carac" id="caracselect" data-dtype="String">
|
<select name="system.carac" id="caracselect" data-dtype="String">
|
||||||
{{#select data.carac}}
|
{{#select system.carac}}
|
||||||
{{#each caracList as |carac key|}}
|
{{#each caracList as |carac key|}}
|
||||||
<option value="{{key}}">{{carac.label}}</option>
|
<option value="{{key}}">{{carac.label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Compétence</label>
|
<label for="xp">Compétence</label>
|
||||||
<select name="system.competence" id="competenceselect" data-dtype="String">
|
<select name="system.competence" id="competenceselect" data-dtype="String">
|
||||||
{{#select data.competence}}
|
{{#select system.competence}}
|
||||||
{{#each competences as |competence key|}}
|
{{#each competences as |competence key|}}
|
||||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -30,24 +30,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Difficulté</label>
|
<label for="xp">Difficulté</label>
|
||||||
<input class="attribute-value" type="text" name="system.difficulte" value="{{data.difficulte}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.difficulte" value="{{system.difficulte}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Périodicité</label>
|
<label for="xp">Périodicité</label>
|
||||||
<input class="attribute-value" type="text" name="system.periodicite" value="{{data.periodicite}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.periodicite" value="{{system.periodicite}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Fatigue</label>
|
<label for="xp">Fatigue</label>
|
||||||
<input class="attribute-value" type="text" name="system.fatigue" value="{{data.fatigue}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.fatigue" value="{{system.fatigue}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{#if isGM}}
|
{{#if isGM}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Cacher les Points de Tâches nécessaires au joueur</label>
|
<label for="xp">Cacher les Points de Tâches nécessaires au joueur</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.cacher_points_de_tache" value="{{data.cacher_points_de_tache}}" {{checked data.cacher_points_de_tache}}/>
|
<input class="attribute-value" type="checkbox" name="system.cacher_points_de_tache" value="{{system.cacher_points_de_tache}}" {{checked system.cacher_points_de_tache}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Points de tâches nécessaires</label>
|
<label for="xp">Points de tâches nécessaires</label>
|
||||||
<input class="attribute-value" type="text" name="system.points_de_tache" value="{{data.points_de_tache}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.points_de_tache" value="{{system.points_de_tache}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -55,22 +55,22 @@
|
|||||||
{{#if system.cacher_points_de_tache}}
|
{{#if system.cacher_points_de_tache}}
|
||||||
<input class="attribute-value" type="text" value="?????" data-dtype="Number" disabled/>
|
<input class="attribute-value" type="text" value="?????" data-dtype="Number" disabled/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<input class="attribute-value" type="text" name="system.points_de_tache" value="{{data.points_de_tache}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.points_de_tache" value="{{system.points_de_tache}}" data-dtype="Number"/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Points de tâches obtenus</label>
|
<label for="xp">Points de tâches obtenus</label>
|
||||||
<input class="attribute-value" type="text" name="system.points_de_tache_courant" value="{{data.points_de_tache_courant}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.points_de_tache_courant" value="{{system.points_de_tache_courant}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Nombre de Succès</label>
|
<label for="xp">Nombre de Succès</label>
|
||||||
<input class="attribute-value" type="text" name="system.nb_jet_succes" value="{{data.nb_jet_succes}}" data-dtype="Number" {{#if isGM}}{{else}}disabled{{/if}}/>
|
<input class="attribute-value" type="text" name="system.nb_jet_succes" value="{{system.nb_jet_succes}}" data-dtype="Number" {{#if isGM}}{{else}}disabled{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Nombre d'Echecs</label>
|
<label for="xp">Nombre d'Echecs</label>
|
||||||
<input class="attribute-value" type="text" name="system.nb_jet_echec" value="{{data.nb_jet_echec}}" data-dtype="Number" {{#if isGM}}{{else}}disabled{{/if}}/>
|
<input class="attribute-value" type="text" name="system.nb_jet_echec" value="{{system.nb_jet_echec}}" data-dtype="Number" {{#if isGM}}{{else}}disabled{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Aspect</label>
|
<label>Aspect</label>
|
||||||
<input class="attribute-value" type="text" name="system.concept" value="{{data.concept}}" data-dtype="String" />
|
<input class="attribute-value" type="text" name="system.concept" value="{{system.concept}}" data-dtype="String" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Sens</label>
|
<label>Sens</label>
|
||||||
<select name="system.aspect" id="aspect" data-dtype="String">
|
<select name="system.aspect" id="aspect" data-dtype="String">
|
||||||
{{#select data.aspect}}
|
{{#select system.aspect}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-aspect-tarot.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-aspect-tarot.html"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label>Description : </label></span>
|
<span><label>Description : </label></span>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
|
{{editor system.description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{#if isGM}}
|
{{#if isGM}}
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label>Description (MJ seulement): </label></span>
|
<span><label>Description (MJ seulement): </label></span>
|
||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor data.descriptionmj target="system.descriptionmj" button=true owner=owner editable=editable}}
|
{{editor system.descriptionmj target="system.descriptionmj" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
@ -4,7 +4,7 @@
|
|||||||
<img class="chat-icon" src="{{img}}" title="{{name}}" />
|
<img class="chat-icon" src="{{img}}" title="{{name}}" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<p class="card-content">{{{data.description}}}</p>
|
<p class="card-content">{{{system.description}}}</p>
|
||||||
<p>
|
<p>
|
||||||
{{#each properties as |property p|}}
|
{{#each properties as |property p|}}
|
||||||
<span>{{{property}}}</span><br>
|
<span>{{{property}}}</span><br>
|
||||||
|
Loading…
Reference in New Issue
Block a user