Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
856d038dc9 | |||
791593ad38 | |||
42179dab1d | |||
83631cd366 | |||
01cf47ad55 | |||
d492b37a45 | |||
ecdcdb69d5 | |||
8479fdda8a | |||
83e57fbbc7 | |||
2d256b1217 | |||
526d38d32e | |||
2ff3dfef89 | |||
f1b6c01cd7 | |||
675fe5838e | |||
bafdec9924 |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 193 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 716 KiB After Width: | Height: | Size: 716 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 634 KiB After Width: | Height: | Size: 634 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 637 KiB After Width: | Height: | Size: 637 KiB |
27
changelog.md
@ -1,35 +1,17 @@
|
|||||||
# 12.0
|
# 12.0
|
||||||
|
|
||||||
## 12.0.44 - Les errements d'Astrobazzarh, suite
|
|
||||||
|
|
||||||
- on peut de nouveau dormir et se réveiller reposé
|
|
||||||
- les possessions utilisent maintenant correctement le rêve actuel
|
|
||||||
- les sorts variables ne causent plus de soucis de voie pour le lancement de sorts
|
|
||||||
- les acteurs ayant un sort avec un coût de rêve entier ne sont plus considérés
|
|
||||||
comme pouvant avoir un rêve variable
|
|
||||||
|
|
||||||
## 12.0.42 - Les errements d'Astrobazzarh
|
|
||||||
|
|
||||||
- Correction de différentes automatisations de combat incorrectes
|
|
||||||
- Correction des jets `@roll[vue/-2]` qui tentaient de chercher une compétence -2 (à cause des armes à 1/2 mains)
|
|
||||||
|
|
||||||
## 12.0.41 - La loupe d'Astrobazzarh
|
## 12.0.41 - La loupe d'Astrobazzarh
|
||||||
|
|
||||||
- On peut de nouveau effectuer des tirages cachés
|
- On peut de nouveau effectuer des tirages cachés
|
||||||
- Le stress transformé est bien diminué lorsqu'on met le stress dans une compétence
|
- Le stress transformé est bien diminué lorsqu'on met le stress dans une compétence
|
||||||
|
|
||||||
## 12.0.40 - Les mains d'Astrobazzarh
|
## 12.0.40 - Les mains d'Astrobazzarh
|
||||||
|
|
||||||
- correction des attaques particulières en combat
|
- correction des attaques particulières en combat
|
||||||
- correction de message sur les min/max liés aux modificateurs de races (s'applique uniquement sur la taille)
|
- correction de message sur les min/max liés aux modificateurs de races (s'applique uniquement sur la taille)
|
||||||
|
|
||||||
## 12.0.39 - Les mains d'Astrobazzarh
|
## 12.0.39 - Les mains d'Astrobazzarh
|
||||||
|
|
||||||
- les armes à 1 ou 2 mains fonctionnent dans les liens de jets de dés
|
- les armes à 1 ou 2 mains fonctionnent dans les liens de jets de dés
|
||||||
- commande `/jet` pour poster une demande de jet de dés
|
- commande `/jet` pour poster une demande de jet de dés
|
||||||
|
|
||||||
## 12.0.38 - Les prévisions d'Astrobazzarh
|
## 12.0.38 - Les prévisions d'Astrobazzarh
|
||||||
|
|
||||||
- Correction de modifications de personnages qui ne s'affichaient pas:
|
- Correction de modifications de personnages qui ne s'affichaient pas:
|
||||||
- changements d'endurance/vie/fatigue, transformé, ...
|
- changements d'endurance/vie/fatigue, transformé, ...
|
||||||
- Migration des compétences "Ecriture" en "Écriture" dans les tâches, livres, oeuvres et méditations
|
- Migration des compétences "Ecriture" en "Écriture" dans les tâches, livres, oeuvres et méditations
|
||||||
@ -39,14 +21,12 @@
|
|||||||
- utilisation de l'extension hbs pour tous les fichiers handlebars
|
- utilisation de l'extension hbs pour tous les fichiers handlebars
|
||||||
|
|
||||||
## 12.0.37 - Les enchantements d'Astrobazzarh
|
## 12.0.37 - Les enchantements d'Astrobazzarh
|
||||||
|
|
||||||
- les potions ont un état, seules les potions liquides sont enchantables
|
- les potions ont un état, seules les potions liquides sont enchantables
|
||||||
- les lancements de sorts du jour sont conservés jusqu'à chateau dormant
|
- les lancements de sorts du jour sont conservés jusqu'à chateau dormant
|
||||||
- lorsqu'un joueur souhaite enchanter une potion, les sorts d'enchantements/purification/permanence doivent avoir été lancés auparavant
|
- lorsqu'un joueur souhaite enchanter une potion, les sorts d'enchantements/purification/permanence doivent avoir été lancés auparavant
|
||||||
- on peut enchanter des gemmes exactement comme des potions
|
- on peut enchanter des gemmes exactement comme des potions
|
||||||
|
|
||||||
## 12.0.36 - L'alchimie d'Astrobazzarh
|
## 12.0.36 - L'alchimie d'Astrobazzarh
|
||||||
|
|
||||||
- Nouveautés
|
- Nouveautés
|
||||||
- ajout d'un bouton pour enchanter les potions
|
- ajout d'un bouton pour enchanter les potions
|
||||||
- standardisation des boutons d'actions sur les items
|
- standardisation des boutons d'actions sur les items
|
||||||
@ -61,11 +41,9 @@
|
|||||||
- Corrections de descriptions pour proposer les jet de dés
|
- Corrections de descriptions pour proposer les jet de dés
|
||||||
|
|
||||||
## 12.0.35 - La Solution d'Astrobazzarh
|
## 12.0.35 - La Solution d'Astrobazzarh
|
||||||
|
|
||||||
- Fix problème d'initialisation des feuilles d'items
|
- Fix problème d'initialisation des feuilles d'items
|
||||||
|
|
||||||
## 12.0.34 - la tête d'Astrobazzarh
|
## 12.0.34 - la tête d'Astrobazzarh
|
||||||
|
|
||||||
- support de liens "jets de dés"
|
- support de liens "jets de dés"
|
||||||
- on peut ajouter des liens "jet de dés" dans les journaux, descriptions, notes, maladresses, ...
|
- on peut ajouter des liens "jet de dés" dans les journaux, descriptions, notes, maladresses, ...
|
||||||
- avec la syntaxe `@roll[...]` on peut ajouter le lien vers:
|
- avec la syntaxe `@roll[...]` on peut ajouter le lien vers:
|
||||||
@ -80,26 +58,21 @@
|
|||||||
- gestion des blocs secrets dans les descriptions
|
- gestion des blocs secrets dans les descriptions
|
||||||
|
|
||||||
## 12.0.33 - la vieillesse d'Astrobazzarh
|
## 12.0.33 - la vieillesse d'Astrobazzarh
|
||||||
|
|
||||||
- retour de l'expérience pour les joueurs
|
- retour de l'expérience pour les joueurs
|
||||||
- suppression du message "Pas de caractéristique" sur les jets d'odorat-goût
|
- suppression du message "Pas de caractéristique" sur les jets d'odorat-goût
|
||||||
|
|
||||||
## 12.0.32 - les rêveries d'Astrobazzarh
|
## 12.0.32 - les rêveries d'Astrobazzarh
|
||||||
|
|
||||||
- Ajout des Items Race pour gérer les ajustements liés aux races
|
- Ajout des Items Race pour gérer les ajustements liés aux races
|
||||||
|
|
||||||
## 12.0.31 - le mausolée d'Astrobazzarh
|
## 12.0.31 - le mausolée d'Astrobazzarh
|
||||||
|
|
||||||
- Correction: les automatisation de combat jouer-MJ fonctionnentde nouveau
|
- Correction: les automatisation de combat jouer-MJ fonctionnentde nouveau
|
||||||
|
|
||||||
## 12.0.30 - le cauchemar d'Astrobazzarh
|
## 12.0.30 - le cauchemar d'Astrobazzarh
|
||||||
|
|
||||||
- calcul automatique du niveau des entités selon leur rêve
|
- calcul automatique du niveau des entités selon leur rêve
|
||||||
- la description des créatures venimeuses contient un lien vers leur venin
|
- la description des créatures venimeuses contient un lien vers leur venin
|
||||||
- Correction: les messages de combats ne marchaient plus (Changement combiné Foundry + rêve de Dragon)
|
- Correction: les messages de combats ne marchaient plus (Changement combiné Foundry + rêve de Dragon)
|
||||||
|
|
||||||
## 12.0.29 - L'indexation d'Astrobazzarh
|
## 12.0.29 - L'indexation d'Astrobazzarh
|
||||||
|
|
||||||
- les liens dans la descriptions des sorts pointent vers les sorts du compendium
|
- les liens dans la descriptions des sorts pointent vers les sorts du compendium
|
||||||
- la description du chrasme contient le lien vers son venin plutôt qu'un tableau
|
- la description du chrasme contient le lien vers son venin plutôt qu'un tableau
|
||||||
|
|
||||||
|
2215
css/foundryvtt-reve-de-dragon.css
Normal file
37
gulpfile.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
const gulp = require('gulp');
|
||||||
|
const less = require('gulp-less');
|
||||||
|
|
||||||
|
function onError(err) {
|
||||||
|
util.log(util.colors.red.bold('[ERROR LESS]:'),util.colors.bgRed(err.message));
|
||||||
|
this.emit('end');
|
||||||
|
};
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Compile LESS
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
function compileLESS() {
|
||||||
|
return gulp.src("less/foundryvtt-reve-de-dragon.less")
|
||||||
|
.pipe(less()).on('error',console.log.bind(console))
|
||||||
|
.pipe(gulp.dest("./css"))
|
||||||
|
}
|
||||||
|
const css = gulp.series(compileLESS);
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Watch Updates
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
const SIMPLE_LESS = ["less/*.less"];
|
||||||
|
|
||||||
|
function watchUpdates() {
|
||||||
|
gulp.watch(SIMPLE_LESS, css);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Export Tasks
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
|
||||||
|
exports.default = gulp.series(
|
||||||
|
gulp.parallel(css),
|
||||||
|
watchUpdates
|
||||||
|
);
|
||||||
|
exports.css = css;
|
||||||
|
exports.watchUpdates = watchUpdates;
|
45
less/colors.less
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
:root {
|
||||||
|
|
||||||
|
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
|
||||||
|
// --debug-background-color-red: #ff000054;
|
||||||
|
// --debug-background-color-blue: #1d00ff54;
|
||||||
|
// --debug-background-color-green: #54ff0054;
|
||||||
|
|
||||||
|
// --debug-box-shadow-red: inset 0 0 2px red;
|
||||||
|
// --debug-box-shadow-blue: inset 0 0 2px blue;
|
||||||
|
// --debug-box-shadow-green: inset 0 0 2px green;
|
||||||
|
|
||||||
|
/* =================== 3. some constants ============ */
|
||||||
|
--color-controls:rgba(0, 0, 0, 0.9);
|
||||||
|
--color-controls-light:hsla(0, 0%, 20%, 0.8);
|
||||||
|
--color-controls-hover:hsla(60, 100%, 75%, 0.7);
|
||||||
|
--color-control-border-hover:rgba(255, 128, 0, 0.8);
|
||||||
|
--color-gold: rgba(191, 149, 63, 0.8);
|
||||||
|
--gradient-gold: linear-gradient(30deg, rgba(191, 149, 63, 0.3), rgba(252, 246, 186, 0.3), rgba(179, 135, 40, 0.3), rgba(251, 245, 183, 0.3), rgba(170, 119, 28, 0.3));
|
||||||
|
--gradient-silver: linear-gradient(30deg, rgba(61, 55, 93, 0.3), rgba(178, 179, 196, 0.3), rgba(59, 62, 63, 0.6), rgba(206, 204, 199, 0.3), rgba(61, 46, 49, 0.3));
|
||||||
|
--gradient-green: linear-gradient(30deg, rgba(7, 76, 0, 0.3), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.1), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.3));
|
||||||
|
--gradient-red: linear-gradient(150deg, rgba(255, 0, 0, 0.3), rgba(255, 200, 128, 0.05),rgba(255, 200, 128, 0.1), rgba(255,10,0,0.3));
|
||||||
|
--gradient-violet: linear-gradient(150deg, rgba(100, 45, 124, 0.6), rgba(216, 157, 192, 0.3), rgba(177, 157, 216, 0.5), rgba(107, 62, 121, 0.3), rgba(100, 45, 124, 0.6));
|
||||||
|
--gradient-purple-black: linear-gradient(150deg, rgba(0, 0, 0, 0.7), rgba(100, 45, 124, 0.4), rgba(82, 17, 131, 0.3),rgba(100, 45, 124, 0.4), rgba(0, 0, 0, 0.7));
|
||||||
|
--gradient-silver-light: linear-gradient(30deg, rgba(61, 55, 93, 0.2), rgba(178, 179, 196, 0.1), rgba(59, 62, 63, 0.2), rgba(206, 204, 199, 0.1), rgba(61, 46, 49, 0.2));
|
||||||
|
--gradient-daylight: conic-gradient(
|
||||||
|
from 0deg,
|
||||||
|
hsla(50, 100%, 80%, 0.7),
|
||||||
|
hsla(30, 30%, 40%, 0.1) 25%,
|
||||||
|
hsla(250, 50%, 40%, 0.1) 25%,
|
||||||
|
hsla(250, 30%, 30%, 0.7) 50%,
|
||||||
|
hsla(250, 50%, 40%, 0.1) 75%,
|
||||||
|
hsla(30, 30%, 40%, 0.1) 75%,
|
||||||
|
hsla(50, 100%, 80%, 0.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-control-selected: linear-gradient(to bottom, hsla(0, 100%, 25%, 0.5) 5%, hsla(0, 100%, 12%, 0.5) 100%);
|
||||||
|
--background-tooltip: hsla(60, 12%, 85%, 0.95);
|
||||||
|
--color-tooltip:hsla(282, 47%, 33%, 0.9);
|
||||||
|
--color-tooltip-faint:hsla(282, 47%, 66%, 0.5);
|
||||||
|
--background-error:hsla(16, 100%, 50%, 0.8);
|
||||||
|
--color-profile-border: hsla(0, 0%, 80%, 0.05);
|
||||||
|
}
|
||||||
|
|
84
less/fonts.less
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
/* ==================== (A) Fonts ==================== */
|
||||||
|
@font-face {
|
||||||
|
font-family: "GoudyAcc";
|
||||||
|
src: url('../fonts/goudyacc.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "MedievalSharp";
|
||||||
|
src: url('../fonts/MedievalSharp.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "GrenzeGotisch";
|
||||||
|
src: url('../fonts/GrenzeGotisch-Regular.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "Fondamento";
|
||||||
|
src: url('../fonts/Fondamento.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "CaslonAntique";
|
||||||
|
src: url('../fonts/CaslonAntique.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'HeuresDraconiques';
|
||||||
|
src:
|
||||||
|
url('../fonts/heuresdraconiques2.woff') format('woff'),
|
||||||
|
url('../fonts/heuresdraconiques2.woff2') format('woff2'),
|
||||||
|
url('../fonts/heuresdraconiques2.ttf') format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
/* =================== 1. ACTOR SHEET FONT STYLES =========== */
|
||||||
|
--window-header-title-font-family: CaslonAntique;
|
||||||
|
--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.4rem;
|
||||||
|
--major-button-font-weight: normal;
|
||||||
|
--major-button-color: #dadada;
|
||||||
|
|
||||||
|
--tab-header-font-family: CaslonAntique;
|
||||||
|
--tab-header-font-size: 1.2rem;
|
||||||
|
--tab-header-font-weight: 700;
|
||||||
|
--tab-header-color: #403f3e;
|
||||||
|
--tab-header-color-active: #4a0404;
|
||||||
|
|
||||||
|
--actor-input-font-family: CaslonAntique;
|
||||||
|
--actor-input-font-size: 1.2rem;
|
||||||
|
--actor-input-font-weight: 500;
|
||||||
|
--actor-input-color: black;
|
||||||
|
|
||||||
|
--actor-label-font-family: CaslonAntique;
|
||||||
|
--actor-label-font-size: 1.2rem;
|
||||||
|
--actor-label-font-weight: 700;
|
||||||
|
--actor-label-color: #464331c4;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Global styles & Font */
|
||||||
|
.window-app {
|
||||||
|
font-family: CaslonAntique;
|
||||||
|
text-align: justify;
|
||||||
|
font-size: 1rem;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fonts */
|
||||||
|
.sheet header.sheet-header h1 input,
|
||||||
|
.window-app .window-header,
|
||||||
|
#actors .directory-list,
|
||||||
|
#navigation #scene-list .scene.nav-item {
|
||||||
|
font-family: "GoudyAcc"
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For title, sidebar character and scene */
|
||||||
|
.sheet nav.sheet-tabs,
|
||||||
|
.window-app input,
|
||||||
|
.sheet header.sheet-header .header-compteurs,
|
||||||
|
.sheet header.sheet-header .flex-group-center.flex-fatigue,
|
||||||
|
select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
|
||||||
|
font-family: "CaslonAntique"; /* For sheet parts; For nav and title */
|
||||||
|
}
|
2088
less/foundryvtt-reve-de-dragon.less
Normal file
10
less/item/monnaie.less
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
.application.sheet.fvtt-rdd {
|
||||||
|
.sheet-common();
|
||||||
|
section.window-content{
|
||||||
|
padding: 0rem;
|
||||||
|
|
||||||
|
section header.sheet-header {
|
||||||
|
.sheet-header();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
32
less/sheets.less
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
.sheet-common() {
|
||||||
|
|
||||||
|
.window-content{
|
||||||
|
font-family: CaslonAntique;
|
||||||
|
text-align: justify;
|
||||||
|
font-size: 1rem;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
|
||||||
|
font-size: calc(var(--font-size-standard) * 1);
|
||||||
|
color: var(--color-dark-1);
|
||||||
|
background: var(--background-image-base) no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sheet-header() {
|
||||||
|
background: #011d33 url(../assets/ui/bg_header.webp) no-repeat left top;
|
||||||
|
color: rgba(255, 255, 255, 1);
|
||||||
|
|
||||||
|
:is(
|
||||||
|
input[type="text"],
|
||||||
|
input[type="number"],
|
||||||
|
input[type="password"],
|
||||||
|
input[type="datetime-local"],
|
||||||
|
input[type="date"],
|
||||||
|
input[type="time"]) {
|
||||||
|
color: rgba(255, 255, 255, 0.75);
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
border: 0 none;
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
|
}
|
||||||
|
}
|
@ -243,7 +243,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
}
|
}
|
||||||
await this.resetInfoSommeil()
|
await this.resetInfoSommeil()
|
||||||
ChatMessage.create(message);
|
ChatMessage.create(message);
|
||||||
setTimeout(() => this.sheet.render(), 20)
|
this.sheet.render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
async _recuperationSante(message) {
|
async _recuperationSante(message) {
|
||||||
@ -299,7 +299,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
ChatMessage.create(message);
|
ChatMessage.create(message);
|
||||||
}
|
}
|
||||||
await this.resetInfoSommeil();
|
await this.resetInfoSommeil();
|
||||||
setTimeout(() => this.sheet.render(), 20)
|
this.sheet.render(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -442,9 +442,10 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
message.content += 'Vous ne trouvez pas le sommeil';
|
message.content += 'Vous ne trouvez pas le sommeil';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let dormi = await this.$dormirDesHeures(message, heures, options);
|
let jetsReve = [];
|
||||||
if (dormi.jetsReve.length > 0) {
|
let dormi = await this.dormirDesHeures(jetsReve, message, heures, options);
|
||||||
message.content += `Vous récupérez ${dormi.jetsReve.map(it => it < 0 ? '0 (réveil)' : it).reduce(Misc.joining("+"))} Points de rêve. `;
|
if (jetsReve.length > 0) {
|
||||||
|
message.content += `Vous récupérez ${jetsReve.map(it => it < 0 ? '0 (réveil)' : it).reduce(Misc.joining("+"))} Points de rêve. `;
|
||||||
}
|
}
|
||||||
if (dormi.etat == 'eveil') {
|
if (dormi.etat == 'eveil') {
|
||||||
await this.reveilReveDeDragon(message, dormi.heures);
|
await this.reveilReveDeDragon(message, dormi.heures);
|
||||||
@ -460,7 +461,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
await this.dormirChateauDormant();
|
await this.dormirChateauDormant();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
setTimeout(() => this.sheet.render(), 20)
|
this.sheet.render(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,18 +472,18 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async $dormirDesHeures(message, heures, options) {
|
async dormirDesHeures(jetsReve, message, heures, options) {
|
||||||
const dormi = { heures: 0, etat: 'dort', jetsReve: [] };
|
const dormi = { heures: 0, etat: 'dort' };
|
||||||
for (; dormi.heures < heures && dormi.etat == 'dort'; dormi.heures++) {
|
for (; dormi.heures < heures && dormi.etat == 'dort'; dormi.heures++) {
|
||||||
await this.$recupererEthylisme(message);
|
await this._recupererEthylisme(message);
|
||||||
if (options.grisReve) {
|
if (options.grisReve) {
|
||||||
await this.$recupererFatigue(message);
|
await this.recupererFatigue(message);
|
||||||
}
|
}
|
||||||
else if (!this.system.sommeil?.insomnie) {
|
else if (!this.system.sommeil?.insomnie) {
|
||||||
await this.$recupererFatigue(message);
|
await this.recupererFatigue(message);
|
||||||
await this.$jetRecuperationReve(dormi, message);
|
dormi.etat = await this.jetRecuperationReve(jetsReve, message);
|
||||||
if (dormi.etat == 'dort' && EffetsDraconiques.isDonDoubleReve(this)) {
|
if (dormi.etat == 'dort' && EffetsDraconiques.isDonDoubleReve(this)) {
|
||||||
dormi.etat = await this.$jetRecuperationReve(dormi, message);
|
dormi.etat = await this.jetRecuperationReve(jetsReve, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -490,36 +491,35 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async $jetRecuperationReve(dormi, message) {
|
async jetRecuperationReve(jetsReve, message) {
|
||||||
if (this.getReveActuel() < this.system.reve.seuil.value) {
|
if (this.getReveActuel() < this.system.reve.seuil.value) {
|
||||||
const reve = await RdDDice.rollTotal("1dr")
|
let reve = await RdDDice.rollTotal("1dr");
|
||||||
if (reve >= 7) {
|
if (reve >= 7) {
|
||||||
// Rêve de Dragon !
|
// Rêve de Dragon !
|
||||||
message.content += `Vous faites un <strong>Rêve de Dragon</strong> de ${reve} Points de rêve qui vous réveille! `;
|
message.content += `Vous faites un <strong>Rêve de Dragon</strong> de ${reve} Points de rêve qui vous réveille! `;
|
||||||
await this.combattreReveDeDragon(reve);
|
await this.combattreReveDeDragon(reve);
|
||||||
dormi.jetsReve.push(-1);
|
jetsReve.push(-1);
|
||||||
dormi.etat = 'eveil'
|
return 'eveil';
|
||||||
return
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!ReglesOptionnelles.isUsing("recuperation-reve")) {
|
if (!ReglesOptionnelles.isUsing("recuperation-reve")) {
|
||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
whisper: ChatUtility.getOwners(this),
|
whisper: ChatUtility.getOwners(this),
|
||||||
content: `Pas de récupération de rêve (${reve} points ignorés)`
|
content: `Pas de récupération de rêve (${reve} points ignorés)`
|
||||||
})
|
});
|
||||||
dormi.jetsReve.push(0)
|
jetsReve.push(0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
await this.reveActuelIncDec(reve)
|
await this.reveActuelIncDec(reve);
|
||||||
dormi.jetsReve.push(reve)
|
jetsReve.push(reve);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dormi.etat = 'dort'
|
return 'dort';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async $recupererEthylisme(message) {
|
async _recupererEthylisme(message) {
|
||||||
if (!ReglesOptionnelles.isUsing("recuperation-ethylisme")) { return; }
|
if (!ReglesOptionnelles.isUsing("recuperation-ethylisme")) { return; }
|
||||||
let value = Math.min(Number.parseInt(this.system.compteurs.ethylisme.value) + 1, 1);
|
let value = Math.min(Number.parseInt(this.system.compteurs.ethylisme.value) + 1, 1);
|
||||||
if (value <= 0) {
|
if (value <= 0) {
|
||||||
@ -549,16 +549,15 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async $recupererFatigue(message) {
|
async recupererFatigue(message) {
|
||||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
||||||
let fatigue = this.system.sante.fatigue.value
|
let fatigue = this.system.sante.fatigue.value;
|
||||||
const fatigueMin = this.getFatigueMin()
|
const fatigueMin = this.getFatigueMin();
|
||||||
if (fatigue <= fatigueMin) {
|
if (fatigue <= fatigueMin) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue))
|
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue));
|
||||||
await this.update({ 'system.sante.fatigue.value': fatigue });
|
await this.update({ "system.sante.fatigue.value": fatigue });
|
||||||
await new Promise(resolve => setTimeout(resolve, 200));
|
|
||||||
if (fatigue == 0) {
|
if (fatigue == 0) {
|
||||||
message.content += "Vous êtes complêtement reposé. ";
|
message.content += "Vous êtes complêtement reposé. ";
|
||||||
}
|
}
|
||||||
@ -1801,10 +1800,8 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
};
|
};
|
||||||
RollDataAjustements.calcul(rollData, this);
|
RollDataAjustements.calcul(rollData, this);
|
||||||
await RdDResolutionTable.rollData(rollData);
|
await RdDResolutionTable.rollData(rollData);
|
||||||
await RdDRollResult.displayRollData(rollData, this)
|
|
||||||
|
|
||||||
this.gererExperience(rollData);
|
this.gererExperience(rollData);
|
||||||
|
await RdDRollResult.displayRollData(rollData, this)
|
||||||
return rollData.rolled;
|
return rollData.rolled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2646,13 +2643,12 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async incDecItemUse(itemId, shouldIncrease = true) {
|
async incDecItemUse(itemId, inc = 1) {
|
||||||
if (shouldIncrease) {
|
const currentItemUse = this.getFlag(SYSTEM_RDD, 'itemUse');
|
||||||
const currentItemUse = this.getFlag(SYSTEM_RDD, 'itemUse');
|
let itemUse = currentItemUse ? foundry.utils.duplicate(currentItemUse) : {};
|
||||||
let itemUse = currentItemUse ? foundry.utils.duplicate(currentItemUse) : {};
|
itemUse[itemId] = (itemUse[itemId] ?? 0) + inc;
|
||||||
itemUse[itemId] = (itemUse[itemId] ?? 0) + 1;
|
await this.setFlag(SYSTEM_RDD, 'itemUse', itemUse);
|
||||||
await this.setFlag(SYSTEM_RDD, 'itemUse', itemUse);
|
console.log("ITEM USE INC", inc, itemUse);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -277,9 +277,14 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
|||||||
return dialog
|
return dialog
|
||||||
}
|
}
|
||||||
|
|
||||||
createCallbackExperience() { return { action: r => { } } }
|
createEmptyCallback() {
|
||||||
createCallbackAppelAuMoral() { return { action: r => { } } }
|
return {
|
||||||
|
condition: r => false,
|
||||||
|
action: r => { }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
createCallbackExperience() { return this.createEmptyCallback(); }
|
||||||
|
createCallbackAppelAuMoral() { return this.createEmptyCallback(); }
|
||||||
async _onCloseRollDialog(html) { }
|
async _onCloseRollDialog(html) { }
|
||||||
|
|
||||||
async rollCaracCompetence(caracName, compName, diff, options = { title: "" }) {
|
async rollCaracCompetence(caracName, compName, diff, options = { title: "" }) {
|
||||||
|
@ -747,7 +747,7 @@ export class RdDBaseActor extends Actor {
|
|||||||
async jetDeMoral() { this.actionImpossible("jet de moral") }
|
async jetDeMoral() { this.actionImpossible("jet de moral") }
|
||||||
|
|
||||||
async resetItemUse() { }
|
async resetItemUse() { }
|
||||||
async incDecItemUse(itemId, shouldIncrease = true) { }
|
async incDecItemUse(itemId, inc = 1) { }
|
||||||
getItemUse(itemId) { return 0; }
|
getItemUse(itemId) { return 0; }
|
||||||
|
|
||||||
async finDeRound(options = { terminer: false }) { }
|
async finDeRound(options = { terminer: false }) { }
|
||||||
|
@ -3,7 +3,7 @@ import { Misc } from "../../misc.js"
|
|||||||
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js"
|
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js"
|
||||||
import { Mapping } from "./mapping.js"
|
import { Mapping } from "./mapping.js"
|
||||||
|
|
||||||
const IMG_SCRIPTARIUM = '<img class="context-menu-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/scriptarium.svg">'
|
const IMG_SCRIPTARIUM = '<img class="context-menu-img" src="systems/foundryvtt-reve-de-dragon/assets/ui/scriptarium.svg">'
|
||||||
|
|
||||||
export class ExportScriptarium {
|
export class ExportScriptarium {
|
||||||
|
|
||||||
|
4
module/applications/sheets/_module.mjs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export { default as RdDItemBaseSheet} from "./common-item-sheet.mjs"
|
||||||
|
export { default as RdDMonnaieSheet } from "./monnaie-sheet.mjs"
|
||||||
|
export { default as RdDMunitionSheet } from "./munition-sheet.mjs"
|
||||||
|
|
111
module/applications/sheets/common-item-sheet.mjs
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
const { HandlebarsApplicationMixin } = foundry.applications.api
|
||||||
|
import { SYSTEM_RDD } from "../../constants.js"
|
||||||
|
import { Misc } from "../../misc.js"
|
||||||
|
import { RdDSheetUtility } from "../../rdd-sheet-utility.js";
|
||||||
|
|
||||||
|
|
||||||
|
export default class RdDItemBaseSheet extends HandlebarsApplicationMixin(foundry.applications.sheets.ItemSheetV2) {
|
||||||
|
|
||||||
|
static preloadHandlebars(...templatesList) {
|
||||||
|
const handlebars = ["systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/header.hbs"]
|
||||||
|
templatesList.forEach(templates =>
|
||||||
|
templates.forEach(t =>
|
||||||
|
t.handlebars().forEach(h => handlebars.push(h))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
loadTemplates(Misc.distinct(handlebars))
|
||||||
|
}
|
||||||
|
|
||||||
|
static register(sheetClass) {
|
||||||
|
const itemType = sheetClass.ITEM_TYPE
|
||||||
|
Items.registerSheet(SYSTEM_RDD, sheetClass, {
|
||||||
|
label: Misc.typeName('Item', itemType),
|
||||||
|
types: [itemType],
|
||||||
|
makeDefault: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
static registerAll(...sheetClasses) {
|
||||||
|
const handlebars = ["systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/header.hbs"]
|
||||||
|
sheetClasses.forEach(sheetClass => {
|
||||||
|
sheetClass.TEMPLATES.forEach(t =>
|
||||||
|
t.handlebars().forEach(h => handlebars.push(h))
|
||||||
|
)
|
||||||
|
const itemType = sheetClass.ITEM_TYPE
|
||||||
|
Items.registerSheet(SYSTEM_RDD, sheetClass, {
|
||||||
|
label: Misc.typeName('Item', itemType),
|
||||||
|
types: [itemType],
|
||||||
|
makeDefault: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
loadTemplates(Misc.distinct(handlebars))
|
||||||
|
}
|
||||||
|
|
||||||
|
static get ITEM_TYPE() { return undefined }
|
||||||
|
|
||||||
|
constructor(options = {}) {
|
||||||
|
super(options)
|
||||||
|
}
|
||||||
|
|
||||||
|
static get TEMPLATES() { return [] }
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
classes: ["fvtt-rdd", "item"],
|
||||||
|
position: {
|
||||||
|
width: 600,
|
||||||
|
height: "auto",
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
submitOnChange: true,
|
||||||
|
},
|
||||||
|
window: {
|
||||||
|
resizable: true,
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
editImage: RdDItemBaseSheet.#onEditImage,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _prepareContext() {
|
||||||
|
return {
|
||||||
|
item: this.document,
|
||||||
|
options: RdDSheetUtility.getOptions(this.document, this.isEditable),
|
||||||
|
fields: this.document.schema.fields,
|
||||||
|
systemFields: this.document.system.schema.fields,
|
||||||
|
system: this.document.system,
|
||||||
|
source: this.document.toObject(),
|
||||||
|
isEditable: this.isEditable,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// #region Actions
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle changing a Document's image.
|
||||||
|
*
|
||||||
|
* @this RdDItemBaseSheet
|
||||||
|
* @param {PointerEvent} event The originating click event
|
||||||
|
* @param {HTMLElement} target The capturing HTML element which defined a [data-action]
|
||||||
|
* @returns {Promise}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
static async #onEditImage(event, target) {
|
||||||
|
const attr = target.dataset.edit
|
||||||
|
const current = foundry.utils.getProperty(this.document, attr)
|
||||||
|
const { img } = this.document.constructor.getDefaultArtwork?.(this.document.toObject()) ?? {}
|
||||||
|
const fp = new FilePicker({
|
||||||
|
current,
|
||||||
|
type: "image",
|
||||||
|
redirectToRoot: img ? [img] : [],
|
||||||
|
callback: (path) => {
|
||||||
|
this.document.update({ [attr]: path })
|
||||||
|
},
|
||||||
|
top: this.position.top + 40,
|
||||||
|
left: this.position.left + 10,
|
||||||
|
})
|
||||||
|
return fp.browse()
|
||||||
|
}
|
||||||
|
// #endregion
|
||||||
|
}
|
35
module/applications/sheets/monnaie-sheet.mjs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../../common/_module.mjs";
|
||||||
|
import { ITEM_TYPES } from "../../constants.js";
|
||||||
|
import RdDItemBaseSheet from "./common-item-sheet.mjs";
|
||||||
|
|
||||||
|
export default class RdDMonnaieSheet extends RdDItemBaseSheet {
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static get ITEM_TYPE() { return ITEM_TYPES.monnaie }
|
||||||
|
static get TEMPLATES() { return [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE] }
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = Object.assign({},
|
||||||
|
RdDItemBaseSheet.DEFAULT_OPTIONS,
|
||||||
|
{
|
||||||
|
classes: ["fvtt-rdd", "item", "monnaie"],
|
||||||
|
position: { width: 400 },
|
||||||
|
window: { contentClasses: ["monnaie-content"] }
|
||||||
|
})
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static PARTS = {
|
||||||
|
main: {
|
||||||
|
template: "systems/foundryvtt-reve-de-dragon/templates/sheets/item/monnaie.hbs",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _prepareContext() {
|
||||||
|
return Object.assign(
|
||||||
|
await super._prepareContext(),
|
||||||
|
await TEMPLATE_DESCRIPTION.prepareContext(this.document),
|
||||||
|
await TEMPLATE_INVENTAIRE.prepareContext(this.document)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
34
module/applications/sheets/munition-sheet.mjs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../../common/_module.mjs";
|
||||||
|
import { ITEM_TYPES } from "../../constants.js";
|
||||||
|
import RdDItemBaseSheet from "./common-item-sheet.mjs";
|
||||||
|
|
||||||
|
export default class RdDMunitionSheet extends RdDItemBaseSheet {
|
||||||
|
/** @override */
|
||||||
|
static get ITEM_TYPE() { return ITEM_TYPES.munition }
|
||||||
|
static get TEMPLATES() { return [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE] }
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = Object.assign({},
|
||||||
|
RdDItemBaseSheet.DEFAULT_OPTIONS,
|
||||||
|
{
|
||||||
|
classes: ["fvtt-rdd", "item", "munition"],
|
||||||
|
position: { width: 400 },
|
||||||
|
window: { contentClasses: ["munition-content"] }
|
||||||
|
})
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static PARTS = {
|
||||||
|
main: {
|
||||||
|
template: "systems/foundryvtt-reve-de-dragon/templates/sheets/item/munition.hbs",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _prepareContext() {
|
||||||
|
return Object.assign(
|
||||||
|
await super._prepareContext(),
|
||||||
|
await TEMPLATE_DESCRIPTION.prepareContext(this.document),
|
||||||
|
await TEMPLATE_INVENTAIRE.prepareContext(this.document)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
8
module/common/_module.mjs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { CommonDescription } from "./description.mjs";
|
||||||
|
import { CommonInventaire } from "./inventaire.mjs";
|
||||||
|
|
||||||
|
export const TEMPLATE_DESCRIPTION = new CommonDescription()
|
||||||
|
export const TEMPLATE_INVENTAIRE = new CommonInventaire()
|
||||||
|
|
||||||
|
export const ALL_COMMON_TEMPLATES = [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE]
|
||||||
|
|
10
module/common/common-template.mjs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* class describing common methods implemented by template parts,
|
||||||
|
* used for sheet/models/documents
|
||||||
|
*/
|
||||||
|
export default class CommonTemplate {
|
||||||
|
fields() { }
|
||||||
|
handlebars() { return [] }
|
||||||
|
actions() { return {} }
|
||||||
|
async prepareContext(item) { }
|
||||||
|
}
|
32
module/common/description.mjs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import { RdDTextEditor } from "../apps/rdd-text-roll-editor.js"
|
||||||
|
import CommonTemplate from "./common-template.mjs"
|
||||||
|
import { HTMLSTRING } from "./field-types.mjs"
|
||||||
|
|
||||||
|
const fields = foundry.data.fields
|
||||||
|
|
||||||
|
export class CommonDescription extends CommonTemplate {
|
||||||
|
fields() {
|
||||||
|
return {
|
||||||
|
description: new fields.HTMLField({ ...HTMLSTRING }),
|
||||||
|
descriptionmj: new fields.HTMLField({ gmOnly: true, ...HTMLSTRING })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handlebars() {
|
||||||
|
return [
|
||||||
|
"systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/template-description.hbs",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
actions() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
|
||||||
|
async prepareContext(item) {
|
||||||
|
const enriched = {
|
||||||
|
description: await RdDTextEditor.enrichHTML(item.system.description, item),
|
||||||
|
descriptionmj: await RdDTextEditor.enrichHTML(item.system.descriptionmj, item),
|
||||||
|
}
|
||||||
|
return { enriched }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
9
module/common/field-types.mjs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export const INTEGER = { required: true, nullable: false, min: 0, integer: true }
|
||||||
|
export const DECIMAL = { required: true, nullable: false, min: 0, integer: false } /* TODO: validation de nombre décimales?*/
|
||||||
|
export const INTEGER_SIGNED = { required: true, nullable: false, integer: true }
|
||||||
|
export const DECIMAL_SIGNED = { required: true, nullable: false, integer: false }
|
||||||
|
export const STRING = { required: true, nullable: false, blank: true, trim: true }
|
||||||
|
export const HTMLSTRING = { initial: "", required: true, nullable: false, blank: true, textSearch: true }
|
||||||
|
|
||||||
|
export const MODEL_ARRAY = { initial: [], required: true, nullable: false }
|
||||||
|
|
36
module/common/inventaire.mjs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import CommonTemplate from "./common-template.mjs"
|
||||||
|
import { RARETES } from "../item/raretes.js"
|
||||||
|
import { DECIMAL, INTEGER, INTEGER_SIGNED, MODEL_ARRAY, STRING } from "./field-types.mjs"
|
||||||
|
|
||||||
|
const fields = foundry.data.fields
|
||||||
|
|
||||||
|
export class CommonInventaire extends CommonTemplate {
|
||||||
|
fields() {
|
||||||
|
return {
|
||||||
|
encombrement: new fields.NumberField({ label: "Encombrement", initial: 0, ...INTEGER }),
|
||||||
|
quantite: new fields.NumberField({ label: "Quantité", initial: 1, ...INTEGER }),
|
||||||
|
qualite: new fields.NumberField({ label: "Qualité", initial: 0, ...INTEGER_SIGNED }),
|
||||||
|
cout: new fields.NumberField({ label: "Coût", initial: 0.0, ...DECIMAL }),
|
||||||
|
environnement: new fields.ArrayField(
|
||||||
|
new fields.SchemaField({
|
||||||
|
milieu: new fields.StringField({ label: "Milieu", initial: "", ...STRING }),
|
||||||
|
rarete: new fields.StringField({
|
||||||
|
label: "Rareté", initial: RARETES[0].code, ...STRING,
|
||||||
|
validate: (value, options) => RARETES.find(it => it.code == value)
|
||||||
|
}),
|
||||||
|
frequence: new fields.NumberField({ label: "Fréquence", initial: RARETES[0].frequence, ...INTEGER }),
|
||||||
|
}),
|
||||||
|
{ label: "Environnement", ...MODEL_ARRAY }),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handlebars() {
|
||||||
|
return [
|
||||||
|
"systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/template-inventaire.hbs"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
async prepareContext(item) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
2
module/documents/_module.mjs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export { default as RdDModelMonnaie } from "./monnaie.mjs"
|
||||||
|
export { default as RdDModelMunition } from "./munition.mjs"
|
7
module/documents/monnaie.mjs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { RdDItem } from "../item.js";
|
||||||
|
|
||||||
|
export default class RdDItemMonnaie extends RdDItem {
|
||||||
|
static get defaultIcon() {
|
||||||
|
return 'systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp'
|
||||||
|
}
|
||||||
|
}
|
7
module/documents/munition.mjs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { RdDItem } from "../item.js";
|
||||||
|
|
||||||
|
export default class RdDItemMunition extends RdDItem {
|
||||||
|
static get defaultIcon() {
|
||||||
|
return 'systems/foundryvtt-reve-de-dragon/icons/objets/fleche.webp'
|
||||||
|
}
|
||||||
|
}
|
@ -14,12 +14,11 @@ import { RdDItem } from "./item.js";
|
|||||||
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
|
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
|
||||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||||
import { ItemAction } from "./item/item-actions.js";
|
import { ItemAction } from "./item/item-actions.js";
|
||||||
import { RdDItemGemme } from "./item/gemme.js";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the basic ItemSheet for RdD specific items
|
* Extend the basic ItemSheet for RdD specific items
|
||||||
*/
|
*/
|
||||||
export class RdDItemSheet extends ItemSheet {
|
export class RdDItemSheetV1 extends ItemSheet {
|
||||||
|
|
||||||
static get ITEM_TYPE() {
|
static get ITEM_TYPE() {
|
||||||
return undefined
|
return undefined
|
||||||
@ -43,7 +42,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: [SYSTEM_RDD, "sheet", "item"],
|
classes: [SYSTEM_RDD, "sheet", "item"],
|
||||||
template: RdDItemSheet.defaultTemplate(RdDItemSheet.ITEM_TYPE),
|
template: RdDItemSheetV1.defaultTemplate(RdDItemSheetV1.ITEM_TYPE),
|
||||||
width: 550,
|
width: 550,
|
||||||
height: 550
|
height: 550
|
||||||
}, { inplace: false });
|
}, { inplace: false });
|
||||||
@ -51,7 +50,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
get template() {
|
get template() {
|
||||||
return RdDItemSheet.defaultTemplate(this.item.type);
|
return RdDItemSheetV1.defaultTemplate(this.item.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
@ -101,7 +100,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
description: await RdDTextEditor.enrichHTML(this.item.system.description, this.item),
|
description: await RdDTextEditor.enrichHTML(this.item.system.description, this.item),
|
||||||
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
|
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
|
||||||
isComestible: this.item.getUtilisationCuisine(),
|
isComestible: this.item.getUtilisationCuisine(),
|
||||||
options: RdDSheetUtility.mergeDocumentRights(this.options, this.item, this.isEditable),
|
options: RdDSheetUtility.mergeDocumentRights({}, this.item, this.isEditable),
|
||||||
competences: await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage),
|
competences: await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage),
|
||||||
categories: RdDItem.getCategories(this.item.type),
|
categories: RdDItem.getCategories(this.item.type),
|
||||||
}
|
}
|
||||||
@ -264,7 +263,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
_updateObject(event, formData) {
|
_updateObject(event, formData) {
|
||||||
switch (this.item.type) {
|
switch (this.item.type) {
|
||||||
case ITEM_TYPES.sort:
|
case ITEM_TYPES.sort:
|
||||||
formData['system.bonuscase'] = RdDItemSort.bonuscasesToString(RdDItemSheet._listCaseTmr(
|
formData['system.bonuscase'] = RdDItemSort.bonuscasesToString(RdDItemSheetV1._listCaseTmr(
|
||||||
formData.caseTmrCoord,
|
formData.caseTmrCoord,
|
||||||
formData.caseTmrBonus,
|
formData.caseTmrBonus,
|
||||||
formData.caseTmrAdd
|
formData.caseTmrAdd
|
||||||
@ -314,7 +313,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
|
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
// Try to extract the dragData
|
// Try to extract the dragData
|
||||||
let dragData = RdDItemSheet.$extractDragData(event);
|
let dragData = RdDItemSheetV1.$extractDragData(event);
|
||||||
if (!dragData) return false;
|
if (!dragData) return false;
|
||||||
const allowed = Hooks.call("dropActorSheetData", this.actor, this, dragData);
|
const allowed = Hooks.call("dropActorSheetData", this.actor, this, dragData);
|
||||||
if (allowed === false) return false;
|
if (allowed === false) return false;
|
||||||
|
@ -56,10 +56,6 @@ export class RdDItemSort extends Item {
|
|||||||
return voies.map(voie => RdDItemCompetence.getVoieDraconic(competencesDraconic, voie))
|
return voies.map(voie => RdDItemCompetence.getVoieDraconic(competencesDraconic, voie))
|
||||||
}
|
}
|
||||||
|
|
||||||
static getBestDraconicSort(competencesDraconic, sort) {
|
|
||||||
return RdDItemSort.getDraconicsSort(competencesDraconic, sort).sort(Misc.descending(it => it.system.niveau)).find(it=>true)
|
|
||||||
}
|
|
||||||
|
|
||||||
static getOrdreCode(code) {
|
static getOrdreCode(code) {
|
||||||
return (VOIES_DRACONIC.find(it => it.code == code)?.ordre ?? '?')
|
return (VOIES_DRACONIC.find(it => it.code == code)?.ordre ?? '?')
|
||||||
}
|
}
|
||||||
@ -96,7 +92,7 @@ export class RdDItemSort extends Item {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static isCoutVariable(sort) {
|
static isCoutVariable(sort) {
|
||||||
return sort && !Number.isInteger(sort.system.ptreve) && (sort.system.ptreve.toLowerCase() == "variable" || sort.system.ptreve.indexOf("+") >= 0);
|
return sort && (sort.system.ptreve.toLowerCase() == "variable" || sort.system.ptreve.indexOf("+") >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { HtmlUtility } from "../html-utility.js";
|
import { HtmlUtility } from "../html-utility.js";
|
||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
import { Misc } from "../misc.js";
|
import { Misc } from "../misc.js";
|
||||||
import { RdDRaretes } from "./raretes.js";
|
import { RdDRaretes } from "./raretes.js";
|
||||||
|
|
||||||
const TYPE_ITEMS_NATURELS = ["faune", "herbe", "plante", "ingredient"];
|
const TYPE_ITEMS_NATURELS = ["faune", "herbe", "plante", "ingredient"];
|
||||||
|
|
||||||
export class RdDItemInventaireSheet extends RdDItemSheet {
|
export class RdDItemInventaireSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
return foundry.utils.mergeObject(RdDItemSheet.defaultOptions, {
|
return foundry.utils.mergeObject(RdDItemSheetV1.defaultOptions, {
|
||||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "informations" }]
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "informations" }]
|
||||||
}, { inplace: false })
|
}, { inplace: false })
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
|
|
||||||
export class RdDBlessureItemSheet extends RdDItemSheet {
|
export class RdDBlessureItemSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "blessure" };
|
static get ITEM_TYPE() { return "blessure" };
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { RdDRencontre } from "./rencontre.js";
|
import { RdDRencontre } from "./rencontre.js";
|
||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
|
|
||||||
export class RdDRencontreItemSheet extends RdDItemSheet {
|
export class RdDRencontreItemSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "rencontre" };
|
static get ITEM_TYPE() { return "rencontre" };
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
|
|
||||||
export class RdDServiceItemSheet extends RdDItemSheet {
|
export class RdDServiceItemSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "service" };
|
static get ITEM_TYPE() { return "service" };
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
import { RdDItemSigneDraconique } from "./signedraconique.js";
|
import { RdDItemSigneDraconique } from "./signedraconique.js";
|
||||||
import { TMRUtility } from "../tmr-utility.js";
|
import { TMRUtility } from "../tmr-utility.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Item sheet pour signes draconiques
|
* Item sheet pour signes draconiques
|
||||||
* @extends {RdDItemSheet}
|
* @extends {RdDItemSheetV1}
|
||||||
*/
|
*/
|
||||||
export class RdDSigneDraconiqueItemSheet extends RdDItemSheet {
|
export class RdDSigneDraconiqueItemSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "signedraconique" }
|
static get ITEM_TYPE() { return "signedraconique" }
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ export class Misc {
|
|||||||
const subset = elements.filter(options.preFilter)
|
const subset = elements.filter(options.preFilter)
|
||||||
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value))
|
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value))
|
||||||
.sort(Misc.ascending(it => options.mapper(it)))
|
.sort(Misc.ascending(it => options.mapper(it)))
|
||||||
if (subset.length == 0 && options?.onMessage) {
|
if (subset.length == 0) {
|
||||||
options.onMessage(`Pas de ${options.description} correspondant à ${value}`);
|
options.onMessage(`Pas de ${options.description} correspondant à ${value}`);
|
||||||
}
|
}
|
||||||
return subset;
|
return subset;
|
||||||
|
2
module/models/_module.mjs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export { default as RdDModelMonnaie } from "./monnaie.mjs"
|
||||||
|
export { default as RdDModelMunition } from "./munition.mjs"
|
10
module/models/monnaie.mjs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../common/_module.mjs";
|
||||||
|
|
||||||
|
export default class RdDModelMonnaie extends foundry.abstract.TypeDataModel {
|
||||||
|
static defineSchema() {
|
||||||
|
return Object.assign({},
|
||||||
|
TEMPLATE_DESCRIPTION.fields(),
|
||||||
|
TEMPLATE_INVENTAIRE.fields()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
10
module/models/munition.mjs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../common/_module.mjs";
|
||||||
|
|
||||||
|
export default class RdDModelMunition extends foundry.abstract.TypeDataModel {
|
||||||
|
static defineSchema() {
|
||||||
|
return Object.assign({},
|
||||||
|
TEMPLATE_DESCRIPTION.fields(),
|
||||||
|
TEMPLATE_INVENTAIRE.fields()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -743,13 +743,23 @@ export class RdDCombat {
|
|||||||
this.attacker.createCallbackExperience(),
|
this.attacker.createCallbackExperience(),
|
||||||
this.attacker.createCallbackAppelAuMoral(),
|
this.attacker.createCallbackAppelAuMoral(),
|
||||||
{ action: r => this.removeChatMessageActionsPasseArme(r.passeArme) },
|
{ action: r => this.removeChatMessageActionsPasseArme(r.passeArme) },
|
||||||
{ action: async r => await this.attacker.incDecItemUse(arme._id, arme && !RdDCombat.isParticuliere(r)) },
|
{ action: r => this._increaseItemUse(r, arme) },
|
||||||
{ action: r => this._onAttaque(r) },
|
{ action: r => this._onAttaqueNormale(r) },
|
||||||
|
{ action: r => this._onAttaqueParticuliere(r) },
|
||||||
|
{ action: r => this._onAttaqueEchec(r) },
|
||||||
|
{ action: r => this._onAttaqueEchecTotal(r) },
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
dialog.render(true);
|
dialog.render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_increaseItemUse(rollData, arme) {
|
||||||
|
if (!arme || RdDCombat.isParticuliere(rollData)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.attacker.incDecItemUse(arme._id)
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
_prepareAttaque(competence, arme) {
|
_prepareAttaque(competence, arme) {
|
||||||
let rollData = {
|
let rollData = {
|
||||||
@ -780,23 +790,11 @@ export class RdDCombat {
|
|||||||
return rollData;
|
return rollData;
|
||||||
}
|
}
|
||||||
|
|
||||||
async _onAttaque(attackerRoll) {
|
|
||||||
if (RdDCombat.isParticuliere(attackerRoll)) {
|
|
||||||
return await this._onAttaqueParticuliere(attackerRoll)
|
|
||||||
}
|
|
||||||
if (RdDCombat.isReussite(attackerRoll)) {
|
|
||||||
return await this._onAttaqueNormale(attackerRoll)
|
|
||||||
}
|
|
||||||
// if (RdDCombat.isParticuliere(attackerRoll) && attackerRoll.particuliere == undefined) {
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
if (RdDCombat.isEchecTotal(attackerRoll)) {
|
|
||||||
return await this._onAttaqueEchecTotal(attackerRoll)
|
|
||||||
}
|
|
||||||
return await this._onAttaqueEchec(attackerRoll)
|
|
||||||
}
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onAttaqueParticuliere(rollData) {
|
async _onAttaqueParticuliere(rollData) {
|
||||||
|
if (!RdDCombat.isParticuliere(rollData)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const isMeleeDiffNegative = (rollData.competence.type == 'competencecreature' || rollData.selectedCarac.label == "Mêlée") && rollData.diffLibre < 0;
|
const isMeleeDiffNegative = (rollData.competence.type == 'competencecreature' || rollData.selectedCarac.label == "Mêlée") && rollData.diffLibre < 0;
|
||||||
// force toujours, sauf empoignade
|
// force toujours, sauf empoignade
|
||||||
// finesse seulement en mélée, pour l'empoignade, ou si la difficulté libre est de -1 minimum
|
// finesse seulement en mélée, pour l'empoignade, ou si la difficulté libre est de -1 minimum
|
||||||
@ -834,6 +832,12 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onAttaqueNormale(attackerRoll) {
|
async _onAttaqueNormale(attackerRoll) {
|
||||||
|
if (!RdDCombat.isReussite(attackerRoll)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (RdDCombat.isParticuliere(attackerRoll) && attackerRoll.particuliere == undefined) {
|
||||||
|
return
|
||||||
|
}
|
||||||
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
||||||
|
|
||||||
attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker, this.defender.isEntite());
|
attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker, this.defender.isEntite());
|
||||||
@ -950,6 +954,9 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onAttaqueEchecTotal(attackerRoll) {
|
async _onAttaqueEchecTotal(attackerRoll) {
|
||||||
|
if (!RdDCombat.isEchecTotal(attackerRoll)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const choixEchecTotal = await ChatMessage.create({
|
const choixEchecTotal = await ChatMessage.create({
|
||||||
whisper: ChatUtility.getOwners(this.attacker),
|
whisper: ChatUtility.getOwners(this.attacker),
|
||||||
content: await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-demande-attaque-etotal.hbs', {
|
content: await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-demande-attaque-etotal.hbs', {
|
||||||
@ -976,16 +983,22 @@ export class RdDCombat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onAttaqueEchec(attackerRoll) {
|
async _onAttaqueEchec(rollData) {
|
||||||
console.log("RdDCombat.onAttaqueEchec >>>", attackerRoll);
|
if (!RdDCombat.isEchec(rollData)) {
|
||||||
await RdDRollResult.displayRollData(attackerRoll, this.attacker, 'chat-resultat-attaque.hbs');
|
return
|
||||||
|
}
|
||||||
|
console.log("RdDCombat.onAttaqueEchec >>>", rollData);
|
||||||
|
await RdDRollResult.displayRollData(rollData, this.attacker, 'chat-resultat-attaque.hbs');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async choixParticuliere(rollData, choix) {
|
async choixParticuliere(rollData, choix) {
|
||||||
console.log("RdDCombat.choixParticuliere >>>", rollData, choix);
|
console.log("RdDCombat.choixParticuliere >>>", rollData, choix);
|
||||||
|
|
||||||
await this.attacker.incDecItemUse(rollData.arme.id, choix != "rapidite")
|
if (choix != "rapidite") {
|
||||||
|
this.attacker.incDecItemUse(rollData.arme.id);
|
||||||
|
}
|
||||||
|
|
||||||
this.removeChatMessageActionsPasseArme(rollData.passeArme);
|
this.removeChatMessageActionsPasseArme(rollData.passeArme);
|
||||||
rollData.particuliere = choix;
|
rollData.particuliere = choix;
|
||||||
@ -1013,8 +1026,10 @@ export class RdDCombat {
|
|||||||
this.defender.createCallbackExperience(),
|
this.defender.createCallbackExperience(),
|
||||||
this.defender.createCallbackAppelAuMoral(),
|
this.defender.createCallbackAppelAuMoral(),
|
||||||
{ action: r => this.removeChatMessageActionsPasseArme(r.passeArme) },
|
{ action: r => this.removeChatMessageActionsPasseArme(r.passeArme) },
|
||||||
{ action: async r => await this.defender.incDecItemUse(armeParadeId, !RdDCombat.isParticuliere(r)) },
|
{ condition: r => !RdDCombat.isParticuliere(r), action: r => this.defender.incDecItemUse(armeParadeId) },
|
||||||
{ action: r => this._onParade(r) },
|
{ condition: RdDCombat.isReussite, action: r => this._onParadeNormale(r) },
|
||||||
|
{ condition: RdDCombat.isParticuliere, action: r => this._onParadeParticuliere(r) },
|
||||||
|
{ condition: RdDCombat.isEchec, action: r => this._onParadeEchec(r) },
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
dialog.render(true);
|
dialog.render(true);
|
||||||
@ -1045,19 +1060,8 @@ export class RdDCombat {
|
|||||||
return defenderRoll;
|
return defenderRoll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async _onParade(defenderRoll) {
|
|
||||||
if (RdDCombat.isParticuliere(defenderRoll)) {
|
|
||||||
return await this._onParadeParticuliere(defenderRoll)
|
|
||||||
}
|
|
||||||
if (RdDCombat.isReussite(defenderRoll)) {
|
|
||||||
return await this._onParadeNormale(defenderRoll)
|
|
||||||
}
|
|
||||||
await this._onParadeEchec(defenderRoll)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onParadeParticuliere(defenderRoll) {
|
_onParadeParticuliere(defenderRoll) {
|
||||||
console.log("RdDCombat._onParadeParticuliere >>>", defenderRoll);
|
console.log("RdDCombat._onParadeParticuliere >>>", defenderRoll);
|
||||||
if (!defenderRoll.attackerRoll.isPart) {
|
if (!defenderRoll.attackerRoll.isPart) {
|
||||||
// TODO: attaquant doit jouer résistance et peut être désarmé p132
|
// TODO: attaquant doit jouer résistance et peut être désarmé p132
|
||||||
@ -1066,6 +1070,7 @@ export class RdDCombat {
|
|||||||
this.defender)
|
this.defender)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onParadeNormale(defenderRoll) {
|
async _onParadeNormale(defenderRoll) {
|
||||||
console.log("RdDCombat._onParadeNormale >>>", defenderRoll);
|
console.log("RdDCombat._onParadeNormale >>>", defenderRoll);
|
||||||
@ -1104,9 +1109,11 @@ export class RdDCombat {
|
|||||||
callbacks: [
|
callbacks: [
|
||||||
this.defender.createCallbackExperience(),
|
this.defender.createCallbackExperience(),
|
||||||
this.defender.createCallbackAppelAuMoral(),
|
this.defender.createCallbackAppelAuMoral(),
|
||||||
{ action: async r => await this.defender.incDecItemUse(esquive._id, !RdDCombat.isParticuliere(r)) },
|
{ condition: r => !RdDCombat.isParticuliere(r), action: r => this.defender.incDecItemUse(esquive._id) },
|
||||||
{ action: r => this.removeChatMessageActionsPasseArme(r.passeArme) },
|
{ action: r => this.removeChatMessageActionsPasseArme(r.passeArme) },
|
||||||
{ action: r => this._onEsquive(r) },
|
{ condition: RdDCombat.isReussite, action: r => this._onEsquiveNormale(r) },
|
||||||
|
{ condition: RdDCombat.isParticuliere, action: r => this._onEsquiveParticuliere(r) },
|
||||||
|
{ condition: RdDCombat.isEchec, action: r => this._onEsquiveEchec(r) },
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
dialog.render(true);
|
dialog.render(true);
|
||||||
@ -1134,18 +1141,9 @@ export class RdDCombat {
|
|||||||
return rollData;
|
return rollData;
|
||||||
}
|
}
|
||||||
|
|
||||||
async _onEsquive(defenderRoll) {
|
|
||||||
if (RdDCombat.isParticuliere(defenderRoll)) {
|
|
||||||
return await this._onEsquiveParticuliere(defenderRoll)
|
|
||||||
}
|
|
||||||
if (RdDCombat.isReussite(defenderRoll)) {
|
|
||||||
return await this._onEsquiveNormale(defenderRoll)
|
|
||||||
}
|
|
||||||
return await this._onEsquiveEchec(defenderRoll)
|
|
||||||
}
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onEsquiveParticuliere(defenderRoll) {
|
_onEsquiveParticuliere(rollData) {
|
||||||
console.log("RdDCombat._onEsquiveParticuliere >>>", defenderRoll);
|
console.log("RdDCombat._onEsquiveParticuliere >>>", rollData);
|
||||||
ChatUtility.createChatWithRollMode(
|
ChatUtility.createChatWithRollMode(
|
||||||
{ content: "<strong>Vous pouvez esquiver une deuxième fois!</strong>" },
|
{ content: "<strong>Vous pouvez esquiver une deuxième fois!</strong>" },
|
||||||
this.defender);
|
this.defender);
|
||||||
|
@ -54,7 +54,7 @@ import { RdDItemSouffle } from "./item/souffle.js"
|
|||||||
|
|
||||||
import { RdDRencontre } from "./item/rencontre.js"
|
import { RdDRencontre } from "./item/rencontre.js"
|
||||||
|
|
||||||
import { RdDItemSheet } from "./item-sheet.js"
|
import { RdDItemSheetV1 } from "./item-sheet.js"
|
||||||
import { RdDBlessureItemSheet } from "./item/sheet-blessure.js"
|
import { RdDBlessureItemSheet } from "./item/sheet-blessure.js"
|
||||||
import { RdDServiceItemSheet } from "./item/sheet-service.js"
|
import { RdDServiceItemSheet } from "./item/sheet-service.js"
|
||||||
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js"
|
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js"
|
||||||
@ -80,6 +80,10 @@ import { RdDItemPotion } from "./item/potion.js"
|
|||||||
import { RdDItemGemme } from "./item/gemme.js"
|
import { RdDItemGemme } from "./item/gemme.js"
|
||||||
import { RdDGemmeItemSheet } from "./item/sheet-gemme.js"
|
import { RdDGemmeItemSheet } from "./item/sheet-gemme.js"
|
||||||
|
|
||||||
|
import * as models from "./models/_module.mjs"
|
||||||
|
import * as items from "./documents/_module.mjs"
|
||||||
|
import * as sheets from "./applications/sheets/_module.mjs"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RdD system
|
* RdD system
|
||||||
* Author: LeRatierBretonnien
|
* Author: LeRatierBretonnien
|
||||||
@ -100,6 +104,8 @@ export class SystemReveDeDragon {
|
|||||||
this.RdDHotbar = RdDHotbar
|
this.RdDHotbar = RdDHotbar
|
||||||
this.RdDStatBlockParser = RdDStatBlockParser
|
this.RdDStatBlockParser = RdDStatBlockParser
|
||||||
this.itemClasses = {
|
this.itemClasses = {
|
||||||
|
monnaie: items.RdDModelMonnaie,
|
||||||
|
munition: items.RdDModelMunition,
|
||||||
armure: RdDItemArmure,
|
armure: RdDItemArmure,
|
||||||
blessure: RdDItemBlessure,
|
blessure: RdDItemBlessure,
|
||||||
gemme: RdDItemGemme,
|
gemme: RdDItemGemme,
|
||||||
@ -129,6 +135,9 @@ export class SystemReveDeDragon {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
onInit() {
|
onInit() {
|
||||||
game.system.rdd = this
|
game.system.rdd = this
|
||||||
|
|
||||||
|
globalThis.RdD = game.system
|
||||||
|
|
||||||
this.AppAstrologie = AppAstrologie
|
this.AppAstrologie = AppAstrologie
|
||||||
|
|
||||||
console.log(`Initializing Reve de Dragon System Settings`)
|
console.log(`Initializing Reve de Dragon System Settings`)
|
||||||
@ -175,6 +184,10 @@ export class SystemReveDeDragon {
|
|||||||
console.log(`Initializing Reve de Dragon Documents`)
|
console.log(`Initializing Reve de Dragon Documents`)
|
||||||
CONFIG.Actor.documentClass = RdDBaseActor
|
CONFIG.Actor.documentClass = RdDBaseActor
|
||||||
CONFIG.Item.documentClass = RdDItem
|
CONFIG.Item.documentClass = RdDItem
|
||||||
|
CONFIG.Item.dataModels = {
|
||||||
|
monnaie: models.RdDModelMonnaie,
|
||||||
|
munition: models.RdDModelMunition,
|
||||||
|
}
|
||||||
CONFIG.RDD = {
|
CONFIG.RDD = {
|
||||||
resolutionTable: RdDResolutionTable.resolutionTable,
|
resolutionTable: RdDResolutionTable.resolutionTable,
|
||||||
carac_array: RdDUtility.getCaracArray(),
|
carac_array: RdDUtility.getCaracArray(),
|
||||||
@ -195,12 +208,17 @@ export class SystemReveDeDragon {
|
|||||||
|
|
||||||
Items.registerSheet(SYSTEM_RDD, RdDItemInventaireSheet, {
|
Items.registerSheet(SYSTEM_RDD, RdDItemInventaireSheet, {
|
||||||
types: [
|
types: [
|
||||||
"objet", "arme", "armure", "livre", "munition",
|
"objet", "arme", "armure", "livre", "nourritureboisson",
|
||||||
"monnaie", "nourritureboisson",
|
|
||||||
],
|
],
|
||||||
makeDefault: true
|
makeDefault: true
|
||||||
})
|
})
|
||||||
Items.registerSheet(SYSTEM_RDD, RdDItemSheet, {
|
|
||||||
|
sheets.RdDItemBaseSheet.registerAll(
|
||||||
|
sheets.RdDMonnaieSheet,
|
||||||
|
sheets.RdDMunitionSheet
|
||||||
|
)
|
||||||
|
|
||||||
|
Items.registerSheet(SYSTEM_RDD, RdDItemSheetV1, {
|
||||||
types: [
|
types: [
|
||||||
"competence", "competencecreature",
|
"competence", "competencecreature",
|
||||||
"recettealchimique", "musique", "chant", "danse", "jeu", "race",
|
"recettealchimique", "musique", "chant", "danse", "jeu", "race",
|
||||||
@ -211,18 +229,18 @@ export class SystemReveDeDragon {
|
|||||||
],
|
],
|
||||||
makeDefault: true
|
makeDefault: true
|
||||||
})
|
})
|
||||||
|
|
||||||
RdDItemSheet.register(RdDBlessureItemSheet)
|
RdDItemSheetV1.register(RdDBlessureItemSheet)
|
||||||
RdDItemSheet.register(RdDConteneurItemSheet)
|
RdDItemSheetV1.register(RdDConteneurItemSheet)
|
||||||
RdDItemSheet.register(RdDFauneItemSheet)
|
RdDItemSheetV1.register(RdDFauneItemSheet)
|
||||||
RdDItemSheet.register(RdDGemmeItemSheet)
|
RdDItemSheetV1.register(RdDGemmeItemSheet)
|
||||||
RdDItemSheet.register(RdDHerbeItemSheet)
|
RdDItemSheetV1.register(RdDHerbeItemSheet)
|
||||||
RdDItemSheet.register(RdDIngredientItemSheet)
|
RdDItemSheetV1.register(RdDIngredientItemSheet)
|
||||||
RdDItemSheet.register(RdDPlanteItemSheet)
|
RdDItemSheetV1.register(RdDPlanteItemSheet)
|
||||||
RdDItemSheet.register(RdDPotionItemSheet)
|
RdDItemSheetV1.register(RdDPotionItemSheet)
|
||||||
RdDItemSheet.register(RdDRencontreItemSheet)
|
RdDItemSheetV1.register(RdDRencontreItemSheet)
|
||||||
RdDItemSheet.register(RdDServiceItemSheet)
|
RdDItemSheetV1.register(RdDServiceItemSheet)
|
||||||
RdDItemSheet.register(RdDSigneDraconiqueItemSheet)
|
RdDItemSheetV1.register(RdDSigneDraconiqueItemSheet)
|
||||||
RdDJournalSheet.register()
|
RdDJournalSheet.register()
|
||||||
|
|
||||||
// préparation des différents modules
|
// préparation des différents modules
|
||||||
|
@ -104,8 +104,8 @@ export class RdDPossession {
|
|||||||
rollData.selectedCarac = carac.reve
|
rollData.selectedCarac = carac.reve
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
rollData.selectedCarac = rollingActor.system.carac.reve
|
||||||
rollData.forceCarac = { 'reve-actuel': { label: "Rêve Actuel", value: rollingActor.getReveActuel() } }
|
rollData.forceCarac = { 'reve-actuel': { label: "Rêve Actuel", value: rollingActor.getReveActuel() } }
|
||||||
rollData.selectedCarac = rollData.forceCarac['reve-actuel']
|
|
||||||
rollData.competence.system.defaut_carac = 'reve-actuel'
|
rollData.competence.system.defaut_carac = 'reve-actuel'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { ChatUtility } from "./chat-utility.js";
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
import { RdDDice } from "./rdd-dice.js";
|
import { RdDDice } from "./rdd-dice.js";
|
||||||
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
||||||
|
@ -279,7 +279,7 @@ export class RdDRoll extends Dialog {
|
|||||||
|
|
||||||
async setSelectedSort(sort) {
|
async setSelectedSort(sort) {
|
||||||
this.rollData.selectedSort = sort; // Update the selectedCarac
|
this.rollData.selectedSort = sort; // Update the selectedCarac
|
||||||
this.rollData.competence = RdDItemSort.getBestDraconicSort(this.rollData.draconicList, sort)
|
this.rollData.competence = RdDItemCompetence.getVoieDraconic(this.rollData.draconicList, sort.system.draconic);
|
||||||
this.rollData.bonus = RdDItemSort.getCaseBonus(sort, this.rollData.tmr.coord);
|
this.rollData.bonus = RdDItemSort.getCaseBonus(sort, this.rollData.tmr.coord);
|
||||||
this.rollData.diffLibre = RdDItemSort.getDifficulte(sort, -7);
|
this.rollData.diffLibre = RdDItemSort.getDifficulte(sort, -7);
|
||||||
RdDItemSort.setCoutReveReel(sort);
|
RdDItemSort.setCoutReveReel(sort);
|
||||||
|
@ -3,11 +3,11 @@ import { RdDItem } from "./item.js";
|
|||||||
|
|
||||||
export class RdDSheetUtility {
|
export class RdDSheetUtility {
|
||||||
|
|
||||||
static mergeDocumentRights(options, document, editable) {
|
static getOptions(document, editable) {
|
||||||
const userRightLevel = game.user.isGM
|
const userRightLevel = game.user.isGM
|
||||||
? CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
? CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
||||||
: document.getUserLevel(game.user);
|
: document.getUserLevel(game.user);
|
||||||
let newOptions = {
|
return {
|
||||||
isGM: game.user.isGM,
|
isGM: game.user.isGM,
|
||||||
isOwned: document.parent ? true : false,
|
isOwned: document.parent ? true : false,
|
||||||
editable: editable,
|
editable: editable,
|
||||||
@ -16,10 +16,15 @@ export class RdDSheetUtility {
|
|||||||
isObserver: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER,
|
isObserver: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER,
|
||||||
isOwner: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
isOwner: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static mergeDocumentRights(options, document, editable) {
|
||||||
|
const newOptions = RdDSheetUtility.getOptions(document, editable);
|
||||||
foundry.utils.mergeObject(options, newOptions);
|
foundry.utils.mergeObject(options, newOptions);
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static getItem(event, actor) {
|
static getItem(event, actor) {
|
||||||
return actor.items.get(RdDSheetUtility.getItemId(event))
|
return actor.items.get(RdDSheetUtility.getItemId(event))
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@ import { Draconique } from "./draconique.js";
|
|||||||
import { PixiTMR } from "./pixi-tmr.js";
|
import { PixiTMR } from "./pixi-tmr.js";
|
||||||
|
|
||||||
const IMAGE_CARTE_TMR = 'image-carte-tmr';
|
const IMAGE_CARTE_TMR = 'image-carte-tmr';
|
||||||
const TMR_V1 = "systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr-v1.webp";
|
const TMR_V1 = "systems/foundryvtt-reve-de-dragon/assets/ui/tmr-v1.webp";
|
||||||
const TMR_V2 = "systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr-v2.webp";
|
const TMR_V2 = "systems/foundryvtt-reve-de-dragon/assets/ui/tmr-v2.webp";
|
||||||
const TMR_V3_COULEUR = "systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr-v3-couleur.webp";
|
const TMR_V3_COULEUR = "systems/foundryvtt-reve-de-dragon/assets/ui/tmr-v3-couleur.webp";
|
||||||
|
|
||||||
export class CarteTmr extends Draconique {
|
export class CarteTmr extends Draconique {
|
||||||
|
|
||||||
|
25
package.json
@ -1,15 +1,36 @@
|
|||||||
{
|
{
|
||||||
|
"name": "foundryvtt-reve-de-dragon",
|
||||||
|
"description": "<h2><em>Rêve de Dragon</em> pour Foundry Virtual TableTop</h2>",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"license": "Creative Commons",
|
||||||
|
"main": "gulpfile.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npx vite build",
|
"build": "npx vite build",
|
||||||
"run": "npx vite serve",
|
"gulp": "gulp",
|
||||||
"packCompendiumsToDist": "node ./tools/packCompendiumsToDist.mjs",
|
"packCompendiumsToDist": "node ./tools/packCompendiumsToDist.mjs",
|
||||||
"packCompendiumsToPublic": "node ./tools/packCompendiumsToPublic.mjs",
|
"packCompendiumsToPublic": "node ./tools/packCompendiumsToPublic.mjs",
|
||||||
"unpackCompendiumsFromPublic": "node ./tools/unpackCompendiumsFromPublic.mjs"
|
"unpackCompendiumsFromPublic": "node ./tools/unpackCompendiumsFromPublic.mjs"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@foundryvtt/foundryvtt-cli": "^1.0.3"
|
"@eslint/js": "^9.8.0",
|
||||||
|
"@foundryvtt/foundryvtt-cli": "^1.0.3",
|
||||||
|
"commander": "^11.1.0",
|
||||||
|
"eslint": "^9.9.0",
|
||||||
|
"eslint-config-prettier": "^9.1.0",
|
||||||
|
"eslint-plugin-jsdoc": "^48.11.0",
|
||||||
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
|
"globals": "^15.9.0",
|
||||||
|
"less": "^4.1.3",
|
||||||
|
"prettier": "^3.3.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"gulp": "^5.0.0",
|
||||||
|
"gulp-less": "^5.0.0",
|
||||||
"rollup-plugin-visualizer": "^5.12.0"
|
"rollup-plugin-visualizer": "^5.12.0"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ name: Terres médianes du rêve
|
|||||||
type: script
|
type: script
|
||||||
scope: global
|
scope: global
|
||||||
author: Hp9ImM4o9YRTSdfu
|
author: Hp9ImM4o9YRTSdfu
|
||||||
img: systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg
|
img: systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-normal.svg
|
||||||
command: |-
|
command: |-
|
||||||
const selected = game.system.rdd.RdDUtility.getSelectedActor();
|
const selected = game.system.rdd.RdDUtility.getSelectedActor();
|
||||||
if (!selected) {
|
if (!selected) {
|
||||||
@ -18,8 +18,8 @@ command: |-
|
|||||||
title: `Monter dans les TMR`,
|
title: `Monter dans les TMR`,
|
||||||
content: `Monter dans les TMR`,
|
content: `Monter dans les TMR`,
|
||||||
buttons: {
|
buttons: {
|
||||||
normale: { label: `normale`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg" alt="Montée dans les Terres Médianes !"/>`, callback: () => selected.displayTMR("normal") },
|
normale: { label: `normale`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-normal.svg" alt="Montée dans les Terres Médianes !"/>`, callback: () => selected.displayTMR("normal") },
|
||||||
rapide: { label: `rapide`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres Médianes !"/>`, callback: () => selected.displayTMR("rapide") },
|
rapide: { label: `rapide`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres Médianes !"/>`, callback: () => selected.displayTMR("rapide") },
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|