Compare commits

...

4 Commits

Author SHA1 Message Date
uberwald 2348827842 Corrections sur anneaux
Release Creation / build (release) Failing after 1m38s
2026-05-20 23:03:10 +02:00
uberwald 3c92532601 Correction sur bonus armes
Release Creation / build (release) Failing after 1m39s
2026-05-19 00:23:20 +02:00
uberwald 3fc10ad669 Derniers fixs
Release Creation / build (release) Failing after 1m29s
2026-05-13 23:07:22 +02:00
uberwald 2e1c499c23 Implémentation des modifs v3 2026-05-12 01:09:06 +02:00
9 changed files with 36 additions and 29 deletions
@@ -685,9 +685,9 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
const data = { const data = {
equipped: tmpItem.system.equipped, equipped: tmpItem.system.equipped,
}; };
// Only weapons // For weapons: sync readied with equipped so both toggle together
if (tmpItem.system.readied !== undefined) { if (tmpItem.system.readied !== undefined) {
data.readied = tmpItem.system.readied; data.readied = type === "equipped" ? tmpItem.system.equipped : tmpItem.system.readied;
} }
// Update the Item: we need to manually notify the "Gm Monitor" as the Actor himself is not updated // Update the Item: we need to manually notify the "Gm Monitor" as the Actor himself is not updated
@@ -714,6 +714,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
return { return {
uuid: item.uuid, uuid: item.uuid,
skill: item.system.skill, skill: item.system.skill,
bonus: parseInt(item.system.bonus || 0),
}; };
} }
+1 -8
View File
@@ -11,7 +11,6 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
template: CONFIG.l5r5e.paths.templates + "actors/character-sheet.html", template: CONFIG.l5r5e.paths.templates + "actors/character-sheet.html",
tabs: [ tabs: [
{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "skills" }, { navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "skills" },
{ navSelector: ".advancements-tabs", contentSelector: ".advancements-body", initial: "last" },
], ],
}); });
} }
@@ -184,12 +183,6 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
}); });
// Advancements Tab to current rank onload
// TODO class "Active" Bug on load, dunno why :/
this._tabs
.find((e) => e._navSelector === ".advancements-tabs")
.activate("advancement_rank_" + (this.actor.system.identity.school_rank || 0));
// Arcane roll on name click // Arcane roll on name click
html.find(".dice-picker-arcane").on("click", this._openDicePickerForArcane.bind(this)); html.find(".dice-picker-arcane").on("click", this._openDicePickerForArcane.bind(this));
} }
@@ -289,7 +282,7 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
const weapon = this._getWeaponInfos(el.data("weapon-id") || null); const weapon = this._getWeaponInfos(el.data("weapon-id") || null);
const skillId = weapon?.skill || el.data("skill"); const skillId = weapon?.skill || el.data("skill");
const ringId = el.data("ring") || this.actor.system?.default_ring || "void"; const ringId = el.data("ring") || this.actor.system?.default_ring || "void";
new game.l5r5e.ChiaroscuroDiceDialog({ actor: this.actor, ringId, skillId, itemUuid: weapon?.uuid }).render(true); new game.l5r5e.ChiaroscuroDiceDialog({ actor: this.actor, ringId, skillId, itemUuid: weapon?.uuid, arcaneBonus: weapon?.bonus ?? 0 }).render(true);
} }
/** /**
+1 -1
View File
@@ -127,6 +127,6 @@ export class NpcSheetL5r5e extends BaseCharacterSheetL5r5e {
const weapon = this._getWeaponInfos(el.data("weapon-id") || null); const weapon = this._getWeaponInfos(el.data("weapon-id") || null);
const skillId = weapon?.skill || el.data("skill"); const skillId = weapon?.skill || el.data("skill");
const ringId = el.data("ring") || this.actor.system?.default_ring || "void"; const ringId = el.data("ring") || this.actor.system?.default_ring || "void";
new game.l5r5e.ChiaroscuroDiceDialog({ actor: this.actor, ringId, skillId, itemUuid: weapon?.uuid }).render(true); new game.l5r5e.ChiaroscuroDiceDialog({ actor: this.actor, ringId, skillId, itemUuid: weapon?.uuid, arcaneBonus: weapon?.bonus ?? 0 }).render(true);
} }
} }
+12 -4
View File
@@ -104,9 +104,9 @@ export class ChiaroscuroDiceDialog extends FormApplication {
set ringId(ringId) { set ringId(ringId) {
this.object.ring.id = CONFIG.l5r5e.stances.includes(ringId) ? ringId : "void"; this.object.ring.id = CONFIG.l5r5e.stances.includes(ringId) ? ringId : "void";
this.object.ring.value = this._actor?.system?.rings?.[this.object.ring.id] || 1; this.object.ring.value = this._actor?.system?.rings?.[this.object.ring.id] || 1;
// Auto-derive aspect type from ring (fire/earth → solar, air/water → lunar; void = manual) // Auto-derive aspect type from ring (air/fire → solar, water/earth → lunar; void = manual)
if (this.object.ring.id !== "void") { if (this.object.ring.id !== "void") {
this.object.aspectType = ["fire", "earth"].includes(this.object.ring.id) ? "solar" : "lunar"; this.object.aspectType = ["air", "fire"].includes(this.object.ring.id) ? "solar" : "lunar";
} }
} }
@@ -291,9 +291,14 @@ export class ChiaroscuroDiceDialog extends FormApplication {
: "system.aspects"; : "system.aspects";
const aspects = foundry.utils.getProperty(this._actor, aspectsPath) ?? {}; const aspects = foundry.utils.getProperty(this._actor, aspectsPath) ?? {};
const gaugeDirection = this.object.aspectType === "solar" ? 1 : -1; const isSolar = this.object.aspectType === "solar";
const gaugeDirection = isSolar ? 1 : -1;
const newGauge = (aspects.gauge ?? 0) + gaugeDirection; const newGauge = (aspects.gauge ?? 0) + gaugeDirection;
// Decrement the consumed aspect point
const aspectKey = isSolar ? "solar" : "lunar";
const newAspectValue = Math.max(0, (aspects[aspectKey] ?? 0) - 1);
if (Math.abs(newGauge) >= 10) { if (Math.abs(newGauge) >= 10) {
// Full reset // Full reset
await this._actor.update({ await this._actor.update({
@@ -302,7 +307,10 @@ export class ChiaroscuroDiceDialog extends FormApplication {
[`${aspectsPath}.lunar`]: 0, [`${aspectsPath}.lunar`]: 0,
}); });
} else { } else {
await this._actor.update({ [`${aspectsPath}.gauge`]: newGauge }); await this._actor.update({
[`${aspectsPath}.gauge`]: newGauge,
[`${aspectsPath}.${aspectKey}`]: newAspectValue,
});
} }
} }
File diff suppressed because one or more lines are too long
+15 -5
View File
@@ -11,11 +11,11 @@
margin: 0 auto; margin: 0 auto;
color: $white-light; color: $white-light;
#air { left: 86px; top: 69px; } // haut-gauche (36°) #air { left: 86px; top: 59px; z-index: 2; } // haut-gauche (36°)
#water { left: 174px; top: 69px; } // haut-droite ( 36°) #water { left: 174px; top: 59px; z-index: 2; } // haut-droite ( 36°)
#fire { left: 59px; top: 153px; } // gauche (252°) #fire { left: 59px; top: 153px; z-index: 1; } // gauche (252°)
#earth { left: 201px; top: 153px; } // droite (108°) #earth { left: 201px; top: 153px; z-index: 1; } // droite (108°)
#void { left: 130px; top: 205px; } // bas (180°) #void { left: 130px; top: 205px; z-index: 1; } // bas (180°)
// Common ring cell // Common ring cell
#earth, #earth,
@@ -95,6 +95,16 @@
// Solaire / Lunaire : masqués sur les anneaux, affichés latéralement // Solaire / Lunaire : masqués sur les anneaux, affichés latéralement
.ring-type { display: none; } .ring-type { display: none; }
// Air et Eau : label texte flottant AU-DESSUS de l'icône, hors du flux
// (position: absolute ne décale pas le cercle, ne casse pas l'espacement)
#air label strong, #water label strong {
position: absolute;
bottom: calc(100% + 0.3rem); // au-dessus du ring-circle
left: 0; right: 0;
text-align: center;
visibility: visible;
}
// Label vertical "☀ SOLAIRE" sur le côté gauche (entre Air et Feu) // Label vertical "☀ SOLAIRE" sur le côté gauche (entre Air et Feu)
&::before { &::before {
content: "☀ SOLAIRE"; content: "☀ SOLAIRE";
@@ -1,4 +1,4 @@
<tr data-group="advancements" data-tab="advancement_rank_{{rank}}" class="flexrow row advancement tab"> <tr class="flexrow row advancement">
<td class="name l5r5e-tooltip" data-item-id="{{advancement._id}}" name="advancement.name"><img src="{{advancement.img}}" title="{{advancement.name}}"> {{advancement.name}}</td> <td class="name l5r5e-tooltip" data-item-id="{{advancement._id}}" name="advancement.name"><img src="{{advancement.img}}" title="{{advancement.name}}"> {{advancement.name}}</td>
<td class="xp" name="advancement.xp">{{advancement.system.xp_used}}</td> <td class="xp" name="advancement.xp">{{advancement.system.xp_used}}</td>
{{#if editable}} {{#if editable}}
@@ -26,9 +26,6 @@
<a data-item-type="advancement" class="advancement-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a> <a data-item-type="advancement" class="advancement-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}} {{/if}}
</legend> </legend>
<nav class="advancements-tabs tabs" data-group="advancements">
<a class="item advancements-tab" data-tab="advancement_rank_0">{{localize 'l5r5e.advancements.school_rank_0'}}</a>
</nav>
<table> <table>
<thead class="flex"> <thead class="flex">
<tr class="flexrow row"> <tr class="flexrow row">
@@ -48,7 +45,7 @@
{{#if ../data.editable_not_soft_locked}} {{#if ../data.editable_not_soft_locked}}
{{#ifCond ../data.system.identity.school_rank '<' 6}} {{#ifCond ../data.system.identity.school_rank '<' 6}}
{{#ifCond (ifCond ../data.system.identity.school_rank '==' rankObject.rank) '&&' (ifCond rankObject.spent.curriculum '>=' rankObject.goal)}} {{#ifCond (ifCond ../data.system.identity.school_rank '==' rankObject.rank) '&&' (ifCond rankObject.spent.curriculum '>=' rankObject.goal)}}
<tr class="tfoot flexrow row tab" data-group="advancements" data-tab="advancement_rank_{{rankObject.rank}}"> <tr class="tfoot flexrow row">
<th> <th>
<button type="button" name="validate-curriculum"> <button type="button" name="validate-curriculum">
<i class='fas fa-check-square'></i> {{ localize 'l5r5e.advancements.curriculum_validate'}} <i class='fas fa-check-square'></i> {{ localize 'l5r5e.advancements.curriculum_validate'}}
@@ -8,14 +8,12 @@
<i class="fas fa-skull" title="{{localize 'l5r5e.weapons.deadliness'}}"> {{weapon.system.deadliness}}</i> <i class="fas fa-skull" title="{{localize 'l5r5e.weapons.deadliness'}}"> {{weapon.system.deadliness}}</i>
</li> </li>
{{#if editable}} {{#if editable}}
<li data-item-id="{{weapon._id}}" data-type="equipped" class="equip-readied-control" title="{{localize 'l5r5e.armors.equipped'}}"><i class="fas {{#if weapon.system.equipped}}fa-tshirt{{else}}fa-weight-hanging{{/if}}"></i></li>
<li data-item-id="{{weapon._id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li> <li data-item-id="{{weapon._id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
<li data-item-id="{{weapon._id}}" class="item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li> <li data-item-id="{{weapon._id}}" class="item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
{{/if}} {{/if}}
</ul> </ul>
<ul class="item-properties"> <ul class="item-properties">
<li class="equip-readied-control" data-item-id="{{weapon._id}}" data-type="readied">
<i class="i_readied fa{{^if weapon.system.readied}}r{{/if}} fa-check-circle" title="{{#if weapon.system.readied}}{{localize 'l5r5e.weapons.readied'}}{{else}}{{localize 'l5r5e.weapons.sheathed'}}{{/if}}"></i>
</li>
{{#each weapon.system.properties as |property|}} {{#each weapon.system.properties as |property|}}
<li class="l5r5e-tooltip" data-property-id="{{property.id}}">{{{property.name}}}</li> <li class="l5r5e-tooltip" data-property-id="{{property.id}}">{{{property.name}}}</li>
{{/each}} {{/each}}