Sync WIP
| @@ -18,3 +18,8 @@ gulp.task('css', function () { | ||||
|     .pipe(postcss(processors)) | ||||
|     .pipe(gulp.dest('./styles')); | ||||
| }); | ||||
|  | ||||
|  | ||||
| function watchUpdates() { | ||||
|   gulp.watch('./postcss/*.css', css); | ||||
| } | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								images/assets/ecryme_city.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 434 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/assets/ecryme_extract_panel_01.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 129 KiB | 
| @@ -1,6 +1,5 @@ | ||||
| [Dolphin] | ||||
| SortRole=modificationtime | ||||
| Timestamp=2023,2,26,15,32,34.892 | ||||
| Timestamp=2023,5,10,17,7,42.817 | ||||
| Version=4 | ||||
| ViewMode=1 | ||||
| VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails | ||||
|   | ||||
| Before Width: | Height: | Size: 43 KiB | 
| Before Width: | Height: | Size: 47 KiB | 
| Before Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 42 KiB | 
| Before Width: | Height: | Size: 44 KiB | 
| Before Width: | Height: | Size: 45 KiB | 
| Before Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 47 KiB | 
| Before Width: | Height: | Size: 43 KiB | 
| Before Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 45 KiB | 
| Before Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 45 KiB | 
| Before Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 59 KiB | 
| Before Width: | Height: | Size: 58 KiB | 
| Before Width: | Height: | Size: 31 KiB | 
| Before Width: | Height: | Size: 31 KiB | 
| Before Width: | Height: | Size: 29 KiB | 
| Before Width: | Height: | Size: 22 KiB | 
| Before Width: | Height: | Size: 29 KiB | 
| Before Width: | Height: | Size: 28 KiB | 
| Before Width: | Height: | Size: 44 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/icon_annency.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 32 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/icon_boheme.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 19 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/icon_contact.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 7.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/icon_equipment.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 30 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/icon_skill.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 75 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/icon_spec.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 140 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/icon_trait.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 6.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/icon_weapon.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 34 KiB | 
| Before Width: | Height: | Size: 42 KiB | 
| Before Width: | Height: | Size: 21 KiB | 
| Before Width: | Height: | Size: 41 KiB | 
| Before Width: | Height: | Size: 40 KiB | 
| Before Width: | Height: | Size: 31 KiB | 
| Before Width: | Height: | Size: 30 KiB | 
| Before Width: | Height: | Size: 42 KiB | 
| Before Width: | Height: | Size: 37 KiB | 
| Before Width: | Height: | Size: 38 KiB | 
| Before Width: | Height: | Size: 40 KiB | 
| Before Width: | Height: | Size: 40 KiB | 
| Before Width: | Height: | Size: 49 KiB | 
							
								
								
									
										36
									
								
								lang/en.json
									
									
									
									
									
								
							
							
						
						| @@ -8,6 +8,20 @@ | ||||
|     "TypeEquipment": "Equipment" | ||||
|   }, | ||||
|   "ECRY": { | ||||
|     "chat": { | ||||
|       "formula": "Formula", | ||||
|       "difficulty": "Difficulty", | ||||
|       "dicesum": "Dices result", | ||||
|       "result": "Result", | ||||
|       "margin": "Margin", | ||||
|       "success": "Success!", | ||||
|       "failure": "Failed!", | ||||
|       "specialization": "Specialization", | ||||
|       "traitbonus": "Bonus trait", | ||||
|       "traitmalus": "Malus trait", | ||||
|       "bonusmalustraits": "Traits Bonus/Malus", | ||||
|       "spectranscend": "Self-Transcend : " | ||||
|     }, | ||||
|     "ui": { | ||||
|       "traitType": "Trait type", | ||||
|       "niveauTrait": "Trait level", | ||||
| @@ -44,7 +58,27 @@ | ||||
|       "loquacity": "Loquacity", | ||||
|       "guile": "Guile", | ||||
|       "performance" :"Performance", | ||||
|       "skill": "Skill" | ||||
|       "skill": "Skill", | ||||
|       "troublesome": "Troublesome", | ||||
|       "occasional": "Occasional", | ||||
|       "difficult": "Difficult", | ||||
|       "uncommon": "Uncommon", | ||||
|       "verydifficult": "Very Difficult", | ||||
|       "rare": "Rare", | ||||
|       "extremdifficult": "Extremely difficult", | ||||
|       "veryrare": "Very rare", | ||||
|       "increddifficult": "Incredibly difficult", | ||||
|       "exceptrare": "Exceptionally rare", | ||||
|       "none": "None", | ||||
|       "roll": "Roll !", | ||||
|       "cancel": "Cancel", | ||||
|       "rolltitle": "Test roll", | ||||
|       "spec": "Specialization", | ||||
|       "traitbonus": "Bonus traits", | ||||
|       "traitmalus": "Malus traits", | ||||
|       "applyideal": "Apply ideal", | ||||
|       "applyspleen": "Apply spleen", | ||||
|       "skilltranscendence": "Self Transcendence" | ||||
|     } | ||||
|   } | ||||
| } | ||||
							
								
								
									
										36
									
								
								lang/fr.json
									
									
									
									
									
								
							
							
						
						| @@ -8,6 +8,20 @@ | ||||
