Les rencontres sont configurables #572
@ -15,7 +15,8 @@
|
|||||||
"TypeNombreastral": "Nombre astral",
|
"TypeNombreastral": "Nombre astral",
|
||||||
"TypeTarot": "Carte de tarot",
|
"TypeTarot": "Carte de tarot",
|
||||||
"TypeCasetmr": "TMR spéciale",
|
"TypeCasetmr": "TMR spéciale",
|
||||||
"TypeRencontrestmr": "Rencontre TMR",
|
"TypeRencontre": "Rencontre TMR",
|
||||||
|
"TypeRencontrestmr": "Rencontre TMR (ancien)",
|
||||||
"TypeMunition": "Munition",
|
"TypeMunition": "Munition",
|
||||||
"TypeMonnaie": "Monnaie",
|
"TypeMonnaie": "Monnaie",
|
||||||
"TypeHerbe": "Herbe ou plante",
|
"TypeHerbe": "Herbe ou plante",
|
||||||
|
109
module/item-rencontre-sheet.js
Normal file
109
module/item-rencontre-sheet.js
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
import { SYSTEM_RDD } from "./constants.js";
|
||||||
|
import { RdDRencontre } from "./item-rencontre.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Item sheet pour configurer les rencontres
|
||||||
|
* @extends {ItemSheet}
|
||||||
|
*/
|
||||||
|
export class RdDRencontreItemSheet extends ItemSheet {
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static get defaultOptions() {
|
||||||
|
return mergeObject(super.defaultOptions, {
|
||||||
|
classes: ["rdd", "sheet", "item"],
|
||||||
|
template: "systems/foundryvtt-reve-de-dragon/templates/item-rencontre-sheet.html",
|
||||||
|
width: 500,
|
||||||
|
height: 500,
|
||||||
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
_getHeaderButtons() {
|
||||||
|
let buttons = super._getHeaderButtons();
|
||||||
|
buttons.unshift({ class: "post", icon: "fas fa-comment", onclick: ev => this.item.postItem() });
|
||||||
|
return buttons;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/** @override */
|
||||||
|
setPosition(options = {}) {
|
||||||
|
const position = super.setPosition(options);
|
||||||
|
const sheetHeader = this.element.find(".sheet-header");
|
||||||
|
const sheetBody = this.element.find(".sheet-body");
|
||||||
|
sheetBody.css("height", position.height - sheetHeader[0].clientHeight)
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async getData() {
|
||||||
|
const formData = duplicate(this.item);
|
||||||
|
mergeObject(formData, {
|
||||||
|
title: formData.name,
|
||||||
|
isGM: game.user.isGM,
|
||||||
|
owner: this.actor?.isOwner,
|
||||||
|
isOwned: this.actor ? true : false,
|
||||||
|
actorId: this.actor?.id,
|
||||||
|
editable: this.isEditable,
|
||||||
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
|
effets: {
|
||||||
|
succes: {
|
||||||
|
liste: RdDRencontre.getEffetsSucces(),
|
||||||
|
select: RdDRencontre.mapEffets(this.item.system.succes.effets)
|
||||||
|
},
|
||||||
|
echec: {
|
||||||
|
liste: RdDRencontre.getEffetsEchec(),
|
||||||
|
select: RdDRencontre.mapEffets(this.item.system.echec.effets)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return formData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/** @override */
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
if (!this.options.editable) return;
|
||||||
|
html.find("a.effet-add").click(event => this.onAddEffet(event));
|
||||||
|
html.find("a.effet-delete").click(event => this.onDeleteEffet(event));
|
||||||
|
}
|
||||||
|
|
||||||
|
async onAddEffet(event) {
|
||||||
|
const resultat = $(event.currentTarget)?.data("effet-resultat");
|
||||||
|
const keyEffets = `system.${resultat}.effets`;
|
||||||
|
|
||||||
|
const code = $(event.currentTarget)?.data("effet-code");
|
||||||
|
const liste = RdDRencontre.getListeEffets(this.item, resultat);
|
||||||
|
liste.push(code);
|
||||||
|
|
||||||
|
await this._updateEffetsRencontre(keyEffets, liste);
|
||||||
|
}
|
||||||
|
|
||||||
|
async onDeleteEffet(event) {
|
||||||
|
const resultat = $(event.currentTarget)?.data("effet-resultat");
|
||||||
|
const keyEffets = `system.${resultat}.effets`;
|
||||||
|
|
||||||
|
const pos = $(event.currentTarget)?.data("effet-pos");
|
||||||
|
const liste = RdDRencontre.getListeEffets(this.item, resultat);
|
||||||
|
liste.splice(pos, 1);
|
||||||
|
|
||||||
|
await this._updateEffetsRencontre(keyEffets, liste);
|
||||||
|
}
|
||||||
|
|
||||||
|
async _updateEffetsRencontre(key, liste) {
|
||||||
|
const updates = {};
|
||||||
|
updates[key] = liste;
|
||||||
|
this.item.update(updates);
|
||||||
|
}
|
||||||
|
|
||||||
|
get template() {
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
return `systems/foundryvtt-reve-de-dragon/templates/item-rencontre-sheet.html`;
|
||||||
|
}
|
||||||
|
|
||||||
|
get title() {
|
||||||
|
return `Rencontre: ${this.object.name}`;
|
||||||
|
}
|
||||||
|
}
|
60
module/item-rencontre.js
Normal file
60
module/item-rencontre.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
import { RdDRollTables } from "./rdd-rolltables.js";
|
||||||
|
|
||||||
|
const tableEffets = [
|
||||||
|
{ code: "messager", resultat: "succes", description: "Envoie un message à (force) cases" },
|
||||||
|
{ code: "passeur", resultat: "succes", description: "Déplacer le demi-rêve à (force) cases" },
|
||||||
|
{ code: "reve+f", resultat: "succes", description: "Gain de (force) points de rêve" },
|
||||||
|
{ code: "teleport", resultat: "succes", description: "Déplacer le demi-rêve (même type de case)" },
|
||||||
|
{ code: "part+tete", resultat: "succes", description: "Tête de dragon sur réussite particulière" },
|
||||||
|
{ code: "part+xp", resultat: "succes", description: "Expérience sur réussite particulière" },
|
||||||
|
|
||||||
|
{ code: "reve-1", resultat: "echec", description: "Perte de 1 point de rêve" },
|
||||||
|
{ code: "reve-f", resultat: "echec", description: "Perte de (force) points de rêve" },
|
||||||
|
{ code: "vie-1", resultat: "echec", description: "Perte de 1 point de vie" },
|
||||||
|
{ code: "reinsere", resultat: "echec", description: "Réinsertion aléatoire" },
|
||||||
|
{ code: "declenhe", resultat: "echec", description: "Déclenche un sort aléatoire" },
|
||||||
|
{ code: "persistant", resultat: "echec", description: "Bloque le demi-rêve" },
|
||||||
|
{ code: "teleport-aleatoire", resultat: "echec", description: "Déplacement aléatoire (même type de case)" },
|
||||||
|
{ code: "aleatoire", resultat: "echec", description: "Déplacement aléatoire" },
|
||||||
|
{ code: "sort-aleatoire", resultat: "echec", description: "Déplacement pour déclencher un sort en réserve aléatoire" },
|
||||||
|
{ code: "rompu", resultat: "echec", description: "Demi-rêve interrompu" },
|
||||||
|
{ code: "echec-queue", resultat: "echec", description: "Queue de dragon sur échec" },
|
||||||
|
{ code: "etotal-queue", resultat: "echec", description: "Queue de dragon sur échec total" },
|
||||||
|
|
||||||
|
{ code: "moral+1", resultat: "succes", description: "Gain de 1 point de moral" },
|
||||||
|
{ code: "reve+1", resultat: "succes", description: "Gain de 1 point de rêve" },
|
||||||
|
{ code: "vie-f", resultat: "echec", description: "Perte de (force) point de vie" },
|
||||||
|
{ code: "endurance-1", resultat: "echec", description: "Perte de 1 point d'endurance" },
|
||||||
|
{ code: "endurance-f", resultat: "echec", description: "Perte de (force) point d'endurance" },
|
||||||
|
{ code: "fatigue-1", resultat: "echec", description: "Perte de 1 point de fatigue" },
|
||||||
|
{ code: "fatigue-f", resultat: "echec", description: "Perte de (force) point de fatigue" },
|
||||||
|
{ code: "moral-1", resultat: "echec", description: "Perte de 1 point de moral" },
|
||||||
|
{ code: "chance-1", resultat: "echec", description: "Perte de 1 point de chance actuelle" },
|
||||||
|
{ code: "chance-f", resultat: "echec", description: "Perte de (force) point de chance" },
|
||||||
|
{ code: "epart-queue", resultat: "echec", description: "Queue de dragon sur échec particulier" },
|
||||||
|
{ code: "etotal-souffle", resultat: "echec", description: "Souffle de dragon sur échec total" },
|
||||||
|
{ code: "epart-souffle", resultat: "echec", description: "Souffle de dragon sur échec particulier" },
|
||||||
|
];
|
||||||
|
|
||||||
|
export class RdDRencontre {
|
||||||
|
static getEffets(resultat) {
|
||||||
|
return tableEffets.filter(e => resultat == e.resultat);
|
||||||
|
}
|
||||||
|
static getEffetsSucces() { return RdDRencontre.getEffets("succes"); }
|
||||||
|
static getEffetsEchec() { return RdDRencontre.getEffets("echec"); }
|
||||||
|
|
||||||
|
static mapEffets(liste) {
|
||||||
|
return liste.map(it => tableEffets.find(e => it == e.code));
|
||||||
|
}
|
||||||
|
|
||||||
|
static getListeEffets(item, reussite) {
|
||||||
|
if (reussite == 'echec') {
|
||||||
|
return [...item.system.echec.effets];
|
||||||
|
}
|
||||||
|
if (reussite == 'succes') {
|
||||||
|
return [...item.system.succes.effets];
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
import { SYSTEM_RDD } from "./constants.js";
|
import { SYSTEM_RDD } from "./constants.js";
|
||||||
import { RdDItemSigneDraconique } from "./item-signedraconique.js";
|
import { RdDItemSigneDraconique } from "./item-signedraconique.js";
|
||||||
import { Misc } from "./misc.js";
|
import { TMRUtility } from "./tmr-utility.js";
|
||||||
import { TMRType, TMRUtility } from "./tmr-utility.js";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Item sheet pour signes draconiques
|
* Item sheet pour signes draconiques
|
||||||
|
@ -18,7 +18,7 @@ const typesObjetsEquipement = [
|
|||||||
"potion",
|
"potion",
|
||||||
]
|
]
|
||||||
const typesObjetsOeuvres = ["oeuvre", "recettecuisine", "musique", "chant", "danse", "jeu"]
|
const typesObjetsOeuvres = ["oeuvre", "recettecuisine", "musique", "chant", "danse", "jeu"]
|
||||||
const typesObjetsDraconiques = ["queue", "ombre", "souffle", "tete", "signedraconique", "sortreserve"]
|
const typesObjetsDraconiques = ["queue", "ombre", "souffle", "tete", "signedraconique", "sortreserve", "rencontre"]
|
||||||
const typesObjetsConnaissance = ["meditation", "recettealchimique", "sort"]
|
const typesObjetsConnaissance = ["meditation", "recettealchimique", "sort"]
|
||||||
const typesObjetsEffet = ["possession", "poison", "maladie"]
|
const typesObjetsEffet = ["possession", "poison", "maladie"]
|
||||||
const typesObjetsCompetence = ["competence", "competencecreature"]
|
const typesObjetsCompetence = ["competence", "competencecreature"]
|
||||||
@ -38,6 +38,7 @@ export const defaultItemImg = {
|
|||||||
ingredient: "systems/foundryvtt-reve-de-dragon/icons/objets/sable_poudre.webp",
|
ingredient: "systems/foundryvtt-reve-de-dragon/icons/objets/sable_poudre.webp",
|
||||||
livre: "systems/foundryvtt-reve-de-dragon/icons/objets/livre.webp",
|
livre: "systems/foundryvtt-reve-de-dragon/icons/objets/livre.webp",
|
||||||
potion: "systems/foundryvtt-reve-de-dragon/icons/objets/liqueur_de_bagdol.webp",
|
potion: "systems/foundryvtt-reve-de-dragon/icons/objets/liqueur_de_bagdol.webp",
|
||||||
|
rencontre: "systems/foundryvtt-reve-de-dragon/icons/tete_dragon.webp",
|
||||||
queue: "systems/foundryvtt-reve-de-dragon/icons/queue_dragon.webp",
|
queue: "systems/foundryvtt-reve-de-dragon/icons/queue_dragon.webp",
|
||||||
ombre: "systems/foundryvtt-reve-de-dragon/icons/queue_dragon.webp",
|
ombre: "systems/foundryvtt-reve-de-dragon/icons/queue_dragon.webp",
|
||||||
souffle: "systems/foundryvtt-reve-de-dragon/icons/souffle_dragon.webp",
|
souffle: "systems/foundryvtt-reve-de-dragon/icons/souffle_dragon.webp",
|
||||||
@ -504,6 +505,20 @@ export class RdDItem extends Item {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
_rencontreChatData() {
|
||||||
|
if (this.system.coord) {
|
||||||
|
return [
|
||||||
|
`<b>Force</b>: ${this.system.force}`,
|
||||||
|
`<b>Coordonnées</b>: ${this.system.coord}`,
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
`<b>Force</b>: ${this.system.force}`,
|
||||||
|
`<b>Refoulement</b>: ${this.system.refoulement}`,
|
||||||
|
`<b>Présent de cités</b>: ${this.system.presentCite}`,
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
_casetmrChatData() {
|
_casetmrChatData() {
|
||||||
return [
|
return [
|
||||||
`<b>Coordonnée</b>: ${this.system.coord}`,
|
`<b>Coordonnée</b>: ${this.system.coord}`,
|
||||||
|
@ -38,6 +38,7 @@ import { Misc } from "./misc.js";
|
|||||||
import { Migrations } from './migrations.js';
|
import { Migrations } from './migrations.js';
|
||||||
import { DialogChronologie } from "./dialog-chronologie.js";
|
import { DialogChronologie } from "./dialog-chronologie.js";
|
||||||
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
||||||
|
import { RdDRencontreItemSheet } from "./item-rencontre-sheet.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Foundry VTT Initialization */
|
/* Foundry VTT Initialization */
|
||||||
@ -188,10 +189,21 @@ Hooks.once("init", async function () {
|
|||||||
types: ["signedraconique"],
|
types: ["signedraconique"],
|
||||||
makeDefault: true
|
makeDefault: true
|
||||||
});
|
});
|
||||||
|
Items.registerSheet(SYSTEM_RDD, RdDRencontreItemSheet, {
|
||||||
|
label: "Rencontre",
|
||||||
|
types: ["rencontre"],
|
||||||
|
makeDefault: true
|
||||||
|
});
|
||||||
Items.registerSheet(SYSTEM_RDD, RdDItemSheet, {
|
Items.registerSheet(SYSTEM_RDD, RdDItemSheet, {
|
||||||
types: ["arme", "armure", "objet", "arme", "armure", "conteneur", "competence", "sort", "herbe", "ingredient", "livre", "potion", "munition", "rencontresTMR", "queue", "ombre", "souffle",
|
types: [
|
||||||
"tete", "competencecreature", "tarot", "monnaie", "nombreastral", "tache", "meditation", "casetmr", "recettealchimique", "gemme",
|
"competence", "competencecreature",
|
||||||
"musique", "chant", "danse", "jeu", "recettecuisine", "maladie", "poison", "oeuvre", "nourritureboisson", "possession", "sortreserve"], makeDefault: true
|
"recettealchimique", "musique", "chant", "danse", "jeu", "recettecuisine", "oeuvre",
|
||||||
|
"objet", "arme", "armure", "conteneur", "herbe", "ingredient", "livre", "potion", "munition",
|
||||||
|
"monnaie", "nourritureboisson", "gemme",
|
||||||
|
"meditation", "rencontresTMR", "queue", "ombre", "souffle", "tete", "casetmr", "sort", "sortreserve",
|
||||||
|
"nombreastral", "tache", "maladie", "poison", "possession",
|
||||||
|
"tarot"
|
||||||
|
], makeDefault: true
|
||||||
});
|
});
|
||||||
CONFIG.Combat.documentClass = RdDCombatManager;
|
CONFIG.Combat.documentClass = RdDCombatManager;
|
||||||
|
|
||||||
|
@ -181,6 +181,7 @@ export class RdDUtility {
|
|||||||
'systems/foundryvtt-reve-de-dragon/templates/item-livre-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/item-livre-sheet.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item-tache-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/item-tache-sheet.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item-potion-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/item-potion-sheet.html',
|
||||||
|
'systems/foundryvtt-reve-de-dragon/templates/item-rencontre-sheet.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item-rencontresTMR-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/item-rencontresTMR-sheet.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item-queue-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/item-queue-sheet.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item-souffle-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/item-souffle-sheet.html',
|
||||||
@ -279,6 +280,7 @@ export class RdDUtility {
|
|||||||
Handlebars.registerHelper('caseTmr-label', coord => TMRUtility.getTMRLabel(coord));
|
Handlebars.registerHelper('caseTmr-label', coord => TMRUtility.getTMRLabel(coord));
|
||||||
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
||||||
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
||||||
|
Handlebars.registerHelper('effetRencontre-name', coord => TMRUtility.typeTmrName(coord));
|
||||||
Handlebars.registerHelper('signeHeure', (key, heure) => RdDCalendrier.getSigneAs(key, heure));
|
Handlebars.registerHelper('signeHeure', (key, heure) => RdDCalendrier.getSigneAs(key, heure));
|
||||||
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
||||||
Handlebars.registerHelper('regle-optionnelle', (option) => ReglesOptionelles.isUsing(option));
|
Handlebars.registerHelper('regle-optionnelle', (option) => ReglesOptionelles.isUsing(option));
|
||||||
|
@ -11,7 +11,7 @@ const typeRencontres = {
|
|||||||
if (rencData.actor.isTMRCache()){
|
if (rencData.actor.isTMRCache()){
|
||||||
return `Le ${rencData.rencontre.name} vous propose d'emmener le message de votre un sort, mais vous ne savez pas où vous êtes.`;
|
return `Le ${rencData.rencontre.name} vous propose d'emmener le message de votre un sort, mais vous ne savez pas où vous êtes.`;
|
||||||
}
|
}
|
||||||
return `Le ${rencData.rencontre.name} vous propose d'emmener le message de votre un sort à ${rencData.rencontre.force} cases ${rencData.tmr.label}.`;
|
return `Le ${rencData.rencontre.name} vous propose d'emmener le message de votre un sort à ${rencData.rencontre.force} cases de ${rencData.tmr.label}.`;
|
||||||
},
|
},
|
||||||
msgEchec: async (rencData)=> `Le ${rencData.rencontre.name} est pressé et continue son chemin d'une traite sans vous accorder un regard.`,
|
msgEchec: async (rencData)=> `Le ${rencData.rencontre.name} est pressé et continue son chemin d'une traite sans vous accorder un regard.`,
|
||||||
postSucces: async (tmrDialog, rencData) => {
|
postSucces: async (tmrDialog, rencData) => {
|
||||||
|
@ -1657,6 +1657,41 @@ display: inline-flex;
|
|||||||
position:relative;
|
position:relative;
|
||||||
top:1px;
|
top:1px;
|
||||||
}
|
}
|
||||||
|
/* Dropdown Content (Hidden by Default) */
|
||||||
|
.button-dropdown-content {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
width: max-content;
|
||||||
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||||||
|
background: var(--background-tooltip) ;
|
||||||
|
overflow-y: scroll;
|
||||||
|
max-height: 14rem;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-dropdown {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
/* Change the background color of the dropdown button when the dropdown content is shown */
|
||||||
|
.button-dropdown:hover .button-dropbutton {
|
||||||
|
text-shadow: 1px 0px 0px #ff6600;
|
||||||
|
}
|
||||||
|
/* Show the dropdown menu on hover */
|
||||||
|
.button-dropdown:hover .button-dropdown-content {display: block;}
|
||||||
|
|
||||||
|
/* Links inside the dropdown */
|
||||||
|
.button-dropdown-content a {
|
||||||
|
color: black;
|
||||||
|
padding: 0.2rem 0.4rem;
|
||||||
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Change color of dropdown links on hover */
|
||||||
|
.button-dropdown-content a:hover {background-color: #ddd;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
#pause
|
#pause
|
||||||
|
@ -587,10 +587,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"types": ["objet", "arme", "armure", "conteneur", "competence", "sort", "herbe", "ingredient", "livre", "potion", "munition", "rencontresTMR", "queue", "ombre", "souffle",
|
"types": [
|
||||||
"tete", "competencecreature", "tarot", "monnaie", "nombreastral", "tache", "meditation", "casetmr", "recettealchimique",
|
"competence", "competencecreature",
|
||||||
"musique", "chant", "danse", "jeu", "recettecuisine", "maladie", "poison", "oeuvre", "nourritureboisson", "signedraconique", "gemme",
|
"recettealchimique", "musique", "chant", "danse", "jeu", "recettecuisine", "oeuvre",
|
||||||
"possession", "sortreserve" ],
|
"objet", "arme", "armure", "conteneur", "herbe", "ingredient", "livre", "potion", "munition",
|
||||||
|
"monnaie", "nourritureboisson", "gemme",
|
||||||
|
"meditation", "rencontre", "rencontresTMR", "queue", "ombre", "souffle", "tete", "casetmr", "signedraconique", "sort", "sortreserve",
|
||||||
|
"nombreastral", "tache", "maladie", "poison", "possession",
|
||||||
|
"tarot"
|
||||||
|
],
|
||||||
"possession": {
|
"possession": {
|
||||||
"typepossession": "",
|
"typepossession": "",
|
||||||
"possede": false,
|
"possede": false,
|
||||||
@ -786,6 +791,48 @@
|
|||||||
"prdate": 0,
|
"prdate": 0,
|
||||||
"cout": 0
|
"cout": 0
|
||||||
},
|
},
|
||||||
|
"rencontre": {
|
||||||
|
"genre": "f",
|
||||||
|
"formule": "2d4",
|
||||||
|
"refoulement": 1,
|
||||||
|
"presentCite": false,
|
||||||
|
"mauvaiseRencontre": false,
|
||||||
|
"ordreTri": 0,
|
||||||
|
"force": 0,
|
||||||
|
"coord": "",
|
||||||
|
"date": "",
|
||||||
|
"heure": "",
|
||||||
|
"succes": {
|
||||||
|
"effets": [],
|
||||||
|
"message": "",
|
||||||
|
"poesie": "",
|
||||||
|
"reference":""
|
||||||
|
},
|
||||||
|
"echec": {
|
||||||
|
"effets": [],
|
||||||
|
"message": "",
|
||||||
|
"poesie": "",
|
||||||
|
"reference": ""
|
||||||
|
},
|
||||||
|
"frequence": {
|
||||||
|
"cite": 0,
|
||||||
|
"sanctuaire": 0,
|
||||||
|
"plaines": 0,
|
||||||
|
"pont": 0,
|
||||||
|
"collines": 0,
|
||||||
|
"foret": 0,
|
||||||
|
"monts": 0,
|
||||||
|
"desert": 0,
|
||||||
|
"fleuve": 0,
|
||||||
|
"lac": 0,
|
||||||
|
"marais": 0,
|
||||||
|
"gouffre": 0,
|
||||||
|
"necropole": 0,
|
||||||
|
"desolation": 0,
|
||||||
|
"mauvaise": 0
|
||||||
|
},
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
"rencontresTMR": {
|
"rencontresTMR": {
|
||||||
"description": "",
|
"description": "",
|
||||||
"descriptionmj": ""
|
"descriptionmj": ""
|
||||||
|
232
templates/item-rencontre-sheet.html
Normal file
232
templates/item-rencontre-sheet.html
Normal file
@ -0,0 +1,232 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="rencontre">Rencontre</a>
|
||||||
|
<a class="item" data-tab="succes">Victoire</a>
|
||||||
|
<a class="item" data-tab="echec">Défaite</a>
|
||||||
|
{{#unless system.mauvaiseRencontre}}
|
||||||
|
<a class="item" data-tab="frequence">Fréquences</a>
|
||||||
|
{{/unless}}
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="sheet-body">
|
||||||
|
|
||||||
|
<div class="tab items" data-group="primary" data-tab="rencontre">
|
||||||
|
{{#if isOwned}}
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.force">Rêve</label>
|
||||||
|
<input type="text" name="system.force" value="{{system.force}}" data-dtype="Number"/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.coord">Case TMR - {{caseTmr-label system.coord}}</label>
|
||||||
|
<input class="attribute-value" type="text" name="system.coord" value="{{system.coord}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.date">Date/heure</label>
|
||||||
|
<div class="flexrow">
|
||||||
|
<input class="attribute-value" type="text" name="system.date" value="{{system.date}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
<input class="attribute-value" type="text" name="system.heure" value="{{system.heure}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.formule">Rêve</label>
|
||||||
|
<input type="text" name="system.formule" value="{{system.formule}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.genre">Genre</label>
|
||||||
|
<select type="text" name="system.genre" data-dtype="String" {{#unless isGM}}disabled{{/unless}}>
|
||||||
|
{{#select system.genre}}
|
||||||
|
<option value=""></option>
|
||||||
|
<option value="f">Féminin</option>
|
||||||
|
<option value="m">Masculin</option>
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.ordreTri">Position dans la table</label>
|
||||||
|
<input type="number" name="system.ordreTri" value="{{system.ordreTri}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.presentCite">Offert par les Présents des cités</label>
|
||||||
|
<input type="checkbox" name="system.presentCite" data-dtype="Boolean" {{#if system.presentCite}}checked{{/if}} {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.refoulement">Refoulement</label>
|
||||||
|
<input type="number" name="system.refoulement" value="{{system.refoulement}}" min="0" max="4" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.mauvaiseRencontre">Mauvaise rencontre</label>
|
||||||
|
<input type="checkbox" name="system.mauvaiseRencontre" data-dtype="Boolean" {{#if system.mauvaiseRencontre}}checked{{/if}} {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
{{#unless isOwned}}
|
||||||
|
{{#if system.mauvaiseRencontre}}
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.mauvaise">Fréquence mauvaise rencontre</label>
|
||||||
|
<input type="number" name="system.frequence.mauvaise" value="{{system.frequence.mauvaise}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{/unless}}
|
||||||
|
<div class="flexcol">
|
||||||
|
<span><label>Description : </label></span>
|
||||||
|
<div class="form-group editor">
|
||||||
|
{{editor description target="system.description" button=true owner=owner editable=editable}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab items" data-group="primary" data-tab="succes">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.succes.message">Message</label>
|
||||||
|
<textarea autocomplete="off" title="Message en cas de succès" name="system.succes.message" {{#unless isGM}}disabled{{/unless}}/>{{system.succes.message}}</textarea>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="button-dropdown">
|
||||||
|
{{#if isGM}}
|
||||||
|
<label class="button-dropbutton" title="Ajouter">Effets <i class="fas fa-plus-circle"></i></label>
|
||||||
|
<div class="button-dropdown-content">
|
||||||
|
{{#each effets.succes.liste as |effet|}}
|
||||||
|
<a class="effet-add" data-effet-code="{{effet.code}}" data-effet-resultat="{{effet.resultat}}">{{effet.description}}</a>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<label>Effets</label>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label></label>
|
||||||
|
<div class="flexcol">
|
||||||
|
{{#each effets.succes.select as |effet pos|}}
|
||||||
|
<label>
|
||||||
|
{{effet.description}}
|
||||||
|
{{#if @root.isGM}}
|
||||||
|
<a class="effet-delete" data-effet-code="{{effet.code}}" data-effet-resultat="{{effet.resultat}}" data-effet-pos="{{pos}}" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
</label>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.succes.reference">Réference</label>
|
||||||
|
<input type="text" name="system.succes.reference" value="{{system.succes.reference}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="flexcol">
|
||||||
|
<label for="system.succes.poesie">Poésie</label>
|
||||||
|
<div class="form-group editor">
|
||||||
|
{{editor system.succes.poesie target="system.succes.poesie" button=true owner=owner editable=editable}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tab items" data-group="primary" data-tab="echec">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.echec.message">Message</label>
|
||||||
|
<textarea autocomplete="off" title="Message en cas d'échec" name="system.echec.message" {{#unless isGM}}disabled{{/unless}}/>{{system.echec.message}}</textarea>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="button-dropdown">
|
||||||
|
{{#if isGM}}
|
||||||
|
<label class="button-dropbutton" title="Ajouter">Effets <i class="fas fa-plus-circle"></i></label>
|
||||||
|
<div class="button-dropdown-content">
|
||||||
|
{{#each effets.echec.liste as |effet|}}
|
||||||
|
<a class="effet-add" data-effet-code="{{effet.code}}" data-effet-resultat="{{effet.resultat}}">{{effet.description}}</a>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<label>Effets</label>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label></label>
|
||||||
|
<div class="flexcol">
|
||||||
|
{{#each effets.echec.select as |effet pos|}}
|
||||||
|
<label>
|
||||||
|
{{effet.description}}
|
||||||
|
{{#if @root.isGM}}
|
||||||
|
<a class="effet-delete" data-effet-code="{{effet.code}}" data-effet-resultat="{{effet.resultat}}" data-effet-pos="{{pos}}" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||||
|
{{/if}}
|
||||||
|
</label>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.echec.reference">Réference</label>
|
||||||
|
<input type="text" name="system.echec.reference" value="{{system.echec.reference}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="flexcol">
|
||||||
|
<label for="system.echec.poesie">Poésie</label>
|
||||||
|
<div class="form-group editor">
|
||||||
|
{{editor system.echec.poesie target="system.echec.poesie" button=true owner=owner editable=editable}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{#unless system.mauvaiseRencontre}}
|
||||||
|
<div class="tab items" data-group="primary" data-tab="frequence">
|
||||||
|
<hr>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.cite">Fréquence en Cité</label>
|
||||||
|
<input type="number" name="system.frequence.cite" value="{{system.frequence.cite}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.sanctuaire">Fréquence en Sanctuaire</label>
|
||||||
|
<input type="number" name="system.frequence.sanctuaire" value="{{system.frequence.sanctuaire}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.plaines">Fréquence en Plaines</label>
|
||||||
|
<input type="number" name="system.frequence.plaines" value="{{system.frequence.plaines}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.pont">Fréquence en Pont</label>
|
||||||
|
<input type="number" name="system.frequence.pont" value="{{system.frequence.pont}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.collines">Fréquence en Collines</label>
|
||||||
|
<input type="number" name="system.frequence.collines" value="{{system.frequence.collines}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.foret">Fréquence en Forêt</label>
|
||||||
|
<input type="number" name="system.frequence.foret" value="{{system.frequence.foret}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.monts">Fréquence en Monts</label>
|
||||||
|
<input type="number" name="system.frequence.monts" value="{{system.frequence.monts}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.desert">Fréquence en Désert</label>
|
||||||
|
<input type="number" name="system.frequence.desert" value="{{system.frequence.desert}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.fleuve">Fréquence en Fleuve</label>
|
||||||
|
<input type="number" name="system.frequence.fleuve" value="{{system.frequence.fleuve}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.lac">Fréquence en Lac</label>
|
||||||
|
<input type="number" name="system.frequence.lac" value="{{system.frequence.lac}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.marais">Fréquence en Marais</label>
|
||||||
|
<input type="number" name="system.frequence.marais" value="{{system.frequence.marais}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.gouffre">Fréquence en Gouffre</label>
|
||||||
|
<input type="number" name="system.frequence.gouffre" value="{{system.frequence.gouffre}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.necropole">Fréquence en Nécropole</label>
|
||||||
|
<input type="number" name="system.frequence.necropole" value="{{system.frequence.necropole}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.frequence.desolation">Fréquence en Désolation</label>
|
||||||
|
<input type="number" name="system.frequence.desolation" value="{{system.frequence.desolation}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{/unless}}
|
||||||
|
</section>
|
||||||
|
</form>
|
Loading…
Reference in New Issue
Block a user