Merge pull request 'Version 11.2.9 - La barbe d'Akarlikarlikar' (#690) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11

Reviewed-on: #690
This commit is contained in:
uberwald 2023-12-09 16:23:41 +01:00
commit 2b08678518
33 changed files with 326 additions and 128 deletions

View File

@ -1,4 +1,15 @@
# 11.2
## 11.2.9 - La barbe d'Akarlikarlikar
- Amélioration des textes de tooltips
- Les tooltips sont plus dans le thème de couleur du système Rêve de Dragon
- Ajouts d'icones pour les attaque/initiative/soins dans les raccourcis sur les tokens (HUD)
- Ajout d'une icône et transformation en bouton du lien pour accéder à l'astrologie et aux chiffres astraux
- Suppression de message de log inutile sur chaque point de coeur
- On peut désactiver l'ajustement astrologique sur les jets de chance (pour des jts de chances non liés à une heure)- Fix: suppression de quelques cas d'erreur lors de l'ouverture des TMR
- Fix: suppression du warning de depréciation effects flags.core.statusId
- Les sorts en réserve en fleuve sont indiqués sur toutes les cases fleuve
- Changement de l'icône d'état d'empoignade pour suivre les couleurs des autres icônes d'état
## 11.2.8 - L'éclairage d'Akarlikarlikar
- l'ajustement de la lumière jour/nuit s'étale sur moins de temps (vaisseau et Lyre)
- les nouveaux tooltips ne masquent plus l'information d'expérience