|     "TypeEquipment": "Equipment" | ||||
|   }, | ||||
|   "ECRY": { | ||||
|     "chat": { | ||||
|       "formula": "Formule", | ||||
|       "difficulty": "Difficulté", | ||||
|       "dicesum": "Dés", | ||||
|       "result": "Resultat", | ||||
|       "margin": "Marge", | ||||
|       "success": "Succés!", | ||||
|       "failure": "Echec!", | ||||
|       "specialization": "Spécialisation", | ||||
|       "traitbonus": "Trait bonus", | ||||
|       "traitmalus": "Trait malus", | ||||
|       "bonusmalustraits": "Bonus/Malus des Traits", | ||||
|       "spectranscend": "Dépassement de soi : " | ||||
|     }, | ||||
|     "ui": { | ||||
|       "traitType": "Type de trait", | ||||
|       "niveauTrait": "Niveau du trait", | ||||
| @@ -44,7 +58,27 @@ | ||||
|       "loquacity": "Faconde", | ||||
|       "guile": "Maraude", | ||||
|       "performance" :"Représentation", | ||||
|       "skill": "Compétence" | ||||
|       "skill": "Compétence", | ||||
|       "troublesome": "Malaisé", | ||||
|       "occasional": "Peu frequent", | ||||
|       "difficult": "Difficile", | ||||
|       "uncommon": "Atypique", | ||||
|       "verydifficult": "Très difficile", | ||||
|       "rare": "Rare", | ||||
|       "extremdifficult": "Extrêmement difficile", | ||||
|       "veryrare": "Très rare", | ||||
|       "increddifficult": "Incroyable", | ||||
|       "exceptrare": "Exceptionnel", | ||||
|       "none": "Aucun", | ||||
|       "roll": "Lancer les dés !", | ||||
|       "cancel": "Annuler", | ||||
|       "rolltitle": "Ou l'on teste ses compétences", | ||||
|       "spec": "Spécialisation", | ||||
|       "traitbonus": "Traits bonus", | ||||
|       "traitmalus": "Traits malus", | ||||
|       "applyideal": "Utiliser l'idéal", | ||||
|       "applyspleen": "Utiliser le spleen", | ||||
|       "skilltranscendence": "Dépassement de soi" | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @@ -36,6 +36,9 @@ export class EcrymeActorSheet extends ActorSheet { | ||||
|       system: duplicate(this.object.system), | ||||
|       limited: this.object.limited, | ||||
|       skills: this.actor.prepareSkills(), | ||||
|       traits: this.actor.getRollTraits(), | ||||
|       ideal: this.actor.getIdeal(), | ||||
|       spleen: this.actor.getSpleen(), | ||||
|       system: duplicate(this.object.system), | ||||
|       config: duplicate(game.system.ecryme.config), | ||||
|       weapons: duplicate(this.actor.getWeapons()), | ||||
|   | ||||
| @@ -89,7 +89,26 @@ export class EcrymeActor extends Actor { | ||||
|  | ||||
|     return comp; | ||||
|   } | ||||
|   /* -------------------------------------------- */ | ||||
|   getRollTraits() { | ||||
|     return this.items.filter(it => it.type == "trait" && it.system.traitype == "normal") | ||||
|   } | ||||
|   getIdeal() { | ||||
|     return this.items.find(it => it.type == "trait" && it.system.traitype == "ideal") | ||||
|   } | ||||
|   getSpleen() { | ||||
|     return this.items.find(it => it.type == "trait" && it.system.traitype == "spleen") | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   getTrait(id) { | ||||
|     //console.log("TRAITS", this.items, this.items.filter(it => it.type == "trait") ) | ||||
|     return this.items.find(it => it.type == "trait" && it._id == id) | ||||
|   } | ||||
|   /* -------------------------------------------- */ | ||||
|   getSpecialization(id) { | ||||
|     return this.items.find(it => it.type == "specialization" && it.id == id) | ||||
|   } | ||||
|   /* -------------------------------------------- */ | ||||
|   getSpecializations(skillKey) { | ||||
|     return this.items.filter(it => it.type == "specialization" && it.system.skillkey == skillKey) | ||||
| @@ -262,6 +281,12 @@ export class EcrymeActor extends Actor { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   spentSkillTranscendence(skill, value) { | ||||
|     let newValue = this.system.skills[skill.categKey].skilllist[skill.skillKey].value - value | ||||
|     newValue = Math.max(0, newValue) | ||||
|     this.update( { [`system.skills.${skill.categKey}.skilllist.${skill.skillKey}.value`]: newValue}) | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   getCommonRollData() { | ||||
| @@ -271,6 +296,9 @@ export class EcrymeActor extends Actor { | ||||
|     rollData.actorId = this.id | ||||
|     rollData.img = this.img | ||||
|     rollData.isReroll = false | ||||
|     rollData.traits = this.getRollTraits() | ||||
|     rollData.spleen = this.getSpleen() | ||||
|     rollData.ideal  = this.getIdeal() | ||||
|  | ||||
|     return rollData | ||||
|   } | ||||
| @@ -279,7 +307,11 @@ export class EcrymeActor extends Actor { | ||||
|   rollSkill(categKey, skillKey) { | ||||
|     let skill = this.system.skills[categKey].skilllist[skillKey] | ||||
|     let rollData = this.getCommonRollData() | ||||
|     rollData.skill = duplicate(skill) | ||||
|     skill = duplicate(skill) | ||||
|     skill.categKey = categKey | ||||
|     skill.skillKey = skillKey | ||||
|     skill.spec = this.getSpecializations(skillKey) | ||||
|     rollData.skill = skill | ||||
|     rollData.mode = "skill" | ||||
|     rollData.title = game.i18n.localize(skill.name) | ||||
|     rollData.img = skill.img | ||||
|   | ||||
| @@ -14,6 +14,14 @@ export const ECRYME_CONFIG = { | ||||
|     {value: +2, text: "+2"}, | ||||
|     {value: +3, text: "+3"} | ||||
|   ], | ||||
|   difficulty: { | ||||
|     "-1": {difficulty: "ECRY.ui.none", frequency: "ECRY.ui.none", value: "-"}, | ||||
|     "8": { difficulty: "ECRY.ui.troublesome", frequency: "ECRY.ui.occasional", value: 8 }, | ||||
|     "10": { difficulty: "ECRY.ui.difficult", frequency: "ECRY.ui.uncommon", value: 10 }, | ||||
|     "12": { difficulty: "ECRY.ui.verydifficult", frequency: "ECRY.ui.rare", value: 12 }, | ||||
|     "14": { difficulty: "ECRY.ui.extremdifficult", frequency: "ECRY.ui.veryrare", value: 14 }, | ||||
|     "16": { difficulty: "ECRY.ui.increddifficult", frequency: "ECRY.ui.exceptrare", value: 16 }, | ||||
|   }, | ||||
|   skillLevel: { | ||||
|     "0": "0", | ||||
|     "1": "1", | ||||
|   | ||||
| @@ -8,6 +8,7 @@ export class EcrymeUtility { | ||||
|   /* -------------------------------------------- */ | ||||
|   static async init() { | ||||
|     Hooks.on('renderChatLog', (log, html, data) => EcrymeUtility.chatListeners(html)); | ||||
|     Hooks.on("getChatLogEntryContext", (html, options) => EcrymeUtility.chatMenuManager(html, options)); | ||||
|  | ||||
|     this.rollDataStore = {} | ||||
|     this.defenderStore = {} | ||||
| @@ -43,15 +44,22 @@ export class EcrymeUtility { | ||||
|     Handlebars.registerHelper('add', function (a, b) { | ||||
|       return parseInt(a) + parseInt(b); | ||||
|     }) | ||||
|     Handlebars.registerHelper('for', function (from, to, incr, block) { | ||||
|       var accum = ''; | ||||
|       for (var i = from; i <= to; i += incr) | ||||
|         accum += block.fn(i); | ||||
|       return accum; | ||||
|     }) | ||||
|     this.buildSkillConfig() | ||||
|  | ||||
|   } | ||||
|  | ||||
|   /*-------------------------------------------- */ | ||||
|   static buildSkillConfig() { | ||||
|     game.system.ecryme.config.skills = { } | ||||
|     for (let categKey in  game.data.template.Actor.templates.core.skills) { | ||||
|     game.system.ecryme.config.skills = {} | ||||
|     for (let categKey in game.data.template.Actor.templates.core.skills) { | ||||
|       let category = game.data.template.Actor.templates.core.skills[categKey] | ||||
|       for(let skillKey in category.skilllist) { | ||||
|       for (let skillKey in category.skilllist) { | ||||
|         let skill = duplicate(category.skilllist[skillKey]) | ||||
|         skill.categKey = categKey // Auto reference the category | ||||
|         game.system.ecryme.config.skills[skillKey] = skill | ||||
| @@ -89,6 +97,32 @@ export class EcrymeUtility { | ||||
|     return actor | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static chatMenuManager(html, options) { | ||||
|     let canTranscendRoll = [] | ||||
|     for(let i=1; i<=10; i++ ) { | ||||
|       canTranscendRoll[i] = function (li) { | ||||
|         let message = game.messages.get(li.attr("data-message-id")) | ||||
|         let rollData = message.getFlag("world", "rolldata") | ||||
|         //console.log(">>>>>>>>>>>>>>>>>>>>>>>>>> Menu !!!!", rollData) | ||||
|         if (rollData.skill && i <= rollData.skill.value && !rollData.transcendUsed && rollData.spec ) { | ||||
|           return true | ||||
|         }  | ||||
|         return false | ||||
|       } | ||||
|       options.push({ | ||||
|         name: game.i18.localize("ECRY.chat.spectranscend") + i, | ||||
|         icon: '<i class="fas fa-plus-square"></i>', | ||||
|         condition: canTranscendRoll[i], | ||||
|         callback: li => { | ||||
|           let message = game.messages.get(li.attr("data-message-id")) | ||||
|           let rollData = message.getFlag("world", "rolldata") | ||||
|             EcrymeUtility.transcendFromSpec(rollData, i) | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static async chatListeners(html) { | ||||
|  | ||||
| @@ -191,7 +225,7 @@ export class EcrymeUtility { | ||||
|   static async onSocketMesssage(msg) { | ||||
|     console.log("SOCKET MESSAGE", msg.name) | ||||
|     if (msg.name == "msg-draw-card") { | ||||
|       if ( game.user.isGM && game.system.ecryme.currentTirage) { | ||||
|       if (game.user.isGM && game.system.ecryme.currentTirage) { | ||||
|         game.system.ecryme.currentTirage.addCard(msg.data.msgId) | ||||
|       } | ||||
|     } | ||||
| @@ -258,19 +292,13 @@ export class EcrymeUtility { | ||||
|   /* -------------------------------------------- */ | ||||
|   static computeResults(rollData) { | ||||
|     rollData.isSuccess = false | ||||
|     if (rollData.total <= rollData.target) { | ||||
|     if (!rollData.difficulty || rollData.difficulty == "-") { | ||||
|       return | ||||
|     } | ||||
|     rollData.margin = rollData.total - rollData.difficulty | ||||
|     if (rollData.total > rollData.difficulty) { | ||||
|       rollData.isSuccess = true | ||||
|     } | ||||
|     if (rollData.total == 1) { | ||||
|       rollData.isSuccess = true | ||||
|       rollData.isCritical = true | ||||
|     } | ||||
|     if (rollData.total == 20) { | ||||
|       rollData.isSuccess = false | ||||
|       rollData.isFumble = true | ||||
|     } | ||||
|     if (rollData.total <= Math.floor(rollData.target / 3)) { | ||||
|       rollData.isPart = true | ||||
|       rollData.margin = Math.min(rollData.margin, rollData.skill.value) | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -278,24 +306,63 @@ export class EcrymeUtility { | ||||
|   static async rollEcryme(rollData) { | ||||
|  | ||||
|     let actor = game.actors.get(rollData.actorId) | ||||
|     // Fix difficulty | ||||
|     if (!rollData.difficulty || rollData.difficulty == "-") { | ||||
|       rollData.difficulty = 0 | ||||
|     } | ||||
|     rollData.difficulty = Number(rollData.difficulty) | ||||
|  | ||||
|     // Build the dice formula | ||||
|     let diceFormula = "1d20" | ||||
|     rollData.target = rollData.attr.value + rollData.bonusMalusPerso + rollData.bonusMalusSituation + rollData.bonusMalusDef + rollData.bonusMalusPortee | ||||
|     if (rollData.attr.abbrev == "physique") { | ||||
|       rollData.target += rollData.phyMalus | ||||
|     let diceFormula = "2d6" | ||||
|     if (rollData.useIdeal) { | ||||
|       diceFormula = "3d6kh2" | ||||
|     } | ||||
|     if (rollData.useSpleen) { | ||||
|       diceFormula = "3d6kl2" | ||||
|     } | ||||
|     if (rollData.skill) { | ||||
|       diceFormula += "+" + rollData.skill.value | ||||
|     } | ||||
|     if (rollData.skillTranscendence) { | ||||
|       diceFormula += "+" + rollData.skillTranscendence | ||||
|       actor.spentSkillTranscendence(rollData.skill, rollData.skillTranscendence) | ||||
|     } | ||||
|     if (rollData.selectedSpecs && rollData.selectedSpecs.length > 0) { | ||||
|       rollData.spec = actor.getSpecialization(rollData.selectedSpecs[0]) | ||||
|       diceFormula += "+2" | ||||
|     } | ||||
|     rollData.bonusMalusTraits = 0 | ||||
|     if (rollData.traitsBonus && rollData.traitsBonus.length > 0) { | ||||
|       rollData.traitsBonusList = [] | ||||
|       for (let id of rollData.traitsBonus) { | ||||
|         let trait = actor.getTrait(id) | ||||
|         console.log(trait, id) | ||||
|         rollData.traitsBonusList.push(trait) | ||||
|         rollData.bonusMalusTraits += trait.system.level | ||||
|       } | ||||
|     } | ||||
|     if (rollData.traitsMalus && rollData.traitsMalus.length > 0) { | ||||
|       rollData.traitsMalusList = [] | ||||
|       for (let id of rollData.traitsMalus) { | ||||
|         let trait = actor.getTrait(id) | ||||
|         rollData.traitsMalusList.push(trait) | ||||
|         rollData.bonusMalusTraits -= trait.system.level | ||||
|       } | ||||
|     } | ||||
|     diceFormula += "+" + rollData.bonusMalusTraits | ||||
|     diceFormula += "+" + rollData.bonusMalusPerso | ||||
|     rollData.diceFormula = diceFormula | ||||
|  | ||||
|     // Performs roll | ||||
|     console.log("Roll formula", diceFormula) | ||||
|     let myRoll = new Roll(diceFormula).roll({ async: false }) | ||||
|     await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) | ||||
|     rollData.roll = myRoll | ||||
|     rollData.roll = duplicate(myRoll) | ||||
|     rollData.total = myRoll.total | ||||
|     rollData.diceSum = myRoll.terms[0].total | ||||
|  | ||||
|     this.computeResults(rollData) | ||||
|  | ||||
|     console.log("ERRRRR", rollData) | ||||
|     let msg = await this.createChatWithRollMode(rollData.alias, { | ||||
|       content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData) | ||||
|     }) | ||||
| @@ -307,6 +374,22 @@ export class EcrymeUtility { | ||||
|     console.log("Rolldata result", rollData) | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static async transcendFromSpec(rollData, value) { | ||||
|     rollData.total += value | ||||
|     rollData.transcendUsed = true | ||||
|     this.computeResults(rollData) | ||||
|     //console.log("Adding spec", value, rollData.total) | ||||
|      | ||||
|     let actor = game.actors.get(rollData.actorId) | ||||
|     actor.spentSkillTranscendence(rollData.skill, value) | ||||
|      | ||||
|     let msg = await this.createChatWithRollMode(rollData.alias, { | ||||
|       content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData) | ||||
|     }) | ||||
|     msg.setFlag("world", "rolldata", rollData)     | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   static sortArrayObjectsByName(myArray) { | ||||
|     myArray.sort((a, b) => { | ||||
| @@ -404,7 +487,12 @@ export class EcrymeUtility { | ||||
|       bonusMalusSituation: 0, | ||||
|       bonusMalusDef: 0, | ||||
|       bonusMalusPortee: 0, | ||||
|       rollMode: game.settings.get("core", "rollMode") | ||||
|       skillTranscendence: 0, | ||||
|       rollMode: game.settings.get("core", "rollMode"), | ||||
|       difficulty: "-", | ||||
|       useSpleen: false, | ||||
|       useIdeal: false, | ||||
|       config: duplicate(game.system.ecryme.config) | ||||
|     } | ||||
|     EcrymeUtility.updateWithTarget(rollData) | ||||
|     return rollData | ||||
|   | ||||
| @@ -5,14 +5,8 @@ export class EcrymeRollDialog extends Dialog { | ||||
|   /* -------------------------------------------- */ | ||||
|   static async create(actor, rollData) { | ||||
|  | ||||
|     let options = { classes: ["EcrymeDialog"], width: 540, height: 'fit-content', 'z-index': 99999 } | ||||
|     let html | ||||
|     if (rollData.attr && rollData.attr.iscard)  { | ||||
|       html = await renderTemplate('systems/fvtt-ecryme/templates/dialogs/confrontation-dialog.hbs', rollData); | ||||
|     } else { | ||||
|       html = await renderTemplate('systems/fvtt-ecryme/templates/dialogs/roll-dialog-generic.hbs', rollData); | ||||
|     } | ||||
|  | ||||
|     let options = { classes: ["ecryme-roll-dialog"], width: 540, height: 'fit-content', 'z-index': 99999 } | ||||
|     let html = await renderTemplate('systems/fvtt-ecryme/templates/dialogs/roll-dialog-generic.hbs', rollData); | ||||
|     return new EcrymeRollDialog(actor, rollData, html, options); | ||||
|   } | ||||
|  | ||||
| @@ -20,17 +14,17 @@ export class EcrymeRollDialog extends Dialog { | ||||
|   constructor(actor, rollData, html, options, close = undefined) { | ||||
|     let isCard = rollData.attr && rollData.attr.iscard | ||||
|     let conf = { | ||||
|       title: (isCard) ? "Jet" : "Tirage", | ||||
|       title: game.i18n.localize("ECRY.ui.rolltitle"), | ||||
|       content: html, | ||||
|       buttons: { | ||||
|         roll: { | ||||
|           icon: '<i class="fas fa-check"></i>', | ||||
|           label: (isCard) ? "Tirer une carte" : "Lancer le dé", | ||||
|           label: game.i18n.localize("ECRY.ui.roll"), | ||||
|           callback: () => { this.roll() } | ||||
|         }, | ||||
|         cancel: { | ||||
|           icon: '<i class="fas fa-times"></i>', | ||||
|           label: "Annuler", | ||||
|           label: game.i18n.localize("ECRY.ui.cancel"), | ||||
|           callback: () => { this.close() } | ||||
|         } | ||||
|       }, | ||||
| @@ -45,12 +39,7 @@ export class EcrymeRollDialog extends Dialog { | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
|   roll() { | ||||
|     let isCard = this.rollData.attr && this.rollData.attr.iscard | ||||
|     if (isCard) { | ||||
|       EcrymeUtility.tirageConfrontationEcryme(this.rollData) | ||||
|     } else { | ||||
|       EcrymeUtility.rollEcryme(this.rollData) | ||||
|     } | ||||
|     EcrymeUtility.rollEcryme(this.rollData) | ||||
|   } | ||||
|  | ||||
|   /* -------------------------------------------- */ | ||||
| @@ -69,23 +58,29 @@ export class EcrymeRollDialog extends Dialog { | ||||
|     } | ||||
|     $(function () { onLoad(); }); | ||||
|  | ||||
|     html.find('#bonusMalusSituation').change((event) => { | ||||
|       this.rollData.bonusMalusSituation = Number(event.currentTarget.value) | ||||
|     }) | ||||
|     html.find('#bonusMalusPerso').change((event) => { | ||||
|       this.rollData.bonusMalusPerso = Number(event.currentTarget.value) | ||||
|     }) | ||||
|     html.find('#bonusMalusDef').change((event) => { | ||||
|       this.rollData.bonusMalusDef = Number(event.currentTarget.value) | ||||
|     html.find('#roll-difficulty').change((event) => { | ||||
|       this.rollData.difficulty = Number(event.currentTarget.value) || 0 | ||||
|     }) | ||||
|     html.find('#bonusMalusPortee').change((event) => { | ||||
|       this.rollData.bonusMalusPortee = Number(event.currentTarget.value) | ||||
|     html.find('#roll-specialization').change((event) => { | ||||
|       this.rollData.selectedSpecs = $('#roll-specialization').val() | ||||
|     }) | ||||
|     html.find('#confrontationDegre').change((event) => { | ||||
|       this.rollData.confrontationDegre = Number(event.currentTarget.value) | ||||
|     html.find('#roll-trait-bonus').change((event) => { | ||||
|       this.rollData.traitsBonus = $('#roll-trait-bonus').val() | ||||
|     }) | ||||
|     html.find('#confrontationModif').change((event) => { | ||||
|       this.rollData.confrontationModif = Number(event.currentTarget.value) | ||||
|     html.find('#roll-trait-malus').change((event) => { | ||||
|       this.rollData.traitsMalus = $('#roll-trait-malus').val() | ||||
|     }) | ||||
|     html.find('#roll-select-transcendence').change((event) => { | ||||
|       this.rollData.skillTranscendence = Number($('#roll-select-transcendence').val()) | ||||
|     })     | ||||
|     html.find('#roll-use-spleen').change((event) => { | ||||
|       this.rollData.useSpleen = event.currentTarget.checked | ||||
|     })       | ||||
|     html.find('#roll-use-ideal').change((event) => { | ||||
|       this.rollData.useIdeal = event.currentTarget.checked | ||||
|     })       | ||||
|  | ||||
|   } | ||||
|   | ||||
| @@ -1,8 +1,14 @@ | ||||
| import { EcrymeUtility } from "../common/ecryme-utility.js"; | ||||
|  | ||||
| export const defaultItemImg = { | ||||
|   weapon: "systems/fvtt-ecryme/images/icons/weapon.webp", | ||||
|   equipement: "systems/fvtt-ecryme/images/icons/equipement.webp" | ||||
|   weapon: "systems/fvtt-ecryme/images/icons/icon_weapon.webp", | ||||
|   equipment: "systems/fvtt-ecryme/images/icons/icon_equipment.webp", | ||||
|   contact: "systems/fvtt-ecryme/images/icons/icon_contact.webp", | ||||
|   boheme: "systems/fvtt-ecryme/images/icons/icon_boheme.webp", | ||||
|   trait: "systems/fvtt-ecryme/images/icons/icon_trait.webp", | ||||
|   annency: "systems/fvtt-ecryme/images/icons/icon_annency.webp", | ||||
|   skill: "systems/fvtt-ecryme/images/icons/icon_skill.webp", | ||||
|   specialization: "systems/fvtt-ecryme/images/icons/icon_spec.webp" | ||||
| } | ||||
|  | ||||
| /** | ||||
|   | ||||
| @@ -78,7 +78,7 @@ | ||||
|   cursor: pointer; | ||||
| } | ||||
|  | ||||
| input:hover, select:hover { | ||||
| input:hover { | ||||
|   border-width: 4px; | ||||
|   border-color: rgba(37, 124, 37, 0.7); | ||||
| } | ||||
| @@ -576,10 +576,10 @@ ul, li { | ||||
| } | ||||
|  | ||||
| .list-item { | ||||
|   margin: 0.125rem; | ||||
|   /*margin: 0.125rem;*/ | ||||
|   /*box-shadow: inset 0px 0px 1px #00000096; | ||||
|   border-radius: 0.25rem;*/ | ||||
|   padding: 0.125rem; | ||||
|   border-radius: 0.25rem; | ||||
|   padding: 0.125rem;*/ | ||||
|   flex: 1 1 5rem; | ||||
|   display: flex !important; | ||||
|   color: rgba(19, 18, 18, 0.95); | ||||
| @@ -1314,3 +1314,15 @@ ul, li { | ||||
| .character-summary-rollable { | ||||
|   text-decoration: underline; | ||||
| } | ||||
|  | ||||
| .ecryme-roll-dialog .window-header { | ||||
|   border-radius: 10px 10px 0% 0%; | ||||
| } | ||||
| .ecryme-roll-dialog .window-content { | ||||
|   border-radius: 0% 0% 10px 10px; | ||||
| } | ||||
|  | ||||
| .skill-roll-dialog div { | ||||
|   margin-top: 4px; | ||||
|   margin-bottom: 4px; | ||||
| } | ||||
| @@ -78,7 +78,7 @@ | ||||
|   cursor: pointer; | ||||
| } | ||||
|  | ||||
| input:hover, select:hover { | ||||
| input:hover { | ||||
|   border-width: 4px; | ||||
|   border-color: rgba(37, 124, 37, 0.7); | ||||
| } | ||||
| @@ -547,10 +547,10 @@ ul, li { | ||||
| } | ||||
|  | ||||
| .list-item { | ||||
|   margin: 0.125rem; | ||||
|   /*margin: 0.125rem;*/ | ||||
|   /*box-shadow: inset 0px 0px 1px #00000096; | ||||
|   border-radius: 0.25rem;*/ | ||||
|   padding: 0.125rem; | ||||
|   border-radius: 0.25rem; | ||||
|   padding: 0.125rem;*/ | ||||
|   flex: 1 1 5rem; | ||||
|   display: flex !important; | ||||
|   color: rgba(19, 18, 18, 0.95); | ||||
| @@ -1294,3 +1294,15 @@ ul, li { | ||||
| .character-summary-rollable { | ||||
|   text-decoration: underline; | ||||
| } | ||||
|  | ||||
| .ecryme-roll-dialog .window-header { | ||||
|   border-radius: 10px 10px 0% 0%; | ||||
| } | ||||
| .ecryme-roll-dialog .window-content { | ||||
|   border-radius: 0% 0% 10px 10px; | ||||
| } | ||||
|  | ||||
| .skill-roll-dialog div { | ||||
|   margin-top: 4px; | ||||
|   margin-bottom: 4px; | ||||
| } | ||||
| @@ -31,7 +31,8 @@ | ||||
|   "manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme/raw/branch/master/system.json", | ||||
|   "compatibility": { | ||||
|     "minimum": "10", | ||||
|     "verified": "10" | ||||
|     "verified": "11", | ||||
|     "maximum": "11" | ||||
|   }, | ||||
|   "id": "fvtt-ecryme", | ||||
|   "primaryTokenAttribute": "secondary.health", | ||||
| @@ -44,5 +45,5 @@ | ||||
|   "url": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme", | ||||
|   "version": "10.0.4", | ||||
|   "download": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme/archive/fvtt-ecryme-v10.0.0.zip", | ||||
|   "background": "systems/fvtt-ecryme/images/ui/accueil_01.webp" | ||||
|   "background": "systems/fvtt-ecryme/images/assets/ecryme_extract_panel_01.webp" | ||||
| } | ||||
| @@ -130,7 +130,7 @@ | ||||
|     } | ||||
|   }, | ||||
|   "Item": { | ||||
|     "types": ["equipment", "trait", "weapon", "scar", "specialization","annency", "boheme", "contact"], | ||||
|     "types": ["equipment", "trait", "weapon", "specialization","annency", "boheme", "contact"], | ||||
|     "templates": { | ||||
|       "common": { | ||||
|         "description": "" | ||||
|   | ||||
| @@ -14,13 +14,27 @@ | ||||
|  | ||||
|         <div class="flexrow"> | ||||
|             <ul> | ||||
|               <li class="flexrow item"> | ||||
|                 <label class="item-name-label-long">Milieu social</label> | ||||
|                 <input type="text" class="item-field-label-long" name="system.biodata.milieusocial" value="{{system.biodata.milieusocial}}" data-dtype="String" /> | ||||
|               <li class="flexrow item" data-item-id="{{spleen.id}}"> | ||||
|                 <label class="item-name-label-medium">Spleen :</label> | ||||
|                 <label class="item-name-label-long">{{spleen.name}}</label> | ||||
|                 <div class="item-filler"> </div> | ||||
|                 {{#if spleen}} | ||||
|                 <div class="item-controls item-controls-fixed"> | ||||
|                   <a class="item-control item-edit" data-type="trait" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|                   <a class="item-control item-add" data-type="trait" title="Delete Item"><i class="fas fa-plus"></i></a> | ||||
|                 </div> | ||||
|                 {{/if}} | ||||
|               </li> | ||||
|               <li class="item flexrow"> | ||||
|                 <label class="item-name-label-long">Profession</label> | ||||
|                 <input type="text" class="item-field-label-long" name="system.biodata.profession" value="{{system.biodata.profession}}" data-dtype="String" /> | ||||
|               <li class="item flexrow" data-item-id="{{ideal.id}}"> | ||||
|                 <label class="item-name-label-medium">Ideal :</label> | ||||
|                 <label class="item-name-label-long">{{ideal.name}}</label> | ||||
|                 <div class="item-filler"> </div> | ||||
|                 {{#if ideal}} | ||||
|                 <div class="item-controls item-controls-fixed"> | ||||
|                   <a class="item-control item-edit" data-type="trait" title="Edit Item"><i class="fas fa-edit"></i></a> | ||||
|                   <a class="item-control item-add" data-type="trait" title="Delete Item"><i class="fas fa-plus"></i></a> | ||||
|                 </div> | ||||
|                 {{/if}} | ||||
|               </li> | ||||
|             </ul> | ||||
|           </div> | ||||
| @@ -99,6 +113,34 @@ | ||||
|  | ||||
|  | ||||
|     <div class="tab traits" data-group="primary" data-tab="traits"> | ||||
|  | ||||
|       <ul class="item-list alternate-list"> | ||||
|         <li class="item flexrow list-item items-title-bg"> | ||||
|           <span class="item-name-label-header-long2"> | ||||
|             <h3><label class="item-name-label-header-long2">Traits</label></h3> | ||||
|           </span> | ||||
|           <span class="item-field-label-short"> | ||||
|             <label class="item-field-label-short">Niveau</label> | ||||
|           </span> | ||||
|           <div class="item-controls item-controls-fixed"> | ||||
|             <a class="item-control item-add" data-type="trait" title="Create Trait"><i class="fas fa-plus"></i></a> | ||||
|           </div> | ||||
|         </li> | ||||
|         {{#each traits as |trait key|}} | ||||
|         <li class="item flexrow list-item list-item-shadow" data-item-id="{{trait._id}}"> | ||||
|           <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" | ||||
|               src="{{trait.img}}" /></a> | ||||
|           <span class="item-name-label-long2">{{trait.name}}</span> | ||||
|           <span class="item-field-label-short"><label>{{trait.system.level}}</label></span> | ||||
|  | ||||
|           <div class="item-filler"> </div> | ||||
|           <div class="item-controls item-controls-fixed"> | ||||
|             <a class="item-control item-delete" title="Delete trait"><i class="fas fa-trash"></i></a> | ||||
|           </div> | ||||
|         </li> | ||||
|         {{/each}} | ||||
|       </ul> | ||||
|  | ||||
|     </div> | ||||
|  | ||||
|     {{!-- Equipement Tab --}} | ||||
| @@ -214,15 +256,6 @@ | ||||
|       <div class="grid grid-2col"> | ||||
|         <div> | ||||
|           <ul class="item-list alternate-list"> | ||||
|             <li class="item flexrow" data-item-id="{{archetype._id}}"> | ||||
|               <label class="item-name-label-medium">Archetype</label> | ||||
|               <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" | ||||
|                   src="{{archetype.img}}" /></a> | ||||
|               <span class="item-name-label-medium">{{archetype.name}}</span> | ||||
|               <div class="item-controls item-controls-fixed"> | ||||
|                 <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               </div> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Lieu de naissance</label> | ||||
|               <input type="text" class="" name="system.biodata.lieunaissance" value="{{system.biodata.lieunaissance}}" | ||||
| @@ -232,6 +265,14 @@ | ||||
|               <label class="item-name-label-medium">Age</label> | ||||
|               <input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}" data-dtype="String" /> | ||||
|             </li> | ||||
|           </ul> | ||||
|         </div> | ||||
|        <div> | ||||
|           <ul> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Résidence</label> | ||||
|               <input type="text" class="" name="system.biodata.residence" value="{{system.biodata.residence}}" data-dtype="String" /> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Nationalité</label> | ||||
|               <input type="text" class="" name="system.biodata.nationalite" value="{{system.biodata.nationalite}}" data-dtype="String" /> | ||||
| @@ -240,38 +281,6 @@ | ||||
|               <label class="item-name-label-medium">Enfance</label> | ||||
|               <input type="text" class="" name="system.biodata.enfance" value="{{system.biodata.enfance}}" data-dtype="String" /> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Vie d'adulte</label> | ||||
|               <input type="text" class="" name="system.biodata.adulte" value="{{system.biodata.adulte}}" data-dtype="String" /> | ||||
|             </li> | ||||
|           </ul> | ||||
|         </div> | ||||
|        <div> | ||||
|           <ul> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Lame tutélaire</label> | ||||
|               <span class="item-name-label-medium">{{archetype.tarot.name}}</span> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Résidence</label> | ||||
|               <input type="text" class="" name="system.biodata.residence" value="{{system.biodata.residence}}" data-dtype="String" /> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Singularité</label> | ||||
|               <input type="text" class="" name="system.biodata.singularite" value="{{system.biodata.singularite}}" data-dtype="String" /> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Loisirs</label> | ||||
|               <input type="text" class="" name="system.biodata.loisirs" value="{{system.biodata.loisirs}}" data-dtype="String" /> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Orientation politique</label> | ||||
|               <input type="text" class="" name="system.biodata.politique" value="{{system.biodata.politique}}" data-dtype="String" /> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Orientation religieuse</label> | ||||
|               <input type="text" class="" name="system.biodata.religion" value="{{system.biodata.religion}}" data-dtype="String" /> | ||||
|             </li> | ||||
|           </ul> | ||||
|         </div> | ||||
|       </div> | ||||
|   | ||||
| @@ -18,55 +18,41 @@ | ||||
|  | ||||
|     <div> | ||||
|       <ul> | ||||
|         {{#if attr}} | ||||
|         <li>{{attr.label}} : {{attr.value}}  | ||||
|         </li> | ||||
|         {{/if}} | ||||
|  | ||||
|         <li>Bonus/Malus perso: {{bonusMalusPerso}} </li> | ||||
|         <li>Bonus/Malus situation: {{bonusMalusSituation}} </li> | ||||
|         <li>Seuil final: {{target}} </li> | ||||
|         <li>Resultat {{roll.total}} </li> | ||||
|  | ||||
|         {{#if isSuccess}} | ||||
|           {{#if isCritical}} | ||||
|             <li><label class="chat-result-text chat-result-success ">Réussite Critique !</label></li> | ||||
|             {{#if arme}} | ||||
|               {{#if arme.system.dommagecritiquemort}} | ||||
|                 <li><label class="chat-result-success">La victime est morte !</label></li> | ||||
|               {{else}} | ||||
|                 {{#if arme.system.dommagecritiqueko}} | ||||
|                   <li><label class="chat-result-text chat-result-success ">La victime est KO !</label></li> | ||||
|                 {{/if}} | ||||
|                 <li><label class="chat-result-success ">La victime subit {{arme.system.dommagecritique}} dommages</label></li> | ||||
|               {{/if}} | ||||
|             {{/if}} | ||||
|           {{else}}   | ||||
|             {{#if isPart}} | ||||
|               <li><label class="chat-result-text chat-result-success ">Réussite Particulière !</label></li> | ||||
|               {{#if arme}} | ||||
|                 <li><label class="chat-result-success ">La victime subit {{arme.system.dommagepart}} dommages</label></li> | ||||
|               {{/if}}         | ||||
|  | ||||
|             {{else}} | ||||
|               <li><label class="chat-result-text chat-result-success ">Succés !</label></li> | ||||
|               {{#if arme}} | ||||
|                 <li><label class="chat-result-success ">La victime subit {{arme.system.dommagenormale}} dommages</label></li> | ||||
|               {{/if}}         | ||||
|             {{/if}}         | ||||
|           {{/if}} | ||||
|         {{else}} | ||||
|           {{#if isFumble}} | ||||
|             <li><label class="chat-result-text chat-result-failure ">Echec Critique !</label></li> | ||||
|           {{else}} | ||||
|             <li><label class="chat-result-text chat-result-failure">Echec !</label></li> | ||||
|         {{#if skill}} | ||||
|           <li>{{localize skill.name}}: {{skill.value}} </li> | ||||
|           {{#if spec}} | ||||
|             <li>{{localize "ECRY.chat.specialization"}} {{spec.name}} (+2) </li> | ||||
|           {{/if}} | ||||
|         {{/if}} | ||||
|  | ||||
|         {{#if isReroll}} | ||||
|         {{else}} | ||||
|           {{#if (gt destin 0)}} | ||||
|             <button class="chat-card-button roll-destin">Relancer (1 Destin)</button> | ||||
|         {{#if skillTranscendence}} | ||||
|           <li>{{localize "ECRY.ui.skilltranscendence"}}: {{skillTranscendence}} </li> | ||||
|  | ||||
|         {{/if}} | ||||
|  | ||||
|         {{#if traitsBonusList}} | ||||
|           {{#each traitsBonusList as |trait idx|}} | ||||
|           <li>{{localize "ECRY.chat.traitbonus"}}: {{trait.name}} ({{trait.system.level}}) </li> | ||||
|           {{/each}} | ||||
|         {{/if}} | ||||
|         {{#if traitsMalusList}} | ||||
|           {{#each traitsMalusList as |trait idx|}} | ||||
|             <li>{{localize "ECRY.chat.traitmalus"}}: {{trait.name}} ({{trait.system.level}}) </li> | ||||
|           {{/each}} | ||||
|         {{/if}} | ||||
|         {{#if bonusMalusTraits}} | ||||
|           <li>{{localize "ECRY.chat.bonusmalustraits"}}: {{bonusMalusTraits}} </li> | ||||
|         {{/if}} | ||||
|  | ||||
|         <li>{{localize "ECRY.chat.formula"}}: {{diceFormula}} </li> | ||||
|         <li>{{localize "ECRY.chat.dicesum"}}: {{diceSum}} </li> | ||||
|         <li>{{localize "ECRY.chat.result"}}: {{total}} </li> | ||||
|         {{#if difficulty}} | ||||
|           <li>{{localize "ECRY.chat.difficulty"}}: {{difficulty}} - {{localize "ECRY.chat.margin"}}: {{margin}} </li> | ||||
|           {{#if isSuccess}} | ||||
|             <li><label class="chat-result-text chat-result-success ">{{localize "ECRY.chat.success"}}</label></li> | ||||
|           {{else}} | ||||
|             <li><label class="chat-result-text chat-result-failure">{{localize "ECRY.chat.failure"}}</label></li> | ||||
|           {{/if}} | ||||
|         {{/if}} | ||||
|  | ||||
|   | ||||
| @@ -1,12 +0,0 @@ | ||||
| </div> | ||||
|     <div class="flexcol"> | ||||
|       <img class="{{#if system.ispositif}} {{else}}flip-tarot{{/if}}" src="{{img}}"> | ||||
|         <span class="tarot-title">{{name}}</span> | ||||
|         {{#if system.isdualside}} | ||||
|           <span class="tarot-title">{{#if system.ispositif}}Positif{{else}}Négatif{{/if}}</span> | ||||
|         {{/if}} | ||||
|         {{#if value}} | ||||
|           <span class="tarot-title">Valeur : {{value}}</span> | ||||
|         {{/if}} | ||||
|     </div> | ||||
|   </div> | ||||
| @@ -1,4 +0,0 @@ | ||||
|   <div> | ||||
|     <button class="chat-card-button draw-tarot-card">Tirer une carte de Tarot</button> | ||||
|   </div> | ||||
|  | ||||
| @@ -6,56 +6,97 @@ | ||||
|     <h1 class="dialog-roll-title roll-dialog-header">{{title}}</h1> | ||||
|   </header> | ||||
|  | ||||
|     <div class="flexcol"> | ||||
|   <div class="flexcol"> | ||||
|  | ||||
|       {{#if skill}} | ||||
|       <div class="flexrow"> | ||||
|         <span class="roll-dialog-label">{{localize skill.name}} : </span> | ||||
|         <span class="roll-dialog-label"> | ||||
|           {{skill.value}} | ||||
|         </span> | ||||
|       </div> | ||||
|       {{/if}} | ||||
|     {{#if skill}} | ||||
|     <div class="flexrow"> | ||||
|       <span class="roll-dialog-label">{{localize skill.name}} : </span> | ||||
|       <span class="roll-dialog-label"> | ||||
|         {{skill.value}} | ||||
|       </span> | ||||
|     </div> | ||||
|  | ||||
|       <div class="flexrow"> | ||||
|         <span class="roll-dialog-label">Bonus/Malus : </span> | ||||
|         <select id="bonusMalusPerso" name="bonusMalusPerso"> | ||||
|           {{#select bonusMalusPerso}}  | ||||
|             <option value="-3">-3</option> | ||||
|             <option value="-2">-2</option> | ||||
|             <option value="-1">-1</option> | ||||
|             <option value="0">0</option> | ||||
|             <option value="1">+1</option> | ||||
|             <option value="2">+2</option> | ||||
|             <option value="3">+3</option> | ||||
|           {{/select}} | ||||
|         </select>         | ||||
|       </div> | ||||
|     <div class="flexrow"> | ||||
|       <span class="roll-dialog-label">{{localize "ECRY.ui.skilltranscendence"}} : </span> | ||||
|       <select class="" id="roll-select-transcendence" data-type="Number"> | ||||
|         {{#select skillTranscendence}} | ||||
|           {{#for 0 skill.value 1}} | ||||
|             <option value="{{this}}">{{this}}</option> | ||||
|           {{/for}} | ||||
|         {{/select}} | ||||
|       </select> | ||||
|     </div> | ||||
|  | ||||
|       {{#if weapon}} | ||||
|       <div class="flexrow"> | ||||
|         <span class="roll-dialog-label">Défense : </span> | ||||
|         <select id="bonusMalusDef" name="bonusMalusDef"> | ||||
|           {{#select bonusMalusDef}}  | ||||
|             <option value="-3">-6 (réussite critique)</option> | ||||
|             <option value="-3">-3 (réussite)</option> | ||||
|             <option value="0">0 (echec ou pas d'esquive)</option> | ||||
|             <option value="3">+3 (echec critique)</option> | ||||
|           {{/select}} | ||||
|         </select>         | ||||
|       </div> | ||||
|     <div class="flexrow"> | ||||
|       <span class="roll-dialog-label">{{localize "ECRY.ui.spec"}} : </span> | ||||
|       <select class="" id="roll-specialization" data-type="String" multiple> | ||||
|         {{#each skill.spec as | spec idx|}} | ||||
|           <option value="{{spec._id}}">{{spec.name}}</option> | ||||
|         {{/each}} | ||||
|       </select> | ||||
|     </div> | ||||
|  | ||||
|       <div class="flexrow"> | ||||
|         <span class="roll-dialog-label">Portée : </span> | ||||
|         <select id="bonusMalusPortee" name="bonusMalusPortee"> | ||||
|           {{#select bonusMalusPortee}}  | ||||
|             <option value="1">+1 (Portée courte)</option> | ||||
|             <option value="0">0 (Portée moyenne)</option> | ||||
|             <option value="-1">-1 (Portée longue)</option> | ||||
|           {{/select}} | ||||
|         </select>         | ||||
|       </div> | ||||
|       {{/if}} | ||||
|     {{#if spleen}} | ||||
|     <div class="flexrow"> | ||||
|       <span class="roll-dialog-label">{{localize "ECRY.ui.applyspleen"}} {{spleen.name}}</span> | ||||
|       <input type="checkbox" class="item-field-label-short" id="roll-use-spleen" {{checked useSpleen}} /> | ||||
|     </div> | ||||
|     {{/if}} | ||||
|      | ||||
|     {{#if ideal}} | ||||
|     <div class="flexrow"> | ||||
|       <span class="roll-dialog-label">{{localize "ECRY.ui.applyideal"}} {{ideal.name}}</span> | ||||
|       <input type="checkbox" class="item-field-label-short" id="roll-use-ideal" {{checked useIdeal}} /> | ||||
|     </div> | ||||
|     {{/if}} | ||||
|  | ||||
|     <div class="flexrow"> | ||||
|       <span class="roll-dialog-label">{{localize "ECRY.ui.traitbonus"}} : </span> | ||||
|       <select class="" id="roll-trait-bonus" data-type="String" multiple> | ||||
|         {{#each traits as | trait idx|}} | ||||
|           <option value="{{trait._id}}">{{trait.name}} ({{trait.system.level}})</option> | ||||
|         {{/each}} | ||||
|       </select> | ||||
|     </div> | ||||
|  | ||||
|     <div class="flexrow"> | ||||
|       <span class="roll-dialog-label">{{localize "ECRY.ui.traitmalus"}} : </span> | ||||
|       <select class="" id="roll-trait-malus" data-type="String" multiple> | ||||
|         {{#each traits as | trait idx|}} | ||||
|           <option value="{{trait._id}}">{{trait.name}} ({{trait.system.level}})</option> | ||||
|         {{/each}} | ||||
|       </select> | ||||
|     </div> | ||||
|  | ||||
|     {{/if}} | ||||
|  | ||||
|  | ||||
|     <div class="flexrow"> | ||||
|       <span class="roll-dialog-label">Bonus/Malus : </span> | ||||
|       <select id="bonusMalusPerso" name="bonusMalusPerso"> | ||||
|         {{#select bonusMalusPerso}} | ||||
|         <option value="-3">-3</option> | ||||
|         <option value="-2">-2</option> | ||||
|         <option value="-1">-1</option> | ||||
|         <option value="0">0</option> | ||||
|         <option value="1">+1</option> | ||||
|         <option value="2">+2</option> | ||||
|         <option value="3">+3</option> | ||||
|         {{/select}} | ||||
|       </select> | ||||
|     </div> | ||||
|  | ||||
|     <div class="flexrow"> | ||||
|       <span class="roll-dialog-label">Difficulté : </span> | ||||
|       <select class="" type="text" id="roll-difficulty" value="{{difficulty}}" data-dtype="Number"> | ||||
|         {{#select difficulty}} | ||||
|         {{#each config.difficulty as |diffData value| }} | ||||
|         <option value="{{diffData.value}}">{{localize diffData.difficulty}} / {{localize diffData.frequency}} | ||||
|           ({{diffData.value}})</option> | ||||
|         {{/each}} | ||||
|         {{/select}} | ||||
|       </select> | ||||
|     </div> | ||||
|  | ||||
|   </div> | ||||
|  | ||||
|   | ||||
| @@ -1,72 +0,0 @@ | ||||
| <form class="skill-roll-dialog"> | ||||
|   <header class="roll-dialog-header"> | ||||
|     <h1 class="dialog-roll-title roll-dialog-header">Joueur : {{user.name}}</h1> | ||||
|   </header> | ||||
|  | ||||
|     <div class="flexcol"> | ||||
|  | ||||
|       {{#if (eq state "select-player")}} | ||||
|       <div class="flexrow"> | ||||
|         <span>Sélectionnez le joueur pour faire le tirage</span> | ||||
|         <select id="playerId" name="playerId"> | ||||
|           {{#select playerId}}  | ||||
|             <option value="none"></option> | ||||
|             {{#each players as |player id|}}  | ||||
|               <option value="{{player._id}}">{{player.name}}</option> | ||||
|             {{/each}} | ||||
|           {{/select}} | ||||
|         </select> | ||||
|       </div>  | ||||
|       {{/if}} | ||||
|  | ||||
|       {{#if (eq state "attribute-to-actor")}} | ||||
|       <div class="flexrow"> | ||||
|         <span>Sélectionnez l'acteur pour lui attribuer les tarots</span> | ||||
|         <select id="actorId" name="actorId"> | ||||
|           {{#select actorId}}  | ||||
|             <option value="none"></option> | ||||
|             {{#each actors as |actor id|}}  | ||||
|               <option value="{{actor._id}}">{{actor.name}}</option> | ||||
|             {{/each}} | ||||
|           {{/select}} | ||||
|         </select> | ||||
|       </div>  | ||||
|       {{/if}} | ||||
|  | ||||
|       <div class="flexcol"> | ||||
|         <span><h2>Main du joueur : </h2></span> | ||||
|         <div class="flexrow"> | ||||
|           {{#each cards as |card index|}}  | ||||
|             <div class="flexcol"> | ||||
|               <div class="tarot-fixed-width flexcol"> | ||||
|                 <img class="tarot-fixed-width {{#if card.system.ispositif}} {{else}}flip-tarot{{/if}}" src="{{card.img}}"> | ||||
|                 <span class="tarot-title">{{card.name}}</span> | ||||
|                 {{#if card.system.isdualside}} | ||||
|                   <span class="tarot-title">{{#if card.system.ispositif}}Positif{{else}}Négatif{{/if}}</span> | ||||
|                 {{/if}} | ||||
|               </div> | ||||
|             </div> | ||||
|           {{/each}} | ||||
|         </div>  | ||||
|  | ||||
|         <hr> | ||||
|         <span><h2>Main secrête : </h2></span> | ||||
|         <div class="flexrow"> | ||||
|           {{#each secretCards as |card index|}}  | ||||
|             <div class="flexcol"> | ||||
|               <div class="tarot-fixed-width  flexcol"> | ||||
|                 <img class="tarot-fixed-width {{#if card.system.ispositif}} {{else}}flip-tarot{{/if}}" src="{{card.img}}"> | ||||
|                 <span class="tarot-title">{{card.name}}</span> | ||||
|                 {{#if card.system.isdualside}} | ||||
|                   <span class="tarot-title">{{#if card.system.ispositif}}Positif{{else}}Négatif{{/if}}</span> | ||||
|                 {{/if}} | ||||
|               </div> | ||||
|             </div> | ||||
|           {{/each}} | ||||
|         </div>  | ||||
|  | ||||
|       </div> | ||||
|  | ||||
|   </div> | ||||
|  | ||||
| </form> | ||||
| @@ -1,37 +0,0 @@ | ||||
| <form class="{{cssClass}}" autocomplete="off"> | ||||
|   <header class="sheet-header"> | ||||
|       <img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/> | ||||
|       <div class="header-fields"> | ||||
|           <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1> | ||||
|       </div> | ||||
|   </header> | ||||
|    | ||||
|   {{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}} | ||||
|  | ||||
|  | ||||
|   {{!-- Sheet Body --}} | ||||
|   <section class="sheet-body"> | ||||
|  | ||||
|     {{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}} | ||||
|      | ||||
|     <div class="tab details" data-group="primary" data-tab="details"> | ||||
|  | ||||
|       <div class="tab" data-group="primary"> | ||||
|         <ul> | ||||
|           <li class="flexrow"> | ||||
|             <label class="item-field-label-long">Lame tutélaire</label> | ||||
|             <select class="item-field-label-long" type="text" name="system.lametutelaire" value="{{system.lametutelaire}}" data-dtype="String"> | ||||
|               {{#select system.lametutelaire}} | ||||
|                 {{#each tarots as |carte key| }} | ||||
|                 <option value="{{carte._id}}">{{carte.name}}</option> | ||||
|                 {{/each}} | ||||
|               {{/select}} | ||||
|             </select>  | ||||
|           </li> | ||||
|  | ||||
|         </ul> | ||||
|     </div> | ||||
|   </div> | ||||
|  | ||||
|   </section> | ||||
| </form> | ||||
| @@ -1,30 +0,0 @@ | ||||
| <form class="{{cssClass}}" autocomplete="off"> | ||||
|   <header class="sheet-header"> | ||||
|       <img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/> | ||||
|       <div class="header-fields"> | ||||
|           <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1> | ||||
|       </div> | ||||
|   </header> | ||||
|    | ||||
|   {{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}} | ||||
|  | ||||
|  | ||||
|   {{!-- Sheet Body --}} | ||||
|   <section class="sheet-body"> | ||||
|  | ||||
|     {{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}} | ||||
|      | ||||
|     <div class="tab details" data-group="primary" data-tab="details"> | ||||
|  | ||||
|       <div class="tab" data-group="primary"> | ||||
|         <ul> | ||||
|           <li class="flexrow"> | ||||
|             <label class="item-field-label-long">Seuil de Fluide</label> | ||||
|             <input type="input" class="item-field-label-short" name="system.seuil" value="{{system.seuil}}" data-dtype="Number" /> | ||||
|           </li> | ||||
|         </ul> | ||||
|     </div> | ||||
|   </div> | ||||
|  | ||||
|   </section> | ||||
| </form> | ||||
| @@ -1,68 +0,0 @@ | ||||
| <form class="{{cssClass}}" autocomplete="off"> | ||||
|   <header class="sheet-header"> | ||||
|     <div class="header-fields"> | ||||
|         <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1> | ||||
|     </div> | ||||
|   </header> | ||||
|    | ||||
|   {{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}} | ||||
|  | ||||
|  | ||||
|   {{!-- Sheet Body --}} | ||||
|   <section class="sheet-body"> | ||||
|     <div class="flexrow"> | ||||
|       <div> | ||||
|         <img class="item-tarot-img" src="{{img}}" data-edit="img" title="{{name}}"/> | ||||
|       </div>     | ||||
|  | ||||
|       <div> | ||||
|         {{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}} | ||||
|        | ||||
|         <div class="tab details" data-group="primary" data-tab="details"> | ||||
|  | ||||
|         <div class="tab" data-group="primary"> | ||||
|           <ul> | ||||
|  | ||||
|           <li class="flexrow"> | ||||
|             <label class="item-field-label-long">Type </label> | ||||
|             <select class="item-field-label-long" type="text" name="system.tarottype" value="{{system.tarottype}}" data-dtype="String"> | ||||
|               {{#select system.tarottype}} | ||||
|                 {{#each config.tarotType as |type key| }} | ||||
|                 <option value="{{key}}">{{type}}</option> | ||||
|                 {{/each}} | ||||
|               {{/select}} | ||||
|             </select>  | ||||
|           </li> | ||||
|  | ||||
|           {{#if isGM}} | ||||
|             <li class="flexrow"> | ||||
|               <label class="item-field-label-long">Valeur endroit (ie positif) ?</label> | ||||
|               <input type="input" class="item-field-label-short" name="system.numericvalueup" value="{{system.numericvalueup}}" data-dtype="Number" /> | ||||
|             </li>         | ||||
|             <li class="flexrow"> | ||||
|               <label class="item-field-label-long">Valeur envers (ie négatif) ?</label> | ||||
|               <input type="input" class="item-field-label-short" name="system.numericvaluedown" value="{{system.numericvaluedown}}" data-dtype="Number" /> | ||||
|             </li>         | ||||
|             <li class="flexrow"> | ||||
|               <label class="item-field-label-long">A un sens (ie positif/négatif)?</label> | ||||
|               <input type="checkbox" class="item-field-label-short" name="system.isdualside" {{checked system.isdualside}} /> | ||||
|             </li> | ||||
|             {{#if system.isdualside}} | ||||
|               <li class="flexrow"> | ||||
|                 <label class="item-field-label-long">En positif ?</label> | ||||
|                 <input type="checkbox" class="item-field-label-short" name="system.ispositif" {{checked system.ispositif}} /> | ||||
|               </li> | ||||
|             {{/if}} | ||||
|             <li class="flexrow"> | ||||
|               <label class="item-field-label-long">Carte cachée (ie MJ seulement) ?</label> | ||||
|               <input type="checkbox" class="item-field-label-short" name="system.isgm" {{checked system.isgm}} /> | ||||
|             </li> | ||||
|           {{/if}} | ||||
|  | ||||
|           </ul> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     </section> | ||||
| </form> | ||||