This commit was merged in pull request #820.
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
## 13.0.48 - Les vagabondages d'Illisys
|
## 13.0.48 - Les vagabondages d'Illisys
|
||||||
|
|
||||||
|
- Gestion des tâches à plusieurs
|
||||||
|
- Les tâches du monde peuvent être configurées pour être effectuées à plusieurs
|
||||||
|
- Une tâche à plusieurs ajoutée à un personnage permet au personnage de contribuer à la tâche commune
|
||||||
- suppression du type de TMR "Inconnu" des feuilles de création de signes draconiques (ce type sert uniquement pour le cas où une case saisie à la main est incorrecte)
|
- suppression du type de TMR "Inconnu" des feuilles de création de signes draconiques (ce type sert uniquement pour le cas où une case saisie à la main est incorrecte)
|
||||||
- les jets de dés /rdd utilisent le mode de visibilité sélectionné
|
- les jets de dés /rdd utilisent le mode de visibilité sélectionné
|
||||||
- Voies de Draconic
|
- Voies de Draconic
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
|||||||
fatigue: RdDUtility.calculFatigueHtml(formData.system.sante.fatigue.value, formData.system.sante.endurance.max)
|
fatigue: RdDUtility.calculFatigueHtml(formData.system.sante.fatigue.value, formData.system.sante.endurance.max)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
this.amendTacheCommunes(formData)
|
||||||
|
|
||||||
formData.competences.forEach(item => {
|
formData.competences.forEach(item => {
|
||||||
item.system.isHidden = this.options.recherche
|
item.system.isHidden = this.options.recherche
|
||||||
@@ -111,9 +112,24 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
|||||||
<br>Ajoutez-lui la tête "Don de Haut-Rêve" pour lui permettre d'utiliser ses compétences et d'accéder aux terres médianes du rêve`);
|
<br>Ajoutez-lui la tête "Don de Haut-Rêve" pour lui permettre d'utiliser ses compétences et d'accéder aux terres médianes du rêve`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
console.error("Ouverture actor-sheet avec un acteur non personnage")
|
||||||
|
}
|
||||||
return formData;
|
return formData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
amendTacheCommunes(formData) {
|
||||||
|
formData.taches
|
||||||
|
.forEach(tache => {
|
||||||
|
if (tache.isTacheCommune()) {
|
||||||
|
const tacheCommune = tache.getTacheOuCommune()
|
||||||
|
tache.system = foundry.utils.duplicate(tacheCommune.system)
|
||||||
|
tache.system.tacheCommuneId = tache.system.tacheCommuneId
|
||||||
|
}
|
||||||
|
return tache
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/** @override */
|
/** @override */
|
||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
|
|||||||
+23
-11
@@ -1883,7 +1883,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
const rollData = {
|
const rollData = {
|
||||||
ids: { actorId: this.id },
|
ids: { actorId: this.id },
|
||||||
selected: { tache: { key: tache.id, forced: options.forced } },
|
selected: { tache: { key: tache.id, forced: options.forced } },
|
||||||
type: { allowed: [ROLL_TYPE_TACHE], current: ROLL_TYPE_TACHE}
|
type: { allowed: [ROLL_TYPE_TACHE], current: ROLL_TYPE_TACHE }
|
||||||
}
|
}
|
||||||
return await RollDialog.create(rollData, options)
|
return await RollDialog.create(rollData, options)
|
||||||
}
|
}
|
||||||
@@ -1912,22 +1912,34 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _tacheResult(rollData, options) {
|
async _tacheResult(rollData, options) {
|
||||||
// Mise à jour de la tache
|
// Mise à jour de la tache
|
||||||
rollData.appliquerFatigue = ReglesOptionnelles.isUsing("appliquer-fatigue");
|
rollData.appliquerFatigue = ReglesOptionnelles.isUsing("appliquer-fatigue")
|
||||||
rollData.tache = foundry.utils.duplicate(rollData.tache);
|
|
||||||
rollData.tache.system.points_de_tache_courant += rollData.rolled.ptTache;
|
const tacheCommuneId = rollData.tache.system.tacheCommuneId;
|
||||||
|
const tache = tacheCommuneId
|
||||||
|
? game.items.get(tacheCommuneId)
|
||||||
|
: this.items.get(rollData.tache.id)
|
||||||
|
|
||||||
|
const tacheUpdates = {
|
||||||
|
system: {
|
||||||
|
points_de_tache_courant: tache.system.points_de_tache_courant + rollData.rolled.ptTache,
|
||||||
|
tentatives: tache.system.tentatives + 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (rollData.rolled.isETotal) {
|
if (rollData.rolled.isETotal) {
|
||||||
rollData.tache.system.difficulte--;
|
tacheUpdates.system['difficulte'] = tache.system.difficulte - 1
|
||||||
}
|
}
|
||||||
if (rollData.rolled.isSuccess) {
|
if (rollData.rolled.isSuccess) {
|
||||||
rollData.tache.system.nb_jet_succes++;
|
tacheUpdates.system['nb_jet_succes'] = tache.system.nb_jet_succes + 1;
|
||||||
} else {
|
} else {
|
||||||
rollData.tache.system.nb_jet_echec++;
|
tacheUpdates.system['nb_jet_echec'] = tache.tache.system.nb_jet_echec + 1
|
||||||
}
|
}
|
||||||
rollData.tache.system.tentatives = rollData.tache.system.nb_jet_succes + rollData.tache.system.nb_jet_echec;
|
|
||||||
|
|
||||||
await this.updateEmbeddedDocuments('Item', [rollData.tache]);
|
await tache.update(tacheUpdates)
|
||||||
await this.santeIncDec("fatigue", rollData.tache.system.fatigue);
|
await this.santeIncDec("fatigue", rollData.tache.system.fatigue);
|
||||||
|
if (rollData.tache.system.tacheCommuneId != "") {
|
||||||
|
rollData.tache.render()
|
||||||
|
}
|
||||||
await RdDRollResult.displayRollData(rollData, this, 'chat-resultat-tache.hbs');
|
await RdDRollResult.displayRollData(rollData, this, 'chat-resultat-tache.hbs');
|
||||||
if (options?.callbacks) {
|
if (options?.callbacks) {
|
||||||
await Promise.all(callbacks.map(callback => callback(rollData)))
|
await Promise.all(callbacks.map(callback => callback(rollData)))
|
||||||
@@ -2422,7 +2434,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
onRollDone: RollDialog.onRollDoneClose,
|
onRollDone: RollDialog.onRollDoneClose,
|
||||||
verb: "applique des soins complets à",
|
verb: "applique des soins complets à",
|
||||||
title: "Soins complets",
|
title: "Soins complets",
|
||||||
forced: true
|
forced: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -711,8 +711,8 @@ export class RdDBaseActor extends Actor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
await this.computeEncTotal()
|
||||||
}
|
}
|
||||||
await this.computeEncTotal()
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
|
|||||||
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
|
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
|
||||||
isComestible: this.item.getUtilisationCuisine(),
|
isComestible: this.item.getUtilisationCuisine(),
|
||||||
options: RdDSheetUtility.mergeDocumentRights({}, this.item, this.isEditable),
|
options: RdDSheetUtility.mergeDocumentRights({}, this.item, this.isEditable),
|
||||||
competences: [new RdDItemCompetence(SANS_COMPETENCE), ...competences],
|
competences: [SANS_COMPETENCE, ...competences],
|
||||||
categories: RdDItem.getCategories(this.item.type),
|
categories: RdDItem.getCategories(this.item.type),
|
||||||
isAppreciable: Apprecier.isAppreciable(this.item)
|
isAppreciable: Apprecier.isAppreciable(this.item)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ export const defaultItemImg = {
|
|||||||
sort: "systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp",
|
sort: "systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp",
|
||||||
sortreserve: "systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp",
|
sortreserve: "systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp",
|
||||||
souffle: "systems/foundryvtt-reve-de-dragon/icons/souffle_dragon.webp",
|
souffle: "systems/foundryvtt-reve-de-dragon/icons/souffle_dragon.webp",
|
||||||
|
tache: "systems/foundryvtt-reve-de-dragon/assets/actions/tache.svg",
|
||||||
tarot: "systems/foundryvtt-reve-de-dragon/icons/tarots/dos-tarot.webp",
|
tarot: "systems/foundryvtt-reve-de-dragon/icons/tarots/dos-tarot.webp",
|
||||||
tete: "systems/foundryvtt-reve-de-dragon/icons/tete_dragon.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",
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { ITEM_TYPES } from "../constants.js";
|
||||||
|
// import { RdDItemTache } from "tache.js";
|
||||||
|
|
||||||
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
|
|
||||||
|
export class RdDTacheItemSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
|
static get ITEM_TYPE() { return ITEM_TYPES.tache };
|
||||||
|
|
||||||
|
async getData() {
|
||||||
|
const formData = await super.getData()
|
||||||
|
if (this.item.system.tacheCommuneId) {
|
||||||
|
formData.tacheCommune = game.items.get(this.item.system.tacheCommuneId);
|
||||||
|
formData.system = formData.tacheCommune.system
|
||||||
|
formData.disabled = this.item.actor != undefined
|
||||||
|
}
|
||||||
|
return formData
|
||||||
|
}
|
||||||
|
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
|
||||||
|
this.html.find('input[name="is-tache-partagee"]').click((event) => this.checktacheCommune(event.currentTarget.checked))
|
||||||
|
}
|
||||||
|
|
||||||
|
async checktacheCommune(checked) {
|
||||||
|
if (!this.item.parent) {
|
||||||
|
const tacheCommuneId = checked ? this.item.id : ""
|
||||||
|
this.item.update({ 'system.tacheCommuneId': tacheCommuneId })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { RdDItem } from "../item.js";
|
||||||
|
|
||||||
|
export class RdDItemTache extends RdDItem {
|
||||||
|
|
||||||
|
static get defaultIcon() {
|
||||||
|
return "systems/foundryvtt-reve-de-dragon/assets/actions/tache.svg"
|
||||||
|
}
|
||||||
|
isTacheCommune() {
|
||||||
|
return this.system.tacheCommuneId != ""
|
||||||
|
}
|
||||||
|
getTacheOuCommune() {
|
||||||
|
if (this.isTacheCommune()) {
|
||||||
|
return game.items.get(this.system.tacheCommuneId)
|
||||||
|
}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -231,7 +231,7 @@ export class Misc {
|
|||||||
*/
|
*/
|
||||||
static documentIfResponsible(document) {
|
static documentIfResponsible(document) {
|
||||||
if (Misc.isFirstConnectedGM() || (Misc.connectedGMs().length == 0 && Misc.isFirstOwnerPlayer(document))) {
|
if (Misc.isFirstConnectedGM() || (Misc.connectedGMs().length == 0 && Misc.isFirstOwnerPlayer(document))) {
|
||||||
if (document.isOwner) {
|
if (document?.isOwner) {
|
||||||
return document
|
return document
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ import { RdDItemRace } from "./item/race.js"
|
|||||||
import { RdDItemSigneDraconique } from "./item/signedraconique.js"
|
import { RdDItemSigneDraconique } from "./item/signedraconique.js"
|
||||||
import { RdDItemSort } from "./item-sort.js"
|
import { RdDItemSort } from "./item-sort.js"
|
||||||
import { RdDItemSouffle } from "./item/souffle.js"
|
import { RdDItemSouffle } from "./item/souffle.js"
|
||||||
|
import { RdDItemTache } from "./item/tache.js"
|
||||||
import { RdDItemTete } from "./item/tete.js"
|
import { RdDItemTete } from "./item/tete.js"
|
||||||
import { RdDRencontre } from "./item/rencontre.js"
|
import { RdDRencontre } from "./item/rencontre.js"
|
||||||
|
|
||||||
@@ -76,6 +77,7 @@ import { RdDPotionItemSheet } from "./item/sheet-potion.js"
|
|||||||
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js"
|
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js"
|
||||||
import { RdDServiceItemSheet } from "./item/sheet-service.js"
|
import { RdDServiceItemSheet } from "./item/sheet-service.js"
|
||||||
import { RdDSigneDraconiqueItemSheet } from "./item/sheet-signedraconique.js"
|
import { RdDSigneDraconiqueItemSheet } from "./item/sheet-signedraconique.js"
|
||||||
|
import { RdDTacheItemSheet } from "./item/sheet-tache.js"
|
||||||
|
|
||||||
import { AppAstrologie } from "./sommeil/app-astrologie.js"
|
import { AppAstrologie } from "./sommeil/app-astrologie.js"
|
||||||
import { AutoAdjustDarkness } from "./time/auto-adjust-darkness.js"
|
import { AutoAdjustDarkness } from "./time/auto-adjust-darkness.js"
|
||||||
@@ -134,6 +136,7 @@ export class SystemReveDeDragon {
|
|||||||
service: RdDItemService,
|
service: RdDItemService,
|
||||||
signedraconique: RdDItemSigneDraconique,
|
signedraconique: RdDItemSigneDraconique,
|
||||||
souffle: RdDItemSouffle,
|
souffle: RdDItemSouffle,
|
||||||
|
tache: RdDItemTache,
|
||||||
tarot: items.RdDModelTarot,
|
tarot: items.RdDModelTarot,
|
||||||
tete: RdDItemTete,
|
tete: RdDItemTete,
|
||||||
}
|
}
|
||||||
@@ -285,6 +288,7 @@ export class SystemReveDeDragon {
|
|||||||
RdDItemSheetV1.register(RdDRencontreItemSheet)
|
RdDItemSheetV1.register(RdDRencontreItemSheet)
|
||||||
RdDItemSheetV1.register(RdDServiceItemSheet)
|
RdDItemSheetV1.register(RdDServiceItemSheet)
|
||||||
RdDItemSheetV1.register(RdDSigneDraconiqueItemSheet)
|
RdDItemSheetV1.register(RdDSigneDraconiqueItemSheet)
|
||||||
|
RdDItemSheetV1.register(RdDTacheItemSheet)
|
||||||
RdDJournalSheet.register()
|
RdDJournalSheet.register()
|
||||||
|
|
||||||
// préparation des différents modules
|
// préparation des différents modules
|
||||||
|
|||||||
@@ -191,6 +191,7 @@ export class RdDUtility {
|
|||||||
'systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-bonmoment.hbs',
|
'systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-bonmoment.hbs',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-carac.hbs',
|
'systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-carac.hbs',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-moral.hbs',
|
'systems/foundryvtt-reve-de-dragon/templates/item/enum-appreciation-moral.hbs',
|
||||||
|
'systems/foundryvtt-reve-de-dragon/templates/item/tache-commune-flag.hbs',
|
||||||
// partial enums
|
// partial enums
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/enum-aspect-tarot.hbs',
|
'systems/foundryvtt-reve-de-dragon/templates/enum-aspect-tarot.hbs',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/enum-base-competence.hbs',
|
'systems/foundryvtt-reve-de-dragon/templates/enum-base-competence.hbs',
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ export class RollPartTache extends RollPartSelect {
|
|||||||
refs.forced = selected.forced
|
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)
|
|
||||||
.map(tache => RollPartTache.$extractTache(tache, rollData.active.actor))
|
.map(tache => RollPartTache.$extractTache(tache, rollData.active.actor))
|
||||||
|
.filter(extract => !extract.finished)
|
||||||
|
|
||||||
refs.taches = refs.all
|
refs.taches = refs.all
|
||||||
if (refs.taches.length > 0) {
|
if (refs.taches.length > 0) {
|
||||||
@@ -34,12 +34,15 @@ export class RollPartTache extends RollPartSelect {
|
|||||||
choices(refs) { return refs.taches }
|
choices(refs) { return refs.taches }
|
||||||
|
|
||||||
static $extractTache(tache, actor) {
|
static $extractTache(tache, actor) {
|
||||||
|
const tacheOuCommune = tache.getTacheOuCommune()
|
||||||
return {
|
return {
|
||||||
key: tache.id,
|
key: tache.id,
|
||||||
label: tache.name,
|
label: tache.name,
|
||||||
value: tache.system.difficulte,
|
tacheCommune: tache.system.tacheCommune,
|
||||||
tache: tache,
|
value: tacheOuCommune.system.difficulte,
|
||||||
comp: actor.getCompetence(tache.system.competence)
|
tache: tacheOuCommune,
|
||||||
|
comp: actor.getCompetence(tacheOuCommune.system.competence),
|
||||||
|
finished: tacheOuCommune.system.points_de_tache_courant >= tacheOuCommune.system.points_de_tache
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,9 +84,12 @@ export class RollPartTache extends RollPartSelect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onCreateUpdateItem(rollDialog, item, options, id) {
|
onCreateUpdateItem(rollDialog, item, options, id) {
|
||||||
if (item.type == ITEM_TYPES.tache && item.parent?.id == rollDialog.rollData.active.actor.id) {
|
if (item.type == ITEM_TYPES.tache) {
|
||||||
this.loadRefs(rollDialog.rollData)
|
if (item.parent?.id == rollDialog.rollData.active.actor.id || item.isTacheCommune()) {
|
||||||
rollDialog.render()
|
// TODO: filtrer davantage
|
||||||
|
this.loadRefs(rollDialog.rollData)
|
||||||
|
rollDialog.render()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,15 +22,14 @@ export class RollTypeTache extends RollType {
|
|||||||
|
|
||||||
static async $onRollTache(rollData) {
|
static async $onRollTache(rollData) {
|
||||||
const actor = rollData.active.actor
|
const actor = rollData.active.actor
|
||||||
const tache = rollData.current[PART_TACHE].tache
|
const tache = rollData.current[PART_TACHE].tache.getTacheOuCommune()
|
||||||
|
|
||||||
rollData.current[PART_TACHE].tache = await tache.update({
|
await tache.update({
|
||||||
'system.points_de_tache_courant': tache.system.points_de_tache_courant + rollData.rolled.ptTache,
|
'system.points_de_tache_courant': tache.system.points_de_tache_courant + rollData.rolled.ptTache,
|
||||||
'system.nb_jet_succes': tache.system.nb_jet_succes + (rollData.rolled.isSuccess ? 1 : 0),
|
'system.nb_jet_succes': tache.system.nb_jet_succes + (rollData.rolled.isSuccess ? 1 : 0),
|
||||||
'system.nb_jet_echec': tache.system.nb_jet_echec + (rollData.rolled.isSuccess ? 0 : 1),
|
'system.nb_jet_echec': tache.system.nb_jet_echec + (rollData.rolled.isSuccess ? 0 : 1),
|
||||||
'system.difficulte': tache.system.difficulte - (rollData.rolled.isETotal ? 1 : 0),
|
'system.difficulte': tache.system.difficulte - (rollData.rolled.isETotal ? 1 : 0),
|
||||||
}, { render: true })
|
}, { render: true })
|
||||||
|
|
||||||
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
if (ReglesOptionnelles.isUsing("appliquer-fatigue")) {
|
||||||
await actor.santeIncDec("fatigue", tache.system.fatigue)
|
await actor.santeIncDec("fatigue", tache.system.fatigue)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -947,7 +947,8 @@
|
|||||||
"nb_jet_echec": 0,
|
"nb_jet_echec": 0,
|
||||||
"nb_jet_succes": 0,
|
"nb_jet_succes": 0,
|
||||||
"cacher_points_de_tache": false,
|
"cacher_points_de_tache": false,
|
||||||
"itemId": ""
|
"itemId": "",
|
||||||
|
"tacheCommuneId": ""
|
||||||
},
|
},
|
||||||
"sort": {
|
"sort": {
|
||||||
"templates": ["description"],
|
"templates": ["description"],
|
||||||
|
|||||||
@@ -4,10 +4,15 @@
|
|||||||
{{#unless (eq tache.system.competence 'Chirurgie')}}
|
{{#unless (eq tache.system.competence 'Chirurgie')}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{tache._id}}" data-tooltip="Tâche: {{tache.name}}" >
|
<li class="item flexrow list-item" data-item-id="{{tache._id}}" data-tooltip="Tâche: {{tache.name}}" >
|
||||||
<img class="sheet-competence-img" src="{{tache.img}}"/>
|
<img class="sheet-competence-img" src="{{tache.img}}"/>
|
||||||
<span class="list-item-label"><a class="action-tache">{{tache.name}}
|
<span class="list-item-label"><a class="action-tache">
|
||||||
|
{{> 'systems/foundryvtt-reve-de-dragon/templates/item/tache-commune-flag.hbs' tache}}
|
||||||
|
{{tache.name}}
|
||||||
({{tache.system.points_de_tache_courant}}{{#if
|
({{tache.system.points_de_tache_courant}}{{#if
|
||||||
(or @root.options.isGM (not tache.system.cacher_points_de_tache))
|
(or @root.options.isGM (not tache.system.cacher_points_de_tache))
|
||||||
}}/{{tache.system.points_de_tache}}{{/if}})</a></span>
|
}}/{{tache.system.points_de_tache}}{{/if}})</a></span>
|
||||||
|
{{#if tache.system.tacheCommuneId}}
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=tache options=@root.options}}
|
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=tache options=@root.options}}
|
||||||
</li>
|
</li>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
{{#each @root.competences as |competence key|}}
|
{{#each @root.competences as |competence key|}}
|
||||||
{{#if (or (not ../categorie) (eq competence.system.categorie ../categorie))}}
|
{{#if (or (not ../categorie) (eq competence.system.categorie ../categorie))}}
|
||||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
{{#if competence.id}}
|
||||||
|
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||||
|
{{else}}
|
||||||
|
<option value="">{{competence.name}}</option>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{{#if system.tacheCommuneId}}
|
||||||
|
<i class="fa-solid fa-people-group"
|
||||||
|
data-tooltip="Tâche commune partagée entre plusieurs personnages"></i>
|
||||||
|
{{/if}}
|
||||||
@@ -2,49 +2,72 @@
|
|||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-header.hbs"}}
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
|
{{#if options.isOwned}}
|
||||||
|
{{#if system.tacheCommuneId}}
|
||||||
|
<div class="form-group">
|
||||||
|
<label>
|
||||||
|
{{> 'systems/foundryvtt-reve-de-dragon/templates/item/tache-commune-flag.hbs' this}}
|
||||||
|
Tâche à plusieurs
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<div class="form-group" data-tooltip="Une tâche à plusieurs ajoutée à des personnages sera partagée entre tous ces personnages">
|
||||||
|
<label>
|
||||||
|
{{> 'systems/foundryvtt-reve-de-dragon/templates/item/tache-commune-flag.hbs' this}}
|
||||||
|
Tâche à plusieurs
|
||||||
|
</label>
|
||||||
|
<input name="is-tache-partagee" class="attribute-value" type="checkbox" {{#if system.tacheCommuneId}}checked{{/if}}/>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.carac">Caractéristique</label>
|
<label for="system.carac">Caractéristique</label>
|
||||||
<select name="system.carac" data-dtype="String">
|
<select name="system.carac" data-dtype="String" {{#if disabled}}disabled{{/if}} >
|
||||||
{{#select system.carac}}
|
{{#select system.carac}}
|
||||||
{{#each caracList as |carac key|}}
|
{{#each caracList as |carac key|}}
|
||||||
<option value="{{key}}">{{carac.label}}</option>
|
<option value="{{key}}">{{carac.label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.competence">Compétence</label>
|
<label for="system.competence">Compétence</label>
|
||||||
<select name="system.competence" data-dtype="String">
|
<select name="system.competence" data-dtype="String" {{#if disabled}}disabled{{/if}}>
|
||||||
{{#select system.competence}}
|
{{#select system.competence}}
|
||||||
<option value="">Sans compétence</option>
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.hbs"}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.hbs"}}
|
{{/select}}
|
||||||
{{/select}}
|
</select>
|
||||||
</select>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.difficulte">Difficulté</label>
|
<label for="system.difficulte">Difficulté</label>
|
||||||
<input name="system.difficulte" value="{{system.difficulte}}" min="-10" max="10"
|
<input name="system.difficulte" value="{{system.difficulte}}" min="-10" max="10"
|
||||||
|
{{#if disabled}}disabled{{/if}}
|
||||||
class="attribute-value" type="number" data-dtype="Number"/>
|
class="attribute-value" type="number" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.periodicite">Périodicité</label>
|
<label for="system.periodicite">Périodicité</label>
|
||||||
<input name="system.periodicite" value="{{system.periodicite}}"
|
<input name="system.periodicite" value="{{system.periodicite}}"
|
||||||
|
{{#if disabled}}disabled{{/if}}
|
||||||
class="attribute-value" type="text" data-dtype="String"/>
|
class="attribute-value" type="text" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.fatigue">Fatigue</label>
|
<label for="system.fatigue">Fatigue</label>
|
||||||
<input name="system.fatigue" value="{{system.fatigue}}" min="0" max="10"
|
<input name="system.fatigue" value="{{system.fatigue}}" min="0" max="10"
|
||||||
|
{{#if disabled}}disabled{{/if}}
|
||||||
class="attribute-value" type="number" data-dtype="Number"/>
|
class="attribute-value" type="number" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.cacher_points_de_tache">Cacher les Points de Tâches nécessaires au joueur</label>
|
<label for="system.cacher_points_de_tache">Cacher les Points de Tâches nécessaires au joueur</label>
|
||||||
<input name="system.cacher_points_de_tache"
|
<input name="system.cacher_points_de_tache"
|
||||||
|
{{#if disabled}}disabled{{/if}}
|
||||||
class="attribute-value" type="checkbox" {{checked system.cacher_points_de_tache}}/>
|
class="attribute-value" type="checkbox" {{checked system.cacher_points_de_tache}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.points_de_tache">Points de tâches nécessaires (MJ)</label>
|
<label for="system.points_de_tache">Points de tâches nécessaires (MJ)</label>
|
||||||
<input name="system.points_de_tache" value="{{system.points_de_tache}}" min="1"
|
<input name="system.points_de_tache" value="{{system.points_de_tache}}" min="1"
|
||||||
|
{{#if disabled}}disabled{{/if}}
|
||||||
class="attribute-value" type="number" data-dtype="Number"/>
|
class="attribute-value" type="number" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
@@ -53,7 +76,9 @@
|
|||||||
<label for="system.points_de_tache">Points de tâches nécessaires inconnus</label>
|
<label for="system.points_de_tache">Points de tâches nécessaires inconnus</label>
|
||||||
{{else}}
|
{{else}}
|
||||||
<label for="system.points_de_tache">Points de tâches nécessaires</label>
|
<label for="system.points_de_tache">Points de tâches nécessaires</label>
|
||||||
<input class="attribute-value" type="text" name="system.points_de_tache" value="{{system.points_de_tache}}" data-dtype="Number"/>
|
<input class="attribute-value" name="system.points_de_tache" value="{{system.points_de_tache}}"
|
||||||
|
{{#if disabled}}disabled{{/if}}
|
||||||
|
type="number" data-dtype="Number"/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@@ -61,16 +86,19 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.points_de_tache_courant">Points de tâches obtenus</label>
|
<label for="system.points_de_tache_courant">Points de tâches obtenus</label>
|
||||||
<input name="system.points_de_tache_courant" value="{{system.points_de_tache_courant}}" min="-4" max="{{system.points_de_tache}}"
|
<input name="system.points_de_tache_courant" value="{{system.points_de_tache_courant}}" min="-4" max="{{system.points_de_tache}}"
|
||||||
|
{{#if disabled}}disabled{{/if}}
|
||||||
class="attribute-value" type="number" data-dtype="Number"/>
|
class="attribute-value" type="number" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.nb_jet_succes">Nombre de Succès</label>
|
<label for="system.nb_jet_succes">Nombre de Succès</label>
|
||||||
<input name="system.nb_jet_succes" value="{{system.nb_jet_succes}}" min="0"
|
<input name="system.nb_jet_succes" value="{{system.nb_jet_succes}}" min="0"
|
||||||
|
{{#if disabled}}disabled{{/if}}
|
||||||
class="attribute-value" type="number" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/>
|
class="attribute-value" type="number" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.nb_jet_echec">Nombre d'Echecs</label>
|
<label for="system.nb_jet_echec">Nombre d'Echecs</label>
|
||||||
<input name="system.nb_jet_echec" value="{{system.nb_jet_echec}}" min="0"
|
<input name="system.nb_jet_echec" value="{{system.nb_jet_echec}}" min="0"
|
||||||
|
{{#if disabled}}disabled{{/if}}
|
||||||
class="attribute-value" type="number" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/>
|
class="attribute-value" type="number" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="roll-text">Compétence</label>
|
<label for="roll-text">Compétence</label>
|
||||||
<select name="roll-text" class="roll-text" data-dtype="String">
|
<select name="roll-text" class="roll-text" data-dtype="String">
|
||||||
{{#select ''}}<option value="">Sans compétence</option>
|
{{#select ''}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.hbs"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.hbs"}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
</subline>
|
</subline>
|
||||||
{{#if refs.taches.length}}
|
{{#if refs.taches.length}}
|
||||||
<subline>
|
<subline>
|
||||||
|
{{> 'systems/foundryvtt-reve-de-dragon/templates/item/tache-commune-flag.hbs' current.tache}}
|
||||||
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}}
|
||||||
(inconnus)
|
(inconnus)
|
||||||
|
|||||||
Reference in New Issue
Block a user