Compare commits
	
		
			48 Commits
		
	
	
		
			foundryvtt
			...
			5a32cf26dc
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 5a32cf26dc | |||
|  | 67b0555b11 | ||
| 59613c3bf8 | |||
| e257b6fbee | |||
| ea990d7c4e | |||
| 6271c75508 | |||
| cd7cc8eeef | |||
|  | bb3bc0ea77 | ||
|  | f348f3dc3f | ||
|  | dbf9f5e908 | ||
|  | e4da124579 | ||
|  | 6e361a5531 | ||
|  | 049b23c666 | ||
|  | 3ff59d1f07 | ||
| cfe8bee1c2 | |||
| d4f0cce62b | |||
| 8c0fbf15b6 | |||
| d4fddf8600 | |||
|  | 4b1862fa48 | ||
|  | 82115ed8d7 | ||
| 59b4f62145 | |||
| 3359492f13 | |||
| 676e6739a6 | |||
|  | 872d3fff31 | ||
| 5f3361ecc6 | |||
| 9c71827baa | |||
| fc9ef06e7b | |||
|  | 9e63706de6 | ||
| 3958b1bdc2 | |||
| 6d6843223b | |||
|  | 46f5cb67f6 | ||
|  | d51243d74f | ||
|  | 34cc671f12 | ||
|  | 16ce6a58dd | ||
| c80cde6d18 | |||
| 89910e234d | |||
| f30df47d22 | |||
|  | c3c42bdb21 | ||
|  | 14eb655382 | ||
|  | 52e4375972 | ||
| 15e4bfb713 | |||
| 8c2d49652c | |||
| ed02972a34 | |||
| 7d32a70e00 | |||
| 8aece9cad1 | |||
| ffd36a045e | |||
|  | bafc52a151 | ||
|  | 940baad04c | 
| @@ -37,8 +37,8 @@ export class RdDActorSheet extends ActorSheet { | ||||
|   /* -------------------------------------------- */ | ||||
|   async getData() { | ||||
|     const objectData = this.object.system | ||||
|     this.timerRecherche = undefined; | ||||
|      | ||||
|     console.log("New actor", objectData) | ||||
|     let formData = { | ||||
|       title: this.title, | ||||
|       id: this.object.id, | ||||
| @@ -76,12 +76,11 @@ export class RdDActorSheet extends ActorSheet { | ||||
|     }; | ||||
|  | ||||
|     formData.competences.forEach(item => { | ||||
|       item.system.visible = this.options.cherchercompetence | ||||
|         ? RdDItemCompetence.nomContientTexte(item, this.options.cherchercompetence) | ||||
|       item.system.isVisible = this.options.recherche | ||||
|         ? RdDItemCompetence.nomContientTexte(item, this.options.recherche.text) | ||||
|         : (!this.options.showCompNiveauBase || !RdDItemCompetence.isNiveauBase(item)); | ||||
|       RdDItemCompetence.levelUp(item, formData.data.compteurs.experience.value); | ||||
|     }); | ||||
|  | ||||
|     Object.values(formData.data.carac).forEach(c => { | ||||
|       RdDCarac.levelUp(c); | ||||
|     }); | ||||
| @@ -91,8 +90,9 @@ export class RdDActorSheet extends ActorSheet { | ||||
|     formData.combat = duplicate(formData.armes ?? []); | ||||
|     RdDItemArme.computeNiveauArmes(formData.combat, formData.competences); | ||||
|     RdDItemArme.ajoutCorpsACorps(formData.combat, formData.competences, formData.data.carac); | ||||
|     formData.esquives = this.actor.getCompetences("Esquive").map(i => foundry.utils.deepClone(i.system)) | ||||
|     formData.combat = RdDCombatManager.finalizeArmeList(formData.combat, formData.competences, formData.data.carac); | ||||
|     formData.esquives = this.actor.getCompetences("Esquive"); | ||||
|     formData.combat = RdDCombatManager.listActionsArmes(formData.combat, formData.competences, formData.data.carac); | ||||
|  | ||||
|     this.armesList = formData.combat; | ||||
|  | ||||
|     // Common data | ||||
| @@ -128,8 +128,8 @@ export class RdDActorSheet extends ActorSheet { | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   async _onDropActor(event, dragData) { | ||||
|     console.log("_onDropActor", this.actor.id, dragData); | ||||
|     this.actor.addSubActeur(dragData.id || dragData.data._id); | ||||
|     const dropActor = fromUuidSync(dragData.uuid); | ||||
|     this.actor.addSubActeur(dropActor); | ||||
|     super._onDropActor(event, dragData); | ||||
|   } | ||||
|  | ||||
| @@ -332,8 +332,8 @@ export class RdDActorSheet extends ActorSheet { | ||||
|     html.find('.arme-initiative a').click(async event => { | ||||
|       let combatant = game.combat.data.combatants.find(c => c.actor.data._id == this.actor.data._id); | ||||
|       if (combatant) { | ||||
|         let arme = this._getEventArmeCombat(event); | ||||
|         RdDCombatManager.rollInitiativeCompetence(combatant._id, arme); | ||||
|         let action = this._getEventArmeCombat(event); | ||||
|         RdDCombatManager.rollInitiativeAction(combatant._id, action); | ||||
|       } else { | ||||
|         ui.notifications.info("Impossible de lancer l'initiative sans être dans un combat."); | ||||
|       } | ||||
| @@ -381,13 +381,11 @@ export class RdDActorSheet extends ActorSheet { | ||||
|     if (this.options.editCaracComp) { | ||||
|       // On carac change | ||||
|       html.find('.carac-value').change(async event => { | ||||
|         let caracName = event.currentTarget.name.replace(".value", "").replace("system.carac.", ""); | ||||
|         //console.log("Value changed :", event, caracName); | ||||
|         let caracName = event.currentTarget.name.replace(".value", "").replace("data.carac.", ""); | ||||
|         this.actor.updateCarac(caracName, parseInt(event.target.value)); | ||||
|       }); | ||||
|       html.find('.carac-xp').change(async event => { | ||||
|         let caracName = event.currentTarget.name.replace(".xp", "").replace("system.carac.", ""); | ||||
|         //console.log("Value changed :", event, caracName); | ||||
|       html.find('input.carac-xp').change(async event => { | ||||
|         let caracName = event.currentTarget.name.replace(".xp", "").replace("data.carac.", ""); | ||||
|         this.actor.updateCaracXP(caracName, parseInt(event.target.value)); | ||||
|       }); | ||||
|       // On competence change | ||||
| @@ -397,12 +395,12 @@ export class RdDActorSheet extends ActorSheet { | ||||
|         this.actor.updateCompetence(compName, parseInt(event.target.value)); | ||||
|       }); | ||||
|       // On competence xp change | ||||
|       html.find('.competence-xp').change(async event => { | ||||
|       html.find('input.competence-xp').change(async event => { | ||||
|         let compName = event.currentTarget.attributes.compname.value; | ||||
|         this.actor.updateCompetenceXP(compName, parseInt(event.target.value)); | ||||
|       }); | ||||
|       // On competence xp change | ||||
|       html.find('.competence-xp-sort').change(async event => { | ||||
|       html.find('input.competence-xp-sort').change(async event => { | ||||
|         let compName = event.currentTarget.attributes.compname.value; | ||||
|         this.actor.updateCompetenceXPSort(compName, parseInt(event.target.value)); | ||||
|       }); | ||||
| @@ -421,12 +419,31 @@ export class RdDActorSheet extends ActorSheet { | ||||
|       this.options.editCaracComp = !this.options.editCaracComp; | ||||
|       this.render(true); | ||||
|     }); | ||||
|     html.find('.cherchercompetence').change(async event => { | ||||
|       this.options.cherchercompetence = event.currentTarget.value; | ||||
|       this.render(true); | ||||
|     }); | ||||
|  | ||||
|     html.find('.recherche') | ||||
|       .each((index, field) => { | ||||
|         if (this.options.recherche) { | ||||
|           field.focus(); | ||||
|           field.setSelectionRange(this.options.recherche.start, this.options.recherche.end); | ||||
|         } | ||||
|       }) | ||||
|       .keyup(async event => { | ||||
|         const nouvelleRecherche = this._optionRecherche(event.currentTarget); | ||||
|         if (this.options.recherche?.text != nouvelleRecherche?.text){ | ||||
|           this.options.recherche = nouvelleRecherche; | ||||
|           if (this.timerRecherche) { | ||||
|             clearTimeout(this.timerRecherche); | ||||
|           } | ||||
|           this.timerRecherche = setTimeout(() => { | ||||
|             this.timerRecherche = undefined; | ||||
|             this.render(true); | ||||
|           }, 500); | ||||
|         } | ||||
|       }) | ||||
|       .change(async event => | ||||
|         this.options.recherche = this._optionRecherche(event.currentTarget) | ||||
|       ); | ||||
|     html.find('.vue-detaillee').click(async event => { | ||||
|       console.log("CONTROLS", this.options.vueDetaillee) | ||||
|       this.options.vueDetaillee = !this.options.vueDetaillee; | ||||
|       this.render(true); | ||||
|     }); | ||||
| @@ -512,6 +529,17 @@ export class RdDActorSheet extends ActorSheet { | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   _optionRecherche(target) { | ||||
|     if (!target.value?.length){ | ||||
|       return undefined; | ||||
|     } | ||||
|     return { | ||||
|       text: target.value, | ||||
|       start: target.selectionStart, | ||||
|       end: target.selectionEnd, | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   _getEventArmeCombat(event) { | ||||
|     const li = $(event.currentTarget)?.parents(".item"); | ||||
|     let armeName = li.data("arme-name"); | ||||
| @@ -549,9 +577,9 @@ export class RdDActorSheet extends ActorSheet { | ||||
|   } | ||||
|  | ||||
|   async _onSplitItem(item, split) { | ||||
|     if (split >= 1 && split < Misc.data(item).data.quantite) { | ||||
|     if (split >= 1 && split < item.system.quantite) { | ||||
|       await item.diminuerQuantite(split); | ||||
|       const itemData = duplicate(Misc.data(item)); | ||||
|       const itemData = duplicate(item.system); | ||||
|       itemData.data.quantite = split; | ||||
|       await this.actor.createEmbeddedDocuments('Item', [itemData]) | ||||
|     } | ||||
|   | ||||
							
								
								
									
										142
									
								
								module/actor.js
									
									
									
									
									
								
							
							
						
						
									
										142
									
								
								module/actor.js
									
									
									
									
									
								
							| @@ -33,7 +33,8 @@ import { RollDataAjustements } from "./rolldata-ajustements.js"; | ||||
| import { DialogItemAchat } from "./dialog-item-achat.js"; | ||||
| import { RdDItem } from "./item.js"; | ||||
| import { RdDPossession } from "./rdd-possession.js"; | ||||
| import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js"; | ||||
| import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js"; | ||||
|  | ||||
|  | ||||
| /* -------------------------------------------- */ | ||||
| /** | ||||
| @@ -98,7 +99,6 @@ export class RdDActor extends Actor { | ||||
|    * @param {Object} options     (Unused) Additional options which customize the creation workflow. | ||||
|    * | ||||
|    */ | ||||
|  | ||||
|   static async create(actorData, options) { | ||||
|     // Case of compendium global import | ||||
|     if (actorData instanceof Array) { | ||||
| @@ -115,12 +115,15 @@ export class RdDActor extends Actor { | ||||
|       return actor; | ||||
|     } | ||||
|  | ||||
|     const competences = await RdDUtility.loadCompendium(RdDItemCompetence.actorCompendium(actorData.type)) | ||||
|     actorData.items = competences.map(i => i.toObject()) | ||||
|     if (isPersonnage) { | ||||
|       const competences = await RdDUtility.loadCompendium(RdDItemCompetence.actorCompendium(actorData.type)); | ||||
|       actorData.items = competences.map(i => i.toObject()); | ||||
|       actorData.items = actorData.items.concat(Monnaie.monnaiesData()); | ||||
|     } | ||||
|     return super.create(actorData, options) | ||||
|     else { | ||||
|       actorData.items = []; | ||||
|     } | ||||
|     return super.create(actorData, options); | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
| @@ -131,13 +134,6 @@ export class RdDActor extends Actor { | ||||
|     this.encTotal = 0; | ||||
|     this.prixTotalEquipement = 0; | ||||
|  | ||||
|     /* | ||||
|     // Auto-resize token | ||||
|     if (this.isToken) { | ||||
|       let tokenSize = actorData.data.carac.taille.value/10; | ||||
|       this.token.update({height: tokenSize, width: tokenSize } ); | ||||
|     }*/ | ||||
|  | ||||
|     // Make separate methods for each Actor type (character, npc, etc.) to keep | ||||
|     // things organized. | ||||
|     if (this.type === 'personnage') this._prepareCharacterData(this) | ||||
| @@ -242,7 +238,7 @@ export class RdDActor extends Actor { | ||||
|   } | ||||
|   /* -------------------------------------------- */ | ||||
|   getForce() { | ||||
|     if (this.isEntiteCauchemar()) { | ||||
|     if (this.isEntite()) { | ||||
|       return Misc.toInt(this.system.carac.reve?.value); | ||||
|     } | ||||
|     return Misc.toInt(this.system.carac.force?.value); | ||||
| @@ -320,7 +316,7 @@ export class RdDActor extends Actor { | ||||
|     return this.filterItemsData(it => it.type == type); | ||||
|   } | ||||
|   filterItemsData(filter) { | ||||
|     return this.items.map( it => it).filter(filter) | ||||
|     return this.items.map(it => it).filter(filter) | ||||
|   } | ||||
|   filterItems(filter) { | ||||
|     return this.items.filter(it => filter(it)) | ||||
| @@ -372,11 +368,11 @@ export class RdDActor extends Actor { | ||||
|   getDraconicOuPossession() { | ||||
|     const possessions = this.items.filter(it => it.type == 'competencecreature' && it.system.ispossession) | ||||
|       .sort(Misc.descending(it => it.system.niveau)); | ||||
|     if (possessions.length>0) { | ||||
|     if (possessions.length > 0) { | ||||
|       return duplicate(possessions[0]); | ||||
|     } | ||||
|     const draconics = this.getDraconicList().filter(it => it.system.niveau >= 0); | ||||
|     if (draconics.length> 0) { | ||||
|     if (draconics.length > 0) { | ||||
|       return duplicate(draconics[0]); | ||||
|     } | ||||
|     return { | ||||
| @@ -391,6 +387,9 @@ export class RdDActor extends Actor { | ||||
|   getPossession(possessionId) { | ||||
|     return this.items.find(it => it.type == 'possession' && it.system.possessionid == possessionId); | ||||
|   } | ||||
|   getPossessions() { | ||||
|     return this.items.filter(it => it.type == 'possession'); | ||||
|   } | ||||
|  | ||||
|   getDemiReve() { | ||||
|     return this.system.reve.tmrpos.coord; | ||||
| @@ -610,7 +609,10 @@ export class RdDActor extends Actor { | ||||
|       whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name), | ||||
|       content: "Remise à neuf de " + this.name | ||||
|     }; | ||||
|     if (this.isEntiteCauchemar()) { | ||||
|     if (this.isEntite([ENTITE_NONINCARNE])) { | ||||
|       return; | ||||
|     } | ||||
|     if (this.isEntite([ENTITE_INCARNE, ENTITE_BLURETTE])) { | ||||
|       await this.santeIncDec("endurance", this.system.sante.endurance.max - this.system.sante.endurance.value); | ||||
|     } | ||||
|     else { | ||||
| @@ -825,7 +827,7 @@ export class RdDActor extends Actor { | ||||
|   async resultCombatReveDeDragon(rollData) { | ||||
|     rollData.queues = []; | ||||
|     if (rollData.rolled.isEchec) { | ||||
|       rollData.queues.push( await this.ajouterQueue()); | ||||
|       rollData.queues.push(await this.ajouterQueue()); | ||||
|     } | ||||
|     if (rollData.rolled.isETotal) { | ||||
|       rollData.queues.push(await this.ajouterQueue()); | ||||
| @@ -975,7 +977,7 @@ export class RdDActor extends Actor { | ||||
|       let nouveauNiveau = compValue ?? RdDItemCompetence.getNiveauBase(competence.system.categorie); | ||||
|       const tronc = RdDItemCompetence.getListTronc(competence.name).filter(it => { | ||||
|         const comp = this.getCompetence(it); | ||||
|         const niveauTr = competence? competence.system.niveau : 0; | ||||
|         const niveauTr = competence ? competence.system.niveau : 0; | ||||
|         return niveauTr < 0 && niveauTr < nouveauNiveau; | ||||
|       }); | ||||
|       if (tronc.length > 0) { | ||||
| @@ -1038,7 +1040,6 @@ export class RdDActor extends Actor { | ||||
|   /* -------------------------------------------- */ | ||||
|   async updateExperienceLog(modeXP, valeurXP, raisonXP = 'Inconnue') { | ||||
|     let d = new Date(); | ||||
|     console.log(modeXP, valeurXP, raisonXP); | ||||
|     let expLog = duplicate(this.system.experiencelog); | ||||
|     expLog.push({ | ||||
|       mode: Misc.upperFirst(modeXP), valeur: valeurXP, raison: Misc.upperFirst(raisonXP), | ||||
| @@ -1304,17 +1305,17 @@ export class RdDActor extends Actor { | ||||
|     } | ||||
|     return Math.min(0, this.getEncombrementMax() - Math.ceil(Number(this.getEncTotal()))); | ||||
|   } | ||||
|   getMessageSurEncombrement(){ | ||||
|     return this.computeMalusSurEncombrement() <0 ? "Sur-Encombrement!" : ""; | ||||
|   getMessageSurEncombrement() { | ||||
|     return this.computeMalusSurEncombrement() < 0 ? "Sur-Encombrement!" : ""; | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   getEncombrementMax() { | ||||
|     switch (this.type){ | ||||
|       case  'vehicule': | ||||
|     switch (this.type) { | ||||
|       case 'vehicule': | ||||
|         return this.system.capacite_encombrement; | ||||
|       case 'entite': | ||||
|         return 0;  | ||||
|         return 0; | ||||
|       default: | ||||
|         return this.system.attributs.encombrement.value | ||||
|     } | ||||
| @@ -1336,7 +1337,7 @@ export class RdDActor extends Actor { | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   async computeEncombrementTotalEtMalusArmure() { | ||||
|     if ( !this.pack ) {  | ||||
|     if (!this.pack) { | ||||
|       await this.computeMalusArmure(); | ||||
|       return this.computeEncombrement(); | ||||
|     } | ||||
| @@ -1614,7 +1615,7 @@ export class RdDActor extends Actor { | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   async setSonne(sonne = true) { | ||||
|     if (this.isEntiteCauchemar()) { | ||||
|     if (this.isEntite()) { | ||||
|       return; | ||||
|     } | ||||
|     if (!game.combat && sonne) { | ||||
| @@ -1626,7 +1627,7 @@ export class RdDActor extends Actor { | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   getSConst() { | ||||
|     if (this.isEntiteCauchemar()) { | ||||
|     if (this.isEntite()) { | ||||
|       return 0; | ||||
|     } | ||||
|     return RdDCarac.calculSConst(this.system.carac.constitution.value) | ||||
| @@ -1741,7 +1742,7 @@ export class RdDActor extends Actor { | ||||
|     result.newValue = Math.max(minValue, Math.min(compteur.value + inc, compteur.max)); | ||||
|     //console.log("New value ", inc, minValue, result.newValue); | ||||
|     let fatigue = 0; | ||||
|     if (name == "endurance" && !this.isEntiteCauchemar()) { | ||||
|     if (name == "endurance" && !this.isEntite()) { | ||||
|       if (result.newValue == 0 && inc < 0 && !isCritique) { // perte endurance et endurance devient 0 (sauf critique) -> -1 vie | ||||
|         sante.vie.value--; | ||||
|         result.perteVie = true; | ||||
| @@ -1778,7 +1779,7 @@ export class RdDActor extends Actor { | ||||
|   } | ||||
|  | ||||
|   isDead() { | ||||
|     return !this.isEntiteCauchemar() && this.system.sante.vie.value < -this.getSConst() | ||||
|     return !this.isEntite() && this.system.sante.vie.value < -this.getSConst() | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
| @@ -1907,7 +1908,7 @@ export class RdDActor extends Actor { | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   async actionItem(item, onActionItem = async ()=>{}) { | ||||
|   async actionItem(item, onActionItem = async () => { }) { | ||||
|     if (!item.getActionPrincipale()) return; | ||||
|     switch (item.type) { | ||||
|       case 'nourritureboisson': return await this.actionNourritureboisson(item, onActionItem); | ||||
| @@ -1915,7 +1916,7 @@ export class RdDActor extends Actor { | ||||
|       case 'livre': return await this.actionLire(item); | ||||
|       case 'conteneur': return await item.sheet.render(true); | ||||
|       case 'herbe': { | ||||
|         if (item.isHerbeAPotion()){ | ||||
|         if (item.isHerbeAPotion()) { | ||||
|           return this.dialogFabriquerPotion(item); | ||||
|         } | ||||
|         return; | ||||
| @@ -2167,7 +2168,7 @@ export class RdDActor extends Actor { | ||||
|   createCallbackExperience() { | ||||
|     return { | ||||
|       condition: r => r.rolled.isPart && r.finalLevel < 0 && game.settings.get("core", "rollMode") != 'selfroll', | ||||
|       action: r => this.appliquerAjoutExperience(r, (game.settings.get("core", "rollMode") != 'blindroll' && !game.user.isGM)) | ||||
|       action: r => this.appliquerAjoutExperience(r) | ||||
|     }; | ||||
|   } | ||||
|  | ||||
| @@ -2239,10 +2240,11 @@ export class RdDActor extends Actor { | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   async appliquerAjoutExperience(rollData, display) { | ||||
|   async appliquerAjoutExperience(rollData, hideChatMessage = 'show') { | ||||
|     if (!this.isPersonnage()) return; | ||||
|     hideChatMessage = hideChatMessage == 'hide' || (game.settings.get("core", "rollMode") != 'blindroll' && !game.user.isGM) | ||||
|     let xpData = await this._appliquerExperience(rollData.rolled, rollData.selectedCarac.label, rollData.competence); | ||||
|     if (xpData && display) { | ||||
|     if (xpData && !hideChatMessage) { | ||||
|       ChatMessage.create({ | ||||
|         whisper: ChatUtility.getWhisperRecipientsAndGMs(this.name), | ||||
|         content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-actor-gain-xp.html`, xpData) | ||||
| @@ -2536,7 +2538,7 @@ export class RdDActor extends Actor { | ||||
|         if (rollData.competence.system.ispossession) { | ||||
|           RdDPossession.onAttaquePossession(this, rollData.competence) | ||||
|         } else { | ||||
|           const arme = RdDItemCompetenceCreature.toArme(rollData.competence) | ||||
|           const arme = RdDItemCompetenceCreature.toActionArme(rollData.competence) | ||||
|           RdDCombat.createUsingTarget(this)?.attaque(competence, arme) | ||||
|         } | ||||
|         return | ||||
| @@ -2662,7 +2664,7 @@ export class RdDActor extends Actor { | ||||
|         selectedCarac: duplicate(this.system.carac[selected]) | ||||
|       }, | ||||
|       { overwrite: false }); | ||||
|       artData.competence.system.defaut_carac = selected; | ||||
|     artData.competence.system.defaut_carac = selected; | ||||
|     if (!artData.forceCarac) { | ||||
|       artData.forceCarac = {}; | ||||
|       artData.forceCarac[selected] = duplicate(this.system.carac[selected]); | ||||
| @@ -3033,7 +3035,7 @@ export class RdDActor extends Actor { | ||||
|       let update = { _id: xpData.competence._id, 'system.xp': newXp }; | ||||
|       await this.updateEmbeddedDocuments('Item', [update]); | ||||
|       xpData.checkComp = await this.checkCompetenceXP(xpData.competence.name, undefined, false); | ||||
|       this.updateExperienceLog("XP", xpData.xp, "XP gagné en " + xpData.competence.name); | ||||
|       this.updateExperienceLog("XP", xpData.xpCompetence, "XP gagné en " + xpData.competence.name); | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -3065,7 +3067,7 @@ export class RdDActor extends Actor { | ||||
|     // Gestion expérience (si existante) | ||||
|     data.competence = this.getCompetence("astrologie") | ||||
|     data.selectedCarac = this.system.carac["vue"]; | ||||
|     this.appliquerAjoutExperience(data, false); | ||||
|     this.appliquerAjoutExperience(data, 'hide'); | ||||
|  | ||||
|     // Ajout du nombre astral | ||||
|     const item = { | ||||
| @@ -3119,7 +3121,7 @@ export class RdDActor extends Actor { | ||||
|         return carac.chance; | ||||
|     } | ||||
|     let entry = Misc.findFirstLike(name, Object.entries(carac), { mapper: it => it[1].label, description: 'caractéristique' }); | ||||
|     return entry.length > 0 ? carac[entry[0]] : undefined; | ||||
|     return entry && entry.length > 0 ? carac[entry[0]] : undefined; | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
| @@ -3283,10 +3285,10 @@ export class RdDActor extends Actor { | ||||
|       if (res) { | ||||
|         let malus = Misc.toInt(res[3]) - 1; | ||||
|         let armure = Misc.toInt(res[2]); | ||||
|         if (armure+malus <= 0){ | ||||
|         if (armure + malus <= 0) { | ||||
|           itemData.system.protection = 0; | ||||
|         } else { | ||||
|           itemData.system.protection = '' + (res[1]??'1') + 'd' + armure + malus; | ||||
|           itemData.system.protection = '' + (res[1] ?? '1') + 'd' + armure + malus; | ||||
|         } | ||||
|       } | ||||
|       else if (/\d+/.exec(itemData.system.protection)) { | ||||
| @@ -3319,7 +3321,7 @@ export class RdDActor extends Actor { | ||||
|     let encaissement = await this.jetEncaissement(rollData); | ||||
|  | ||||
|     this.ajouterBlessure(encaissement); // Will upate the result table | ||||
|     const perteVie = this.isEntiteCauchemar() | ||||
|     const perteVie = this.isEntite() | ||||
|       ? { newValue: 0 } | ||||
|       : await this.santeIncDec("vie", - encaissement.vie); | ||||
|     const perteEndurance = await this.santeIncDec("endurance", -encaissement.endurance, encaissement.critiques > 0); | ||||
| @@ -3333,7 +3335,7 @@ export class RdDActor extends Actor { | ||||
|       sonne: perteEndurance.sonne, | ||||
|       jetEndurance: perteEndurance.jetEndurance, | ||||
|       endurance: santeOrig.endurance.value - perteEndurance.newValue, | ||||
|       vie: this.isEntiteCauchemar() ? 0 : (santeOrig.vie.value - perteVie.newValue), | ||||
|       vie: this.isEntite() ? 0 : (santeOrig.vie.value - perteVie.newValue), | ||||
|       show: defenderRoll?.show ?? {} | ||||
|     }); | ||||
|  | ||||
| @@ -3522,8 +3524,8 @@ export class RdDActor extends Actor { | ||||
|   /* -------------------------------------------- */ | ||||
|   async accorder(entite, when = 'avant-encaissement') { | ||||
|     if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar") | ||||
|       || !entite.isEntiteCauchemar() | ||||
|       || entite.isEntiteCauchemarAccordee(this)) { | ||||
|       || !entite.isEntite([ENTITE_INCARNE]) | ||||
|       || entite.isEntiteAccordee(this)) { | ||||
|       return true; | ||||
|     } | ||||
|     const tplData = this.system; | ||||
| @@ -3547,29 +3549,29 @@ export class RdDActor extends Actor { | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   isEntiteCauchemar() { | ||||
|     return this.type == 'entite'; | ||||
|   isEntite(typeentite = []) { | ||||
|     return this.type == 'entite' && (typeentite.length == 0 || typeentite.includes(this.system.typeentite)); | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   isEntiteCauchemarAccordee(attaquant) { | ||||
|     if (!this.isEntiteCauchemar()) { return true; } | ||||
|   isEntiteAccordee(attaquant) { | ||||
|     if (!this.isEntite([ENTITE_INCARNE])) { return true; } | ||||
|     let resonnance = this.system.sante.resonnance; | ||||
|     return (resonnance.actors.find(it => it == attaquant._id)); | ||||
|     return (resonnance.actors.find(it => it == attaquant.id)); | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   async setEntiteReveAccordee(attaquant) { | ||||
|     if (!this.isEntiteCauchemar()) { | ||||
|     if (!this.isEntite([ENTITE_INCARNE])) { | ||||
|       ui.notifications.error("Impossible de s'accorder à " + this.name + ": ce n'est pas une entite de cauchemer/rêve"); | ||||
|       return; | ||||
|     } | ||||
|     let resonnance = duplicate(this.system.sante.resonnance); | ||||
|     if (resonnance.actors.find(it => it == attaquant._id)) { | ||||
|     if (resonnance.actors.find(it => it == attaquant.id)) { | ||||
|       // déjà accordé | ||||
|       return; | ||||
|     } | ||||
|     resonnance.actors.push(attaquant._id); | ||||
|     resonnance.actors.push(attaquant.id); | ||||
|     await this.update({ "system.sante.resonnance": resonnance }); | ||||
|     return; | ||||
|   } | ||||
| @@ -3596,7 +3598,7 @@ export class RdDActor extends Actor { | ||||
|       10: Math.floor(fortuneTotale / 10) % 10, // bronze | ||||
|       1: fortuneTotale % 10 // étain | ||||
|     } | ||||
|     console.log('RdDActor.optimizeArgent', fortuneTotale, 'nouvelleFortune', nouvelleFortune, 'monnaie_par_valeur',parValeur); | ||||
|     console.log('RdDActor.optimizeArgent', fortuneTotale, 'nouvelleFortune', nouvelleFortune, 'monnaie_par_valeur', parValeur); | ||||
|     let updates = []; | ||||
|     for (const [valeur, nombre] of Object.entries(nouvelleFortune)) { | ||||
|       updates.push({ _id: parValeur[valeur].id, 'system.quantite': nombre }); | ||||
| @@ -3665,7 +3667,8 @@ export class RdDActor extends Actor { | ||||
|       RdDActor.remoteActorCall({ | ||||
|         userId: Misc.connectedGMOrUser(), | ||||
|         actorId: this.id, | ||||
|         method: 'ajouterDeniers', args: [gain, fromActorId] }); | ||||
|         method: 'ajouterDeniers', args: [gain, fromActorId] | ||||
|       }); | ||||
|     } | ||||
|     else { | ||||
|       const fromActor = game.actors.get(fromActorId) | ||||
| @@ -3700,8 +3703,9 @@ export class RdDActor extends Actor { | ||||
|       RdDActor.remoteActorCall({ | ||||
|         actorId: achat.vendeurId ?? achat.acheteurId, | ||||
|         method: 'achatVente', | ||||
|         args: [achat] }, | ||||
|         ); | ||||
|         args: [achat] | ||||
|       }, | ||||
|       ); | ||||
|       return; | ||||
|     } | ||||
|  | ||||
| @@ -3886,19 +3890,21 @@ export class RdDActor extends Actor { | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   addSubActeur(subActorId) { | ||||
|     let subActor = game.actors.get(subActorId); | ||||
|     //console.log("Ajout acteur : ", actor, this); | ||||
|     if (subActor && !subActor.owner) { | ||||
|       if (subActortype == 'vehicule') { | ||||
|   addSubActeur(subActor) { | ||||
|     if(subActor?.id == this.id){ | ||||
|       ui.notifications.warn("Vous ne pouvez pas attacher un acteur à lui même") | ||||
|     } | ||||
|     else if (!subActor?.isOwner) { | ||||
|       ui.notifications.warn("Vous n'avez pas les droits sur l'acteur que vous attachez.") | ||||
|     } | ||||
|     else { | ||||
|       if (subActor.type == 'vehicule') { | ||||
|         this.pushSubacteur(subActor, this.system.subacteurs.vehicules, 'system.subacteurs.vehicules', 'Ce Véhicule'); | ||||
|       } else if (subActor.type == 'creature') { | ||||
|         this.pushSubacteur(subActor, this.system.subacteurs.montures, 'system.subacteurs.montures', 'Cette Monture'); | ||||
|       } else if (subActor.type == 'personnage') { | ||||
|         this.pushSubacteur(subActor, this.system.subacteurs.suivants, 'system.subacteurs.suivants', 'Ce Suivant'); | ||||
|       } | ||||
|     } else { | ||||
|       ui.notifications.warn("Vous n'avez pas les droits sur l'acteur que vous attachez.") | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -4072,7 +4078,7 @@ export class RdDActor extends Actor { | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   async consommerPotion(potion, onActionItem = async () => {}) { | ||||
|   async consommerPotion(potion, onActionItem = async () => { }) { | ||||
|     const potionData = potion | ||||
|  | ||||
|     if (potionData.system.categorie.includes('Soin')) { | ||||
| @@ -4108,7 +4114,7 @@ export class RdDActor extends Actor { | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   getEffectByLabel(label) {     | ||||
|   getEffectByLabel(label) { | ||||
|     return this.getActiveEffects().find(it => it.system?.label == label); | ||||
|   } | ||||
|  | ||||
| @@ -4119,7 +4125,7 @@ export class RdDActor extends Actor { | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   async setStatusEffect(label, status, updates = {}) { | ||||
|     if (this.isEntiteCauchemar() || this.type == 'vehicule') { | ||||
|     if (this.isEntite() || this.type == 'vehicule') { | ||||
|       return; | ||||
|     } | ||||
|     console.log("setStatusEffect", label, status, updates) | ||||
|   | ||||
| @@ -141,7 +141,7 @@ export class ChatUtility { | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static getUsers(filter) { | ||||
|     return Misc.getUsers().filter(filter).map(user => user.data._id); | ||||
|     return Misc.getUsers().filter(filter).map(user => user.id); | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   | ||||
| @@ -3,3 +3,7 @@ export const SYSTEM_SOCKET_ID = 'system.foundryvtt-reve-de-dragon'; | ||||
|  | ||||
| export const HIDE_DICE = 'hide'; | ||||
| export const SHOW_DICE = 'show'; | ||||
|  | ||||
| export const ENTITE_INCARNE = 'incarne'; | ||||
| export const ENTITE_NONINCARNE = 'nonincarne'; | ||||
| export const ENTITE_BLURETTE = 'blurette'; | ||||
|   | ||||
| @@ -9,7 +9,7 @@ export class DialogFabriquerPotion extends Dialog { | ||||
|     let potionData = DialogFabriquerPotion.prepareData(actor, item); | ||||
|  | ||||
|     let conf = { | ||||
|       title: `Fabriquer une potion de ${potionData.data.categorie}`, | ||||
|       title: `Fabriquer une potion de ${potionData.system.categorie}`, | ||||
|       content: await renderTemplate(dialogConfig.html, potionData), | ||||
|       default: potionData.buttonName, | ||||
|     }; | ||||
| @@ -25,8 +25,8 @@ export class DialogFabriquerPotion extends Dialog { | ||||
|   /* -------------------------------------------- */ | ||||
|   static prepareData(actor, item) { | ||||
|     let potionData = duplicate(item) | ||||
|     potionData.nbBrinsSelect = RdDUtility.buildListOptions(1, potionData.data.quantite); | ||||
|     potionData.nbBrins = Math.min(potionData.data.quantite, DialogFabriquerPotion.getNombreBrinOptimal(potionData)); | ||||
|     potionData.nbBrinsSelect = RdDUtility.buildListOptions(1, potionData.system.quantite); | ||||
|     potionData.nbBrins = Math.min(potionData.system.quantite, DialogFabriquerPotion.getNombreBrinOptimal(potionData)); | ||||
|     potionData.buttonName = "Fabriquer"; | ||||
|     return potionData; | ||||
|   } | ||||
| @@ -46,9 +46,9 @@ export class DialogFabriquerPotion extends Dialog { | ||||
|   } | ||||
|  | ||||
|   static getNombreBrinOptimal(herbeData) { | ||||
|     switch (herbeData.data.categorie ?? '') { | ||||
|       case "Soin": return 12 - herbeData.data.niveau; | ||||
|       case "Repos": return 7 - herbeData.data.niveau; | ||||
|     switch (herbeData.system.categorie ?? '') { | ||||
|       case "Soin": return 12 - herbeData.system.niveau; | ||||
|       case "Repos": return 7 - herbeData.system.niveau; | ||||
|     } | ||||
|     return 1; | ||||
|   } | ||||
|   | ||||
| @@ -55,7 +55,7 @@ export class DialogItemAchat extends Dialog { | ||||
|  | ||||
|   static prepareVenteData(buttonAcheter, vendeurId, vendeur, acheteur) { | ||||
|     const jsondata = buttonAcheter.attributes['data-jsondata']?.value; | ||||
|     const prixLot = buttonAcheter.attributes['data-prixLot']?.value ?? 0; | ||||
|     const prixLot = parseInt(buttonAcheter.attributes['data-prixLot']?.value ?? 0); | ||||
|     let venteData = { | ||||
|       item: JSON.parse(jsondata), | ||||
|       vendeurId: vendeurId, | ||||
|   | ||||
| @@ -6,7 +6,7 @@ export class DialogSplitItem extends Dialog { | ||||
|     const itemData = item | ||||
|     const splitData = { | ||||
|       item: itemData, | ||||
|       choix: { quantite: 1, max: itemData.data.quantite - 1 } | ||||
|       choix: { quantite: 1, max: itemData.system.quantite - 1 } | ||||
|     }; | ||||
|     const html = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/dialog-item-split.html`, splitData); | ||||
|     return new DialogSplitItem(item, splitData, html, callback) | ||||
|   | ||||
| @@ -30,7 +30,7 @@ export class RdDItemArme extends Item { | ||||
|     switch (armeData ? armeData.type : '') { | ||||
|       case 'arme': return armeData; | ||||
|       case 'competencecreature': | ||||
|         return RdDItemCompetenceCreature.toArme(armeData); | ||||
|         return RdDItemCompetenceCreature.toActionArme(armeData); | ||||
|     } | ||||
|     return RdDItemArme.mainsNues(); | ||||
|   } | ||||
| @@ -186,7 +186,7 @@ export class RdDItemArme extends Item { | ||||
|         categorie_parade: 'sans-armes' | ||||
|       } | ||||
|     }; | ||||
|     mergeObject(corpsACorps.system, actorData ??{}, { overwrite: false }); | ||||
|     mergeObject(corpsACorps.system, actorData ?? {}, { overwrite: false }); | ||||
|     return corpsACorps; | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -183,14 +183,14 @@ export class RdDItemCompetence extends Item { | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static levelUp(itemData, stressTransforme) { | ||||
|     itemData.system.xpNext = RdDItemCompetence.getCompetenceNextXp(itemData.system.niveau); | ||||
|     const xpManquant = itemData.system.xpNext - itemData.system.xp; | ||||
|     itemData.system.isLevelUp = xpManquant <= 0; | ||||
|     itemData.system.isStressLevelUp = (xpManquant > 0 && stressTransforme >= xpManquant && itemData.system.niveau < itemData.system.niveau_archetype); | ||||
|     itemData.system.stressXpMax = 0; | ||||
|     if (xpManquant > 0 && stressTransforme > 0 && itemData.system.niveau < itemData.system.niveau_archetype) { | ||||
|         itemData.system.stressXpMax = Math.min(xpManquant , stressTransforme); | ||||
|   static levelUp(item, stressTransforme) { | ||||
|     item.system.xpNext = RdDItemCompetence.getCompetenceNextXp(item.system.niveau); | ||||
|     const xpManquant = item.system.xpNext - item.system.xp; | ||||
|     item.system.isLevelUp = xpManquant <= 0; | ||||
|     item.system.isStressLevelUp = (xpManquant > 0 && stressTransforme >= xpManquant && item.system.niveau < item.system.niveau_archetype); | ||||
|     item.system.stressXpMax = 0; | ||||
|     if (xpManquant > 0 && stressTransforme > 0 && item.system.niveau < item.system.niveau_archetype) { | ||||
|         item.system.stressXpMax = Math.min(xpManquant , stressTransforme); | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -210,8 +210,11 @@ export class RdDItemCompetence extends Item { | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static findCompetence(list, idOrName, options = {}) { | ||||
|     if (idOrName == undefined) { | ||||
|       return undefined; | ||||
|     } | ||||
|     options = mergeObject(options, { | ||||
|       filter: it => RdDItemCompetence.isCompetence(it), | ||||
|       preFilter: it => RdDItemCompetence.isCompetence(it), | ||||
|       description: 'compétence', | ||||
|     }); | ||||
|     return list.find(it => it.id == idOrName && RdDItemCompetence.isCompetence(it)) | ||||
|   | ||||
| @@ -11,12 +11,12 @@ export class RdDItemCompetenceCreature extends Item { | ||||
|     rollData.competence.system.categorie = "creature" | ||||
|     rollData.selectedCarac =  rollData.carac.carac_creature | ||||
|     if (rollData.competence.system.iscombat) { | ||||
|       rollData.arme = RdDItemCompetenceCreature.toArme(rollData.competence); | ||||
|       rollData.arme = RdDItemCompetenceCreature.toActionArme(rollData.competence); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static toArme(item) { | ||||
|   static toActionArme(item) { | ||||
|     if (RdDItemCompetenceCreature.isCompetenceAttaque(item)) { | ||||
|       // si c'est un Item compétence: cloner pour ne pas modifier lma compétence | ||||
|       let arme = (item instanceof Item) ? item.clone():  item; | ||||
| @@ -28,11 +28,12 @@ export class RdDItemCompetenceCreature extends Item { | ||||
|           dommagesReels: arme.system.dommages, | ||||
|           penetration: 0, | ||||
|           force: 0, | ||||
|           rapide: true | ||||
|           rapide: true, | ||||
|           action: 'attaque' | ||||
|         }); | ||||
|       return arme; | ||||
|     } | ||||
|     console.error("RdDItemCompetenceCreature.toArme(", item, ") : impossible de transformer l'Item en arme"); | ||||
|     console.error("RdDItemCompetenceCreature.toActionArme(", item, ") : impossible de transformer l'Item en arme"); | ||||
|     return undefined; | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -4,22 +4,22 @@ const monnaiesData = [ | ||||
|   { | ||||
|     name: "Etain (1 denier)", type: 'monnaie', | ||||
|     img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp", | ||||
|     data: { quantite: 0, valeur_deniers: 1, encombrement: 0.001, description: "" } | ||||
|     system: { quantite: 0, valeur_deniers: 1, encombrement: 0.001, description: "" } | ||||
|   }, | ||||
|   { | ||||
|     name: "Bronze (10 deniers)", type: 'monnaie', | ||||
|     img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_bronze_epees.webp", | ||||
|     data: { quantite: 0, valeur_deniers: 10, encombrement: 0.002, description: "" } | ||||
|     system: { quantite: 0, valeur_deniers: 10, encombrement: 0.002, description: "" } | ||||
|   }, | ||||
|   { | ||||
|     name: "Argent (1 sol)", type: 'monnaie', | ||||
|     img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_argent_sol.webp", | ||||
|     data: { quantite: 0, valeur_deniers: 100, encombrement: 0.003, description: "" } | ||||
|     system: { quantite: 0, valeur_deniers: 100, encombrement: 0.003, description: "" } | ||||
|   }, | ||||
|   { | ||||
|     name: "Or (10 sols)", type: 'monnaie', | ||||
|     img: "systems/foundryvtt-reve-de-dragon/icons/objets/piece_or_sol.webp", | ||||
|     data: { quantite: 0, valeur_deniers: 1000, encombrement: 0.004, description: "" } | ||||
|     system: { quantite: 0, valeur_deniers: 1000, encombrement: 0.004, description: "" } | ||||
|   } | ||||
| ] | ||||
|  | ||||
|   | ||||
| @@ -105,7 +105,7 @@ export class RdDItemSheet extends ItemSheet { | ||||
|       } | ||||
|       RdDHerbes.updatePotionData(formData); | ||||
|     } | ||||
|     if (formData.isOwned && formData.type == 'herbe' && (formData.data.categorie == 'Soin' || formData.data.categorie == 'Repos')) { | ||||
|     if (formData.isOwned && formData.type == 'herbe' && (formData.system.categorie == 'Soin' || formData.system.categorie == 'Repos')) { | ||||
|       formData.isIngredientPotionBase = true; | ||||
|     } | ||||
|     formData.bonusCaseList = RdDItemSort.getBonusCaseList(formData, true); | ||||
|   | ||||
| @@ -117,7 +117,7 @@ export class RdDItem extends Item { | ||||
|       if (this.isPotion()) { | ||||
|         this.prepareDataPotion() | ||||
|       } | ||||
|       this.actionPrincipale = this.getActionPrincipale({ warnIfNot: false }); | ||||
|       this.system.actionPrincipale = this.getActionPrincipale({ warnIfNot: false }); | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -192,22 +192,28 @@ export class RdDItem extends Item { | ||||
|   /* -------------------------------------------- */ | ||||
|   // détermine si deux équipements sont similaires: de même type, et avec les même champs hormis la quantité | ||||
|   isEquipementSimilaire(other) { | ||||
|     const itemData = this | ||||
|     const otherData = other | ||||
|     const tplData = this | ||||
|     const otherTplData = other | ||||
|     if (!this.isEquipement()) return false; | ||||
|     if (itemData.type != otherData.type) return false; | ||||
|     if (itemData.name != otherData.name) return false; | ||||
|     if (tplData.quantite == undefined) return false; | ||||
|  | ||||
|     const differences = Object.entries(tplData).filter(([key, value]) => !['quantite', 'encTotal', 'prixTotal', 'cout'].includes(key)) | ||||
|       .filter(([key, value]) => value != otherTplData[key]); | ||||
|     if (differences.length > 0) { | ||||
|       let message = `Impossible de regrouper les ${itemData.type} ${itemData.name}: `; | ||||
|       for (const [key, value] of differences) { | ||||
|         message += `<br>${key}: ${value} vs ${otherTplData[key]}`; | ||||
|     let message = undefined; | ||||
|     if (this.type != other.type) { | ||||
|       message = `Impossible de regrouper ${this.type} avec ${other.type}`; | ||||
|     } | ||||
|     else if (this.name != other.name) { | ||||
|       message = `Impossible de regrouper ${this.name} avec ${other.name}`; | ||||
|     } | ||||
|     else if (this.system.quantite == undefined) { | ||||
|       message = `Impossible de regrouper des ${this.type}, ils ne sont pas empilables`; | ||||
|     }  | ||||
|     else { | ||||
|       const differences = Object.entries(this.system) | ||||
|         .filter(([key, value]) => !['quantite', 'encTotal', 'prixTotal', 'cout'].includes(key) && value != other.system[key]); | ||||
|       if (differences.length > 0) { | ||||
|         message = `Impossible de regrouper les ${this.type} ${this.name}: `; | ||||
|         for (const [key, value] of differences) { | ||||
|           message += `<br>${key}: ${value} vs ${other.system[key]}`; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|     if (message){ | ||||
|       ui.notifications.info(message) | ||||
|       return false; | ||||
|     } | ||||
|   | ||||
| @@ -181,7 +181,7 @@ export class Misc { | ||||
|     if (!single) { | ||||
|       single = subset[0]; | ||||
|       const choices = Misc.join(subset.map(it => options.mapper(it)), '<br>'); | ||||
|       options.info(`Plusieurs choix de ${options.description}s possibles:<br>${choices}<br>Le premier sera choisi: ${mapToValue(single)}`); | ||||
|       options.onMessage(`Plusieurs choix de ${options.description}s possibles:<br>${choices}<br>Le premier sera choisi: ${options.mapper(single)}`); | ||||
|     } | ||||
|     return single; | ||||
|   } | ||||
| @@ -200,7 +200,7 @@ export class Misc { | ||||
|     } | ||||
|     value = Grammar.toLowerCaseNoAccent(value); | ||||
|     const subset = elements.filter(options.preFilter) | ||||
|       .filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it)).includes(value)); | ||||
|       .filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value)); | ||||
|     if (subset.length == 0) { | ||||
|       options.onMessage(`Pas de ${options.description} correspondant à ${value}`); | ||||
|     } | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| import { ChatUtility } from "./chat-utility.js"; | ||||
| import { HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js"; | ||||
| import { ENTITE_INCARNE, ENTITE_NONINCARNE, HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js"; | ||||
| import { Grammar } from "./grammar.js"; | ||||
| import { RdDItemArme } from "./item-arme.js"; | ||||
| import { RdDItemCompetence } from "./item-competence.js"; | ||||
| import { RdDItemCompetenceCreature } from "./item-competencecreature.js"; | ||||
| @@ -26,7 +27,7 @@ const premierRoundInit = [ | ||||
|   { pattern: 'epeegnome', init: 5.35 }, | ||||
|   { pattern: 'masse', init: 5.30 }, | ||||
|   { pattern: 'gourdin', init: 5.25 }, | ||||
|   { pattern: 'fléau', init: 5.20 }, | ||||
|   { pattern: 'fleau', init: 5.20 }, | ||||
|   { pattern: 'dague', init: 5.15 }, | ||||
|   { pattern: 'autre', init: 5.10 }, | ||||
| ]; | ||||
| @@ -84,28 +85,23 @@ export class RdDCombatManager extends Combat { | ||||
|     // calculate initiative | ||||
|     for (let cId = 0; cId < ids.length; cId++) { | ||||
|       const combatant = this.combatants.get(ids[cId]); | ||||
|       //if (!c) return results; | ||||
|  | ||||
|       let rollFormula = formula; // Init per default | ||||
|       if (!rollFormula) { | ||||
|         let armeCombat, competence; | ||||
|         if (combatant.actor.system.type == 'creature' || combatant.actor.system.type == 'entite') { | ||||
|           for (const competenceItemData of combatant.actor.items) { | ||||
|             if (competenceItemData.system.iscombat) { | ||||
|               competence = duplicate(competenceItemData); | ||||
|             } | ||||
|       let rollFormula = formula ?? RdDCombatManager.formuleInitiative(2, 10, 0, 0); | ||||
|       if (!formula) { | ||||
|         if (combatant.actor.type == 'creature' || combatant.actor.type == 'entite') { | ||||
|           const competence = combatant.actor.items.find(it => it.system.iscombat) | ||||
|           if (competence) { | ||||
|             rollFormula = RdDCombatManager.formuleInitiative(2, competence.system.carac_value, competence.system.niveau, 0); | ||||
|           } | ||||
|           rollFormula = "2+( (" + RdDCombatManager.calculInitiative(competence.system.niveau, competence.system.carac_value) + ")/100)"; | ||||
|         } else { | ||||
|           for (const itemData of combatant.actor.items) { | ||||
|             if (itemData.type == "arme" && itemData.data.equipe) { | ||||
|               armeCombat = duplicate(itemData); | ||||
|             } | ||||
|           const armeCombat = combatant.actor.items.find(it => it.type == 'arme' && itemData.system.equipe) | ||||
|           const compName = (armeCombat == undefined) ? "Corps à corps" : armeCombat.system.competence; | ||||
|           const competence = RdDItemCompetence.findCompetence(combatant.actor.items, compName); | ||||
|           if (competence) { | ||||
|             const carac = combatant.actor.system.carac[competence.system.defaut_carac].value; | ||||
|             const niveau = competence.system.niveau; | ||||
|             const bonusEcaille = (armeCombat?.system.magique) ? armeCombat.system.ecaille_efficacite : 0; | ||||
|             rollFormula = RdDCombatManager.formuleInitiative(2,  carac, niveau, bonusEcaille); | ||||
|           } | ||||
|           let compName = (armeCombat == undefined) ? "Corps à corps" : armeCombat.system.competence; | ||||
|           competence = RdDItemCompetence.findCompetence(combatant.actor.items, compName); | ||||
|           let bonusEcaille = (armeCombat && armeCombat.data.magique) ? armeCombat.system.ecaille_efficacite : 0; | ||||
|           rollFormula = "2+( (" + RdDCombatManager.calculInitiative(competence.system.niveau, combatant.actor.system.carac[competence.system.defaut_carac].value, bonusEcaille) + ")/100)"; | ||||
|         } | ||||
|       } | ||||
|       //console.log("Combatat", c); | ||||
| @@ -142,6 +138,10 @@ export class RdDCombatManager extends Combat { | ||||
|     return this; | ||||
|   }; | ||||
|  | ||||
|   static formuleInitiative(rang, carac, niveau, bonusMalus) { | ||||
|     return `${rang} +( (${RdDCombatManager.calculInitiative(niveau, carac, bonusMalus)} )/100)`; | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static calculInitiative(niveau, caracValue, bonusEcaille = 0) { | ||||
|     let base = niveau + Math.floor(caracValue / 2); | ||||
| @@ -150,78 +150,95 @@ export class RdDCombatManager extends Combat { | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   /** Retourne une liste triée d'armes avec le split arme1 main / arme 2 main */ | ||||
|   static finalizeArmeList(armes, competences, carac) { | ||||
|   /** Retourne une liste triée d'actions d'armes avec le split arme1 main / arme 2 main */ | ||||
|   static listActionsArmes(armes, competences, carac) { | ||||
|     // Gestion des armes 1/2 mains | ||||
|     let armesEquipe = []; | ||||
|     let actionsArme = []; | ||||
|     for (const arme of armes) { | ||||
|       let armeData = duplicate(arme) | ||||
|       if (armeData.system.equipe) { | ||||
|         let compData = competences.find(c => c.name.toLowerCase() == armeData.system.competence.toLowerCase()) | ||||
|       let action = duplicate(arme) | ||||
|       if (action.system.equipe) { | ||||
|         let compData = competences.find(c => c.name == action.system.competence) | ||||
|  | ||||
|         armesEquipe.push(armeData) | ||||
|         armeData.system.dommagesReels = Number(armeData.system.dommages) | ||||
|         armeData.system.niveau = compData.system.niveau | ||||
|         armeData.system.initiative = RdDCombatManager.calculInitiative(compData.system.niveau, carac[compData.system.defaut_carac].value); | ||||
|         actionsArme.push(action); | ||||
|         action.action = 'attaque'; | ||||
|         action.system.dommagesReels = Number(action.system.dommages); | ||||
|         action.system.niveau = compData.system.niveau; | ||||
|         action.system.initiative = RdDCombatManager.calculInitiative(compData.system.niveau, carac[compData.system.defaut_carac].value); | ||||
|         // Dupliquer les armes pouvant être à 1 main et 2 mains en patchant la compétence | ||||
|         if (armeData.system.unemain && !armeData.system.deuxmains) { | ||||
|           armeData.system.mainInfo = "(1m)"; | ||||
|         } else if (!armeData.system.unemain && armeData.system.deuxmains) { | ||||
|           armeData.system.mainInfo = "(2m)"; | ||||
|         } else if (armeData.system.unemain && armeData.system.deuxmains) { | ||||
|           armeData.system.mainInfo = "(1m)"; | ||||
|         if (action.system.unemain && !action.system.deuxmains) { | ||||
|           action.system.mainInfo = "(1m)"; | ||||
|         } else if (!action.system.unemain && action.system.deuxmains) { | ||||
|           action.system.mainInfo = "(2m)"; | ||||
|         } else if (action.system.unemain && action.system.deuxmains) { | ||||
|           action.system.mainInfo = "(1m)"; | ||||
|  | ||||
|           const comp2m = armeData.system.competence.replace(" 1 main", " 2 mains"); // Replace ! | ||||
|           const comp2m = action.system.competence.replace(" 1 main", " 2 mains"); // Replace ! | ||||
|           const comp = competences.find(c => c.name == comp2m) | ||||
|  | ||||
|           const arme2main = duplicate(armeData) | ||||
|           const arme2main = duplicate(action); | ||||
|           arme2main.system.mainInfo = "(2m)"; | ||||
|           arme2main.system.niveau = comp.system.niveau; | ||||
|           arme2main.system.competence = comp2m; | ||||
|           arme2main.system.initiative = RdDCombatManager.calculInitiative(arme2main.niveau, carac[comp.system.defaut_carac].value) | ||||
|           armesEquipe.push(arme2main); | ||||
|           const containsSlash = armeData.system.dommages.includes("/"); | ||||
|           arme2main.system.initiative = RdDCombatManager.calculInitiative(arme2main.system.niveau, carac[comp.system.defaut_carac].value); | ||||
|           actionsArme.push(arme2main); | ||||
|           const containsSlash = action.system.dommages.includes("/"); | ||||
|           if (containsSlash) { | ||||
|             const tableauDegats = armeData.system.dommages.split("/"); | ||||
|             armeData.system.dommagesReels = Number(tableauDegats[0]); | ||||
|             const tableauDegats = action.system.dommages.split("/"); | ||||
|             action.system.dommagesReels = Number(tableauDegats[0]); | ||||
|             arme2main.system.dommagesReels = Number(tableauDegats[1]); | ||||
|           } | ||||
|           else{ | ||||
|             ui.notifications.info("Les dommages de l'arme à 1/2 mains " + armeData.name + " ne sont pas corrects (ie sous la forme X/Y)"); | ||||
|             ui.notifications.info("Les dommages de l'arme à 1/2 mains " + action.name + " ne sont pas corrects (ie sous la forme X/Y)"); | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|     return armesEquipe.sort(Misc.ascending(armeData => armeData.name + (armeData.system.mainInfo ?? ''))) | ||||
|     return actionsArme.sort(Misc.ascending(armeData => armeData.name + (armeData.system.mainInfo ?? ''))); | ||||
|   } | ||||
|  | ||||
|   static listActionsPossessions(actor) { | ||||
|     return RdDCombatManager._indexActions(actor.getPossessions().map(p => | ||||
|       { | ||||
|         return { | ||||
|           name: p.name, | ||||
|           action: 'conjurer', | ||||
|           data: { | ||||
|             competence: p.name, | ||||
|             possessionid: p.system.possessionid, | ||||
|           } | ||||
|         } | ||||
|       })); | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static buildListeActionsCombat(combatant) { | ||||
|     if (combatant.actor == undefined) { | ||||
|       ui.notifications.warn(`Le combatant ${combatant.name} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`) | ||||
|       return []; | ||||
|   static listActionsCombat(combatant) { | ||||
|     const actor = combatant.actor; | ||||
|     let actions = RdDCombatManager.listActionsPossessions(actor); | ||||
|     if (actions.length>0) { | ||||
|       return actions; | ||||
|     } | ||||
|     const actorData = combatant.actor | ||||
|     let items = combatant.actor.items | ||||
|     let actions = [] | ||||
|     if (combatant.actor.isCreature()) { | ||||
|     let items = actor.items; | ||||
|     if (actor.isCreature()) { | ||||
|       actions = actions.concat(items.filter(it => RdDItemCompetenceCreature.isCompetenceAttaque(it)) | ||||
|         .map(competence => RdDItemCompetenceCreature.toArme(competence))); | ||||
|         .map(competence => RdDItemCompetenceCreature.toActionArme(competence))); | ||||
|     } else { | ||||
|       // Recupération des items 'arme' | ||||
|       let armes = items.filter(it => RdDItemArme.isArmeUtilisable(it)) | ||||
|         //.concat(RdDItemArme.empoignade()) | ||||
|         .concat(RdDItemArme.mainsNues()); | ||||
|  | ||||
|       let competences = items.filter(it => it.type == 'competence') | ||||
|       actions = actions.concat(RdDCombatManager.finalizeArmeList(armes, competences, actorData.data.carac)); | ||||
|       let competences = items.filter(it => it.type == 'competence'); | ||||
|       actions = actions.concat(RdDCombatManager.listActionsArmes(armes, competences, actor.system.carac)); | ||||
|  | ||||
|       if (actorData.data.attributs.hautrevant.value) { | ||||
|         actions.push({ name: "Draconic", data: { initOnly: true, competence: "Draconic" } }); | ||||
|       if (actor.system.attributs.hautrevant.value) { | ||||
|         actions.push({ name: "Draconic", action: 'haut-reve', data: { initOnly: true, competence: "Draconic" } }); | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     actions.push({ name: "Autre action", data: { initOnly: true, competence: "Autre action" } }); | ||||
|     return RdDCombatManager._indexActions(actions); | ||||
|   } | ||||
|  | ||||
|   static _indexActions(actions) { | ||||
|     for (let index = 0; index < actions.length; index++) { | ||||
|       actions[index].index = index; | ||||
|     } | ||||
| @@ -235,15 +252,15 @@ export class RdDCombatManager extends Combat { | ||||
|       let initMissing = game.combat.data.combatants.find(it => !it.initiative); | ||||
|       if (!initMissing) { // Premier round ! | ||||
|         for (let combatant of game.combat.data.combatants) { | ||||
|           let arme = combatant.initiativeData?.arme; | ||||
|           let action = combatant.initiativeData?.arme; | ||||
|           //console.log("Parsed !!!", combatant, initDone, game.combat.current, arme); | ||||
|           if (arme && arme.type == "arme") { | ||||
|           if (action && action.type == "arme") { | ||||
|             for (let initData of premierRoundInit) { | ||||
|               if (arme.data.initpremierround.toLowerCase().includes(initData.pattern)) { | ||||
|               if (Grammar.toLowerCaseNoAccentNoSpace(action.system.initpremierround).includes(initData.pattern)) { | ||||
|                 let msg = `<h4>L'initiative de ${combatant.actor.name} a été modifiée !</h4> | ||||
|                       <hr> | ||||
|                       <div> | ||||
|                         Etant donné son ${arme.name}, son initative pour ce premier round est désormais de ${initData.init}. | ||||
|                         Etant donné son ${action.name}, son initative pour ce premier round est désormais de ${initData.init}. | ||||
|                       </div>` | ||||
|                 ChatMessage.create({ content: msg }); | ||||
|                 game.combat.setInitiative(combatant._id, initData.init); | ||||
| @@ -281,7 +298,7 @@ export class RdDCombatManager extends Combat { | ||||
|     ].concat(options); | ||||
|   } | ||||
|   /* -------------------------------------------- */ | ||||
|   static rollInitiativeCompetence(combatantId, arme) { | ||||
|   static rollInitiativeAction(combatantId, action) { | ||||
|     const combatant = game.combat.combatants.get(combatantId); | ||||
|     if (combatant.actor == undefined) { | ||||
|       ui.notifications.warn(`Le combatant ${combatant.name} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`) | ||||
| @@ -299,34 +316,40 @@ export class RdDCombatManager extends Combat { | ||||
|     } else if (combatant.actor.getSurprise() == "demi") { | ||||
|       initOffset = 0; | ||||
|       initInfo = "Demi Surprise" | ||||
|     } else if (arme.name == "Autre action") { | ||||
|     } else if (action.action == 'conjurer') { | ||||
|       initOffset = 10; | ||||
|       caracForInit = combatant.actor.getReveActuel(); | ||||
|       initInfo = "Possession" | ||||
|     } else if (action.action == 'autre') { | ||||
|       initOffset = 2; | ||||
|       initInfo = "Autre Action" | ||||
|     } else if (arme.name == "Draconic") { | ||||
|     } else if (action.action == 'haut-reve') { | ||||
|       initOffset = 9; | ||||
|       initInfo = "Draconic" | ||||
|     } else { | ||||
|       compData = RdDItemCompetence.findCompetence(combatant.actor.items, arme.system.competence); | ||||
|       compNiveau = compData.system.niveau; | ||||
|       initInfo = arme.name + " / " + arme.data.competence; | ||||
|       if (combatant.actor.type == 'creature' || combatant.actor.type == 'entite') { | ||||
|         caracForInit = compData.system.carac_value; | ||||
|         if (compData.system.categorie == "lancer") { | ||||
|           initOffset = 7; | ||||
|         } | ||||
|         else { | ||||
|           initOffset = 5; | ||||
|         } | ||||
|       } else { | ||||
|         caracForInit = combatant.actor.system.carac[compData.system.defaut_carac].value; | ||||
|         initOffset = RdDCombatManager._baseInitOffset(compData.system.categorie, arme); | ||||
|         initInfo = action.name + " / " + action.system.competence; | ||||
|           | ||||
|         if (combatant.actor.type == 'creature' || combatant.actor.type == 'entite') { | ||||
|           caracForInit = compData.system.carac_value; | ||||
|           if (compData.system.categorie == "lancer") { | ||||
|             initOffset = 7; | ||||
|           } | ||||
|           else { | ||||
|             initOffset = 5; | ||||
|           } | ||||
|         } else { | ||||
|           caracForInit = combatant.actor.system.carac[compData.system.defaut_carac].value; | ||||
|           initOffset = RdDCombatManager._baseInitOffset(compData.system.categorie, action); | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     let malus = combatant.actor.getEtatGeneral(); // Prise en compte état général  | ||||
|     // Cas des créatures et entités vs personnages | ||||
|     let rollFormula = initOffset + "+ ( (" + RdDCombatManager.calculInitiative(compNiveau, caracForInit) + " + " + malus + ") /100)"; | ||||
|     let rollFormula = RdDCombatManager.formuleInitiative(initOffset, caracForInit, compNiveau, malus); | ||||
|     // Garder la trace de l'arme/compétence utilisée pour l'iniative | ||||
|     combatant.initiativeData = { arme: arme } // pour reclasser l'init au round 0 | ||||
|     combatant.initiativeData = { arme: action } // pour reclasser l'init au round 0 | ||||
|     game.combat.rollInitiative(combatantId, rollFormula, { initInfo: initInfo }); | ||||
|   } | ||||
|  | ||||
| @@ -338,7 +361,7 @@ export class RdDCombatManager extends Combat { | ||||
|       return 7; | ||||
|     } | ||||
|     // Offset de principe pour les armes de jet | ||||
|     switch (arme.data.cac) { | ||||
|     switch (arme.system.cac) { | ||||
|       case "empoignade": return 3; | ||||
|       case "pugilat": return 4; | ||||
|     } | ||||
| @@ -349,16 +372,21 @@ export class RdDCombatManager extends Combat { | ||||
|   static displayInitiativeMenu(html, combatantId) { | ||||
|     console.log("Combatant ; ", combatantId); | ||||
|     const combatant = game.combat.combatants.get(combatantId); | ||||
|     let armesList = RdDCombatManager.buildListeActionsCombat(combatant); | ||||
|     if (! (combatant?.actor) ) { | ||||
|       ui.notifications.warn(`Le combatant ${combatant.name ?? combatantId} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`) | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|     let actions = RdDCombatManager.listActionsCombat(combatant); | ||||
|  | ||||
|     // Build the relevant submenu | ||||
|     if (armesList) { | ||||
|     if (actions) { | ||||
|       let menuItems = []; | ||||
|       for (let arme of armesList) { | ||||
|       for (let action of actions) { | ||||
|         menuItems.push({ | ||||
|           name: arme.data.competence, | ||||
|           name: action.system.competence, | ||||
|           icon: "<i class='fas fa-dice-d6'></i>", | ||||
|           callback: target => { RdDCombatManager.rollInitiativeCompetence(combatantId, arme) } | ||||
|           callback: target => { RdDCombatManager.rollInitiativeAction(combatantId, action) } | ||||
|         }); | ||||
|       } | ||||
|       new ContextMenu(html, ".directory-list", menuItems).render(); | ||||
| @@ -427,9 +455,9 @@ export class RdDCombat { | ||||
|         : "Vous devez choisir une cible à attaquer!"); | ||||
|     } | ||||
|     else { | ||||
|       const defender = target?.actor | ||||
|       const defenderTokenId = target?.id | ||||
|       if ( defender.type == 'entite' && defender.system.definition.typeentite == 'nonincarne') { | ||||
|       const defender = target?.actor; | ||||
|       const defenderTokenId = target?.id; | ||||
|       if ( defender.type == 'entite' && defender.system.definition.typeentite == ENTITE_NONINCARNE) { | ||||
|         ui.notifications.warn("Vous ne pouvez pas cibler une entité non incarnée !!!!"); | ||||
|       } else { | ||||
|         return this.create(attacker, defender, defenderTokenId, target) | ||||
| @@ -771,7 +799,7 @@ export class RdDCombat { | ||||
|   async _onAttaqueNormale(attackerRoll) { | ||||
|     console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll); | ||||
|  | ||||
|     attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker.getBonusDegat(), this.defender.isEntiteCauchemar()); | ||||
|     attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker.getBonusDegat(), this.defender.isEntite()); | ||||
|     let defenderRoll = { attackerRoll: attackerRoll, passeArme: attackerRoll.passeArme, show: {} } | ||||
|     attackerRoll.show = { | ||||
|       cible: this.target ? this.defender.system.name : 'la cible', | ||||
| @@ -1220,8 +1248,8 @@ export class RdDCombat { | ||||
|   async accorderEntite(when = 'avant-encaissement') { | ||||
|     if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar") | ||||
|       || this.defender == undefined | ||||
|       || !this.defender.isEntiteCauchemar() | ||||
|       || this.defender.isEntiteCauchemarAccordee(this.attacker)) { | ||||
|       || !this.defender.isEntite([ENTITE_INCARNE]) | ||||
|       || this.defender.isEntiteAccordee(this.attacker)) { | ||||
|       return true; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -276,9 +276,11 @@ export class RdDCommands { | ||||
|           diff = 0; | ||||
|         } | ||||
|         const caracName = params[0]; | ||||
|         const compName = length > 1 ? Misc.join(params.slice(1, length), ' ') : undefined; | ||||
|         for (let actor of actors) { | ||||
|           await actor.rollCaracCompetence(caracName, compName, diff); | ||||
|         let competence = length > 1 ? actors[0].getCompetence(Misc.join(params.slice(1, length), ' ')) : undefined; | ||||
|         if (competence) { | ||||
|           for (let actor of actors) { | ||||
|             await actor.rollCaracCompetence(caracName, competence.name, diff); | ||||
|           } | ||||
|         } | ||||
|         return; | ||||
|       } | ||||
|   | ||||
| @@ -11,11 +11,18 @@ export class RdDHotbar { | ||||
|   static initDropbar( ) { | ||||
|  | ||||
|     Hooks.on("hotbarDrop", async (bar, documentData, slot) => { | ||||
|  | ||||
|        | ||||
|     // Create item macro if rollable item - weapon, spell, prayer, trait, or skill | ||||
|     if (documentData.type == "Item") { | ||||
|       if (documentData.data.type != "arme" && documentData.data.type != "competence" ) | ||||
|       let item = fromUuidSync(documentData.uuid) | ||||
|       if (item == undefined) { | ||||
|         item = this.actor.items.get( documentData.uuid ) | ||||
|       } | ||||
|       console.log( "DROP", documentData, item) | ||||
|       if (!item || (item.type != "arme" && item.type != "competence" ) ) { | ||||
|         return | ||||
|       let item = documentData.data | ||||
|       } | ||||
|       let command = `game.system.rdd.RdDHotbar.rollMacro("${item.name}", "${item.type}");`; | ||||
|       let macro = game.macros.contents.find(m => (m.name === item.name) && (m.command === command)); | ||||
|       if (!macro) { | ||||
| @@ -28,6 +35,7 @@ export class RdDHotbar { | ||||
|       } | ||||
|       game.user.assignHotbarMacro(macro, slot); | ||||
|     } | ||||
|  | ||||
|     // Create a macro to open the actor sheet of the actor dropped on the hotbar | ||||
|     else if (documentData.type == "Actor") { | ||||
|       let actor = game.actors.get(documentData.id); | ||||
| @@ -35,7 +43,7 @@ export class RdDHotbar { | ||||
|       let macro = game.macros.contents.find(m => (m.name === actor.name) && (m.command === command)); | ||||
|       if (!macro) { | ||||
|         macro = await Macro.create({ | ||||
|           name: actor.data.name, | ||||
|           name: actor.name, | ||||
|           type: "script", | ||||
|           img: actor.data.img, | ||||
|           command: command | ||||
| @@ -45,12 +53,12 @@ export class RdDHotbar { | ||||
|     } | ||||
|     // Create a macro to open the journal sheet of the journal dropped on the hotbar | ||||
|     else if (documentData.type == "JournalEntry") { | ||||
|       let journal = game.journal.get(documentData.id); | ||||
|       let journal = fromUuidSync(documentData.uuid) | ||||
|       let command = `game.journal.get("${documentData.id}").sheet.render(true)` | ||||
|       let macro = game.macros.contents.find(m => (m.name === journal.name) && (m.command === command)); | ||||
|       if (!macro) { | ||||
|         macro = await Macro.create({ | ||||
|           name: journal.data.name, | ||||
|           name: journal.name, | ||||
|           type: "script", | ||||
|           img: "systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.webp", | ||||
|           command: command | ||||
| @@ -69,8 +77,10 @@ export class RdDHotbar { | ||||
|     if (speaker.token) actor = game.actors.tokens[speaker.token]; | ||||
|     if (!actor) actor = game.actors.get(speaker.actor); | ||||
|  | ||||
|     let item = Misc.data(actor?.items.find(it => it.name === itemName && it.type == itemType)); | ||||
|     if (!item) return ui.notifications.warn(`Impossible de trouver l'objet de cette macro`); | ||||
|     let item = actor?.items.find(it => it.name === itemName && it.type == itemType) ?? undefined; | ||||
|     if (!item){ | ||||
|       return ui.notifications.warn(`Impossible de trouver l'objet de cette macro`); | ||||
|     }  | ||||
|  | ||||
|     // Trigger the item roll | ||||
|     switch (item.type) { | ||||
|   | ||||
| @@ -1,19 +1,29 @@ | ||||
| import { RdDActor } from "./actor.js"; | ||||
| import { Misc } from "./misc.js"; | ||||
| import { RdDDice } from "./rdd-dice.js"; | ||||
|  | ||||
| const words = [ 'pore', 'pre', 'flor', 'lane', 'turlu', 'pin', 'a', 'alph', 'i', 'onse', 'iane', 'ane', 'zach', 'arri', 'ba', 'bo', 'bi',  | ||||
|               'alta', 'par', 'pir', 'zor', 'zir', 'de', 'pol', 'tran', 'no', 'la', 'al' , 'pul', 'one', 'ner', 'nur', 'mac', 'mery', | ||||
|               'cat', 'do', 'di', 'der', 'er', 'el', 'far', 'fer', 'go', 'guer', 'hot', 'jor', 'jar', 'ji', 'kri', 'ket', 'lor', 'hur', | ||||
|               'lar', 'lir', 'lu', 'pot', 'pro', 'pra', 'pit', 'qua', 'qui', 're', 'ral', 'sal', 'sen', 'ted', 'to', 'ta', 'lars', 'ver', | ||||
|               'vin', 'ov', 'wal', 'ry', 'ly', '' ]; | ||||
| const words = ['pore', 'pre', 'flor', 'lane', 'turlu', 'pin', 'a', 'alph', 'i', 'onse', 'iane', 'ane', 'zach', 'arri', 'ba', 'bo', 'bi', | ||||
|   'alta', 'par', 'pir', 'zor', 'zir', 'de', 'pol', 'tran', 'no', 'la', 'al', 'pul', 'one', 'ner', 'nur', 'mac', 'mery', | ||||
|   'cat', 'do', 'di', 'der', 'er', 'el', 'far', 'fer', 'go', 'guer', 'hot', 'jor', 'jar', 'ji', 'kri', 'ket', 'lor', 'hur', | ||||
|   'lar', 'lir', 'lu', 'pot', 'pro', 'pra', 'pit', 'qua', 'qui', 're', 'ral', 'sal', 'sen', 'ted', 'to', 'ta', 'lars', 'ver', | ||||
|   'vin', 'ov', 'wal', 'ry', 'ly', '']; | ||||
|  | ||||
| /* -------------------------------------------- */ | ||||
| export class RdDNameGen { | ||||
|  | ||||
|   static async getName( msg, params ) { | ||||
|     let name = Misc.upperFirst( await RdDDice.rollOneOf(words) + await RdDDice.rollOneOf(words) ) | ||||
|     //console.log(name); | ||||
|     ChatMessage.create( { content: `Nom : ${name}`, whisper: ChatMessage.getWhisperRecipients("GM") } ); | ||||
|   static async getName(msg, params) { | ||||
|     const html = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-command-nom.html`, { | ||||
|       nom: Misc.upperFirst(await RdDDice.rollOneOf(words) + await RdDDice.rollOneOf(words)) | ||||
|     }); | ||||
|     ChatMessage.create({ content: html, whisper: ChatMessage.getWhisperRecipients("GM") }); | ||||
|   } | ||||
|  | ||||
|   static async onCreerActeur(event) { | ||||
|     const button = event.currentTarget; | ||||
|     await RdDActor.create({ | ||||
|         name: button.attributes['data-nom'].value, | ||||
|         type: button.attributes['data-type'].value | ||||
|       }, | ||||
|       {renderSheet: true}); | ||||
|   } | ||||
| } | ||||
| @@ -84,16 +84,11 @@ export class RdDPossession { | ||||
|       attacker: attacker, | ||||
|       defender: defender, | ||||
|       competence: defender.getDraconicOuPossession(), | ||||
|       selectedCarac: defender.system.carac.reve, | ||||
|       selectedCarac: defender.system.data.carac.reve, | ||||
|       forceCarac: { 'reve-actuel': { label: "Rêve Actuel", value: defender.getReveActuel() } } | ||||
|     } | ||||
|     rollData.competence.system.defaut_carac = 'reve-actuel' | ||||
|  | ||||
|     if (rollData.isECNIDefender) { | ||||
|       rollData.competence.system.defaut_carac = "reve" | ||||
|       rollData.forceCarac = { 'reve': { label: "Rêve", value: defender.system.carac.reve.value } } | ||||
|     } else { | ||||
|       rollData.competence.system.defaut_carac = 'reve-actuel' | ||||
|       rollData.forceCarac = { 'reve-actuel': { label: "Rêve Actuel", value: defender.getReveActuel() } } | ||||
|     } | ||||
|  | ||||
|     const dialog = await RdDRoll.create(defender, rollData, | ||||
|       { | ||||
|   | ||||
| @@ -1,3 +1,5 @@ | ||||
| import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE } from "./constants.js"; | ||||
|  | ||||
| /** | ||||
|  * Extend the base Dialog entity by defining a custom window to perform roll. | ||||
|  * @extends {Dialog} | ||||
| @@ -7,15 +9,19 @@ export class RdDEncaisser extends Dialog { | ||||
|   /* -------------------------------------------- */ | ||||
|   constructor(html, actor) { | ||||
|     // Common conf | ||||
|     const buttonsCreatures = { | ||||
|       "mortel": { label: "Mortel", callback: html => this.performEncaisser("mortel") }, | ||||
|       "non-mortel": { label: "Non-mortel", callback: html => this.performEncaisser("non-mortel") }, | ||||
|       "sonne": { label: "Sonné", callback: html => this.actor.setSonne() }, | ||||
|     }; | ||||
|     const buttonsEntitesCauchemar = { | ||||
|       "cauchemar": { label: "cauchemar", callback: html => this.performEncaisser("cauchemar") } | ||||
|     }; | ||||
|     const buttons = actor.isEntiteCauchemar() ? buttonsEntitesCauchemar : buttonsCreatures; | ||||
|     let buttons = {}; | ||||
|     if (!actor.isEntite()){ | ||||
|       buttons = { | ||||
|         "mortel": { label: "Mortel", callback: html => this.performEncaisser("mortel") }, | ||||
|         "non-mortel": { label: "Non-mortel", callback: html => this.performEncaisser("non-mortel") }, | ||||
|         "sonne": { label: "Sonné", callback: html => this.actor.setSonne() }, | ||||
|       }; | ||||
|     } | ||||
|     else if (actor.isEntite([ENTITE_BLURETTE, ENTITE_INCARNE])){ | ||||
|       buttons = { | ||||
|         "cauchemar": { label: "cauchemar", callback: html => this.performEncaisser("cauchemar") } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     let dialogConf = { | ||||
|       title: "Jet d'Encaissement", | ||||
| @@ -24,7 +30,6 @@ export class RdDEncaisser extends Dialog { | ||||
|       default: "mortel" | ||||
|     } | ||||
|  | ||||
|  | ||||
|     let dialogOptions = { | ||||
|       classes: ["rdddialog"], | ||||
|       width: 320, | ||||
|   | ||||
| @@ -165,7 +165,7 @@ export class RdDRoll extends Dialog { | ||||
|  | ||||
|     function onLoad() { | ||||
|       let rollData = dialog.rollData; | ||||
|       console.log(rollData); | ||||
|       console.log('Ouverture RdDRoll', rollData); | ||||
|       // Update html, according to data | ||||
|       if (rollData.competence) { | ||||
|         const defaut_carac = rollData.competence.system.defaut_carac | ||||
| @@ -294,7 +294,7 @@ export class RdDRoll extends Dialog { | ||||
|  | ||||
|   async setSelectedSigneDraconique(signe){ | ||||
|     this.rollData.signe = signe; | ||||
|     this.rollData.diffLibre =  Misc.data(signe).data.difficulte, | ||||
|     this.rollData.diffLibre = signe.system.difficulte, | ||||
|     $(".signe-difficulte").text(Misc.toSignedString(this.rollData.diffLibre)); | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -29,7 +29,7 @@ export class RdDSheetUtility { | ||||
|       destId: destItemId, | ||||
|       targetActorId: actorId, | ||||
|       itemId: itemId, | ||||
|       sourceActorId: dragData.actorId, | ||||
|       sourceActorId: item.actor.id, | ||||
|       srcId: objetVersConteneur[itemId], | ||||
|       onEnleverConteneur: () => { delete objetVersConteneur[itemId]; }, | ||||
|       onAjouterDansConteneur: (itemId, conteneurId) => { objetVersConteneur[itemId] = conteneurId; } | ||||
|   | ||||
| @@ -23,40 +23,63 @@ export class RdDTokenHud { | ||||
|     let token = canvas.tokens.get(tokenId); | ||||
|     let actor = token.actor; | ||||
|     let combatant = game.combat.combatants.find(c => c.tokenId == tokenId); | ||||
|     if (! (combatant?.actor) ) { | ||||
|         ui.notifications.warn(`Le combatant ${token.name} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`) | ||||
|         return; | ||||
|     } | ||||
|     app.hasExtension = true; | ||||
|  | ||||
|     let armesList = RdDCombatManager.buildListeActionsCombat(combatant); | ||||
|     let actionsCombat = RdDCombatManager.listActionsCombat(combatant); | ||||
|     const hudData = { | ||||
|       combatant: combatant, armes: armesList, | ||||
|       commandes: [{ name: 'Initiative +1', command: 'inc', value: 0.01 }, { name: 'Initiative -1', command: 'dec', value: -0.01 }] | ||||
|       combatant: combatant, | ||||
|       actions: actionsCombat, | ||||
|       commandes: [ | ||||
|         { name: "Autre action", command: 'autre' }, | ||||
|         { name: 'Initiative +1', command: 'inc', value: 0.01 },  | ||||
|         { name: 'Initiative -1', command: 'dec', value: -0.01 }] | ||||
|     }; | ||||
|  | ||||
|     const controlIconCombat = html.find('.control-icon[data-action=combat]'); | ||||
|     // initiative | ||||
|     await RdDTokenHud._configureSubMenu(controlIconCombat, 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html', hudData, | ||||
|     await RdDTokenHud._configureSubMenu(controlIconCombat, | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html', | ||||
|       hudData, | ||||
|       (event) => { | ||||
|         let initCommand = event.currentTarget.attributes['data-command'].value; | ||||
|         let combatantId = event.currentTarget.attributes['data-combatant-id'].value; | ||||
|         if (!initCommand) { | ||||
|           let armeIndex = event.currentTarget.attributes['data-arme-id'].value; | ||||
|           let arme = armesList[armeIndex]; | ||||
|           RdDCombatManager.rollInitiativeCompetence(combatantId, arme); | ||||
|         } else if (initCommand == 'inc') { | ||||
|           RdDCombatManager.incDecInit(combatantId, 0.01); | ||||
|         } else if (initCommand == 'dec') { | ||||
|           RdDCombatManager.incDecInit(combatantId, -0.01); | ||||
|         } | ||||
|         let initCommand = event.currentTarget.attributes['data-command']?.value; | ||||
|         let combatantId = event.currentTarget.attributes['data-combatant-id']?.value; | ||||
|         if (initCommand) { | ||||
|           RdDTokenHud._initiativeCommand(initCommand, combatantId); | ||||
|         } else { | ||||
|           let index = event.currentTarget.attributes['data-action-index'].value; | ||||
|           let action = actionsCombat[index]; | ||||
|           RdDCombatManager.rollInitiativeAction(combatantId, action); | ||||
|         }  | ||||
|       }); | ||||
|  | ||||
|     const controlIconTarget = html.find('.control-icon[data-action=target]'); | ||||
|     // combat | ||||
|     await RdDTokenHud._configureSubMenu(controlIconTarget, 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html', hudData, | ||||
|       (event) => { | ||||
|         let armeIndex = event.currentTarget.attributes['data-arme-id'].value; | ||||
|         actor.rollArme(armesList[armeIndex]); | ||||
|         const actionIndex = event.currentTarget.attributes['data-action-index']?.value; | ||||
|         const action = actionsCombat[actionIndex]; | ||||
|         if (action.action == 'conjurer') { | ||||
|           actor.conjurerPossession(actor.getPossession(action.data.possessionid)); | ||||
|         } | ||||
|         else { | ||||
|           actor.rollArme(action); | ||||
|         } | ||||
|       }); | ||||
|   } | ||||
|  | ||||
|   static _initiativeCommand(initCommand, combatantId) { | ||||
|     switch (initCommand) { | ||||
|       case 'inc': return RdDCombatManager.incDecInit(combatantId, 0.01); | ||||
|       case 'dec': return RdDCombatManager.incDecInit(combatantId, -0.01); | ||||
|       case 'autre': return RdDCombatManager.rollInitiativeAction(combatantId,  | ||||
|         { name: "Autre action", action: 'autre', data: { initOnly: true, competence: "Autre action" } }); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static async addTokenHudExtensions(app, html, tokenId) { | ||||
|     const controlIconCombat  = html.find('.control-icon[data-action=combat]'); | ||||
|   | ||||
| @@ -11,6 +11,7 @@ import { RdDDice } from "./rdd-dice.js"; | ||||
| import { RdDItem } from "./item.js"; | ||||
| import { Monnaie } from "./item-monnaie.js"; | ||||
| import { RdDPossession } from "./rdd-possession.js"; | ||||
| import { RdDNameGen } from "./rdd-namegen.js"; | ||||
|  | ||||
| /* -------------------------------------------- */ | ||||
| // This table starts at 0 -> niveau -10 | ||||
| @@ -121,8 +122,12 @@ export class RdDUtility { | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html', | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html', | ||||
|       // Conteneur/item in Actor sheet | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html', | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.html', | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-item.html', | ||||
|       "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html", | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-liens-animaux.html', | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-liens-suivants.html', | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-liens-vehicules.html', | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html', | ||||
|       //Items | ||||
|       'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html', | ||||
| @@ -234,36 +239,38 @@ export class RdDUtility { | ||||
|     Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord)); | ||||
|     Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1))); | ||||
|  | ||||
|     Handlebars.registerHelper('sortCompetence', competences => competences.sort((a, b) => { | ||||
|       if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) { | ||||
|         if (a.name.includes("Cité")) return -1; | ||||
|         if (b.name.includes("Cité")) return 1; | ||||
|         if (a.name.includes("Extérieur")) return -1; | ||||
|         if (b.name.includes("Extérieur")) return 1; | ||||
|     Handlebars.registerHelper('filtreTriCompetences', competences => competences.filter(it => it.system.isVisible) | ||||
|       .sort((a, b) => { | ||||
|         if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) { | ||||
|           if (a.name.includes("Cité")) return -1; | ||||
|           if (b.name.includes("Cité")) return 1; | ||||
|           if (a.name.includes("Extérieur")) return -1; | ||||
|           if (b.name.includes("Extérieur")) return 1; | ||||
|           return a.name.localeCompare(b.name); | ||||
|         } | ||||
|         if (a.system.categorie.startsWith("melee") && b.system.categorie.startsWith("melee")) { | ||||
|           if (a.name.includes("Corps")) return -1; | ||||
|           if (b.name.includes("Corps")) return 1; | ||||
|           if (a.name.includes("Dague")) return -1; | ||||
|           if (b.name.includes("Dague")) return 1; | ||||
|           if (a.name.includes("Esquive")) return -1; | ||||
|           if (b.name.includes("Esquive")) return 1; | ||||
|           return a.name.localeCompare(b.name); | ||||
|         } | ||||
|         if (a.name.startsWith("Voie") && b.name.startsWith("Voie")) { | ||||
|           if (a.name.includes("Oniros")) return -1; | ||||
|           if (b.name.includes("Oniros")) return 1; | ||||
|           if (a.name.includes("Hypnos")) return -1; | ||||
|           if (b.name.includes("Hypnos")) return 1; | ||||
|           if (a.name.includes("Narcos")) return -1; | ||||
|           if (b.name.includes("Narcos")) return 1; | ||||
|           if (a.name.includes("Thanatos")) return -1; | ||||
|           if (b.name.includes("Thanatos")) return 1; | ||||
|           return a.name.localeCompare(b.name); | ||||
|         } | ||||
|         return a.name.localeCompare(b.name); | ||||
|       } | ||||
|       if (a.system.categorie.startsWith("melee") && b.system.categorie.startsWith("melee")) { | ||||
|         if (a.name.includes("Corps")) return -1; | ||||
|         if (b.name.includes("Corps")) return 1; | ||||
|         if (a.name.includes("Dague")) return -1; | ||||
|         if (b.name.includes("Dague")) return 1; | ||||
|         if (a.name.includes("Esquive")) return -1; | ||||
|         if (b.name.includes("Esquive")) return 1; | ||||
|         return a.name.localeCompare(b.name); | ||||
|       } | ||||
|       if (a.name.startsWith("Voie") && b.name.startsWith("Voie")) { | ||||
|         if (a.name.includes("Oniros")) return -1; | ||||
|         if (b.name.includes("Oniros")) return 1; | ||||
|         if (a.name.includes("Hypnos")) return -1; | ||||
|         if (b.name.includes("Hypnos")) return 1; | ||||
|         if (a.name.includes("Narcos")) return -1; | ||||
|         if (b.name.includes("Narcos")) return 1; | ||||
|         if (a.name.includes("Thanatos")) return -1; | ||||
|         if (b.name.includes("Thanatos")) return 1; | ||||
|         return a.name.localeCompare(b.name); | ||||
|       } | ||||
|       return a.name.localeCompare(b.name); | ||||
|     })); | ||||
|       }) | ||||
|     ); | ||||
|  | ||||
|     return loadTemplates(templatePaths); | ||||
|   } | ||||
| @@ -463,34 +470,32 @@ export class RdDUtility { | ||||
|   /** Construit la structure récursive des conteneurs, avec imbrication potentielle | ||||
|    *  | ||||
|    */ | ||||
|   static buildConteneur(objet, niveau) { | ||||
|     if (!niveau) niveau = 1; | ||||
|     objet.niveau = niveau; | ||||
|     //console.log("OBJ:", objet); | ||||
|     let str = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html']({ item: objet }); | ||||
|     if (objet.type == 'conteneur') { | ||||
|       const afficherContenu = this.getAfficheContenu(objet._id); | ||||
|       str = str + RdDUtility.buildContenu(objet, niveau, afficherContenu); | ||||
|     } | ||||
|     return str; | ||||
|   static buildConteneur(objet, profondeur) { | ||||
|     if (!profondeur) profondeur = 1; | ||||
|     objet.niveau = profondeur; | ||||
|     const isConteneur = objet.type == 'conteneur'; | ||||
|     const isOuvert = isConteneur && this.getAfficheContenu(objet._id); | ||||
|     const isVide = isConteneur && objet.system.contenu.length == 0; | ||||
|     const conteneur = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-item.html']({ | ||||
|       item: objet, | ||||
|       vide: isVide, | ||||
|       ouvert: isOuvert | ||||
|     }); | ||||
|     const contenu = isConteneur ? RdDUtility.buildContenu(objet, profondeur, isOuvert) : ''; | ||||
|     return conteneur + contenu; | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static buildContenu(objet, niveau, afficherContenu) { | ||||
|     if (!niveau) niveau = 1; | ||||
|     objet.niveau = niveau; | ||||
|     let strContenu = ""; | ||||
|   static buildContenu(objet, profondeur, afficherContenu) { | ||||
|     if (!profondeur) profondeur = 1; | ||||
|     objet.niveau = profondeur; | ||||
|     const display = afficherContenu ? 'item-display-show' : 'item-display-hide'; | ||||
|     //console.log("ITEM DISPLAYED", objet ); | ||||
|     if (afficherContenu) { | ||||
|       strContenu = "<ul class='item-list alterne-list item-display-show list-item-margin" + niveau + "'>"; | ||||
|     } else { | ||||
|       strContenu = "<ul class='item-list alterne-list item-display-hide list-item-margin" + niveau + "'>"; | ||||
|     } | ||||
|     let strContenu = `<ul class='item-list alterne-list ${display} list-item-margin${profondeur}'>`; | ||||
|     for (let subItem of objet.subItems) { | ||||
|       strContenu = strContenu + this.buildConteneur(subItem, niveau + 1); | ||||
|       strContenu += this.buildConteneur(subItem, profondeur + 1); | ||||
|     } | ||||
|     strContenu = strContenu + "</ul>"; | ||||
|     return strContenu; | ||||
|     return strContenu + "</ul>"; | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
| @@ -703,6 +708,7 @@ export class RdDUtility { | ||||
|  | ||||
|     // gestion bouton tchat Acheter | ||||
|     html.on("click", '.button-acheter', event => DialogItemAchat.onButtonAcheter(event)); | ||||
|     html.on("click", '.button-creer-acteur', event => RdDNameGen.onCreerActeur(event)); | ||||
|  | ||||
|     // Gestion du bouton payer | ||||
|     html.on("click", '.payer-button', event => { | ||||
| @@ -825,7 +831,7 @@ export class RdDUtility { | ||||
|   static confirmerSuppressionSubacteur(actorSheet, li) { | ||||
|     let actorId = li.data("actor-id"); | ||||
|     let actor = game.actors.get(actorId); | ||||
|     let msgTxt = "<p>Etes vous certain de vouloir supprimer le lien vers ce véhicule/monture/suivant : " + actor.data.name + " ?</p>"; | ||||
|     let msgTxt = "<p>Etes vous certain de vouloir supprimer le lien vers ce véhicule/monture/suivant : " + actor.name + " ?</p>"; | ||||
|     let d = new Dialog({ | ||||
|       title: "Confirmer la suppression du lien", | ||||
|       content: msgTxt, | ||||
| @@ -875,8 +881,7 @@ export class RdDUtility { | ||||
|         label: "Annuler" | ||||
|       } | ||||
|     } | ||||
|     const docData = objet | ||||
|     if (docData.type == 'conteneur' && docData.data.contenu.length > 0) { | ||||
|     if (objet.type == 'conteneur' && objet.system.contenu.length > 0) { | ||||
|       msgTxt += "<br>Ce conteneur n'est pas vide. Choisissez l'option de suppression"; | ||||
|       buttons['deleteall'] = { | ||||
|         icon: '<i class="fas fa-check"></i>', | ||||
|   | ||||
| @@ -486,7 +486,7 @@ export class TMRRencontres { | ||||
|   /* -------------------------------------------- */ | ||||
|   static async onPostSuccessReveDeDragon(tmrDialog, tmrData) { | ||||
|     if (tmrData.rolled.isPart) { | ||||
|       await tmrData.actor.appliquerAjoutExperience(tmrData, true); | ||||
|       await tmrData.actor.appliquerAjoutExperience(tmrData); | ||||
|     } | ||||
|     await tmrData.actor.resultCombatReveDeDragon(tmrData); | ||||
|   } | ||||
|   | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -65,7 +65,11 @@ | ||||
|   --debug-box-shadow-blue: inset 0 0 2px blue; | ||||
|   --debug-box-shadow-green: inset 0 0 2px green; | ||||
|  | ||||
| /* =================== 3. some constants ============ */  | ||||
| /* =================== 3. some constants ============ */ | ||||
|   --color-controls:rgba(0, 0, 0, 0.9); | ||||
|   --color-controls-hover:rgba(255, 255, 128, 0.7); | ||||
|   --color-control-border-hover:rgba(255, 128, 0, 0.8); | ||||
|   --color-gold: rgba(191, 149, 63, 0.8); | ||||
|   --gradient-gold: linear-gradient(30deg, rgba(191, 149, 63, 0.3), rgba(252, 246, 186, 0.3), rgba(179, 135, 40, 0.3), rgba(251, 245, 183, 0.3), rgba(170, 119, 28, 0.3)); | ||||
|   --gradient-silver: linear-gradient(30deg, rgba(61, 55, 93, 0.3), rgba(178, 179, 196, 0.3), rgba(59, 62, 63, 0.6), rgba(206, 204, 199, 0.3), rgba(61, 46, 49, 0.3)); | ||||
|   --gradient-green: linear-gradient(30deg, rgba(7, 76, 0, 0.3), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.1), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.3)); | ||||
| @@ -104,6 +108,9 @@ | ||||
| .strong-text{ | ||||
|   font-weight: bold; | ||||
| } | ||||
| i:is(.fas, .far) { | ||||
|   font-size: smaller; | ||||
| } | ||||
|  | ||||
| .tabs .item.active, .blessures-list li ul li:first-child:hover, a:hover { | ||||
|   text-shadow: 1px 0px 0px #ff6600; | ||||
| @@ -225,6 +232,26 @@ table {border: 1px solid #7a7971;} | ||||
|   flex-grow : 3; | ||||
| } | ||||
| /* Styles limited to foundryvtt-reve-de-dragon sheets */ | ||||
| .equipement-nom { | ||||
|   flex-grow : 4; | ||||
|   margin: 0; | ||||
|   justify-content: center; | ||||
|   text-align: left; | ||||
| } | ||||
| .equipement-detail { | ||||
|   margin: 0; | ||||
|   flex: 'flex-shrink' ; | ||||
|   align-items: center; | ||||
|   justify-content: center; | ||||
|   text-align: center; | ||||
| } | ||||
| .equipement-actions { | ||||
|   margin: 0; | ||||
|   flex-grow: 2; | ||||
|   align-items: center; | ||||
|   justify-content: center; | ||||
|   text-align: left; | ||||
| } | ||||
|  | ||||
| .foundryvtt-reve-de-dragon .sheet-header { | ||||
|   -webkit-box-flex: 0; | ||||
| @@ -266,14 +293,8 @@ table {border: 1px solid #7a7971;} | ||||
|   height: 8%; | ||||
|   max-height: 48px; | ||||
|   border-width: 0; | ||||
| 	border: 1px solid rgba(0, 0, 0, 0); | ||||
|   border: 1px solid rgba(0, 0, 0, 0); | ||||
| } | ||||
| .button-img:hover { | ||||
| 	color: rgba(255, 255, 128, 0.7); | ||||
| 	border: 1px solid rgba(255, 128, 0, 0.8); | ||||
| 	cursor: pointer; | ||||
| } | ||||
|  | ||||
| .button-effect-img { | ||||
|   vertical-align: baseline; | ||||
|   width: 16px; | ||||
| @@ -281,9 +302,16 @@ table {border: 1px solid #7a7971;} | ||||
|   height: 16; | ||||
|   border-width: 0; | ||||
| } | ||||
| .button-effect-img:hover { | ||||
|   color: rgba(255, 255, 128, 0.7); | ||||
|   border: 1px solid rgba(255, 128, 0, 0.8); | ||||
| .small-button-direction { | ||||
|   height: 32px; | ||||
|   width: 32px; | ||||
|   border: 0; | ||||
|   vertical-align: bottom; | ||||
| } | ||||
| :is(.button-img,.button-effect-img:hover,.small-button-direction):hover { | ||||
|   color: var(--color-controls-hover); | ||||
|   border: 1px solid var(--color-control-border-hover); | ||||
|   text-shadow: 1px 0px 0px #ff6600; | ||||
|   cursor: pointer; | ||||
| } | ||||
|  | ||||
| @@ -294,18 +322,6 @@ table {border: 1px solid #7a7971;} | ||||
|   vertical-align: bottom; | ||||
| } | ||||
|  | ||||
| .small-button-direction { | ||||
|   height: 32px; | ||||
|   width: 32px; | ||||
|   border: 0; | ||||
|   vertical-align: bottom; | ||||
| } | ||||
| .small-button-direction:hover { | ||||
| 	color: rgba(255, 255, 128, 0.7); | ||||
| 	border: 1px solid rgba(255, 128, 0, 0.8); | ||||
| 	cursor: pointer; | ||||
| } | ||||
|  | ||||
| .foundryvtt-reve-de-dragon .sheet-header .header-fields { | ||||
|   -webkit-box-flex: 1; | ||||
|   -ms-flex: 1; | ||||
| @@ -346,25 +362,25 @@ table {border: 1px solid #7a7971;} | ||||
|   flex-grow: 0; | ||||
| } | ||||
|  | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .competence { | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .caracteristique { | ||||
|   flex-wrap: nowrap; | ||||
|   justify-content: stretch; | ||||
| } | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .competence > .carac-label { | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .carac-label { | ||||
|   flex-basis: 50%; | ||||
| } | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .competence > .attribut-label { | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .attribut-label { | ||||
|   flex-basis: 50%; | ||||
| } | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .competence > .competence-value.total { | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .competence-value.total { | ||||
|   flex-grow: 1; | ||||
|   text-align: right; | ||||
| } | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .competence > .utiliser-attribut { | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .caracteristique > .utiliser-attribut { | ||||
|   flex-basis: available; | ||||
|   flex-grow: 1; | ||||
| } | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .competence > * { | ||||
| .rdd.sheet .window-content .sheet-body .carac-list .caracteristique > * { | ||||
|   flex-basis: 13%; | ||||
|   flex-grow: 0; | ||||
| } | ||||
| @@ -469,13 +485,18 @@ table {border: 1px solid #7a7971;} | ||||
|   flex: 0 0 86px; | ||||
|   text-align: right; | ||||
| } | ||||
|  | ||||
| .competence-list .item-controls { | ||||
|   display: contents !important; | ||||
| } | ||||
| .competence-list .item-controls.hidden-controls { | ||||
|   display: none !important; | ||||
| } | ||||
| .item-controls i:is(.fas,.far) { | ||||
|   color: var(--color-controls); | ||||
| } | ||||
| .item-controls i:is(.fas,.far):hover { | ||||
|   opacity: 0.7  ; | ||||
| } | ||||
|  | ||||
| .rdddialog .dialog-roll-sort s{ | ||||
|   width: 600px; | ||||
| @@ -567,7 +588,7 @@ table {border: 1px solid #7a7971;} | ||||
|   color: rgba(255, 255, 255, 0.75); | ||||
|   background: rgba(255, 255, 255, 0.05); | ||||
|   border: 0 none; | ||||
|   margin-bottom: 0.25rem; | ||||
|   margin-bottom: 0.2rem; | ||||
| } | ||||
|  | ||||
| .window-app .window-content, .window-app.sheet .window-content .sheet-body{ | ||||
| @@ -601,7 +622,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;} | ||||
|  | ||||
| nav.sheet-tabs .item { | ||||
|   position: relative; | ||||
|   padding: 0 0.25rem; | ||||
|   padding: 0 0.2rem; | ||||
| } | ||||
|  | ||||
| nav.sheet-tabs .item:after { | ||||
| @@ -627,11 +648,15 @@ section.sheet-body:after { | ||||
| .sheet header.sheet-header .flex-compteurs {text-align: right;} | ||||
| .sheet header.sheet-header .resource-content {width: 2rem;} | ||||
|  | ||||
| .ctn-vie span, .ctn-endu span, .ctn-fatigue span, .ctn-reve span { | ||||
| .compteur span { | ||||
|   display: inline-block; | ||||
|   text-align: left; | ||||
|   width: 2rem; | ||||
| } | ||||
| .compteur a i:is(.fas,.far):hover { | ||||
|   opacity: 0.7  ; | ||||
| } | ||||
|  | ||||
| .select-diff { | ||||
|   display: inline-block; | ||||
|   text-align: left; | ||||
| @@ -644,17 +669,6 @@ section.sheet-body:after { | ||||
|   max-width: 90%; | ||||
| } | ||||
|  | ||||
| .plus-moins { | ||||
|   display: inline-block; | ||||
|   width: 1.25rem; | ||||
|   background: rgba(30, 25, 20, 1); | ||||
|   text-align: center; | ||||
|   border: 1px solid rgba(72, 46, 28, 1); | ||||
|   border-radius: 0.25rem; | ||||
|   line-height: 1.25rem; | ||||
|   color: rgba(255, 255, 255, 0.5); | ||||
| } | ||||
|  | ||||
| .alchimie-tache { | ||||
|   font-weight: bold; | ||||
|   background: rgb(182, 180, 179); | ||||
| @@ -711,10 +725,13 @@ ul, ol { | ||||
| ul, li { | ||||
|   list-style-type: none; | ||||
| } | ||||
|  | ||||
| .sheet .caracteristique li { | ||||
|   margin: 0.1rem; | ||||
|   padding: 0.2rem; | ||||
| } | ||||
| .sheet li { | ||||
|   margin: 0.125rem; | ||||
|   padding: 0.25rem; | ||||
|   margin: 0.1rem; | ||||
|   padding: 0.1rem; | ||||
| } | ||||
| .header-fields li { | ||||
|   margin: 0; | ||||
| @@ -731,23 +748,19 @@ ul, li { | ||||
|   background: rgb(160, 130, 100, 0.05); | ||||
| } | ||||
| .xp-level-up { | ||||
|   margin: 0.125rem; | ||||
|   margin: 0.1rem; | ||||
|   box-shadow: inset 0px 0px 1px #00000096; | ||||
|   border-radius: 0.25rem; | ||||
|   padding: 0.125rem; | ||||
|   padding: 0.1rem; | ||||
|   flex: 1 1 5rem;   | ||||
|   background: var(--gradient-gold) !important; | ||||
| } | ||||
| .niveau-archetype { | ||||
|   background: var(--gradient-silver-light) !important; | ||||
| } | ||||
| .fa-arrow-alt-circle-up.allouer-stress { | ||||
|   color: rgba(83, 60, 14, 0.8); | ||||
| .item-controls i.fas.allouer-stress.level-up { | ||||
|   color: var(--color-gold); | ||||
| } | ||||
| .fa-arrow-alt-circle-up.allouer-stress-level-up { | ||||
|   color: rgba(191, 149, 63, 0.8); | ||||
| } | ||||
|  | ||||
| .blessures-list ul { | ||||
|   display: flex; | ||||
| } | ||||
| @@ -766,18 +779,18 @@ ul, li { | ||||
|   font-weight: bold; | ||||
| } | ||||
| .list-item { | ||||
|   margin: 0.125rem; | ||||
|   margin: 0.1rem; | ||||
|   box-shadow: inset 0px 0px 1px #00000096; | ||||
|   border-radius: 0.25rem; | ||||
|   padding: 0.125rem; | ||||
|   padding: 0.1rem; | ||||
|   flex: 1 1 5rem; | ||||
|   display: flex !important; | ||||
|   align-items: baseline !important; | ||||
|   align-items: center !important; | ||||
| } | ||||
|  | ||||
| .table-row { | ||||
|   margin: 0.125rem; | ||||
|   padding: 0.125rem; | ||||
|   margin: 0.1rem; | ||||
|   padding: 0.1rem; | ||||
|   flex: 1 1 5rem; | ||||
| } | ||||
|  | ||||
| @@ -801,28 +814,37 @@ ul, li { | ||||
|   background: rgb(200, 10, 100, 0.25); | ||||
| } | ||||
|  | ||||
| .item-quantite { | ||||
|   margin-left: 0.5rem; | ||||
| .item-column { | ||||
|   margin-left: 0.2rem; | ||||
|   margin-right: 0.2rem; | ||||
|   justify-content: center; | ||||
|   text-align: center; | ||||
| } | ||||
|  | ||||
| .list-item-margin1 { | ||||
|   margin-left: 1rem; | ||||
|   margin-left: 0.5rem; | ||||
| } | ||||
| .list-item-margin2 { | ||||
|   margin-left: 2rem; | ||||
|   margin-left: 1rem; | ||||
| } | ||||
| .list-item-margin3 { | ||||
|   margin-left: 3rem; | ||||
|   margin-left: 1.5rem; | ||||
| } | ||||
| .list-item-margin4 { | ||||
|   margin-left: 4rem; | ||||
|   margin-left: 2rem; | ||||
| } | ||||
| .list-item-margin5 { | ||||
|   margin-left: 2.5rem; | ||||
| } | ||||
| .list-item-margin6 { | ||||
|   margin-left: 3rem; | ||||
| } | ||||
|  | ||||
| .sheet-competence-img { | ||||
|   width: 24px; | ||||
|   height: 24px; | ||||
|   flex-grow: 0; | ||||
|   margin-right: 0.25rem; | ||||
|   margin-right: 0.2rem; | ||||
|   vertical-align: bottom; | ||||
| } | ||||
| .competence-column { | ||||
| @@ -866,20 +888,20 @@ ul, li { | ||||
| .competence-value { | ||||
|   flex-grow: 0; | ||||
|   flex-basis: 2rem; | ||||
|   margin-right: 0.25rem; | ||||
|   margin-left: 0.25rem; | ||||
|   margin-right: 0.2rem; | ||||
|   margin-left: 0.2rem; | ||||
| } | ||||
| .description-value { | ||||
|   flex-grow: 0; | ||||
|   flex-basis: 4rem; | ||||
|   margin-right: 0.25rem; | ||||
|   margin-left: 0.25rem; | ||||
|   margin-right: 0.2rem; | ||||
|   margin-left: 0.2rem; | ||||
| } | ||||
| .competence-xp { | ||||
|   flex-grow: 0; | ||||
|   flex-basis: 2rem; | ||||
|   margin-right: 0.25rem; | ||||
|   margin-left: 0.25rem; | ||||
|   margin-right: 0.2rem; | ||||
|   margin-left: 0.2rem; | ||||
| } | ||||
| .blessures-title {  | ||||
|   font-weight: bold; | ||||
| @@ -957,7 +979,7 @@ ul, li { | ||||
|   flex-basis: auto; | ||||
|   padding: 0; | ||||
|   line-height: 1rem; | ||||
|   margin: 0.25rem; | ||||
|   margin: 0.2rem; | ||||
| } | ||||
| .control-icon.tokenhudicon.right { | ||||
|   margin-left: 8px; | ||||
| @@ -975,7 +997,7 @@ ul, li { | ||||
|   border-left: none; | ||||
|   font-weight: 500; | ||||
|   font-size: 1rem; | ||||
|   color: black; | ||||
|   color: var(--color-controls); | ||||
|   padding-top: 5px; | ||||
|   margin-right: 0px; | ||||
|   width: 45px; | ||||
| @@ -1075,7 +1097,7 @@ ul, li { | ||||
| .sidebar-tab .directory-list .entity { | ||||
|     border-top: 1px dashed rgba(0,0,0,0.25); | ||||
|     border-bottom: 0 none; | ||||
|     padding: 0.25rem 0;  | ||||
|     padding: 0.2rem 0;  | ||||
| } | ||||
|  | ||||
| .sidebar-tab .directory-list .entity:hover { | ||||
| @@ -1153,11 +1175,11 @@ ul, li { | ||||
|   border-image-width: 4px; | ||||
|   border-image-outset: 0px; | ||||
| } | ||||
|   #controls .control-tools { | ||||
|     max-height: calc(100vh - 156px); | ||||
|     height: auto; | ||||
| #controls .control-tools { | ||||
|   max-height: calc(100vh - 156px); | ||||
|   height: auto; | ||||
| } | ||||
| #controls .scene-control.active, #controls .control-tool.active, #controls .scene-control:hover, #controls .control-tool:hover { | ||||
| #controls :is(.scene-control.active,.control-tool.active, .scene-control:hover, .control-tool:hover) { | ||||
|   background: rgba(72, 46, 28, 1); | ||||
|   background-origin: padding-box; | ||||
|   border-image: url(img/ui/footer-button.webp) 10 repeat; | ||||
| @@ -1343,8 +1365,8 @@ ul, li { | ||||
| 	color: rgba(255, 255, 255, 0.5); | ||||
| } | ||||
| .calendar-btn:hover { | ||||
| 	color: rgba(255, 255, 128, 0.7); | ||||
| 	border: 1px solid rgba(255, 128, 0, 0.8); | ||||
| 	color: var(--color-controls-hover); | ||||
| 	border: 1px solid var(--color-control-border-hover); | ||||
| 	cursor: pointer; | ||||
| } | ||||
|  | ||||
|   | ||||
							
								
								
									
										397
									
								
								system.json
									
									
									
									
									
								
							
							
						
						
									
										397
									
								
								system.json
									
									
									
									
									
								
							| @@ -1,38 +1,43 @@ | ||||
| { | ||||
|   "name": "foundryvtt-reve-de-dragon", | ||||
|   "id": "foundryvtt-reve-de-dragon", | ||||
|   "title": "Rêve de Dragon", | ||||
|   "description": "Rêve de Dragon RPG for FoundryVTT", | ||||
|   "author": "LeRatierBretonnien", | ||||
|   "authors": [ | ||||
|     { | ||||
|       "name": "LeRatierBretonnien" | ||||
|       "name": "LeRatierBretonnien", | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "VincentVK" | ||||
|       "name": "VincentVK", | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "Grendel" | ||||
|       "name": "Grendel", | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "Michael Nonne" | ||||
|       "name": "Michael Nonne", | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "Mandar" | ||||
|       "name": "Mandar", | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "Fred" | ||||
|       "name": "Fred", | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "Fab" | ||||
|       "name": "Fab", | ||||
|       "flags": {} | ||||
|     } | ||||
|   ], | ||||
|   "url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/", | ||||
|   "license": "LICENSE.txt", | ||||
|   "flags": {}, | ||||
|   "version": "10.0.1", | ||||
|   "minimumCoreVersion": "10", | ||||
|   "compatibleCoreVersion": "10", | ||||
|   "scripts": [], | ||||
|   "version": "10.0.9", | ||||
|   "compatibility": { | ||||
|     "minimum": "10" | ||||
|   }, | ||||
|   "esmodules": [ | ||||
|     "module/rdd-main.js" | ||||
|   ], | ||||
| @@ -44,12 +49,13 @@ | ||||
|       "lang": "en", | ||||
|       "name": "English", | ||||
|       "path": "lang/fr.json", | ||||
|       "unreal": "this is a trick" | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "lang": "fr", | ||||
|       "name": "Français", | ||||
|       "path": "lang/fr.json" | ||||
|       "path": "lang/fr.json", | ||||
|       "flags": {} | ||||
|     } | ||||
|   ], | ||||
|   "packs": [ | ||||
| @@ -57,453 +63,278 @@ | ||||
|       "name": "competences", | ||||
|       "label": "Compétences", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/competences.db", | ||||
|       "path": "packs/competences.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "compétences" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "arts-et-divertissements", | ||||
|       "label": "Arts et Divertissements", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/arts-et-divertissements.db", | ||||
|       "path": "packs/arts-et-divertissements.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "recette", | ||||
|         "cuisine", | ||||
|         "danse", | ||||
|         "musique", | ||||
|         "chant", | ||||
|         "jeux" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "competences-creatures", | ||||
|       "label": "Compétences de Créatures", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/competences-creatures.db", | ||||
|       "path": "packs/competences-creatures.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "compétences", | ||||
|         "créatures" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "competences-entites", | ||||
|       "label": "Compétences des Entités", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/competences-entites.db", | ||||
|       "path": "packs/competences-entites.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "compétences", | ||||
|         "entités" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "sorts-oniros", | ||||
|       "label": "Sorts d'Oniros", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/sorts-oniros.db", | ||||
|       "path": "packs/sorts-oniros.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "sorts" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "sorts-hypnos", | ||||
|       "label": "Sorts d'Hypnos", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/sorts-hypnos.db", | ||||
|       "path": "packs/sorts-hypnos.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "sorts" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "sorts-narcos", | ||||
|       "label": "Sorts de Narcos", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/sorts-narcos.db", | ||||
|       "path": "packs/sorts-narcos.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "sorts" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "sorts-thanatos", | ||||
|       "label": "Sorts de Thanatos", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/sorts-thanatos.db", | ||||
|       "path": "packs/sorts-thanatos.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "sorts" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "equipement", | ||||
|       "label": "Equipement", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/equipement.db", | ||||
|       "path": "packs/equipement.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "équipement", | ||||
|         "objet" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "maladies-et-poisons", | ||||
|       "label": "Maladies & Poisons", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/maladies-et-poisons.db", | ||||
|       "path": "packs/maladies-et-poisons.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "maladie", | ||||
|         "poison" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "rappel-des-regles", | ||||
|       "label": "Rappels des Règles", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/rappel-des-regles.db", | ||||
|       "path": "packs/rappel-des-regles.db", | ||||
|       "type": "JournalEntry", | ||||
|       "tags": [ | ||||
|         "journal", | ||||
|         "règles" | ||||
|       ], | ||||
|       "entity": "JournalEntry", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "queues-de-dragon", | ||||
|       "label": "Queues de Dragon", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/queues-de-dragon.db", | ||||
|       "path": "packs/queues-de-dragon.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "queue" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "ombres-de-thanatos", | ||||
|       "label": "Ombres de Thanatos", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/ombres-de-thanatos.db", | ||||
|       "path": "packs/ombres-de-thanatos.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "ombre" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "souffles-de-dragon", | ||||
|       "label": "Souffles de Dragon", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/souffles-de-dragon.db", | ||||
|       "path": "packs/souffles-de-dragon.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "souffle" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "tarot-draconique", | ||||
|       "label": "Tarot Draconique", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/tarot-draconique.db", | ||||
|       "path": "packs/tarot-draconique.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "tarot" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "tetes-de-dragon-pour-haut-revants", | ||||
|       "label": "Têtes de Dragon (Hauts-Rêvants)", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/tetes-de-dragon-pour-haut-revants.db", | ||||
|       "path": "packs/tetes-de-dragon-pour-haut-revants.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "tête" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "tetes-de-dragon-pour-tous-personnages", | ||||
|       "label": "Têtes de Dragon (Tous Personnages)", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/tetes-de-dragon-pour-tous-personnages.db", | ||||
|       "path": "packs/tetes-de-dragon-pour-tous-personnages.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "item", | ||||
|         "tête" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "tables-diverses", | ||||
|       "label": "Tables Diverses", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/tables-diverses.db", | ||||
|       "path": "packs/tables-diverses.db", | ||||
|       "type": "RollTable", | ||||
|       "tags": [ | ||||
|         "table", | ||||
|         "tables" | ||||
|       ], | ||||
|       "entity": "RollTable", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "animaux", | ||||
|       "label": "Animaux", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/animaux.db", | ||||
|       "path": "packs/animaux.db", | ||||
|       "type": "Actor", | ||||
|       "tags": [ | ||||
|         "animaux", | ||||
|         "creature" | ||||
|       ], | ||||
|       "entity": "Actor", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "voyageurs", | ||||
|       "label": "Voyageurs", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/voyageurs.db", | ||||
|       "path": "packs/voyageurs.db", | ||||
|       "type": "Actor", | ||||
|       "tags": [ | ||||
|         "voyageur", | ||||
|         "profils" | ||||
|       ], | ||||
|       "entity": "Actor", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "vehicules", | ||||
|       "label": "Véhicules", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/vehicules.db", | ||||
|       "path": "packs/vehicules.db", | ||||
|       "type": "Actor", | ||||
|       "tags": [ | ||||
|         "vehicule", | ||||
|         "bateau", | ||||
|         "charett", | ||||
|         "chariot", | ||||
|         "carriole", | ||||
|         "barque" | ||||
|       ], | ||||
|       "entity": "Actor", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "archetypes", | ||||
|       "label": "Archetypes PNJs", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/archetypes.db", | ||||
|       "path": "packs/archetypes.db", | ||||
|       "type": "Actor", | ||||
|       "tags": [ | ||||
|         "archetype", | ||||
|         "pnj" | ||||
|       ], | ||||
|       "entity": "Actor", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "humanoides", | ||||
|       "label": "Humanoïdes", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/humanoides.db", | ||||
|       "path": "packs/humanoides.db", | ||||
|       "type": "Actor", | ||||
|       "tags": [ | ||||
|         "humanoides", | ||||
|         "pnj" | ||||
|       ], | ||||
|       "entity": "Actor", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "entites", | ||||
|       "label": "Entités de Cauchemar", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/entites-de-cauchemar.db", | ||||
|       "path": "packs/entites-de-cauchemar.db", | ||||
|       "type": "Actor", | ||||
|       "tags": [ | ||||
|         "entités", | ||||
|         "entite", | ||||
|         "cauchemar", | ||||
|         "ecni", | ||||
|         "eni" | ||||
|       ], | ||||
|       "entity": "Actor", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "invocations", | ||||
|       "label": "Invocation d'Hypnos", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/invocations.db", | ||||
|       "path": "packs/invocations.db", | ||||
|       "type": "Actor", | ||||
|       "tags": [ | ||||
|         "hypnos", | ||||
|         "invocation" | ||||
|       ], | ||||
|       "entity": "Actor", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "botanique", | ||||
|       "label": "Botanique", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/botanique.db", | ||||
|       "path": "packs/botanique.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "plantes", | ||||
|         "champignons", | ||||
|         "herbes" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "taches-courantes", | ||||
|       "label": "Tâches courantes", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/taches-courantes.db", | ||||
|       "path": "packs/taches-courantes.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "taches" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "meditations-et-ecrits", | ||||
|       "label": "Méditations et Ecrits", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/meditations-et-ecrits.db", | ||||
|       "path": "packs/meditations-et-ecrits.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "meditations", | ||||
|         "méditations", | ||||
|         "livres", | ||||
|         "livre", | ||||
|         "méditation", | ||||
|         "écrits", | ||||
|         "écrit" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "recettes-alchimiques", | ||||
|       "label": "Recettes Alchimiques", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/recettes-alchimiques.db", | ||||
|       "path": "packs/recettes-alchimiques.db", | ||||
|       "type": "Item", | ||||
|       "tags": [ | ||||
|         "recettes", | ||||
|         "recette", | ||||
|         "alchimie", | ||||
|         "alchimique", | ||||
|         "potion" | ||||
|       ], | ||||
|       "entity": "Item", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     }, | ||||
|     { | ||||
|       "name": "scenes-rdd", | ||||
|       "label": "Scenes Reve de Dragon", | ||||
|       "system": "foundryvtt-reve-de-dragon", | ||||
|       "module": "foundryvtt-reve-de-dragon", | ||||
|       "path": "./packs/scenes-rdd.db", | ||||
|       "path": "packs/scenes-rdd.db", | ||||
|       "type": "Scene", | ||||
|       "tags": [ | ||||
|         "ecran", | ||||
|         "scene" | ||||
|       ], | ||||
|       "entity": "Scene", | ||||
|       "private": false | ||||
|       "private": false, | ||||
|       "flags": {} | ||||
|     } | ||||
|   ], | ||||
|   "system": [], | ||||
|   "dependencies": [], | ||||
|   "socket": true, | ||||
|   "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json", | ||||
|   "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.0.1.zip", | ||||
|   "protected": false, | ||||
|   "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.0.8.zip", | ||||
|   "gridDistance": 1, | ||||
|   "gridUnits": "m", | ||||
|   "primaryTokenAttribute": "sante.vie", | ||||
|   "secondaryTokenAttribute": "sante.endurance" | ||||
| } | ||||
| } | ||||
| @@ -1,5 +1,5 @@ | ||||
| <tr class="table-row alterne-row item" data-blessure-type="{{gravite}}" data-attribute={{key}} data-blessure-index="{{key}}" > | ||||
|   <td class="item-control blessure-control" title="Blessure {{title}}" data-blessure-active="{{bless.active}}"> | ||||
|   <td class="blessure-control" title="Blessure {{title}}" data-blessure-active="{{bless.active}}"> | ||||
|     {{#if bless.active}} | ||||
|     <i class="fas fa-skull-crossbones blessure-active-{{gravite}}" name="blessure-{{gravite}}-{{key}}-active"></i> | ||||
|     {{else}} | ||||
|   | ||||
| @@ -68,7 +68,7 @@ | ||||
|             </li> | ||||
|             {{/each}} | ||||
|             <li class="flexrow list-item" data-attribute="vie"> | ||||
|               <span class="competence-label" name="data.sante.vie.label">Vie</span> | ||||
|               <span class="competence-label" name="system.sante.vie.label">Vie</span> | ||||
|               <span class="flexrow" > | ||||
|                 <input type="text" name="system.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number" /> /  | ||||
|                 <input type="text" name="system.sante.vie.max" value="{{data.sante.vie.max}}" data-dtype="Number" /> | ||||
| @@ -108,8 +108,8 @@ | ||||
|               <input class="competence-value creature-dommages" type="text" compname="{{comp.name}}" | ||||
|                 value="{{numberFormat comp.system.dommages decimals=0 sign=true}}" data-dtype="number" /> | ||||
|               <div class="item-controls"> | ||||
|                 <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|                 <a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               </div> | ||||
|             </li> | ||||
|             {{/each}} | ||||
| @@ -126,35 +126,7 @@ | ||||
|  | ||||
|     {{!-- Equipment Tab --}} | ||||
|     <div class="tab items" data-group="primary" data-tab="items"> | ||||
|  | ||||
|       {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}} | ||||
|  | ||||
|       <span class="item-name"><h4>Equipement porté</h4></span> | ||||
|       <span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> -  | ||||
|       <span class="item-name"><a class="creer-un-objet">Créer un objet</a></span> | ||||
|       {{#if options.isGM}} | ||||
|       <span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span> | ||||
|       {{/if}} | ||||
|  | ||||
|       <ul class="item-list alterne-list"> | ||||
|         <li class="competence-header flexrow"> | ||||
|           <img class="sheet-competence-img" src="{{img}}" title="Equipement"/> | ||||
|           <span class="competence-title flex-grow">Nom</span> | ||||
|           <span class="competence-title">Q.</span> | ||||
|           <span class="competence-title">Enc.</span> | ||||
|           <span class="competence-title flex-grow">Equiper/Editer/Suppr.</span> | ||||
|         </li> | ||||
|         {{#each objets as |item id|}} | ||||
|           {{#unless item.estContenu}} | ||||
|           {{#if (ne item.type 'conteneur')}} | ||||
|             {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html" item=item }} | ||||
|           {{/if}} | ||||
|           {{/unless}} | ||||
|         {{/each}} | ||||
|         {{#each conteneurs as |conteneur id|}} | ||||
|           {{buildConteneur this}} | ||||
|         {{/each}} | ||||
|       </ul> | ||||
|       {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.html"}} | ||||
|     </div> | ||||
|  | ||||
|     {{!-- Biography Tab --}} | ||||
|   | ||||
| @@ -28,19 +28,19 @@ | ||||
|  | ||||
|     {{!-- Carac Tab --}} | ||||
|     <div class="tab items" data-group="primary" data-tab="carac"> | ||||
|        | ||||
|  | ||||
|       <div class="grid grid-2col"> | ||||
|         <div class="flex-group-left flexcol"> | ||||
|           <ol class="carac-list alterne-list"> | ||||
|             {{#each data.carac as |carac key|}} | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               {{#if (eq key 'taille')}} | ||||
|               <span class="carac-label flexrow" name="data.carac.{{key}}.label">{{carac.label}}</span> | ||||
|               <span class="carac-label flexrow" name="system.carac.{{key}}.label">{{carac.label}}</span> | ||||
|               {{else}} | ||||
|               <span class="carac-label flexrow" name="data.carac.{{key}}.label"><a | ||||
|               <span class="carac-label flexrow" name="system.carac.{{key}}.label"><a | ||||
|                   name={{key}}>{{carac.label}}</a></span> | ||||
|               {{/if}} | ||||
|               <input class="competence-value flexrow" type="text" name="data.carac.{{key}}.value" | ||||
|               <input class="competence-value flexrow" type="text" name="system.carac.{{key}}.value" | ||||
|                 value="{{carac.value}}" data-dtype="{{carac.type}}" /> | ||||
|             </li> | ||||
|             {{/each}} | ||||
| @@ -50,36 +50,37 @@ | ||||
|         <div class="flex-group-left flexcol">         | ||||
|  | ||||
|           <ol class="carac-list alterne-list"> | ||||
|             <li class="competence flexrow list-item"> | ||||
|             <li class="caracteristique flexrow list-item"> | ||||
|               <span class="carac-label flexrow" name="catEntite">Catégorie : </span> | ||||
|               <select name="data.definition.categorieentite" value="{{data.definition.categorieentite}}" data-dtype="String"> | ||||
|               <select name="system.definition.categorieentite" value="{{data.definition.categorieentite}}" data-dtype="String"> | ||||
|                 {{#select data.definition.categorieentite}} | ||||
|                 <option value="cauchemar">Cauchemar</option> | ||||
|                 <option value="reve">Rêve</option> | ||||
|                 {{/select}} | ||||
|               </select> | ||||
|             </li> | ||||
|             <li class="competence flexrow list-item"> | ||||
|             <li class="caracteristique flexrow list-item"> | ||||
|               <span class="carac-label flexrow" name="typeEntite">Type d'entité : </span> | ||||
|               <select name="data.definition.typeentite" value="{{data.definition.typeentite}}" data-dtype="String"> | ||||
|               <select name="system.definition.typeentite" value="{{data.definition.typeentite}}" data-dtype="String"> | ||||
|                 {{#select data.definition.typeentite}} | ||||
|                 <option value="incarne">Incarnée</option> | ||||
|                 <option value="nonincarne">Non Incarnée</option> | ||||
|                 <option value="blurette">Blurete</option> | ||||
|                 {{/select}} | ||||
|               </select> | ||||
|             </li> | ||||
|             {{#each data.attributs as |attr key|}} | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : </span> | ||||
|               <span><input class="attribut-value flexrow" type="text" name="data.attributs.{{key}}.value" | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="system.attributs.{{key}}.label">{{attr.label}} : </span> | ||||
|               <span><input class="attribut-value flexrow" type="text" name="system.attributs.{{key}}.value" | ||||
|                   value="{{attr.value}}" data-dtype="{{attr.type}}" /></span> | ||||
|             </li> | ||||
|             {{/each}} | ||||
|             <li class="competence flexrow list-item" data-attribute="endurance"> | ||||
|               <span class="competence-label flexrow" name="data.sante.endurance.label">Endurance : </span> | ||||
|               <span><input class="sante-value flexrow" type="text" name="data.sante.endurance.value" | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="endurance"> | ||||
|               <span class="competence-label flexrow" name="system.sante.endurance.label">Endurance : </span> | ||||
|               <span><input class="sante-value flexrow" type="text" name="system.sante.endurance.value" | ||||
|                   value="{{data.sante.endurance.value}}" data-dtype="Number" /></span><span>/ </span> | ||||
|               <span><input class="sante-value flexrow" type="text" name="data.sante.endurance.max" | ||||
|               <span><input class="sante-value flexrow" type="text" name="system.sante.endurance.max" | ||||
|                   value="{{data.sante.endurance.max}}" data-dtype="Number" /></span> | ||||
|             </li> | ||||
|           </ol> | ||||
| @@ -89,9 +90,7 @@ | ||||
|      | ||||
|     {{!-- Compétences Tab --}} | ||||
|     <div class="tab competences" data-group="primary" data-tab="competences"> | ||||
|  | ||||
|       <div class="flexcol"> | ||||
|  | ||||
|         <div class="flex-group-left flexcol competence-column"> | ||||
|           <ol class="item-list alterne-list"> | ||||
|             {{#each competences as |comp key|}} | ||||
| @@ -99,37 +98,36 @@ | ||||
|               <img class="sheet-competence-img" src="{{comp.img}}" /> | ||||
|               <span class="competence-label"><a>{{comp.name}}</a></span> | ||||
|               <input class="competence-value creature-carac" type="text" compname="{{comp.name}}" | ||||
|                 value="{{comp.data.carac_value}}" data-dtype="number" /> | ||||
|                 value="{{comp.system.carac_value}}" data-dtype="number" /> | ||||
|               <input class="competence-value creature-niveau" type="text" compname="{{comp.name}}" | ||||
|                 value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" /> | ||||
|                 value="{{numberFormat comp.system.niveau decimals=0 sign=true}}" data-dtype="number" /> | ||||
|               <input class="competence-value creature-dommages" type="text" compname="{{comp.name}}" | ||||
|                 value="{{numberFormat comp.data.dommages decimals=0 sign=true}}" data-dtype="number" /> | ||||
|                 value="{{numberFormat comp.system.dommages decimals=0 sign=true}}" data-dtype="number" /> | ||||
|               <div class="item-controls"> | ||||
|                 <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|                 <a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               </div> | ||||
|             </li> | ||||
|             {{/each}} | ||||
|           </ol> | ||||
|         </div> | ||||
|         <div class="flex-group-left flexcol competence-column"> | ||||
|           <ol class="item-list alterne-list"> | ||||
|             {{#each possessions as |possession key|}} | ||||
|             <li class="item flexrow list-item" data-item-id="{{possession._id}}"> | ||||
|               <img class="sheet-competence-img" src="{{possession.img}}" /> | ||||
|               <span class="competence-label">{{possession.name}}</span> | ||||
|               <div class="item-controls"> | ||||
|                 <a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               </div> | ||||
|             </li> | ||||
|             {{/each}} | ||||
|           </ol> | ||||
|  | ||||
|           <div class="flex-group-left flexcol competence-column"> | ||||
|             <ol class="item-list alterne-list"> | ||||
|               {{#each possessions as |possession key|}} | ||||
|               <li class="item flexrow list-item" data-item-id="{{possession._id}}"> | ||||
|                 <img class="sheet-competence-img" src="{{possession.img}}" /> | ||||
|                 <span class="competence-label">{{possession.name}}</span> | ||||
|                 <div class="item-controls"> | ||||
|                   <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|                   <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|                 </div> | ||||
|               </li> | ||||
|               {{/each}} | ||||
|             </ol> | ||||
|    | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|        | ||||
|  | ||||
|     {{!-- Biography Tab --}} | ||||
|     <div class="tab description" data-group="primary" data-tab="description"> | ||||
|       <div class="form-group editor"> | ||||
| @@ -137,8 +135,6 @@ | ||||
|       </div> | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}} | ||||
|     </div> | ||||
|      | ||||
|     </div> | ||||
|  | ||||
|   </section> | ||||
| </form> | ||||
| @@ -1,27 +1,31 @@ | ||||
| <header class="competence-header flexrow"> | ||||
|   <span class="competence-title">{{categorie}}</span> | ||||
| </header> | ||||
| <ul class="item-list alterne-list competence-list"> | ||||
|   {{#if @root.options.vueDetaillee}} | ||||
|   <li class="item flexrow list-item "> | ||||
|      | ||||
|     <span class="competence-label"></span> | ||||
|     <span class="competence-value" >Niv.</span> | ||||
|     <span class="competence-xp">xp</span> | ||||
|     {{#if (eq categorie 'Draconic')}} | ||||
|     <span class="competence-xp-sort">sort</span> | ||||
|     {{/if}} | ||||
|     <div class="item-controls"> | ||||
|       <i class="far fa-arrow-alt-circle-up"></i> | ||||
|       <span class="competence-archetype">Arch</span> | ||||
|       <i class="far fa-edit"></i> | ||||
|       {{#if @root.options.isGM}} | ||||
|       <i class="far fa-trash"></i> | ||||
| {{#if competences}} | ||||
| <div class="flex-shrink"> | ||||
|   <header class="competence-header flexrow"> | ||||
|     <span class="competence-title">{{categorie}}</span> | ||||
|   </header> | ||||
|   <ul class="item-list alterne-list competence-list"> | ||||
|     {{#if @root.options.vueDetaillee}} | ||||
|     <li class="item flexrow list-item "> | ||||
|        | ||||
|       <span class="competence-label"></span> | ||||
|       <span class="competence-value" >Niv.</span> | ||||
|       <span class="competence-xp">xp</span> | ||||
|       {{#if (eq categorie 'Draconic')}} | ||||
|       <span class="competence-xp-sort">sort</span> | ||||
|       {{/if}} | ||||
|     </div> | ||||
|   </li> | ||||
|   {{/if}} | ||||
|   {{#each competences as |comp key|}} | ||||
|   {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} | ||||
|   {{/each}} | ||||
| </ul> | ||||
|       <div class="item-controls"> | ||||
|         <i class="far fa-arrow-alt-circle-up"></i> | ||||
|         <span class="competence-archetype">Arch</span> | ||||
|         <i class="far fa-edit"></i> | ||||
|         {{#if @root.options.isGM}} | ||||
|         <i class="far fa-trash"></i> | ||||
|         {{/if}} | ||||
|       </div> | ||||
|     </li> | ||||
|     {{/if}} | ||||
|     {{#each competences as |comp key|}} | ||||
|     {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} | ||||
|     {{/each}} | ||||
|   </ul> | ||||
| </div> | ||||
| {{/if}} | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| {{#if visible}} | ||||
| {{#if system.isVisible}} | ||||
|   <li class="item flexrow list-item {{#if system.isLevelUp}}xp-level-up tooltip{{/if}}" data-item-id="{{_id}}"> | ||||
|     <a class="competence-label" name="{{name}}"> | ||||
|       <img class="sheet-competence-img" src="{{img}}"/> | ||||
| @@ -7,7 +7,7 @@ | ||||
|  | ||||
|     {{#if system.isLevelUp}} | ||||
|     <span class="tooltiptext ttt-xp">Vous pouvez dépenser {{system.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}}</span> | ||||
|     <a class="item-control competence-xp-augmenter" compname="{{name}}" title="Augmenter"> | ||||
|     <a class="competence-xp-augmenter" compname="{{name}}" title="Augmenter"> | ||||
|       <i class="fas fa-arrow-alt-circle-up"></i> | ||||
|     </a> | ||||
|     {{/if}} | ||||
| @@ -31,7 +31,7 @@ | ||||
|     {{#if @root.options.vueDetaillee}} | ||||
|     <div class="item-controls"> | ||||
|       {{#if system.stressXpMax}} | ||||
|       <a class="item-control competence-stress-augmenter" compname="{{name}}"  | ||||
|       <a class="competence-stress-augmenter" compname="{{name}}"  | ||||
|             title="Dépenser {{system.stressXpMax}} points de stress {{#if system.isStressLevelUp}} pour augmenter d'un niveau {{/if}}"> | ||||
|             <i class="fas fa-arrow-alt-circle-up allouer-stress{{#if system.isStressLevelUp}}-level-up{{/if}}"></i> | ||||
|       </a> | ||||
| @@ -41,9 +41,9 @@ | ||||
|       <input class="competence-archetype niveau-archetype" type="text" compname="{{name}}" name="comp-archetype-{{name}}" | ||||
|             value="{{numberFormat system.niveau_archetype decimals=0 sign=true}}" data-dtype="number" | ||||
|             {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> | ||||
|       <a class="item-control item-edit" title="Modifier"><i class="fas fa-edit"></i></a> | ||||
|       <a class="item-edit" title="Modifier"><i class="fas fa-edit"></i></a> | ||||
|       {{#if @root.options.isGM}} | ||||
|       <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|       <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|       {{/if}} | ||||
|     </div> | ||||
|     {{/if}} | ||||
|   | ||||
| @@ -1,9 +1,28 @@ | ||||
| <li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true"> | ||||
|   <img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/> | ||||
|  | ||||
|   {{#if (eq item.type 'conteneur')}} | ||||
|   <span class="item-name conteneur-name flex-grow"><a data-item-id="{{item._id}}">+{{item.name}}</a></span> | ||||
|     <span class="sheet-competence-img conteneur-name"> | ||||
|       {{#if vide}} | ||||
|        <i class="far fa-square"></i> | ||||
|       {{else}} | ||||
|         <a data-item-id="{{item._id}}"> | ||||
|         {{#if ouvert}} | ||||
|         <i class="far fa-minus-square"></i> | ||||
|         <!-- <i class="far fa-caret-square-down"></i> --> | ||||
|         {{else}} | ||||
|         <i class="far fa-plus-square"></i> | ||||
|         <!-- <i class="fas fa-caret-square-right"></i> --> | ||||
|         {{/if}} | ||||
|         </a> | ||||
|       {{/if}} | ||||
|     </span> | ||||
|     <span class="item-name conteneur-name flex-grow"> | ||||
|       <a data-item-id="{{item._id}}"> | ||||
|         <img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/> | ||||
|         {{item.name}} | ||||
|       </a> | ||||
|     </span> | ||||
|   {{else}} | ||||
|   <img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/> | ||||
|   <span class="item-name flex-grow">{{item.name}}</span> | ||||
|   {{/if}} | ||||
|   <span class="item-quantite">{{item.system.quantite}} | ||||
| @@ -30,3 +49,4 @@ | ||||
|     {{/if}} | ||||
|   </div> | ||||
| </li> | ||||
|  | ||||
|   | ||||
							
								
								
									
										48
									
								
								templates/actor-sheet-inventaire-item.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								templates/actor-sheet-inventaire-item.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,48 @@ | ||||
| <li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true"> | ||||
|   <span class="equipement-nom {{#if (eq item.type 'conteneur')}}conteneur-name{{/if}} "> | ||||
|     {{#if (eq item.type 'conteneur')}} | ||||
|       {{#if vide}} | ||||
|         <i class="far fa-square"></i> | ||||
|       {{else}} | ||||
|         <a data-item-id="{{item._id}}"> | ||||
|         {{#if ouvert}} | ||||
|         <i class="far fa-minus-square"></i> | ||||
|         {{else}} | ||||
|         <i class="far fa-plus-square"></i> | ||||
|         {{/if}} | ||||
|         </a> | ||||
|       {{/if}} | ||||
|       <a data-item-id="{{item._id}}"> | ||||
|         <img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/> | ||||
|         <span>{{item.name}}</span> | ||||
|       </a> | ||||
|     {{else}} | ||||
|     <img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/> | ||||
|     <span>{{item.name}}</span> | ||||
|     {{/if}} | ||||
|   </span> | ||||
|   <span class="equipement-detail">{{item.system.quantite}} | ||||
|     {{#if (gt item.system.quantite 1)}} | ||||
|     <a class="item-split" title="Séparer"><i class="fas fa-unlink"></i></a> | ||||
|     {{/if}} | ||||
|   </span> | ||||
|   <span class="equipement-detail">{{numberFormat item.system.encTotal decimals=2}}</span> | ||||
|   <span class="equipement-actions item-controls"> | ||||
|     {{#unless item.estContenu}} | ||||
|     {{#if (ne item.type 'conteneur')}} | ||||
|     <a class="item-equip" title="Equiper">{{#if item.system.equipe}}<i class="fas fa-hand-rock"></i>{{else}}<i class="far fa-hand-paper"></i>{{/if}}</a> | ||||
|     {{/if}} | ||||
|     {{/unless}} | ||||
|     <a class="item-edit" title="Editer"><i class="fas fa-edit"></i></a> | ||||
|     <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|       | ||||
|     {{#if (or (eq item.type 'arme') (eq item.type 'conteneur') item.system.quantite)}} | ||||
|     <a class="item-vendre" title="Vendre ou donner"><i class="fas fa-comments-dollar"></i></a> | ||||
|     {{/if}} | ||||
|     <a class="item-montrer" title="Montrer"><i class="fas fa-comment"></i></a> | ||||
|     {{#if item.actionPrincipale}} | ||||
|     <a class="item-action">{{item.actionPrincipale}}</a> | ||||
|     {{/if}} | ||||
|   </span> | ||||
| </li> | ||||
|  | ||||
| @@ -3,16 +3,26 @@ | ||||
|   {{#each monnaie as |piece id|}} | ||||
|   <li class="item flexrow list-item" data-item-id="{{piece._id}}"> | ||||
|     <img class="sheet-competence-img" src="{{piece.img}}" title="{{piece.name}}"/> | ||||
|     <span class="competence-title competence-label">{{piece.name}}</span> | ||||
|     <span class="competence-title competence-label">{{piece.system.quantite}}</span> | ||||
|     <span class="competence-title"> | ||||
|       <a class="monnaie-plus plus-moins">+</a> | ||||
|       <a class="monnaie-moins plus-moins">-</a> | ||||
|     <span class="equipement-nom">{{piece.name}}</span> | ||||
|     <span class="equipement-detail item-controls"> | ||||
|       <a class="monnaie-moins"><i class="fas fa-minus-square"></i></a> | ||||
|     </span> | ||||
|     <span class="equipement-detail"> | ||||
|       <span>{{piece.system.quantite}}</span> | ||||
|     </span> | ||||
|     <span class="equipement-detail item-controls"> | ||||
|       <a class="monnaie-plus"><i class="fas fa-plus-square"></i></a> | ||||
|     </span> | ||||
|  | ||||
|     <!-- <span class="equipement-detail"> | ||||
|       <span class="flex-shrink"><a class="monnaie-moins"><i class="fas fa-minus-square"></i></a></span> | ||||
|       <span>{{piece.system.quantite}}</span> | ||||
|       <span class="flex-shrink"><a class="monnaie-plus"><i class="fas fa-plus-square"></i></a></span> | ||||
|     </span> --> | ||||
|     <span class="equipement-actions  item-controls"> | ||||
|       <a class="item-edit" title="Editer"><i class="fas fa-edit"></i></a> | ||||
|       <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|     </span> | ||||
|     <div class="item-controls flex-shrink"> | ||||
|       <a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a> | ||||
|       <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|   </div> | ||||
|   </li> | ||||
|   {{/each}} | ||||
| </ul> | ||||
|   | ||||
							
								
								
									
										26
									
								
								templates/actor-sheet-inventaire.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								templates/actor-sheet-inventaire.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}} | ||||
|  | ||||
| <span class="item-name"><h4>Equipement</h4></span> | ||||
| <span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> -  | ||||
| <span class="item-name"><a class="creer-un-objet">Créer un objet</a></span> | ||||
| {{#if options.isGM}} | ||||
| <span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span> | ||||
| {{/if}} | ||||
| <ul class="item-list alterne-list"> | ||||
|   <li class="competence-header flexrow"> | ||||
|     <span class="equipement-nom">Nom</span> | ||||
|     <span class="equipement-detail">Q.</span> | ||||
|     <span class="equipement-detail">Enc.</span> | ||||
|     <span class="equipement-actions">Actions</span> | ||||
|   </li> | ||||
|   {{#each objets as |item id|}} | ||||
|     {{#unless item.estContenu}} | ||||
|     {{#if (ne item.type 'conteneur')}} | ||||
|       {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-item.html" item=item vide=true ouvert=true }} | ||||
|     {{/if}} | ||||
|     {{/unless}} | ||||
|   {{/each}} | ||||
|   {{#each conteneurs as |conteneur id|}} | ||||
|     {{buildConteneur this}} | ||||
|   {{/each}} | ||||
| </ul> | ||||
							
								
								
									
										12
									
								
								templates/actor-sheet-liens-animaux.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								templates/actor-sheet-liens-animaux.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| <span class="item-name"><h4>Compagnons animaux</h4></span> | ||||
| <ul class="item-list alterne-list"> | ||||
|   {{#each subacteurs.montures as |monture id|}} | ||||
|   <li class="item flexrow list-item" data-actor-id="{{monture.id}}"> | ||||
|     <img class="sheet-competence-img" src="{{monture.img}}" title="{{monture.name}}"/> | ||||
|     <span class="subacteur-label"><a>{{monture.name}}</a></span> | ||||
|     <div class="flex-shrink"> | ||||
|       <a class="subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|   </div> | ||||
|   </li> | ||||
|   {{/each}} | ||||
| </ul> | ||||
							
								
								
									
										12
									
								
								templates/actor-sheet-liens-suivants.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								templates/actor-sheet-liens-suivants.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| <span class="item-name"><h4>Suivants</h4></span> | ||||
| <ul class="item-list alterne-list"> | ||||
|   {{#each subacteurs.suivants as |suivant id|}} | ||||
|   <li class="item flexrow list-item" data-actor-id="{{suivant.id}}"> | ||||
|     <img class="sheet-competence-img" src="{{suivant.img}}" title="{{suivant.name}}"/> | ||||
|     <span class="competence-title subacteur-label"><a>{{suivant.name}}</a></span> | ||||
|     <div class="item-controls flex-shrink"> | ||||
|       <a class="subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|   </div> | ||||
|   </li> | ||||
|   {{/each}} | ||||
| </ul> | ||||
							
								
								
									
										15
									
								
								templates/actor-sheet-liens-vehicules.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								templates/actor-sheet-liens-vehicules.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| <span class="item-name"><h4>Véhicules</h4></span> | ||||
| <ul class="item-list alterne-list"> | ||||
|   {{#each subacteurs.vehicules as |vehicule id|}} | ||||
|   <li class="item flexrow list-item" data-actor-id="{{vehicule.id}}"> | ||||
|     <img class="sheet-competence-img" src="{{vehicule.img}}" title="{{vehicule.name}}"/> | ||||
|     <span class="flex-grow subacteur-label"><a>{{vehicule.name}}</a></span> | ||||
|     <span>{{vehicule.categorie}}</span> | ||||
|     <span>{{vehicule.structure}}</span> | ||||
|     <div class="flex-shrink"> | ||||
|       <a class="subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|   </div> | ||||
|   </li> | ||||
|   {{/each}} | ||||
| </ul> | ||||
|  | ||||
| @@ -4,8 +4,8 @@ | ||||
|     <a>{{oeuvre.name}} (niveau {{oeuvre.system.niveau}})</a> | ||||
|   </span> | ||||
|   <div class="item-controls"> | ||||
|     <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|     <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|     <a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|     <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|   </div> | ||||
| </li> | ||||
|  | ||||
|   | ||||
| @@ -10,40 +10,40 @@ | ||||
|         <div class="flexrow"> | ||||
|           <ul class="flex-group-center flex-compteurs"> | ||||
|             <li> | ||||
|               <label class="ctn-vie"> | ||||
|               <label class="compteur"> | ||||
|                 <a class="jet-vie">Vie</a> | ||||
|                 <a class="vie-moins plus-moins">-</a> | ||||
|                 <input class="resource-content" type="text" name="data.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number"/> | ||||
|                 <a class="vie-moins"><i class="fas fa-minus-square"></i></a> | ||||
|                 <input class="resource-content" type="text" name="system.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number"/> | ||||
|                 <span>/ {{data.sante.vie.max}}</span> | ||||
|                 <a class="vie-plus plus-moins">+</a> | ||||
|                 <a class="vie-plus"><i class="fas fa-plus-square"></i></a> | ||||
|               </label> | ||||
|             </li> | ||||
|             <li> | ||||
|               <label class="ctn-endu"> | ||||
|                 <a class="jet-endurance">Endurance</a>                 | ||||
|                 <a class="endurance-moins plus-moins">-</a> | ||||
|                 <input class="resource-content" type="text" name="data.sante.endurance.value" value="{{data.sante.endurance.value}}" data-dtype="Number"/> | ||||
|               <label class="compteur"> | ||||
|                 <a class="jet-endurance">Endurance</a> | ||||
|                 <a class="endurance-moins"><i class="fas fa-minus-square"></i></a> | ||||
|                 <input class="resource-content" type="text" name="system.sante.endurance.value" value="{{data.sante.endurance.value}}" data-dtype="Number"/> | ||||
|                 <span>/ {{data.sante.endurance.max}}</span> | ||||
|                 <a class="endurance-plus plus-moins">+</a> | ||||
|                 <a class="endurance-plus"><i class="fas fa-plus-square"></i></a> | ||||
|               </label> | ||||
|             </li> | ||||
|             <li> | ||||
|               <label class="appliquerFatigue ctn-fatigue tooltip"> | ||||
|               <label class="appliquerFatigue compteur tooltip"> | ||||
|                 <span class="tooltiptext ttt-fatigue">{{{calc.fatigue.html}}}</span> | ||||
|                 Fatigue | ||||
|                 <a class="fatigue-moins plus-moins">-</a> | ||||
|                 <input class="resource-content" id="fatigue-value" type="text" name="data.sante.fatigue.value" value="{{data.sante.fatigue.value}}" data-dtype="Number" /> | ||||
|                 <a class="fatigue-moins"><i class="fas fa-minus-square"></i></a> | ||||
|                 <input class="resource-content" id="fatigue-value" type="text" name="system.sante.fatigue.value" value="{{data.sante.fatigue.value}}" data-dtype="Number" /> | ||||
|                 <span>/ {{data.sante.fatigue.max}}</span> | ||||
|                 <a class="fatigue-plus plus-moins">+</a> | ||||
|                 <a class="fatigue-plus"><i class="fas fa-plus-square"></i></a> | ||||
|               </label> | ||||
|             </li> | ||||
|             <li> | ||||
|               <label class="ctn-reve"> | ||||
|               <label class="compteur"> | ||||
|                 <span class="ptreve-actuel"><a>Rêve</a></span> | ||||
|                 <a class="ptreve-actuel-moins plus-moins">-</a> | ||||
|                 <input class="resource-content" id="pointsreve-value" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number" /> | ||||
|                 <a class="ptreve-actuel-moins"><i class="fas fa-minus-square"></i></a> | ||||
|                 <input class="resource-content" id="pointsreve-value" type="text" name="system.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number" /> | ||||
|                 <span>/ {{data.reve.seuil.value}}</span> | ||||
|                 <a class="ptreve-actuel-plus plus-moins">+</a> | ||||
|                 <a class="ptreve-actuel-plus"><i class="fas fa-plus-square"></i></a> | ||||
|               </label> | ||||
|             </li> | ||||
|           </ul> | ||||
| @@ -102,36 +102,36 @@ | ||||
|               <ul class="carac-list alterne-list"> | ||||
|                 {{#each data.carac as |carac key|}} | ||||
|                     {{#if carac.isLevelUp}} | ||||
|                     <li class="competence flexrow item-list xp-level-up" data-attribute="{{key}}"> | ||||
|                     <li class="caracteristique flexrow item-list xp-level-up" data-attribute="{{key}}"> | ||||
|                     {{else}} | ||||
|                     <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|                     <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|                     {{/if}} | ||||
|                     {{#if (eq key 'taille')}} | ||||
|                       <span class="carac-label" name="data.carac.{{key}}.label">{{carac.label}}</span> | ||||
|                       <input class="carac-value" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> | ||||
|                       <span class="carac-label" name="system.carac.{{key}}.label">{{carac.label}}</span> | ||||
|                       <input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> | ||||
|                       <label class="carac-xp"/> | ||||
|                     {{else}} | ||||
|                         {{#if carac.derivee}} | ||||
|                         <span class="carac-label" name="data.carac.{{key}}.label"> <a name={{key}}>{{carac.label}}</a></span> | ||||
|                         <span class="carac-label" name="system.carac.{{key}}.label"> <a name={{key}}>{{carac.label}}</a></span> | ||||
|                         <label class="competence-value">{{carac.value}}</label> | ||||
|                         <label class="carac-xp"/> | ||||
|                         {{else}} | ||||
|                           {{#if carac.isLevelUp}} | ||||
|                             <span class="carac-label tooltip" name="data.carac.{{key}}.label"> | ||||
|                             <span class="carac-label tooltip" name="system.carac.{{key}}.label"> | ||||
|                               <span class="tooltiptext ttt-xp"> | ||||
|                               Vous pouvez dépenser {{carac.xpNext}} points d'Experience pour augmenter de 1 votre caractéristique {{carac.label}} | ||||
|                             </span> | ||||
|                             <a name={{key}}>{{carac.label}}</a></span> | ||||
|                           {{else}} | ||||
|                             <span class="carac-label tooltip" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span> | ||||
|                             <span class="carac-label tooltip" name="system.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span> | ||||
|                           {{/if}} | ||||
|                           <input class="carac-value" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> | ||||
|                           <input class="carac-value" type="text" name="system.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> | ||||
|                           <span class="carac-xp tooltip"> | ||||
|                           <input class="carac-xp" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> | ||||
|                           <input class="carac-xp" type="text" name="system.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} /> | ||||
|                           <span class="tooltiptext ttt-xp">Vous devez acquérir {{carac.xpNext}} points d'Experience pour augmenter de 1 votre {{carac.label}}</span>       | ||||
|                           </span> | ||||
|                           {{#if carac.isLevelUp}} | ||||
|                           <a class="item-control carac-xp-augmenter" name="augmenter.{{key}}" title="Augmenter"> | ||||
|                           <a class="carac-xp-augmenter" name="augmenter.{{key}}" title="Augmenter"> | ||||
|                             <i class="fas fa-arrow-alt-circle-up"></i> | ||||
|                           </a> | ||||
|                           {{/if}} | ||||
| @@ -139,27 +139,27 @@ | ||||
|                     {{/if}} | ||||
|                     </li> | ||||
|                 {{/each}} | ||||
|                 <li class="competence flexrow"> | ||||
|                 <li class="caracteristique flexrow"> | ||||
|                   <span class="carac-label" name="carac-total">Total Caractéristiques </span> | ||||
|                   <span class="competence-value total" name="carac-total-value">{{calc.caracTotal}} </span> | ||||
|                 </li> | ||||
|               </ul>           | ||||
|               </ul> | ||||
|             </div> | ||||
|             <div class="flex-group-left flexcol" > | ||||
|               <ul class="carac-list"> | ||||
|                 <li class="competence flexrow list-item"> | ||||
|                 <li class="caracteristique flexrow list-item"> | ||||
|                   <span class="carac-label" name="beaute">Beauté :</span> | ||||
|                   <input class="description-value" type="text" name="data.beaute" value="{{data.beaute}}" data-dtype="String" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/> | ||||
|                   <input class="description-value" type="text" name="system.beaute" value="{{data.beaute}}" data-dtype="String" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/> | ||||
|                   <label class="carac-xp"/> | ||||
|                 </li> | ||||
|                 {{#each data.attributs as |attr key|}} | ||||
|                 {{#unless (eq key 'hautrevant')}} | ||||
|                 <li class="competence flexrow  list-item" data-attribute="{{key}}"> | ||||
|                   <span class="carac-label" name="data.attributs.{{key}}.label">{{attr.label}} :</span> | ||||
|                 <li class="caracteristique flexrow  list-item" data-attribute="{{key}}"> | ||||
|                   <span class="carac-label" name="system.attributs.{{key}}.label">{{attr.label}} :</span> | ||||
|                   {{#if (eq key 'protection')}} | ||||
|                   <input class="description-value" id="attribut-protection-edit" type="text" name="{{key}}" value="{{attr.value}}" data-dtype="number"/> | ||||
|                   {{else}} | ||||
|                   <input class="description-value" type="text" disabled name="data.attributs.{{key}}." value="{{attr.value}}" data-dtype="number"/> | ||||
|                   <input class="description-value" type="text" disabled name="system.attributs.{{key}}." value="{{attr.value}}" data-dtype="number"/> | ||||
|                   {{/if}} | ||||
|                   <label class="carac-xp"/> | ||||
|                 </li> | ||||
| @@ -167,19 +167,19 @@ | ||||
|                 {{/each}} | ||||
|               </ul> | ||||
|               <ul class="carac-list alterne-list"> | ||||
|                 <li class="competence flexrow list-item"> | ||||
|                 <li class="caracteristique flexrow list-item"> | ||||
|                   <span class="attribut-label chance-actuelle"><a>Chance actuelle</a></span> | ||||
|                   <input class="description-value compteur-edit" type="text" name="chance" value="{{data.compteurs.chance.value}}" data-dtype="number"/> | ||||
|                   <span class="utiliser-attribut" style="padding-left: 5px"><a class="item-control chance-appel">Utiliser</a></span> | ||||
|                   <span class="utiliser-attribut" style="padding-left: 5px"><a class="chance-appel">Utiliser</a></span> | ||||
|                 </li> | ||||
|                 {{#each data.compteurs as |compteur key|}} | ||||
|                   {{#if (eq compteur.label 'Chance')}} | ||||
|                   {{else if (eq compteur.label 'Experience')}} | ||||
|                   {{else if compteur.isInput}} | ||||
|                     <li class="competence flexrow list-item"> | ||||
|                     <li class="caracteristique flexrow list-item"> | ||||
|                       <span class="attribut-label">{{compteur.label}}</span> | ||||
|                       {{#if (eq compteur.label 'Ethylisme')}} | ||||
|                       <select class="description-value" name="data.compteurs.ethylisme.value" id="ethylisme" data-dtype="Number"> | ||||
|                       <select class="description-value" name="system.compteurs.ethylisme.value" id="ethylisme" data-dtype="Number"> | ||||
|                         {{#select compteur.value}} | ||||
|                         {{>"systems/foundryvtt-reve-de-dragon/templates/niveau-ethylisme.html"}} | ||||
|                         {{/select}} | ||||
| @@ -189,9 +189,9 @@ | ||||
|                       {{/if}} | ||||
|                       <span class="utiliser-attribut" style="padding-left: 5px"> | ||||
|                         {{#if compteur.isStress}} | ||||
|                         <a class="item-control stress-test" title="Transformer">Transformer</a> | ||||
|                         <a class="stress-test" title="Transformer">Transformer</a> | ||||
|                         {{else if (eq compteur.label 'Ethylisme')}} | ||||
|                         <a class="item-control ethylisme-test" id="ethylisme-test" title="Jet d'Ethylisme">Boire</a> | ||||
|                         <a class="ethylisme-test" id="ethylisme-test" title="Jet d'Ethylisme">Boire</a> | ||||
|                         {{else if (eq compteur.label 'Moral')}} | ||||
|                         <a class="moral-malheureux" title="Jet de moral situation malheureuse"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-malheureux.svg" alt="Jet de moral situation malheureuse"/></a> | ||||
|                         <a class="moral-neutre" title="Jet de moral situation neutre"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg" alt="Jet de moral situation neutre"/></a> | ||||
| @@ -215,11 +215,9 @@ | ||||
|             <span><a class="lock-unlock-sheet"><img class="small-button-container" | ||||
|               src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"> | ||||
|               {{#if options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span> | ||||
|             <span class="flexrow"> | ||||
|               <i class="fas fa-search"></i> | ||||
|               <input class="cherchercompetence" type="text" value="{{options.cherchercompetence}}" name="cherchercompetence"  | ||||
|                 size="8" data-dtype="String" placeholder="chercher"/> | ||||
|               <span></span> | ||||
|             <span> | ||||
|               <input class="recherche flex-grow" type="text" value="{{options.recherche.text}}" name="recherche"  | ||||
|                   size="8" data-dtype="String" placeholder="chercher"/> | ||||
|             </span> | ||||
|             <span><a class="show-hide-competences"><img class="small-button-container" | ||||
|               src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.showCompNiveauBase}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer tout"> | ||||
| @@ -232,18 +230,18 @@ | ||||
|           </div> | ||||
|           <div class="grid grid-2col"> | ||||
|             <div class="flex-group-left flexcol competence-column"> | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.generale) categorie="Compétences générales"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.particuliere) categorie="Compétences Particulières"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.specialisee) categorie="Compétences Spécialisées"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.generale) categorie="Compétences générales"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.particuliere) categorie="Compétences Particulières"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.specialisee) categorie="Compétences Spécialisées"}} | ||||
|             </div> | ||||
|  | ||||
|             <div class="flex-group-left flexcol competence-column"> | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.melee) categorie="Compétences de Mêlée"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.tir) categorie="Compétences de Tir"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.lancer) categorie="Compétences de Lancer"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.connaissance) categorie="Connaissances"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.melee) categorie="Compétences de Mêlée"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.tir) categorie="Compétences de Tir"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.lancer) categorie="Compétences de Lancer"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.connaissance) categorie="Connaissances"}} | ||||
|               {{#if (or data.attributs.hautrevant.value options.vueDetaillee)}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.draconic) categorie="Draconic"}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(filtreTriCompetences competenceByCategory.draconic) categorie="Draconic"}} | ||||
|               {{/if}} | ||||
|  | ||||
|               <div> | ||||
| @@ -302,7 +300,7 @@ | ||||
|               </li> | ||||
|             {{/each}} | ||||
|             {{#each esquives as |esq key|}} | ||||
|               <li class="item flexrow list-item"> | ||||
|               <li class="item flexrow list-item" data-item-id="{{esq._id}}"> | ||||
|                 <span class="competence-label"> | ||||
|                   <a class="competence-label" name="{{esq.name}}"> | ||||
|                     <img class="sheet-competence-img" src="{{esq.img}}"/> | ||||
| @@ -311,7 +309,7 @@ | ||||
|                 </span> | ||||
|                 <span class="arme-initiative"></span> | ||||
|                 <span class="competence-label"></span> | ||||
|                 <span class="competence-value">{{numberFormat esq.data.niveau decimals=0 sign=true}}</span> | ||||
|                 <span class="competence-value">{{numberFormat esq.system.niveau decimals=0 sign=true}}</span> | ||||
|                 <span class="competence-value"></span> | ||||
|               </li> | ||||
|             {{/each}} | ||||
| @@ -334,7 +332,7 @@ | ||||
|         {{#each maladiesPoisons as |maladie key|}} | ||||
|           <li class="item flexrow list-item" data-item-id="{{maladie._id}}"> | ||||
|               <span class="competence-label"> | ||||
|                 {{#if (or @root.options.isGM maladie.data.identifie)}}  | ||||
|                 {{#if (or @root.options.isGM maladie.system.identifie)}}  | ||||
|                   {{maladie.name}} | ||||
|                 {{else}} | ||||
|                   Inconnue | ||||
| @@ -342,15 +340,15 @@ | ||||
|               </span> | ||||
|               <span class="competence-label">{{maladie.type}}</span> | ||||
|               <span class="competence-label"> | ||||
|                 {{#if (or @root.options.isGM maladie.data.remedesconnus)}}  | ||||
|                   {{maladie.data.remedes}} | ||||
|                 {{#if (or @root.options.isGM maladie.system.remedesconnus)}}  | ||||
|                   {{maladie.system.remedes}} | ||||
|                 {{else}} | ||||
|                   Remèdes Inconnus | ||||
|                 {{/if}} | ||||
|               </span> | ||||
|               <div class="item-controls"> | ||||
|                 <a class="item-control item-edit" title="Modifier"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                 <a class="item-edit" title="Modifier"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|               </div>           | ||||
|           </li> | ||||
|           {{/each}} | ||||
| @@ -372,8 +370,8 @@ | ||||
|               </span> | ||||
|               <span class="competence-label">{{possession.system.type}}</span> | ||||
|               <div class="item-controls"> | ||||
|                 <a class="item-control item-edit" title="Modifier"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                 <a class="item-edit" title="Modifier"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|               </div>           | ||||
|           </li> | ||||
|           {{/each}} | ||||
| @@ -391,8 +389,8 @@ | ||||
|                (or @root.options.isGM (not tache.system.cacher_points_de_tache)) | ||||
|             }}/{{tache.system.points_de_tache}}{{/if}})</a></span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|               <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               <a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|               <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|             </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
| @@ -421,8 +419,8 @@ | ||||
|           {{#each jeux as |jeu id|}} | ||||
|           <li class="item flexrow list-item" data-item-id="{{jeu._id}}"><span class="competence-title jeu-label"><a>{{jeu.name}} (base {{jeu.system.base}})</a></span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|               <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               <a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|               <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|             </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
| @@ -432,8 +430,8 @@ | ||||
|           {{#each recettesAlchimiques as |recette id|}} | ||||
|           <li class="item flexrow list-item" data-item-id="{{recette._id}}"><span class="competence-title recette-label item-edit"><a>{{recette.name}}</a></span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|               <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               <a class="item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|               <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|             </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
| @@ -469,7 +467,7 @@ | ||||
|                 <span>{{caseTmr-label data.reve.tmrpos.coord}}</span> | ||||
|               </span>  | ||||
|               <span> | ||||
|                 <input class="competence-value" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/> | ||||
|                 <input class="competence-value" type="text" name="system.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/> | ||||
|               </span>  | ||||
|                | ||||
|               {{else}} | ||||
| @@ -492,7 +490,7 @@ | ||||
|               <span class="competence-label">Seuil de Rêve :</span> | ||||
|               <span> | ||||
|               {{#if options.isGM}} | ||||
|                 <input class="seuil-reve-value" type="text" name="data.reve.seuil.value" value="{{data.reve.seuil.value}}" data-dtype="Number"/> | ||||
|                 <input class="seuil-reve-value" type="text" name="system.reve.seuil.value" value="{{data.reve.seuil.value}}" data-dtype="Number"/> | ||||
|               {{else}} | ||||
|                 {{data.reve.seuil.value}} | ||||
|               {{/if}} | ||||
| @@ -502,7 +500,7 @@ | ||||
|               <span class="competence-label">Refoulement : </span> | ||||
|               <span> | ||||
|               {{#if options.isGM}} | ||||
|                 <input class="competence-value" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/> | ||||
|                 <input class="competence-value" type="text" name="system.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/> | ||||
|               {{else}} | ||||
|                 {{data.reve.refoulement.value}} | ||||
|               {{/if}} | ||||
| @@ -519,7 +517,7 @@ | ||||
|           <li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}"> | ||||
|             <span class="display-label flex-grow"><a data-item-id="{{queue._id}}">{{queue.name}}</a></span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|             </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
| @@ -532,7 +530,7 @@ | ||||
|           <li class="item flexrow" data-attribute={{key}} data-item-id="{{ombre._id}}"> | ||||
|             <span class="display-label flex-grow"><a data-item-id="{{ombre._id}}">{{ombre.name}}</a></span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|             </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
| @@ -545,7 +543,7 @@ | ||||
|           <li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}"> | ||||
|             <span class="display-label flex-grow"><a data-item-id="{{souffle._id}}">{{souffle.name}}</a></span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|             </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
| @@ -558,7 +556,7 @@ | ||||
|           <li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}"> | ||||
|             <span class="display-label flex-grow"><a data-item-id="{{tete._id}}">{{tete.name}}</a></span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|             </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
| @@ -571,9 +569,9 @@ | ||||
|               {{#each signesdraconiques as |signe key|}} | ||||
|               <li class="item list-item flexrow" data-item-id="{{signe._id}}" data-attribute="{{key}}"> | ||||
|                 <span class="display-label flex-grow"> <a data-item-id="{{signe._id}}">{{signe.name}}</a></span>  | ||||
|                 <span class="flex-shrink">{{signe.data.difficulte}}</span> | ||||
|                 <span class="flex-shrink">{{signe.system.difficulte}}</span> | ||||
|                 <div class="item-controls flex-shrink"> | ||||
|                   <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                   <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                 </div> | ||||
|               </li> | ||||
|               {{/each}} | ||||
| @@ -591,7 +589,7 @@ | ||||
|                 <span>{{upperFirst rencontre.heure}}, le {{rencontre.date}}</span>  | ||||
|                 {{/if}} | ||||
|                 <div class="item-controls flex-shrink"> | ||||
|                   <a class="item-control rencontre-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                   <a class="rencontre-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                 </div> | ||||
|               </li> | ||||
|               {{/each}} | ||||
| @@ -606,7 +604,7 @@ | ||||
|                 <span class="display-label">{{reserve.sort.name}} r{{reserve.sort.system.ptreve_reel}}</span>  | ||||
|                 <span>{{reserve.coord}} - {{caseTmr-label reserve.coord}}</span>  | ||||
|                 <div class="item-controls flex-shrink"> | ||||
|                   <a class="item-control item-delete flex-shrink" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                   <a class="item-delete flex-shrink" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                 </div> | ||||
|               </li> | ||||
|               {{/each}} | ||||
| @@ -626,7 +624,7 @@ | ||||
|               </span>  | ||||
|               <span>{{sort.system.draconic}} / {{sort.system.difficulte}}</span> | ||||
|               <div class="item-controls flex-shrink"> | ||||
|                 <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                 <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|               </div> | ||||
|             </li> | ||||
|             {{/each}} | ||||
| @@ -638,8 +636,8 @@ | ||||
|             <li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}"> | ||||
|               <span class="meditation-label flex-grow"><a data-item-id="{{meditation._id}}">{{meditation.name}} - {{meditation.system.competence}}</a></span>  | ||||
|               <div class="item-controls flex-shrink"> | ||||
|                 <a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                 <a class="item-edit" title="Editer"><i class="fas fa-edit"></i></a> | ||||
|                 <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|               </div> | ||||
|             </li> | ||||
|             {{/each}} | ||||
| @@ -653,7 +651,7 @@ | ||||
|                 <span class="display-label"><a data-item-id="{{casetmr._id}}">{{casetmr.name}}</a></span> | ||||
|                 <span>{{casetmr.system.coord}} - {{caseTmr-label casetmr.system.coord}}</span>  | ||||
|                 <div class="item-controls flex-shrink"> | ||||
|                   <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                   <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|                 </div> | ||||
|               </li> | ||||
|               {{/each}} | ||||
| @@ -666,79 +664,10 @@ | ||||
|       {{!-- Equipment Tab --}} | ||||
|       <div class="tab items" data-group="primary" data-tab="items"> | ||||
|          | ||||
|         {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}} | ||||
|  | ||||
|         <span class="item-name"><h4>Equipement porté</h4></span> | ||||
|         <div> | ||||
|           <span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> -  | ||||
|           <span class="item-name">Estimation de l'équipement : {{numberFormat calc.prixTotalEquipement decimals=2}} Sols</span> | ||||
|         </div> | ||||
|         <div> | ||||
|           <span class="item-name"><a class="creer-un-objet">Créer un objet</a></span> | ||||
|           {{#if options.isGM}} | ||||
|           <span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span> | ||||
|           {{/if}} | ||||
|         </div> | ||||
|         <ul class="item-list alterne-list"> | ||||
|           <li class="competence-header flexrow"> | ||||
|             <img class="sheet-competence-img" src="{{img}}" title="Equipement"/> | ||||
|             <span class="competence-title flex-grow">Nom</span> | ||||
|             <span class="competence-title">Q.</span> | ||||
|             <span class="competence-title">Enc.</span> | ||||
|             <span class="competence-title flex-grow">Equiper/Editer/Suppr.</span> | ||||
|           </li> | ||||
|           {{#each objets as |item id|}} | ||||
|             {{#unless item.estContenu}} | ||||
|             {{#if (ne item.type 'conteneur')}} | ||||
|               {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html" item=item }} | ||||
|             {{/if}} | ||||
|             {{/unless}} | ||||
|           {{/each}} | ||||
|           {{#each conteneurs as |conteneur id|}} | ||||
|             {{buildConteneur this}} | ||||
|           {{/each}} | ||||
|         </ul> | ||||
|  | ||||
|         <span class="item-name"><h4>Compagnons animaux</h4></span> | ||||
|         <ul class="item-list alterne-list"> | ||||
|           {{#each subacteurs.montures as |monture id|}} | ||||
|           <li class="item flexrow list-item" data-actor-id="{{monture.id}}"> | ||||
|             <img class="sheet-competence-img" src="{{monture.img}}" title="{{monture.name}}"/> | ||||
|             <span class="competence-title subacteur-label"><a>{{monture.name}}</a></span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|           </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
|         </ul> | ||||
|          | ||||
|         <span class="item-name"><h4>Véhicules</h4></span> | ||||
|         <ul class="item-list alterne-list"> | ||||
|           {{#each subacteurs.vehicules as |vehicule id|}} | ||||
|           <li class="item flexrow list-item" data-actor-id="{{vehicule.id}}"> | ||||
|             <img class="sheet-competence-img" src="{{vehicule.img}}" title="{{vehicule.name}}"/> | ||||
|             <span class="competence-title subacteur-label"><a>{{vehicule.name}}</a></span> | ||||
|             <span class="competence-title">{{vehicule.categorie}}</span> | ||||
|             <span class="competence-title">{{vehicule.structure}}</span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|           </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
|         </ul> | ||||
|  | ||||
|         <span class="item-name"><h4>Suivants</h4></span> | ||||
|         <ul class="item-list alterne-list"> | ||||
|           {{#each subacteurs.suivants as |suivant id|}} | ||||
|           <li class="item flexrow list-item" data-actor-id="{{suivant.id}}"> | ||||
|             <img class="sheet-competence-img" src="{{suivant.img}}" title="{{suivant.name}}"/> | ||||
|             <span class="competence-title subacteur-label"><a>{{suivant.name}}</a></span> | ||||
|             <div class="item-controls flex-shrink"> | ||||
|               <a class="item-control subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|           </div> | ||||
|           </li> | ||||
|           {{/each}} | ||||
|         </ul> | ||||
|         {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.html"}} | ||||
|         {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-liens-animaux.html"}} | ||||
|         {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-liens-suivants.html"}} | ||||
|         {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-liens-vehicules.html"}} | ||||
|  | ||||
|       </div> | ||||
|  | ||||
| @@ -748,33 +677,33 @@ | ||||
|           <ul class="item-list alterne-list"> | ||||
|             <li class="item flexrow list-item"> | ||||
|               <label for="data.race">Race :</label> | ||||
|               <input class="flex-grow" type="text" name="data.race" value="{{data.race}}" data-dtype="String"/> | ||||
|               <input class="flex-grow" type="text" name="system.race" value="{{data.race}}" data-dtype="String"/> | ||||
|             </li> | ||||
|             <li class="item flexrow list-item"> | ||||
|               <label for="data.sexe">Sexe :</label> | ||||
|               <input class="flex-grow" type="text" name="data.sexe" value="{{data.sexe}}" data-dtype="String"/> | ||||
|               <input class="flex-grow" type="text" name="system.sexe" value="{{data.sexe}}" data-dtype="String"/> | ||||
|             </li> | ||||
|             <li class="item flexrow list-item"> | ||||
|               <label for="data.age">Age :</label> | ||||
|               <input class="flex-grow" type="text" name="data.age" value="{{data.age}}" data-dtype="String"/> | ||||
|               <input class="flex-grow" type="text" name="system.age" value="{{data.age}}" data-dtype="String"/> | ||||
|             </li> | ||||
|             <li class="item flexrow list-item"> | ||||
|               <label for="data.poids">Poids :</label> | ||||
|               <input class="flex-grow" type="text" name="data.poids" value="{{data.poids}}" data-dtype="String"/> | ||||
|               <input class="flex-grow" type="text" name="system.poids" value="{{data.poids}}" data-dtype="String"/> | ||||
|             </li> | ||||
|             <li class="item flexrow list-item"> | ||||
|               <label for="data.taille">Taille :</label> | ||||
|               <input class="flex-grow" type="text" name="data.taille" value="{{data.taille}}" data-dtype="String"/> | ||||
|               <input class="flex-grow" type="text" name="system.taille" value="{{data.taille}}" data-dtype="String"/> | ||||
|             </li> | ||||
|           </ul> | ||||
|           <ul class="item-list alterne-list"> | ||||
|             <li class="item flexrow list-item"> | ||||
|               <label for="data.main">Main directrice :</label> | ||||
|               <input type="text" name="data.main" value="{{data.main}}" data-dtype="String"/> | ||||
|               <input type="text" name="system.main" value="{{data.main}}" data-dtype="String"/> | ||||
|             </li> | ||||
|             <li class="item flexrow list-item"> | ||||
|               <label for="data.heure">Heure de naissance :</label> | ||||
|               <select type="text" name="data.heure" value="{{data.heure}}" data-dtype="String"> | ||||
|               <select type="text" name="system.heure" value="{{data.heure}}" data-dtype="String"> | ||||
|                 {{#select data.heure}} | ||||
|                 {{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}} | ||||
|                 {{/select}} | ||||
| @@ -786,11 +715,11 @@ | ||||
|             </li> | ||||
|             <li class="item flexrow list-item"> | ||||
|               <label for="data.cheveux">Cheveux :</label> | ||||
|               <input class="flex-grow" type="text" name="data.cheveux" value="{{data.cheveux}}" data-dtype="String"/> | ||||
|               <input class="flex-grow" type="text" name="system.cheveux" value="{{data.cheveux}}" data-dtype="String"/> | ||||
|             </li> | ||||
|             <li class="item flexrow list-item"> | ||||
|               <label for="data.yeux">Yeux :</label> | ||||
|               <input class="flex-grow" type="text" name="data.yeux" value="{{data.yeux}}" data-dtype="String"/> | ||||
|               <input class="flex-grow" type="text" name="system.yeux" value="{{data.yeux}}" data-dtype="String"/> | ||||
|             </li> | ||||
|           </ul> | ||||
|         </article> | ||||
|   | ||||
| @@ -25,41 +25,41 @@ | ||||
|       <div class="grid grid-2col"> | ||||
|         <div class="flex-group-left flexcol"> | ||||
|           <ol class="carac-list alterne-list"> | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="categorie">Catégorie</span> | ||||
|               <select name="data.categorie" class="categorie" data-dtype="String"> | ||||
|               <select name="system.categorie" class="categorie" data-dtype="String"> | ||||
|                 {{#select data.categorie}} | ||||
|                 {{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-vehicule.html"}} | ||||
|                 {{/select}} | ||||
|               </select> | ||||
|             </li> | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="categorie">Résistance</span> | ||||
|               <input class="competence-value flexrow" type="text" name="data.resistance" value="{{data.resistance}}" data-dtype="Number" /> | ||||
|               <input class="competence-value flexrow" type="text" name="system.resistance" value="{{data.resistance}}" data-dtype="Number" /> | ||||
|             </li> | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="categorie">Structure</span> | ||||
|               <input class="competence-value flexrow" type="text" name="data.structure" value="{{data.structure}}" data-dtype="Number" /> | ||||
|               <input class="competence-value flexrow" type="text" name="system.structure" value="{{data.structure}}" data-dtype="Number" /> | ||||
|             </li> | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="categorie">Vitesse</span> | ||||
|               <input class="competence-value flexrow" type="text" name="data.vitesse" value="{{data.vitesse}}" data-dtype="String" /> | ||||
|               <input class="competence-value flexrow" type="text" name="system.vitesse" value="{{data.vitesse}}" data-dtype="String" /> | ||||
|             </li> | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="categorie">Bonus</span> | ||||
|               <input class="competence-value flexrow" type="text" name="data.bonus" value="{{data.bonus}}" data-dtype="String" /> | ||||
|               <input class="competence-value flexrow" type="text" name="system.bonus" value="{{data.bonus}}" data-dtype="String" /> | ||||
|             </li> | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="categorie">Manoeuvrabilité</span> | ||||
|               <input class="competence-value flexrow" type="text" name="data.manoeuvrabilite" value="{{data.manoeuvrabilite}}" data-dtype="String" /> | ||||
|               <input class="competence-value flexrow" type="text" name="system.manoeuvrabilite" value="{{data.manoeuvrabilite}}" data-dtype="String" /> | ||||
|             </li> | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="categorie">Equipage</span> | ||||
|               <input class="competence-value flexrow" type="text" name="data.equipage" value="{{data.equipage}}" data-dtype="Number" /> | ||||
|               <input class="competence-value flexrow" type="text" name="system.equipage" value="{{data.equipage}}" data-dtype="Number" /> | ||||
|             </li> | ||||
|             <li class="competence flexrow list-item" data-attribute="{{key}}"> | ||||
|             <li class="caracteristique flexrow list-item" data-attribute="{{key}}"> | ||||
|               <span class="carac-label flexrow" name="categorie">Capacité d'Encombrement</span> | ||||
|               <input class="competence-value flexrow" type="text" name="data.capacite_encombrement" value="{{data.capacite_encombrement}}" data-dtype="Number" /> | ||||
|               <input class="competence-value flexrow" type="text" name="system.capacite_encombrement" value="{{data.capacite_encombrement}}" data-dtype="Number" /> | ||||
|             </li> | ||||
|           </ol> | ||||
|         </div> | ||||
| @@ -69,47 +69,9 @@ | ||||
|     {{!-- Equipment Tab --}} | ||||
|     <div class="tab items" data-group="primary" data-tab="items"> | ||||
|  | ||||
|       {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-monnaie.html" monnaie=monnaie}} | ||||
|  | ||||
|       <span class="item-name"><h4>Equipement chargé</h4></span> | ||||
|  | ||||
|       <span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.capacite_encombrement}} <b>{{calc.surEncombrementMessage}}</b></span> -  | ||||
|       <span class="item-name"><a class="creer-un-objet">Créer un objet</a></span> | ||||
|       {{#if options.isGM}} | ||||
|       <span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span> | ||||
|       {{/if}} | ||||
|       <ul class="item-list alterne-list"> | ||||
|         <li class="competence-header flexrow"> | ||||
|           <img class="sheet-competence-img" src="{{img}}" title="Equipement"/> | ||||
|           <span class="competence-title competence-label flex-grow">Nom</span> | ||||
|           <span class="competence-title competence-label">Q.</span> | ||||
|           <span class="competence-title competence-value">Enc.</span> | ||||
|           <span class="competence-title competence-value">Equiper/Editer/Suppr.</span> | ||||
|         </li> | ||||
|         {{#each objets as |item id|}} | ||||
|           {{#unless item.estContenu}} | ||||
|           {{#if (ne item.type 'conteneur')}} | ||||
|           <li class="item flexrow list-item" data-item-id="{{item._id}}"> | ||||
|               <img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/> | ||||
|               <span class="item-name flex-grow">{{item.name}}</span> | ||||
|               <span class="item-quantite">{{item.data.quantite}}</span> | ||||
|               <span class="item-quantite">{{numberFormat item.data.encTotal decimals=2}}</span> | ||||
|               <div class="item-controls"> | ||||
|                   <a class="item-control item-equip" title="Equiper">{{#if item.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a> | ||||
|                   <a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a> | ||||
|                   <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> | ||||
|               </div> | ||||
|           </li> | ||||
|           {{/if}} | ||||
|           {{/unless}} | ||||
|           {{/each}} | ||||
|           {{#each conteneurs as |conteneur id|}} | ||||
|           {{buildConteneur this}} | ||||
|           {{/each}} | ||||
|         </ul> | ||||
|       </div> | ||||
|  | ||||
|       {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.html"}} | ||||
|        | ||||
|  | ||||
|     {{!-- Biography Tab --}} | ||||
|     <div class="tab description" data-group="primary" data-tab="description"> | ||||
|       <div class="form-group editor"> | ||||
|   | ||||
							
								
								
									
										16
									
								
								templates/chat-command-nom.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								templates/chat-command-nom.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
|  | ||||
| <h4>Proposition de nom: {{nom}}</h4> | ||||
| <span class="chat-card-button-area"> | ||||
|   <a class="button-creer-acteur chat-card-button" | ||||
|     data-nom='{{nom}}' | ||||
|     data-type='personnage' | ||||
|     > | ||||
|   Créer un Personnage</a> | ||||
| </span> | ||||
| <span class="chat-card-button-area"> | ||||
|   <a class="button-creer-acteur chat-card-button" | ||||
|     data-nom='{{nom}}' | ||||
|     data-type='creature'> | ||||
|   Créer une créature</a> | ||||
| </span> | ||||
|  | ||||
| @@ -26,7 +26,7 @@ | ||||
|             <br> | ||||
|             {{/if}} | ||||
|             {{#if (eq defender.type 'personnage')}} | ||||
|             {{#if (gt defender.data.compteurs.destinee.value 0)}} | ||||
|             {{#if (gt defender.system.compteurs.destinee.value 0)}} | ||||
|               <a class='chat-card-button' id='appel-destinee-defense' data-attackerId='{{attackerId}}' | ||||
|                 data-defenderTokenId='{{defenderTokenId}}'>Utiliser la destinée</a> | ||||
|               </a> | ||||
| @@ -38,14 +38,14 @@ | ||||
|           {{#each armes as |arme key|}} | ||||
|             <a class='chat-card-button' id='parer-button' data-attackerId='{{../attackerId}}' data-defenderTokenId='{{../defenderTokenId}}' | ||||
|                 data-armeid='{{arme._id}}'> | ||||
|               Parer avec {{arme.name}} à {{../diffLibre }}{{#if arme.data.nbUsage}} (Utilisations : {{arme.data.nbUsage}}){{/if}} | ||||
|               Parer avec {{arme.name}} à {{../diffLibre }}{{#if arme.system.nbUsage}} (Utilisations : {{arme.system.nbUsage}}){{/if}} | ||||
|             </a> | ||||
|             <br> | ||||
|           {{/each}} | ||||
|           {{#if mainsNues}} | ||||
|             <a class='chat-card-button' id='parer-button' data-attackerId='{{attackerId}}' data-defenderTokenId='{{defenderTokenId}}' | ||||
|                 data-armeid='{{arme._id}}' data-competence='{{arme.data.competence}}'> | ||||
|               Parer à mains nues à {{diffLibre}}{{#if arme.data.nbUsage}} (Utilisations : {{arme.data.nbUsage}}){{/if}} | ||||
|                 data-armeid='{{arme._id}}' data-competence='{{arme.system.competence}}'> | ||||
|               Parer à mains nues à {{diffLibre}}{{#if arme.system.nbUsage}} (Utilisations : {{arme.system.nbUsage}}){{/if}} | ||||
|             </a> | ||||
|             <br> | ||||
|           {{/if}} | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  | ||||
|   {{alias}} tente d'interpréter {{oeuvre.name}} (niveau {{oeuvre.system.niveau}}) | ||||
| </h4> | ||||
| <br>{{upperFirst oeuvre.data.default_carac}} / {{oeuvre.data.competence}} | ||||
| <br>{{upperFirst oeuvre.system.default_carac}} / {{oeuvre.system.competence}} | ||||
| {{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}} | ||||
| <hr> | ||||
| <div> | ||||
|   | ||||
| @@ -17,16 +17,22 @@ | ||||
|         <a class='defense-possession chat-card-button' | ||||
|             data-attackerId='{{attacker.id}}' | ||||
|             data-defenderId='{{defender.id}}' | ||||
|             data-possessionId='{{possession.system.possessionid}}'>Résister à la possession</a> | ||||
|             data-possessionId='{{possession.system.possessionid}}'> | ||||
|             {{#if isECNIDefender}} | ||||
|             Résister à la conjuration | ||||
|             {{else}} | ||||
|             Résister à la possession | ||||
|             {{/if}} | ||||
|         </a> | ||||
|       {{else}} | ||||
|         La Tentative de Possession a échouée ! | ||||
|         La Tentative de {{#if isECNIDefender}}conjuration{{else}}possession{{/if}} a échoué ! | ||||
|       {{/if}} | ||||
|     {{else}} | ||||
|       {{#if rolled.isSuccess}} | ||||
|         La Tentative de Possession a été conjurée ! {{defender.name}} résiste à la tentative de possession. | ||||
|       {{else}} | ||||
|         La Tentative de Possession n'a pas pu être conjurée ! | ||||
|         La tentative de {{#if isECNIDefender}}conjuration a été repoussée{{else}}possession a été conjurée{{/if}}! | ||||
|         {{defender.name}} a résisté. | ||||
|         {{else}} | ||||
|         La tentative de {{#if isECNIDefender}}conjuration a réussi{{else}}possession n'a pas pu être conjurée{{/if}}! | ||||
|       {{/if}} | ||||
|     {{/if}} | ||||
|     <br>Points de Possession: {{possession.ptsPossession}} | ||||
|   | ||||
| @@ -6,7 +6,7 @@ | ||||
| <hr> | ||||
| <span> | ||||
|   <img class="chat-icon" src="{{platCuisine.img}}" alt="{{platCuisine.name}}" /> | ||||
|   <br>{{alias}} a préparé {{platCuisine.data.quantite}} portions de {{platCuisine.name}} | ||||
|   <br>{{alias}} a préparé {{platCuisine.system.quantite}} portions de {{platCuisine.name}} | ||||
|   {{~#if ajouterEquipement}}, qui ont été ajoutées à son équipement{{/if}}. | ||||
|   {{#if rolled.isSuccess}} | ||||
|   Il a réussi la recette, pour un plat de qualité {{qualiteFinale}} | ||||
|   | ||||
| @@ -15,7 +15,7 @@ | ||||
|   {{alias}} ne parvient pas à vaincre le Rêve de Dragon, et prend un violent coup de queue. | ||||
|   Il subit {{#if rolled.isETotal}}deux queues{{else}}une queue{{/if}} de dragon! | ||||
|   {{#each queues as | queue key|}} | ||||
|   <br>{{queue.name}}: {{{queue.data.description}}} | ||||
|   <br>{{queue.name}}: {{{queue.system.description}}} | ||||
|   {{/each}} | ||||
| {{/if}} | ||||
| </span> | ||||
|   | ||||
| @@ -1,10 +1,10 @@ | ||||
| <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" /> | ||||
| <h4> | ||||
|   {{alias}} {{#if isSortReserve}}met en réserve{{else}}lance{{/if}} | ||||
|   le {{#if selectedSort.data.isrituel}}rituel{{else}}sort{{/if}} | ||||
|   le {{#if selectedSort.system.isrituel}}rituel{{else}}sort{{/if}} | ||||
|   {{selectedSort.name}} | ||||
| </h4> | ||||
| <div>Pour {{selectedSort.data.ptreve_reel}} point{{~#if (gt selectedSort.data.ptreve_reel 1)}}s{{/if}} de rêve en {{tmr.label}} ({{tmr.coord}}). | ||||
| <div>Pour {{selectedSort.system.ptreve_reel}} point{{~#if (gt selectedSort.system.ptreve_reel 1)}}s{{/if}} de rêve en {{tmr.label}} ({{tmr.coord}}). | ||||
| {{#if show.reveInsuffisant}} | ||||
| <span>Pas assez de rêve!</span> | ||||
| {{/if}} | ||||
|   | ||||
| @@ -3,5 +3,5 @@ | ||||
| </h4> | ||||
| <p>Pour le lire ce signe draconique, {{alias}} doit se rendre dans les | ||||
|   Terres Médianes du Rêve et trouvez une case de résonnance. | ||||
|   {{#if signe.data.ephemere}}C'est un signe éphémère, qui ne restera présent que pour {{signe.data.duree}}{{/if}} | ||||
|   {{#if signe.system.ephemere}}C'est un signe éphémère, qui ne restera présent que pour {{signe.system.duree}}{{/if}} | ||||
| </p> | ||||
|   | ||||
| @@ -8,27 +8,27 @@ | ||||
|     </h4> | ||||
|   </div> | ||||
|   <div class="form-group"> | ||||
|     <label for="signe.data.difficulte">Difficulte</label> | ||||
|     <input type="number" name="signe.data.difficulte" value="{{signe.data.difficulte}}" data-dtype="Number" /> | ||||
|     <label for="signe.system.difficulte">Difficulte</label> | ||||
|     <input type="number" name="signe.system.difficulte" value="{{signe.system.difficulte}}" data-dtype="Number" /> | ||||
|   </div> | ||||
|   <div class="form-group"> | ||||
|     <label for="signe.data.valeur.norm">Expérience en sorts</label> | ||||
|     <label for="signe.system.valeur.norm">Expérience en sorts</label> | ||||
|     <div class="flexrow"> | ||||
|       <input class="signe-xp-sort" type="number" name="signe.data.valeur.norm" data-typereussite="norm" | ||||
|         value="{{signe.data.valeur.norm}}" min="1" max="100" data-dtype="Number" /> | ||||
|       <input class="signe-xp-sort" type="number" name="signe.system.valeur.norm" data-typereussite="norm" | ||||
|         value="{{signe.system.valeur.norm}}" min="1" max="100" data-dtype="Number" /> | ||||
|       <span>Sign.</span> | ||||
|       <input class="signe-xp-sort" type="number" name="signe.data.valeur.sign" data-typereussite="sign" | ||||
|         value="{{signe.data.valeur.sign}}" min="1" max="100" data-dtype="Number" /> | ||||
|       <input class="signe-xp-sort" type="number" name="signe.system.valeur.sign" data-typereussite="sign" | ||||
|         value="{{signe.system.valeur.sign}}" min="1" max="100" data-dtype="Number" /> | ||||
|       <span>Part.</span> | ||||
|       <input class="signe-xp-sort" type="number" name="signe.data.valeur.part" data-typereussite="part" | ||||
|         value="{{signe.data.valeur.part}}" min="1" max="100" data-dtype="Number" /> | ||||
|       <input class="signe-xp-sort" type="number" name="signe.system.valeur.part" data-typereussite="part" | ||||
|         value="{{signe.system.valeur.part}}" min="1" max="100" data-dtype="Number" /> | ||||
|     </div> | ||||
|   </div> | ||||
|   <div class="form-group flexrow"> | ||||
|       <label for="signe.data.ephemere">Ephémère</label> | ||||
|       <input class="flex-shrink" type="checkbox" name="signe.data.ephemere" {{#if signe.data.ephemere}}checked{{/if}} /> | ||||
|       <label for="signe.system.ephemere">Ephémère</label> | ||||
|       <input class="flex-shrink" type="checkbox" name="signe.system.ephemere" {{#if signe.system.ephemere}}checked{{/if}} /> | ||||
|       <span> | ||||
|         <input type="text" name="signe.data.duree" value="{{signe.data.duree}}" data-dtype="String" /> | ||||
|         <input type="text" name="signe.system.duree" value="{{signe.system.duree}}" data-dtype="String" /> | ||||
|       </span> | ||||
|   </div> | ||||
|   <div class="form-group"> | ||||
|   | ||||
| @@ -47,30 +47,30 @@ | ||||
|  | ||||
|   {{#if (eq item.type 'nourritureboisson')}} | ||||
|   <p> | ||||
|     Si vous souhaitez {{#if item.data.boisson}}boire{{else}}manger{{/if}}: | ||||
|     Si vous souhaitez {{#if item.system.boisson}}boire{{else}}manger{{/if}}: | ||||
|   </p> | ||||
|  | ||||
|   {{#if item.data.sust}} | ||||
|    <p>Cette {{#if item.data.boisson}}boisson{{else}}nourriture{{/if}} vous apportera <span | ||||
|   {{#if item.system.sust}} | ||||
|    <p>Cette {{#if item.system.boisson}}boisson{{else}}nourriture{{/if}} vous apportera <span | ||||
|        class="total-sust">{{totalSust}}</span> de sustantation.</p> | ||||
|    {{/if}} | ||||
|    {{#if item.data.boisson}} | ||||
|    <p>{{#if item.data.alcoolise}} | ||||
|      C'est une boisson alcoolisée de force {{item.data.force}}, vous effectuerez un jet d'éthylisme. | ||||
|    {{#if item.system.boisson}} | ||||
|    <p>{{#if item.system.alcoolise}} | ||||
|      C'est une boisson alcoolisée de force {{item.system.force}}, vous effectuerez un jet d'éthylisme. | ||||
|      {{/if}} | ||||
|      Cette boisson vous apportera <span class="total-desaltere">{{totalDesaltere}}</span> unités d'eau. | ||||
|    </p> | ||||
|    {{/if}} | ||||
|    {{#if (gt item.data.qualite 0)}} | ||||
|    {{#if (gt item.data.qualite cuisine.data.niveau)}} | ||||
|    <p>La qualité du plat est telle qu'un jet de Goût/Cuisine à {{numberFormat item.data.qualite decimals=0 sign=true}} | ||||
|    {{#if (gt item.system.qualite 0)}} | ||||
|    {{#if (gt item.system.qualite cuisine.system.niveau)}} | ||||
|    <p>La qualité du plat est telle qu'un jet de Goût/Cuisine à {{numberFormat item.system.qualite decimals=0 sign=true}} | ||||
|      vous permettra un jet de moral heureux.</p> | ||||
|    {{/if}} | ||||
|    {{/if}} | ||||
|     | ||||
|    {{#if (or (lt item.data.qualite 0) (lt item.data.exotisme 0))}} | ||||
|    {{#if (or (lt item.system.qualite 0) (lt item.system.exotisme 0))}} | ||||
|    <p> | ||||
|      Pour surmonter {{#if (lt item.data.qualite 0)}}le mauvais goût{{else}}l'exotisme{{/if}}, vous devez effectuer un jet de Volonté/Cuisine à {{numberFormat (min item.data.exotisme item.data.qualite) decimals=0 sign=true}}. | ||||
|      Pour surmonter {{#if (lt item.system.qualite 0)}}le mauvais goût{{else}}l'exotisme{{/if}}, vous devez effectuer un jet de Volonté/Cuisine à {{numberFormat (min item.system.exotisme item.system.qualite) decimals=0 sign=true}}. | ||||
|    <br/> | ||||
|      <input class="attribute-value se-forcer" type="checkbox" name="se-forcer" {{#if choix.seForcer}}checked{{/if}}> | ||||
|        <label for="se-forcer">En cas d'échec, voulez-vous vous forcer à manger (et subir un jet de moral en situation malheureuse)?</label> | ||||
|   | ||||
| @@ -2,31 +2,31 @@ | ||||
|   <img class="chat-icon" src="{{item.img}}" title="{{item.name}}" alt="{{item.name}}" /> | ||||
|   <h4>{{item.name}}</h4> | ||||
|   <div class="flexrow"> | ||||
|     <label class="flex-grow">Quantité à {{#if item.data.boisson}}boire{{else}}manger{{/if}}</label> | ||||
|     <label class="flex-grow">Quantité à {{#if item.system.boisson}}boire{{else}}manger{{/if}}</label> | ||||
|     <input class="attribute-value consommer-doses flex-shrink" type="number" name="doses" value="{{choix.doses}}" | ||||
|       min="0" max="{{item.data.quantite}}" data-dtype="Number" /> | ||||
|       min="0" max="{{item.system.quantite}}" data-dtype="Number" /> | ||||
|   </div> | ||||
|   {{#if item.data.sust}} | ||||
|   <p>Cette {{#if item.data.boisson}}boisson{{else}}nourriture{{/if}} vous apportera <span | ||||
|   {{#if item.system.sust}} | ||||
|   <p>Cette {{#if item.system.boisson}}boisson{{else}}nourriture{{/if}} vous apportera <span | ||||
|       class="total-sust">{{totalSust}}</span> de sustantation.</p> | ||||
|   {{/if}} | ||||
|   {{#if item.data.boisson}} | ||||
|   <p>{{#if item.data.alcoolise}} | ||||
|     C'est une boisson alcoolisée de force {{item.data.force}}, vous effectuerez un jet d'éthylisme. | ||||
|   {{#if item.system.boisson}} | ||||
|   <p>{{#if item.system.alcoolise}} | ||||
|     C'est une boisson alcoolisée de force {{item.system.force}}, vous effectuerez un jet d'éthylisme. | ||||
|     {{/if}} | ||||
|     Cette boisson vous apportera <span class="total-desaltere">{{totalDesaltere}}</span> unités d'eau. | ||||
|   </p> | ||||
|   {{/if}} | ||||
|   {{#if (gt item.data.qualite 0)}} | ||||
|   {{#if (gt item.data.qualite cuisine.data.niveau)}} | ||||
|   <p>La qualité du plat est telle qu'un jet de Goût/Cuisine à {{numberFormat item.data.qualite decimals=0 sign=true}} | ||||
|   {{#if (gt item.system.qualite 0)}} | ||||
|   {{#if (gt item.system.qualite cuisine.system.niveau)}} | ||||
|   <p>La qualité du plat est telle qu'un jet de Goût/Cuisine à {{numberFormat item.system.qualite decimals=0 sign=true}} | ||||
|     vous permettra un jet de moral heureux.</p> | ||||
|   {{/if}} | ||||
|   {{/if}} | ||||
|  | ||||
|   {{#if (or (lt item.data.qualite 0) (lt item.data.exotisme 0))}} | ||||
|   {{#if (or (lt item.system.qualite 0) (lt item.system.exotisme 0))}} | ||||
|   <p> | ||||
|     Pour surmonter {{#if (lt item.data.qualite 0)}}le mauvais goût{{else}}l'exotisme{{/if}}, vous devez effectuer un jet de Volonté/Cuisine à {{numberFormat (min item.data.exotisme item.data.qualite) decimals=0 sign=true}}. | ||||
|     Pour surmonter {{#if (lt item.system.qualite 0)}}le mauvais goût{{else}}l'exotisme{{/if}}, vous devez effectuer un jet de Volonté/Cuisine à {{numberFormat (min item.system.exotisme item.system.qualite) decimals=0 sign=true}}. | ||||
|   <br/> | ||||
|     <input class="attribute-value se-forcer" type="checkbox" name="se-forcer" {{#if choix.seForcer}}checked{{/if}}> | ||||
|       <label for="se-forcer">En cas d'échec, voulez-vous vous forcer à manger (et subir un jet de moral en situation malheureuse)?</label> | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <form class="rdddialog"> | ||||
|   <img class="chat-icon" src="{{item.img}}" title="{{item.name}}" alt="{{item.name}}" /> | ||||
|   <h4>{{item.name}}</h4> | ||||
|   <label>Quantité totale : {{item.data.quantite}}</label> | ||||
|   <label>Quantité totale : {{item.system.quantite}}</label> | ||||
|   <div class="flexrow"> | ||||
|     <label class="flex-grow">Quantité à séparer</label> | ||||
|     <input class="attribute-value choix-quantite flex-shrink" type="number" name="choix.quantite" value="{{choix.quantite}}" | ||||
|   | ||||
| @@ -6,7 +6,7 @@ | ||||
|       <div class="grid grid-2col"> | ||||
|         <label>{{alchimie.tache}}:</label><label class="flex-grow">{{alchimie.texte}}</label> | ||||
|         <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label> | ||||
|         <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label> | ||||
|         <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="flex-group-left"> | ||||
|   | ||||
| @@ -6,9 +6,9 @@ | ||||
|       <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" /> | ||||
|       <div class="grid grid-2col"> | ||||
|         <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label> | ||||
|         <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label> | ||||
|         <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> | ||||
|       </div> | ||||
|       {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}} | ||||
|       {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}} | ||||
|     </div> | ||||
|     <div class="flex-group-left"> | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffFixe.html"}} | ||||
|   | ||||
| @@ -43,9 +43,9 @@ | ||||
|       {{#if arme}} | ||||
|         {{#unless attackerRoll}} | ||||
|         <div class="flexrow"> | ||||
|           {{#if (eq arme.data.mortalite 'non-mortel')}} | ||||
|           {{#if (eq arme.system.mortalite 'non-mortel')}} | ||||
|           <label>Dégats:</label><label class="dmg-arme-actor"></label> | ||||
|           {{else if (eq arme.data.mortalite 'empoignade')}} | ||||
|           {{else if (eq arme.system.mortalite 'empoignade')}} | ||||
|           <label>Dégats:</label><label>Empoignade</label> | ||||
|           {{else}} | ||||
|           <label>Dégats:</label> | ||||
|   | ||||
| @@ -6,9 +6,9 @@ | ||||
|       <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" /> | ||||
|       <div class="grid grid-2col"> | ||||
|         <label for="carac">Caractéristique:</label>{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}} | ||||
|         <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label> | ||||
|         <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> | ||||
|       </div> | ||||
|       {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.data}} | ||||
|       {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}} | ||||
|     </div> | ||||
|     <div class="flex-group-left"> | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffFixe.html"}} | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
|       <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/> | ||||
|       <div class="grid grid-2col"> | ||||
|         <label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label> | ||||
|         <label for="draconic">{{competence.name}}:</label><label class="flex-grow" name="draconic">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label> | ||||
|         <label for="draconic">{{competence.name}}:</label><label class="flex-grow" name="draconic">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="flex-group-left"> | ||||
|   | ||||
| @@ -9,10 +9,10 @@ | ||||
|           <label>Caractéristique: </label><label>{{selectedCarac.label}}</label> | ||||
|         </div> | ||||
|         <div class="flexrow"> | ||||
|           <label>{{competence.name}}: </label><label>{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label> | ||||
|           <label>{{competence.name}}: </label><label>{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> | ||||
|         </div> | ||||
|         <div class="flexrow"> | ||||
|           <label>Exotisme: </label><label>{{oeuvre.data.exotisme}}</label> | ||||
|           <label>Exotisme: </label><label>{{oeuvre.system.exotisme}}</label> | ||||
|         </div> | ||||
|         <div class="flexrow"> | ||||
|           <label for="proportions">Proportions: </label> | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
|       <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/> | ||||
|       <div class="grid grid-2col"> | ||||
|         <label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label> | ||||
|         <label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label> | ||||
|         <label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="flex-group-left"> | ||||
|   | ||||
| @@ -24,7 +24,7 @@ | ||||
|         <select name="competence" class="roll-draconic" data-dtype="String"> | ||||
|           {{#select draconic}} | ||||
|           {{#each draconicList as |draconic key|}} | ||||
|           <option value={{key}}>{{draconic.name}} : {{numberFormat draconic.data.niveau decimals=0 sign=true}} | ||||
|           <option value={{key}}>{{draconic.name}} : {{numberFormat draconic.system.niveau decimals=0 sign=true}} | ||||
|           </option> | ||||
|           {{/each}} | ||||
|           {{/select}} | ||||
|   | ||||
| @@ -1,10 +1,10 @@ | ||||
| <form class="dialog-roll-sort"> | ||||
|   <h2>Lancer le <span class="sort-ou-rituel">{{#if sort.data.isrituel}}rituel{{else}}sort{{/if}}</span>: | ||||
|   <h2>Lancer le <span class="sort-ou-rituel">{{#if sort.system.isrituel}}rituel{{else}}sort{{/if}}</span>: | ||||
|     <select name="sort" class="roll-sort flex-grow" data-dtype="String"> | ||||
|       {{#select sort}} | ||||
|       {{#each sortList as |sort key|}} | ||||
|       <option value={{key}}>{{this.name}} - {{#if this.data.caseTMRspeciale}} {{this.data.caseTMRspeciale}} | ||||
|         {{else}}{{this.data.caseTMR}}{{/if}} / R{{this.data.difficulte}} r {{sort.data.ptreve}} ({{sort.data.draconic}}) | ||||
|       <option value={{key}}>{{this.name}} - {{#if this.system.caseTMRspeciale}} {{this.system.caseTMRspeciale}} | ||||
|         {{else}}{{this.system.caseTMR}}{{/if}} / R{{this.system.difficulte}} r {{sort.system.ptreve}} ({{sort.system.draconic}}) | ||||
|       </option> | ||||
|       {{/each}} | ||||
|       {{/select}} | ||||
| @@ -28,7 +28,7 @@ | ||||
|           {{/each}} | ||||
|           {{/select}} | ||||
|         </select> | ||||
|         <label class="div-sort-ptreve-fixe">{{selectedSort.data.ptreve}}</select> | ||||
|         <label class="div-sort-ptreve-fixe">{{selectedSort.system.ptreve}}</select> | ||||
|       </div> | ||||
|       <div class="flexrow div-sort-non-rituel"> | ||||
|         <label>Mettre en réserve</label> | ||||
| @@ -41,7 +41,7 @@ | ||||
|         <select name="competence" class="roll-draconic" data-dtype="String"> | ||||
|           {{#select draconic}} | ||||
|           {{#each draconicList as |draconic key|}} | ||||
|           <option value={{key}}>{{draconic.name}} : {{numberFormat draconic.data.niveau decimals=0 sign=true}} | ||||
|           <option value={{key}}>{{draconic.name}} : {{numberFormat draconic.system.niveau decimals=0 sign=true}} | ||||
|           </option> | ||||
|           {{/each}} | ||||
|           {{/select}} | ||||
| @@ -56,7 +56,7 @@ | ||||
|           {{/each}} | ||||
|           {{/select}} | ||||
|         </select> | ||||
|         <label class="div-sort-difficulte-fixe">{{numberFormat selectedSort.data.difficulte decimals=0 sign=true}}</label> | ||||
|         <label class="div-sort-difficulte-fixe">{{numberFormat selectedSort.system.difficulte decimals=0 sign=true}}</label> | ||||
|       </div> | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}} | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-forcer.html"}} | ||||
|   | ||||
| @@ -1,10 +1,13 @@ | ||||
| <div class="control-icon rdd-combat "> | ||||
|   <img class="rdd-hud-togglebutton" src="systems/foundryvtt-reve-de-dragon/icons/heures/hd06.svg" width="36" height="36" title="Attaque"/> | ||||
|   <div class="rdd-hud-list tokenhudext left"> | ||||
|     {{#each armes as |arme key|}} | ||||
|     {{#unless arme.data.initOnly}} | ||||
|     <div class="control-icon tokenhudicon rdd-hud-menu rdd-attaque" data-combatant-id="{{../combatant.id}}" data-arme-id="{{arme.index}}"  title="{{arme.name}}"> | ||||
|       <label>C:{{arme.name}}  {{arme.data.mainInfo}}</label> | ||||
|     {{#each actions as |action key|}} | ||||
|     {{#unless action.system.initOnly}} | ||||
|     <div class="control-icon tokenhudicon rdd-hud-menu rdd-attaque" | ||||
|         data-combatant-id="{{../combatant.id}}" | ||||
|         data-action-index="{{action.index}}" | ||||
|         title="{{action.name}}"> | ||||
|       <label>{{action.name}}  {{action.system.mainInfo}}</label> | ||||
|     </div> | ||||
|     {{/unless}} | ||||
|     {{/each}} | ||||
|   | ||||
| @@ -1,14 +1,21 @@ | ||||
| <div class="control-icon rdd-initiative "> | ||||
|   <img class="rdd-hud-togglebutton" src="icons/svg/sword.svg" width="36" height="36" title="Initiative" /> | ||||
|   <div class="rdd-hud-list tokenhudext right"> | ||||
|     {{#each armes as |arme key|}} | ||||
|     <div class="control-icon tokenhudicon rdd-hud-menu" data-command="{{arme.command}}" data-combatant-id="{{../combatant.id}}" data-arme-id="{{arme.index}}" title="{{arme.name}}"> | ||||
|       <label>I:{{arme.name}} {{arme.data.mainInfo}}</label> | ||||
|     {{#each actions as |action key|}} | ||||
|     <div class="control-icon tokenhudicon rdd-hud-menu" | ||||
|         data-combatant-id="{{../combatant.id}}" | ||||
|         data-action-index="{{action.index}}" | ||||
|         title="{{action.name}}"> | ||||
|       <label>init: {{action.name}} {{action.system.mainInfo}}</label> | ||||
|     </div> | ||||
|     {{/each}} | ||||
|     {{#each commandes as |commande key|}} | ||||
|     <div class="control-icon tokenhudicon rdd-hud-menu" data-command="{{commande.command}}" data-combatant-id="{{../combatant.id}}" data-arme-id="{{commande.index}}" title="{{commande.name}}"> | ||||
|       <label>I:{{commande.name}}</label> | ||||
|     <div class="control-icon tokenhudicon rdd-hud-menu" | ||||
|         data-command="{{commande.command}}"  | ||||
|         data-combatant-id="{{../combatant.id}}" | ||||
|         data-action-index="{{commande.index}}" | ||||
|         title="{{commande.name}}"> | ||||
|       <label>{{commande.name}}</label> | ||||
|     </div> | ||||
|     {{/each}}     | ||||
|   </div> | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
|     <section class="sheet-body"> | ||||
|       <div class="form-group"> | ||||
|         <label>Catégorie </label> | ||||
|         <select name="data.categorie" class="categorie" data-dtype="String"> | ||||
|         <select name="system.categorie" class="categorie" data-dtype="String"> | ||||
|               {{#select data.categorie}} | ||||
|               {{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-competence.html"}} | ||||
|               {{/select}} | ||||
| @@ -24,16 +24,16 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="niveau">Niveau </label> | ||||
|         <input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">XP </label> | ||||
|         <input class="attribute-value sheet-competence-xp" type="text" name="data.xp" value="{{data.xp}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value sheet-competence-xp" type="text" name="system.xp" value="{{data.xp}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="base">Niveau de base </label> | ||||
|         {{#if isGM}} | ||||
|         <select name="data.base" id="base" data-dtype="Number"> | ||||
|         <select name="system.base" id="base" data-dtype="Number"> | ||||
|                 {{#select data.base}} | ||||
|                 {{>"systems/foundryvtt-reve-de-dragon/templates/competence-base.html"}} | ||||
|                 {{/select}} | ||||
| @@ -44,7 +44,7 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="defaut_carac">Caractéristique par défaut </label> | ||||
|         <select name="data.defaut_carac" id="defaut_carac" data-dtype="String"> | ||||
|         <select name="system.defaut_carac" id="defaut_carac" data-dtype="String"> | ||||
|           {{#select data.defaut_carac}} | ||||
|           {{>"systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html"}} | ||||
|           {{/select}} | ||||
| @@ -52,17 +52,17 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="default_diffLibre">Difficulté libre par défaut</label> | ||||
|         <input class="attribute-value" type="text" name="data.default_diffLibre" value="{{data.default_diffLibre}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.default_diffLibre" value="{{data.default_diffLibre}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       {{#if (eq data.categorie 'draconic')}} | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">XP Sort </label> | ||||
|         <input class="attribute-value" type="text" name="data.xp_sort" value="{{data.xp_sort}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.xp_sort" value="{{data.xp_sort}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       {{/if}} | ||||
|       <div class="form-group"> | ||||
|         <label for="niveau_archetype">Niveau d'Archetype</label> | ||||
|         <input class="attribute-value" type="text" name="data.niveau_archetype" value="{{data.niveau_archetype}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.niveau_archetype" value="{{data.niveau_archetype}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|  | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}} | ||||
|   | ||||
| @@ -10,31 +10,31 @@ | ||||
|     <section class="sheet-body"> | ||||
|       <div class="form-group"> | ||||
|         <label for="niveau">Niveau </label> | ||||
|         <input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="niveau">Valeur de Caractéristique </label> | ||||
|         <input class="attribute-value" type="text" name="data.carac_value" value="{{data.carac_value}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.carac_value" value="{{data.carac_value}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="default_diffLibre">Difficulté libre par défaut</label> | ||||
|         <input class="attribute-value" type="text" name="data.default_diffLibre" value="{{data.default_diffLibre}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.default_diffLibre" value="{{data.default_diffLibre}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Arme ? </label> | ||||
|         <input class="attribute-value" type="checkbox" name="data.iscombat"  {{#if data.iscombat}}checked{{/if}}/> | ||||
|         <input class="attribute-value" type="checkbox" name="system.iscombat"  {{#if data.iscombat}}checked{{/if}}/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Parade ? </label> | ||||
|         <input class="attribute-value" type="checkbox" name="data.isparade"  {{#if data.isparade}}checked{{/if}}/> | ||||
|         <input class="attribute-value" type="checkbox" name="system.isparade"  {{#if data.isparade}}checked{{/if}}/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Possession ? </label> | ||||
|         <input class="attribute-value" type="checkbox" name="data.ispossession"  {{#if data.ispossession}}checked{{/if}}/> | ||||
|         <input class="attribute-value" type="checkbox" name="system.ispossession"  {{#if data.ispossession}}checked{{/if}}/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Catégorie parade </label> | ||||
|         <select name="data.categorie_parade" id="categorie_parade" data-dtype="String"> | ||||
|         <select name="system.categorie_parade" id="categorie_parade" data-dtype="String"> | ||||
|           {{#select data.categorie_parade}} | ||||
|           {{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-parade.html"}} | ||||
|           {{/select}} | ||||
| @@ -42,7 +42,7 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="niveau">Dommages (+dom), si applicable </label> | ||||
|         <input class="attribute-value" type="text" name="data.dommages" value="{{data.dommages}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.dommages" value="{{data.dommages}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|  | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}} | ||||
|   | ||||
| @@ -10,30 +10,29 @@ | ||||
|     <section class="sheet-body"> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Encombrement </label> | ||||
|         <input class="attribute-value" type="text" name="data.encombrement" value="{{data.encombrement}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Capacite (points d'Encombrement portable)</label> | ||||
|         <input class="attribute-value" type="text" name="data.capacite" value="{{data.capacite}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.capacite" value="{{data.capacite}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Qualité</label> | ||||
|         <input class="attribute-value" type="text" name="data.qualite" value="{{data.qualite}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.qualite" value="{{data.qualite}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group item-cout"> | ||||
|         <label for="xp">Prix (sols) </label> | ||||
|         <input class="attribute-value" type="text" name="data.cout" value="{{data.cout}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       {{#if isOwned}} | ||||
|       <div class="flexcol"> | ||||
|         <span><label>Contenu : </label></span> | ||||
|         <ul class="item-list alterne-list"> | ||||
|           <li class="competence-header flexrow"> | ||||
|             <img class="sheet-competence-img" src="{{img}}" title="Equipement"/> | ||||
|             <span class="competence-title flex-grow">Nom</span> | ||||
|             <span class="competence-title">Q.</span> | ||||
|             <span class="competence-title">Enc.</span> | ||||
|             <span class="competence-title flex-grow">Equiper/Editer/Suppr.</span> | ||||
|             <span class="equipement-nom">Nom</span> | ||||
|             <span class="equipement-detail">Q.</span> | ||||
|             <span class="equipement-detail">Enc.</span> | ||||
|             <span class="equipement-actions">Actions</span> | ||||
|           </li> | ||||
|            {{buildContenu this}} | ||||
|         </ul> | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
|     <section class="sheet-body"> | ||||
|       <div class="form-group"> | ||||
|         <label class="alchimie-title" for="xp">Type</label> | ||||
|         <select name="data.type" data-dtype="String"> | ||||
|         <select name="system.type" data-dtype="String"> | ||||
|           {{#select data.type}} | ||||
|           <option value="recreative">Récréative</option> | ||||
|           <option value="soliste">Soliste</option> | ||||
| @@ -19,19 +19,19 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label class="alchimie-title" for="xp">Agilité ?</label> | ||||
|         <input class="attribute-value" type="checkbox" name="data.agilite" {{#if data.agilite}}checked{{/if}}/>     | ||||
|         <input class="attribute-value" type="checkbox" name="system.agilite" {{#if data.agilite}}checked{{/if}}/>     | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|           <label class="alchimie-title" for="xp">Apparence ?</label> | ||||
|         <input class="attribute-value" type="checkbox" name="data.apparence"  {{#if data.apparence}}checked{{/if}}/>     | ||||
|         <input class="attribute-value" type="checkbox" name="system.apparence"  {{#if data.apparence}}checked{{/if}}/>     | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label class="alchimie-title" for="xp">Niveau</label> | ||||
|         <input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Référence / Auteur</label> | ||||
|         <input class="attribute-value" type="text" name="data.reference" value="{{data.reference}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.reference" value="{{data.reference}}" data-dtype="String"/> | ||||
|       </div> | ||||
|  | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}} | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
|   <section class="sheet-body"> | ||||
|     <div class="form-group"> | ||||
|       <label>Type</label> | ||||
|       <select name="data.type" id="type" data-dtype="String"> | ||||
|       <select name="system.type" id="type" data-dtype="String"> | ||||
|         {{#select data.type}} | ||||
|         {{{gemmeTypeList}}} | ||||
|         {{/select}} | ||||
| @@ -18,35 +18,35 @@ | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Taille</label> | ||||
|       <input class="attribute-value" type="text" name="data.taille" value="{{data.taille}}" data-dtype="Number" /> | ||||
|       <input class="attribute-value" type="text" name="system.taille" value="{{data.taille}}" data-dtype="Number" /> | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Pureté</label> | ||||
|       <input class="attribute-value" type="text" name="data.purete" value="{{data.purete}}" data-dtype="Number" /> | ||||
|       <input class="attribute-value" type="text" name="system.purete" value="{{data.purete}}" data-dtype="Number" /> | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Qualité</label> | ||||
|       <input class="attribute-value" type="text" name="data.qualite" value="{{data.qualite}}" data-dtype="Number" /> | ||||
|       <input class="attribute-value" type="text" name="system.qualite" value="{{data.qualite}}" data-dtype="Number" /> | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Encombrement</label> | ||||
|       <input class="attribute-value" type="text" name="data.encombrement" value="{{data.encombrement}}" data-dtype="Number" /> | ||||
|       <input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number" /> | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Quantité</label> | ||||
|       <input class="attribute-value" type="text" name="data.quantite" value="{{data.quantite}}" data-dtype="Number" /> | ||||
|       <input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" /> | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Inertie</label> | ||||
|       <input class="attribute-value" type="text" name="data.inertie" value="{{data.inertie}}" data-dtype="Number" disabled/> | ||||
|       <input class="attribute-value" type="text" name="system.inertie" value="{{data.inertie}}" data-dtype="Number" disabled/> | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Enchantabilité</label> | ||||
|       <input class="attribute-value" type="text" name="data.enchantabilite" value="{{data.enchantabilite}}" data-dtype="Number" disabled/> | ||||
|       <input class="attribute-value" type="text" name="system.enchantabilite" value="{{data.enchantabilite}}" data-dtype="Number" disabled/> | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Prix</label> | ||||
|       <input class="attribute-value" type="text" name="data.cout" value="{{data.cout}}" data-dtype="Number" disabled/> | ||||
|       <input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number" disabled/> | ||||
|     </div> | ||||
|  | ||||
|     {{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}} | ||||
|   | ||||
| @@ -16,23 +16,23 @@ | ||||
|     <div class="flexcol"> | ||||
|       <div class="form-group"> | ||||
|         <label>Niveau (si applicable)</label> | ||||
|         <input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number" /> | ||||
|         <input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number" /> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Quantité (Pépins ou Brins)</label> | ||||
|         <input class="attribute-value" type="text" name="data.quantite" value="{{data.quantite}}" data-dtype="Number" /> | ||||
|         <input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" /> | ||||
|       </div> | ||||
|       <div class="form-group item-cout"> | ||||
|         <label>Prix (sols)</label> | ||||
|         <input class="attribute-value" type="text" name="data.cout" value="{{data.cout}}" data-dtype="Number" /> | ||||
|         <input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number" /> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Milieu</label> | ||||
|         <input class="attribute-value" type="text" name="data.milieu" value="{{data.milieu}}" data-dtype="String" /> | ||||
|         <input class="attribute-value" type="text" name="system.milieu" value="{{data.milieu}}" data-dtype="String" /> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Fréquence</label> | ||||
|         <select name="data.rarete" class="rarete" data-dtype="String"> | ||||
|         <select name="system.rarete" class="rarete" data-dtype="String"> | ||||
|           {{#select data.rarete}} | ||||
|           {{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}} | ||||
|           {{/select}} | ||||
| @@ -40,7 +40,7 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Catégorie</label> | ||||
|         <select name="data.categorie" class="categorie" data-dtype="String"> | ||||
|         <select name="system.categorie" class="categorie" data-dtype="String"> | ||||
|           {{#select data.categorie}} | ||||
|           {{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-ingredient.html"}} | ||||
|           {{/select}} | ||||
|   | ||||
| @@ -11,28 +11,28 @@ | ||||
|     <div class="flexcol"> | ||||
|       <div class="form-group"> | ||||
|         <label>Niveau (si applicable) </label> | ||||
|         <input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number" /> | ||||
|         <input class="attribute-value" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number" /> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Quantité (Pépins ou Brins)</label> | ||||
|         <input class="attribute-value" type="text" name="data.quantite" value="{{data.quantite}}" data-dtype="Number" /> | ||||
|         <input class="attribute-value" type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" /> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Encombrement</label> | ||||
|         <input class="attribute-value" type="text" name="data.encombrement" value="{{data.encombrement}}" data-dtype="Number" /> | ||||
|         <input class="attribute-value" type="text" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number" /> | ||||
|       </div> | ||||
|       <div class="form-group item-cout"> | ||||
|         <label>Prix (sols)</label> | ||||
|         <input class="attribute-value" type="text" name="data.cout" value="{{data.cout}}" data-dtype="Number" /> | ||||
|         <input class="attribute-value" type="text" name="system.cout" value="{{data.cout}}" data-dtype="Number" /> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Milieu</label> | ||||
|       <input class="attribute-value" type="text" name="data.milieu" value="{{data.milieu}}" data-dtype="String" /> | ||||
|       <input class="attribute-value" type="text" name="system.milieu" value="{{data.milieu}}" data-dtype="String" /> | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Fréquence</label> | ||||
|       <select name="data.rarete" class="rarete" data-dtype="String"> | ||||
|       <select name="system.rarete" class="rarete" data-dtype="String"> | ||||
|         {{#select data.rarete}} | ||||
|         {{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}} | ||||
|         {{/select}} | ||||
| @@ -40,7 +40,7 @@ | ||||
|     </div> | ||||
|     <div class="form-group"> | ||||
|       <label>Catégorie</label> | ||||
|       <select name="data.categorie" class="categorie" data-dtype="String"> | ||||
|       <select name="system.categorie" class="categorie" data-dtype="String"> | ||||
|         {{#select data.categorie}} | ||||
|         {{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-ingredient.html"}} | ||||
|         {{/select}} | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
|     <section class="sheet-body"> | ||||
|       <div class="form-group"> | ||||
|         <label class="alchimie-title" for="xp">Type</label> | ||||
|         <select name="data.type" data-dtype="String"> | ||||
|         <select name="system.type" data-dtype="String"> | ||||
|           {{#select data.type}} | ||||
|           <option value="adressehasard">Adresse/Hasard</option> | ||||
|           <option value="de">Dés</option> | ||||
| @@ -21,15 +21,15 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label class="alchimie-title" for="xp">Base</label> | ||||
|         <input class="attribute-value" type="text" name="data.base" value="{{data.base}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.base" value="{{data.base}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label class="alchimie-title" for="xp">Caractéristique/Compétence</label> | ||||
|         <input class="attribute-value" type="text" name="data.caraccomp" value="{{data.caraccomp}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.caraccomp" value="{{data.caraccomp}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Référence / Auteur</label> | ||||
|         <input class="attribute-value" type="text" name="data.reference" value="{{data.reference}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.reference" value="{{data.reference}}" data-dtype="String"/> | ||||
|       </div> | ||||
|  | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}} | ||||
|   | ||||
| @@ -15,11 +15,11 @@ | ||||
|     <section class="sheet-body"> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Auteur</label> | ||||
|         <input class="attribute-value" type="text" name="data.auteur" value="{{data.auteur}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.auteur" value="{{data.auteur}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Compétence</label> | ||||
|         <select name="data.competence" id="competenceselect" data-dtype="String"> | ||||
|         <select name="system.competence" id="competenceselect" data-dtype="String"> | ||||
|           {{#select data.competence}} | ||||
|           {{#each competences as |competence key|}} | ||||
|           <option value="{{competence.name}}">{{competence.name}}</option> | ||||
| @@ -29,35 +29,35 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Difficulté</label> | ||||
|         <input class="attribute-value" type="number" name="data.difficulte" value="{{data.difficulte}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="number" name="system.difficulte" value="{{data.difficulte}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Points de tâches</label> | ||||
|         <input class="attribute-value" type="number" name="data.points_de_tache" value="{{data.points_de_tache}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="number" name="system.points_de_tache" value="{{data.points_de_tache}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Expérience</label> | ||||
|         <input class="attribute-value" type="number" name="data.xp" value="{{data.xp}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="number" name="system.xp" value="{{data.xp}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Niveau minimum</label> | ||||
|         <input class="attribute-value" type="text" name="data.niveau_minimum" value="{{data.niveau_minimum}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.niveau_minimum" value="{{data.niveau_minimum}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Niveau maximum</label> | ||||
|         <input class="attribute-value" type="text" name="data.niveau_maximum" value="{{data.niveau_maximum}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.niveau_maximum" value="{{data.niveau_maximum}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Encombrement </label> | ||||
|         <input class="attribute-value" type="number" name="data.encombrement" value="{{data.encombrement}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="number" name="system.encombrement" value="{{data.encombrement}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label>Quantité </label> | ||||
|         <input class="attribute-value" type="number" name="data.quantite" value="{{data.quantite}}" data-dtype="Number" /> | ||||
|         <input class="attribute-value" type="number" name="system.quantite" value="{{data.quantite}}" data-dtype="Number" /> | ||||
|       </div> | ||||
|       <div class="form-group item-cout"> | ||||
|         <label for="xp">Prix (sols) </label> | ||||
|         <input class="attribute-value" type="number" name="data.cout" value="{{data.cout}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="number" name="system.cout" value="{{data.cout}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|  | ||||
|       {{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}} | ||||
|   | ||||
| @@ -15,28 +15,28 @@ | ||||
|       {{#if (or isGM data.identifie)}} | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Identifiée ? </label> | ||||
|         <input class="attribute-value" type="checkbox" name="data.identifie"  {{#if data.identifie}}checked{{/if}}/> | ||||
|         <input class="attribute-value" type="checkbox" name="system.identifie"  {{#if data.identifie}}checked{{/if}}/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Malignité </label> | ||||
|         <input class="attribute-value" type="text" name="data.malignite" value="{{data.malignite}}" data-dtype="Number"/> | ||||
|         <input class="attribute-value" type="text" name="system.malignite" value="{{data.malignite}}" data-dtype="Number"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Périodicité</label> | ||||
|         <input class="attribute-value" type="text" name="data.periodicite" value="{{data.periodicite}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.periodicite" value="{{data.periodicite}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Dommages</label> | ||||
|         <input class="attribute-value" type="text" name="data.dommages" value="{{data.dommages}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.dommages" value="{{data.dommages}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Remedes Connus ? </label> | ||||
|         <input class="attribute-value" type="checkbox" name="data.remedesconnus"  {{#if data.remedesconnus}}checked{{/if}}/> | ||||
|         <input class="attribute-value" type="checkbox" name="system.remedesconnus"  {{#if data.remedesconnus}}checked{{/if}}/> | ||||
|       </div> | ||||
|       {{#if (or isGM data.remedesconnus)}} | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Remèdes </label> | ||||
|         <input class="attribute-value" type="text" name="data.remedes" value="{{data.remedes}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.remedes" value="{{data.remedes}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       {{/if}} | ||||
|       {{/if}} | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
|     <section class="sheet-body"> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Compétence</label> | ||||
|         <select name="data.competence" id="competenceselect" data-dtype="String"> | ||||
|         <select name="system.competence" id="competenceselect" data-dtype="String"> | ||||
|           {{#select data.competence}} | ||||
|           {{#each competences as |competence key|}} | ||||
|           <option value="{{competence.name}}">{{competence.name}}</option> | ||||
| @@ -20,15 +20,15 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Thème</label> | ||||
|         <input class="attribute-value" type="text" name="data.theme" value="{{data.theme}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.theme" value="{{data.theme}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Support</label> | ||||
|         <input class="attribute-value" type="text" name="data.support" value="{{data.support}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.support" value="{{data.support}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Heure</label> | ||||
|         <select name="data.heure" id="heure" data-dtype="String"> | ||||
|         <select name="system.heure" id="heure" data-dtype="String"> | ||||
|           {{#select data.heure}} | ||||
|           {{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}} | ||||
|           {{/select}} | ||||
| @@ -36,19 +36,19 @@ | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Purification</label> | ||||
|         <input class="attribute-value" type="text" name="data.purification" value="{{data.purification}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.purification" value="{{data.purification}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Vêture</label> | ||||
|         <input class="attribute-value" type="text" name="data.veture" value="{{data.veture}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.veture" value="{{data.veture}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Comportement</label> | ||||
|         <input class="attribute-value" type="text" name="data.comportement" value="{{data.comportement}}" data-dtype="String"/> | ||||
|         <input class="attribute-value" type="text" name="system.comportement" value="{{data.comportement}}" data-dtype="String"/> | ||||
|       </div> | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Case TMR</label> | ||||
|         <select name="data.tmr" id="tmr" data-dtype="String"> | ||||
|         <select name="system.tmr" id="tmr" data-dtype="String"> | ||||
|           {{#select data.tmr}} | ||||
|           {{>"systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html"}} | ||||
|           {{/select}} | ||||
| @@ -57,7 +57,7 @@ | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Malus</label> | ||||
|         {{#if isGM}} | ||||
|         <select name="data.malus" id="malus" data-dtype="Number"> | ||||
|         <select name="system.malus" id="malus" data-dtype="Number"> | ||||
|           {{#select data.malus}} | ||||
|           <option value="0">0</option> | ||||
|           <option value="-1">-1</option> | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
|   <section class="sheet-body"> | ||||
|     <div class="form-group"> | ||||
|       <label for="xp">Actif ? </label> | ||||
|       <input class="attribute-value" type="checkbox" name="datsystema.active"  {{#if data.active}}checked{{/if}}/> | ||||
|       <input class="attribute-value" type="checkbox" name="system.active"  {{#if data.active}}checked{{/if}}/> | ||||
|     </div> | ||||
|     {{#if (or isGM data.identifie)}} | ||||
|     <div class="form-group"> | ||||
|   | ||||
| @@ -18,7 +18,7 @@ | ||||
|       </div>       | ||||
|       <div class="form-group"> | ||||
|         <label for="xp">Case TMR </label> | ||||
|         <select name="data.caseTMR" id="caseTMR" data-dtype="String"> | ||||
|         <select name="system.caseTMR" id="caseTMR" data-dtype="String"> | ||||
|           {{#select data.caseTMR}} | ||||
|           {{>"systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html"}} | ||||
|           <option value="special">Case spéciale TMR (saisie ci-dessous)</option> | ||||
|   | ||||
| @@ -1,10 +1,10 @@ | ||||
| <div class="flex-group-left details-sort"> | ||||
|   {{#if sort.data.cible}}<label><strong>Cible</strong>: {{sort.data.cible}}  </label>{{/if}} | ||||
|   {{#if sort.data.JR}}<label><strong>JR</strong>: {{sort.data.JR}}  </label>{{/if}} | ||||
|   {{#if sort.data.portee}}<label><strong>Portée</strong>: {{sort.data.portée}}  </label>{{/if}} | ||||
|   {{#if sort.data.duree}}<label><strong>Durée</strong>: {{sort.data.duree}}  </label>{{/if}} | ||||
|   {{#if sort.data.coutseuil}}<label><strong>Coût de seuil</strong>: {{sort.data.coutseuil}}</label>{{/if}} | ||||
|   {{#if sort.system.cible}}<label><strong>Cible</strong>: {{sort.system.cible}}  </label>{{/if}} | ||||
|   {{#if sort.system.JR}}<label><strong>JR</strong>: {{sort.system.JR}}  </label>{{/if}} | ||||
|   {{#if sort.system.portee}}<label><strong>Portée</strong>: {{sort.system.portee}}  </label>{{/if}} | ||||
|   {{#if sort.system.duree}}<label><strong>Durée</strong>: {{sort.system.duree}}  </label>{{/if}} | ||||
|   {{#if sort.system.coutseuil}}<label><strong>Coût de seuil</strong>: {{sort.system.coutseuil}}</label>{{/if}} | ||||
| </div> | ||||
| <div class="details-sort"> | ||||
|   {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" sort.data}} | ||||
|   {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" sort.system}} | ||||
| </div> | ||||
		Reference in New Issue
	
	Block a user