Merge pull request 'Corrections esthétiques' (#592) from VincentVk/foundryvtt-reve-de-dragon:v10 into v10

Reviewed-on: #592
This commit is contained in:
uberwald 2022-12-10 18:13:44 +01:00
commit 8c5c01114e
24 changed files with 115 additions and 149 deletions

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

@ -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

@ -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;
@ -88,7 +88,7 @@
.window-app {
font-family: CaslonAntique;
text-align: justify;
font-size: 16px;
font-size: 1rem;
letter-spacing: 1px;
}
@ -116,7 +116,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 +203,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;
@ -621,6 +625,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 +659,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 +680,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 +700,7 @@ div.placeholder-resolution span.table-proba-reussite{
}
.type-compendium{
font-size: 0.60rem;
font-size: 0.6rem;
}
/* ======================================== */
@ -1011,6 +1016,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 +1097,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 +1139,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 +1439,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 +1606,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 +1615,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 +1708,7 @@ display: inline-flex;
cursor: pointer;
color: #ffffff;
font-family: CaslonPro;
font-size: 14px;
font-size: 0.9px;
padding: 4px 12px 0px 12px;
text-decoration: none;
text-shadow: 0px 1px 0px #4d3534;

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

@ -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>