1
icons/empoignade.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="height: 256px; width: 256px;"><g class="" transform="translate(0,3)" style=""><path d="M243.512 23.29c-27.105 18.337-53.533 32.92-82.274 45.337-2.843 17.364-3.948 34.497-4.05 51.584 28.913 15.41 56.096 32.85 83.33 49.634l7.045 4.344-3.432 7.482c-12.12 26.572-24.33 47.087-46.245 70.3l-5.184 5.512-6.46-3.904c-32.974-19.974-74.472-38.724-113.373-53.95l6.826-17.374c36.79 14.4 75.11 32.32 108.153 51.504 15.396-17.198 25.326-33.354 34.713-52.89-43.44-26.91-86.13-53.51-134.69-70.632-23.012 20.357-37.705 45.243-51.942 70.74 8.324 25.495 6.596 53.376-6.596 77.46 48.58-.593 97.994 2.23 150.666 10.26l5.658.837 1.787 5.44c8.85 26.46 11.79 54.41 8.325 83.588l-.987 8.432-8.466-.187c-40.508-.864-80.175-2.138-118.17.234 1.634 15.94-2.31 30.972-7.724 45.025 13.427 28.54 27.38 55.8 48.29 79.39 41.27-19.05 73.564-31.288 115.93-42.85-3.407-13.72-6.918-26.36-11.097-33.62-5.122-8.9-10.207-13.057-17.85-15.256-15.284-4.4-44.533 2.293-92.894 19.454l-6.243-17.594c48.907-17.354 79.702-26.894 104.283-19.82 9.133 2.628 16.884 8.004 23.066 15.46 14.487-7.627 28.415-16.79 42.053-26.996 12.34-45.92 37.29-81.42 66.626-112.107-7.226-13.52-13.208-27.204-20.563-40.613l-3.394-6.168 5-4.965c23.275-23.13 47.34-40.157 71.87-52.487l8.395 16.716c-20.952 10.53-41.503 25.913-61.795 45.152 12.41 23.91 22.263 45.5 39.457 64.826 37.488-27.124 74.943-51.39 116.84-74.938-13.96-30.473-31.345-58.357-56.286-79.462-32.2 13.38-62.527 17.39-92.61 12.29-14.223 13.25-30.094 22.23-48.756 23.337-29.017 1.722-60.74-15.74-99.174-57.672l6.858-6.295.017-.028.006.006 6.88-6.314c36.702 40.043 63.74 52.87 84.32 51.65 18.514-1.1 35.03-14.95 51.684-35.406-28.827-31.81-64.174-59.94-97.822-84.465zM39.324 277.884c-6.06.022-12.104.098-18.142.223 1.673 26.288 5.512 51.288 14.052 73.732 45.88-5.82 93.308-4.96 141.15-3.87 1.518-21.27-.253-41.69-6.058-61.212-45.528-6.565-88.59-9.03-131.002-8.873z" fill="#ffffff" fill-opacity="1" transform="translate(51.2, 51.2) scale(0.8, 0.8) rotate(0, 256, 256) skewX(0) skewY(0)"></path></g></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
icons/empoignade.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
viewBox="0 0 512 512"
style="height: 256px; width: 256px;"
version="1.1"
id="svg24"
sodipodi:docname="sort-reserve-humide3.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs28" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2794"
inkscape:window-height="1756"
id="namedview26"
showgrid="false"
inkscape:zoom="2.8786993"
inkscape:cx="323.66586"
inkscape:cy="227.70764"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg24" />
<g
id="g881"
transform="translate(2.1482304,2.80716)">
<path
d="m 243.94189,104.37921 -82.23331,178.13543 82.23331,27.44784 z"
class=""
fill="#f4e3d7"
fill-opacity="1"
id="path2"
style="stroke-width:1.10232" />
<path
d="m 263.7837,104.37921 v 205.58327 l 82.23331,-27.44784 z"
class=""
fill="#f4e3d7"
fill-opacity="1"
id="path4"
style="stroke-width:1.10232" />
<path
d="M 168.21228,221.005 18.274279,239.7445 141.75653,278.32581 Z"
class=""
fill="#f4e3d7"
fill-opacity="1"
id="path6"
style="stroke-width:1.10232" />
<path
d="M 339.51331,221.005 365.96906,278.32581 489.5395,239.7445 Z"
class=""
fill="#f4e3d7"
fill-opacity="1"
id="path8"
style="stroke-width:1.10232" />
<path
d="M -0.24475089,254.73609 114.97007,398.80973 230.27308,326.7178 Z"
class=""
fill="#f4e3d7"
fill-opacity="1"
id="path10"
style="stroke-width:1.10232" />
<path
d="M 507.94829,254.73609 277.45251,326.7178 392.75552,398.80973 Z"
class=""
fill="#f4e3d7"
fill-opacity="1"
id="path12"
style="stroke-width:1.10232" />
<path
d="M 253.8628,335.42615 147.37837,402.00647 H 360.34722 Z"
class=""
fill="#f4e3d7"
fill-opacity="1"
id="path14"
style="stroke-width:1.10232" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -399,7 +399,7 @@ export class RdDActor extends RdDBaseActorSang {
content: 'Remise à neuf de ' + this.name
});
await this.supprimerBlessures(it => true);
await this.removeEffects(e => e.flags.core.statusId !== STATUSES.StatusDemiReve);
await this.removeEffects(e => e.id != STATUSES.StatusDemiReve);
const updates = {
'system.sante.endurance.value': this.system.sante.endurance.max,
'system.sante.vie.value': this.system.sante.vie.max,
@ -1804,7 +1804,10 @@ export class RdDActor extends RdDBaseActorSang {
}
blessuresASoigner() {
return this.filterItems(it => it.system.gravite > 0 && it.system.gravite <= 6 && !(it.system.premierssoins.done && it.system.soinscomplets.done), 'blessure')
return (this.itemTypes[TYPES.blessure])
.filter(it => it.system.gravite > 0 && it.system.gravite <= 6)
.filter(it => !(it.system.premierssoins.done && it.system.soinscomplets.done))
.sort(Misc.descending(b => (b.system.premierssoins.done ? "A" : "B") + b.system.gravite))
}
async getTacheBlessure(blesse, blessure) {
@ -2920,9 +2923,7 @@ export class RdDActor extends RdDBaseActorSang {
}
/* -------------------------------------------- */
isEffectAllowed(statusId) {
return true
}
isEffectAllowed(effectId) { return true }
/* -------------------------------------------- */
async onPreUpdateItem(item, change, options, id) {

View File

@ -180,32 +180,32 @@ export class RdDBaseActorReve extends RdDBaseActor {
}
/* -------------------------------------------- */
isEffectAllowed(statusId) { return true }
isEffectAllowed(effectId) { return true }
getEffects(filter = e => true) {
return this.getEmbeddedCollection("ActiveEffect").filter(filter);
}
getEffect(statusId) {
return this.getEmbeddedCollection("ActiveEffect").find(it => it.flags?.core?.statusId == statusId);
getEffect(effectId) {
return this.getEmbeddedCollection("ActiveEffect").find(it => it.statuses?.has(effectId));
}
async setEffect(statusId, status) {
if (this.isEffectAllowed(statusId)) {
const effect = this.getEffect(statusId);
async setEffect(effectId, status) {
if (this.isEffectAllowed(effectId)) {
const effect = this.getEffect(effectId);
if (!status && effect) {
await this.deleteEmbeddedDocuments('ActiveEffect', [effect.id]);
}
if (status && !effect) {
await this.createEmbeddedDocuments("ActiveEffect", [StatusEffects.status(statusId)]);
await this.createEmbeddedDocuments("ActiveEffect", [StatusEffects.prepareActiveEffect(effectId)]);
}
}
}
async removeEffect(statusId) {
const effect = this.getEffect(statusId);
async removeEffect(id) {
const effect = this.getEmbeddedCollection("ActiveEffect").find(it => it.id == id);
if (effect) {
await this.deleteEmbeddedDocuments('ActiveEffect', [effect.id]);
await this.deleteEmbeddedDocuments('ActiveEffect', [id]);
}
}

View File

@ -33,8 +33,8 @@ export class RdDCreature extends RdDBaseActorSang {
}
}
isEffectAllowed(statusId) {
return [STATUSES.StatusComma].includes(statusId);
isEffectAllowed(effectId) {
return [STATUSES.StatusComma].includes(effectId);
}
isEntiteAccordee(attacker) {

View File

@ -70,8 +70,8 @@ export class RdDEntite extends RdDBaseActorReve {
await RdDEncaisser.encaisser(this)
}
isEffectAllowed(statusId) {
return [STATUSES.StatusComma].includes(statusId);
isEffectAllowed(effectId) {
return [STATUSES.StatusComma].includes(effectId);
}
async onAppliquerJetEncaissement(encaissement, attacker) {

View File

@ -19,10 +19,6 @@ export class RdDBonus {
}
static isAjustementAstrologique(rollData) {
return RdDCarac.isChance(rollData.selectedCarac) ||
rollData.selectedSort?.system.isrituel;
}
/* -------------------------------------------- */
static isDefenseAttaqueFinesse(rollData) {
if (rollData.isEmpoignade && rollData.rolled?.isPart) {

View File

@ -44,6 +44,7 @@ export class RdDRoll extends Dialog {
diffLibre: rollData.competence?.system.default_diffLibre ?? 0,
perteMoralEchec: false, /* Pour l'affichage dans le chat */
use: {
astrologique: true,
moral: false, /* Est-ce que le joueur demande d'utiliser le moral ? Utile si le joueur change plusieurs fois de carac associée. */
libre: true,
coeur: undefined,
@ -214,6 +215,10 @@ export class RdDRoll extends Dialog {
this.rollData[attribute] = event.currentTarget.checked;
this.updateRollResult(html);
});
this.html.find('input.use-astrologique').change((event) => {
this.rollData.use.astrologique = event.currentTarget.checked;
this.updateRollResult(html);
});
this.html.find('input.use-encTotal').change((event) => {
this.rollData.use.encTotal = event.currentTarget.checked;
this.updateRollResult(html);
@ -314,6 +319,7 @@ export class RdDRoll extends Dialog {
HtmlUtility.showControlWhen(this.html.find(".use-encTotal"), rollData.ajustements.encTotal.visible && RdDCarac.isAgiliteOuDerobee(rollData.selectedCarac));
HtmlUtility.showControlWhen(this.html.find(".use-surenc"), rollData.ajustements.surenc.visible && RdDCarac.isActionPhysique(rollData.selectedCarac));
HtmlUtility.showControlWhen(this.html.find(".use-astrologique"), rollData.ajustements.astrologique.visible);
HtmlUtility.showControlWhen(this.html.find(".utilisation-moral"), rollData.use.appelAuMoral);
HtmlUtility.showControlWhen(this.html.find(".divAppelAuMoral"), rollData.use.appelAuMoral);
HtmlUtility.showControlWhen(this.html.find(".utilisation-coeur"), rollData.ajustements.coeur.visible);

View File

@ -17,6 +17,7 @@ import { STATUSES } from "./settings/status-effects.js";
import { RdDRencontre } from "./item/rencontre.js";
import { RdDTimestamp } from "./time/rdd-timestamp.js";
import { TYPES } from "./item.js";
import { Misc } from "./misc.js";
const TMR_DISPLAY_SIZE = {
code: 'tmr-display-size',
@ -141,7 +142,7 @@ export class RdDTMRDialog extends Dialog {
// Le reste...
this.updateValuesDisplay();
}
async onDeplacement() {
await this.manageRencontre(TMRUtility.getTMR(this._getCoordActor()));
}
@ -162,9 +163,11 @@ export class RdDTMRDialog extends Dialog {
}
async forceTMRDisplay() {
this.bringToTop()
if (this.subdialog?.bringToTop) {
this.subdialog.bringToTop();
if (this.rendered) {
this.bringToTop()
if (this.subdialog?.bringToTop) {
this.subdialog.bringToTop();
}
}
}
@ -247,26 +250,21 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */
_getTokensCasesTmr() {
return this.casesSpeciales.map(c => this._tokenCaseSpeciale(c)).filter(token => token);
}
_getTokensRencontres() {
return this.rencontresExistantes.map(it => this._tokenRencontre(it));
}
_getTokensSortsReserve() {
return this.actor.itemTypes[TYPES.sortreserve].map(it => this._tokenSortEnReserve(it));
return Misc.concat(this.casesSpeciales.map(caseSpeciale =>
Draconique.get(caseSpeciale.system.specific)?.token(this.pixiTMR, caseSpeciale, () => caseSpeciale.system.coord)
))
}
/* -------------------------------------------- */
_tokenRencontre(rencontre) {
return EffetsDraconiques.rencontre.token(this.pixiTMR, rencontre, () => rencontre.system.coord);
_getTokensRencontres() {
return Misc.concat(this.rencontresExistantes.map(rencontre =>
EffetsDraconiques.rencontre.tokens(this.pixiTMR, rencontre, () => rencontre.system.coord)
))
}
_tokenCaseSpeciale(casetmr) {
const caseData = casetmr;
const draconique = Draconique.get(caseData.system.specific);
return draconique?.token(this.pixiTMR, caseData, () => caseData.system.coord);
}
_tokenSortEnReserve(sortReserve) {
return EffetsDraconiques.sortReserve.token(this.pixiTMR, sortReserve, () => sortReserve.system.coord);
_getTokensSortsReserve() {
const sortsReserve = this.actor.itemTypes[TYPES.sortreserve];
return Misc.concat(sortsReserve.map(sortReserve =>
EffetsDraconiques.sortReserve.tokens(this.pixiTMR, sortReserve, () => sortReserve.system.coord)))
}
_tokenDemiReve() {
@ -342,7 +340,7 @@ export class RdDTMRDialog extends Dialog {
this._tellToGM(this.actor.name + " a quitté les terres médianes");
}
await this.actor.santeIncDec((ReglesOptionnelles.isUsing("appliquer-fatigue") ? "fatigue" : "endurance"),
this.cumulFatigue)
this.cumulFatigue)
}
await super.close();
this.pixiTMR.close()
@ -581,7 +579,7 @@ export class RdDTMRDialog extends Dialog {
}
this.descenteTMR = false;
this.currentRencontre = undefined;
if (this._presentCite(tmr)) {
if (await this._presentCite(tmr)) {
return;
}
this.currentRencontre = await this._jetDeRencontre(tmr);
@ -592,7 +590,7 @@ export class RdDTMRDialog extends Dialog {
}
else {
const dialog = new RdDTMRRencontreDialog(this.actor, this.currentRencontre, tmr);
dialog.render(true);
await dialog.render(true);
this.setTMRPendingAction(dialog);
}
}
@ -602,11 +600,11 @@ export class RdDTMRDialog extends Dialog {
}
/* -------------------------------------------- */
_presentCite(tmr) {
async _presentCite(tmr) {
const presentCite = this.casesSpeciales.find(c => EffetsDraconiques.presentCites.isCase(c, tmr.coord));
if (presentCite) {
const caseData = presentCite;
const dialog = EffetsDraconiques.presentCites.choisirUnPresent(caseData, present => {
const dialog = await EffetsDraconiques.presentCites.choisirUnPresent(caseData, present => {
this._utiliserPresentCite(presentCite, present, tmr)
this.restoreTMRAfterAction();
});
@ -1126,6 +1124,9 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */
_trackToken(token) {
if (!token) {
return
}
if (this.demiReve === token && this.isDemiReveCache()) {
return;
}

View File

@ -90,7 +90,6 @@ export class RdDTokenHud {
if (target?.actor) {
const hudSoins = { blessures: target.actor.blessuresASoigner() ?? [] };
if (hudSoins.blessures.length > 0) {
// soins
const controlIconTarget = html.find('.control-icon[data-action=combat]');
await RdDTokenHud._configureSubMenu(controlIconTarget,
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-soins.hbs',

View File

@ -215,15 +215,16 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-description-sort.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-astrologique.hbs',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-coeur.hbs',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-competences.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffFixe.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-coeur.hbs',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-forcer.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-competences.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-item-hautrevant.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-item-frequence.html',

View File

@ -74,6 +74,17 @@ export const referenceAjustements = {
getLabel: (rollData, actor) => 'Sur-encombrement',
getValue: (rollData, actor) => actor.computeMalusSurEncombrement()
},
rituel: {
isUsed: (rollData, actor) => actor.isPersonnage() && ReglesOptionnelles.isUsing("astrologie") && rollData.selectedSort?.system.isrituel,
getLabel: (rollData, actor) => 'Astrologique',
getValue: (rollData, actor) => actor.ajustementAstrologique()
},
astrologique: {
isVisible: (rollData, actor) => actor.isPersonnage() && ReglesOptionnelles.isUsing("astrologie") && RdDCarac.isChance(rollData.selectedCarac),
isUsed: (rollData, actor) => RdDCarac.isChance(rollData.selectedCarac) && rollData.use.astrologique,
getLabel: (rollData, actor) => 'Astrologique',
getValue: (rollData, actor) => actor.ajustementAstrologique()
},
moral: {
isVisible: (rollData, actor) => actor.isPersonnage() && RdDCarac.isActionPhysique(rollData.selectedCarac) && rollData.use?.moral,
isUsed: (rollData, actor) => rollData.use.moral,
@ -84,18 +95,13 @@ export const referenceAjustements = {
isVisible: (rollData, actor) => actor.isPersonnage() && RdDCarac.isVolonte(rollData.selectedCarac),
isUsed: (rollData, actor) => rollData.use.coeur != undefined,
getLabel: (rollData, actor) => 'Ajustement de c&oelig;ur',
getValue: (rollData, actor) => -2 * (rollData.use?.coeur?.coeur ?? 0)
getValue: (rollData, actor) => -2 * (rollData.use.coeur?.coeur ?? 0)
},
moralTotal: {
isUsed: (rollData, actor) => RdDCarac.isVolonte(rollData.selectedCarac),
getLabel: (rollData, actor) => 'Moral',
getValue: (rollData, actor) => actor.getMoralTotal()
},
astrologique: {
isUsed: (rollData, actor) => ReglesOptionnelles.isUsing("astrologie") && RdDBonus.isAjustementAstrologique(rollData),
getLabel: (rollData, actor) => 'Astrologique',
getValue: (rollData, actor) => actor.ajustementAstrologique()
},
facteurSign: {
isUsed: (rollData, actor) => rollData.diviseurSignificative > 1,
getLabel: (rollData, actor) => Misc.getFractionHtml(rollData.diviseurSignificative),
@ -193,4 +199,5 @@ export class RollDataAjustements {
RdDCarac.isChance(selectedCarac) ||
(RdDCarac.isReve(selectedCarac) && !rollData.competence);
}
}

View File

@ -1,13 +1,13 @@
import { SYSTEM_RDD } from "../constants.js";
export const STATUSES = {
StatusStunned : 'stun',
StatusStunned: 'stun',
StatusBleeding: 'bleeding',
StatusProne: 'prone',
StatusGrappling: 'grappling',
StatusGrappled: 'grappled',
StatusRestrained: 'restrain',
StatusUnconscious: 'unconscious',
StatusUnconscious: 'unconscious',
StatusBlind: 'blind',
StatusComma: 'comma',
StatusDead: 'dead',
@ -18,8 +18,8 @@ const rddStatusEffects = [
{ rdd: true, id: STATUSES.StatusStunned, label: 'EFFECT.StatusStunned', icon: 'icons/svg/stoned.svg', "duration.rounds": 1 },
{ rdd: true, id: STATUSES.StatusBleeding, label: 'EFFECT.StatusBleeding', icon: 'icons/svg/blood.svg' },
{ rdd: true, id: STATUSES.StatusProne, label: 'EFFECT.StatusProne', icon: 'icons/svg/falling.svg' },
{ rdd: true, id: STATUSES.StatusGrappling, tint: '#33cc33', label: 'EFFECT.StatusGrappling', icon: 'systems/foundryvtt-reve-de-dragon/icons/competence_corps_a_corps.webp' },
{ rdd: true, id: STATUSES.StatusGrappled, tint: '#ff9900', label: 'EFFECT.StatusGrappled', icon: 'systems/foundryvtt-reve-de-dragon/icons/competence_corps_a_corps.webp' },
{ rdd: true, id: STATUSES.StatusGrappling, tint: '#33cc33', label: 'EFFECT.StatusGrappling', icon: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.svg' },
{ rdd: true, id: STATUSES.StatusGrappled, tint: '#ff9900', label: 'EFFECT.StatusGrappled', icon: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.svg' },
{ rdd: true, id: STATUSES.StatusRestrained, label: 'EFFECT.StatusRestrained', icon: 'icons/svg/net.svg' },
{ rdd: true, id: STATUSES.StatusUnconscious, label: 'EFFECT.StatusUnconscious', icon: 'icons/svg/unconscious.svg' },
{ rdd: true, id: STATUSES.StatusBlind, label: 'EFFECT.StatusBlind', icon: 'icons/svg/blind.svg' },
@ -29,13 +29,16 @@ const rddStatusEffects = [
];
const demiReveStatusEffect = rddStatusEffects.find(it => it.id == STATUSES.StatusDemiReve);
const statusDemiSurprise = [STATUSES.StatusStunned, STATUSES.StatusProne, STATUSES.StatusRestrained];
const statusSurpriseTotale = [STATUSES.StatusUnconscious, STATUSES.StatusBlind, STATUSES.StatusComma];
const statusDemiSurprise = new Set([STATUSES.StatusStunned, STATUSES.StatusProne, STATUSES.StatusRestrained])
const statusSurpriseTotale = new Set([STATUSES.StatusUnconscious, STATUSES.StatusBlind, STATUSES.StatusComma])
export class StatusEffects extends FormApplication {
static onReady() {
const rddStatusIds = rddStatusEffects.map(it => it.id);
rddStatusEffects.forEach(it => it.flags = { core: { statusId: it.id } });
const rddEffectIds = rddStatusEffects.map(it => it.id);
rddStatusEffects.forEach(it => {
it.statuses = new Set()
it.statuses.add(it.id)
})
const defaultStatusEffectIds = CONFIG.statusEffects.map(it => it.id);
game.settings.register(SYSTEM_RDD, "use-status-effects", {
name: "use-status-effects",
@ -54,37 +57,47 @@ export class StatusEffects extends FormApplication {
restricted: true
});
CONFIG.RDD.allEffects = rddStatusEffects.concat(CONFIG.statusEffects.filter(it => !rddStatusIds.includes(it.id)));
CONFIG.RDD.allEffects = rddStatusEffects.concat(CONFIG.statusEffects.filter(it => !rddEffectIds.includes(it.id)));
StatusEffects._setUseStatusEffects(StatusEffects._getUseStatusEffects());
console.log('statusEffects', CONFIG.statusEffects);
}
static valeurSurprise(effect, isCombat) {
// const id = StatusEffects.statusId(effect);
if (statusSurpriseTotale.includes(effect.flags?.core?.statusId)) {
if (statusSurpriseTotale.intersects(effect.statuses)) {
return 2;
}
return statusDemiSurprise.includes(effect.flags?.core?.statusId) || (isCombat && effect.flags?.core?.statusId == STATUSES.StatusDemiReve) ? 1 : 0;
if (statusDemiSurprise.intersects(effect.statuses)) {
return 1
}
if (isCombat && effect.statuses.includes(STATUSES.StatusDemiReve)) {
return 1
}
return 0
}
static _getUseStatusEffects() {
return game.settings.get(SYSTEM_RDD, "use-status-effects")?.split(',') ?? [];
return game.settings.get(SYSTEM_RDD, "use-status-effects")?.split(',') ?? [];
}
static _setUseStatusEffects(statusIds) {
static _setUseStatusEffects(effectIds) {
if (game.user.isGM) {
game.settings.set(SYSTEM_RDD, "use-status-effects", statusIds.join());
game.settings.set(SYSTEM_RDD, "use-status-effects", effectIds.join());
}
for (let effect of CONFIG.RDD.allEffects) {
effect.active = effect.rdd || statusIds.includes(effect.flags?.core?.statusId);
effect.active = effect.rdd || effectIds.includes(effect.id);
}
CONFIG.statusEffects = CONFIG.RDD.allEffects.filter(it => it.active);
}
static status(statusId) {
return rddStatusEffects.find(it => it.flags?.core?.statusId == statusId);
static prepareActiveEffect(effectId) {
let status = rddStatusEffects.find(it => it.id == effectId)
if (status) {
status = duplicate(status)
status.statuses = [effectId]
}
return status;
}
static demiReve() {

View File

@ -18,8 +18,8 @@ export class Draconique {
static isTeteDragon(item) { return item.type == TYPES.tete; }
static isQueueSouffle(item) { return Draconique.isQueueDragon(item) || Draconique.isSouffleDragon(item); }
static register(draconique) {
registeredEffects[draconique.code()] = draconique;
static register(draconique, code = undefined) {
registeredEffects[code ?? draconique.code()] = draconique;
if (draconique.img()) {
PixiTMR.register(draconique.code(), draconique.img())
}
@ -90,6 +90,15 @@ export class Draconique {
*/
token(pixiTMR, linkData, coordTMR, type = undefined) {
const tooltip = this.tooltip(linkData);
return this._createToken(pixiTMR, linkData, coordTMR, type, tooltip);
}
tokens(pixiTMR, linkData, coordTMR, type = undefined) {
const tooltip = this.tooltip(linkData);
return [this._createToken(pixiTMR, linkData, coordTMR, type, tooltip)];
}
_createToken(pixiTMR, linkData, coordTMR, type, tooltip) {
const token = {
sprite: this.createSprite(pixiTMR),
coordTMR: coordTMR,

View File

@ -6,7 +6,7 @@ import { ReserveExtensible } from "./reserve-extensible.js";
import { DemiReve } from "./demi-reve.js";
import { TrouNoir } from "./trou-noir.js";
import { Rencontre } from "./rencontre.js";
import { SortReserve } from "./sort-reserve.js";
import { SortReserve, SortReserveHumide } from "./sort-reserve.js";
import { CarteTmr } from "./carte-tmr.js";
import { PontImpraticable } from "./pont-impraticable.js";
import { Draconique } from "./draconique.js";
@ -26,6 +26,7 @@ export class EffetsDraconiques {
static demiReve = new DemiReve();
static rencontre = new Rencontre();
static sortReserve = new SortReserve();
static sortReserveHumide = new SortReserveHumide();
static debordement = new Debordement();
static presentCites = new PresentCites();
static fermetureCites = new FermetureCites();
@ -49,6 +50,7 @@ export class EffetsDraconiques {
Draconique.register(EffetsDraconiques.demiReve);
Draconique.register(EffetsDraconiques.rencontre);
Draconique.register(EffetsDraconiques.sortReserve);
Draconique.register(EffetsDraconiques.sortReserveHumide);
Draconique.register(EffetsDraconiques.debordement);
Draconique.register(EffetsDraconiques.fermetureCites);
Draconique.register(EffetsDraconiques.queteEaux);

View File

@ -49,7 +49,7 @@ export class PresentCites extends Draconique {
content: `La ${this.tmrLabel(casetmr)} vous offre un présent, faites votre choix`,
buttons: buttons
});
dialog.render(true);
await dialog.render(true);
return dialog
}

View File

@ -1,5 +1,7 @@
import { tmrTokenZIndex } from "../tmr-constants.js";
import { TMRUtility } from "../tmr-utility.js";
import { Draconique } from "./draconique.js";
import { EffetsDraconiques } from "./effets-draconiques.js";
export class SortReserve extends Draconique {
@ -19,4 +21,19 @@ export class SortReserve extends Draconique {
taille: () => pixiTMR.sizes.third,
});
}
tokens(pixiTMR, linkData, coordTMR, type = undefined) {
if (TMRUtility.getTMR(coordTMR()).type == 'fleuve') {
const tooltip = this.tooltip(linkData)
const fleuves = TMRUtility.getListTMR('fleuve')
return fleuves.map(f => EffetsDraconiques.sortReserveHumide._createToken(pixiTMR, linkData, () => f.coord, type?? this.code(), tooltip))
}
return super.tokens(pixiTMR, linkData, coordTMR, type)
}
}
export class SortReserveHumide extends SortReserve {
code() { return 'sortreservehumide' }
tooltip(sort) { return `${sort.name} en fleuve, r${sort.system.ptreve}` }
img() { return 'systems/foundryvtt-reve-de-dragon/icons/tmr/sort-reserve-humide.svg' }
}

View File

@ -788,6 +788,10 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
.rdd-roll-dialog div.dialog-content input {
font-size: 1rem;
}
.rdd-roll-dialog div.dialog-content input[type="checkbox"]{
width: 1rem;
vertical-align: sub;
}
.rdd-roll-part {
align-items: center;
border-radius: 6px; padding: 3px;
@ -1363,43 +1367,37 @@ table.table-nombres-astraux tr:hover {
justify-content: flex-start;
flex-direction: column;
position: absolute;
top: 2.75rem;
right: 4rem;
top: 4.6rem;
right: 3.5rem;
}
.token-hud-ext.soins {
justify-content: flex-start;
flex-direction: column;
position: absolute;
top: 13.2rem;
left: -5rem;
max-width: 8.5rem
top: 14.7rem;
left: -6rem;
max-width: 8rem;
line-height: 1rem;
}
.token-hud-ext.right {
justify-content: flex-start;
flex-direction: column;
position: absolute;
top: 2.75rem;
left: 4rem;
top: 4.6rem;
left: 3.5rem;
}
.control-icon.token-hud-icon {
width: fit-content;
div.control-icon.token-hud-icon {
width: 9rem;
height: fit-content;
border-radius: 0.3rem;
min-width: 6rem;
flex-basis: auto;
padding: 0;
line-height: 1rem;
line-height: 0.95rem;
margin: 0.2rem;
}
.control-icon.token-hud-icon.right {
margin-left: 8px;
}
.rdd-hud-menu label {
font-size: 0.8rem;
}
#token-hud .status-effects.active{
z-index: 2;
}
/* ======================================== */
.item-checkbox {
height: 25px;
@ -1941,6 +1939,14 @@ div.calendar-timestamp-edit select.calendar-signe-heure {
padding: 3px;
}
aside#tooltip{
background: var(--background-tooltip);
color: var(--color-text-dark-primary);
font-size: 1rem;
border-radius: 0.2rem;
padding: 0.4rem;
}
.tooltip :is(.ttt-xp,.ttt-levelup) {
width: 250px;
background: var(--background-tooltip) !important;

View File

@ -1,8 +1,8 @@
{
"id": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon",
"version": "11.2.8",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.2.8.zip",
"version": "11.2.9",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.2.9.zip",
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json",
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
"compatibility": {

View File

@ -70,9 +70,13 @@
{{#if options.vueDetaillee}}
&nbsp;&nbsp;
{{#if @root.options.vueArchetype}}
<a class="competence-archetype toggle-archetype chat-card-button-pushed"><i class="fa-solid fa-up-right-from-square"></i>Incarnation</a>
<a class="competence-archetype toggle-archetype chat-card-button-pushed" data-tooltip="Retour à la vue détaillée des compétences">
<i class="fa-solid fa-up-right-from-square"></i>Incarnation
</a>
{{else}}
<a class="competence-archetype toggle-archetype chat-card-button"><i class="fa-solid fa-people-line"></i>Archétype</a>
<a class="competence-archetype toggle-archetype chat-card-button" data-tooltip="Gestion de l'archétype et de la réincarnation">
<i class="fa-solid fa-people-line"></i>Archétype
</a>
{{/if}}
{{/if}}
</span>

View File

@ -2,7 +2,8 @@
<ul class="item-list">
{{#if @root.options.isGM}}
<li>
<a class="nouvelle-incarnation chat-card-button"><i class="fa-solid fa-person-circle-plus"></i> Nouvelle incarnation</a>
<a class="nouvelle-incarnation chat-card-button" data-tooltip="Création d'une nouvelle incarnation de l'archétype">
<i class="fa-solid fa-person-circle-plus"></i> Nouvelle incarnation</a>
</li>
{{/if}}
<li><hr></li>

View File

@ -1,2 +1,7 @@
<h3>Astrologie</h3>
<span class="astrologie-label"><a name="jet-astrologie">Astrologie : Nombres Astraux</a></span>
<span class="astrologie-label chat-card-button">
<a name="jet-astrologie">
<i class="fa-solid fa-moon-over-sun"></i>
Astrologie: Nombres Astraux
</a>
</span>

View File

@ -1,7 +1,7 @@
<div>
{{#if effects}}
{{#each effects as |effect key|}}
<span class="active-effect" data-effect="{{effect.flags.core.statusId}}">
<span class="active-effect" data-effect="{{effect.id}}">
<img class="button-effect-img {{#if @root.options.isGM}}delete-active-effect{{/if}}" src="{{effect.icon}}" data-tooltip="{{localize effect.name}}" width="24" height="24" />
</span>
{{/each}}

View File

@ -1,4 +1,3 @@
{{log 'C&oelig;ur' numero courant prochain}}
<a data-numero-coeur="{{numero}}">
{{#if (and (lte numero courant) (lte numero prochain))}}
<i class="fa-solid fa-heart"></i>

View File

@ -6,9 +6,10 @@
<div class="flexrow">
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-competences.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-astrologique.hbs"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-coeur.hbs"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-coeur.hbs"}}
</div>
<div class="flex-group-left">
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}}

View File

@ -8,9 +8,10 @@
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-competences.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-astrologique.hbs"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-coeur.hbs"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-coeur.hbs"}}
</div>
<div class="flex-group-left">
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}}

View File

@ -6,8 +6,8 @@
<div class="control-icon token-hud-icon rdd-hud-menu rdd-attaque"
data-combatant-id="{{../combatant.id}}"
data-action-index="{{action.index}}"
data-tooltip="{{action.name}}">
<label>{{action.name}} {{action.system.infoMain}}</label>
data-tooltip="Attaque: {{action.name}}">
<label><i class="fa-solid fa-sword"></i> {{action.name}} {{action.system.infoMain}}</label>
</div>
{{/unless}}
{{/each}}

View File

@ -5,8 +5,8 @@
<div class="control-icon token-hud-icon rdd-hud-menu"
data-combatant-id="{{../combatant.id}}"
data-action-index="{{action.index}}"
data-tooltip="{{action.name}}">
<label>init: {{action.name}} {{action.system.infoMain}}</label>
data-tooltip="Initiative {{action.name}}">
<label><i class="fa-solid fa-dice-d6"></i><span> {{action.name}} {{action.system.infoMain}}</span></label>
</div>
{{/each}}
{{#each commandes as |commande key|}}

View File

@ -4,8 +4,14 @@
{{#each blessures as |blessure|}}
<div class="control-icon token-hud-icon rdd-hud-menu"
data-blessure-id="{{blessure.id}}"
data-tooltip="{{blessure.name}}">
<label>Soigner: {{blessure.name}}</label>
data-tooltip="Jet de {{#if system.premierssoins.done}}Soins complets{{else}}Premiers soins{{/if}} sur blessure {{blessure.name}}">
<label>
{{#if system.premierssoins.done}}
<i class="fa-solid fa-user-nurse"></i> Soins complets blessure {{blessure.name}}
{{else}}
<i class="fa-solid fa-bandage"></i> Premiers soins blessure {{blessure.name}}
{{/if}}
</label>
</div>
{{/each}}
</div>

View File

@ -57,7 +57,7 @@
{{#if isRepos}}
<div class="form-group">
<label for="system.reposalchimique">Repos Alchimique ?</label>
<input class="attribute-value" type="checkbox" name="system.reposalchimique" {{#if system.reposalchimique}}checked{{/if}}/>
<input class="attribute-value" type="checkbox" name="system.reposalchimique" {{#if system.reposalchimique}}checked{{/if}}/>
</div>
{{/if}}
{{/if}}
@ -66,19 +66,22 @@
<label for="system.pr">Points de rêve</label>
<input class="attribute-value" type="text" name="system.pr" value="{{system.pr}}" data-dtype="Number" />
</div>
{{#if isSoins}}
<div class="form-group">
<label>Points de guérison</label>
<input class="attribute-value" type="text" name="system.puissance" value="{{system.puissance}}" disabled />
</div>
{{/if}}
{{#if isRepos}}
<div class="form-group">
<label>Points de repos</label>
<input class="attribute-value" type="text" name="system.puissance" value="{{system.puissance}}" disabled />
</div>
{{/if}}
<div class="form-group">
<label for="system.prpermanent">Permanente ? </label>
<input class="attribute-value" type="checkbox" name="system.prpermanent" {{#if system.prpermanent}}checked{{/if}}/>
</div>
{{#if (or isSoins isRepos)}}
<div class="form-group">
<label>Points de
{{#if isSoins}}guérison{{/if}}
{{#if isRepos}}repos{{/if}}
</label>
<label>{{system.puissance}}</label>
</div>
{{/if}}
<div class="form-group">
<label for="enchantement.jour">Date de l'Enchantement : Jour/Mois (date actuelle : {{dateActuelle}})</label>
</div>

View File

@ -0,0 +1,6 @@
<div class="flexrow use-astrologique">
<label>
Appliquer l'ajustement astrologique
<input class="attribute-value use-astrologique" type="checkbox" {{#if use.astrologique}}checked{{/if}}/>
</label>
</div>