Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4fc06a449c | |||
| 929d6af173 | |||
| e15ed9d05d | |||
| 3699bc19b8 | |||
| 15510b99d8 | |||
| fa30705989 | |||
| 04f550dd21 | |||
| 850cae3979 | |||
| 7b514d5159 | |||
| d78ede4f59 | |||
| 3de00fd001 | |||
| 1b340e526c | |||
| 3f3bf293b1 | |||
| 80b4cde130 | |||
| 74fecac47e | |||
| f1ee8fb45b | |||
| 52a5084419 | |||
| 8fdf49bfce | |||
| f897a94e60 | |||
| e6aed2d554 | |||
| 0dd671d8a5 | |||
| a5c4303012 | |||
| ad84e36d43 | |||
| af9ecda30f | |||
| 7b1374dd2c | |||
| 3b4ed13247 | |||
| ecb653c40c |
1
assets/actions/ouvrir.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" style="height: 256px; width: 256px;"><defs><radialGradient id="skoll-open-chest-gradient-2"><stop offset="0%" stop-color="#b8e986" stop-opacity="1"></stop><stop offset="100%" stop-color="#ffe0af" stop-opacity="1"></stop></radialGradient><linearGradient x1="0" x2="0" y1="0" y2="1" id="skoll-open-chest-gradient-5"><stop offset="0%" stop-color="#417505" stop-opacity="1"></stop><stop offset="100%" stop-color="#8b572a" stop-opacity="1"></stop></linearGradient></defs><g class="" transform="translate(1,0)" style=""><path d="M457.03 213.037 416.514 100.24C425 77.232 433.27 68.075 437.527 64.633c3.162-2.563 5.922-3.534 8.185-2.904 4.134 1.168 8.775 7.7 12.278 17.456 11.266 31.347 10.377 87.094-.96 133.85zm-324.287-17.9 312.804 34.84-43.82-122.1L145.558 79.34c2.593 36.102-1.913 79.913-12.817 115.796zM128.98 77.5l-45.06-5.02 37.03 103.123c7.773-32.06 10.625-68.357 8.03-98.102zm-27.52-50.31c-3.793 3.1-10.77 10.666-18.25 28.566L402.23 91.3c5.333-13.695 11.37-24.702 17.88-32.495L108.796 24.13c-2.573-.29-5.415 1.51-7.338 3.06zm280.63 283.338.61 169.352 66.352-53.63-.61-169.35zM366.163 487.9 46.62 452.306 46 278.396l319.553 35.594zM216.726 337.648a9.777 9.777 0 0 0 5.168-9.405c-.248-6.367-5.364-12.092-11.43-12.857h-.125c-6.14-.693-10.904 3.927-10.646 10.335a13.973 13.973 0 0 0 5.767 10.543l-2.17 25.073 17.57 2.005zm219.28-91.983-307.46-34.25v59.54l242.712 27.037zM58.31 263.13l54.34 6.058v-49.98z" fill="#fff" fill-opacity="1" transform="translate(25.6, 25.6) scale(0.9, 0.9) rotate(0, 256, 256) skewX(0) skewY(0)"></path></g></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
35
changelog.md
@@ -1,5 +1,40 @@
|
||||
# 13.0
|
||||
|
||||
## 13.0.30 - Le pansement d'Illysis
|
||||
|
||||
- les soins d'un joueur à l'autre fonctionne de nouveau
|
||||
- la fenêtre de jet de compétence s'ouvre avec la caractéristique et la difficulté par défaut
|
||||
- on peut saisir des valeurs négatives au clavier en sélectionnant les conditions/difficultés
|
||||
|
||||
## 13.0.29 - Le tricorne d'Illysis
|
||||
|
||||
- gestion des attaques avec jets V2 depuis l'onglet de combat
|
||||
- les jets de résistance en mode V2 fonctionnent sans sélection de compétence
|
||||
- affichage de l'expérience correspondant aux sorts pour aider à la création
|
||||
- affichage de l'équivallent d'expérience des caractéristiques
|
||||
|
||||
## 13.0.28 - La quadrature d'Illysis
|
||||
|
||||
- Les ajustements de portée sont calculés pour les attaques à distance
|
||||
- L'appel au moral dans le tchat ne déplace plus les boutons d'appel à la chance
|
||||
- Correction d'apparence V13
|
||||
- la fenêtre de choix des status utilisés est affichée correctement
|
||||
- la fenêtre d'astrologie MJ est affichée correctement
|
||||
|
||||
## 13.0.27 - Les lunettes d'Illysis
|
||||
|
||||
- Les heures ne sont plus affichées en doublon sur les messages
|
||||
- Les conteneurs ouverts sont mis à jour si leur contenu change
|
||||
- Le style des icones d'objets est homogénéisé
|
||||
- Ajout d'icônes: coffre, tissu de soie, parchemin
|
||||
- Amélioration des choix d'actions de combat
|
||||
- le choix d'initiative limite les attaques disponibles
|
||||
- les compétences sont triées dans l'ordre décroissant
|
||||
|
||||
## 13.0.26 - La ménagerie d'Illysis
|
||||
|
||||
- Correction: on peut de nouveau modifier les caractéristiques des créatures
|
||||
|
||||
## 13.0.24 - Le grand oubli d'Illysis
|
||||
|
||||
- ajout d'un bouton pour supprimer les anciens messages du tchat
|
||||
|
||||
@@ -893,7 +893,7 @@ body {
|
||||
max-width: 1.4rem;
|
||||
max-height: 1.4rem;
|
||||
border: 1px;
|
||||
background: center / contain no-repeat url("../../icons/templates/icone_parchement_vierge.webp");
|
||||
background: center / contain no-repeat url("../icons/templates/icone_parchement_vierge.webp");
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .sheet-header .header-compteurs {
|
||||
width: calc(60% - 110px - 1rem);
|
||||
@@ -1210,6 +1210,10 @@ body {
|
||||
color: rgba(173, 36, 26, 0.9);
|
||||
text-shadow: 1px 1px 4px #3c3c3c;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-dialog.status-effects li {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-dialog-select img.select-img {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 48px;
|
||||
@@ -1734,25 +1738,121 @@ body {
|
||||
.system-foundryvtt-reve-de-dragon form.app-personnage-aleatoire h2 {
|
||||
min-width: 30rem;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .app-calendar-astrologie div.theme-astral {
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.theme-astral {
|
||||
width: 14rem;
|
||||
margin: 0.4rem;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .app-calendar-astrologie div.horloge-roue {
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-roue {
|
||||
position: relative;
|
||||
left: calc(50% - 6.5rem);
|
||||
width: 13rem;
|
||||
height: 13rem;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .app-calendar-astrologie div.horloge-roue div.horloge-heure {
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-roue div.horloge-heure {
|
||||
position: absolute;
|
||||
width: 1.8rem;
|
||||
height: 1.8rem;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .app-calendar-astrologie div.horloge-roue div.horloge-heure img.horloge-heure-img {
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-roue div.horloge-heure img.horloge-heure-img {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-01 {
|
||||
top: calc(50% - 1rem + 0 * 41%);
|
||||
left: calc(50% - 1rem + -1 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-02 {
|
||||
top: calc(50% - 1rem + -0.5 * 41%);
|
||||
left: calc(50% - 1rem + -0.8660254 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-03 {
|
||||
top: calc(50% - 1rem + -0.8660254 * 41%);
|
||||
left: calc(50% - 1rem + -0.5 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-04 {
|
||||
top: calc(50% - 1rem + -1 * 41%);
|
||||
left: calc(50% - 1rem + 0 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-05 {
|
||||
top: calc(50% - 1rem + -0.8660254 * 41%);
|
||||
left: calc(50% - 1rem + 0.5 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-06 {
|
||||
top: calc(50% - 1rem + -0.5 * 41%);
|
||||
left: calc(50% - 1rem + 0.8660254 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-07 {
|
||||
top: calc(50% - 1rem + 0 * 41%);
|
||||
left: calc(50% - 1rem + 1 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-08 {
|
||||
top: calc(50% - 1rem + 0.5 * 41%);
|
||||
left: calc(50% - 1rem + 0.8660254 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-09 {
|
||||
top: calc(50% - 1rem + 0.8660254 * 41%);
|
||||
left: calc(50% - 1rem + 0.5 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-10 {
|
||||
top: calc(50% - 1rem + 1 * 41%);
|
||||
left: calc(50% - 1rem + 0 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-11 {
|
||||
top: calc(50% - 1rem + 0.8660254 * 41%);
|
||||
left: calc(50% - 1rem + -0.5 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-heure.heure-12 {
|
||||
top: calc(50% - 1rem + 0.5 * 41%);
|
||||
left: calc(50% - 1rem + -0.8660254 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-01 {
|
||||
top: calc(50% - 0.4rem + 0 * 28%);
|
||||
left: calc(50% - 0.4rem + -1 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-02 {
|
||||
top: calc(50% - 0.4rem + -0.5 * 28%);
|
||||
left: calc(50% - 0.4rem + -0.8660254 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-03 {
|
||||
top: calc(50% - 0.4rem + -0.8660254 * 28%);
|
||||
left: calc(50% - 0.4rem + -0.5 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-04 {
|
||||
top: calc(50% - 0.4rem + -1 * 28%);
|
||||
left: calc(50% - 0.4rem + 0 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-05 {
|
||||
top: calc(50% - 0.4rem + -0.8660254 * 28%);
|
||||
left: calc(50% - 0.4rem + 0.5 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-06 {
|
||||
top: calc(50% - 0.4rem + -0.5 * 28%);
|
||||
left: calc(50% - 0.4rem + 0.8660254 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-07 {
|
||||
top: calc(50% - 0.4rem + 0 * 28%);
|
||||
left: calc(50% - 0.4rem + 1 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-08 {
|
||||
top: calc(50% - 0.4rem + 0.5 * 28%);
|
||||
left: calc(50% - 0.4rem + 0.8660254 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-09 {
|
||||
top: calc(50% - 0.4rem + 0.8660254 * 28%);
|
||||
left: calc(50% - 0.4rem + 0.5 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-10 {
|
||||
top: calc(50% - 0.4rem + 1 * 28%);
|
||||
left: calc(50% - 0.4rem + 0 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-11 {
|
||||
top: calc(50% - 0.4rem + 0.8660254 * 28%);
|
||||
left: calc(50% - 0.4rem + -0.5 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .rdd-calendar-astrologie div.horloge-ajustement.heure-12 {
|
||||
top: calc(50% - 0.4rem + 0.5 * 28%);
|
||||
left: calc(50% - 0.4rem + -0.8660254 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .window-app .window-content,
|
||||
.system-foundryvtt-reve-de-dragon .window-app.sheet .window-content .sheet-body,
|
||||
.system-foundryvtt-reve-de-dragon .application .window-content {
|
||||
@@ -2597,102 +2697,6 @@ body {
|
||||
top: calc(50% - 0.7rem + 0.5 * 38%);
|
||||
left: calc(50% - 0.7rem + -0.8660254 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-01 {
|
||||
top: calc(50% - 1rem + 0 * 41%);
|
||||
left: calc(50% - 1rem + -1 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-02 {
|
||||
top: calc(50% - 1rem + -0.5 * 41%);
|
||||
left: calc(50% - 1rem + -0.8660254 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-03 {
|
||||
top: calc(50% - 1rem + -0.8660254 * 41%);
|
||||
left: calc(50% - 1rem + -0.5 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-04 {
|
||||
top: calc(50% - 1rem + -1 * 41%);
|
||||
left: calc(50% - 1rem + 0 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-05 {
|
||||
top: calc(50% - 1rem + -0.8660254 * 41%);
|
||||
left: calc(50% - 1rem + 0.5 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-06 {
|
||||
top: calc(50% - 1rem + -0.5 * 41%);
|
||||
left: calc(50% - 1rem + 0.8660254 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-07 {
|
||||
top: calc(50% - 1rem + 0 * 41%);
|
||||
left: calc(50% - 1rem + 1 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-08 {
|
||||
top: calc(50% - 1rem + 0.5 * 41%);
|
||||
left: calc(50% - 1rem + 0.8660254 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-09 {
|
||||
top: calc(50% - 1rem + 0.8660254 * 41%);
|
||||
left: calc(50% - 1rem + 0.5 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-10 {
|
||||
top: calc(50% - 1rem + 1 * 41%);
|
||||
left: calc(50% - 1rem + 0 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-11 {
|
||||
top: calc(50% - 1rem + 0.8660254 * 41%);
|
||||
left: calc(50% - 1rem + -0.5 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-heure.heure-12 {
|
||||
top: calc(50% - 1rem + 0.5 * 41%);
|
||||
left: calc(50% - 1rem + -0.8660254 * 41%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-01 {
|
||||
top: calc(50% - 0.4rem + 0 * 28%);
|
||||
left: calc(50% - 0.4rem + -1 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-02 {
|
||||
top: calc(50% - 0.4rem + -0.5 * 28%);
|
||||
left: calc(50% - 0.4rem + -0.8660254 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-03 {
|
||||
top: calc(50% - 0.4rem + -0.8660254 * 28%);
|
||||
left: calc(50% - 0.4rem + -0.5 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-04 {
|
||||
top: calc(50% - 0.4rem + -1 * 28%);
|
||||
left: calc(50% - 0.4rem + 0 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-05 {
|
||||
top: calc(50% - 0.4rem + -0.8660254 * 28%);
|
||||
left: calc(50% - 0.4rem + 0.5 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-06 {
|
||||
top: calc(50% - 0.4rem + -0.5 * 28%);
|
||||
left: calc(50% - 0.4rem + 0.8660254 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-07 {
|
||||
top: calc(50% - 0.4rem + 0 * 28%);
|
||||
left: calc(50% - 0.4rem + 1 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-08 {
|
||||
top: calc(50% - 0.4rem + 0.5 * 28%);
|
||||
left: calc(50% - 0.4rem + 0.8660254 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-09 {
|
||||
top: calc(50% - 0.4rem + 0.8660254 * 28%);
|
||||
left: calc(50% - 0.4rem + 0.5 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-10 {
|
||||
top: calc(50% - 0.4rem + 1 * 28%);
|
||||
left: calc(50% - 0.4rem + 0 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-11 {
|
||||
top: calc(50% - 0.4rem + 0.8660254 * 28%);
|
||||
left: calc(50% - 0.4rem + -0.5 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-astrologie div.horloge-ajustement.heure-12 {
|
||||
top: calc(50% - 0.4rem + 0.5 * 28%);
|
||||
left: calc(50% - 0.4rem + -0.8660254 * 28%);
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .calendar-boutons-heure .calendar-btn:is(.calendar-lyre, .calendar-vaisseau) img {
|
||||
color: hsla(0, 0%, 100%, 0.5);
|
||||
border: none;
|
||||
|
||||
BIN
icons/competence-commerce.webp
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 5.9 KiB |
BIN
icons/objets/coffre.webp
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 6.4 KiB |
BIN
icons/objets/parchemin.webp
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 7.5 KiB |
BIN
icons/objets/tissu_soie.webp
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
@@ -136,7 +136,7 @@
|
||||
max-height: 1.4rem;
|
||||
border: 1px;
|
||||
background: center / contain no-repeat
|
||||
url("../../icons/templates/icone_parchement_vierge.webp");
|
||||
url("../icons/templates/icone_parchement_vierge.webp");
|
||||
}
|
||||
|
||||
.sheet-header .header-compteurs {
|
||||
@@ -484,7 +484,10 @@
|
||||
color: rgba(173, 36, 26, 0.9);
|
||||
text-shadow: 1px 1px 4px rgba(60, 60, 60, 1);
|
||||
}
|
||||
|
||||
.rdd-dialog.status-effects li {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.rdd-dialog-select img.select-img {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 48px;
|
||||
@@ -1065,7 +1068,7 @@
|
||||
min-width: 30rem;
|
||||
}
|
||||
}
|
||||
.app-calendar-astrologie {
|
||||
.rdd-calendar-astrologie {
|
||||
div.theme-astral {
|
||||
width: 14rem;
|
||||
margin: 0.4rem;
|
||||
@@ -1085,6 +1088,105 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.horloge-heure.heure-01 {
|
||||
top: calc(50% - 1rem + sin(-180deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-180deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-02 {
|
||||
top: calc(50% - 1rem + sin(-150deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-150deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-03 {
|
||||
top: calc(50% - 1rem + sin(-120deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-120deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-04 {
|
||||
top: calc(50% - 1rem + sin(-90deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-90deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-05 {
|
||||
top: calc(50% - 1rem + sin(-60deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-60deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-06 {
|
||||
top: calc(50% - 1rem + sin(-30deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-30deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-07 {
|
||||
top: calc(50% - 1rem + sin(-0deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-0deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-08 {
|
||||
top: calc(50% - 1rem + sin(30deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(30deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-09 {
|
||||
top: calc(50% - 1rem + sin(60deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(60deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-10 {
|
||||
top: calc(50% - 1rem + sin(90deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(90deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-11 {
|
||||
top: calc(50% - 1rem + sin(120deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(120deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-12 {
|
||||
top: calc(50% - 1rem + sin(150deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(150deg) * 41%);
|
||||
}
|
||||
|
||||
div.horloge-ajustement.heure-01 {
|
||||
top: calc(50% - 0.4rem + sin(180deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(180deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-02 {
|
||||
top: calc(50% - 0.4rem + sin(-150deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-150deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-03 {
|
||||
top: calc(50% - 0.4rem + sin(-120deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-120deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-04 {
|
||||
top: calc(50% - 0.4rem + sin(-90deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-90deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-05 {
|
||||
top: calc(50% - 0.4rem + sin(-60deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-60deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-06 {
|
||||
top: calc(50% - 0.4rem + sin(-30deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-30deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-07 {
|
||||
top: calc(50% - 0.4rem + sin(0deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(0deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-08 {
|
||||
top: calc(50% - 0.4rem + sin(30deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(30deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-09 {
|
||||
top: calc(50% - 0.4rem + sin(60deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(60deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-10 {
|
||||
top: calc(50% - 0.4rem + sin(90deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(90deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-11 {
|
||||
top: calc(50% - 0.4rem + sin(120deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(120deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-12 {
|
||||
top: calc(50% - 0.4rem + sin(150deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(150deg) * 28%);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.window-app .window-content,
|
||||
@@ -2022,106 +2124,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.calendar-astrologie {
|
||||
div.horloge-heure.heure-01 {
|
||||
top: calc(50% - 1rem + sin(-180deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-180deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-02 {
|
||||
top: calc(50% - 1rem + sin(-150deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-150deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-03 {
|
||||
top: calc(50% - 1rem + sin(-120deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-120deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-04 {
|
||||
top: calc(50% - 1rem + sin(-90deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-90deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-05 {
|
||||
top: calc(50% - 1rem + sin(-60deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-60deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-06 {
|
||||
top: calc(50% - 1rem + sin(-30deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-30deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-07 {
|
||||
top: calc(50% - 1rem + sin(-0deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(-0deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-08 {
|
||||
top: calc(50% - 1rem + sin(30deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(30deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-09 {
|
||||
top: calc(50% - 1rem + sin(60deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(60deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-10 {
|
||||
top: calc(50% - 1rem + sin(90deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(90deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-11 {
|
||||
top: calc(50% - 1rem + sin(120deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(120deg) * 41%);
|
||||
}
|
||||
div.horloge-heure.heure-12 {
|
||||
top: calc(50% - 1rem + sin(150deg) * 41%);
|
||||
left: calc(50% - 1rem + cos(150deg) * 41%);
|
||||
}
|
||||
|
||||
div.horloge-ajustement.heure-01 {
|
||||
top: calc(50% - 0.4rem + sin(180deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(180deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-02 {
|
||||
top: calc(50% - 0.4rem + sin(-150deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-150deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-03 {
|
||||
top: calc(50% - 0.4rem + sin(-120deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-120deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-04 {
|
||||
top: calc(50% - 0.4rem + sin(-90deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-90deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-05 {
|
||||
top: calc(50% - 0.4rem + sin(-60deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-60deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-06 {
|
||||
top: calc(50% - 0.4rem + sin(-30deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(-30deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-07 {
|
||||
top: calc(50% - 0.4rem + sin(0deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(0deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-08 {
|
||||
top: calc(50% - 0.4rem + sin(30deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(30deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-09 {
|
||||
top: calc(50% - 0.4rem + sin(60deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(60deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-10 {
|
||||
top: calc(50% - 0.4rem + sin(90deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(90deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-11 {
|
||||
top: calc(50% - 0.4rem + sin(120deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(120deg) * 28%);
|
||||
}
|
||||
div.horloge-ajustement.heure-12 {
|
||||
top: calc(50% - 0.4rem + sin(150deg) * 28%);
|
||||
left: calc(50% - 0.4rem + cos(150deg) * 28%);
|
||||
}
|
||||
}
|
||||
|
||||
.calendar-boutons-heure {
|
||||
.calendar-btn:is(.calendar-lyre, .calendar-vaisseau) img {
|
||||
color: hsla(0, 0%, 100%, 0.5);
|
||||
|
||||
@@ -19,6 +19,7 @@ import { RdDCoeur } from "./coeur/rdd-coeur.js";
|
||||
import { AppPersonnageAleatoire } from "./actor/random/app-personnage-aleatoire.js";
|
||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
import { MORAL } from "./moral/apprecier.mjs";
|
||||
import { RdDItemSort } from "./item-sort.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
@@ -52,6 +53,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
||||
surprise: RdDBonus.find(this.actor.getSurprise(false)).label,
|
||||
resumeBlessures: this.actor.computeResumeBlessure(this.actor.system.blessures),
|
||||
caracTotal: RdDCarac.computeTotal(this.actor.system.carac, this.actor.system.beaute),
|
||||
caracTotalXp: RdDCarac.computeTotalXp(this.actor.system.carac, this.actor.system.beaute),
|
||||
surEncombrementMessage: this.actor.isSurenc() ? "Sur-Encombrement!" : "",
|
||||
malusArmure: this.actor.getMalusArmure()
|
||||
})
|
||||
@@ -61,9 +63,13 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
||||
if (formData.type == ACTOR_TYPES.personnage) {
|
||||
formData.options.mainsDirectrices = MAINS_DIRECTRICES;
|
||||
formData.byCateg = Misc.classify(formData.competences, it => it.system.categorie)
|
||||
formData.calc.comptageArchetype = RdDItemCompetence.computeResumeArchetype(formData.competences);
|
||||
formData.calc.competenceXPTotal = RdDItemCompetence.computeTotalXP(formData.competences);
|
||||
formData.calc.fatigue = RdDUtility.calculFatigueHtml(formData.system.sante.fatigue.value, formData.system.sante.endurance.max);
|
||||
foundry.utils.mergeObject(formData.calc, {
|
||||
comptageArchetype: RdDItemCompetence.computeResumeArchetype(formData.competences),
|
||||
competenceXPTotal: RdDItemCompetence.computeTotalXP(formData.competences),
|
||||
sortsXPTotal: RdDItemSort.computeTotalXP(this.actor.itemTypes[ITEM_TYPES.sort]),
|
||||
fatigue: RdDUtility.calculFatigueHtml(formData.system.sante.fatigue.value, formData.system.sante.endurance.max)
|
||||
|
||||
})
|
||||
|
||||
formData.competences.forEach(item => {
|
||||
item.system.isHidden = this.options.recherche
|
||||
|
||||
@@ -703,9 +703,9 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
rencontre: rencontre,
|
||||
tmr: true,
|
||||
use: { libre: false, conditions: false },
|
||||
forceCarac: { 'reve-actuel': { label: "Rêve Actuel", value: this.getReveActuel() } }
|
||||
forceCarac: this.getCaracReveActuel()
|
||||
}
|
||||
rollData.competence.system.defaut_carac = 'reve-actuel';
|
||||
rollData.competence.system.defaut_carac = CARACS.REVE_ACTUEL
|
||||
|
||||
const dialog = await RdDRoll.create(this, rollData,
|
||||
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-reve-de-dragon.hbs' },
|
||||
@@ -2504,9 +2504,9 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
const blessure = blesse.blessuresASoigner().find(it => it.id == blessureId);
|
||||
if (blessure) {
|
||||
if (!blessure.system.premierssoins.done) {
|
||||
const tache = await this.getTacheBlessure(blesse, blessure);
|
||||
return await this.rollTache(tache.id, {
|
||||
callbacks: [async r => await blesse.onRollTachePremiersSoins(blessureId, r, this.id)],
|
||||
const tacheId = (await this.getTacheBlessure(blesse, blessure))?.id
|
||||
return await this.rollTache(tacheId, {
|
||||
callbacks: [async r => await blesse.callbackPremiersSoins(blessureId, r, this.id)],
|
||||
title: 'Premiers soins', forced: true
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,39 +48,24 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
||||
}
|
||||
|
||||
getCarac() {
|
||||
return foundry.utils.mergeObject(this.system.carac,
|
||||
{
|
||||
'reve-actuel': this.getCaracReveActuel(),
|
||||
'chance-actuelle': this.getCaracChanceActuelle()
|
||||
},
|
||||
{ inplace: false })
|
||||
}
|
||||
|
||||
getCaracChanceActuelle() {
|
||||
return {
|
||||
label: 'Chance actuelle',
|
||||
value: this.getChanceActuel(),
|
||||
type: "number"
|
||||
};
|
||||
}
|
||||
|
||||
getCaracReveActuel() {
|
||||
return {
|
||||
label: 'Rêve actuel',
|
||||
value: this.getReveActuel(),
|
||||
type: "number"
|
||||
};
|
||||
const carac = super.getCarac()
|
||||
foundry.utils.mergeObject(carac, this.getCaracReveActuel())
|
||||
foundry.utils.mergeObject(carac, this.getCaracCompetenceCreature(), { overwrite: false })
|
||||
return carac
|
||||
}
|
||||
|
||||
getTaille() { return Misc.toInt(this.system.carac.taille?.value) }
|
||||
getConstitution() { return this.getReve() }
|
||||
|
||||
getForce() { return this.getReve() }
|
||||
getAgilite() { return this.getForce() }
|
||||
getReve() { return Misc.toInt(this.system.carac.reve?.value) }
|
||||
getChance() { return this.getReve() }
|
||||
getChanceActuel() { return this.getChance() }
|
||||
getCaracChanceActuelle() { return { [CARACS.CHANCE_ACTUELLE]: { label: 'Chance actuelle', value: this.getChanceActuel(), type: "number" } } }
|
||||
|
||||
getReveActuel() { return this.getReve() }
|
||||
getChanceActuel() { return this.getChance() }
|
||||
getCaracReveActuel() { return { [CARACS.REVE_ACTUEL]: { label: "Rêve Actuel", value: this.getReveActuel(), type: "number" } } }
|
||||
|
||||
getEnduranceMax() { return Math.max(1, this.getTaille() + this.getConstitution()) }
|
||||
getEncombrementMax() { return (this.getForce() + this.getTaille()) / 2 }
|
||||
@@ -257,6 +242,13 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
||||
return this.itemTypes[ITEM_TYPES.empoignade];
|
||||
}
|
||||
|
||||
async updateCarac(caracName, to) {
|
||||
const path = `system.carac.${caracName}.value`;
|
||||
let updates = {};
|
||||
updates[path] = Number.parseInt(to)
|
||||
await this.update(updates, { noHook: true });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async updateCreatureCompetence(idOrName, fieldName, value) {
|
||||
let competence = this.getCompetence(idOrName);
|
||||
@@ -490,17 +482,15 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
||||
|
||||
async rollCompetence(idOrName, options = { tryTarget: true, arme: undefined }) {
|
||||
RdDEmpoignade.checkEmpoignadeEnCours(this)
|
||||
|
||||
const competence = this.getCompetence(idOrName);
|
||||
if (OptionsAvancees.isUsing(ROLL_DIALOG_V2)) {
|
||||
const rollData = {
|
||||
ids: { actorId: this.id },
|
||||
type: { allowed: options.arme ? ATTAQUE_ROLL_TYPES : DEFAULT_ROLL_TYPES },
|
||||
type: { allowed: DEFAULT_ROLL_TYPES },
|
||||
selected: {
|
||||
carac: competence.type == ITEM_TYPES.competencecreature ? { key: competence.name } : undefined,
|
||||
comp: { key: competence.name },
|
||||
diff: { type: options.arme ? DIFF.ATTAQUE : DIFF.LIBRE, value: competence.system.default_diffLibre ?? 0 },
|
||||
attaque: options.arme ? { arme: { key: options.arme.id } } : undefined
|
||||
diff: { type: DIFF.LIBRE, value: competence.system.default_diffLibre ?? 0 },
|
||||
}
|
||||
}
|
||||
return await RollDialog.create(rollData)
|
||||
@@ -572,7 +562,7 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
||||
type: {
|
||||
allowed: [ROLL_TYPE_ATTAQUE], current: ROLL_TYPE_ATTAQUE
|
||||
}
|
||||
};
|
||||
}
|
||||
return await RollDialog.create(rollData, { onRollDone: RollDialog.onRollDoneClose })
|
||||
}
|
||||
})
|
||||
@@ -581,16 +571,18 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
||||
|
||||
/** --------------------------------------------
|
||||
* @param {*} arme item d'arme/compétence de créature
|
||||
* @param {*} categorieArme catégorie d'attaque à utiliser: competence (== melee), lancer, tir; naturelle, possession
|
||||
* @param {*} maniement catégorie d'attaque à utiliser: competence (== melee), lancer, tir; naturelle, possession
|
||||
* @returns
|
||||
*/
|
||||
rollArme(arme, categorieArme = 'competence', token = undefined) {
|
||||
async rollArme(arme, maniement = 'competence', token = undefined) {
|
||||
token = token ?? RdDUtility.getSelectedToken(this)
|
||||
const compToUse = RdDItemArme.getCompetenceArme(arme, categorieArme)
|
||||
const compToUse = RdDItemArme.getCompetenceArme(arme, maniement)
|
||||
|
||||
if (!RdDItemArme.isUtilisable(arme)) {
|
||||
ui.notifications.warn(`Arme inutilisable: ${arme.name} non équipée ou avec une résistance de 0 ou moins`)
|
||||
return
|
||||
}
|
||||
|
||||
if (!Targets.hasTargets()) {
|
||||
RdDConfirm.confirmer({
|
||||
settingConfirmer: "confirmer-combat-sans-cible",
|
||||
@@ -602,7 +594,7 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
||||
onAction: async () => {
|
||||
this.rollCompetence(compToUse, { tryTarget: false, arme: arme })
|
||||
}
|
||||
});
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -612,11 +604,12 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
||||
return
|
||||
}
|
||||
|
||||
const competence = this.getCompetence(compToUse)
|
||||
if (competence.isCompetencePossession()) {
|
||||
return RdDPossession.onAttaquePossession(target, this, competence);
|
||||
const comp = this.getCompetence(compToUse)
|
||||
if (comp.isCompetencePossession()) {
|
||||
// TODO: vérifier si c'est possible, sinon simplifier
|
||||
return RdDPossession.onAttaquePossession(target, this, comp);
|
||||
}
|
||||
RdDCombat.rddCombatTarget(target, this, token).attaque(competence, arme);
|
||||
RdDCombat.rddCombatTarget(target, this, token).attaque(comp, arme, maniement)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import { RdDItemBlessure } from "../item/blessure.js";
|
||||
import { ChatUtility } from "../chat-utility.js";
|
||||
import { Misc } from "../misc.js";
|
||||
import { RdDBaseActor } from "./base-actor.js";
|
||||
import { CARACS } from "../rdd-carac.js";
|
||||
|
||||
/**
|
||||
* Classe de base pour les acteurs qui peuvent subir des blessures
|
||||
@@ -23,10 +24,18 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
|
||||
this.system.attributs.encombrement.value = this.getEncombrementMax()
|
||||
}
|
||||
|
||||
getCarac() {
|
||||
const carac = super.getCarac()
|
||||
foundry.utils.mergeObject(carac, this.getCaracChanceActuelle())
|
||||
foundry.utils.mergeObject(carac, this.getCaracVie())
|
||||
return carac
|
||||
}
|
||||
|
||||
getForce() { return Misc.toInt(this.system.carac.force?.value) }
|
||||
getConstitution() { return Misc.toInt(this.system.carac.constitution?.value) }
|
||||
getVolonte() { return Misc.toInt(this.system.carac.volonte?.value) }
|
||||
|
||||
getCaracVie() { return { [CARACS.VIE]: { label: "Vie", value: this.getVieMax(), type: "number" } } }
|
||||
getVieMax() { return Misc.toInt(this.system.sante.vie?.max) }
|
||||
getEnduranceMax() { return Math.max(1, this.getTaille() + this.getConstitution()) }
|
||||
getFatigueMax() { return this.getEnduranceMax() * 2 }
|
||||
@@ -170,19 +179,24 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
|
||||
return result
|
||||
}
|
||||
|
||||
async onRollTachePremiersSoins(blessureId, rollData, soigneurId) {
|
||||
async callbackPremiersSoins(blessureId, rollData, soigneurId) {
|
||||
await this.onRollTachePremiersSoins(blessureId,
|
||||
rollData.v2 ? rollData.current.tache.tache : rollData.tache,
|
||||
rollData.rolled.isETotal,
|
||||
soigneurId)
|
||||
}
|
||||
async onRollTachePremiersSoins(blessureId, tache, isETotal, soigneurId) {
|
||||
if (!this.isOwner) {
|
||||
return RdDBaseActor.remoteActorCall({
|
||||
tokenId: this.token?.id,
|
||||
actorId: this.id,
|
||||
method: 'onRollTachePremiersSoins', args: [blessureId, rollData, soigneurId]
|
||||
method: 'onRollTachePremiersSoins', args: [blessureId, tache, isETotal, soigneurId]
|
||||
})
|
||||
}
|
||||
|
||||
const blessure = this.getItem(blessureId, 'blessure')
|
||||
if (blessure && !blessure.system.premierssoins.done) {
|
||||
const tache = rollData.v2 ? rollData.current.tache.tache : rollData.tache
|
||||
if (rollData.rolled.isETotal) {
|
||||
if (isETotal) {
|
||||
await blessure.update({
|
||||
'system.difficulte': blessure.system.difficulte - 1,
|
||||
'system.premierssoins.tache': Math.max(0, tache.system.points_de_tache_courant)
|
||||
@@ -255,9 +269,9 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
|
||||
await super.onCreateItem(item, options, id)
|
||||
}
|
||||
|
||||
async onUpdateItem(item, options, id) {
|
||||
async onUpdateItem(item, updates, options, id) {
|
||||
await this.changeItemEffects(item);
|
||||
await super.onUpdateItem(item, options, id)
|
||||
await super.onUpdateItem(item, updates, options, id)
|
||||
}
|
||||
|
||||
async onDeleteItem(item, options, id) {
|
||||
|
||||
@@ -12,6 +12,7 @@ import { SystemCompendiums } from "../settings/system-compendiums.js";
|
||||
import { RdDItem } from "../item.js";
|
||||
import { StatusEffects, STATUSES } from "../settings/status-effects.js";
|
||||
import { Apprecier } from "../moral/apprecier.mjs";
|
||||
import { CARACS } from "../rdd-carac.js";
|
||||
|
||||
export class RdDBaseActor extends Actor {
|
||||
|
||||
@@ -50,7 +51,7 @@ export class RdDBaseActor extends Actor {
|
||||
Handlebars.registerHelper('actor-isFeminin', actor => actor.isFeminin())
|
||||
Hooks.on("preUpdateItem", (item, change, options, id) => Misc.documentIfResponsible(item.parent)?.onPreUpdateItem(item, change, options, id))
|
||||
Hooks.on("createItem", (item, options, id) => Misc.documentIfResponsible(item.parent)?.onCreateItem(item, options, id))
|
||||
Hooks.on("updateItem", (item, options, id) => Misc.documentIfResponsible(item.parent)?.onUpdateItem(item, options, id))
|
||||
Hooks.on("updateItem", (item, updates, options, id) => Misc.documentIfResponsible(item.parent)?.onUpdateItem(item, updates, options, id))
|
||||
Hooks.on("deleteItem", (item, options, id) => Misc.documentIfResponsible(item.parent)?.onDeleteItem(item, options, id))
|
||||
Hooks.on("updateActor", (actor, change, options, actorId) => Misc.documentIfResponsible(actor)?.onUpdateActor(change, options, actorId))
|
||||
}
|
||||
@@ -155,20 +156,21 @@ export class RdDBaseActor extends Actor {
|
||||
super(docData, context);
|
||||
}
|
||||
|
||||
getCarac() {
|
||||
return foundry.utils.duplicate(this.system.carac)
|
||||
}
|
||||
|
||||
findCaracByName(name) {
|
||||
name = Grammar.toLowerCaseNoAccent(name)
|
||||
switch (name) {
|
||||
case 'reve-actuel': case 'reve actuel':
|
||||
return this.system.carac.reve
|
||||
case 'chance-actuelle': case 'chance actuelle':
|
||||
return this.system.carac.chance
|
||||
case 'vie':
|
||||
return this.system.sante.vie
|
||||
case 'reve actuel':
|
||||
name = CARACS.REVE_ACTUEL
|
||||
break
|
||||
case 'chance actuelle':
|
||||
name = CARACS.CHANCE_ACTUELLE
|
||||
break
|
||||
}
|
||||
|
||||
const carac = {}
|
||||
foundry.utils.mergeObject(carac, this.system.carac, { overwrite: false })
|
||||
foundry.utils.mergeObject(carac, this.getCaracCompetenceCreature(), { overwrite: false })
|
||||
const carac = this.getCarac()
|
||||
return RdDBaseActor.$findCaracByName(carac, name);
|
||||
}
|
||||
|
||||
@@ -183,10 +185,18 @@ export class RdDBaseActor extends Actor {
|
||||
getCaracByName(name) {
|
||||
name = this.mapCarac(Grammar.toLowerCaseNoAccent(name)) ?? name
|
||||
switch (name) {
|
||||
case 'reve-actuel': case 'reve actuel':
|
||||
return this.getCaracReveActuel();
|
||||
case 'chance-actuelle': case 'chance-actuelle':
|
||||
return this.getCaracChanceActuelle();
|
||||
case 'reve actuel':
|
||||
name = CARACS.REVE_ACTUEL
|
||||
break
|
||||
case 'chanceactuelle':
|
||||
name = CARACS.CHANCE_ACTUELLE
|
||||
break
|
||||
}
|
||||
switch (name) {
|
||||
case CARACS.REVE_ACTUEL:
|
||||
return this.getCaracReveActuel()[CARACS.REVE_ACTUEL]
|
||||
case CARACS.CHANCE_ACTUELLE:
|
||||
return this.getCaracChanceActuelle()[CARACS.CHANCE_ACTUELLE]
|
||||
}
|
||||
return this.findCaracByName(name);
|
||||
}
|
||||
@@ -330,7 +340,9 @@ export class RdDBaseActor extends Actor {
|
||||
async onCreateItem(item, options, id) {
|
||||
}
|
||||
|
||||
async onUpdateItem(item, options, id) {
|
||||
async onUpdateItem(item, updates, options, id) {
|
||||
const conteneur = item.findConteneur()
|
||||
conteneur?.render(options.render)
|
||||
}
|
||||
|
||||
async onDeleteItem(item, options, id) {
|
||||
@@ -339,9 +351,8 @@ export class RdDBaseActor extends Actor {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async _removeItemFromConteneur(item) {
|
||||
const updates = this.items.filter(it => it.isConteneur() && it.system.contenu.includes(item.id))
|
||||
const updates = this.findConteneur(item)
|
||||
.map(conteneur => {
|
||||
const nouveauContenu = conteneur.system.contenu.filter(id => id != item.id)
|
||||
return { _id: conteneur.id, 'system.contenu': nouveauContenu }
|
||||
@@ -371,7 +382,7 @@ export class RdDBaseActor extends Actor {
|
||||
/* -------------------------------------------- */
|
||||
async cleanupConteneurs() {
|
||||
if (Misc.isOwnerPlayer(this)) {
|
||||
let updates = this.itemTypes['conteneur']
|
||||
let updates = this.itemTypes[ITEM_TYPES.conteneur]
|
||||
.filter(c => c.system.contenu.filter(id => this.getItem(id) == undefined).length > 0)
|
||||
.map(c => { return { _id: c._id, 'system.contenu': c.system.contenu.filter(id => this.getItem(id) != undefined) } });
|
||||
if (updates.length > 0) {
|
||||
@@ -382,7 +393,7 @@ export class RdDBaseActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getFortune() {
|
||||
return Monnaie.getFortune(this.itemTypes['monnaie']);
|
||||
return Monnaie.getFortune(this.itemTypes[ITEM_TYPES.monnaie]);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -663,7 +674,7 @@ export class RdDBaseActor extends Actor {
|
||||
if (srcId != destId && itemId != destId) { // déplacement de l'objet
|
||||
const src = this.getItem(srcId);
|
||||
const dest = this.getItem(destId);
|
||||
const cible = this.getContenantOrParent(dest);
|
||||
const cible = this.findConteneurOrParent(dest);
|
||||
const [empilable, message] = item.isInventaireEmpilable(dest);
|
||||
if (empilable) {
|
||||
await dest.empiler(item)
|
||||
@@ -685,15 +696,15 @@ export class RdDBaseActor extends Actor {
|
||||
return result;
|
||||
}
|
||||
|
||||
getContenantOrParent(dest) {
|
||||
findConteneurOrParent(dest) {
|
||||
if (!dest || dest.isConteneur()) {
|
||||
return dest;
|
||||
}
|
||||
return this.getContenant(dest);
|
||||
return this.findConteneur(dest)
|
||||
}
|
||||
|
||||
getContenant(item) {
|
||||
return this.itemTypes['conteneur'].find(it => it.system.contenu.includes(item.id));
|
||||
findConteneur(item) {
|
||||
return this.itemTypes[ITEM_TYPES.conteneur].find(it => it.system.contenu.includes(item.id));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -215,11 +215,13 @@ export class ChatUtility {
|
||||
|
||||
static async onRenderChatMessage(chatMessage, html, data) {
|
||||
const rddTimestamp = chatMessage.getFlag(SYSTEM_RDD, 'rdd-timestamp')
|
||||
if (rddTimestamp) {
|
||||
const heureRdD = $(html).find('header.message-header .heure-rdd')
|
||||
if (rddTimestamp && heureRdD.length==0) {
|
||||
const messageTimestamp = $(html).find('header.message-header .message-timestamp');
|
||||
const timestamp = new RdDTimestamp(rddTimestamp);
|
||||
const timestampData = timestamp.toCalendrier();
|
||||
const dateHeure = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/common/date-heure.hbs', timestampData);
|
||||
$(html).find('header.message-header .message-timestamp').after(dateHeure)
|
||||
messageTimestamp.after(dateHeure)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,25 +240,4 @@ export class ChatUtility {
|
||||
const date = new Date(chatMessage.timestamp);
|
||||
return date?.toISOString().substring(0, 10)
|
||||
}
|
||||
|
||||
|
||||
// async flush() {
|
||||
// const question = game.i18n.localize("AreYouSure");
|
||||
// const warning = game.i18n.localize("CHAT.FlushWarning");
|
||||
// return foundry.applications.api.DialogV2.confirm({
|
||||
// window: {title: "CHAT.FlushTitle"},
|
||||
// content: `<p><strong>${question}</strong> ${warning}</p>`,
|
||||
// position: {
|
||||
// top: window.innerHeight - 150,
|
||||
// left: window.innerWidth - 720
|
||||
// },
|
||||
// yes: {
|
||||
// callback: async () => {
|
||||
// await this.documentClass.deleteDocuments([], {deleteAll: true});
|
||||
// const jumpToBottomElement = document.querySelector(".jump-to-bottom");
|
||||
// jumpToBottomElement.hidden = true;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ const fields = foundry.applications.fields
|
||||
export class DialogFlushByDate {
|
||||
|
||||
static async init() {
|
||||
Hooks.on("renderChatMessageHTML", async (app, html, msg) => await ChatUtility.onRenderChatMessage(app, html, msg))
|
||||
Hooks.on("createChatMessage", async (chatMessage, options, id) => await ChatUtility.onCreateChatMessage(chatMessage, options, id))
|
||||
Hooks.once("renderChatLog", async () => await DialogFlushByDate.onFirstRenderChatLog())
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export class Distance {
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
switch (attaque.comp.type) {
|
||||
switch (attaque.comp?.type) {
|
||||
case ITEM_TYPES.competence: return mapTypeAttaque(attaque.main)
|
||||
case ITEM_TYPES.competencecreature: return mapTypeAttaque(attaque.arme.system.categorie)
|
||||
}
|
||||
@@ -36,19 +36,18 @@ export class Distance {
|
||||
}
|
||||
|
||||
static distance(token, defenderToken) {
|
||||
if (token instanceof Token && defenderToken instanceof Token) {
|
||||
const ray = new foundry.canvas.geometry.Ray(
|
||||
token.getCenterPoint(),
|
||||
defenderToken.getCenterPoint()
|
||||
)
|
||||
return Number(canvas.grid.measureDistances([{ ray }], { gridSpaces: false }))
|
||||
if (Distance.$isToken(token) && Distance.$isToken(defenderToken)) {
|
||||
const source = token.getCenterPoint()
|
||||
const target = defenderToken.getCenterPoint()
|
||||
const measure = canvas.grid.measurePath([ source, target])
|
||||
return measure.distance
|
||||
}
|
||||
return -1 /* distance indéterminée */
|
||||
}
|
||||
|
||||
static isVisible(token, defenderToken) {
|
||||
// TODO: regarder les StatusEffect aveuglé?
|
||||
if (token instanceof Token && defenderToken instanceof Token) {
|
||||
if (Distance.$isToken(token) && Distance.$isToken(defenderToken)) {
|
||||
return canvas.effects.visibility.testVisibility(defenderToken.getCenterPoint(), { object: token })
|
||||
}
|
||||
return true
|
||||
@@ -79,11 +78,11 @@ export class Distance {
|
||||
}
|
||||
|
||||
static ajustementMouvement(defenderToken) {
|
||||
if (defenderToken instanceof Token) {
|
||||
if (Distance.$isToken(defenderToken)) {
|
||||
if (defenderToken.actor?.getSurprise(true) != '') return { msg: "immobile (surprise)", diff: 0 };
|
||||
if (defenderToken.inCombat) return { msg: "en mouvement (combat)", diff: -4 };
|
||||
if (defenderToken.inCombat) return { msg: "en combat", diff: -4 };
|
||||
}
|
||||
return { msg: "à déterminer (0 immobile, -3 actif, -4 en mouvement, -5 en zig-zag)", diff: -3 };
|
||||
return { msg: "à déterminer", diff: -3 };
|
||||
}
|
||||
|
||||
static diff(...ajustements) {
|
||||
@@ -116,4 +115,8 @@ export class Distance {
|
||||
return undefined
|
||||
}
|
||||
|
||||
static $isToken(token) {
|
||||
return token instanceof Token || token instanceof TokenDocument
|
||||
}
|
||||
|
||||
}
|
||||
@@ -136,7 +136,7 @@ export class RdDItemCompetence extends RdDItem {
|
||||
return troncList;
|
||||
}
|
||||
}
|
||||
return [];
|
||||
return []
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
@@ -16,6 +16,7 @@ import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
import { ItemAction } from "./item/item-actions.js";
|
||||
import { SANS_COMPETENCE } from "./item/base-items.js";
|
||||
import { Apprecier } from "./moral/apprecier.mjs";
|
||||
import { CARACS } from "./rdd-carac.js";
|
||||
|
||||
/**
|
||||
* Extend the basic ItemSheet for RdD specific items
|
||||
@@ -118,7 +119,7 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
|
||||
this.item.type == ITEM_TYPES.meditation ||
|
||||
this.item.type == ITEM_TYPES.oeuvre) {
|
||||
formData.caracList = foundry.utils.duplicate(game.model.Actor.personnage.carac)
|
||||
formData.caracList["reve-actuel"] = foundry.utils.duplicate(game.model.Actor.personnage.reve.reve)
|
||||
formData.caracList[CARACS.REVE_ACTUEL] = foundry.utils.duplicate(game.model.Actor.personnage.reve.reve)
|
||||
}
|
||||
if (this.item.type == ITEM_TYPES.arme) {
|
||||
formData.competences = formData.competences.filter(it => it.isCompetenceArme())
|
||||
|
||||
@@ -41,6 +41,11 @@ export class RdDItemSort extends RdDItem {
|
||||
return value ? value.replace('variable', 'var') : ''
|
||||
}
|
||||
|
||||
static computeTotalXP(sorts) {
|
||||
return sorts.map(sort => RdDItemSort.isDifficulteVariable(sort) ? 70 : -10 * Misc.toInt(sort.system.difficulte))
|
||||
.reduce(Misc.sum(), 0)
|
||||
}
|
||||
|
||||
static isSortOnCoord(sort, coord) {
|
||||
let tmr = TMRUtility.getTMR(coord)
|
||||
const caseTMR = sort.system.caseTMR.toLowerCase();
|
||||
|
||||
@@ -81,13 +81,13 @@ export const defaultItemImg = {
|
||||
souffle: "systems/foundryvtt-reve-de-dragon/icons/souffle_dragon.webp",
|
||||
tarot: "systems/foundryvtt-reve-de-dragon/icons/tarots/dos-tarot.webp",
|
||||
tete: "systems/foundryvtt-reve-de-dragon/icons/tete_dragon.webp",
|
||||
monnaie:"systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp",
|
||||
monnaie: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp",
|
||||
munition: "systems/foundryvtt-reve-de-dragon/icons/objets/fleche.webp"
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class RdDItem extends Item {
|
||||
|
||||
|
||||
static get defaultIcon() {
|
||||
return undefined;
|
||||
}
|
||||
@@ -185,6 +185,13 @@ export class RdDItem extends Item {
|
||||
isCompetencePersonnage() { return this.type == ITEM_TYPES.competence }
|
||||
isCompetenceCreature() { return this.type == ITEM_TYPES.competencecreature }
|
||||
isConteneur() { return this.type == ITEM_TYPES.conteneur }
|
||||
findConteneur() {
|
||||
if (this.isInventaire('all') && this.parent) {
|
||||
return this.parent.findConteneur(this)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
isMonnaie() { return this.type == ITEM_TYPES.monnaie }
|
||||
isNourritureBoisson() { return this.type == ITEM_TYPES.nourritureboisson; }
|
||||
isService() { return this.type == ITEM_TYPES.service }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ACTOR_TYPES } from "../constants.js"
|
||||
import { ACTOR_TYPES, ITEM_TYPES } from "../constants.js"
|
||||
import { Misc } from "../misc.js"
|
||||
import { RdDSheetUtility } from "../rdd-sheet-utility.js"
|
||||
import { RdDUtility } from "../rdd-utility.js"
|
||||
@@ -11,33 +11,35 @@ import { RdDUtility } from "../rdd-utility.js"
|
||||
const _SPACEHOLDER = { placeholder: true }
|
||||
|
||||
const _VENDRE = {
|
||||
code: 'item-vendre', label: 'Vendre ou donner', icon: it => 'fa-solid fa-comments-dollar',
|
||||
code: 'item-vendre', label: 'Vendre ou donner', icon: 'fa-solid fa-comments-dollar',
|
||||
filter: it => Misc.toInt(it.system.quantite) > 0 || it.parent?.type == ACTOR_TYPES.commerce,
|
||||
action: (item, actor) => item.proposerVente()
|
||||
}
|
||||
const _ACHETER = {
|
||||
code: 'item-acheter', label: 'Acheter', icon: it => 'fa-regular fa-coins',
|
||||
code: 'item-acheter', label: 'Acheter', icon: 'fa-regular fa-coins',
|
||||
filter: it => it.parent?.type == ACTOR_TYPES.commerce,
|
||||
allowLimited: true,
|
||||
action: (item, actor) => actor.vente(item)
|
||||
}
|
||||
const _MONTRER = {
|
||||
code: 'item-montrer', label: 'Montrer', icon: it => 'fa-solid fa-comment',
|
||||
code: 'item-montrer', label: 'Montrer', icon: 'fa-solid fa-comment',
|
||||
allowLimited: true,
|
||||
action: (item, actor) => item.postItemToChat()
|
||||
}
|
||||
const _SPLIT = {
|
||||
code: 'item-split', label: 'Séparer le goupe', icon: it => 'fa-solid fa-unlink',
|
||||
code: 'item-split', label: 'Séparer le goupe', icon: 'fa-solid fa-unlink',
|
||||
filter: it => Misc.toInt(it.system.quantite) > 1 && it.parent?.type != ACTOR_TYPES.commerce,
|
||||
action: (item, actor) => RdDSheetUtility.splitItem(item, actor)
|
||||
}
|
||||
|
||||
const _EDIT = {
|
||||
code: 'item-edit', label: 'Editer', icon: it => 'fa-solid fa-edit',
|
||||
code: 'item-edit', label: it => it.type == ITEM_TYPES.conteneur ? 'Ouvrir' : 'Editer',
|
||||
icon: 'fa-solid fa-edit',
|
||||
action: (item, actor) => item.sheet.render(true)
|
||||
}
|
||||
|
||||
const _DELETE = {
|
||||
code: 'item-delete', label: 'Supprimer', icon: it => 'fa-solid fa-trash',
|
||||
code: 'item-delete', label: 'Supprimer', icon: 'fa-solid fa-trash',
|
||||
optionsFilter: options => options.isOwner,
|
||||
action: (item, actor) => RdDUtility.confirmActorItemDelete(item, actor)
|
||||
}
|
||||
@@ -49,48 +51,48 @@ const _EQUIPER = {
|
||||
|
||||
const _CUISINER = {
|
||||
code: 'item-cuisiner', label: 'Cuisiner',
|
||||
img: it => 'systems/foundryvtt-reve-de-dragon/assets/actions/cuisine.svg',
|
||||
// icon: it => 'fa-solid fa-spoon',
|
||||
img: 'systems/foundryvtt-reve-de-dragon/assets/actions/cuisine.svg',
|
||||
filter: it => it.getUtilisation() == 'cuisine' && it.system.sust > 0,
|
||||
action: (item, actor) => actor.preparerNourriture(item)
|
||||
}
|
||||
const _MANGER_CRU = {
|
||||
code: 'item-manger-cru', label: 'Manger cru', icon: it => 'fa-solid fa-drumstick-bite',
|
||||
code: 'item-manger-cru', label: 'Manger cru', icon: 'fa-solid fa-drumstick-bite',
|
||||
filter: it => it.getUtilisation() == 'cuisine' && it.system.sust > 0,
|
||||
action: (item, actor) => actor.mangerNourriture(item)
|
||||
}
|
||||
const _MANGER = {
|
||||
code: 'item-manger', label: 'Manger', icon: it => 'fa-solid fa-utensils',
|
||||
code: 'item-manger', label: 'Manger', icon: 'fa-solid fa-utensils',
|
||||
filter: it => !(it.system.boisson),
|
||||
action: (item, actor) => actor.mangerNourriture(item)
|
||||
}
|
||||
const _BOIRE = {
|
||||
code: 'item-boire', label: 'Boire', icon: it => 'fa-solid fa-glass-water',
|
||||
code: 'item-boire', label: 'Boire', icon: 'fa-solid fa-glass-water',
|
||||
filter: it => it.system.boisson,
|
||||
action: (item, actor) => actor.mangerNourriture(item)
|
||||
}
|
||||
const _DECOCTION = {
|
||||
code: 'item-decoction', label: 'Décoction', icon: it => 'fa-solid fa-flask-vial',
|
||||
code: 'item-decoction', label: 'Décoction', icon: 'fa-solid fa-flask-vial',
|
||||
action: (item, actor) => actor.fabriquerDecoctionHerbe(item)
|
||||
}
|
||||
|
||||
const _OUVRIR = {
|
||||
code: 'item-edit', label: 'Ouvrir', icon: it => 'fa-solid fa-eye',
|
||||
code: 'item-edit', label: 'Ouvrir',
|
||||
img: 'systems/foundryvtt-reve-de-dragon/assets/actions/ouvrir.svg',
|
||||
action: (item, actor) => item.sheet.render(true)
|
||||
}
|
||||
|
||||
const _LIRE = {
|
||||
code: 'item-lire', label: 'Lire', icon: it => 'fa-solid fa-book-open',
|
||||
code: 'item-lire', label: 'Lire', icon: 'fa-solid fa-book-open',
|
||||
action: (item, actor) => actor.actionLire(item)
|
||||
}
|
||||
|
||||
const _REFOULER = {
|
||||
code: 'item-refouler', label: 'Refouler', icon: it => 'fa-solid fa-burst',
|
||||
code: 'item-refouler', label: 'Refouler', icon: 'fa-solid fa-burst',
|
||||
filter: it => it.system.refoulement > 0,
|
||||
action: (item, actor) => actor.actionRefoulement(item)
|
||||
}
|
||||
|
||||
const _SORT_RESERVE = {
|
||||
code: 'item-sortreserve-add', label: 'Ajouter en réserve', icon: it => 'fa-solid fa-sparkles',
|
||||
code: 'item-sortreserve-add', label: 'Ajouter en réserve', icon: 'fa-solid fa-sparkles',
|
||||
filter: it => game.user.isGM && !it.system.isrituel,
|
||||
action: (item, actor) => actor.addSortReserve(item)
|
||||
}
|
||||
@@ -121,20 +123,33 @@ export class ItemAction {
|
||||
&& (!action.optionsFilter || action.optionsFilter(options))
|
||||
}
|
||||
|
||||
|
||||
static img(action, item) {
|
||||
if (action.placeholder){
|
||||
static label(action, item) {
|
||||
if (action.placeholder) {
|
||||
return ""
|
||||
}
|
||||
if (action?.img) {
|
||||
return `<img src="${action.img(item)}" />`
|
||||
return ItemAction.getParam(action.label, item)
|
||||
}
|
||||
|
||||
static img(action, item) {
|
||||
if (action.placeholder) {
|
||||
return ""
|
||||
}
|
||||
if (action?.icon) {
|
||||
return `<i class="${action.icon(item)}"></i>`
|
||||
|
||||
const img = ItemAction.getParam(action.img, item)
|
||||
if (img) {
|
||||
return `<img src="${img}" />`
|
||||
}
|
||||
const icon = ItemAction.getParam(action.icon, item)
|
||||
if (icon) {
|
||||
return `<i class="${icon}"></i>`
|
||||
}
|
||||
return action.label
|
||||
}
|
||||
|
||||
static getParam(p, item) {
|
||||
return typeof (p) == 'function' ? p(item) : p
|
||||
}
|
||||
|
||||
static async onActionItem(event, actor, options) {
|
||||
const code = $(event.currentTarget).data('code')
|
||||
const item = RdDSheetUtility.getItem(event, actor)
|
||||
|
||||
@@ -70,7 +70,7 @@ export class RdDBonus {
|
||||
dmgParticuliere: RdDBonus._dmgParticuliere(rollData),
|
||||
dmgSurprise: rollData.opponent?.surprise?.dmg ?? 0,
|
||||
mortalite: RdDBonus.mortalite(attaque.dmg?.mortalite, arme?.system.mortalite),
|
||||
dmgActor: RdDBonus.bonusDmg(actor, attaque.carac.key, dmgArme, attaque.forceRequise),
|
||||
dmgActor: RdDBonus.bonusDmg(actor, attaque.carac?.key, dmgArme, attaque.forceRequise),
|
||||
dmgForceInsuffisante: Math.min(0, actor.getForce() - (attaque.forceRequise ?? 0)),
|
||||
dmgDiffLibre: ReglesOptionnelles.isUsing('degat-ajout-malus-libre') ? Math.abs(attaque.diff ?? 0) : 0
|
||||
}
|
||||
|
||||
@@ -61,7 +61,9 @@ export const CARACS = {
|
||||
DEROBEE: 'derobee',
|
||||
CHANCE_ACTUELLE: 'chance-actuelle',
|
||||
REVE_ACTUEL: 'reve-actuel',
|
||||
VIE: 'vie'
|
||||
}
|
||||
|
||||
export const LIST_CARAC_PERSONNAGE = {
|
||||
[CARACS.TAILLE]: { code: CARACS.TAILLE, label: 'Taille', isCarac: true, path: 'system.carac.taille.value' },
|
||||
[CARACS.APPARENCE]: { code: CARACS.APPARENCE, label: 'Apparence', isCarac: true, path: 'system.carac.apparence.value' },
|
||||
@@ -166,10 +168,18 @@ export class RdDCarac {
|
||||
const total = Object.values(carac ?? {}).filter(c => !c.derivee)
|
||||
.map(it => parseInt(it.value))
|
||||
.reduce(Misc.sum(), 0);
|
||||
const beauteSuperieur10 = Math.max((beaute ?? 10) - 10, 0);
|
||||
const beauteSuperieur10 = Math.max((beaute ?? 10) - 10, 0)
|
||||
return total + beauteSuperieur10;
|
||||
}
|
||||
|
||||
static computeTotalXp(carac, beaute = undefined) {
|
||||
const totalXp = Object.values(carac ?? {}).filter(c => !c.derivee)
|
||||
.map(it => RdDCarac.getCaracXp(0, Misc.toInt(it.value)) + Misc.toInt(it.xp))
|
||||
.reduce(Misc.sum(), 0);
|
||||
const beauteXp = beaute > 10 ? RdDCarac.getCaracXp(10, beaute) : 0
|
||||
return totalXp + beauteXp;
|
||||
}
|
||||
|
||||
static levelUp(it) {
|
||||
it.xpNext = RdDCarac.getCaracNextXp(it.value);
|
||||
it.isLevelUp = (it.xp >= it.xpNext);
|
||||
@@ -182,12 +192,16 @@ export class RdDCarac {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getCaracNextXp(value) {
|
||||
const nextValue = Number(value) + 1;
|
||||
value = Number(value);
|
||||
const nextValue = value + 1;
|
||||
// xp est le coût pour atteindre cette valeur, on regarde donc le coût de la valeur+1
|
||||
return RdDCarac.getCaracXp(nextValue);
|
||||
return RdDCarac.getCaracXp(value, nextValue)
|
||||
}
|
||||
|
||||
static getCaracXp(targetValue) {
|
||||
return RdDCarac.getCaracDerivee(targetValue)?.xp ?? 200;
|
||||
static getCaracXp(from, to) {
|
||||
return Array.from({ length: to - from },
|
||||
(_, i) => from + i + 1)
|
||||
.map(it => RdDCarac.getCaracDerivee(it)?.xp ?? 200)
|
||||
.reduce(Misc.sum(), 0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,10 @@ export class RdDCombatManager extends Combat {
|
||||
it.token.id == tokenId
|
||||
)
|
||||
}
|
||||
static getRangInitiativeCombatant(actorId, tokenId) {
|
||||
const combatant = RdDCombatManager.getCombatant(actorId, tokenId)
|
||||
return combatant?.system.init?.rang
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async nextRound() {
|
||||
await this.finDeRound();
|
||||
@@ -514,8 +518,8 @@ export class RdDCombat {
|
||||
/* -------------------------------------------- */
|
||||
attaqueChanceuse(attackerRoll) {
|
||||
ui.notifications.info("L'attaque est rejouée grâce à la chance")
|
||||
attackerRoll.essais.attaqueChance = true;
|
||||
this.attaque(attackerRoll, attackerRoll.arme);
|
||||
attackerRoll.essais.attaqueChance = true
|
||||
this.attaque(attackerRoll, attackerRoll.arme)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -642,11 +646,11 @@ export class RdDCombat {
|
||||
}
|
||||
}
|
||||
|
||||
async attaqueV2() {
|
||||
async attaqueV2(options = undefined) {
|
||||
if (!await this.attacker.accorder(this.defender, 'avant-attaque')) {
|
||||
return
|
||||
}
|
||||
await this.doRollAttaque({
|
||||
const rollData = {
|
||||
ids: {
|
||||
actorId: this.attackerId,
|
||||
actorTokenId: this.attackerTokenId,
|
||||
@@ -654,8 +658,19 @@ export class RdDCombat {
|
||||
opponentTokenId: this.defenderTokenId,
|
||||
},
|
||||
type: { allowed: ['attaque'], current: 'attaque' },
|
||||
selected: {},
|
||||
passeArme: foundry.utils.randomID(16),
|
||||
})
|
||||
}
|
||||
if (options) {
|
||||
rollData.selected = {
|
||||
attaque: {
|
||||
comp: { id: options.comp.id },
|
||||
arme: { id: options.arme.id },
|
||||
main: options.main
|
||||
}
|
||||
}
|
||||
}
|
||||
await this.doRollAttaque(rollData)
|
||||
}
|
||||
|
||||
async doRollAttaque(rollData, callbacks = []) {
|
||||
@@ -736,12 +751,14 @@ export class RdDCombat {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async attaque(competence, arme) {
|
||||
async attaque(competence, arme, main) {
|
||||
if (!await this.attacker.accorder(this.defender, 'avant-attaque')) {
|
||||
return
|
||||
}
|
||||
if (OptionsAvancees.isUsing(ROLL_DIALOG_V2)) {
|
||||
return this.attacker.rollCompetence(competence.name, { arme: arme })
|
||||
return this.attaqueV2(
|
||||
{ comp: competence, arme: arme, main: main }
|
||||
)
|
||||
}
|
||||
if (arme.system.cac == EMPOIGNADE) {
|
||||
RdDEmpoignade.onAttaqueEmpoignade(this.attacker, this.defender)
|
||||
@@ -750,7 +767,7 @@ export class RdDCombat {
|
||||
RdDEmpoignade.checkEmpoignadeEnCours(this.attacker)
|
||||
|
||||
let rollData = this._prepareAttaque(competence, arme)
|
||||
console.log("RdDCombat.attaque >>>", rollData);
|
||||
console.log("RdDCombat.attaque >>>", rollData)
|
||||
if (arme) {
|
||||
this.attacker.verifierForceMin(arme);
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ export class RdDCommands {
|
||||
this.registerCommand({
|
||||
path: ["/xp", "carac"], func: (content, msg, params) => this.getCoutXpCarac(msg, params),
|
||||
descr: `Détermine le coût d'expérience pour augmenter une caractéristique. Exemples:
|
||||
<br>/xp carac 12 15: coût pour passer de 12 15
|
||||
<br>/xp carac 15: coût pour atteindre 15 (depuis 14)`
|
||||
});
|
||||
|
||||
@@ -440,13 +441,18 @@ export class RdDCommands {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getCoutXpCarac(msg, params) {
|
||||
if (params && params.length == 1) {
|
||||
let to = Number(params[0]);
|
||||
return RdDCommands._chatAnswer(msg, `Coût pour passer une caractéristique de ${to - 1} à ${to}: ${RdDCarac.getCaracXp(to)}`);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
if (params) {
|
||||
if (params.length == 1) {
|
||||
const to = Number(params[0])
|
||||
return RdDCommands._chatAnswer(msg, `Coût pour passer une caractéristique de ${to - 1} à ${to}: ${RdDCarac.getCaracXp(to - 1, to)}`);
|
||||
}
|
||||
if (params.length == 2) {
|
||||
const from = Number(params[0]);
|
||||
const to = Number(params[1]);
|
||||
return RdDCommands._chatAnswer(msg, `Coût pour passer une caractéristique de ${from} à ${to}: ${RdDCarac.getCaracXp(from, to)}`);
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
async creerSignesDraconiques() {
|
||||
|
||||
@@ -101,7 +101,7 @@ export class RdDHotbar {
|
||||
}
|
||||
|
||||
/** Roll macro */
|
||||
static rollMacro(itemName, itemType, categorieArme = 'competence') {
|
||||
static rollMacro(itemName, itemType, maniement = 'competence') {
|
||||
const speaker = ChatMessage.getSpeaker();
|
||||
let actor;
|
||||
if (speaker.token) actor = game.actors.tokens[speaker.token];
|
||||
@@ -117,10 +117,10 @@ export class RdDHotbar {
|
||||
// Trigger the item roll
|
||||
switch (item.type) {
|
||||
case ITEM_TYPES.arme:
|
||||
return actor.rollArme(item, categorieArme);
|
||||
return actor.rollArme(item, maniement);
|
||||
case ITEM_TYPES.competence:
|
||||
if (item.isCorpsACorps()) {
|
||||
switch (categorieArme) {
|
||||
switch (maniement) {
|
||||
case PUGILAT:
|
||||
return actor.rollArme(RdDItemArme.pugilat(actor));
|
||||
case EMPOIGNADE:
|
||||
@@ -130,7 +130,7 @@ export class RdDHotbar {
|
||||
return actor.rollCompetence(item);
|
||||
case ITEM_TYPES.competencecreature:
|
||||
return item.system.iscombat
|
||||
? actor.rollArme(item, categorieArme)
|
||||
? actor.rollArme(item, maniement)
|
||||
: actor.rollCompetence(item);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SYSTEM_RDD, SYSTEM_SOCKET_ID, RDD_CONFIG, ITEM_TYPES } from "./constants.js"
|
||||
|
||||
const RDD_INFO_MESSAGE_URL = "https://gitea.scriptarium.org/Scriptarium/foundryvtt-reve-de-dragon/src/branch/v13/info-message.html"
|
||||
const RDD_INFO_MESSAGE_URL = "https://gitea.scriptarium.org/Scriptarium/foundryvtt-reve-de-dragon/raw/branch/v13/info-message.html"
|
||||
|
||||
import { RdDUtility } from "./rdd-utility.js"
|
||||
import { TMRUtility } from "./tmr-utility.js"
|
||||
@@ -358,6 +358,15 @@ export class SystemReveDeDragon {
|
||||
},
|
||||
default: "aucun"
|
||||
})
|
||||
|
||||
/* -------------------------------------------- */
|
||||
game.settings.register(SYSTEM_RDD, "info-msg-timeout", {
|
||||
name: "Gestion du timeout d'affichage du message d'information",
|
||||
scope: "world",
|
||||
config: false,
|
||||
type: Number,
|
||||
default: 0
|
||||
})
|
||||
}
|
||||
|
||||
async onReady() {
|
||||
@@ -416,7 +425,16 @@ export class SystemReveDeDragon {
|
||||
<br>Vous trouverez quelques informations pour démarrer dans ce document : @Compendium[foundryvtt-reve-de-dragon.rappel-des-regles.7uGrUHGdPu0EmIu2]{Documentation MJ/Joueurs}
|
||||
<br>La commande <code>/aide</code> dans le chat permet de voir les commandes spécifiques à Rêve de Dragon.</div>
|
||||
` })
|
||||
// Try to fetch the welcome message from the github repo "welcome-message-ecryme.html"
|
||||
// Get last message display time
|
||||
const lastDisplay = game.settings.get(SYSTEM_RDD, "info-msg-timeout") || 0
|
||||
const now = Date.now()
|
||||
const oneDayMs = 24 * 60 * 60 * 1000
|
||||
if (now - lastDisplay < oneDayMs) {
|
||||
return // Already displayed in the last 24 hours
|
||||
}
|
||||
// Update last display time
|
||||
game.settings.set(SYSTEM_RDD, "info-msg-timeout", now)
|
||||
// Try to fetch the welcome message from the github repo RDD_INFO_MESSAGE_URL
|
||||
fetch(RDD_INFO_MESSAGE_URL)
|
||||
.then(response => response.text())
|
||||
.then(html => {
|
||||
|
||||
@@ -2,6 +2,7 @@ import { RdDRoll } from "./rdd-roll.js";
|
||||
import { Targets } from "./targets.js";
|
||||
import { ITEM_TYPES } from "./constants.js";
|
||||
import { RdDRollResult } from "./rdd-roll-result.js";
|
||||
import { CARACS } from "./rdd-carac.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* On part du principe qu'une entité démarre tjs
|
||||
@@ -96,15 +97,14 @@ export class RdDPossession {
|
||||
static selectCompetenceDraconicOuPossession(rollData, rollingActor) {
|
||||
rollData.competence = rollingActor.getDraconicOuPossession().find(it => true);
|
||||
if (rollingActor.isCreatureOuEntite()) {
|
||||
const carac = rollingActor.system.carac
|
||||
rollData.carac = carac
|
||||
rollData.competence.system.defaut_carac = 'reve'
|
||||
rollData.selectedCarac = carac.reve
|
||||
rollData.carac = rollingActor.system.carac
|
||||
rollData.competence.system.defaut_carac = CARACS.REVE
|
||||
rollData.selectedCarac = rollingActor.system.carac.reve
|
||||
}
|
||||
else {
|
||||
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.forceCarac = rollingActor.getCaracReveActuel()
|
||||
rollData.selectedCarac = rollData.forceCarac[CARACS.REVE_ACTUEL]
|
||||
rollData.competence.system.defaut_carac = CARACS.REVE_ACTUEL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { RdDItemCompetence } from "./item-competence.js";
|
||||
import { RdDItemSort } from "./item-sort.js";
|
||||
import { Misc } from "./misc.js";
|
||||
import { RdDBonus } from "./rdd-bonus.js";
|
||||
import { RdDCarac } from "./rdd-carac.js";
|
||||
import { CARACS, RdDCarac } from "./rdd-carac.js";
|
||||
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
||||
import { ReglesOptionnelles } from "./settings/regles-optionnelles.js";
|
||||
import { Grammar } from "./grammar.js";
|
||||
@@ -65,7 +65,7 @@ export class RdDRoll extends Dialog {
|
||||
}
|
||||
// Mini patch :Ajout du rêve actuel
|
||||
if (actor.type == ACTOR_TYPES.personnage) {
|
||||
defaultRollData.carac["reve-actuel"] = actor.system.reve.reve
|
||||
defaultRollData.carac[CARACS.REVE_ACTUEL] = actor.system.reve.reve
|
||||
}
|
||||
|
||||
foundry.utils.mergeObject(rollData, defaultRollData, { recursive: true, overwrite: false });
|
||||
|
||||
@@ -93,7 +93,7 @@ export class RdDSheetUtility {
|
||||
static async renderItemBranch(actor, item) {
|
||||
while (item) {
|
||||
await item.sheet?.render()
|
||||
item = actor.getContenant(item)
|
||||
item = actor.findConteneur(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import { RdDDice } from "./rdd-dice.js";
|
||||
import { RdDRencontre } from "./item/rencontre.js";
|
||||
import { ITEM_TYPES } from "./constants.js";
|
||||
import { Misc } from "./misc.js";
|
||||
import { CARACS } from "./rdd-carac.js";
|
||||
|
||||
const TMR_DISPLAY_SIZE = {
|
||||
code: 'tmr-display-size',
|
||||
@@ -125,7 +126,7 @@ export class RdDTMRDialog extends Dialog {
|
||||
HtmlUtility.showControlWhen(this.html.find(".lire-signe-draconique"), this.actor.isResonanceSigneDraconique(this._getCoordActor()));
|
||||
|
||||
this.html.find('form.tmr-dialog *').click(event => {
|
||||
if (this.subdialog?.rendered){
|
||||
if (this.subdialog?.rendered) {
|
||||
this.subdialog?.bringToFront()
|
||||
}
|
||||
})
|
||||
@@ -685,12 +686,12 @@ export class RdDTMRDialog extends Dialog {
|
||||
tmr: tmr,
|
||||
canClose: false,
|
||||
diffLibre: -7,
|
||||
forceCarac: { 'reve-actuel': { label: "Rêve Actuel", value: this.actor.getReveActuel() } },
|
||||
forceCarac: this.actor.getCaracReveActuel(),
|
||||
maitrise: { verbe: 'maîtriser', action: 'Maîtriser le fleuve' }
|
||||
}
|
||||
rollData.double = EffetsDraconiques.isDoubleResistanceFleuve(this.actor) ? true : undefined,
|
||||
rollData.competence.system.defaut_carac = 'reve-actuel';
|
||||
await this._rollMaitriseCaseHumide(rollData);
|
||||
rollData.double = EffetsDraconiques.isDoubleResistanceFleuve(this.actor) ? true : undefined
|
||||
rollData.competence.system.defaut_carac = CARACS.REVE_ACTUEL
|
||||
await this._rollMaitriseCaseHumide(rollData)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -810,30 +811,30 @@ export class RdDTMRDialog extends Dialog {
|
||||
tmr: tmr,
|
||||
canClose: options.canClose ?? false,
|
||||
diffLibre: options.difficulte ?? -7,
|
||||
forceCarac: { 'reve-actuel': { label: "Rêve Actuel", value: this.actor.getReveActuel() } },
|
||||
forceCarac: this.actor.getCaracReveActuel(),
|
||||
maitrise: { verbe: 'conquérir', action: options.action }
|
||||
};
|
||||
rollData.competence.system.defaut_carac = 'reve-actuel';
|
||||
}
|
||||
rollData.competence.system.defaut_carac = CARACS.REVE_ACTUEL
|
||||
|
||||
await this._maitriserTMR(rollData, r => this._onResultatConquerir(r, options));
|
||||
await this._maitriserTMR(rollData, r => this._onResultatConquerir(r, options))
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onResultatConquerir(rollData, options) {
|
||||
if (rollData.rolled.isETotal) {
|
||||
rollData.souffle = await this.actor.ajouterSouffle({ chat: false });
|
||||
rollData.souffle = await this.actor.ajouterSouffle({ chat: false })
|
||||
}
|
||||
rollData.poesie = await Poetique.getExtrait();
|
||||
rollData.poesie = await Poetique.getExtrait()
|
||||
ChatMessage.create({
|
||||
whisper: ChatUtility.getOwners(this.actor),
|
||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-resultat-maitrise-tmr.hbs`, rollData)
|
||||
});
|
||||
})
|
||||
if (rollData.rolled.isEchec) {
|
||||
options.onConqueteEchec(rollData, options.effetDraconique);
|
||||
options.onConqueteEchec(rollData, options.effetDraconique)
|
||||
}
|
||||
else {
|
||||
await options.onConqueteReussie(rollData, options.effetDraconique);
|
||||
this.updateTokens();
|
||||
await options.onConqueteReussie(rollData, options.effetDraconique)
|
||||
this.updateTokens()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -967,7 +968,7 @@ export class RdDTMRDialog extends Dialog {
|
||||
const targetOddq = this.pixiTMR.computeEventOddq(event)
|
||||
const targetCoord = TMRUtility.oddqToCoordTMR(targetOddq)
|
||||
|
||||
if (targetCoord == COORD_TMR_INCONNU){
|
||||
if (targetCoord == COORD_TMR_INCONNU) {
|
||||
ui.notifications.error("Vous ne pouvez pas vous déplacer ici");
|
||||
return
|
||||
}
|
||||
|
||||
@@ -348,6 +348,7 @@ export class RdDUtility {
|
||||
// Items
|
||||
Handlebars.registerHelper('rarete-getChamp', (rarete, field) => RdDRaretes.getChamp(rarete, field));
|
||||
Handlebars.registerHelper('item-action-applies', (action, item, options) => ItemAction.applies(action, item, options))
|
||||
Handlebars.registerHelper('item-action-label', (action, item) => new Handlebars.SafeString(ItemAction.label(action, item)))
|
||||
Handlebars.registerHelper('item-action-img', (action, item) => new Handlebars.SafeString(ItemAction.img(action, item)))
|
||||
Handlebars.registerHelper('item-name', (item) => item.nameDisplay)
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
||||
|
||||
foundry.applications.handlebars.loadTemplates(ALL_ROLL_TYPES.map(m => m.chatResultTemplate))
|
||||
foundry.applications.handlebars.loadTemplates(ROLL_PARTS.map(p => p.template))
|
||||
ROLL_PARTS.forEach(p => p.onReady())
|
||||
ROLL_PARTS.forEach(p => p.onReady(ROLL_PARTS))
|
||||
|
||||
Handlebars.registerHelper('roll-centered-array', (base, show) => {
|
||||
show = Math.abs(show)
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { Distance } from "../combat/distance.mjs"
|
||||
import { RDD_CONFIG } from "../constants.js"
|
||||
import { MAP_PHASE, RdDInitiative } from "../initiative.mjs"
|
||||
import { ATTAQUE_TYPE_MELEE } from "../item/arme.js"
|
||||
import { Misc } from "../misc.js"
|
||||
import { RdDBonus } from "../rdd-bonus.js"
|
||||
import { CARACS } from "../rdd-carac.js"
|
||||
import { RdDCombatManager } from "../rdd-combat.js"
|
||||
import { RdDEmpoignade } from "../rdd-empoignade.js"
|
||||
import { DIFF, ROLL_TYPE_ATTAQUE, ROLL_TYPE_COMP } from "./roll-constants.mjs"
|
||||
import RollDialog from "./roll-dialog.mjs"
|
||||
@@ -17,9 +20,9 @@ export const PART_ATTAQUE = 'attaque'
|
||||
|
||||
const TACTIQUES = RdDBonus.tactiques.filter(it => it.isTactique)
|
||||
|
||||
const FILTER_ATTAQUE_EMPOIGNADE = attaque => attaque.arme.isEmpoignade()
|
||||
const FILTER_ATTAQUE_NON_EMPOIGNADE = attaque => !attaque.arme.isEmpoignade()
|
||||
const FILTER_ATTAQUE_EMPOIGNE = attaque => attaque.arme.isUtilisableEmpoigne() && ATTAQUE_TYPE_MELEE.includes(attaque.main)
|
||||
const FILTER_ATTAQUE_EMPOIGNADE = attaque => attaque.arme?.isEmpoignade()
|
||||
const FILTER_ATTAQUE_RANG = rang => attaque => !attaque.arme?.isEmpoignade() && (attaque.rang == rang || rang == undefined)
|
||||
const FILTER_ATTAQUE_EMPOIGNE = attaque => attaque.arme?.isUtilisableEmpoigne() && ATTAQUE_TYPE_MELEE.includes(attaque.main)
|
||||
|
||||
export class RollPartAttaque extends RollPartSelect {
|
||||
|
||||
@@ -33,8 +36,9 @@ export class RollPartAttaque extends RollPartSelect {
|
||||
loadRefs(rollData) {
|
||||
const refs = this.getRefs(rollData)
|
||||
const attaques = rollData.active.actor.listAttaques()
|
||||
.sort(Misc.descending(it => it.comp?.system.niveau ?? -8))
|
||||
refs.all = attaques.map(it => RollPartAttaque.$extractAttaque(it, rollData))
|
||||
this.filterAttaquesEmpoignade(rollData)
|
||||
this.filterAttaquesInitiative(rollData)
|
||||
refs.tactiques = TACTIQUES
|
||||
if (refs.attaques.length > 0) {
|
||||
const attaque = this.findAttaque(refs.attaques, this.getSaved(rollData))
|
||||
@@ -48,11 +52,13 @@ export class RollPartAttaque extends RollPartSelect {
|
||||
|
||||
restore(rollData) {
|
||||
const saved = this.getSaved(rollData) ?? {}
|
||||
this.setCurrent(rollData, {
|
||||
key: saved.key,
|
||||
tactique: saved.tactique,
|
||||
dmg: saved.dmg
|
||||
})
|
||||
if (saved.key) {
|
||||
this.setCurrent(rollData, {
|
||||
key: saved.key,
|
||||
tactique: saved.tactique,
|
||||
dmg: saved.dmg
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
store(rollData, targetData) {
|
||||
@@ -66,8 +72,10 @@ export class RollPartAttaque extends RollPartSelect {
|
||||
|
||||
|
||||
findAttaque(attaques, saved) {
|
||||
return attaques.find(at => at.arme.id == saved?.arme?.id &&
|
||||
at.comp.id == saved?.comp?.id
|
||||
return attaques.find(at => at.arme.id == (saved?.arme?.id ?? at.arme.id)
|
||||
&& at.comp.id == (saved?.comp?.id ?? at.comp.id)
|
||||
&& at.main == (saved?.main ?? at.main)
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
@@ -78,24 +86,27 @@ export class RollPartAttaque extends RollPartSelect {
|
||||
attaque.tactique = TACTIQUES[0]
|
||||
attaque.initialDiff = attaque.comp?.system.default_diffLibre ?? 0
|
||||
attaque.distance = Distance.ajustements(rollData.active?.token, rollData.opponent?.token, attaque)
|
||||
attaque.rang = RdDInitiative.phaseArme(attaque.comp?.system.categorie, attaque.arme)?.rang
|
||||
return attaque
|
||||
}
|
||||
|
||||
prepareContext(rollData) {
|
||||
this.filterAttaquesEmpoignade(rollData)
|
||||
this.filterAttaquesInitiative(rollData)
|
||||
const current = this.getCurrent(rollData)
|
||||
current.dmg = RdDBonus.dmgRollV2(rollData, current)
|
||||
}
|
||||
|
||||
filterAttaquesEmpoignade(rollData) {
|
||||
filterAttaquesInitiative(rollData) {
|
||||
const refs = this.getRefs(rollData)
|
||||
const isEmpoignade = RdDEmpoignade.isCombatantEmpoignade(rollData.ids.actorId, rollData.ids.actorTokenId)
|
||||
const rang = RdDCombatManager.getRangInitiativeCombatant(rollData.ids.actorId, rollData.ids.actorTokenId)
|
||||
const isEmpoignade = MAP_PHASE.empoignade.rang == rang
|
||||
//const isEmpoignade = RdDEmpoignade.isCombatantEmpoignade(rollData.ids.actorId, rollData.ids.actorTokenId)
|
||||
refs.isEmpoignadeEnCours = RdDEmpoignade.isEmpoignadeEnCours(rollData.active.actor)
|
||||
const filterAttaques = isEmpoignade ?
|
||||
FILTER_ATTAQUE_EMPOIGNADE
|
||||
: refs.isEmpoignadeEnCours
|
||||
? FILTER_ATTAQUE_EMPOIGNE
|
||||
: FILTER_ATTAQUE_NON_EMPOIGNADE
|
||||
: FILTER_ATTAQUE_RANG(rang)
|
||||
refs.attaques = refs.all.filter(filterAttaques)
|
||||
}
|
||||
|
||||
@@ -168,8 +179,8 @@ export class RollPartAttaque extends RollPartSelect {
|
||||
if (this.visible(rollData)) {
|
||||
const current = this.getCurrent(rollData)
|
||||
switch (part.code) {
|
||||
case PART_CARAC: return part.filterCaracs(rollData, [current.carac.key])
|
||||
case PART_COMP: return part.filterComps(rollData, [current.comp.name])
|
||||
case PART_CARAC: return part.filterCaracs(rollData, [current.carac?.key])
|
||||
case PART_COMP: return part.filterComps(rollData, [current.comp?.name])
|
||||
case PART_DIFF: {
|
||||
if (Distance.typeAttaqueDistance(current)) {
|
||||
part.setDiff(rollData, { type: DIFF.DEFAUT })
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Grammar } from "../grammar.js"
|
||||
import { Misc } from "../misc.js"
|
||||
import { PART_CARAC } from "./roll-part-carac.mjs"
|
||||
import { PART_DIFF } from "./roll-part-diff.mjs"
|
||||
import { RollPartSelect } from "./roll-part-select.mjs"
|
||||
import { ROLLDIALOG_SECTION } from "./roll-part.mjs"
|
||||
|
||||
@@ -15,15 +17,21 @@ export class RollPartComp extends RollPartSelect {
|
||||
get name() { return 'Compétences' }
|
||||
get section() { return ROLLDIALOG_SECTION.COMP }
|
||||
|
||||
onReady(rollParts) {
|
||||
this.rollPartCarac = rollParts.find(it => it.code == PART_CARAC)
|
||||
this.rollPartDiff = rollParts.find(it => it.code == PART_DIFF)
|
||||
}
|
||||
|
||||
loadRefs(rollData) {
|
||||
const refs = this.getRefs(rollData)
|
||||
const selected = this.getSelected(rollData)
|
||||
const all = this.$getActorComps(rollData)
|
||||
if (selected.forced) {
|
||||
refs.all = all.filter(comp => Grammar.equalsInsensitive(comp.label, selected.key))
|
||||
const selectedComp = selected.key
|
||||
if (selected.forced && selectedComp) {
|
||||
refs.all = all.filter(comp => Grammar.equalsInsensitive(comp.label, selectedComp))
|
||||
if (refs.all.length == 0) {
|
||||
if (selected.key.length > 0) {
|
||||
refs.all = all.filter(comp => Grammar.includesLowerCaseNoAccent(comp.label, selected.key))
|
||||
if (selected.key && selected.key.length > 0) {
|
||||
refs.all = all.filter(comp => Grammar.includesLowerCaseNoAccent(comp.label, selectedComp))
|
||||
}
|
||||
else {
|
||||
refs.all = all.filter(comp => comp == SANS_COMPETENCE)
|
||||
@@ -35,6 +43,11 @@ export class RollPartComp extends RollPartSelect {
|
||||
}
|
||||
refs.comps = refs.all
|
||||
this.$selectComp(rollData)
|
||||
if (rollData.type.current == PART_COMP && selectedComp) {
|
||||
const current = this.getCurrent(rollData)
|
||||
this.rollPartCarac.selectByKey(rollData, current.comp.system.defaut_carac)
|
||||
this.rollPartDiff.setDiff(rollData, current.comp.system.default_diffLibre)
|
||||
}
|
||||
}
|
||||
|
||||
choices(refs) { return refs.comps }
|
||||
@@ -71,6 +84,7 @@ export class RollPartComp extends RollPartSelect {
|
||||
refs.comps.sort(sorting)
|
||||
}
|
||||
this.$selectComp(rollData)
|
||||
|
||||
}
|
||||
|
||||
prepareContext(rollData) {
|
||||
|
||||
@@ -10,7 +10,7 @@ export class RollPartConditions extends RollPart {
|
||||
settingMin() { return RollPart.settingKey(this, 'min') }
|
||||
settingMax() { return RollPart.settingKey(this, 'max') }
|
||||
|
||||
onReady() {
|
||||
onReady(rollParts) {
|
||||
game.settings.register(SYSTEM_RDD, this.settingMin(),
|
||||
{
|
||||
name: "Malus maximal de conditions",
|
||||
@@ -65,12 +65,7 @@ export class RollPartConditions extends RollPart {
|
||||
async _onRender(rollDialog, context, options) {
|
||||
const input = rollDialog.element.querySelector(`roll-section[name="${this.code}"] input[name="${this.code}"]`)
|
||||
|
||||
input?.addEventListener("input", e => this.onInputChange(e, rollDialog))
|
||||
}
|
||||
|
||||
onInputChange(event, rollDialog) {
|
||||
this.getCurrent(rollDialog.rollData).value = parseInt(event.currentTarget.value)
|
||||
rollDialog.render()
|
||||
input?.addEventListener("input", e => this.onNumericInputChange(e, rollDialog))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import { ROLLDIALOG_SECTION, RollPart } from "./roll-part.mjs"
|
||||
export const PART_CUISINE = "cuisine"
|
||||
|
||||
export class RollPartCuisine extends RollPartSelect {
|
||||
onReady() {
|
||||
onReady(rollParts) {
|
||||
foundry.applications.handlebars.loadTemplates({ 'roll-oeuvre-recettecuisine': `systems/foundryvtt-reve-de-dragon/templates/roll/roll-oeuvre-recettecuisine.hbs` })
|
||||
}
|
||||
|
||||
|
||||
@@ -73,12 +73,7 @@ export class RollPartDiff extends RollPart {
|
||||
async _onRender(rollDialog, context, options) {
|
||||
const input = rollDialog.element.querySelector(`roll-section[name="${this.code}"] input[name="${this.code}"]`)
|
||||
|
||||
input?.addEventListener("input", e => this.onInputChange(e, rollDialog))
|
||||
}
|
||||
|
||||
onInputChange(event, rollDialog) {
|
||||
this.getCurrent(rollDialog.rollData).value = parseInt(event.currentTarget.value)
|
||||
rollDialog.render()
|
||||
input?.addEventListener("input", e => this.onNumericInputChange(e, rollDialog))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,7 +24,7 @@ const ARTS = [
|
||||
]
|
||||
|
||||
export class RollPartOeuvre extends RollPartSelect {
|
||||
onReady() {
|
||||
onReady(rollParts) {
|
||||
ARTS.forEach(art => art.label = Misc.typeName('Item', art.type))
|
||||
ARTS.map(it => `roll-oeuvre-${it.type}`)
|
||||
.forEach(art =>
|
||||
|
||||
@@ -12,7 +12,7 @@ export const PART_SORT = "sort"
|
||||
|
||||
export class RollPartSort extends RollPartSelect {
|
||||
|
||||
onReady() {
|
||||
onReady(rollParts) {
|
||||
// TODO: utiliser un hook pour écouter les déplacements dans les TMRs?
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { ALL_ROLL_TYPES } from "./roll-dialog.mjs"
|
||||
|
||||
export const ROLLDIALOG_SECTION = {
|
||||
ACTION: 'action',
|
||||
CARAC: 'carac',
|
||||
@@ -9,7 +7,6 @@ export const ROLLDIALOG_SECTION = {
|
||||
AJUSTEMENTS: 'ajustements',
|
||||
}
|
||||
|
||||
|
||||
export class RollPart {
|
||||
static settingKey(rollPart, key) { return `roll-part-${rollPart.code}.${key}` }
|
||||
|
||||
@@ -75,7 +72,7 @@ export class RollPart {
|
||||
isValid(rollData) { return true }
|
||||
visible(rollData) { return true }
|
||||
|
||||
onReady() { }
|
||||
onReady(rollParts) { }
|
||||
loadRefs(rollData) { }
|
||||
|
||||
prepareContext(rollData) { }
|
||||
@@ -103,4 +100,13 @@ export class RollPart {
|
||||
async _onRender(rollDialog, context, options) { }
|
||||
|
||||
getHooks() { return [] }
|
||||
|
||||
onNumericInputChange(event, rollDialog, setValue = value => this.getCurrent(rollDialog.rollData).value = value) {
|
||||
if (isNaN(event.currentTarget.value) || event.currentTarget.value == "") {
|
||||
return
|
||||
}
|
||||
setValue(parseInt(event.currentTarget.value))
|
||||
rollDialog.render()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,8 +5,6 @@ const DEFAULT_DIFF_TYPES = [DIFF.LIBRE, DIFF.IMPOSEE, DIFF.DEFAUT]
|
||||
|
||||
export class RollType {
|
||||
|
||||
onReady() { }
|
||||
|
||||
get code() { throw new Error(`Pas de code défini pour ${this}`) }
|
||||
get name() { return this.code }
|
||||
get icon() { return `systems/foundryvtt-reve-de-dragon/assets/actions/${this.code}.svg` }
|
||||
|
||||
@@ -160,6 +160,7 @@ export class StatusEffects extends FormApplication {
|
||||
foundry.utils.mergeObject(options, {
|
||||
id: "status-effects",
|
||||
template: "systems/foundryvtt-reve-de-dragon/templates/settings/status-effects.hbs",
|
||||
classes: ["rdd-dialog", "status-effects"],
|
||||
height: 800,
|
||||
width: 350,
|
||||
minimizable: false,
|
||||
|
||||
@@ -22,7 +22,7 @@ export class AppAstrologie extends Application {
|
||||
title: "Astrologie",
|
||||
width: 'fit-content',
|
||||
height: 'fit-content',
|
||||
classes: ['calendar-astrologie'],
|
||||
classes: ['rdd-calendar-astrologie'],
|
||||
popOut: true,
|
||||
resizable: false
|
||||
}, { inplace: false })
|
||||
|
||||
@@ -94,8 +94,8 @@ export class RdDCalendrier extends Application {
|
||||
_getHeaderButtons() {
|
||||
if (game.user.isGM) {
|
||||
return [
|
||||
{ class: "calendar-astrologie", icon: "fa-solid fa-moon-over-sun", onclick: ev => this.showAstrologieEditor() },
|
||||
{ class: "calendar-set-datetime", icon: "fa-solid fa-calendar-pen", onclick: ev => this.showCalendarEditor() },
|
||||
{ class: "button-calendar-astrologie", icon: "fa-solid fa-moon-over-sun", onclick: ev => this.showAstrologieEditor() },
|
||||
{ class: "button-calendar-set-datetime", icon: "fa-solid fa-calendar-pen", onclick: ev => this.showCalendarEditor() },
|
||||
]
|
||||
}
|
||||
return []
|
||||
@@ -144,12 +144,12 @@ export class RdDCalendrier extends Application {
|
||||
const h = this.html.find(event.currentTarget)?.data('heure');
|
||||
this.positionnerHeure(Number(h));
|
||||
})
|
||||
this.html.find('.calendar-set-datetime').click(ev => {
|
||||
this.html.find('.button-calendar-set-datetime').click(ev => {
|
||||
ev.preventDefault();
|
||||
this.showCalendarEditor();
|
||||
});
|
||||
|
||||
this.html.find('.calendar-astrologie').click(ev => {
|
||||
this.html.find('.button-calendar-astrologie').click(ev => {
|
||||
ev.preventDefault();
|
||||
this.showAstrologieEditor();
|
||||
});
|
||||
|
||||
@@ -3,4 +3,10 @@
|
||||
<span class="carac-label" name="carac-total">Total Caractéristiques</span>
|
||||
<span class="competence-value" name="carac-total-value">{{calc.caracTotal}} </span>
|
||||
</li>
|
||||
{{#if @root.options.isGM}}
|
||||
<li class="caracteristique flexrow">
|
||||
<span class="carac-label" name="carac-total">Total XP Caractéristiques</span>
|
||||
<span class="competence-value" name="carac-total-xp">{{calc.caracTotalXp}} </span>
|
||||
</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{{#each item.actions as |action|}}
|
||||
{{#if action.placeholder}}
|
||||
{{else if (item-action-applies action ../item ../options)}}
|
||||
<a class="actionItem" data-tooltip="{{action.label}}" data-code="{{action.code}}">
|
||||
<a class="actionItem" data-tooltip="{{item-action-label action ../item}}" data-code="{{action.code}}">
|
||||
{{item-action-img action ../item}}
|
||||
</a>
|
||||
{{/if}}
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
<span class="generic-label">Total XP compétences</span>
|
||||
<span class="competence-value">{{calc.competenceXPTotal}}</span>
|
||||
</li>
|
||||
<li class="flexrow">
|
||||
<span class="generic-label">Total XP sorts</span>
|
||||
<span class="competence-value">{{calc.sortsXPTotal}}</span>
|
||||
</li>
|
||||
{{/if}}
|
||||
<li> </li>
|
||||
</ul>
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="chat-details">
|
||||
</div>
|
||||
|
||||
<div class="chat-actions">
|
||||
{{#unless (eq active.surprise.key 'totale')}}
|
||||
<a class='chat-card-button button-defense'>
|
||||
@@ -45,7 +42,4 @@
|
||||
{{/unless}}
|
||||
{{> 'partial-encaissement'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
</div>
|
||||
</div>
|
||||
@@ -5,5 +5,5 @@
|
||||
{{else if (eq perteMoralEchec 'perte')}}et échoué, votre moral baisse à {{moral}}.
|
||||
{{else}}et réussi, votre moral reste de {{moral}}.
|
||||
{{/if}}
|
||||
<span>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<span class="message-metadata heure-rdd">
|
||||
<span class="heure-rdd">
|
||||
{{this.jourDuMois}} {{this.mois.label}} {{timestamp-imgSigne this.heure}}
|
||||
</span>
|
||||
@@ -23,6 +23,7 @@
|
||||
{{/if}}
|
||||
{{> 'partial-info-appel-moral'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-description">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.cuisine.recette.system}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
{{> 'partial-recul-choc'}}
|
||||
{{> 'partial-encaissement'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
{{> 'partial-apprecier'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-description">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.jeu.jeu.system}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -51,6 +51,4 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
{{> 'partial-apprecier'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
|
||||
<div class="chat-description">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-description.hbs" current.oeuvre.oeuvre.system}}
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
{{> 'partial-appel-chance'}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -34,10 +34,4 @@
|
||||
actuels: {{type.possession.compteur}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="chat-actions">
|
||||
</div>
|
||||
|
||||
<div class="chat-buttons">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
{{else}}votre moral baisse de 1.
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
<div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{#if current.key}}
|
||||
<subline>
|
||||
<select name="select-attaque" {{#if rollData.type.retry}}disabled{{/if}}>
|
||||
{{selectOptions refs.attaques selected=current.key valueAttr="key" labelAttr="label"}}
|
||||
@@ -69,20 +70,18 @@
|
||||
<subline><hr></subline>
|
||||
<subline>
|
||||
<span>
|
||||
<strong>Attaque à distance</strong> {{current.main}} difficulté proposée de <strong>{{current.distance.total}}</strong> à valider par le Gardien
|
||||
<strong>Attaque à distance</strong> {{current.main}} difficulté proposée de <strong>{{plusMoins current.distance.total}}</strong> à valider par le Gardien
|
||||
</span>
|
||||
</subline>
|
||||
<subline></subline>
|
||||
<subline>
|
||||
<ul>
|
||||
<li>Avec les murs et la lumière, la cible
|
||||
{{#if current.distance.isVisible}}est{{else}}n'est pas{{/if}} visible.
|
||||
</li>
|
||||
<li>La cible est à une distance {{#if (lt current.distance.distance 0)}}indéterminée{{else}}indicative de {{numberFormat current.distance.distance decimals=1}} mètres{{/if}}.</li>
|
||||
<li>Portée {{current.distance.portee.msg}} : {{current.distance.portee.diff}}</li>
|
||||
<li>Taille {{current.distance.taille.msg}}: {{current.distance.taille.diff}}</li>
|
||||
<li>Mouvement {{current.distance.activite.msg}}: {{current.distance.activite.diff}}</li>
|
||||
{{#unless current.distance.isVisible}}<li>Avec les murs et la lumière, la cible n'est pas visible.</li>{{/unless}}
|
||||
<li>Taille {{current.distance.taille.msg}}: {{plusMoins current.distance.taille.diff}}</li>
|
||||
<li>Portée {{current.distance.portee.msg}}: {{plusMoins current.distance.portee.diff}} (distance {{#if (lt current.distance.distance 0)}}indéterminée{{else}}indicative de {{numberFormat current.distance.distance decimals=1}} mètres{{/if}}). </li>
|
||||
<li>Mouvement {{current.distance.activite.msg}}: {{plusMoins current.distance.activite.diff}} (0 immobile, -3 actif, -4 en mouvement, -5 en zig-zag)</li>
|
||||
</ul>
|
||||
</subline>
|
||||
{{/if}}
|
||||
</roll-part-detail>
|
||||
</roll-part-detail>
|
||||
{{/if}}
|
||||
@@ -1,8 +1,7 @@
|
||||
<label for="{{code}}">Conditions</label>
|
||||
{{numberInput current.value
|
||||
name=name
|
||||
step=1
|
||||
min=current.min
|
||||
max=current.max
|
||||
disabled=rollData.type.retry
|
||||
}}
|
||||
<input type="number"
|
||||
name="{{name}}"
|
||||
value="{{current.value}}"
|
||||
pattern="^(-|+)?\d+$"
|
||||
min="{{current.min}}" max="{{current.max}}" step="1"
|
||||
{{#if rollData.type.retry}}disabled{{/if}}>
|
||||
|
||||
@@ -9,24 +9,23 @@
|
||||
{{#if current.recette}}
|
||||
<selected-numeric-value>{{plusMoins current.value}}</selected-numeric-value>
|
||||
{{else if current.ingredient}}
|
||||
{{numberInput current.value
|
||||
name='diff-var'
|
||||
step=1
|
||||
min=-10
|
||||
max=0
|
||||
disabled=rollData.type.retry
|
||||
}}
|
||||
<input type="number"
|
||||
name='diff-var'
|
||||
value="{{current.value}}"
|
||||
pattern="^(-|+)?\d+$"
|
||||
min="-10" max="0" step="1"
|
||||
{{#if rollData.type.retry}}disabled{{/if}}>
|
||||
{{/if}}
|
||||
</subline>
|
||||
<subline>
|
||||
<label for="proportions">Proportions</label>
|
||||
{{numberInput current.proportions
|
||||
<input type="number"
|
||||
name='proportions'
|
||||
step=1
|
||||
min=1
|
||||
max=(either current.proportionsMax 10)
|
||||
disabled=rollData.type.retry
|
||||
}}
|
||||
value="{{current.proportions}}"
|
||||
pattern="^\d+$"
|
||||
min="1" max="{{either current.proportionsMax 10}}" step="1"
|
||||
{{#if rollData.type.retry}}disabled{{/if}}>
|
||||
|
||||
{{#if (and current.sust (ne current.sust 1))}}<span>(× {{current.sust}})</span>{{/if}}
|
||||
</subline>
|
||||
<subline>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<subline>
|
||||
<label for="{{code}}">{{current.label}} </label>
|
||||
{{numberInput current.value
|
||||
name=name
|
||||
step=1
|
||||
min=current.min
|
||||
max=current.max
|
||||
disabled=(or rollData.type.retry current.disabled)
|
||||
}}
|
||||
<input type="number"
|
||||
name="{{name}}"
|
||||
value="{{current.value}}"
|
||||
pattern="^(-|+)?\d+$"
|
||||
min="{{current.min}}" max="{{current.max}}" step="1"
|
||||
{{#if (or rollData.type.retry current.disabled)}}disabled{{/if}}>
|
||||
</subline>
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
{{current.label}}
|
||||
</label>
|
||||
<label for="malusenc"></label>
|
||||
{{numberInput current.value
|
||||
<input type="number"
|
||||
name='malusenc'
|
||||
step=1
|
||||
min=-30
|
||||
max=0
|
||||
disabled=rollData.type.retry
|
||||
}}
|
||||
value="{{current.value}}"
|
||||
pattern="^(-)?\d+$"
|
||||
min="-30" max="0" step="1"
|
||||
{{#if rollData.type.retry}}disabled{{/if}}>
|
||||
|
||||
@@ -8,13 +8,12 @@
|
||||
{{selectOptions refs.sorts selected=current.key valueAttr="key" labelAttr="label"}}
|
||||
</select>
|
||||
{{#if current.isDiffVariable}}
|
||||
{{numberInput current.value
|
||||
<input type="number"
|
||||
name='diff-var'
|
||||
step=1
|
||||
min=-20
|
||||
max=-1
|
||||
disabled=rollData.type.retry
|
||||
}}
|
||||
value="{{current.value}}"
|
||||
pattern="^(-)?\d+$"
|
||||
min="-20" max="-1" step="1"
|
||||
{{#if rollData.type.retry}}disabled{{/if}}>
|
||||
{{else}}
|
||||
<selected-numeric-value>{{plusMoins current.value}}</selected-numeric-value>
|
||||
{{/if}}
|
||||
@@ -23,13 +22,13 @@
|
||||
<label for="ptreve-var">Rêve {{itemSort-coutReve current.sort}} </span>
|
||||
</label>
|
||||
{{#if current.isReveVariable}}
|
||||
{{numberInput current.ptreve
|
||||
<input type="number"
|
||||
name='ptreve-var'
|
||||
step=1
|
||||
min=1
|
||||
max=30
|
||||
disabled=rollData.type.retry
|
||||
}}
|
||||
value="{{current.ptreve}}"
|
||||
pattern="^\d+$"
|
||||
min="{{1}}" max="{{60}}" step="1"
|
||||
{{#if rollData.type.retry}}disabled{{/if}}>
|
||||
|
||||
{{/if}}
|
||||
<span> (actuel: {{rollData.active.actor.system.reve.reve.value}})</span>
|
||||
</subline>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<label for="{{name}}">Forcer </label>
|
||||
<img src="systems/foundryvtt-reve-de-dragon/assets/ui/d100.svg" data-tooltip="Forcer le résultat du jet de dé"/>
|
||||
{{numberInput current.resultat
|
||||
name=name
|
||||
step=1
|
||||
min=-1
|
||||
max=100
|
||||
}}
|
||||
<input type="number"
|
||||
name="{{name}}"
|
||||
value="{{current.resultat}}"
|
||||
pattern="^(-|+)?\d+$"
|
||||
min="-1" max="100" step="1">
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<form class="app-calendar-astrologie" autocomplete="off">
|
||||
<div class="flexrow">
|
||||
<div class="flex-grow">
|
||||
<div class="header-fields">
|
||||
<h1 class="charname">Astrologie {{#if isActor}}: {{actorAstrologie.actor.name}}{{/if}}</h1>
|
||||
</div>
|
||||
{{#if isActor}}
|
||||
{{> 'systems/foundryvtt-reve-de-dragon/templates/sommeil/astrologie-joueur.hbs'}}
|
||||
{{else}}
|
||||
{{> 'systems/foundryvtt-reve-de-dragon/templates/sommeil/astrologie-gardien.hbs'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div>
|
||||
{{> 'systems/foundryvtt-reve-de-dragon/templates/sommeil/astrologie-theme.hbs'}}
|
||||
<form class="rdd-calendar-astrologie" autocomplete="off">
|
||||
<div class="flexrow">
|
||||
<div class="flexcol flex-grow">
|
||||
<div class="header-fields">
|
||||
<h1 class="charname">Astrologie {{#if isActor}}: {{actorAstrologie.actor.name}}{{/if}}</h1>
|
||||
</div>
|
||||
{{#if isActor}}
|
||||
{{> 'systems/foundryvtt-reve-de-dragon/templates/sommeil/astrologie-joueur.hbs'}}
|
||||
{{else}}
|
||||
{{> 'systems/foundryvtt-reve-de-dragon/templates/sommeil/astrologie-gardien.hbs'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div>
|
||||
{{> 'systems/foundryvtt-reve-de-dragon/templates/sommeil/astrologie-theme.hbs'}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||