Ajout des options d'appréciation
L'appréciation utilise: - un niveau de qualité (qui réutilise la qualité sur les items en ayant) - un bon moment (coeur/musique/...) - un niveau de jet de moral - une caractéristique (perception) - une compétence Les bon moments passés sont remis à zéro lors du passage de château dormant. Ajout des jets de moral très heureux. Ajout de jet d'appréciation sur les résultats des oeuvres et des jeux.
This commit is contained in:
@@ -2,6 +2,15 @@
|
||||
|
||||
## 13.0.21 - La folie d'Illysis
|
||||
|
||||
- Jets d'appréciation et de moral
|
||||
- concerne la danse, musique, chant, jeu, les oeuvres, la nourriture, les services
|
||||
- gestion des compétences d'appréciation pour les oeuvres
|
||||
- pas de jet de moral si la qualité n'est pas suffisante (inférieure au moral,
|
||||
à la compétence, moral déjà gagné pour la même raison)
|
||||
- jet d'appréciation avec en option la compétence et la qualité
|
||||
- jet de moral très heureux (pour Spasme)
|
||||
- les jets de moral sont liés à des "bon moments"
|
||||
- la liste des bons moments passés par un acteur est remise à zéro à Château Dormant
|
||||
- La zone de saisie dans les journaux est mieux adaptée
|
||||
- Fenêtre de jet v2
|
||||
- les possessions sont maintenant gérées avec les fenêtres V2
|
||||
|
||||
@@ -682,7 +682,7 @@ select,
|
||||
.system-foundryvtt-reve-de-dragon .dialog-content div.roll-chat {
|
||||
font-family: CaslonAntique;
|
||||
display: grid;
|
||||
grid-template-areas: "img header buttons" "img resume buttons" "details details details" "actions actions actions";
|
||||
grid-template-areas: "img header buttons" "img resume buttons" "details details details" "description description description" "actions actions actions";
|
||||
grid-template-columns: 3rem 1fr 1.4rem;
|
||||
grid-template-rows: max-content max-content max-content max-content;
|
||||
gap: 0 0.5rem;
|
||||
@@ -738,6 +738,17 @@ select,
|
||||
.system-foundryvtt-reve-de-dragon .dialog-content div.roll-chat div.chat-actions a img {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .chat-message div.roll-chat div.chat-description,
|
||||
.system-foundryvtt-reve-de-dragon .dialog-content div.roll-chat div.chat-description {
|
||||
grid-area: description;
|
||||
text-align: justify;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .chat-message div.roll-chat div.chat-description div,
|
||||
.system-foundryvtt-reve-de-dragon .dialog-content div.roll-chat div.chat-description div {
|
||||
display: block;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .chat-message div.roll-chat div.chat-buttons,
|
||||
.system-foundryvtt-reve-de-dragon .dialog-content div.roll-chat div.chat-buttons {
|
||||
grid-area: buttons;
|
||||
@@ -1388,12 +1399,22 @@ select,
|
||||
margin-inline: 0.1rem;
|
||||
margin-block: 0.1rem;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .prosemirror menu {
|
||||
background-color: var(--color-background-chat-message);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .app.sheet fieldset :is(label, input) {
|
||||
font-family: CaslonAntique;
|
||||
text-align: justify;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .app.sheet input.attribute-value {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid var(--color-border-light-tertiary);
|
||||
padding: 1px 3px;
|
||||
height: var(--form-field-height);
|
||||
border-radius: 3px;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .app.sheet div.form-group {
|
||||
clear: both;
|
||||
display: flex;
|
||||
@@ -1402,9 +1423,6 @@ select,
|
||||
margin: 0.1rem 0;
|
||||
align-items: center;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .prosemirror menu {
|
||||
background-color: var(--color-background-chat-message);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .app.sheet .editor.prosemirror {
|
||||
height: fit-content;
|
||||
min-height: 6rem;
|
||||
|
||||
@@ -689,6 +689,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border-style: groove;
|
||||
border-width: 0.1rem;
|
||||
@@ -697,34 +698,48 @@
|
||||
margin-inline: 0.1rem;
|
||||
margin-block: 0.1rem;
|
||||
}
|
||||
.app.sheet fieldset :is(label, input) {
|
||||
font-family: CaslonAntique;
|
||||
text-align: justify;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.app.sheet div.form-group {
|
||||
clear: both;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin: 0.1rem 0;
|
||||
align-items: center;
|
||||
}
|
||||
.prosemirror {
|
||||
menu {
|
||||
background-color: var(--color-background-chat-message);
|
||||
}
|
||||
}
|
||||
.app.sheet .editor.prosemirror {
|
||||
height: fit-content;
|
||||
min-height: 6rem;
|
||||
.editor-container {
|
||||
|
||||
.app.sheet{
|
||||
fieldset :is(label, input) {
|
||||
font-family: CaslonAntique;
|
||||
text-align: justify;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
input.attribute-value {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid var(--color-border-light-tertiary);
|
||||
padding: 1px 3px;
|
||||
height: var(--form-field-height);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
div.form-group {
|
||||
clear: both;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin: 0.1rem 0;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.editor.prosemirror {
|
||||
height: fit-content;
|
||||
min-height: 6rem;
|
||||
height: calc(100% - 3rem);
|
||||
margin: 0;
|
||||
flex: none;
|
||||
|
||||
.editor-container {
|
||||
min-height: 6rem;
|
||||
height: calc(100% - 3rem);
|
||||
margin: 0;
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.app.sheet.journal-entry-page .editor.prosemirror{
|
||||
|
||||
+12
-1
@@ -6,7 +6,9 @@
|
||||
"img header buttons"
|
||||
"img resume buttons"
|
||||
"details details details"
|
||||
"actions actions actions";
|
||||
"description description description"
|
||||
"actions actions actions"
|
||||
;
|
||||
grid-template-columns: 3rem 1fr 1.4rem;
|
||||
grid-template-rows: max-content max-content max-content max-content;
|
||||
gap: 0 0.5rem;
|
||||
@@ -53,6 +55,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
div.chat-description {
|
||||
grid-area: description;
|
||||
text-align: justify;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
div {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
div.chat-buttons {
|
||||
grid-area: buttons;
|
||||
|
||||
@@ -18,6 +18,7 @@ import { RdDBaseActorSangSheet } from "./actor/base-actor-sang-sheet.js";
|
||||
import { RdDCoeur } from "./coeur/rdd-coeur.js";
|
||||
import { AppPersonnageAleatoire } from "./actor/random/app-personnage-aleatoire.js";
|
||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
import { MORAL } from "./moral/apprecier.mjs";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
@@ -275,9 +276,9 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
||||
this.html.find('.seuil-reve-value').change(async event => await this.actor.setPointsDeSeuil(event.currentTarget.value))
|
||||
|
||||
this.html.find('.stress-test').click(async event => await this.actor.transformerStress())
|
||||
this.html.find('.moral-malheureux').click(async event => await this.actor.jetDeMoral('malheureuse'))
|
||||
this.html.find('.moral-neutre').click(async event => await this.actor.jetDeMoral('neutre'))
|
||||
this.html.find('.moral-heureux').click(async event => await this.actor.jetDeMoral('heureuse'))
|
||||
this.html.find('.moral-malheureux').click(async event => await this.actor.jetDeMoral(MORAL.MALHEUREUX))
|
||||
this.html.find('.moral-neutre').click(async event => await this.actor.jetDeMoral(MORAL.NEUTRE))
|
||||
this.html.find('.moral-heureux').click(async event => await this.actor.jetDeMoral(MORAL.HEUREUX))
|
||||
this.html.find('.button-ethylisme').click(async event => await this.actor.jetEthylisme())
|
||||
|
||||
this.html.find('.ptreve-actuel-plus').click(async event => await this.actor.reveActuelIncDec(1))
|
||||
|
||||
+45
-33
@@ -19,7 +19,7 @@ import { DialogConsommer } from "./dialog-item-consommer.js";
|
||||
import { DialogFabriquerPotion } from "./dialog-fabriquer-potion.js";
|
||||
import { RollDataAjustements } from "./rolldata-ajustements-v1.js";
|
||||
import { RdDPossession } from "./rdd-possession.js";
|
||||
import { ACTOR_TYPES, RDD_CONFIG, renderTemplate, SHOW_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { ACTOR_TYPES, renderTemplate, SHOW_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { RdDConfirm } from "./rdd-confirm.js";
|
||||
import { DialogRepos } from "./sommeil/dialog-repos.js";
|
||||
import { RdDBaseActor } from "./actor/base-actor.js";
|
||||
@@ -53,6 +53,7 @@ import { PART_COMP } from "./roll/roll-part-comp.mjs";
|
||||
import { PART_OEUVRE } from "./roll/roll-part-oeuvre.mjs";
|
||||
import { PART_CUISINE } from "./roll/roll-part-cuisine.mjs";
|
||||
import { RdDPossessionV2 } from "./rdd-possession-v2.mjs";
|
||||
import { MORAL, SITUATION_MORAL } from "./moral/apprecier.mjs";
|
||||
|
||||
export const MAINS_DIRECTRICES = ['Droitier', 'Gaucher', 'Ambidextre']
|
||||
|
||||
@@ -362,15 +363,15 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
content: ""
|
||||
};
|
||||
|
||||
await this._recuperationSante(message);
|
||||
await this._recupereMoralChateauDormant(message);
|
||||
await this._recupereChance();
|
||||
await this.transformerStress();
|
||||
await this.retourSeuilDeReve(message);
|
||||
await this.setBonusPotionSoin(0);
|
||||
await this.retourSust(message);
|
||||
await this.$perteReveEnchantementsChateauDormants();
|
||||
await this.$suppressionLancementsSort();
|
||||
await this._recuperationSante(message)
|
||||
await this._recupereMoralChateauDormant(message)
|
||||
await this._recupereChance()
|
||||
await this.transformerStress()
|
||||
await this.retourSeuilDeReve(message)
|
||||
await this.setBonusPotionSoin(0)
|
||||
await this.retourSust(message)
|
||||
await this.$perteReveEnchantementsChateauDormants()
|
||||
await this.$suppressionLancementsSort()
|
||||
await RdDCoeur.applyCoeurChateauDormant(this, message);
|
||||
if (message.content != "") {
|
||||
message.content = `A la fin Chateau Dormant, ${message.content}<br>Un nouveau jour se lève`;
|
||||
@@ -414,11 +415,13 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
|
||||
async _recupereMoralChateauDormant(message) {
|
||||
await this.update({ 'system.compteurs.bonmoments': [] }, { render: false })
|
||||
|
||||
if (!ReglesOptionnelles.isUsing("recuperation-moral")) { return }
|
||||
|
||||
const etatMoral = this.system.sommeil?.moral ?? 'neutre';
|
||||
const jetMoral = await this._jetDeMoral(etatMoral);
|
||||
message.content += ` -- le jet de moral est ${etatMoral}, le moral ` + this._messageAjustementMoral(jetMoral.ajustement);
|
||||
const etatMoral = this.system.sommeil?.moral ?? MORAL.NEUTRE
|
||||
const jetMoral = await this._jetDeMoral(etatMoral)
|
||||
message.content += ` -- le jet de moral est ${etatMoral}, le moral ` + this._messageAjustementMoral(jetMoral.ajustement)
|
||||
}
|
||||
|
||||
_messageAjustementMoral(ajustement) {
|
||||
@@ -1195,17 +1198,21 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async jetDeMoral(situation, messageReussi = undefined, messageManque = undefined) {
|
||||
const jetMoral = await this._jetDeMoral(situation);
|
||||
const finMessage = (jetMoral.succes ? messageReussi : messageManque) ?? (jetMoral.ajustement == 0 ? "Vous gardez votre moral" : jetMoral.ajustement > 0 ? "Vous gagnez du moral" : "Vous perdez du moral");
|
||||
async jetDeMoral(situation, bonmoment = "") {
|
||||
if (bonmoment != "" && bonmoment != undefined && this.system.compteurs.bonmoments.includes(bonmoment)) {
|
||||
ui.notifications.info(`${this.name} a déjà gagné du moral après avoir passé un bon moment (${bonmoment}) pendant la journée, pas de gain de moral`)
|
||||
return
|
||||
}
|
||||
const jetMoral = await this._jetDeMoral(situation, bonmoment)
|
||||
const finMessage = (jetMoral.ajustement == 0 ? "Vous gardez votre moral" : jetMoral.ajustement > 0 ? "Vous gagnez du moral" : "Vous perdez du moral");
|
||||
ChatMessage.create({
|
||||
whisper: ChatUtility.getOwners(this),
|
||||
content: `${finMessage} - jet ${jetMoral.succes ? "réussi" : "manqué"} en situation ${situation} (${jetMoral.jet}/${jetMoral.difficulte}).`
|
||||
});
|
||||
return jetMoral.ajustement;
|
||||
content: `${finMessage} - jet ${jetMoral.succes ? "réussi" : "manqué"} en situation ${SITUATION_MORAL[situation] ?? situation} (${jetMoral.jet}/${jetMoral.difficulte}).`
|
||||
})
|
||||
return jetMoral.ajustement
|
||||
}
|
||||
|
||||
async _jetDeMoral(situation) {
|
||||
async _jetDeMoral(situation, bonmoment = "") {
|
||||
const moralActuel = Misc.toInt(this.system.compteurs.moral.value);
|
||||
const jet = await RdDDice.rollTotal("1d20");
|
||||
const difficulte = 10 + moralActuel;
|
||||
@@ -1217,14 +1224,18 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
difficulte: difficulte,
|
||||
succes: succes,
|
||||
ajustement: this._calculAjustementMoral(succes, moralActuel, situation)
|
||||
};
|
||||
await this.moralIncDec(jetMoral.ajustement);
|
||||
}
|
||||
await this.moralIncDec(jetMoral.ajustement, bonmoment);
|
||||
return jetMoral;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async moralIncDec(ajustementMoral) {
|
||||
async moralIncDec(ajustementMoral, bonmoment = "") {
|
||||
if (ajustementMoral != 0) {
|
||||
if (ajustementMoral > 0 && bonmoment != "" && bonmoment != undefined) {
|
||||
const bonmoments = [...this.system.compteurs.bonmoments, bonmoment]
|
||||
await this.update({ 'system.compteurs.bonmoments': bonmoments }, { render: false })
|
||||
}
|
||||
const startMoral = parseInt(this.system.compteurs.moral.value)
|
||||
const moralTheorique = startMoral + ajustementMoral
|
||||
if (moralTheorique > 3) { // exaltation
|
||||
@@ -1245,13 +1256,14 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
/* -------------------------------------------- */
|
||||
_calculAjustementMoral(succes, moral, situation) {
|
||||
switch (situation) {
|
||||
case 'heureux': case 'heureuse': return succes ? 1 : 0;
|
||||
case 'malheureuse': case 'malheureux': return succes ? 0 : -1;
|
||||
case 'neutre':
|
||||
if (succes && moral < 0) return 1;
|
||||
if (!succes && moral > 0) return -1;
|
||||
case MORAL.TRESHEUREUX: return succes ? 2 : 1
|
||||
case MORAL.HEUREUX: case 'heureuse': return succes ? 1 : 0
|
||||
case MORAL.MALHEUREUX: case 'malheureuse': return succes ? 0 : -1
|
||||
case MORAL.NEUTRE:
|
||||
if (succes && moral < 0) return 1
|
||||
if (!succes && moral > 0) return -1
|
||||
}
|
||||
return 0;
|
||||
return 0
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -1331,7 +1343,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
await this.apprecier(CARACS.ODORATGOUT, 'cuisine', item.system.qualite, item.system.boisson ? "apprécie la boisson" : "apprécie le plat");
|
||||
}
|
||||
else if (seForcer) {
|
||||
await this.jetDeMoral('malheureux');
|
||||
await this.jetDeMoral(MORAL.MALHEUREUX);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
@@ -1362,7 +1374,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
const rolled = await this.doRollCaracCompetence(carac, undefined, 0, { title });
|
||||
if (rolled?.isSuccess) {
|
||||
await this.jetDeMoral('heureux');
|
||||
await this.jetDeMoral(MORAL.HEUREUX);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1429,7 +1441,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
ethylismeData.perteEndurance = await this.santeIncDec("endurance", -perte);
|
||||
|
||||
if (!ethylisme.jet_moral) {
|
||||
ethylismeData.jetMoral = await this._jetDeMoral('heureuse');
|
||||
ethylismeData.jetMoral = await this._jetDeMoral(MORAL.HEUREUX, "Ethylisme");
|
||||
if (ethylismeData.jetMoral.ajustement == 1) {
|
||||
ethylismeData.moralAlcool = 'heureux';
|
||||
ethylisme.jet_moral = true;
|
||||
@@ -1437,7 +1449,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
ethylismeData.jetMoral.ajustement = -1;
|
||||
ethylismeData.moralAlcool = 'triste';
|
||||
ethylisme.jet_moral = true;
|
||||
await this.moralIncDec(-1);
|
||||
await this.moralIncDec(-1, "Ethylisme");
|
||||
}
|
||||
}
|
||||
if (ethylisme.value < 0) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { RdDBaseActor } from "../actor/base-actor.js";
|
||||
import { ChatUtility } from "../chat-utility.js";
|
||||
import { renderTemplate } from "../constants.js";
|
||||
import { MORAL } from "../moral/apprecier.mjs";
|
||||
|
||||
const INFO_COEUR = 'info-coeur';
|
||||
|
||||
@@ -122,7 +123,7 @@ export class RdDCoeur {
|
||||
const diff = Math.abs(infoCoeur.source.jetTendre - infoCoeur.target.jetTendre)
|
||||
for (let amoureux of [infoCoeur.source, infoCoeur.target]) {
|
||||
const actorAmoureux = game.actors.get(amoureux.actor.id);
|
||||
amoureux.situation = diff <= amoureux.coeur ? 'heureux' : 'neutre'
|
||||
amoureux.situation = diff <= amoureux.coeur ? MORAL.HEUREUX : MORAL.NEUTRE
|
||||
amoureux.gainMoral = await actorAmoureux.jetDeMoral(amoureux.situation)
|
||||
}
|
||||
const chatHtml = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/coeur/chat-accepter-tendre-moment.hbs`, infoCoeur)
|
||||
|
||||
@@ -3,6 +3,7 @@ import { renderTemplate } from "./constants.js"
|
||||
export class DialogSelect extends Dialog {
|
||||
static extractIdNameImg(it) { return { id: it.id, name: it.name, img: it.img } }
|
||||
|
||||
|
||||
static async select(selectionData, onSelectChoice) {
|
||||
const html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/dialog-select.hbs", selectionData)
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ import { RdDTimestamp } from "./time/rdd-timestamp.js";
|
||||
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
|
||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
import { ItemAction } from "./item/item-actions.js";
|
||||
import { SANS_COMPETENCE } from "./item/base-items.js";
|
||||
import { Apprecier } from "./moral/apprecier.mjs";
|
||||
|
||||
/**
|
||||
* Extend the basic ItemSheet for RdD specific items
|
||||
@@ -89,6 +91,7 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const competences = (await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage))
|
||||
let formData = {
|
||||
title: this.item.name,
|
||||
id: this.item.id,
|
||||
@@ -101,8 +104,9 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
|
||||
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
|
||||
isComestible: this.item.getUtilisationCuisine(),
|
||||
options: RdDSheetUtility.mergeDocumentRights({}, this.item, this.isEditable),
|
||||
competences: await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage),
|
||||
competences: [SANS_COMPETENCE, ...competences],
|
||||
categories: RdDItem.getCategories(this.item.type),
|
||||
isAppreciable: Apprecier.isAppreciable(this.item)
|
||||
}
|
||||
|
||||
if (this.item.type == ITEM_TYPES.competencecreature) {
|
||||
|
||||
+11
-6
@@ -28,7 +28,7 @@ const typesInventaireMateriel = [
|
||||
]
|
||||
const typesInventaire = {
|
||||
materiel: typesInventaireMateriel,
|
||||
all: ['service'].concat(typesInventaireMateriel),
|
||||
all: [ITEM_TYPES.service].concat(typesInventaireMateriel),
|
||||
}
|
||||
|
||||
const typesObjetsOeuvres = [ITEM_TYPES.oeuvre, ITEM_TYPES.recettecuisine, ITEM_TYPES.musique, ITEM_TYPES.chant, ITEM_TYPES.danse, ITEM_TYPES.jeu]
|
||||
@@ -36,6 +36,10 @@ const typesObjetsDraconiques = [ITEM_TYPES.queue, ITEM_TYPES.ombre, ITEM_TYPES.s
|
||||
const typesObjetsConnaissance = [ITEM_TYPES.meditation, ITEM_TYPES.recettealchimique, ITEM_TYPES.sort]
|
||||
const typesObjetsEffet = [ITEM_TYPES.possession, ITEM_TYPES.poison, ITEM_TYPES.maladie, ITEM_TYPES.blessure]
|
||||
const typesObjetsCompetence = [ITEM_TYPES.competence, ITEM_TYPES.competencecreature]
|
||||
const typesAppreciable = [
|
||||
ITEM_TYPES.oeuvre, ITEM_TYPES.musique, ITEM_TYPES.chant, ITEM_TYPES.danse, ITEM_TYPES.nourritureboisson,
|
||||
ITEM_TYPES.jeu, ITEM_TYPES.service
|
||||
]
|
||||
const typesObjetsTemporels = [ITEM_TYPES.blessure, ITEM_TYPES.poison, ITEM_TYPES.maladie, ITEM_TYPES.queue, ITEM_TYPES.ombre, ITEM_TYPES.souffle, ITEM_TYPES.signedraconique, ITEM_TYPES.rencontre]
|
||||
const typesObjetsEquipable = [ITEM_TYPES.arme, ITEM_TYPES.armure, ITEM_TYPES.objet];
|
||||
const typesEnvironnement = typesInventaireMateriel;
|
||||
@@ -96,14 +100,14 @@ export class RdDItem extends Item {
|
||||
switch (field) {
|
||||
case 'quantite':
|
||||
if (ITEM_TYPES.conteneur == type) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
break;
|
||||
case 'cout':
|
||||
if (ITEM_TYPES.monnaie == type) {
|
||||
return game.user.isGM;
|
||||
}
|
||||
break;
|
||||
break
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -180,10 +184,10 @@ export class RdDItem extends Item {
|
||||
|
||||
isCompetencePersonnage() { return this.type == ITEM_TYPES.competence }
|
||||
isCompetenceCreature() { return this.type == ITEM_TYPES.competencecreature }
|
||||
isConteneur() { return this.type == ITEM_TYPES.conteneur; }
|
||||
isMonnaie() { return this.type == ITEM_TYPES.monnaie; }
|
||||
isConteneur() { return this.type == ITEM_TYPES.conteneur }
|
||||
isMonnaie() { return this.type == ITEM_TYPES.monnaie }
|
||||
isNourritureBoisson() { return this.type == ITEM_TYPES.nourritureboisson; }
|
||||
isService() { return this.type == ITEM_TYPES.service; }
|
||||
isService() { return this.type == ITEM_TYPES.service }
|
||||
isAttaque() { return false }
|
||||
isParade() { return false }
|
||||
isBouclier() { return false }
|
||||
@@ -214,6 +218,7 @@ export class RdDItem extends Item {
|
||||
isConnaissance() { return typesObjetsConnaissance.includes(this.type) }
|
||||
|
||||
isInventaire(mode = 'materiel') { return RdDItem.getItemTypesInventaire(mode).includes(this.type); }
|
||||
isAppreciable() { return typesAppreciable.includes(this.type) }
|
||||
isBoisson() { return this.isNourritureBoisson() && this.system.boisson; }
|
||||
isAlcool() { return this.isNourritureBoisson() && this.system.boisson && this.system.alcoolise; }
|
||||
isHerbeAPotion() { return this.type == ITEM_TYPES.herbe && (this.system.categorie == 'Soin' || this.system.categorie == 'Repos'); }
|
||||
|
||||
+37
-2
@@ -8,6 +8,7 @@ import { RdDTimestamp } from "./time/rdd-timestamp.js";
|
||||
import { RdDRaretes } from "./item/raretes.js";
|
||||
import { VOIES_DRACONIC } from "./item-sort.js";
|
||||
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
||||
import { APPRECIATION } from "./moral/apprecier.mjs";
|
||||
|
||||
class Migration {
|
||||
get code() { return "sample"; }
|
||||
@@ -33,7 +34,6 @@ class Migration {
|
||||
await Item.updateDocuments(itemUpdates);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class _1_5_34_migrationPngWebp {
|
||||
@@ -662,6 +662,37 @@ class _13_0_7_FixNiveauOeuvres extends Migration {
|
||||
}
|
||||
}
|
||||
|
||||
class _13_0_21_AjoutAppreciation extends Migration {
|
||||
get code() { return "ajout-appreciation" }
|
||||
get version() { return "13.0.21" }
|
||||
|
||||
async migrate() {
|
||||
await this.applyItemsUpdates(items => items
|
||||
.filter(it => it.isAppreciable())
|
||||
.filter(it => this.getBaseAppreciation(it))
|
||||
.map(it => {
|
||||
return { _id: it.id, 'system.appreciation': this.getBaseAppreciation(it) }
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
getBaseAppreciation(item) {
|
||||
switch (item.type) {
|
||||
case ITEM_TYPES.nourritureboisson: return APPRECIATION.CUISINE
|
||||
case ITEM_TYPES.service: return APPRECIATION.SERVICE
|
||||
case ITEM_TYPES.musique: return APPRECIATION.MUSIQUE
|
||||
case ITEM_TYPES.chant: return APPRECIATION.CHANT
|
||||
case ITEM_TYPES.danse: return APPRECIATION.DANSE
|
||||
case ITEM_TYPES.oeuvre: {
|
||||
const appreciation = foundry.utils.duplicate(APPRECIATION.OEUVRE)
|
||||
appreciation.competence = item.system.competence
|
||||
return appreciation
|
||||
}
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
export class Migrations {
|
||||
static getMigrations() {
|
||||
return [
|
||||
@@ -687,6 +718,7 @@ export class Migrations {
|
||||
new _12_0_38_TachesEcriture(),
|
||||
new _13_0_4_FixReveActuel(),
|
||||
new _13_0_7_FixNiveauOeuvres(),
|
||||
new _13_0_21_AjoutAppreciation(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -707,7 +739,10 @@ export class Migrations {
|
||||
}
|
||||
if (foundry.utils.isNewerVersion(game.system.version, currentVersion)) {
|
||||
// if (true) { /* comment previous and uncomment here to test before upgrade */
|
||||
const migrations = Migrations.getMigrations().filter(m => foundry.utils.isNewerVersion(m.version, currentVersion));
|
||||
const migrations = Migrations.getMigrations().filter(m => foundry.utils.isNewerVersion(m.version, currentVersion)
|
||||
/* uncomment and set the version to migrate to to force a migration */
|
||||
// ||m.version == "13.0.21"
|
||||
)
|
||||
if (migrations.length > 0) {
|
||||
migrations.sort((a, b) => this.compareVersions(a, b));
|
||||
migrations.forEach(async (m) => {
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
import { ITEM_TYPES } from "../constants.js"
|
||||
import { SANS_COMPETENCE } from "../item/base-items.js"
|
||||
import { CARACS } from "../rdd-carac.js"
|
||||
import { RdDUtility } from "../rdd-utility.js"
|
||||
import { DIFF } from "../roll/roll-constants.mjs"
|
||||
import RollDialog from "../roll/roll-dialog.mjs"
|
||||
import { PART_COMP } from "../roll/roll-part-comp.mjs"
|
||||
|
||||
export const MORAL = {
|
||||
MALHEUREUX: "malheureux",
|
||||
NEUTRE: "neutre",
|
||||
HEUREUX: "heureux",
|
||||
TRESHEUREUX: "très heureux"
|
||||
}
|
||||
export const SITUATION_MORAL = {
|
||||
[MORAL.MALHEUREUX]: "malheureuse",
|
||||
[MORAL.NEUTRE]: "neutre",
|
||||
[MORAL.HEUREUX]: "heureuse",
|
||||
[MORAL.TRESHEUREUX]: "très heureuse",
|
||||
}
|
||||
export const APPRECIATION = {
|
||||
CUISINE: {
|
||||
bonmoment: "Cuisine", carac: CARACS.ODORATGOUT, competence: "Cuisine",
|
||||
moral: MORAL.HEUREUX, jetComp: false, jetQualite: false, compMinimum: true
|
||||
},
|
||||
MUSIQUE: {
|
||||
bonmoment: "Musique", carac: CARACS.OUIE, competence: "Musique",
|
||||
moral: MORAL.HEUREUX, jetComp: false, jetQualite: false, compMinimum: true
|
||||
},
|
||||
CHANT: {
|
||||
bonmoment: "Musique", carac: CARACS.OUIE, competence: "Chant",
|
||||
moral: MORAL.HEUREUX, jetComp: false, jetQualite: false, compMinimum: true
|
||||
},
|
||||
DANSE: {
|
||||
bonmoment: "Spectacle", carac: CARACS.EMPATHIE, competence: "Danse",
|
||||
moral: MORAL.HEUREUX, jetComp: false, jetQualite: false, compMinimum: true
|
||||
},
|
||||
JEU: {
|
||||
bonmoment: "Jeu", carac: CARACS.EMPATHIE, competence: "Jeu",
|
||||
moral: MORAL.HEUREUX, jetComp: false, jetQualite: false, compMinimum: true
|
||||
},
|
||||
OEUVRE: {
|
||||
bonmoment: "Spectacle", carac: CARACS.EMPATHIE, competence: "",
|
||||
moral: MORAL.HEUREUX, jetComp: false, jetQualite: false, compMinimum: true
|
||||
},
|
||||
SERVICE: {
|
||||
bonmoment: "Confort", carac: CARACS.EMPATHIE, competence: "",
|
||||
moral: MORAL.HEUREUX, jetComp: false, jetQualite: false, compMinimum: false
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
export class Apprecier {
|
||||
|
||||
static isAppreciable(item) {
|
||||
switch (item.type) {
|
||||
case ITEM_TYPES.nourritureboisson:
|
||||
case ITEM_TYPES.service:
|
||||
return item.system.qualite > 0
|
||||
case ITEM_TYPES.chant:
|
||||
case ITEM_TYPES.musique:
|
||||
case ITEM_TYPES.danse:
|
||||
case ITEM_TYPES.oeuvre:
|
||||
case ITEM_TYPES.jeu:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
static qualite(qualite, roll = undefined, comp = undefined) {
|
||||
if (roll && comp) {
|
||||
return roll.rolled.isSuccess ? qualite : Math.min(qualite, comp.system.niveau)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
static getAppreciation(qualite, appreciable, roll = undefined, comp = undefined) {
|
||||
return {
|
||||
qualite: (roll?.rolled.ptQualite ?? 0) + Apprecier.qualite(qualite, roll, comp),
|
||||
appreciation: foundry.utils.duplicate(appreciable.system.appreciation),
|
||||
messages: []
|
||||
}
|
||||
}
|
||||
|
||||
static onClickApprecier(roll) {
|
||||
const appreciation = roll.result.appreciation
|
||||
if (appreciation.moral == "") {
|
||||
return
|
||||
}
|
||||
RdDUtility.doWithSelectedActor(
|
||||
actor => new Apprecier(actor, appreciation, roll.result.qualite).apprecier(),
|
||||
actor => actor.isPersonnage())
|
||||
}
|
||||
|
||||
constructor(actor, appreciation, qualite) {
|
||||
this.actor = actor
|
||||
this.appreciation = foundry.utils.duplicate(appreciation)
|
||||
this.appreciation.situation = SITUATION_MORAL[appreciation.moral]
|
||||
this.qualite = qualite
|
||||
this.raisons = []
|
||||
}
|
||||
|
||||
apprecier() {
|
||||
if (this.qualite <= 0) {
|
||||
this.raisons.push(`la qualité ${this.qualite} est négative.`)
|
||||
}
|
||||
if (this.qualite <= this.actor.getMoralTotal()) {
|
||||
this.raisons.push(`la qualité de ${this.qualite} est inférieure au moral de ${this.actor.getMoralTotal()}.`)
|
||||
}
|
||||
const competence = this.actor.getCompetence(this.appreciation.competence) ?? SANS_COMPETENCE
|
||||
if (this.appreciation.compMinimum && this.qualite <= competence.system.niveau && competence.system.niveau > 0) {
|
||||
this.raisons.push(`la qualité ${this.qualite} est insuffisante pour le niveau ${competence.system.niveau} en ${this.appreciation.competence}`)
|
||||
}
|
||||
const bonmoment = this.appreciation.bonmoment
|
||||
if (!["", undefined].includes(bonmoment) && this.actor.system.compteurs.bonmoments.includes(bonmoment)) {
|
||||
this.raisons.push(`du moral a déjà été gagné pour cause de ${bonmoment}`)
|
||||
}
|
||||
|
||||
if (this.appreciation.carac != "") {
|
||||
this.rollAppreciation()
|
||||
}
|
||||
else {
|
||||
this.rollMoral()
|
||||
}
|
||||
}
|
||||
|
||||
rollAppreciation() {
|
||||
const competence = (this.appreciation.jetComp && this.appreciation.competence) ? this.appreciation.competence : ""
|
||||
const rollData = {
|
||||
ids: { actorId: this.actor.id },
|
||||
type: { allowed: [PART_COMP], current: PART_COMP, appreciation: true },
|
||||
selected: {
|
||||
carac: { key: this.appreciation.carac, forced: true },
|
||||
comp: { key: competence, forced: true },
|
||||
diff: { type: DIFF.IMPOSEE },
|
||||
apprecier: {
|
||||
appreciation: this.appreciation,
|
||||
qualite: this.qualite,
|
||||
raisons: this.raisons
|
||||
}
|
||||
}
|
||||
}
|
||||
RollDialog.create(rollData, { callbacks: [async r => await this.onRollAppreciation(r)] })
|
||||
}
|
||||
|
||||
async onRollAppreciation(roll) {
|
||||
if (roll.rolled.isSuccess) {
|
||||
await this.rollMoral()
|
||||
}
|
||||
else {
|
||||
if (this.appreciation.moral == MORAL.TRESHEUREUX) {
|
||||
await this.rollMoral(MORAL.HEUREUX)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async rollMoral(moral = undefined) {
|
||||
if (this.raisons.length > 0) {
|
||||
return
|
||||
}
|
||||
|
||||
moral = moral ?? this.appreciation.moral
|
||||
// TODO: jet de moral
|
||||
await this.actor.jetDeMoral(moral, this.appreciation.bonmoment)
|
||||
}
|
||||
}
|
||||
+31
-7
@@ -18,7 +18,7 @@ import { RdDEmpoignade } from "./rdd-empoignade.js";
|
||||
import { ExperienceLog } from "./actor/experience-log.js";
|
||||
import { RdDCoeur } from "./coeur/rdd-coeur.js";
|
||||
import { APP_ASTROLOGIE_REFRESH } from "./sommeil/app-astrologie.js";
|
||||
import { ITEM_TYPES, RDD_CONFIG, SYSTEM_RDD } from "./constants.js";
|
||||
import { ACTOR_TYPES, ITEM_TYPES, RDD_CONFIG, SYSTEM_RDD } from "./constants.js";
|
||||
import { RdDBaseActor } from "./actor/base-actor.js";
|
||||
import { RdDCarac } from "./rdd-carac.js";
|
||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
@@ -26,6 +26,8 @@ import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
import { RdDItemCompetence } from "./item-competence.js";
|
||||
import { Monnaie } from "./item-monnaie.js";
|
||||
import { ItemAction } from "./item/item-actions.js";
|
||||
import { Targets } from "./targets.js";
|
||||
import { DialogSelect } from "./dialog-select.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// This table starts at 0 -> niveau -10
|
||||
@@ -180,9 +182,14 @@ export class RdDUtility {
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/header-item.hbs',
|
||||
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/queue-sheet.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/partial-hautrevant.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/partial-frequence.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/partial-appreciable.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-bonmoment.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-carac.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-moral.hbs',
|
||||
// partial enums
|
||||
'systems/foundryvtt-reve-de-dragon/templates/enum-aspect-tarot.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/enum-base-competence.hbs',
|
||||
@@ -232,9 +239,6 @@ export class RdDUtility {
|
||||
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/partial-item-hautrevant.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/partial-item-frequence.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/roll/explain.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/resolution-table.hbs',
|
||||
// Dialogs
|
||||
@@ -847,6 +851,26 @@ export class RdDUtility {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
static doWithSelectedActor(onSelected = () => { }, filter = actor => true) {
|
||||
const selected = RdDUtility.getSelectedActor()
|
||||
if (selected) {
|
||||
onSelected(selected)
|
||||
}
|
||||
else {
|
||||
const actors = game.actors
|
||||
.filter(it => it.getUserLevel(game.user) == CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER)
|
||||
.filter(it => ![ACTOR_TYPES.commerce, ACTOR_TYPES.vehicule].includes(it.type))
|
||||
.filter(filter)
|
||||
const selectData = {
|
||||
title: "Choisir un acteur",
|
||||
label: "Choisir un acteur",
|
||||
list: actors.map(it => Targets.extractActorData(it))
|
||||
};
|
||||
DialogSelect.select(selectData, it => onSelected(game.actors.get(it.id)))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static createMonnaie(name, cout, img = "", enc = 0.01) {
|
||||
let piece = {
|
||||
|
||||
@@ -15,6 +15,7 @@ import { RdDEmpoignade } from "../rdd-empoignade.js"
|
||||
import { Misc } from "../misc.js"
|
||||
import { RollBasicParts } from "./roll-basic-parts.mjs"
|
||||
import { RdDPossessionV2 } from "../rdd-possession-v2.mjs"
|
||||
import { Apprecier } from "../moral/apprecier.mjs"
|
||||
|
||||
export default class ChatRollResult {
|
||||
static init() {
|
||||
@@ -25,14 +26,16 @@ export default class ChatRollResult {
|
||||
|
||||
static onReady() {
|
||||
foundry.applications.handlebars.loadTemplates({
|
||||
'partial-infojet': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-infojet.hbs',
|
||||
'partial-appel-chance': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-appel-chance.hbs',
|
||||
'partial-apprecier': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-apprecier.hbs',
|
||||
'partial-appreciation': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-appreciation.hbs',
|
||||
'partial-attaque-particuliere': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-attaque-particuliere.hbs',
|
||||
'partial-choix-maladresse': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-choix-maladresse.hbs',
|
||||
'partial-maladresse': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-maladresse.hbs',
|
||||
'partial-encaissement': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-encaissement.hbs',
|
||||
'partial-recul-choc': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-recul-choc.hbs',
|
||||
'partial-infojet': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-infojet.hbs',
|
||||
'partial-info-appel-moral': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-info-appel-moral.hbs',
|
||||
'partial-maladresse': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-maladresse.hbs',
|
||||
'partial-recul-choc': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-recul-choc.hbs',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -64,7 +67,8 @@ export default class ChatRollResult {
|
||||
$isAppelChancePossible(roll) {
|
||||
return roll.active.actor.isPersonnage() &&
|
||||
roll.rolled.isEchec &&
|
||||
RdDCarac.isActionPhysique(roll.current.carac?.key)
|
||||
RdDCarac.isActionPhysique(roll.current.carac?.key) &&
|
||||
!roll.type.appreciation
|
||||
}
|
||||
|
||||
$isShowEncaissement(roll) {
|
||||
@@ -142,6 +146,7 @@ export default class ChatRollResult {
|
||||
$(html).on("click", '.resister-recul', event => this.onClickRecul(event))
|
||||
$(html).on("click", '.choix-particuliere', event => this.onClickChoixParticuliere(event))
|
||||
$(html).on("click", '.faire-gouter', event => this.onClickFaireGouter(event))
|
||||
$(html).on("click", '.apprecier', event => this.onClickApprecier(event))
|
||||
$(html).on("click", '.monter-tmr-normale', event => this.onClickMonteeTMR(event, 'normal'))
|
||||
$(html).on("click", '.monter-tmr-rapide', event => this.onClickMonteeTMR(event, 'rapide'))
|
||||
$(html).on("click", '.tirer-maladresse', event => this.onClickTirerMaladresse(event))
|
||||
@@ -313,6 +318,11 @@ export default class ChatRollResult {
|
||||
}
|
||||
await new RollTypeCuisine().onFaireGouter(savedRoll)
|
||||
}
|
||||
async onClickApprecier(event) {
|
||||
const chatMessage = ChatUtility.getChatMessage(event)
|
||||
const savedRoll = this.loadChatMessageRoll(chatMessage)
|
||||
await Apprecier.onClickApprecier(savedRoll)
|
||||
}
|
||||
|
||||
async onClickMonteeTMR(event, mode) {
|
||||
const chatMessage = ChatUtility.getChatMessage(event)
|
||||
|
||||
@@ -28,7 +28,7 @@ export const DIFF = {
|
||||
export const DIFFS = {
|
||||
[DIFF.LIBRE]: { key: DIFF.LIBRE, label: "Difficulté libre", libre: true, visible: true, max: 0 },
|
||||
[DIFF.ATTAQUE]: { key: DIFF.ATTAQUE, label: "Difficulté d'attaque", libre: true, visible: true, max: 0 },
|
||||
[DIFF.IMPOSEE]: { key: DIFF.IMPOSEE, label: "Difficulté imposée", libre: false, visible: true, max: 0 },
|
||||
[DIFF.IMPOSEE]: { key: DIFF.IMPOSEE, label: "Difficulté imposée", libre: false, visible: true, max: 20 },
|
||||
[DIFF.DEFENSE]: { key: DIFF.DEFENSE, label: "Difficulté défense", libre: false, visible: true, max: 0 },
|
||||
[DIFF.DEFAUT]: { key: DIFF.DEFAUT, label: "Difficulté", libre: true, visible: true, max: 5 },
|
||||
[DIFF.AUCUN]: { key: DIFF.AUCUN, label: "", libre: false, visible: false, max: 0 },
|
||||
|
||||
@@ -50,6 +50,7 @@ import { RollPartEcailles } from "./roll-part-ecailles.mjs";
|
||||
import { RollPartResistance } from "./roll-part-resistance.mjs";
|
||||
import { RollTypePossession } from "./roll-type-possession.mjs";
|
||||
import { RollPartPossession } from "./roll-part-possession.mjs";
|
||||
import { RollPartApprecier } from "./roll-part-apprecier.mjs";
|
||||
|
||||
|
||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api
|
||||
@@ -78,6 +79,7 @@ const ROLL_PARTS = [
|
||||
new RollPartComp(),
|
||||
|
||||
new RollPartDiff(),
|
||||
new RollPartApprecier(),
|
||||
new RollPartAttaque(),
|
||||
new RollPartPossession(),
|
||||
new RollPartDefense(),
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import { ROLLDIALOG_SECTION, RollPart } from "./roll-part.mjs";
|
||||
|
||||
export const PART_APPRECIER = "apprecier"
|
||||
|
||||
export class RollPartApprecier extends RollPart {
|
||||
|
||||
get code() { return PART_APPRECIER }
|
||||
get section() { return ROLLDIALOG_SECTION.CHOIX }
|
||||
|
||||
restore(rollData) {
|
||||
this.setCurrent(rollData, this.getSaved(rollData))
|
||||
}
|
||||
|
||||
store(rollData, targetData) {
|
||||
this.setSaved(targetData, this.getCurrent(rollData))
|
||||
}
|
||||
|
||||
visible(rollData) {
|
||||
return rollData.type.appreciation
|
||||
}
|
||||
|
||||
getAjustements(rollData) {
|
||||
const current = this.getCurrent(rollData)
|
||||
if (current.appreciation.jetQualite){
|
||||
return [{
|
||||
label: 'Qualité',
|
||||
value: Math.abs(current.qualite)
|
||||
}]
|
||||
}
|
||||
return []
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,12 @@ export class RollPartComp extends RollPartSelect {
|
||||
if (selected.forced) {
|
||||
refs.all = all.filter(comp => Grammar.equalsInsensitive(comp.label, selected.key))
|
||||
if (refs.all.length == 0) {
|
||||
refs.all = all.filter(comp => Grammar.includesLowerCaseNoAccent(comp.label, selected.key))
|
||||
if (selected.key.length > 0) {
|
||||
refs.all = all.filter(comp => Grammar.includesLowerCaseNoAccent(comp.label, selected.key))
|
||||
}
|
||||
else {
|
||||
refs.all = all.filter(comp => comp == SANS_COMPETENCE)
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -32,7 +32,7 @@ export class RollPartDiff extends RollPart {
|
||||
}
|
||||
|
||||
visible(rollData) {
|
||||
if (EXCLUDED_ROLL_TYPES.includes(rollData.type.current)) {
|
||||
if (EXCLUDED_ROLL_TYPES.includes(rollData.type.current) || rollData.type.appreciation) {
|
||||
return false
|
||||
}
|
||||
const current = this.getCurrent(rollData)
|
||||
|
||||
@@ -5,7 +5,12 @@ export class RollTypeComp extends RollType {
|
||||
get code() { return ROLL_TYPE_COMP }
|
||||
get name() { return `Jet de caractéristique / compétence` }
|
||||
|
||||
title(rollData) { return `fait un jet ${rollData.type.opposed ? ' contre ' : ''}` }
|
||||
title(rollData) {
|
||||
if (rollData.type.appreciation) {
|
||||
return "fait un jet d'appéciation"
|
||||
}
|
||||
return `fait un jet ${rollData.type.opposed ? ' contre ' : ''}`
|
||||
}
|
||||
|
||||
|
||||
onSelect(rollData) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { ITEM_TYPES } from "../constants.js"
|
||||
import { APPRECIATION } from "../moral/apprecier.mjs"
|
||||
import { RollBasicParts } from "./roll-basic-parts.mjs"
|
||||
import { DIFF, ROLL_TYPE_CUISINE } from "./roll-constants.mjs"
|
||||
import { PART_CUISINE } from "./roll-part-cuisine.mjs"
|
||||
@@ -49,7 +50,7 @@ export class RollTypeCuisine extends RollType {
|
||||
return result
|
||||
}
|
||||
onApplyImpacts(roll, impacts) {
|
||||
if (roll.result.plat) {
|
||||
if (roll.result.plat) {
|
||||
// le plat n'est pas créé immédiatement, il faut donc retrouver l'id
|
||||
roll.result.plat.id = impacts.findCreatedId('Item', roll.result.plat.id)
|
||||
}
|
||||
@@ -69,6 +70,7 @@ export class RollTypeCuisine extends RollType {
|
||||
quantite: current.proportions,
|
||||
qualite: result.qualite,
|
||||
cout: result.qualite > 0 ? (result.qualite * 0.01) : 0.01,
|
||||
appreciation: APPRECIATION.CUISINE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { PART_JEU, RollPartJeu } from "./roll-part-jeu.mjs"
|
||||
import { RollType } from "./roll-type.mjs"
|
||||
import { DIFF, ROLL_TYPE_JEU } from "./roll-constants.mjs"
|
||||
import { Apprecier } from "../moral/apprecier.mjs"
|
||||
|
||||
|
||||
export class RollTypeJeu extends RollType {
|
||||
@@ -20,4 +21,8 @@ export class RollTypeJeu extends RollType {
|
||||
RollPartJeu.forceCompJeu(rollData)
|
||||
}
|
||||
|
||||
}
|
||||
getResult(rollData, impacts) {
|
||||
const current = rollData.current[PART_JEU]
|
||||
return Apprecier.getAppreciation(current.qualite, current.jeu, rollData, current.comp)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Apprecier } from "../moral/apprecier.mjs"
|
||||
import { DIFF, ROLL_TYPE_OEUVRE } from "./roll-constants.mjs"
|
||||
import { PART_OEUVRE } from "./roll-part-oeuvre.mjs"
|
||||
import { RollType } from "./roll-type.mjs"
|
||||
@@ -18,12 +19,7 @@ export class RollTypeOeuvre extends RollType {
|
||||
|
||||
getResult(rollData, impacts) {
|
||||
const current = rollData.current[PART_OEUVRE]
|
||||
const qualite = rollData.rolled.isSuccess ? current.qualite : Math.min(current.qualite, current.comp.system.niveau)
|
||||
return {
|
||||
qualite: qualite + rollData.rolled.ptQualite,
|
||||
messages: []
|
||||
}
|
||||
return Apprecier.getAppreciation(current.qualite, current.oeuvre, rollData, current.comp)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -68,18 +68,20 @@ export class SystemCompendiums extends FormApplication {
|
||||
if (pack?.metadata.type == docType) {
|
||||
return await pack.getDocuments();
|
||||
}
|
||||
return [];
|
||||
return []
|
||||
}
|
||||
|
||||
static async getCompetences(actorType) {
|
||||
switch (actorType ?? 'personnage') {
|
||||
case 'personnage':
|
||||
return await SystemCompendiums.getWorldOrCompendiumItems('competence', 'competences')
|
||||
.then(list => list.sort((a, b) => a.name.localeCompare(b.name)))
|
||||
case 'entite':
|
||||
case 'creature':
|
||||
return await SystemCompendiums.getWorldOrCompendiumItems('competencecreature', 'competences-creatures')
|
||||
case 'vehicule': return [];
|
||||
.then(list => list.sort((a, b) => a.name.localeCompare(b.name)))
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
@@ -9,12 +9,12 @@ export class DialogRepos extends Dialog {
|
||||
return
|
||||
}
|
||||
if (!ReglesOptionnelles.isUsing("chateau-dormant-gardien") || !actor.hasPlayerOwner) {
|
||||
actor.system.sommeil = {
|
||||
foundry.utils.mergeObject(actor.system.sommeil, {
|
||||
"nouveaujour": true,
|
||||
"insomnie": EffetsDraconiques.isSujetInsomnie(actor),
|
||||
"moral": "neutre",
|
||||
"heures": 4
|
||||
}
|
||||
})
|
||||
}
|
||||
const html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/sommeil/dialog-repos.hbs", actor);
|
||||
const dialog = new DialogRepos(html, actor);
|
||||
|
||||
@@ -18,6 +18,14 @@ export class Targets {
|
||||
}
|
||||
}
|
||||
|
||||
static extractActorData(actor) {
|
||||
return {
|
||||
id: actor.id,
|
||||
name: actor.prototypeToken?.name ?? actor.name,
|
||||
img: actor.prototypeToken?.texture.src ?? actor.img ?? 'icons/svg/mystery-man.svg'
|
||||
}
|
||||
}
|
||||
|
||||
static buildActorTokenData(tokenId, actor) {
|
||||
return { id: tokenId, name: actor.name, img: actor.img ?? 'icons/svg/mystery-man.svg' };
|
||||
}
|
||||
|
||||
+20
-8
@@ -493,7 +493,8 @@
|
||||
"value": 0,
|
||||
"label": "Experience",
|
||||
"isInput": true
|
||||
}
|
||||
},
|
||||
"bonmoments": []
|
||||
},
|
||||
"sommeil": {
|
||||
"nouveaujour": false,
|
||||
@@ -607,6 +608,17 @@
|
||||
"milieu": "",
|
||||
"environnement": []
|
||||
},
|
||||
"appreciable": {
|
||||
"appreciation": {
|
||||
"moral": "",
|
||||
"bonmoment": "",
|
||||
"carac": "",
|
||||
"competence": "",
|
||||
"jetComp": false,
|
||||
"jetQualite": false,
|
||||
"compMinimum": true
|
||||
}
|
||||
},
|
||||
"comestible": {
|
||||
"sust": 0,
|
||||
"exotisme": 0
|
||||
@@ -754,7 +766,7 @@
|
||||
"enchantabilite": 0
|
||||
},
|
||||
"nourritureboisson": {
|
||||
"templates": ["description", "inventaire", "comestible"],
|
||||
"templates": ["description", "inventaire", "comestible", "appreciable"],
|
||||
"cuisinier": "",
|
||||
"boisson": false,
|
||||
"desaltere": 0,
|
||||
@@ -809,16 +821,16 @@
|
||||
"reposalchimique": false
|
||||
},
|
||||
"service": {
|
||||
"templates": ["description", "inventaire"],
|
||||
"templates": ["description", "inventaire", "appreciable"],
|
||||
"moral": false
|
||||
},
|
||||
"musique": {
|
||||
"templates": ["description"],
|
||||
"templates": ["description", "appreciable"],
|
||||
"niveau": 0,
|
||||
"reference": ""
|
||||
},
|
||||
"danse": {
|
||||
"templates": ["description"],
|
||||
"templates": ["description", "appreciable"],
|
||||
"type": "",
|
||||
"agilite": false,
|
||||
"apparence": false,
|
||||
@@ -826,12 +838,12 @@
|
||||
"reference": ""
|
||||
},
|
||||
"chant": {
|
||||
"templates": ["description"],
|
||||
"templates": ["description", "appreciable"],
|
||||
"niveau": 0,
|
||||
"reference": ""
|
||||
},
|
||||
"jeu": {
|
||||
"templates": ["description"],
|
||||
"templates": ["description", "appreciable"],
|
||||
"type": "",
|
||||
"base": "",
|
||||
"caraccomp": "",
|
||||
@@ -847,7 +859,7 @@
|
||||
"reference": ""
|
||||
},
|
||||
"oeuvre": {
|
||||
"templates": ["description"],
|
||||
"templates": ["description", "appreciable"],
|
||||
"default_carac": "",
|
||||
"competence": "",
|
||||
"niveau": 0,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<i class="fa-solid fa-books-medical"></i>
|
||||
</a>{{/if}}</h4>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each (trier competences) as |comp key|}}
|
||||
{{#each competences as |comp key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<a class="list-item-label roll-competence">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}" data-tooltip="{{comp.name}}"/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{#each (trier @root.competences) as |competence key|}}
|
||||
{{#each @root.competences as |competence key|}}
|
||||
{{#if (or (not ../categorie) (eq competence.system.categorie ../categorie))}}
|
||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||
{{/if}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{#each (trier @root.competences) as |competence key|}}
|
||||
{{#each @root.competences as |competence key|}}
|
||||
{{#if (eq competence.system.categorie 'draconic')}}
|
||||
<option value="{{itemSort-shortDraconic competence.name}}">{{itemSort-shortDraconic competence.name}}</option>
|
||||
{{/if}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="informations">Informations</a>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.hbs"}}
|
||||
@@ -111,7 +111,7 @@
|
||||
</select>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
</section>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="informations">Informations</a>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.hbs"}}
|
||||
@@ -20,7 +20,7 @@
|
||||
<input class="attribute-value" type="text" name="system.malus" value="{{system.malus}}" data-dtype="Number"/>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
</section>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
<label for="system-gravite">Gravité</label>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -15,6 +15,6 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -11,6 +11,7 @@
|
||||
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-appreciable.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<input class="attribute-value" type="text" name="system.niveau_archetype" value="{{system.niveau_archetype}}" data-dtype="Number"/>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -47,6 +47,6 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
@@ -26,7 +26,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
</section>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -28,6 +28,7 @@
|
||||
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-appreciable.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -10,6 +10,6 @@
|
||||
<label for="system.immobilise">Immobilisé </label>
|
||||
<input type="checkbox" name="system.immobilise" {{#if system.immobilise}}checked{{/if}}/>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<option value="Ethylisme"></option>
|
||||
<option value="Musique"></option>
|
||||
<option value="Cœur"></option>
|
||||
<option value="Cuisine"></option>
|
||||
<option value="Spectacle"></option>
|
||||
<option value="Thermes"></option>
|
||||
@@ -0,0 +1,6 @@
|
||||
<option value="">Pas de jet d'appréciation</option>
|
||||
<option value="vue">Vue</option>
|
||||
<option value="ouie">Ouïe</option>
|
||||
<option value="odoratgout">Odorat-Gout</option>
|
||||
<option value="intellect">Intellect</option>
|
||||
<option value="empathie">Empathie</option>
|
||||
@@ -0,0 +1,4 @@
|
||||
<option value="">Aucun</option>
|
||||
<option value="neutre">Neutre</option>
|
||||
<option value="heureux">Heureux</option>
|
||||
<option value="très heureux">Très heureux</option>
|
||||
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/enchantement/partial-enchantement.hbs'}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
</section>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{{#if (lte system.resistance 0)}}
|
||||
<img class="equipement-inutilisable" src="systems/foundryvtt-reve-de-dragon/assets/ui/broken.svg" data-tooltip="{{name}} est brisée, sa résistance est de 0"/>
|
||||
<img class="equipement-inutilisable" src="systems/foundryvtt-reve-de-dragon/assets/ui/broken.svg" data-tooltip="{{name}} est inutilisable, sa résistance est de 0"/>
|
||||
{{/if}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="informations">Informations</a>
|
||||
@@ -21,7 +21,7 @@
|
||||
</select>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
</section>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
|
||||
{{!-- Attributes Tab --}}
|
||||
<div class="tab attributes" data-group="primary" data-tab="attributes">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
@@ -27,6 +27,7 @@
|
||||
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-appreciable.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
</section>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Contractée" labelfin="Prochain jet"}}
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -69,6 +69,6 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -10,6 +10,8 @@
|
||||
<label for="system.reference">Référence / Auteur</label>
|
||||
<input class="attribute-value" type="text" name="system.reference" value="{{system.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-appreciable.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="informations">Informations</a>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.hbs"}}
|
||||
@@ -35,7 +35,9 @@
|
||||
<input class="attribute-value" type="text" name="system.exotisme" value="{{system.exotisme}}" data-dtype="Number" />
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-appreciable.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
</section>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="informations">Informations</a>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.hbs"}}
|
||||
@@ -7,7 +7,7 @@
|
||||
<section class="sheet-body">
|
||||
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
</section>
|
||||
|
||||
@@ -33,8 +33,7 @@
|
||||
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number"/>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-appreciable.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
{{#if isAppreciable}}
|
||||
<hr>
|
||||
<h4>Appréciation</h4>
|
||||
<div class="form-group">
|
||||
<label for="system.appreciation.moral">Jet de moral</label>
|
||||
<select name="system.appreciation.moral" data-dtype="String">
|
||||
{{#select system.appreciation.moral}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-moral.hbs"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
{{#if system.appreciation.moral}}
|
||||
<div class="form-group">
|
||||
<label for="system.appreciation.bonmoment">Bon moment</label>
|
||||
<input class="attribute-value" type="string" name="system.appreciation.bonmoment" value="{{system.appreciation.bonmoment}}"
|
||||
data-dtype="String" list="enum-appreciation-bonmoment"
|
||||
/>
|
||||
<datalist id="enum-appreciation-bonmoment">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-bonmoment.hbs"}}
|
||||
</datalist>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="system.appreciation.carac">Caractéristique</label>
|
||||
<select name="system.appreciation.carac" data-dtype="String">
|
||||
{{#select system.appreciation.carac}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-carac.hbs"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="system.appreciation.competence">Compétence</label>
|
||||
<select name="system.appreciation.competence" data-dtype="String">
|
||||
{{#select system.appreciation.competence}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.hbs"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="system.appreciation.jetComp">Utiliser la compétence pour le jet d'appréciation</label>
|
||||
<input class="attribute-value" type="checkbox" name="system.appreciation.jetComp" {{#if system.appreciation.jetComp}}checked{{/if}}
|
||||
data-toolTip="La compétence est utilisée pour le jet d'appréciation si positive"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="system.appreciation.jetQualite">Utiliser la qualité pour le jet d'appréciation</label>
|
||||
<input class="attribute-value" type="checkbox" name="system.appreciation.jetQualite" {{#if system.appreciation.jetQualite}}checked{{/if}}
|
||||
data-toolTip="La qualité ajuste le jet d'appréciation"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="system.appreciation.compMinimum">Jet d'appréciation seulement si qualité > compétence</label>
|
||||
<input class="attribute-value" type="checkbox" name="system.appreciation.compMinimum" {{#if system.appreciation.compMinimum}}checked{{/if}}
|
||||
data-toolTip="La qualité doit être supérieure à la compétence pour effectuer un jet d'apréciation"/>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1,3 +1,4 @@
|
||||
<hr>
|
||||
<div>
|
||||
<span><label>Description : </label></span>
|
||||
<div class="form-group large-editor">
|
||||
@@ -11,4 +12,4 @@
|
||||
{{editor descriptionmj target="system.descriptionmj" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -45,7 +45,7 @@
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Contracté" labelfin="Prochain jet"}}
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
{{/if}}
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/enchantement/partial-enchantement.hbs'}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.hbs"}}
|
||||
</section>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -37,8 +37,8 @@
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-hautrevant.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-frequence.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-hautrevant.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-frequence.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
<label>Limite</label>
|
||||
@@ -59,6 +59,6 @@
|
||||
</div>
|
||||
{{/each}}
|
||||
<hr/>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -31,6 +31,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -29,6 +29,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="rencontre">Rencontre</a>
|
||||
@@ -68,7 +68,7 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</div>
|
||||
|
||||
<div class="tab items" data-group="primary" data-tab="succes">
|
||||
@@ -141,7 +141,7 @@
|
||||
{{#each effets.echec.select as |effet pos|}}
|
||||
<label>
|
||||
{{effet.description}}
|
||||
{{#if @root.isGM}}
|
||||
{{#if options.isGM}}
|
||||
<a class="effet-delete" data-effet-code="{{effet.code}}" data-effet-resultat="{{effet.resultat}}" data-effet-pos="{{pos}}" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
{{/if}}
|
||||
</label>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -7,18 +7,13 @@
|
||||
<input {{@root.disabled}} class="attribute-value" type="checkbox" name="system.moral" {{#if system.moral}}checked{{/if}}/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="system.qualite">Qualité</label>
|
||||
<input class="attribute-value number-x3" type="number" name="system.qualite" value="{{system.qualite}}" data-dtype="Number"
|
||||
{{#unless (isFieldInventaireModifiable type 'qualite')}}disabled{{/unless}}/>
|
||||
</div>
|
||||
|
||||
<div class="form-group item-cout">
|
||||
<label for="system.cout">Prix (sols)</label>
|
||||
<input class="input-prix attribute-value number-x3" type="number" name="system.cout" value="{{numberFormat system.cout decimals=2 sign=false}}" data-dtype="Number"
|
||||
{{#unless (isFieldInventaireModifiable type 'cout')}}disabled{{/unless}}/>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-appreciable.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -76,6 +76,6 @@
|
||||
</div>
|
||||
{{/each}}
|
||||
<hr>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
|
||||
<section class="sheet-body">
|
||||
{{#if (and system.sortid sort)}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -15,8 +15,8 @@
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-hautrevant.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-frequence.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-hautrevant.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-frequence.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
@@ -66,6 +66,6 @@
|
||||
<input class="attribute-value" type="text" name="system.nb_jet_echec" value="{{system.nb_jet_echec}}" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/>
|
||||
</div>
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-hautrevant.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-frequence.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-hautrevant.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-frequence.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-description.hbs"}}
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
<img src="{{current.comp.comp.img}}" data-tooltip="{{current.comp.label}}" />
|
||||
</div>
|
||||
<div class="chat-header">
|
||||
{{active.name}} fait un jet {{#if (eq current.comp.key '')}}sans compétence{{else}}de {{current.comp.label}}{{/if}}
|
||||
{{active.name}} fait un jet
|
||||
{{#if current.comp.key}}de {{current.comp.label}}{{/if}}
|
||||
{{#if type.appreciation}}d'appréciation
|
||||
{{else if (ne current.comp.key '')}}sans compétence
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="chat-resume">
|
||||
@@ -12,8 +16,11 @@
|
||||
</div>
|
||||
|
||||
<div class="chat-details">
|
||||
<p>Qualité {{rolled.ptQualite}}, points de tâche {{rolled.ptTache}}
|
||||
</p>
|
||||
{{#if type.appreciation}}
|
||||
{{> 'partial-appreciation'}}
|
||||
{{else}}
|
||||
<p>Qualité {{rolled.ptQualite}}, points de tâche {{rolled.ptTache}}</p>
|
||||
{{/if}}
|
||||
{{> 'partial-info-appel-moral'}}
|
||||
</div>
|
||||
<div class="chat-buttons">
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
{{/each}}
|
||||
</p>
|
||||
{{> 'partial-info-appel-moral'}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.cuisine.recette.system}}
|
||||
</div>
|
||||
|
||||
<div class="chat-actions">
|
||||
@@ -50,4 +49,8 @@
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-description">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.cuisine.recette.system}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,10 +18,17 @@
|
||||
des points dans la partie, obtenant {{rolled.ptTache}} points de tâche (si applicable pour le jeu en cours).
|
||||
</p>
|
||||
{{> 'partial-info-appel-moral'}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.jeu.jeu.system}}
|
||||
</div>
|
||||
|
||||
<div class="chat-actions">
|
||||
{{> 'partial-apprecier'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-description">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.jeu.jeu.system}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,10 +20,17 @@
|
||||
une qualité de {{result.qualite}}.
|
||||
</p>
|
||||
{{> 'partial-info-appel-moral'}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.oeuvre.oeuvre.system}}
|
||||
</div>
|
||||
|
||||
<div class="chat-actions">
|
||||
{{> 'partial-apprecier'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-description">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.oeuvre.oeuvre.system}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
{{> 'partial-infojet'}}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="chat-details">
|
||||
<hr>
|
||||
<p>
|
||||
{{#if rolled.isETotal}}Echec TOTAL
|
||||
{{else if rolled.isEchec}}Echec
|
||||
@@ -30,6 +30,7 @@
|
||||
avec {{current.sort.ptreve}} point{{~#if (gt current.sort.ptreve 1)}}s{{/if}} de rêve en {{caseTmr-label refs.sort.coord}} ({{refs.sort.coord}}).
|
||||
{{/if}}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{#if (eq current.sort.depenseReve 0)}}Pas de dépense de rêve
|
||||
{{else if (eq current.sort.depenseReve 1)}}1 point de rêve a été dépensé
|
||||
@@ -37,10 +38,9 @@
|
||||
{{~/if}}.
|
||||
{{#if show.reveInsuffisant}}Pas assez de rêve!{{/if}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="chat-description">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.sort.sort.system}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
{{#if rolled.isSuccess}}
|
||||
{{#if current.apprecier.raisons}}
|
||||
<p>Pas de jet de moral:
|
||||
{{#each current.apprecier.raisons as |raison|}}
|
||||
<br>- {{raison}}
|
||||
{{/each}}
|
||||
</p>
|
||||
{{else}}
|
||||
<p>Jet de moral en situation {{current.apprecier.appreciation.situation}}
|
||||
{{#if current.apprecier.appreciation.bonmoment}}({{current.apprecier.appreciation.bonmoment}}){{/if}}
|
||||
</p>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<p>Pas de jet de moral</p>
|
||||
{{/if}}
|
||||
@@ -0,0 +1,5 @@
|
||||
{{#if (gt result.qualite 0)}}
|
||||
<a class='chat-card-button apprecier' data-tooltip="Aprécier">
|
||||
<i class="fa-solid fa-face-smile-beam"></i> Apprécier
|
||||
</a>
|
||||
{{/if}}
|
||||
@@ -0,0 +1,26 @@
|
||||
<subline>
|
||||
<label>Qualité: {{current.qualite}}</label>
|
||||
</subline>
|
||||
<roll-part-detail>
|
||||
<subline>
|
||||
{{#if current.appreciation.competence}}
|
||||
La compétence {{current.appreciation.competence}}
|
||||
{{#if current.appreciation.jetComp}}
|
||||
ajuste le jet d'appréciation.
|
||||
{{else}}
|
||||
détermine uniquement si la qualité est suffisante.
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if current.appreciation.jetQualite}}
|
||||
La qualité ajuste le jet d'appréciation.
|
||||
{{/if}}
|
||||
</subline>
|
||||
{{#if current.raisons}}
|
||||
<subline>
|
||||
Pas de jet de moral:
|
||||
{{#each current.raisons as |raison|}}
|
||||
<br>- {{raison}}
|
||||
{{/each}}
|
||||
</subline>
|
||||
{{/if}}
|
||||
</roll-part-detail>
|
||||
Reference in New Issue
Block a user