difficultés

This commit is contained in:
François-Xavier Guillois
2023-08-25 16:15:04 +02:00
parent c57c355066
commit 9f760deee0
5 changed files with 48 additions and 7 deletions
+11 -2
View File
@@ -18,8 +18,10 @@
"epic": { "name": "Epique"}, "epic": { "name": "Epique"},
"legendary": { "name": "Légendaire"} "legendary": { "name": "Légendaire"}
}, },
"VERMINE.roll_tool": "Lanceur de dés", "ROLLS": {
"VERMINE.roll_dice": "Jeter les dés", "tool": "Lanceur de dés",
"roll_dice": "Jeter les dés"
},
"TOURS": { "TOURS": {
"ChatMessage": "<h3>Bienvenue dans Vermine!</h3><p>Si vous utilisez ce système pour la première fois, notre shaman va vous guider vers votre rite d'initiation</p> <button id=\"vermine-tour-chat-button\"> <i class=\"fas fa-person-hiking\"></i> J'y vais mais j'ai peur </button>", "ChatMessage": "<h3>Bienvenue dans Vermine!</h3><p>Si vous utilisez ce système pour la première fois, notre shaman va vous guider vers votre rite d'initiation</p> <button id=\"vermine-tour-chat-button\"> <i class=\"fas fa-person-hiking\"></i> J'y vais mais j'ai peur </button>",
"Welcome": { "Welcome": {
@@ -39,6 +41,13 @@
"ToursContent": "<p>Tu t'en sors pas si mal ! Moi je vais te laisser là, mais si tu as d'autres questions, tu peux venir me trouver. Si ca concerne la mécanique, inscris-toi dans notre groupe de parole, par là <a href=\"https://discord.gg/FqGHYvXg\">Totem Foundry Discord</a>. Sinon, tu peux rejoindre la place centrale par ici <a href=\"https://discord.gg/qejqmSxr\">Vermine Discord</a></p><p>Enjoy!</p>" "ToursContent": "<p>Tu t'en sors pas si mal ! Moi je vais te laisser là, mais si tu as d'autres questions, tu peux venir me trouver. Si ca concerne la mécanique, inscris-toi dans notre groupe de parole, par là <a href=\"https://discord.gg/FqGHYvXg\">Totem Foundry Discord</a>. Sinon, tu peux rejoindre la place centrale par ici <a href=\"https://discord.gg/qejqmSxr\">Vermine Discord</a></p><p>Enjoy!</p>"
} }
}, },
"DIFFICULTY_LEVELS": {
"obvious": "Evidente",
"easy": "Facile",
"hard": "Difficile",
"very_hard": "Très difficile",
"impossible": "Impossible"
},
"ATTITUDES": { "ATTITUDES": {
"offensive": { "name": "Offensif"}, "offensive": { "name": "Offensif"},
"active": { "name": "Actif"}, "active": { "name": "Actif"},
+8
View File
@@ -14,6 +14,14 @@ VERMINE.SkillLevels = {
5:{ "label":"VERMINE.skill_level.legend", "dicePool":3, "reroll":2} 5:{ "label":"VERMINE.skill_level.legend", "dicePool":3, "reroll":2}
} }
VERMINE.DifficultyLevels = {
1:{ "label":"DIFFICULTY_LEVELS.obvious", "difficulty":3},
2:{ "label":"DIFFICULTY_LEVELS.easy", "difficulty":5},
3:{ "label":"DIFFICULTY_LEVELS.hard", "difficulty":7},
4:{ "label":"DIFFICULTY_LEVELS.very_hard", "difficulty":9},
5:{ "label":"DIFFICULTY_LEVELS.impossible", "difficulty":10}
},
VERMINE.Instincts = { VERMINE.Instincts = {
1:{ "key":"architect"}, 1:{ "key":"architect"},
2:{ "key":"sword"}, 2:{ "key":"sword"},
+2 -2
View File
@@ -38,11 +38,11 @@
export const getRollBox = async function(data) { export const getRollBox = async function(data) {
let html = await renderTemplate('systems/vermine2047/templates/roll.hbs', data); let html = await renderTemplate('systems/vermine2047/templates/roll.hbs', data);
let ui = new Dialog({ let ui = new Dialog({
title: game.i18n.localize("VERMINE.roll_tool"), title: game.i18n.localize("ROLLS.tool"),
content: html, content: html,
buttons: { buttons: {
roll: { roll: {
label: game.i18n.localize('VERMINE.roll_dice'), label: game.i18n.localize('ROLLS.roll_dice'),
callback: (html) => { callback: (html) => {
let form = html.find('#dice-pool-form'); let form = html.find('#dice-pool-form');
if (!form[0].checkValidity()) { if (!form[0].checkValidity()) {
+13 -1
View File
@@ -51,10 +51,22 @@ export const registerHandlebarsHelpers = function () {
if (level < 1 || level > 5) if (level < 1 || level > 5)
return ""; return "";
let levelData = CONFIG.VERMINE.SkillLevels[level]; let levelData = CONFIG.VERMINE.SkillLevels[level];
return (levelData !== undefined) ? levelData[property] : ""; return (levelData !== undefined) ? levelData[property] : "";
}); });
// return diff level information
Handlebars.registerHelper('diffLevel', function (property, level, options) {
if (level < 1 || level > 5)
return "";
let levelData = CONFIG.VERMINE.DifficultyLevels[level];
if (property == 'label'){
return (levelData !== undefined) ? game.i18n.localize(levelData[property]) : "";
} else {
return (levelData !== undefined) ? levelData[property] : "";
}
});
Handlebars.registerHelper('getCombatTrackerColor', function (isPlayer, isNpc) { Handlebars.registerHelper('getCombatTrackerColor', function (isPlayer, isNpc) {
if (isPlayer) return "player"; if (isPlayer) return "player";
if (isNpc) return "npc"; if (isNpc) return "npc";
+14 -2
View File
@@ -1,9 +1,21 @@
<form id="dice-pool-form" class="ecryme-dv-form" data-actor-id="{{ speakerId }}"> <form id="dice-pool-form" class="ecryme-dv-form" data-actor-id="{{ speakerId }}">
<div class="dice-pool flexcol"> <div class="dice-pool flexcol">
<div class="flexrow row"> <div class="flexrow row">
<label class="label" style="flex: 80%;">{{localize 'VERMINE.difficulty'}}</label> <label class="label" style="flex: 60%;">{{localize 'VERMINE.difficulty'}}</label>
<input style="text-align: center;" class="numeric-entry" type="number" name="difficulty" value="7" id="difficulty" min="3" max="10"> <select class="info-value" style="max-width: 40%;" name="system.skill" data-dtype="String" type="number" name="difficulty" value="7" id="difficulty" min="3" max="10">
{{#select difficulty }}
<option value="{{ diffLevel 'difficulty' 1}}">{{ diffLevel 'label' 1}} - {{ diffLevel 'difficulty' 1}}</option>
<option value="{{ diffLevel 'difficulty' 1}}">{{ diffLevel 'label' 2}} - {{ diffLevel 'difficulty' 2}}</option>
<option value="{{ diffLevel 'difficulty' 1}}" selected>{{ diffLevel 'label' 3}} - {{ diffLevel 'difficulty' 3}}</option>
<option value="{{ diffLevel 'difficulty' 1}}">{{ diffLevel 'label' 4}} - {{ diffLevel 'difficulty' 4}}</option>
<option value="{{ diffLevel 'difficulty' 1}}">{{ diffLevel 'label' 5}} - {{ diffLevel 'difficulty' 5}}</option>
{{/select}}
</select>
</div> </div>
<!--div class="flexrow row">
<input style="text-align: center;" class="numeric-entry" type="number" name="difficulty" value="7" id="difficulty" min="3" max="10">
</div-->
<div class="flexrow row"> <div class="flexrow row">
<label class="label" style="flex: 80%;">{{localize 'VERMINE.ability'}}</label> <label class="label" style="flex: 80%;">{{localize 'VERMINE.ability'}}</label>
<input type="number" class="numeric-entry" style="text-align: center;" name="ability" id="ability" min="1" max="5" value="2"> <input type="number" class="numeric-entry" style="text-align: center;" name="ability" id="ability" min="1" max="5" value="2">