Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 43ecca8be1 | |||
| e21f7e398a | |||
| e16f89743a | |||
| a6c593c100 |
13
changelog.md
13
changelog.md
@@ -1,4 +1,17 @@
|
|||||||
# 13.0
|
# 13.0
|
||||||
|
## 13.0.13 - L'épanouissement d'Illysis
|
||||||
|
|
||||||
|
- Fix d'erreur au chargement de templates RollDialog
|
||||||
|
- Nouvelle fenêtre de jets de dés
|
||||||
|
- Fix: affichage des points de tâche
|
||||||
|
- Fix: affichage des ajustements cohérent
|
||||||
|
- L'ouverture depuis les caractéristiques permet plusieurs types de jets
|
||||||
|
- On peut créer ou modifier les tâches dans la fenêtre de jets de tâches
|
||||||
|
- attaque/défense
|
||||||
|
- les maladresses sont affichées dans le résultat du jet
|
||||||
|
- le message au défenseur s'affiche correctement
|
||||||
|
- la difficulté d'attaque s'applique à la défense
|
||||||
|
- on peut choisir les particulières en rapidité
|
||||||
|
|
||||||
## 13.0.12 - La méditation d'Illysis
|
## 13.0.12 - La méditation d'Illysis
|
||||||
|
|
||||||
|
|||||||
@@ -707,6 +707,10 @@ select,
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
.system-foundryvtt-reve-de-dragon .chat-message div.roll-chat div.chat-details div,
|
||||||
|
.system-foundryvtt-reve-de-dragon .dialog-content div.roll-chat div.chat-details div {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
.system-foundryvtt-reve-de-dragon .chat-message div.roll-chat div.chat-actions,
|
.system-foundryvtt-reve-de-dragon .chat-message div.roll-chat div.chat-actions,
|
||||||
.system-foundryvtt-reve-de-dragon .dialog-content div.roll-chat div.chat-actions {
|
.system-foundryvtt-reve-de-dragon .dialog-content div.roll-chat div.chat-actions {
|
||||||
grid-area: actions;
|
grid-area: actions;
|
||||||
@@ -757,7 +761,10 @@ select,
|
|||||||
.system-foundryvtt-reve-de-dragon .window-header {
|
.system-foundryvtt-reve-de-dragon .window-header {
|
||||||
background: rgba(0, 0, 0, 0.75);
|
background: rgba(0, 0, 0, 0.75);
|
||||||
}
|
}
|
||||||
.system-foundryvtt-reve-de-dragon .application .window-content,
|
.system-foundryvtt-reve-de-dragon .application .window-content {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.2rem;
|
||||||
|
}
|
||||||
.system-foundryvtt-reve-de-dragon .window-app.sheet .window-content {
|
.system-foundryvtt-reve-de-dragon .window-app.sheet .window-content {
|
||||||
margin: 0.2rem;
|
margin: 0.2rem;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -1640,8 +1647,9 @@ select,
|
|||||||
height: 2rem;
|
height: 2rem;
|
||||||
}
|
}
|
||||||
.system-foundryvtt-reve-de-dragon .window-app .window-content,
|
.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 .window-app.sheet .window-content .sheet-body,
|
||||||
background: #f5f5f0 url(../assets/ui/bg_left.webp) no-repeat left top;
|
.system-foundryvtt-reve-de-dragon .application .window-content {
|
||||||
|
background: url(../assets/ui/bg_left.webp) no-repeat left top;
|
||||||
}
|
}
|
||||||
.system-foundryvtt-reve-de-dragon section.sheet-body {
|
.system-foundryvtt-reve-de-dragon section.sheet-body {
|
||||||
padding: 0.25rem 0.5rem;
|
padding: 0.25rem 0.5rem;
|
||||||
@@ -2316,7 +2324,7 @@ select,
|
|||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
.system-foundryvtt-reve-de-dragon div.horloge-roue div.horloge-cercle {
|
.system-foundryvtt-reve-de-dragon div.horloge-roue div.horloge-cercle {
|
||||||
background: hsl(60, 20%, 95%) url(../assets/ui/bg_left.webp) no-repeat left top;
|
background: hsla(60, 20%, 90%, 0.8);
|
||||||
top: 2%;
|
top: 2%;
|
||||||
left: 2%;
|
left: 2%;
|
||||||
width: 96%;
|
width: 96%;
|
||||||
|
|||||||
@@ -12,7 +12,10 @@
|
|||||||
background: rgba(0,0,0,0.75);
|
background: rgba(0,0,0,0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
.application .window-content,
|
.application .window-content {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.2rem;
|
||||||
|
}
|
||||||
.window-app.sheet .window-content {
|
.window-app.sheet .window-content {
|
||||||
margin: 0.2rem;
|
margin: 0.2rem;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -955,8 +958,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-app .window-content, .window-app.sheet .window-content .sheet-body{
|
.window-app .window-content,
|
||||||
background: rgb(245,245,240) url(../assets/ui/bg_left.webp) no-repeat left top;
|
.window-app.sheet .window-content .sheet-body,
|
||||||
|
.application .window-content {
|
||||||
|
background: url(../assets/ui/bg_left.webp) no-repeat left top;
|
||||||
}
|
}
|
||||||
|
|
||||||
section.sheet-body {
|
section.sheet-body {
|
||||||
@@ -1677,7 +1682,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.horloge-roue div.horloge-cercle {
|
div.horloge-roue div.horloge-cercle {
|
||||||
background: hsl(60, 20%, 95%) url(../assets/ui/bg_left.webp) no-repeat left top;
|
background: hsla(60, 20%, 90%, 0.8);
|
||||||
top: 2%; left: 2%; width: 96%; height: 96%; border-radius: 50%;
|
top: 2%; left: 2%; width: 96%; height: 96%; border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,9 @@
|
|||||||
text-align: justify;
|
text-align: justify;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
div {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
div.chat-actions {
|
div.chat-actions {
|
||||||
grid-area: actions;
|
grid-area: actions;
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async createEmptyTache() {
|
async createEmptyTache() {
|
||||||
await this.actor.createItem('tache', 'Nouvelle tache');
|
await this.actor.createItem(ITEM_TYPES.tache, 'Nouvelle tache')
|
||||||
}
|
}
|
||||||
|
|
||||||
_getActionCombat(event) {
|
_getActionCombat(event) {
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ export class RdDBaseActorReve extends RdDBaseActor {
|
|||||||
if (OptionsAvancees.isUsing(ROLL_DIALOG_V2)) {
|
if (OptionsAvancees.isUsing(ROLL_DIALOG_V2)) {
|
||||||
const rollData = {
|
const rollData = {
|
||||||
ids: { actorId: this.id },
|
ids: { actorId: this.id },
|
||||||
type: { allowed: [PART_COMP], current: PART_COMP },
|
type: { allowed: DEFAULT_ROLL_TYPES, current: PART_COMP },
|
||||||
selected: {
|
selected: {
|
||||||
carac: { key: caracName },
|
carac: { key: caracName },
|
||||||
comp: options.resistance ? { key: undefined, forced: true } : undefined
|
comp: options.resistance ? { key: undefined, forced: true } : undefined
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const RDD_CONFIG = {
|
|||||||
particuliere: {
|
particuliere: {
|
||||||
force: { key: 'force', descr: 'en force', img: 'systems/foundryvtt-reve-de-dragon/assets/ui/part-force.svg'},
|
force: { key: 'force', descr: 'en force', img: 'systems/foundryvtt-reve-de-dragon/assets/ui/part-force.svg'},
|
||||||
finesse: { key: 'finesse', descr: 'en finesse', img: 'systems/foundryvtt-reve-de-dragon/assets/ui/part-finesse.svg'},
|
finesse: { key: 'finesse', descr: 'en finesse', img: 'systems/foundryvtt-reve-de-dragon/assets/ui/part-finesse.svg'},
|
||||||
rapidite: { key: 'finesse', descr: 'en rapidité', img: 'systems/foundryvtt-reve-de-dragon/assets/ui/part-rapidite.svg'},
|
rapidite: { key: 'rapidite', descr: 'en rapidité', img: 'systems/foundryvtt-reve-de-dragon/assets/ui/part-rapidite.svg'},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export class RdDBonus {
|
|||||||
penetration: RdDBonus._peneration(rollData),
|
penetration: RdDBonus._peneration(rollData),
|
||||||
dmgTactique: RdDBonus.dmgBonus(rollData.tactique),
|
dmgTactique: RdDBonus.dmgBonus(rollData.tactique),
|
||||||
dmgParticuliere: RdDBonus._dmgParticuliere(rollData),
|
dmgParticuliere: RdDBonus._dmgParticuliere(rollData),
|
||||||
dmgSurprise: RdDBonus.dmgBonus(rollData.ajustements?.attaqueDefenseurSurpris.used),
|
dmgSurprise: RdDBonus.dmgBonus(rollData.ajustements?.attaqueDefenseurSurpris?.used),
|
||||||
mortalite: RdDBonus._calculMortalite(rollData, isEntiteIncarnee),
|
mortalite: RdDBonus._calculMortalite(rollData, isEntiteIncarnee),
|
||||||
dmgActor: RdDBonus.bonusDmg(actor, rollData.selectedCarac?.label.toLowerCase(), dmgArme),
|
dmgActor: RdDBonus.bonusDmg(actor, rollData.selectedCarac?.label.toLowerCase(), dmgArme),
|
||||||
dmgForceInsuffisante: Math.min(0, actor.getForce() - forceRequise)
|
dmgForceInsuffisante: Math.min(0, actor.getForce() - forceRequise)
|
||||||
|
|||||||
@@ -15,9 +15,8 @@ import { RdDItemCompetence } from "./item-competence.js";
|
|||||||
import { MAP_PHASE, RdDInitiative } from "./initiative.mjs";
|
import { MAP_PHASE, RdDInitiative } from "./initiative.mjs";
|
||||||
import RollDialog from "./roll/roll-dialog.mjs";
|
import RollDialog from "./roll/roll-dialog.mjs";
|
||||||
import { PART_DEFENSE } from "./roll/roll-part-defense.mjs";
|
import { PART_DEFENSE } from "./roll/roll-part-defense.mjs";
|
||||||
import { RollDialogAdapter } from "./roll/roll-dialog-adapter.mjs";
|
import { DIFF, ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE } from "./roll/roll-constants.mjs";
|
||||||
import { ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE } from "./roll/roll-constants.mjs";
|
import { OptionsAvancees, ROLL_DIALOG_V2 } from "./settings/options-avancees.js";
|
||||||
import { OptionsAvancees, ROLL_DIALOG_V2, ROLL_DIALOG_V2_TEST } from "./settings/options-avancees.js";
|
|
||||||
import { MappingCreatureArme } from "./item/mapping-creature-arme.mjs";
|
import { MappingCreatureArme } from "./item/mapping-creature-arme.mjs";
|
||||||
import { RollBasicParts } from "./roll/roll-basic-parts.mjs";
|
import { RollBasicParts } from "./roll/roll-basic-parts.mjs";
|
||||||
|
|
||||||
@@ -380,7 +379,7 @@ export class RdDCombat {
|
|||||||
if (defenderToken && Misc.isFirstConnectedGM()) {
|
if (defenderToken && Misc.isFirstConnectedGM()) {
|
||||||
const rddCombat = RdDCombat.rddCombatForAttackerAndDefender(msg.attackerId, msg.attackerToken.id, msg.defenderToken.id)
|
const rddCombat = RdDCombat.rddCombatForAttackerAndDefender(msg.attackerId, msg.attackerToken.id, msg.defenderToken.id)
|
||||||
rddCombat?.removeChatMessageActionsPasseArme(msg.paramChatDefense.attackerRoll.passeArme)
|
rddCombat?.removeChatMessageActionsPasseArme(msg.paramChatDefense.attackerRoll.passeArme)
|
||||||
if (msg.defenderRoll.ids) {/* TODO: delete roll V1 */
|
if (msg.defenderRoll.v2) {/* TODO: delete roll V1 */
|
||||||
RollDialog.loadRollData(msg.paramChatDefense)
|
RollDialog.loadRollData(msg.paramChatDefense)
|
||||||
rddCombat?._chatMessageDefenseV2(msg.paramChatDefense)
|
rddCombat?._chatMessageDefenseV2(msg.paramChatDefense)
|
||||||
} else {
|
} else {
|
||||||
@@ -561,7 +560,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static isEchecTotal(rollData) {
|
static isEchecTotal(rollData) {
|
||||||
if (rollData.ids /* roll V2*/) {
|
if (rollData.v2 /* roll V2*/) {
|
||||||
// TODO: en cas de demi-surprise à l'attaque, tout échec est un echec total.
|
// TODO: en cas de demi-surprise à l'attaque, tout échec est un echec total.
|
||||||
// TODO: en cas de demi-surprise en défense, pas de changement à la règle de base
|
// TODO: en cas de demi-surprise en défense, pas de changement à la règle de base
|
||||||
return rollData.rolled.isETotal
|
return rollData.rolled.isETotal
|
||||||
@@ -575,7 +574,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static isParticuliere(rollData) {
|
static isParticuliere(rollData) {
|
||||||
if (rollData.ids /* roll V2*/) {
|
if (rollData.v2 /* roll V2*/) {
|
||||||
return rollData.rolled.isPart
|
return rollData.rolled.isPart
|
||||||
}
|
}
|
||||||
if (rollData.attackerRoll || !rollData.ajustements.surprise.used) {
|
if (rollData.attackerRoll || !rollData.ajustements.surprise.used) {
|
||||||
@@ -586,7 +585,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static isReussite(rollData) {
|
static isReussite(rollData) {
|
||||||
if (rollData.ids /* roll V2*/) {
|
if (rollData.v2 /* roll V2*/) {
|
||||||
return rollData.rolled.isSuccess
|
return rollData.rolled.isSuccess
|
||||||
}
|
}
|
||||||
if (!rollData.ajustements.surprise.used) {
|
if (!rollData.ajustements.surprise.used) {
|
||||||
@@ -686,11 +685,7 @@ export class RdDCombat {
|
|||||||
async doRollAttaque(rollData, callbacks = []) {
|
async doRollAttaque(rollData, callbacks = []) {
|
||||||
// TODO V2 await this.proposerAjustementTirLancer(rollData)
|
// TODO V2 await this.proposerAjustementTirLancer(rollData)
|
||||||
await RollDialog.create(rollData, {
|
await RollDialog.create(rollData, {
|
||||||
onRollDone: (dialog) => {
|
onRollDone: RollDialog.onRollDoneClose,
|
||||||
if (!OptionsAvancees.isUsing(ROLL_DIALOG_V2_TEST))
|
|
||||||
dialog.close()
|
|
||||||
},
|
|
||||||
customChatMessage: true,
|
|
||||||
callbacks: [
|
callbacks: [
|
||||||
async (roll) => await this.onAttaqueV2(roll),
|
async (roll) => await this.onAttaqueV2(roll),
|
||||||
...callbacks
|
...callbacks
|
||||||
@@ -892,7 +887,10 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
isPossession(attackerRoll) {
|
isPossession(attackerRoll) {
|
||||||
return attackerRoll.selectedCarac.label.toLowerCase() == 'possession';
|
const carac = attackerRoll.v2
|
||||||
|
? attackerRoll.current.carac?.label
|
||||||
|
: attackerRoll.selectedCarac.label
|
||||||
|
return carac?.toLowerCase() == 'possession';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@@ -1067,7 +1065,7 @@ export class RdDCombat {
|
|||||||
opponentId: this.attackerId,
|
opponentId: this.attackerId,
|
||||||
},
|
},
|
||||||
type: { allowed: [ROLL_TYPE_DEFENSE], current: ROLL_TYPE_DEFENSE },
|
type: { allowed: [ROLL_TYPE_DEFENSE], current: ROLL_TYPE_DEFENSE },
|
||||||
attackerRoll: RollDialogAdapter.mapActionAttaque(attackerRoll),
|
attackerRoll: attackerRoll,
|
||||||
passeArme: attackerRoll.passeArme,
|
passeArme: attackerRoll.passeArme,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1075,7 +1073,6 @@ export class RdDCombat {
|
|||||||
async doRollDefense(rollData, callbacks = []) {
|
async doRollDefense(rollData, callbacks = []) {
|
||||||
await RollDialog.create(rollData, {
|
await RollDialog.create(rollData, {
|
||||||
onRollDone: RollDialog.onRollDoneClose,
|
onRollDone: RollDialog.onRollDoneClose,
|
||||||
customChatMessage: true,
|
|
||||||
callbacks: [
|
callbacks: [
|
||||||
async (roll) => {
|
async (roll) => {
|
||||||
this.removeChatMessageActionsPasseArme(roll.passeArme);
|
this.removeChatMessageActionsPasseArme(roll.passeArme);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ChatUtility } from "../chat-utility.js"
|
import { ChatUtility } from "../chat-utility.js"
|
||||||
import RollDialog from "./roll-dialog.mjs"
|
import RollDialog, { ALL_ROLL_TYPES } from "./roll-dialog.mjs"
|
||||||
import { RdDCarac } from "../rdd-carac.js"
|
import { RdDCarac } from "../rdd-carac.js"
|
||||||
import { RdDCombat } from "../rdd-combat.js"
|
import { RdDCombat } from "../rdd-combat.js"
|
||||||
import { ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE } from "./roll-constants.mjs"
|
import { ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE } from "./roll-constants.mjs"
|
||||||
@@ -22,8 +22,10 @@ export default class ChatRollResult {
|
|||||||
|
|
||||||
static onReady() {
|
static onReady() {
|
||||||
foundry.applications.handlebars.loadTemplates({
|
foundry.applications.handlebars.loadTemplates({
|
||||||
|
'partial-infojet': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-infojet.hbs',
|
||||||
'partial-appel-chance': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-appel-chance.hbs',
|
'partial-appel-chance': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-appel-chance.hbs',
|
||||||
'partial-attaque-particuliere': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-attaque-particuliere.hbs',
|
'partial-attaque-particuliere': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-attaque-particuliere.hbs',
|
||||||
|
'partial-choix-maladresse': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-choix-maladresse.hbs',
|
||||||
'partial-maladresse': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-maladresse.hbs',
|
'partial-maladresse': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-maladresse.hbs',
|
||||||
'partial-encaissement': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-encaissement.hbs',
|
'partial-encaissement': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-encaissement.hbs',
|
||||||
'partial-recul-choc': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-recul-choc.hbs',
|
'partial-recul-choc': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-recul-choc.hbs',
|
||||||
@@ -122,7 +124,7 @@ export default class ChatRollResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async buildRollHtml(roll) {
|
async buildRollHtml(roll) {
|
||||||
const template = `systems/foundryvtt-reve-de-dragon/templates/roll/result/chat-${roll.type.current}.hbs`
|
const template = ALL_ROLL_TYPES.find(it => it.code == roll.type.current).chatResultTemplate
|
||||||
const html = await renderTemplate(template, roll)
|
const html = await renderTemplate(template, roll)
|
||||||
return await RdDTextEditor.enrichHTML(html, undefined, { showLink: false })
|
return await RdDTextEditor.enrichHTML(html, undefined, { showLink: false })
|
||||||
}
|
}
|
||||||
@@ -137,7 +139,6 @@ export default class ChatRollResult {
|
|||||||
$(html).on("click", '.monter-tmr-normale', event => this.onClickMonteeTMR(event, 'normal'))
|
$(html).on("click", '.monter-tmr-normale', event => this.onClickMonteeTMR(event, 'normal'))
|
||||||
$(html).on("click", '.monter-tmr-rapide', event => this.onClickMonteeTMR(event, 'rapide'))
|
$(html).on("click", '.monter-tmr-rapide', event => this.onClickMonteeTMR(event, 'rapide'))
|
||||||
$(html).on("click", '.tirer-maladresse', event => this.onClickTirerMaladresse(event))
|
$(html).on("click", '.tirer-maladresse', event => this.onClickTirerMaladresse(event))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getCombat(roll) {
|
getCombat(roll) {
|
||||||
@@ -145,7 +146,7 @@ export default class ChatRollResult {
|
|||||||
case ROLL_TYPE_DEFENSE:
|
case ROLL_TYPE_DEFENSE:
|
||||||
return RdDCombat.rddCombatForAttackerAndDefender(roll.ids.opponentId, roll.ids.opponentTokenId, roll.ids.actorTokenId)
|
return RdDCombat.rddCombatForAttackerAndDefender(roll.ids.opponentId, roll.ids.opponentTokenId, roll.ids.actorTokenId)
|
||||||
case ROLL_TYPE_ATTAQUE:
|
case ROLL_TYPE_ATTAQUE:
|
||||||
return RdDCombat.rddCombatForAttackerAndDefender(roll.ids.actorId, roll.ids.actorTokenId, roll.ids.opponentId)
|
return RdDCombat.rddCombatForAttackerAndDefender(roll.ids.actorId, roll.ids.actorTokenId, roll.ids.opponentTokenId)
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
@@ -162,6 +163,7 @@ export default class ChatRollResult {
|
|||||||
await this.saveChatMessageRoll(chatMessage, savedRoll)
|
await this.saveChatMessageRoll(chatMessage, savedRoll)
|
||||||
const copy = foundry.utils.duplicate(savedRoll)
|
const copy = foundry.utils.duplicate(savedRoll)
|
||||||
RollDialog.loadRollData(copy)
|
RollDialog.loadRollData(copy)
|
||||||
|
savedRoll.dmg = copy.current.attaque?.dmg
|
||||||
this.prepareDisplay(copy)
|
this.prepareDisplay(copy)
|
||||||
chatMessage.update({ content: await this.buildRollHtml(copy) })
|
chatMessage.update({ content: await this.buildRollHtml(copy) })
|
||||||
chatMessage.render(true)
|
chatMessage.render(true)
|
||||||
@@ -248,7 +250,7 @@ export default class ChatRollResult {
|
|||||||
savedRoll.particuliere = choix
|
savedRoll.particuliere = choix
|
||||||
savedRoll.particulieres = [RDD_CONFIG.particuliere[choix]]
|
savedRoll.particulieres = [RDD_CONFIG.particuliere[choix]]
|
||||||
await this.updateChatMessage(chatMessage, savedRoll)
|
await this.updateChatMessage(chatMessage, savedRoll)
|
||||||
await this.getCombat(savedRoll)?.onAttaqueV2(savedRoll, callbacks)
|
await this.getCombat(savedRoll)?.onAttaqueV2(savedRoll)
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickFaireGouter(event) {
|
async onClickFaireGouter(event) {
|
||||||
@@ -273,8 +275,7 @@ export default class ChatRollResult {
|
|||||||
const chatMessage = ChatUtility.getChatMessage(event)
|
const chatMessage = ChatUtility.getChatMessage(event)
|
||||||
const typeMaladresse = event.currentTarget.attributes['data-maladresse'].value
|
const typeMaladresse = event.currentTarget.attributes['data-maladresse'].value
|
||||||
const savedRoll = this.loadChatMessageRoll(chatMessage)
|
const savedRoll = this.loadChatMessageRoll(chatMessage)
|
||||||
await RdDRollTables.getMaladresse({ arme: typeMaladresse == 'avec-arme' })
|
savedRoll.maladresse = await RdDRollTables.getMaladresse({ arme: typeMaladresse == 'avec-arme', toChat: false })
|
||||||
savedRoll.type.maladresse = true
|
|
||||||
savedRoll.type.retry = true
|
savedRoll.type.retry = true
|
||||||
await this.updateChatMessage(chatMessage, savedRoll)
|
await this.updateChatMessage(chatMessage, savedRoll)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ export const ATTAQUE_ROLL_TYPES = [ROLL_TYPE_ATTAQUE]
|
|||||||
export const COMBAT_ROLL_TYPES = [ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE]
|
export const COMBAT_ROLL_TYPES = [ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE]
|
||||||
export const DEMIREVE_ROLL_TYPES = [ROLL_TYPE_SORT]
|
export const DEMIREVE_ROLL_TYPES = [ROLL_TYPE_SORT]
|
||||||
export const DEFAULT_ROLL_TYPES = [ROLL_TYPE_COMP, ROLL_TYPE_TACHE, ROLL_TYPE_MEDITATION, ROLL_TYPE_CUISINE, ROLL_TYPE_OEUVRE, ROLL_TYPE_JEU]
|
export const DEFAULT_ROLL_TYPES = [ROLL_TYPE_COMP, ROLL_TYPE_TACHE, ROLL_TYPE_MEDITATION, ROLL_TYPE_CUISINE, ROLL_TYPE_OEUVRE, ROLL_TYPE_JEU]
|
||||||
export const ALL_ROLL_TYPES = [...DEFAULT_ROLL_TYPES, ...COMBAT_ROLL_TYPES, ...DEMIREVE_ROLL_TYPES]
|
|
||||||
|
|
||||||
|
|
||||||
export const DIFF = {
|
export const DIFF = {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { RdDItemArme } from "../item/arme.js";
|
|||||||
import { RdDBonus } from "../rdd-bonus.js";
|
import { RdDBonus } from "../rdd-bonus.js";
|
||||||
import { ITEM_TYPES, RDD_CONFIG } from "../constants.js";
|
import { ITEM_TYPES, RDD_CONFIG } from "../constants.js";
|
||||||
import { CARACS } from "../rdd-carac.js";
|
import { CARACS } from "../rdd-carac.js";
|
||||||
import { ROLL_TYPE_ATTAQUE, ROLL_TYPE_OEUVRE } from "./roll-constants.mjs";
|
import { ROLL_TYPE_ATTAQUE, ROLL_TYPE_DEFENSE, ROLL_TYPE_OEUVRE } from "./roll-constants.mjs";
|
||||||
import { PART_ATTAQUE } from "./roll-part-attaque.mjs";
|
import { PART_ATTAQUE } from "./roll-part-attaque.mjs";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@@ -27,8 +27,8 @@ export class RollDialogAdapter {
|
|||||||
RollDialogAdapter.setRollDataRolled(rollData, rolled, rollTitle)
|
RollDialogAdapter.setRollDataRolled(rollData, rolled, rollTitle)
|
||||||
RollDialogAdapter.adjustRollDataForV1(rollData)
|
RollDialogAdapter.adjustRollDataForV1(rollData)
|
||||||
RollDialogAdapter.adjustAttaqueParticuliere(rollData)
|
RollDialogAdapter.adjustAttaqueParticuliere(rollData)
|
||||||
|
RollDialogAdapter.adjustAttaqueDmg(rollData)
|
||||||
RollDialogAdapter.adjustDemiSurprise(rollData)
|
RollDialogAdapter.adjustDemiSurprise(rollData)
|
||||||
|
|
||||||
return rolled
|
return rolled
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,14 +96,7 @@ export class RollDialogAdapter {
|
|||||||
rolled.niveauNecessaire = RdDResolutionTable.findNiveauNecessaire(rollData.selectedCarac.value, rolled.roll)
|
rolled.niveauNecessaire = RdDResolutionTable.findNiveauNecessaire(rollData.selectedCarac.value, rolled.roll)
|
||||||
rolled.ajustementNecessaire = rolled.niveauNecessaire - diff
|
rolled.ajustementNecessaire = rolled.niveauNecessaire - diff
|
||||||
}
|
}
|
||||||
rollData.ajustements = rollData.ajustements.map(aj => {
|
rollData.ajustements = rollData.ajustements.map(aj => { return { label: aj.label, value: aj.value } })
|
||||||
return {
|
|
||||||
used: true,
|
|
||||||
label: aj.label,
|
|
||||||
value: aj.diff,
|
|
||||||
descr: aj.diff == undefined ? aj.label : undefined
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static adjustDemiSurprise(rollData) {
|
static adjustDemiSurprise(rollData) {
|
||||||
@@ -112,6 +105,18 @@ export class RollDialogAdapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static adjustAttaqueDmg(rollData) {
|
||||||
|
switch (rollData.type.current) {
|
||||||
|
case ROLL_TYPE_ATTAQUE:
|
||||||
|
rollData.dmg = RdDBonus.dmgRollV2(rollData, rollData.current.attaque)
|
||||||
|
break
|
||||||
|
case ROLL_TYPE_DEFENSE:
|
||||||
|
rollData.dmg = RdDBonus.dmgRollV2(rollData.attackerRoll, rollData.attackerRoll.current.attaque)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static adjustAttaqueParticuliere(rollData) {
|
static adjustAttaqueParticuliere(rollData) {
|
||||||
if (rollData.type.current != ROLL_TYPE_ATTAQUE || !rollData.rolled.isPart) {
|
if (rollData.type.current != ROLL_TYPE_ATTAQUE || !rollData.rolled.isPart) {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ import { ActorImpacts } from "../technical/actor-impacts.mjs";
|
|||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api
|
||||||
|
|
||||||
const ALL_ROLL_TYPES = [
|
export const ALL_ROLL_TYPES = [
|
||||||
new RollTypeComp(),
|
new RollTypeComp(),
|
||||||
new RollTypeTache(),
|
new RollTypeTache(),
|
||||||
new RollTypeAttaque(),
|
new RollTypeAttaque(),
|
||||||
@@ -175,11 +175,11 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
|||||||
{
|
{
|
||||||
static onCloseDoNothing() {
|
static onCloseDoNothing() {
|
||||||
}
|
}
|
||||||
static onRollDoneDoNothing(dialog) {
|
static onRollDoneDoNothing(dialog, roll) {
|
||||||
dialog.render()
|
dialog.render()
|
||||||
}
|
}
|
||||||
static onRollDoneClose(dialog) {
|
static onRollDoneClose(dialog, roll) {
|
||||||
if (!OptionsAvancees.isUsing(ROLL_DIALOG_V2_TEST))
|
if (roll.type.retry || !OptionsAvancees.isUsing(ROLL_DIALOG_V2_TEST))
|
||||||
dialog.close()
|
dialog.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
|||||||
|
|
||||||
ChatRollResult.onReady()
|
ChatRollResult.onReady()
|
||||||
|
|
||||||
foundry.applications.handlebars.loadTemplates(ALL_ROLL_TYPES.map(m => m.template))
|
foundry.applications.handlebars.loadTemplates(ALL_ROLL_TYPES.map(m => m.chatResultTemplate))
|
||||||
foundry.applications.handlebars.loadTemplates(ROLL_PARTS.map(p => p.template))
|
foundry.applications.handlebars.loadTemplates(ROLL_PARTS.map(p => p.template))
|
||||||
ROLL_PARTS.forEach(p => p.onReady())
|
ROLL_PARTS.forEach(p => p.onReady())
|
||||||
|
|
||||||
@@ -316,6 +316,7 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
|||||||
constructor(rollData, rollOptions) {
|
constructor(rollData, rollOptions) {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
|
this.hooks = []
|
||||||
this.rollData = RollDialog.$prepareRollData(rollData)
|
this.rollData = RollDialog.$prepareRollData(rollData)
|
||||||
this.rollOptions = {
|
this.rollOptions = {
|
||||||
callbacks: [
|
callbacks: [
|
||||||
@@ -323,14 +324,28 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
|||||||
async r => await r.active.actor.appliquerAppelMoral(r),
|
async r => await r.active.actor.appliquerAppelMoral(r),
|
||||||
...(rollOptions.callbacks ?? [])
|
...(rollOptions.callbacks ?? [])
|
||||||
],
|
],
|
||||||
customChatMessage: rollOptions.customChatMessage,
|
|
||||||
onRollDone: rollOptions.onRollDone ?? RollDialog.onRollDoneDoNothing,
|
onRollDone: rollOptions.onRollDone ?? RollDialog.onRollDoneDoNothing,
|
||||||
onClose: rollOptions.onClose ?? RollDialog.onCloseDoNothing
|
onClose: rollOptions.onClose ?? RollDialog.onCloseDoNothing
|
||||||
}
|
}
|
||||||
this.chatRollResult = new ChatRollResult();
|
this.chatRollResult = new ChatRollResult()
|
||||||
this.selectType()
|
this.selectType()
|
||||||
|
this.registerHooks(rollData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
registerHooks(rollData) {
|
||||||
|
ROLL_PARTS.filter(p => p.isValid(rollData))
|
||||||
|
.forEach(p => p.getHooks(this).forEach(h => {
|
||||||
|
const hook = h.hook;
|
||||||
|
const id = Hooks.on(hook, h.fn)
|
||||||
|
this.hooks.push({ hook, id })
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
unregisterHooks() {
|
||||||
|
this.hooks.forEach(h => Hooks.off(h.hook, h.id))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
selectType() {
|
selectType() {
|
||||||
const selectedType = this.getSelectedType();
|
const selectedType = this.getSelectedType();
|
||||||
this.rollData.type.label = selectedType.title(this.rollData)
|
this.rollData.type.label = selectedType.title(this.rollData)
|
||||||
@@ -386,7 +401,7 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
|||||||
return RollDialog.getActiveParts(rollData)
|
return RollDialog.getActiveParts(rollData)
|
||||||
.map(p => p.getAjustements(rollData))
|
.map(p => p.getAjustements(rollData))
|
||||||
.reduce((a, b) => a.concat(b))
|
.reduce((a, b) => a.concat(b))
|
||||||
.sort((a, b) => a.diff == undefined ? 1 : b.diff == undefined ? -1 : 0)
|
.sort((a, b) => a.value == undefined ? 1 : b.value == undefined ? -1 : 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
async buildHTMLTable(carac, diff) {
|
async buildHTMLTable(carac, diff) {
|
||||||
@@ -408,7 +423,7 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
|||||||
|
|
||||||
visibleRollParts.forEach(p => p.prepareContext(rollData))
|
visibleRollParts.forEach(p => p.prepareContext(rollData))
|
||||||
|
|
||||||
RollDialog.calculAjustements(rollData)
|
RollDialog.calculAjustement(rollData)
|
||||||
|
|
||||||
const templates = RollDialog.getActiveParts(rollData).map(p => p.toTemplateData())
|
const templates = RollDialog.getActiveParts(rollData).map(p => p.toTemplateData())
|
||||||
const context = await super._prepareContext()
|
const context = await super._prepareContext()
|
||||||
@@ -430,12 +445,11 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static calculAjustements(rollData) {
|
static calculAjustement(rollData) {
|
||||||
rollData.ajustements = RollDialog.getAjustements(rollData)
|
rollData.ajustements = RollDialog.getAjustements(rollData)
|
||||||
rollData.ajustements.forEach(it => it.isDiff = it.diff != undefined)
|
|
||||||
rollData.current.totaldiff = rollData.ajustements
|
rollData.current.totaldiff = rollData.ajustements
|
||||||
.map(adj => adj.diff)
|
.filter(a => a.value != undefined)
|
||||||
.filter(d => d != undefined)
|
.map(a => a.value)
|
||||||
.reduce(Misc.sum(), 0)
|
.reduce(Misc.sum(), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,10 +457,11 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
|||||||
return ALL_ROLL_TYPES.find(m => m.code == this.rollData.type.current)
|
return ALL_ROLL_TYPES.find(m => m.code == this.rollData.type.current)
|
||||||
}
|
}
|
||||||
|
|
||||||
async close(options){
|
async close(options) {
|
||||||
if (this.rollOptions.onClose){
|
if (this.rollOptions.onClose) {
|
||||||
this.rollOptions.onClose()
|
this.rollOptions.onClose()
|
||||||
}
|
}
|
||||||
|
this.unregisterHooks()
|
||||||
return await super.close(options)
|
return await super.close(options)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -475,13 +490,14 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
|
|||||||
await impacts.applyImpacts()
|
await impacts.applyImpacts()
|
||||||
selectedRollType.onApplyImpacts(roll, impacts)
|
selectedRollType.onApplyImpacts(roll, impacts)
|
||||||
await this.chatRollResult.display(roll, impacts)
|
await this.chatRollResult.display(roll, impacts)
|
||||||
this.rollOptions.onRollDone(this)
|
this.rollOptions.onRollDone(this, roll)
|
||||||
}
|
}
|
||||||
|
|
||||||
static loadRollData(roll) {
|
static loadRollData(roll) {
|
||||||
RollDialog.$prepareRollData(roll)
|
RollDialog.$prepareRollData(roll)
|
||||||
RollDialog.calculAjustements(roll)
|
RollDialog.calculAjustement(roll)
|
||||||
roll.v2 = true
|
roll.v2 = true
|
||||||
|
return roll
|
||||||
}
|
}
|
||||||
|
|
||||||
async defaultCallback(roll, rolled) {
|
async defaultCallback(roll, rolled) {
|
||||||
|
|||||||
@@ -63,14 +63,9 @@ export class RollPartAttaque extends RollPartSelect {
|
|||||||
|
|
||||||
getAjustements(rollData) {
|
getAjustements(rollData) {
|
||||||
const current = this.getCurrent(rollData)
|
const current = this.getCurrent(rollData)
|
||||||
const ajustements = []
|
const tactique = current.tactique ? [{ label: current.tactique.label, value: current.tactique.attaque }] : []
|
||||||
if (current.tactique) {
|
const surprise = rollData.opponent?.surprise ? [{ label: rollData.opponent.surprise.label, value: rollData.opponent.surprise.attaque }] : []
|
||||||
ajustements.push({ label: current.tactique.label, diff: current.tactique.attaque })
|
return [...tactique, ...surprise]
|
||||||
}
|
|
||||||
if (rollData.opponent?.surprise) {
|
|
||||||
ajustements.push({ label: rollData.opponent.surprise.label, diff: rollData.opponent.surprise.attaque })
|
|
||||||
}
|
|
||||||
return ajustements
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export class RollPartCheckbox extends RollPart {
|
|||||||
getAjustements(rollData) {
|
getAjustements(rollData) {
|
||||||
const current = this.getCurrent(rollData)
|
const current = this.getCurrent(rollData)
|
||||||
if (current.checked) {
|
if (current.checked) {
|
||||||
return [{ label: this.getCheckboxLabelAjustement(rollData), diff: current.value }]
|
return [{ label: this.getCheckboxLabelAjustement(rollData), value: current.value }]
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export class RollPartCoeur extends RollPartSelect {
|
|||||||
if (current.key != '') {
|
if (current.key != '') {
|
||||||
return [{
|
return [{
|
||||||
label: "Coeur pour " + current.label,
|
label: "Coeur pour " + current.label,
|
||||||
diff: current.value
|
value: current.value
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export class RollPartConditions extends RollPart {
|
|||||||
getAjustements(rollData) {
|
getAjustements(rollData) {
|
||||||
const current = this.getCurrent(rollData)
|
const current = this.getCurrent(rollData)
|
||||||
if (current.value != 0) {
|
if (current.value != 0) {
|
||||||
return [{ label: DESCR_CONDITIONS, diff: current.value }]
|
return [{ label: DESCR_CONDITIONS, value: current.value }]
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export class RollPartDefense extends RollPartSelect {
|
|||||||
isArmeDisparate(rollData) {
|
isArmeDisparate(rollData) {
|
||||||
const armeDefense = this.getCurrent(rollData).arme
|
const armeDefense = this.getCurrent(rollData).arme
|
||||||
if (armeDefense) {
|
if (armeDefense) {
|
||||||
const armeAttaque = rollData.attackerRoll?.arme
|
const armeAttaque = rollData.attackerRoll?.current.attaque.arme
|
||||||
return RdDItemArme.defenseArmeParade(armeAttaque, armeDefense) == 'sign'
|
return RdDItemArme.defenseArmeParade(armeAttaque, armeDefense) == 'sign'
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@@ -123,7 +123,11 @@ export class RollPartDefense extends RollPartSelect {
|
|||||||
return { diff: 0, type: DIFF.LIBRE }
|
return { diff: 0, type: DIFF.LIBRE }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return { diff: rollData.attackerRoll.diff ?? 0, type: DIFF.DEFENSE }
|
const attackerRoll = rollData.attackerRoll
|
||||||
|
const diff = attackerRoll.v2
|
||||||
|
? attackerRoll.selected.diff.value
|
||||||
|
: attackerRoll.diff
|
||||||
|
return { diff: diff ?? 0, type: DIFF.DEFENSE }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export class RollPartDiff extends RollPart {
|
|||||||
const current = this.getCurrent(rollData)
|
const current = this.getCurrent(rollData)
|
||||||
return [{
|
return [{
|
||||||
label: current.label,
|
label: current.label,
|
||||||
diff: current.value
|
value: current.value
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,9 +72,10 @@ export class RollPartMeditation extends RollPartSelect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getAjustements(rollData) {
|
getAjustements(rollData) {
|
||||||
const malusEchecs = { label: "Méditation", diff: this.getMalusEchecs(rollData) }
|
const malus = this.getMalusEchecs(rollData)
|
||||||
const malusConditions = { label: "Conditions", diff: this.getMalusConditions(rollData) }
|
const malusEchecs = malusEchecs == 0 ? [] : [{ label: "Méditation", value: malus }]
|
||||||
return [malusConditions, ...(malusEchecs.diff == 0 ? [] : [malusEchecs])]
|
const malusConditions = { label: "Conditions", value: this.getMalusConditions(rollData) }
|
||||||
|
return [malusConditions, ...malusEchecs]
|
||||||
}
|
}
|
||||||
|
|
||||||
$selectMeditation(rollData, key) {
|
$selectMeditation(rollData, key) {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export class RollPartSelect extends RollPart {
|
|||||||
getAjustements(rollData) {
|
getAjustements(rollData) {
|
||||||
const current = this.getCurrent(rollData)
|
const current = this.getCurrent(rollData)
|
||||||
if (current) {
|
if (current) {
|
||||||
return [{ label: current.label, diff: current.value }]
|
return [{ label: current.label, value: current.value }]
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ export class RollPartSign extends RollPart {
|
|||||||
const current = this.getCurrent(rollData)
|
const current = this.getCurrent(rollData)
|
||||||
if (current.surprise == 'demi') {
|
if (current.surprise == 'demi') {
|
||||||
return [
|
return [
|
||||||
{ label: 'Significative requise ' + Misc.getFractionOneN(current.diviseur), diff: undefined },
|
{ label: 'Significative requise ' + Misc.getFractionOneN(current.diviseur) },
|
||||||
...current.reasons.map(it => { return { label: '<i class="fa-solid fa-triangle-exclamation"></i> ' + it, diff: undefined } })
|
...current.reasons.map(it => { return { label: '<i class="fa-solid fa-triangle-exclamation"></i> ' + it } })
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
|
|||||||
@@ -94,16 +94,11 @@ export class RollPartSort extends RollPartSelect {
|
|||||||
getAjustements(rollData) {
|
getAjustements(rollData) {
|
||||||
const current = this.getCurrent(rollData)
|
const current = this.getCurrent(rollData)
|
||||||
if (current) {
|
if (current) {
|
||||||
const reserve = current.isReserve ?
|
const sort = { label: current.label, value: current.value }
|
||||||
[{ label: `Mise en réserve en ${this.getCoord(rollData)}` }] : []
|
const reserve = current.isReserve ? [{ label: `Mise en réserve en ${this.getCoord(rollData)}` }] : []
|
||||||
const bonusCase = current.bonusCase ?
|
const bonusCase = current.bonusCase ? [{ label: `Bonus case +${current.bonusCase}%` }] : []
|
||||||
[{ label: `Bonus case +${current.bonusCase}%` }] : []
|
const reve = { label: `Rêve ${current.ptreve}` }
|
||||||
return [
|
return [sort, ...bonusCase, reve, ...reserve]
|
||||||
{ label: current.label, diff: current.value },
|
|
||||||
...bonusCase,
|
|
||||||
{ label: `Rêve ${current.ptreve}` },
|
|
||||||
...reserve
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,12 @@ export class RollPartTache extends RollPartSelect {
|
|||||||
loadRefs(rollData) {
|
loadRefs(rollData) {
|
||||||
const refs = this.getRefs(rollData)
|
const refs = this.getRefs(rollData)
|
||||||
const selected = this.getSelected(rollData)
|
const selected = this.getSelected(rollData)
|
||||||
|
refs.forced = selected.forced
|
||||||
refs.all = rollData.active.actor.itemTypes[ITEM_TYPES.tache]
|
refs.all = rollData.active.actor.itemTypes[ITEM_TYPES.tache]
|
||||||
.filter(tache => !selected.forced || tache.id == selected.key)
|
.filter(tache => !selected.forced || tache.id == selected.key)
|
||||||
.filter(tache => tache.system.points_de_tache_courant < tache.system.points_de_tache)
|
.filter(tache => tache.system.points_de_tache_courant < tache.system.points_de_tache)
|
||||||
.map(tache => RollPartTache.$extractTache(tache, rollData.active.actor))
|
.map(tache => RollPartTache.$extractTache(tache, rollData.active.actor))
|
||||||
|
|
||||||
refs.taches = refs.all
|
refs.taches = refs.all
|
||||||
if (refs.taches.length > 0) {
|
if (refs.taches.length > 0) {
|
||||||
this.$selectTache(rollData)
|
this.$selectTache(rollData)
|
||||||
@@ -46,6 +48,8 @@ export class RollPartTache extends RollPartSelect {
|
|||||||
|
|
||||||
async _onRender(rollDialog, context, options) {
|
async _onRender(rollDialog, context, options) {
|
||||||
const selectTache = rollDialog.element.querySelector(`roll-section[name="${this.code}"] select[name="select-tache"]`)
|
const selectTache = rollDialog.element.querySelector(`roll-section[name="${this.code}"] select[name="select-tache"]`)
|
||||||
|
const buttonCreate = rollDialog.element.querySelector(`roll-section[name="${this.code}"] button[name="create-tache"]`)
|
||||||
|
const buttonEdit = rollDialog.element.querySelector(`roll-section[name="${this.code}"] button[name="edit-tache"]`)
|
||||||
|
|
||||||
selectTache.addEventListener("change", e => {
|
selectTache.addEventListener("change", e => {
|
||||||
const selectOptions = e.currentTarget.options
|
const selectOptions = e.currentTarget.options
|
||||||
@@ -53,14 +57,43 @@ export class RollPartTache extends RollPartSelect {
|
|||||||
this.$selectTache(rollDialog.rollData, selectOptions[index]?.value)
|
this.$selectTache(rollDialog.rollData, selectOptions[index]?.value)
|
||||||
rollDialog.render()
|
rollDialog.render()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
buttonCreate?.addEventListener(
|
||||||
|
"click", async e => {
|
||||||
|
e.preventDefault()
|
||||||
|
await rollDialog.rollData.active.actor.createItem(ITEM_TYPES.tache, 'Nouvelle tache')
|
||||||
|
})
|
||||||
|
|
||||||
|
buttonEdit?.addEventListener(
|
||||||
|
"click", e => {
|
||||||
|
e.preventDefault()
|
||||||
|
const current = this.getCurrent(rollDialog.rollData)
|
||||||
|
current.tache?.sheet.render(true)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getHooks(rollDialog) {
|
||||||
|
return [
|
||||||
|
{ hook: "createItem", fn: (item, options, id) => this.onCreateUpdateItem(rollDialog, item, options, id) },
|
||||||
|
{ hook: "updateItem", fn: (item, options, id) => this.onCreateUpdateItem(rollDialog, item, options, id) }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
onCreateUpdateItem(rollDialog, item, options, id) {
|
||||||
|
if (item.type == ITEM_TYPES.tache && item.parent?.id == rollDialog.rollData.active.actor.id) {
|
||||||
|
this.loadRefs(rollDialog.rollData)
|
||||||
|
rollDialog.render()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impactOtherPart(part, rollData) {
|
impactOtherPart(part, rollData) {
|
||||||
if (this.visible(rollData)) {
|
if (this.visible(rollData)) {
|
||||||
const current = this.getCurrent(rollData)
|
const current = this.getCurrent(rollData)
|
||||||
switch (part.code) {
|
if (current.tache) {
|
||||||
case PART_CARAC: return part.filterCaracs(rollData, [current?.tache.system.carac])
|
switch (part.code) {
|
||||||
case PART_COMP: return part.filterComps(rollData, [current.comp?.name])
|
case PART_CARAC: return part.filterCaracs(rollData, [current?.tache.system.carac])
|
||||||
|
case PART_COMP: return part.filterComps(rollData, [current.comp?.name])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ export class RollPartTricher extends RollPart {
|
|||||||
current.resultat = Misc.inRange(current.resultat == undefined ? -1 : current.resultat, -1, 100)
|
current.resultat = Misc.inRange(current.resultat == undefined ? -1 : current.resultat, -1, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
getAjustements(rollData) {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
|
|
||||||
async _onRender(rollDialog, context, options) {
|
async _onRender(rollDialog, context, options) {
|
||||||
const input = rollDialog.element.querySelector(`roll-section[name="${this.code}"] input[name="${this.code}"]`)
|
const input = rollDialog.element.querySelector(`roll-section[name="${this.code}"] input[name="${this.code}"]`)
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ export const ROLLDIALOG_SECTION = {
|
|||||||
CONDITIONS: 'conditions',
|
CONDITIONS: 'conditions',
|
||||||
AJUSTEMENTS: 'ajustements',
|
AJUSTEMENTS: 'ajustements',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export class RollPart {
|
export class RollPart {
|
||||||
static settingKey(rollPart, key) { return `roll-part-${rollPart.code}.${key}` }
|
static settingKey(rollPart, key) { return `roll-part-${rollPart.code}.${key}` }
|
||||||
|
|
||||||
@@ -104,10 +106,9 @@ export class RollPart {
|
|||||||
return { code: this.code, name: this.name, template: this.template, section: this.section }
|
return { code: this.code, name: this.name, template: this.template, section: this.section }
|
||||||
}
|
}
|
||||||
|
|
||||||
getAjustements(rollData) {
|
getAjustements(rollData) { return [] }
|
||||||
return []
|
|
||||||
}
|
|
||||||
|
|
||||||
async _onRender(rollDialog, context, options) { }
|
async _onRender(rollDialog, context, options) { }
|
||||||
|
|
||||||
|
getHooks() { return [] }
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ export class RollTypeTache extends RollType {
|
|||||||
title(rollData) {
|
title(rollData) {
|
||||||
const current = rollData.current[PART_TACHE]
|
const current = rollData.current[PART_TACHE]
|
||||||
const tache = current?.tache
|
const tache = current?.tache
|
||||||
return `travaille à sa tâche: ${tache.name ?? ''}`
|
return tache ? `travaille à sa tâche: ${tache.name}` : `n'a pas de tâches à travailler`
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelect(rollData) {
|
onSelect(rollData) {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
{{log rolled}}
|
|
||||||
<div>
|
<div>
|
||||||
<span {{#if ajustements}}class="tooltip-overflow tooltip-dotted" {{/if}}>
|
<span {{#if ajustements}}class="tooltip-overflow tooltip-dotted" {{/if}}>
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<div class="chat-resume">
|
<div class="chat-resume">
|
||||||
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
||||||
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
<br>{{> 'partial-infojet'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-details">
|
<div class="chat-details">
|
||||||
@@ -19,9 +19,9 @@
|
|||||||
{{#if rolled.isSuccess}}
|
{{#if rolled.isSuccess}}
|
||||||
<span>
|
<span>
|
||||||
<strong>{{opponent.name}}</strong> doit se défendre à <strong>{{current.diff.value}}</strong>,
|
<strong>{{opponent.name}}</strong> doit se défendre à <strong>{{current.diff.value}}</strong>,
|
||||||
{{#if (eq current.dmg.mortalite 'empoignade')}}
|
{{#if (eq dmg.mortalite 'empoignade')}}
|
||||||
ou {{active.name}} marquera un point d'empoignade
|
ou {{active.name}} marquera un point d'empoignade
|
||||||
{{else if (eq current.dmg.mortalite 'non-mortel')}}
|
{{else if (eq dmg.mortalite 'non-mortel')}}
|
||||||
ou encaisser à <span class="rdd-roll-norm">{{plusMoins dmg.total}} (non-mortel)</span>
|
ou encaisser à <span class="rdd-roll-norm">{{plusMoins dmg.total}} (non-mortel)</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
ou encaisser à <span class="rdd-roll-echec">{{plusMoins dmg.total}}</span>
|
ou encaisser à <span class="rdd-roll-echec">{{plusMoins dmg.total}}</span>
|
||||||
@@ -56,11 +56,12 @@
|
|||||||
<p>
|
<p>
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.hbs"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.hbs"}}
|
||||||
</p>
|
</p>
|
||||||
|
{{> 'partial-maladresse'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-actions">
|
<div class="chat-actions">
|
||||||
|
{{> 'partial-choix-maladresse'}}
|
||||||
{{> 'partial-attaque-particuliere'}}
|
{{> 'partial-attaque-particuliere'}}
|
||||||
{{> 'partial-maladresse'}}
|
|
||||||
{{!-- TODO: maladresses --}}
|
{{!-- TODO: maladresses --}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
<img src="{{current.comp.comp.img}}" data-tooltip="{{current.comp.label}}" />
|
<img src="{{current.comp.comp.img}}" data-tooltip="{{current.comp.label}}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="chat-header">
|
<div class="chat-header">
|
||||||
{{active.name}} fait un jet de {{current.comp.label}}
|
{{active.name}} fait un jet {{#if (eq current.comp.key '')}}sans compétence{{else}}de {{current.comp.label}}{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-resume">
|
<div class="chat-resume">
|
||||||
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
{{current.carac.label}}{{#unless (eq current.comp.key '')}} / {{current.comp.label}}{{/unless}} à {{current.diff.value}}
|
||||||
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
<br>{{> 'partial-infojet'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-details">
|
<div class="chat-details">
|
||||||
<p>Qualité {{rolled.ptQualite}}, points de tâche {{rolled.ptQualite}}
|
<p>Qualité {{rolled.ptQualite}}, points de tâche {{rolled.ptTache}}
|
||||||
</p>
|
</p>
|
||||||
{{> 'partial-info-appel-moral'}}
|
{{> 'partial-info-appel-moral'}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<div class="chat-resume">
|
<div class="chat-resume">
|
||||||
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
||||||
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
<br>{{> "partial-infojet"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-details">
|
<div class="chat-details">
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<div class="chat-resume">
|
<div class="chat-resume">
|
||||||
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
||||||
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
<br>{{> 'partial-infojet'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-details">
|
<div class="chat-details">
|
||||||
@@ -42,9 +42,11 @@
|
|||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{> 'partial-info-appel-moral'}}
|
{{> 'partial-info-appel-moral'}}
|
||||||
</div>
|
|
||||||
<div class="chat-actions">
|
|
||||||
{{> 'partial-maladresse'}}
|
{{> 'partial-maladresse'}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="chat-actions">
|
||||||
|
{{> 'partial-choix-maladresse'}}
|
||||||
{{> 'partial-recul-choc'}}
|
{{> 'partial-recul-choc'}}
|
||||||
{{> 'partial-encaissement'}}
|
{{> 'partial-encaissement'}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="chat-resume">
|
<div class="chat-resume">
|
||||||
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
||||||
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
<br>{{> 'partial-infojet'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-details">
|
<div class="chat-details">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="chat-resume">
|
<div class="chat-resume">
|
||||||
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
||||||
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
<br>{{> 'partial-infojet'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-details">
|
<div class="chat-details">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="chat-resume">
|
<div class="chat-resume">
|
||||||
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
||||||
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
<br>{{> 'partial-infojet'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-details">
|
<div class="chat-details">
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<div class="chat-resume">
|
<div class="chat-resume">
|
||||||
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
||||||
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
<br>{{> 'partial-infojet'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="chat-resume">
|
<div class="chat-resume">
|
||||||
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
{{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}}
|
||||||
<br>{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}}
|
<br>{{> 'partial-infojet'}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chat-details">
|
<div class="chat-details">
|
||||||
|
|||||||
9
templates/roll/result/partial-choix-maladresse.hbs
Normal file
9
templates/roll/result/partial-choix-maladresse.hbs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{{#if show.maladresse}}
|
||||||
|
{{#unless maladresse}}
|
||||||
|
<a class='chat-card-button tirer-maladresse' data-maladresse='{{show.maladresse}}'
|
||||||
|
data-tooltip="Tirer la maladresse">
|
||||||
|
<img src="systems/foundryvtt-reve-de-dragon/assets/ui/maladresse.svg"/> Tirer une maladresse
|
||||||
|
{{#if (eq show.maladresse 'avec-arme')}}armé{{else}}non armé{{/if}}
|
||||||
|
</a>
|
||||||
|
{{/unless}}
|
||||||
|
{{/if}}
|
||||||
26
templates/roll/result/partial-infojet.hbs
Normal file
26
templates/roll/result/partial-infojet.hbs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{{#if ajustements}}
|
||||||
|
<div>
|
||||||
|
<span class="tooltip-overflow tooltip-dotted" >
|
||||||
|
<span>
|
||||||
|
<span>{{rolled.caracValue}} à {{plusMoins rolled.finalLevel}}</span>
|
||||||
|
<span>= {{rolled.score}}%</span>
|
||||||
|
{{#if (and rolled.factorHtml (ne rolled.factorHtml 1))}}
|
||||||
|
<span class="rdd-diviseur">×{{{rolled.factorHtml}}}</span>
|
||||||
|
{{/if}}
|
||||||
|
</span>
|
||||||
|
<div class="tooltiptext ttt-ajustements">
|
||||||
|
{{#each ajustements as |item key|}}
|
||||||
|
<div class="{{#if item.strong}}strong-text{{/if}}">
|
||||||
|
{{{item.label}}}{{#if item.value includeZero=true}}: {{plusMoins item.value}}{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
<div>
|
||||||
|
<span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span>
|
||||||
|
{{#if rolled.ajustementNecessaire}}
|
||||||
|
<span class="rdd-niveau-requis">(Réussite si {{plusMoins rolled.niveauNecessaire}} / avec niveau {{plusMoins rolled.ajustementNecessaire}}) </span>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
@@ -1,13 +1,6 @@
|
|||||||
{{#if show.maladresse}}
|
{{#if maladresse}}
|
||||||
{{#if type.maladresse}}
|
<span class='chat-card-info'>
|
||||||
<span class='chat-card-info'>
|
<img src="systems/foundryvtt-reve-de-dragon/assets/ui/maladresse.svg"/> Maladresse!
|
||||||
<img src="systems/foundryvtt-reve-de-dragon/assets/ui/maladresse.svg"/> Maladresse!
|
</span>
|
||||||
</span>
|
<div >{{{maladresse}}}</div>
|
||||||
{{else}}
|
|
||||||
<a class='chat-card-button tirer-maladresse' data-maladresse='{{show.maladresse}}'
|
|
||||||
data-tooltip="Tirer la maladresse">
|
|
||||||
<img src="systems/foundryvtt-reve-de-dragon/assets/ui/maladresse.svg"/> Tirer une maladresse
|
|
||||||
{{#if (eq show.maladresse 'avec-arme')}}armé{{else}}non armé{{/if}}
|
|
||||||
</a>
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@@ -2,21 +2,16 @@
|
|||||||
<span class="tooltip tooltip-dotted">
|
<span class="tooltip tooltip-dotted">
|
||||||
<span class="roll-part-resolution">Jet: {{rollData.current.carac.value}} à {{plusMoins rollData.current.totaldiff}}</span>
|
<span class="roll-part-resolution">Jet: {{rollData.current.carac.value}} à {{plusMoins rollData.current.totaldiff}}</span>
|
||||||
<div class="tooltiptext ttt-ajustements">
|
<div class="tooltiptext ttt-ajustements">
|
||||||
{{#each rollData.ajustements as |ajust|}}
|
{{#each rollData.ajustements as |item|}}
|
||||||
{{#if ajust}}
|
|
||||||
<div>
|
<div>
|
||||||
{{#if ajust.descr}}
|
{{{item.label}}}{{#if item.value includeZero=true}}: {{plusMoins item.value}}{{/if}}
|
||||||
{{{ajust.descr}}}
|
|
||||||
{{else}}
|
|
||||||
{{{ajust.label}}}{{#if ajust.isDiff}}: {{plusMoins ajust.diff}}{{/if}}
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
{{#if rollData.current.significative.used}}
|
{{#if rollData.current.significative.used}}
|
||||||
<br><span>
|
<br>
|
||||||
|
<span>
|
||||||
Significative requise <span class="rdd-diviseur">×{{{rollData.current.significative.label}}}</span>!
|
Significative requise <span class="rdd-diviseur">×{{{rollData.current.significative.label}}}</span>!
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
@@ -7,7 +7,14 @@
|
|||||||
{{selectOptions refs.taches selected=current.key valueAttr="key" labelAttr="label"}}
|
{{selectOptions refs.taches selected=current.key valueAttr="key" labelAttr="label"}}
|
||||||
</select>
|
</select>
|
||||||
<selected-numeric-value>{{plusMoins current.value}}</selected-numeric-value>
|
<selected-numeric-value>{{plusMoins current.value}}</selected-numeric-value>
|
||||||
|
{{#unless refs.forced}}
|
||||||
|
<button name="create-tache" data-tooltip="Créer une nouvelle tâche"><i class="fa-solid fa-circle-plus"></i></button>
|
||||||
|
{{#if refs.taches.length}}
|
||||||
|
<button name="edit-tache" data-tooltip="Modifier la tâche"><i class="fa-solid fa-edit"></i></button>
|
||||||
|
{{/if}}
|
||||||
|
{{/unless}}
|
||||||
</subline>
|
</subline>
|
||||||
|
{{#if refs.taches.length}}
|
||||||
<subline>
|
<subline>
|
||||||
Points de tâche: {{current.tache.system.points_de_tache_courant}} /
|
Points de tâche: {{current.tache.system.points_de_tache_courant}} /
|
||||||
{{#if current.tache.system.cacher_points_de_tache}}
|
{{#if current.tache.system.cacher_points_de_tache}}
|
||||||
@@ -25,4 +32,5 @@
|
|||||||
{{#if current.tache.system.periodicite}}
|
{{#if current.tache.system.periodicite}}
|
||||||
<subline>Périodicité: {{current.tache.system.periodicite}}</subline>
|
<subline>Périodicité: {{current.tache.system.periodicite}}</subline>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
</roll-part-detail>
|
</roll-part-detail>
|
||||||
|
|||||||
Reference in New Issue
Block a user