Compare commits

..
Author SHA1 Message Date
VincentVk 37a33691ff 14.0.1 - Les imprécisions de Tétragor
Release Creation / build (release) Failing after 14s
2026-07-21 22:45:47 +02:00
VincentVk ce7271b569 Fix: ouverture des items
Fix appel methode sur objet SANS_COMPETENCE, qui n'etait pas
un RdDItem / RdDItemCompetence
2026-07-21 22:28:06 +02:00
VincentVk 5dbd7c3784 Fix Description aléatoire 2026-07-17 03:07:30 +02:00
fabres a55904742b fix(encombrement): exclure le poids propre des conteneurs du total
- Les conteneurs n'ajoutent plus leur propre encombrement au total
  (seuls les objets qu'ils contiennent sont comptés)
- Ajout indicateur visuel quand une compétence atteint son niveau d'archétype
  (bordure dorée + icône ✓)
2026-07-14 22:08:32 +02:00
14 changed files with 63 additions and 41 deletions
+15 -1
View File
@@ -1,9 +1,23 @@
# 13.0
## 13.0.49 - La pharmacopée d'Illisys
## 14.0.1 - Les imprécisions de Tétragor
- correction de l'indicateur de remplissage des conteneurs
- correction de l'ouverture des objets utilisant la liste des compétences
- correction de la description aléatoires
## 14.0.0 - Les rangements de Tétragor
- Amélioration de la gestion de l'équipement
- gestion des deniers
- gestion de herbes & plantes
- gestion des ingrédients
- gestion des potions
- indicateur de remplissage des conteneurs
- tri par nom / type / encombrement / quantité
- Le but des recettes alchimiques est affiché et éditable
## 13.0.48 - Les vagabondages d'Illisys
- Gestion des tâches à plusieurs
+8
View File
@@ -2072,6 +2072,14 @@ body {
flex-basis: 2rem;
text-align: center;
}
.system-foundryvtt-reve-de-dragon .window-app.sheet .window-content .at-archetype {
border-left: 3px solid var(--color-archetype-atteint, #b8860b);
}
.system-foundryvtt-reve-de-dragon .window-app.sheet .window-content .archetype-check {
color: var(--color-archetype-atteint, #b8860b);
font-size: 0.75rem;
margin-left: 0.15rem;
}
.system-foundryvtt-reve-de-dragon .window-app.sheet .window-content .carac-value,
.system-foundryvtt-reve-de-dragon .window-app.sheet .window-content .competence-xp-sort {
flex-grow: 0;
+8
View File
@@ -1408,6 +1408,14 @@
flex-basis: 2rem;
text-align: center;
}
.window-app.sheet .window-content .at-archetype {
border-left: 3px solid var(--color-archetype-atteint, #b8860b);
}
.window-app.sheet .window-content .archetype-check {
color: var(--color-archetype-atteint, #b8860b);
font-size: 0.75rem;
margin-left: 0.15rem;
}
.window-app.sheet .window-content .carac-value,
.window-app.sheet .window-content .competence-xp-sort {
flex-grow: 0;
+1
View File
@@ -652,6 +652,7 @@ export class RdDBaseActor extends Actor {
else {
const wasSurenc = this.isSurenc()
this.encTotal = this.items.filter(it => RdDItem.getItemTypesInventaire().includes(it.type))
.filter(it => it.type !== ITEM_TYPES.conteneur)
.map(it => it.getEncTotal()).reduce(Misc.sum(), 0)
const isSurenc = this.isSurenc()
if (isSurenc != wasSurenc) {
@@ -102,12 +102,8 @@ export class AppPersonnageAleatoire extends FormApplication {
constructor(actor) {
super({})
this.actor = actor
this.current = AppPersonnageAleatoire.getActorValues()
this.checked = Object.fromEntries(CONTROLS.map(it => [it.name, [0, '', undefined].includes(it.getter(this.current))]))
}
static getActorValues() {
return Object.fromEntries(CONTROLS.map(it => [it.name, it.getter(this.actor)]));
this.current = Object.fromEntries(CONTROLS.map(it => [it.name, it.getter(this.actor)]));
this.checked = Object.fromEntries(CONTROLS.map(it => [it.name, [0, '', undefined].includes(this.current[it.name])]))
}
async getData(options) {
@@ -141,7 +137,7 @@ export class AppPersonnageAleatoire extends FormApplication {
async onApply() {
const updates = Object.fromEntries(
CONTROLS.filter(control => game.user.isGM || control.name != 'name')
.map(control => [control.path, control.getter(this.current)])
.map(control => [control.path, this.current[control.name]])
)
await this.actor.update(updates)
await this.close()
+7 -15
View File
@@ -2,7 +2,7 @@ import { ChatUtility } from "./chat-utility.js";
import { Grammar } from "./grammar.js";
import { RdDInitiative } from "./initiative.mjs";
import { RdDItem } from "./item.js";
import { CATEGORIES_COMPETENCES, SANS_COMPETENCE } from "./item/base-items.js";
import { BASE_SANS_COMPETENCE, CATEGORIES_COMPETENCES } from "./item/base-items.js";
import { Misc } from "./misc.js";
const competenceTroncs = [["Esquive", "Dague", "Corps à corps"],
@@ -47,6 +47,10 @@ export class RdDItemCompetence extends RdDItem {
static get defaultIcon() { return "systems/foundryvtt-reve-de-dragon/icons/competence_defaut.webp" }
static async onReady(){
RdDItemCompetence.SANS_COMPETENCE = await Item.create(BASE_SANS_COMPETENCE, { temporary: true })
}
isNiveauBase() {
return this.system.niveau == this.system.base && this.system.xp == 0
}
@@ -128,18 +132,6 @@ export class RdDItemCompetence extends RdDItem {
});
}
/* -------------------------------------------- */
static isCompetenceArme(competence) {
if (competence.isCompetence() && !competence.isCorpsACorps() && !competence.isEsquive()) {
switch (competence.system.categorie) {
case 'melee':
case 'tir':
case 'lancer':
return true;
}
}
return false;
}
/* -------------------------------------------- */
static isArmeUneMain(competence) {
@@ -238,6 +230,7 @@ export class RdDItemCompetence extends RdDItem {
if (xpManquant > 0 && stressTransforme > 0 && item.system.niveau < item.system.niveau_archetype) {
item.system.stressXpMax = Math.min(xpManquant, stressTransforme);
}
item.system.isArchetypeAtteint = item.system.niveau >= item.system.niveau_archetype;
}
/* -------------------------------------------- */
@@ -248,7 +241,7 @@ export class RdDItemCompetence extends RdDItem {
/* -------------------------------------------- */
static findCompetence(list, idOrName, options = {}) {
if (idOrName == undefined || idOrName == "") {
return RdDItemCompetence.sansCompetence();
return RdDItemCompetence.SANS_COMPETENCE
}
options = foundry.utils.mergeObject(options, { preFilter: it => it.isCompetence(), description: 'compétence' }, { overwrite: false, inplace: false });
return RdDItemCompetence.findFirstItem(list, idOrName, options);
@@ -260,7 +253,6 @@ export class RdDItemCompetence extends RdDItem {
return Misc.findAllLike(name, list, options);
}
static sansCompetence() { return SANS_COMPETENCE }
static findFirstItem(list, idOrName, options) {
return list.find(it => it.id == idOrName && options.preFilter(it))
+1 -2
View File
@@ -14,7 +14,6 @@ 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";
import { CARACS } from "./rdd-carac.js";
@@ -105,7 +104,7 @@ 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: [SANS_COMPETENCE, ...competences],
competences: [await RdDItemCompetence.SANS_COMPETENCE, ...competences],
categories: RdDItem.getCategories(this.item.type),
isAppreciable: Apprecier.isAppreciable(this.item)
}
+3 -1
View File
@@ -240,7 +240,9 @@ export class RdDItem extends Item {
}
isCompetenceArme() {
return this.isCompetence() && ['melee', 'tir', 'lancer'].includes(this.system.categorie)
return this.isCompetence()
&& ['melee', 'tir', 'lancer'].includes(this.system.categorie)
&& !this.isEsquive()
}
isCompetencePossession() { return ITEM_TYPES.competencecreature == this.type && this.system.categorie == CATEGORIES_COMPETENCES_CREATURES.possession.key }
+1 -1
View File
@@ -34,7 +34,7 @@ export const PAS_DE_DRACONIC = { name: 'Pas de draconic', type: 'competence', sy
export const BASE_CORPS_A_CORPS = { name: 'Corps à Corps', type: 'competence', system: { niveau: -6, defaut_carac: "melee" }, img: 'systems/foundryvtt-reve-de-dragon/icons/competence_corps_a_corps.webp' }
export const BASE_ESQUIVE = { name: 'Esquive', type: 'competence', system: { niveau: -6, defaut_carac: "derobee" }, img: 'systems/foundryvtt-reve-de-dragon/icons/competence_esquive.webp' }
export const SANS_COMPETENCE = {
export const BASE_SANS_COMPETENCE = {
name: "Sans compétence",
type: ITEM_TYPES.competence,
img: "systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp",
+2 -2
View File
@@ -1,6 +1,6 @@
import { ChatUtility } from "../chat-utility.js"
import { ITEM_TYPES } from "../constants.js"
import { SANS_COMPETENCE } from "../item/base-items.js"
import { RdDItemCompetence } from "../item-competence.js"
import { Misc } from "../misc.js"
import { CARACS } from "../rdd-carac.js"
import { RdDUtility } from "../rdd-utility.js"
@@ -126,7 +126,7 @@ export class Apprecier {
}
getCompetenceAppreciation() {
return [SANS_COMPETENCE.name, ""].includes(this.appreciation.competence) ? SANS_COMPETENCE : this.actor.getCompetence(this.appreciation.competence)
return [RdDItemCompetence.SANS_COMPETENCE.name, ""].includes(this.appreciation.competence) ? RdDItemCompetence.SANS_COMPETENCE : this.actor.getCompetence(this.appreciation.competence)
}
rollAppreciation(rollCallbacks = []) {
+1
View File
@@ -405,6 +405,7 @@ export class SystemReveDeDragon {
RdDDice.onReady()
RollDialog.onReady()
ChatRollResult.onReady()
RdDItemCompetence.onReady()
/* -------------------------------------------- */
/* Affiche/Init le calendrier */
+3 -3
View File
@@ -7,7 +7,7 @@ import { ROLLDIALOG_SECTION, RollPart } from "./roll-part.mjs"
export const PART_COMP = "comp"
const SANS_COMPETENCE = { key: '', label: "Sans compétence", value: 0 }
const SELECT_SANS_COMPETENCE = { key: '', label: "Sans compétence", value: 0 }
export class RollPartComp extends RollPartSelect {
@@ -34,7 +34,7 @@ export class RollPartComp extends RollPartSelect {
refs.all = all.filter(comp => Grammar.includesLowerCaseNoAccent(comp.label, selectedComp))
}
else {
refs.all = all.filter(comp => comp == SANS_COMPETENCE)
refs.all = all.filter(comp => comp == SELECT_SANS_COMPETENCE)
}
}
}
@@ -63,7 +63,7 @@ export class RollPartComp extends RollPartSelect {
.sort(Misc.ascending(it => Grammar.toLowerCaseNoAccentNoSpace(it.label)))
/* TODO: filter competences */
const listCompetences = [
SANS_COMPETENCE,
SELECT_SANS_COMPETENCE,
...competences
]
return listCompetences
+2 -1
View File
@@ -1,5 +1,5 @@
{{#unless system.isHidden}}
<li class="item flexrow list-item {{#if system.isLevelUp}}xp-level-up{{/if}}" data-item-id="{{_id}}">
<li class="item flexrow list-item {{#if system.isLevelUp}}xp-level-up{{/if}} {{#if system.isArchetypeAtteint}}at-archetype{{/if}}" data-item-id="{{_id}}">
<a class="list-item-label roll-competence flexrow" name="{{name}}" data-tooltip="Niveau {{plusMoins system.niveau}} en {{name}}">
<img class="sheet-competence-img" src="{{img}}"/>
<span>{{name}}</span>
@@ -44,6 +44,7 @@
compname="{{name}}" value="{{plusMoins system.niveau_archetype}}"
data-tooltip="Niveau d'archétype {{plusMoins system.niveau_archetype}}"
{{#if (not @root.options.vueArchetype)}}disabled{{/if}} />
{{#if system.isArchetypeAtteint}}<i class="fa-solid fa-check archetype-check"></i>{{/if}}
</div>
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=this options=@root.options}}
{{/if}}
@@ -8,35 +8,35 @@
{{/if}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/sexe-aleatoire.hbs"
label="Sexe" fieldname="sexe" type="text"
value=current.system.sexe checked=checked.sexe
value=current.sexe checked=checked.sexe
}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
label="Age" fieldname="age" type="entier" min=10 max=100
value=current.system.age checked=checked.age
value=current.age checked=checked.age
}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
label="Taille" fieldname="taille" type="text"
value=current.system.taille checked=checked.taille
value=current.taille checked=checked.taille
}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
label="Poids" fieldname="poids" type="text"
value=current.system.poids checked=checked.poids
value=current.poids checked=checked.poids
}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
label="Main directrice" fieldname="main" type="text"
value=current.system.main checked=checked.main
value=current.main checked=checked.main
}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
label="Heure de naissance" fieldname="heure" type="heure"
value=current.system.heure checked=checked.heure
value=current.heure checked=checked.heure
}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
label="Cheveux" fieldname="cheveux" type="text"
value=current.system.cheveux checked=checked.cheveux
value=current.cheveux checked=checked.cheveux
}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs"
label="Yeux" fieldname="yeux" type="text"
value=current.system.yeux checked=checked.yeux
value=current.yeux checked=checked.yeux
}}
</div>
<hr>