Compare commits

...

18 Commits

Author SHA1 Message Date
f5431b58fb Merge pull request 'Non à la dévaluation' (#594) from VincentVk/foundryvtt-reve-de-dragon:v10 into v10
Reviewed-on: public/foundryvtt-reve-de-dragon#594
2022-12-13 22:28:42 +01:00
Vincent Vandemeulebrouck
bd32e1039a Mettre en valeur l'argent sans valeur 2022-12-13 22:27:36 +01:00
Vincent Vandemeulebrouck
6b8f0ed51e Version 10.3.13 2022-12-12 23:33:53 +01:00
Vincent Vandemeulebrouck
10681b3f61 DialogItemSplit height fit-content 2022-12-12 23:32:35 +01:00
Vincent Vandemeulebrouck
bbde3b73fe Gestion des monnaies de valeur 0
Ajout d'un message d'erreur quand on met la valeur d'une monnaie à 0.
Ajout d'une notification quand on détecte des monnaies de valeur 0

Pour les pièces en bois, les créer comme objets, si on ne veut pas de
messages d'avertissement.
2022-12-12 23:32:35 +01:00
57d52c1966 Inc release 2022-12-11 10:35:51 +01:00
e3a29cdab5 Merge pull request 'Fix taille du texte des boutons' (#593) from VincentVk/foundryvtt-reve-de-dragon:v10 into v10
Reviewed-on: public/foundryvtt-reve-de-dragon#593
2022-12-11 10:34:36 +01:00
Vincent Vandemeulebrouck
10e4f14eb2 Fix taille du texte des boutons 2022-12-11 02:10:39 +01:00
04273dfcf1 Inc release 2022-12-10 18:14:52 +01:00
8c5c01114e Merge pull request 'Corrections esthétiques' (#592) from VincentVk/foundryvtt-reve-de-dragon:v10 into v10
Reviewed-on: public/foundryvtt-reve-de-dragon#592
2022-12-10 18:13:44 +01:00
Vincent Vandemeulebrouck
19e6124330 Suppression scripts vides 2022-12-10 16:38:18 +01:00
Vincent Vandemeulebrouck
1c908b50cb Dialog repos 2022-12-10 16:38:18 +01:00
Vincent Vandemeulebrouck
969cedfc3d Fix espace avant boutons 2022-12-10 16:28:08 +01:00
Vincent Vandemeulebrouck
830e66749d Lien des label vers les champs 2022-12-10 16:09:55 +01:00
Vincent Vandemeulebrouck
df26e654ae Fix des tailles de polices 2022-12-10 16:09:35 +01:00
Vincent Vandemeulebrouck
153bfe2e75 Simplification hbs pour la vue détaillée 2022-12-10 16:07:33 +01:00
Vincent Vandemeulebrouck
f6d42875ae Stress et archétype
Déplacement du stress et de l'archétype avant les compétences

Les lignes d'archétypes totalement réparties disparaissent
2022-12-10 15:49:09 +01:00
Vincent Vandemeulebrouck
450cb8e899 Largeur des compétences
Ajustement de la largeur des colonnes de compétenes en vue
simplifiée

Déplacement de l'en-tête dans la première ligne de la liste (avec les
boutons en vue détaillée)
2022-12-10 15:44:08 +01:00
32 changed files with 248 additions and 220 deletions

View File

@@ -3642,20 +3642,13 @@ export class RdDActor extends Actor {
return;
}
/* -------------------------------------------- */
getFortune() {
return this.itemTypes['monnaie']
.map(m => Number(m.system.cout) * Number(m.system.quantite))
.reduce(Misc.sum(), 0);
}
/* -------------------------------------------- */
async payerSols(depense) {
depense = Number(depense);
if (depense == 0) {
return;
}
let fortune = this.getFortune();
let fortune = Monnaie.getFortune(this);
console.log("payer", game.user.character, depense, fortune);
let msg = "";
if (fortune >= depense) {
@@ -3674,7 +3667,7 @@ export class RdDActor extends Actor {
}
async depenserSols(sols) {
let reste = this.getFortune() - Number(sols);
let reste = Monnaie.getFortune(this) - Number(sols);
if (reste >= 0) {
await Monnaie.optimiserFortune(this, reste);
}
@@ -3699,7 +3692,7 @@ export class RdDActor extends Actor {
}
else {
const fromActor = game.actors.get(fromActorId)
await Monnaie.optimiserFortune(this, sols + this.getFortune());
await Monnaie.optimiserFortune(this, sols + Monnaie.getFortune(this));
RdDAudio.PlayContextAudio("argent"); // Petit son
ChatMessage.create({
@@ -3732,50 +3725,31 @@ export class RdDActor extends Actor {
});
return;
}
const acheteur = achat.acheteurId ? game.actors.get(achat.acheteurId) : undefined;
const vendeur = achat.vendeurId ? game.actors.get(achat.vendeurId) : undefined;
const vente = achat.vente;
const itemId = vente.item._id;
const isItemEmpilable = "quantite" in vente.item.system;
const cout = Number(achat.prixTotal ?? 0);
const vente = achat.vente;
const acheteur = achat.acheteurId ? game.actors.get(achat.acheteurId) : undefined;
const vendeur = achat.vendeurId ? game.actors.get(achat.vendeurId) : undefined;
let itemVendu = vendeur?.getObjet(vente.item._id);
if (vendeur && (itemVendu?.getQuantite() ?? 0) < achat.quantiteTotal) {
ChatUtility.notifyUser(achat.userId, 'warn', `Le vendeur n'a plus assez de ${vente.item.name} !`);
return;
}
if (Monnaie.getFortune(acheteur) < Number(cout)) {
ChatUtility.notifyUser(achat.userId, 'warn', `Vous n'avez pas assez d'argent pour payer ${Math.ceil(cout / 100)} sols !`);
return;
}
achat.quantiteTotal = (achat.choix.nombreLots ?? 1) * (vente.tailleLot);
if (acheteur) {
let resteAcheteur = await acheteur.depenserSols(cout);
if (resteAcheteur < 0) {
ChatUtility.notifyUser(achat.userId, 'warn', `Vous n'avez pas assez d'argent pour payer ${Math.ceil(cout / 100)} sols !`);
return;
}
}
const itemVendu = vendeur?.getObjet(itemId);
if (itemVendu) {
if (isItemEmpilable ? (itemVendu.system.quantite < achat.quantiteTotal) : (achat.choix.nombreLots != 1)) {
await acheteur?.ajouterSols(cout);
ChatUtility.notifyUser(achat.userId, 'warn', `Le vendeur n'a plus assez de ${vente.item.name} !`);
return;
}
vendeur.ajouterSols(cout);
let resteQuantite = (itemVendu.system.quantite ?? 1) - achat.quantiteTotal;
if (resteQuantite == 0) {
vendeur.deleteEmbeddedDocuments("Item", [itemId])
}
else {
vendeur.updateEmbeddedDocuments("Item", [{ _id: itemId, 'system.quantite': resteQuantite }]);
}
if (vendeur) {
await vendeur.ajouterSols(cout);
await vendeur.decrementerQuantiteItem(itemVendu, achat.quantiteTotal,);
}
if (acheteur) {
const achatData = {
type: vente.item.type,
img: vente.item.img,
name: vente.item.name,
system: mergeObject(vente.item.system, { quantite: isItemEmpilable ? achat.quantiteTotal : undefined }),
}
let listeAchat = isItemEmpilable ? [achatData] : Array.from({ length: achat.quantiteTotal }, (_, i) => achatData)
let items = await acheteur.createEmbeddedDocuments("Item", listeAchat);
if (achat.choix.consommer && vente.item.type == 'nourritureboisson') {
achat.choix.doses = achat.choix.nombreLots;
await acheteur.consommerNourritureboisson(items[0].id, achat.choix, vente.actingUserId);
}
await acheteur.depenserSols(cout);
let createdItemId = await acheteur.creerQuantiteItem(vente.item, achat.quantiteTotal);
await acheteur.consommerNourritureAchetee(achat, vente, createdItemId);
}
if (cout > 0) {
RdDAudio.PlayContextAudio("argent");
@@ -3804,6 +3778,42 @@ export class RdDActor extends Actor {
}
}
async consommerNourritureAchetee(achat, vente, createdItemId) {
if (achat.choix.consommer && vente.item.type == 'nourritureboisson' && createdItemId != undefined) {
achat.choix.doses = achat.choix.nombreLots;
await this.consommerNourritureboisson(createdItemId, achat.choix, vente.actingUserId);
}
}
async decrementerQuantiteItem(item, quantite) {
let resteQuantite = (item.system.quantite ?? 1) - quantite;
if (resteQuantite <= 0) {
await this.deleteEmbeddedDocuments("Item", [item.id]);
if (resteQuantite < 0) {
ui.notifications.warn(`La quantité de ${item.name} était insuffisante, l'objet a donc été supprimé`)
}
}
else if (resteQuantite > 0) {
await this.updateEmbeddedDocuments("Item", [{ _id: item.id, 'system.quantite': resteQuantite }]);
}
}
async creerQuantiteItem(item, quantite) {
const items = await this.createEmbeddedDocuments("Item", RdDActor.$prepareListeAchat(item, quantite));
return items.length > 0 ? items[0].id : undefined;
}
static $prepareListeAchat(item, quantite) {
const isItemEmpilable = "quantite" in item.system;
const achatData = {
type: item.type,
img: item.img,
name: item.name,
system: mergeObject(item.system, { quantite: isItemEmpilable ? quantite : undefined }),
};
return isItemEmpilable ? [achatData] : Array.from({ length: quantite }, (_, i) => achatData);
}
/* -------------------------------------------- */
async effectuerTacheAlchimie(recetteId, tacheAlchimie, texteTache) {
let recetteData = this.getItemOfType(recetteId, 'recettealchimique');

View File

@@ -9,7 +9,7 @@ export class DialogRepos extends Dialog {
}
constructor(html, actor) {
let options = { classes: ["DialogCreateSigneDraconiqueActorsActors"], width: 500, height: 400, 'z-index': 99999 };
let options = { classes: ["DialogCreateSigneDraconiqueActorsActors"], width: 400, height: 'fit-content', 'z-index': 99999 };
let conf = {
title: "Se reposer",
content: html,

View File

@@ -12,7 +12,7 @@ export class DialogSplitItem extends Dialog {
}
constructor(item, splitData, html, callback) {
let options = { classes: ["dialogsplit"], width: 300, height: 160, 'z-index': 99999 };
let options = { classes: ["dialogsplit"], width: 300, height: 'fit-content', 'z-index': 99999 };
let conf = {
title: "Séparer en deux",
content: html,

View File

@@ -8,18 +8,18 @@ const xp_par_niveau = [5, 5, 5, 10, 10, 10, 10, 15, 15, 15, 15, 20, 20, 20, 20,
const niveau_max = xp_par_niveau.length - 10;
/* -------------------------------------------- */
const limitesArchetypes = [
{ "niveau": 0, "nombreMax": 100, "nombre": 0 },
{ "niveau": 1, "nombreMax": 10, "nombre": 0 },
{ "niveau": 2, "nombreMax": 9, "nombre": 0 },
{ "niveau": 3, "nombreMax": 8, "nombre": 0 },
{ "niveau": 4, "nombreMax": 7, "nombre": 0 },
{ "niveau": 5, "nombreMax": 6, "nombre": 0 },
{ "niveau": 6, "nombreMax": 5, "nombre": 0 },
{ "niveau": 7, "nombreMax": 4, "nombre": 0 },
{ "niveau": 8, "nombreMax": 3, "nombre": 0 },
{ "niveau": 9, "nombreMax": 2, "nombre": 0 },
{ "niveau": 10, "nombreMax": 1, "nombre": 0 },
{ "niveau": 11, "nombreMax": 1, "nombre": 0 }
{ "niveau": 0, "nombreMax": 100, "reste": 100 },
{ "niveau": 1, "nombreMax": 10, "reste": 10 },
{ "niveau": 2, "nombreMax": 9, "reste": 9 },
{ "niveau": 3, "nombreMax": 8, "reste": 8 },
{ "niveau": 4, "nombreMax": 7, "reste": 7 },
{ "niveau": 5, "nombreMax": 6, "reste": 6 },
{ "niveau": 6, "nombreMax": 5, "reste": 5 },
{ "niveau": 7, "nombreMax": 4, "reste": 4 },
{ "niveau": 8, "nombreMax": 3, "reste": 3 },
{ "niveau": 9, "nombreMax": 2, "reste": 2 },
{ "niveau": 10, "nombreMax": 1, "reste": 1 },
{ "niveau": 11, "nombreMax": 1, "reste": 1 }
];
/* -------------------------------------------- */
@@ -267,23 +267,20 @@ export class RdDItemCompetence extends Item {
/* -------------------------------------------- */
static computeResumeArchetype(competences) {
const archetype = RdDItemCompetence.getLimitesArchetypes();
const computed = duplicate(limitesArchetypes);
competences.map(it => Math.max(0, it.system.niveau_archetype))
.forEach(niveau => {
archetype[niveau] = archetype[niveau] ?? { "niveau": niveau, "nombreMax": 0, "nombre": 0 };
archetype[niveau].nombre = (archetype[niveau]?.nombre ?? 0) + 1;
.filter(n => n > 0)
.forEach(n => {
computed[n] = computed[n] ?? { niveau: n, nombreMax: 0, reste: 0 };
computed[n].reste = computed[n].reste - 1;
});
return archetype;
return computed.filter(it => it.reste > 0 && it.niveau > 0);
}
/* -------------------------------------------- */
static getLimitesArchetypes() {
return duplicate(limitesArchetypes);
}
static triVisible(competences) {
return competences.filter(it => it.system.isVisible)
.sort((a, b) => RdDItemCompetence.compare(a,b))
.sort((a, b) => RdDItemCompetence.compare(a, b))
}
static $positionTri(comp) {
@@ -308,7 +305,7 @@ export class RdDItemCompetence extends Item {
return 0;
}
static compare(a,b) {
static compare(a, b) {
const diff = RdDItemCompetence.$positionTri(a) - RdDItemCompetence.$positionTri(b);
return diff ? diff : a.name.localeCompare(b.name);
}

View File

@@ -23,6 +23,7 @@ const MONNAIE_OR = {
};
const MONNAIES_STANDARD = [MONNAIE_ETAIN, MONNAIE_BRONZE, MONNAIE_ARGENT, MONNAIE_OR];
const VALEUR_DENIERS = sols => Math.max(Math.floor((sols ?? 0) * 100), 0);
export class Monnaie {
@@ -40,15 +41,11 @@ export class Monnaie {
}
static deValeur(monnaie, valeur) {
return Monnaie.valEntiere(valeur) == Monnaie.valEntiere(monnaie.system.cout)
}
static valEntiere(sols) {
return Math.max(Math.floor((sols??0)*100), 0);
return VALEUR_DENIERS(valeur) == VALEUR_DENIERS(monnaie.system.cout)
}
static triValeurEntiere() {
return Misc.ascending(item => Monnaie.valEntiere(item.system.cout))
return Misc.ascending(item => VALEUR_DENIERS(item.system.cout))
}
static async creerMonnaiesStandard(actor) {
@@ -65,29 +62,49 @@ export class Monnaie {
return deniers;
}
static getFortune(actor) {
if (actor) {
Monnaie.validerMonnaies(actor);
return actor.itemTypes['monnaie']
.map(m => Number(m.system.cout) * Number(m.system.quantite))
.reduce(Misc.sum(), 0);
}
return 0;
}
static async optimiserFortune(actor, fortune) {
let resteEnDeniers = Math.round(fortune*100);
let resteEnDeniers = Math.round(fortune * 100);
let monnaies = actor.itemTypes['monnaie'];
let updates = [];
let parValeur = Misc.classifyFirst(monnaies, it => Monnaie.valEntiere(it.system.cout));
for (let valeurDeniers of [1000, 100, 10, 1]) {
Monnaie.validerMonnaies(actor);
let parValeur = Misc.classifyFirst(monnaies, it => VALEUR_DENIERS(it.system.cout));
for (let valeurDeniers of [1000, 100, 10, 1]) {
const itemPiece = parValeur[valeurDeniers];
if (itemPiece) {
const quantite = Math.floor(resteEnDeniers / valeurDeniers);
if (quantite != itemPiece.system.quantite) {
updates.push({ _id: parValeur[valeurDeniers].id, 'system.quantite': quantite });
}
resteEnDeniers -= quantite*valeurDeniers;
resteEnDeniers -= quantite * valeurDeniers;
}
}
console.log('Monnaie.optimiserFortune', actor.name, 'total', fortune, 'parValeur', parValeur, 'updates', updates, 'reste', resteEnDeniers);
if (updates.length > 0) {
await actor.updateEmbeddedDocuments('Item', updates);
}
if (resteEnDeniers > 0){
if (resteEnDeniers > 0) {
// créer le reste en deniers fortune en deniers
await Monnaie.creerMonnaiesDeniers(actor, resteEnDeniers);
}
}
static validerMonnaies(actor) {
actor.itemTypes['monnaie'].filter(it => VALEUR_DENIERS(it.system.cout) == 0)
.map(it => `La monnaie ${it.name} de l'acteur ${actor.name} a une valeur de 0!`)
.forEach(message => {
ui.notifications.warn(message);
console.warn(message);
});
}
}

View File

@@ -159,8 +159,6 @@ export class RdDItemSheet extends ItemSheet {
super.activateListeners(html);
this.html = html;
let itemSheetDialog = this;
HtmlUtility._showControlWhen(this.html.find(".item-cout"), ReglesOptionelles.isUsing('afficher-prix-joueurs') || game.user.isGM || !this.item.isOwned);
HtmlUtility._showControlWhen(this.html.find(".item-magique"), this.item.isMagique());
@@ -178,6 +176,14 @@ export class RdDItemSheet extends ItemSheet {
RdDUtility.checkThanatosXP(this.item.name);
}
});
this.html.find(".item-cout input[name='system.cout']").change(event => {
if (this.item.isMonnaie()) {
const value = event.currentTarget.value;
if (Number(value) == 0) {
ui.notifications.error(`${this.actor?.name ?? 'Monnaie'}: La monnaie ${this.item.name} a maintenant une valeur de 0, et ne peut plus être utilisée pour payer!`)
}
}
})
this.html.find('.enchanteDate').change((event) => {
let jour = Number(this.html.find('[name="splitDate.day"]').val());
@@ -201,12 +207,12 @@ export class RdDItemSheet extends ItemSheet {
}
});
this.html.find('.item-split').click(async event => RdDSheetUtility.splitItem(RdDSheetUtility.getItem(event, this.actor), this.actor, async () => itemSheetDialog.render(true)));
this.html.find('.item-split').click(async event => RdDSheetUtility.splitItem(RdDSheetUtility.getItem(event, this.actor), this.actor, async () => this.render(true)));
this.html.find('.item-edit').click(async event => RdDSheetUtility.getItem(event, this.actor)?.sheet.render(true));
this.html.find('.item-delete').click(async event => RdDUtility.confirmerSuppressionItem(this, RdDSheetUtility.getItem(event, this.actor)));
this.html.find('.item-vendre').click(async event => RdDSheetUtility.getItem(event, this.actor)?.proposerVente());
this.html.find('.item-montrer').click(async event => RdDSheetUtility.getItem(event, this.actor)?.postItem());
this.html.find('.item-action').click(async event => RdDSheetUtility.getItem(event, this.actor)?.actionPrincipale(this.actor, async () => itemSheetDialog.render(true)));
this.html.find('.item-action').click(async event => RdDSheetUtility.getItem(event, this.actor)?.actionPrincipale(this.actor, async () => this.render(true)));
}
_getEventActor(event) {

View File

@@ -149,6 +149,9 @@ export class RdDItem extends Item {
isConteneur() {
return this.type == 'conteneur';
}
isMonnaie() {
return this.type == 'monnaie';
}
getItemGroup() {
if (this.isInventaire()) return "equipement";

View File

@@ -115,17 +115,16 @@ export class RdDRollResolutionTable extends Dialog {
rollData.finalLevel = this._computeFinalLevel(rollData);
const htmlTable = await RdDResolutionTable.buildHTMLTable({
carac:rollData.caracValue,
level: rollData.finalLevel
carac: rollData.caracValue,
level: rollData.finalLevel,
maxCarac: 20,
maxLevel: 10
});
// Mise à jour valeurs
this.html.find("[name='carac']").val(rollData.caracValue);
this.html.find(".roll-param-resolution").text(rollData.selectedCarac.value + " / " + Misc.toSignedString(rollData.finalLevel));
this.html.find(".table-resolution").remove();
this.html.find(".table-proba-reussite").remove();
this.html.find("div.placeholder-resolution").append(htmlTable)
this.html.find("div.placeholder-resolution").empty().append(htmlTable)
}

View File

@@ -31,12 +31,12 @@
:root {
/* =================== 1. ACTOR SHEET FONT STYLES =========== */
--window-header-title-font-family: CaslonAntique;
--window-header-title-font-size: 1.5rem;
--window-header-title-font-size: 1.6rem;
--window-header-title-font-weight: normal;
--window-header-title-color: #f5f5f5;
--major-button-font-family: CaslonAntique;
--major-button-font-size: 1.25rem;
--major-button-font-size: 1.4rem;
--major-button-font-weight: normal;
--major-button-color: #dadada;
@@ -81,6 +81,7 @@
--background-custom-button: linear-gradient(to bottom, rgba(33, 55, 74, 0.988) 5%, rgba(21, 40, 51, 0.671) 100%);
--background-custom-button-hover: linear-gradient(to bottom, rgb(128, 0, 0) 5%, rgb(62, 1, 1) 100%);
--background-tooltip: rgba(220,220,210,0.95);
--background-error:hsla(16, 100%, 50%, 0.8);
}
/*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/
@@ -88,7 +89,7 @@
.window-app {
font-family: CaslonAntique;
text-align: justify;
font-size: 16px;
font-size: 1rem;
letter-spacing: 1px;
}
@@ -116,7 +117,11 @@ select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
padding: 0;
}
.strong-text{
section.window-content div.dialog-buttons {
margin-top: 1rem;
}
.strong-text {
font-weight: bold;
}
i:is(.fas, .far) {
@@ -199,7 +204,7 @@ i:is(.fas, .far) {
/* =================== Navigation ============ */
.sheet nav.sheet-tabs {
font-size: 0.65rem;
font-size: 0.7rem;
font-weight: bold;
height: 4rem;
flex: 0 0 4rem;
@@ -360,9 +365,21 @@ table {border: 1px solid #7a7971;}
justify-content: center;
text-align: left;
}
.equipement-valeur {
margin: 0;
flex-grow: 1.5;
text-align: center;
}
.equipement-detail {
margin: 0;
flex: 'flex-shrink' ;
flex-grow: 1;
align-items: center;
justify-content: center;
text-align: center;
}
.equipement-button {
margin: 0;
flex-grow: 0.5;
align-items: center;
justify-content: center;
text-align: center;
@@ -621,6 +638,9 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
.rdd-roll-dialog .description-sort {
max-width: 550px;
}
.rdd-roll-dialog div.dialog-content input {
font-size: 1rem;
}
.rdd-roll-part {
align-items: center;
border-radius: 6px; padding: 3px;
@@ -652,14 +672,12 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
}
.rdd-niveau-requis{
font-size: 0.80rem;
font-size: 0.8rem;
text-align: right;
}
.placeholder-ajustements {
flex-direction: column;
}
.table-resolution-carac {
background-color: yellow;
}
@@ -675,11 +693,11 @@ div.placeholder-resolution span.table-proba-reussite{
}
.poesie-extrait {
font-size: 0.85rem;
font-size: 0.9rem;
font-style: italic;
}
.poesie-reference{
font-size: 0.70rem;
font-size: 0.7rem;
text-align: right;
}
.poesie-overflow {
@@ -695,7 +713,7 @@ div.placeholder-resolution span.table-proba-reussite{
}
.type-compendium{
font-size: 0.60rem;
font-size: 0.6rem;
}
/* ======================================== */
@@ -874,6 +892,11 @@ ul, li {
background: rgb(160, 130, 100, 0.05);
}
input.attribute-value.field-error ,
.list-item span.field-error {
background-color: var(--background-error);
}
ul.chat-list {
margin-left: 0.8rem;
list-style: inside;
@@ -1011,6 +1034,9 @@ ul.list-item-margin6 li {
flex-grow: 0;
flex-basis: 1;
}
div.competence-column div.categorie-competence{
width: 100%;
}
.competence-header {
align-content: flex-start;
justify-content: flex-start;
@@ -1089,7 +1115,7 @@ ul.list-item-margin6 li {
/* ======================================== */
.table-nombres-astraux {
border:1;
font-size: 0.75rem;
font-size: 0.8rem;
}
.table-nombres-astraux td {
border: 1px solid black;
@@ -1131,7 +1157,7 @@ ul.list-item-margin6 li {
margin-left: 8px;
}
.rdd-hud-menu label {
font-size: 0.75rem;
font-size: 0.8rem;
}
#token-hud .status-effects.active{
z-index: 2;
@@ -1431,8 +1457,8 @@ ul.list-item-margin6 li {
font-family: "GoudyAcc";
color: #CCC;
opacity: 90;
font-size: 13px;
line-height: 1;
font-size: 0.9rem;
line-height: 1px;
text-align: center;
padding: 0;
margin: 0;
@@ -1598,7 +1624,7 @@ ul.list-item-margin6 li {
.calendar-time{
grid-column: 1;
grid-row: 2;
font-size: 1.10rem;
font-size: 1.1rem;
text-align: center;
margin: auto;
cursor: pointer;
@@ -1607,7 +1633,7 @@ ul.list-item-margin6 li {
.calendar-nombre-astral{
grid-column: 2;
grid-row: 2;
font-size: 1.10rem;
font-size: 1.1rem;
text-align: right;
margin: auto;
cursor: pointer;
@@ -1700,7 +1726,7 @@ display: inline-flex;
cursor: pointer;
color: #ffffff;
font-family: CaslonPro;
font-size: 14px;
font-size: 0.9rem;
padding: 4px 12px 0px 12px;
text-decoration: none;
text-shadow: 0px 1px 0px #4d3534;

View File

@@ -1,8 +1,8 @@
{
"id": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon",
"version": "10.3.10",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.3.10.zip",
"version": "10.3.13",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.3.13.zip",
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json",
"compatibility": {
"minimum": "10",

View File

@@ -50,29 +50,28 @@
{{!-- Compétences Tab --}}
<div class="tab competences" data-group="primary" data-tab="competences">
<div class="flexrow">
<span><a class="vue-detaillee">
<i class="fas {{#if options.vueDetaillee}}fa-eye-slash{{else}}fa-eye{{/if}}"></i>
{{#if options.vueDetaillee}}Vue simplifiée{{else}}Vue détaillée{{/if}}</a>
</span>
<span><a class="show-hide-competences"><img class="small-button-container"
src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.showCompNiveauBase}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer tout">
{{#if options.showCompNiveauBase}}Montrer tout{{else}}Filtrer{{/if}}</a>
</span>
<span class="flexrow">
<input class="recherche flex-grow" type="text" value="{{options.recherche.text}}" name="recherche"
size="8" data-dtype="String" placeholder=""/>
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/vue-detaillee.html"}}
<span class="flexrow"><a class="show-hide-competences">
{{#if options.showCompNiveauBase}}
<i class="fa-regular fa-filter-slash"></i> Montrer tout
{{else}}
<i class="fa-regular fa-filter"></i> Filtrer
{{/if}}
</a></span>
<span>
<input class="recherche flex-grow" type="text" value="{{options.recherche.text}}" name="recherche" size="8" data-dtype="String" placeholder=""/>
</span>
<span>
</span>
</div>
<div class="grid grid-2col">
<div class="flex-group-left flexcol competence-column">
<div class="competence-column">
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.generale) categorie="Compétences générales"}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.particuliere) categorie="Compétences Particulières"}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.specialisee) categorie="Compétences Spécialisées"}}
</div>
<div class="flex-group-left flexcol competence-column">
<div class="competence-column">
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/xp-competences.html"}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.melee) categorie="Compétences de Mêlée"}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.tir) categorie="Compétences de Tir"}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.lancer) categorie="Compétences de Lancer"}}
@@ -80,7 +79,6 @@
{{#if (or system.attributs.hautrevant.value options.vueDetaillee)}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html" competences=(filtreTriCompetences byCateg.draconic) categorie="Draconic"}}
{{/if}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/xp-competences.html"}}
</div>
</div>
</div>

View File

@@ -1,12 +1,13 @@
{{#if competences}}
<div class="flex-shrink">
<header class="competence-header flexrow">
<span class="competence-title">{{categorie}}</span>
</header>
<div class="flex-shrink categorie-competence">
<ul class="item-list alterne-list competence-list">
{{#if @root.options.vueDetaillee}}
<li class="item flexrow list-item ">
<span class="competence-label"></span>
<span>
<header class="competence-header flexrow">
<span class="competence-title">{{categorie}}</span>
</header>
</span>
{{#if @root.options.vueDetaillee}}
<span class="competence-value" >Niv.</span>
<span class="competence-xp">xp</span>
{{#if (eq categorie 'Draconic')}}
@@ -20,11 +21,12 @@
<i class="far fa-trash"></i>
{{/if}}
</div>
{{/if}}
</li>
{{/if}}
{{#each competences as |comp key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence.html" comp}}
{{/each}}
<li></li>
</ul>
</div>
{{/if}}

View File

@@ -4,13 +4,16 @@
<li class="item flexrow list-item" data-item-id="{{piece._id}}">
<img class="sheet-competence-img" src="{{piece.img}}" title="{{piece.name}}"/>
<span class="equipement-nom">{{piece.name}}</span>
<span class="equipement-detail item-controls">
<span class="equipement-valeur {{#unless (gt piece.system.cout 0)}}field-error{{/unless}}">
({{piece.system.cout}} Sols)
</span>
<span class="equipement-button item-controls">
<a class="monnaie-moins"><i class="fas fa-minus-square"></i></a>
</span>
<span class="equipement-detail">
<span>{{piece.system.quantite}}</span>
</span>
<span class="equipement-detail item-controls">
<span class="equipement-button item-controls">
<a class="monnaie-plus"><i class="fas fa-plus-square"></i></a>
</span>
<span class="equipement-actions item-controls">

View File

@@ -1,4 +1,8 @@
<span><a class="vue-detaillee">
<i class="fas {{#if options.vueDetaillee}}fa-eye-slash{{else}}fa-eye{{/if}}"></i>
{{#if options.vueDetaillee}}Vue simplifiée{{else}}Vue détaillée{{/if}}</a>
{{#if options.vueDetaillee}}
<i class="fas fa-eye-slash"></i> Vue simplifiée
{{else}}
<i class="fas fa-eye"></i> Vue détaillée
{{/if}}
</a>
</span>

View File

@@ -1,23 +1,30 @@
<div>
<ul class="item-list">
<li class="item flexrow">
<span class="generic-label">Stress transformé</span>
<input class="compteur-edit" type="text" name="experience" value="{{system.compteurs.experience.value}}" data-dtype="number" size="3"/>
<label class="attribut-label" for="system.compteurs.experience.value">Stress transformé</label>
{{#if options.vueDetaillee}}
<input class="compteur-edit" type="text" name="system.compteurs.experience.value" value="{{system.compteurs.experience.value}}" data-dtype="number" size="3"/>
{{else}}
<label name="system.compteurs.experience.value">{{system.compteurs.experience.value}}</label>
{{/if}}
</li>
{{#if options.vueDetaillee}}
<li class="item flexrow">
<span class="generic-label">Total XP compétences</span>
<span class="competence-value">{{calc.competenceXPTotal}}</span>
</li>
{{#if options.vueDetaillee}}
<li>Niveaux d'archétype à répartir</li>
{{#each calc.comptageArchetype as |archetype key|}}
{{#if (lt archetype.nombre archetype.nombreMax)}}
<li class="item flexrow">
<label class="generic-label">Archetype {{archetype.niveau}} : {{archetype.nombre}} / {{archetype.nombreMax}}</label>
</li>
{{/if}}
{{/each}}
{{/if}}
{{#if calc.comptageArchetype}}
<li><hr></li>
<li>Niveaux d'archétype à répartir</li>
{{#each calc.comptageArchetype as |archetype key|}}
{{#if (gt archetype.reste 0)}}
<li class="item flexrow">
<label class="generic-label">Reste {{archetype.reste}} niveaux {{numberFormat archetype.niveau decimals=0 sign=true}} sur {{archetype.nombreMax}}</label>
</li>
{{/if}}
{{/each}}
{{/if}}
{{/if}}
<li>&nbsp;</li>
</ul>
</div>

View File

@@ -1,15 +1,14 @@
<form class="skill-roll-dialog">
<form class="dialog-repos">
<img class="chat-icon" src="{{img}}" title="{{name}}" alt="{{name}}" />
<div class="flexcol">
<div class="flex-group-left">
<div class="flexrow"><span>
<img class="chat-icon" src="{{img}}" title="{{name}}" alt="{{name}}" />
<h4>{{name}} se repose</h4>
<h2>{{name}} se repose</h2>
</span></div>
<div class="flexrow"><span>
<input type="radio" name="repos" id="chateau-dormant" value="chateau-dormant">
<label for="chateau-dormant">Château Dormant</label>
</span></div>
<hr>
<div class="flexrow"><span><hr></span></div>
<div class="flexrow"><span>
<input class type="radio" name="repos" id="sieste" value="sieste">
<label for="sieste">Sieste de quelques heures</label>
@@ -18,21 +17,18 @@
<input type="radio" name="repos" id="nuit" value="nuit" checked>
<label for="nuit">Dormir la nuit</label>
</span></div>
<br>
<div class="flexrow">
<label for="nb-heures">Nombre d'heures</label>
<input type="number" name="nb-heures" value="4" data-dtype="Number" />
</div>
<hr>
<div class="flexrow"><span><hr></span></div>
<div class="flexrow"><span>
<input type="radio" name="repos" id="gris-reve" value="gris-reve">
<label for="gris-reve">Gris rêve</label>
</span></div>
<br>
<div class="flexrow">
<label for="nb-jours">Nombre de jours</label>
<input type="number" name="nb-jours" value="2" data-dtype="Number" />
</div>
</div>
</div>
</form>

View File

@@ -24,9 +24,5 @@
</div>
</div>
<div class="placeholder-resolution">
</div>
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -19,6 +19,3 @@
</div>
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -21,6 +21,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -81,6 +81,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -22,6 +22,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -22,7 +22,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -23,6 +23,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -23,6 +23,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -43,6 +43,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -21,6 +21,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -22,6 +22,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -35,6 +35,3 @@
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -18,7 +18,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -39,6 +39,3 @@
<div class="placeholder-resolution"></div>
</form>
<script>
</script>

View File

@@ -15,7 +15,7 @@
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="form-group">
<label>Catégorie </label>
<label for="system.categorie">Catégorie </label>
<select name="system.categorie" class="categorie" data-dtype="String">
{{#select system.categorie}}
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-competence.html"}}
@@ -23,15 +23,15 @@
</select>
</div>
<div class="form-group">
<label for="niveau">Niveau </label>
<label for="system.niveau">Niveau </label>
<input class="attribute-value" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number"/>
</div>
<div class="form-group">
<label for="xp">XP </label>
<label for="system.xp">XP </label>
<input class="attribute-value sheet-competence-xp" type="text" name="system.xp" value="{{system.xp}}" data-dtype="Number"/>
</div>
<div class="form-group">
<label for="base">Niveau de base </label>
<label for="system.base">Niveau de base </label>
{{#if isGM}}
<select name="system.base" data-dtype="Number">
{{#select system.base}}
@@ -43,25 +43,25 @@
{{/if}}
</div>
<div class="form-group">
<label for="defaut_carac">Caractéristique par défaut </label>
<select name="system.defaut_carac" id="defaut_carac" data-dtype="String">
<label for="system.defaut_carac">Caractéristique par défaut </label>
<select name="system.defaut_carac" data-dtype="String">
{{#select system.defaut_carac}}
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-caracteristiques.html"}}
{{/select}}
</select>
</div>
<div class="form-group">
<label for="default_diffLibre">Difficulté libre par défaut</label>
<label for="system.default_diffLibre">Difficulté libre par défaut</label>
<input class="attribute-value" type="text" name="system.default_diffLibre" value="{{system.default_diffLibre}}" data-dtype="Number"/>
</div>
{{#if (eq system.categorie 'draconic')}}
<div class="form-group">
<label for="xp">XP Sort </label>
<label for="system.xp_sort">XP Sort </label>
<input class="attribute-value" type="text" name="system.xp_sort" value="{{system.xp_sort}}" data-dtype="Number"/>
</div>
{{/if}}
<div class="form-group">
<label for="niveau_archetype">Niveau d'Archetype</label>
<label for="system.niveau_archetype">Niveau d'Archetype</label>
<input class="attribute-value" type="text" name="system.niveau_archetype" value="{{system.niveau_archetype}}" data-dtype="Number"/>
</div>

View File

@@ -14,7 +14,12 @@
{{#unless (isFieldInventaireModifiable type 'quantite')}}disabled{{/unless}}/>
</div>
<div class="form-group item-cout">
<label for="system.cout">Prix (sols) </label>
<label for="system.cout">Prix (sols)</label>
{{#if (or (ne type 'monnaie') (gt system.cout 0))}}
<input class="attribute-value" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number"
{{#unless (isFieldInventaireModifiable type 'cout')}}disabled{{/unless}}/>
{{else}}
<input class="attribute-value field-error" type="text" name="system.cout" value="{{system.cout}}" data-dtype="Number"
{{#unless (isFieldInventaireModifiable type 'cout')}}disabled{{/unless}}/>
{{/if}}
</div>