test on drag n drop

This commit is contained in:
Vlyan
2020-12-17 14:18:33 +01:00
parent 5aa15f32fb
commit 889a3d0656
6 changed files with 569 additions and 268 deletions

View File

@@ -1,15 +1,12 @@
{
"i18n.language": "English",
"i18n.maintainers": ["Team L5R"],
"settings.simplemacroshorthandn": "Shortened Macro Syntax",
"settings.simplemacroshorthandl": "Enable a shortened macro syntax which allows referencing attributes directly, for example @str instead of @attributes.str.value. Disable this setting if you need the ability to reference the full attribute model, for example @attributes.str.label.",
"settings.simpleinitformulan": "Initiative Formula",
"settings.simpleinitformulal": "Enter an initiative formula, such as d20+@dex",
"simple.notifyinitformulaupdated": "Initiative formula was updated to:",
"simple.notifyinitformulainvalid": "Initiative formula was invalid:",
"hexa.color": "Enter a hexadecimal color (such as #FFFFFF).",
"ic.bg.color": "IC Background Color",
"ic.text.color": "IC Text Color",
@@ -21,7 +18,6 @@
"other.text.color": "Other Text Color",
"def.chat.pref": "Default Chat Prefix",
"spe.chat.pref": "If specified, this string will be prefixed to all chat messages that are not already commands (such as /emote.)",
"l5r5e": {
"logo": {
"title": "Need help?",
@@ -224,46 +220,81 @@
"twenty_questions": {
"title": "Twenty questions",
"bt_abrev": "20Q",
"intro": "You can use this sheet to fill in your answers to The Game of Twenty Questions, and to take notes for later!",
"section": "Legend of the Five Rings Core Rulebook, Chapter 2 : Creating a character, p. 41-95",
"incring1": "Ring increase (1)",
"incring2": "Ring increase (2)",
"incskill1": "Skill increases (1)",
"incskill2": "Skill increases (2)",
"incskill3": "Skill increases (3-5)",
"choosem": "Pick one",
"choosef": "Pick one",
"money": "Starting wealth :",
"glory": "Glory :",
"school": "School :",
"status": "Status",
"role": "Roles",
"access": "Technique types available",
"startech": "Starting techniques (2-5)",
"schoolab": "School ability",
"outfit": "Starting outfit",
"honor": "Honor",
"choogiri": "Select giri:",
"chooninjo": "Select ninjō:",
"or": "OR",
"incglory": "Glory increase",
"inchonor": "Honor increase",
"distinction": "Distinction (1)",
"adversity": "Adversity (1)",
"passion": "Passion (1)",
"anxiety": "Anxiety (1)",
"disadvant": "Disadvantage (1)",
"advant": "Advantage (1)",
"accoutr": "Personal accoutrement",
"object": "Item (Rarity 7 or lower)",
"d10r1": "D10 Result (1/2)",
"d10r2": "D10 Result (2/2)",
"generchar": "Generate a new character",
"part1": {
"title": "Part I: Core Identity (Clan and Family)",
"q1": "1. What clan does your character belong to? (p. 41)",
"q2": "2. What family does your character belong to? (p. 49)"
"q1": "1. What clan does your character belong to ? (p. 41)",
"q2": "2. What family does your character belong to ? (p. 49)"
},
"part2": {
"title": "Part II: Role and School",
"q3": "3. What is your characters school, and what roles does that school fall into?(p. 56)",
"q4": "4. How does your character stand out within their school?(p. 88)"
"q3": "3. What is your characters school, and what roles does that school fall into ? (p. 56)",
"q4": "4. How does your character stand out within their school ? (p. 88)"
},
"part3": {
"title": "Part III: Honor and Glory",
"q5": "5. Who is your lord and what is your characters duty to them? (p. 88)",
"q6": "6. What does your character long for, and how might this impede their duty? (p. 90)",
"q7": "7. What is your characters relationship with their clan?(p. 91)",
"q8": "8. What does your character think of Bushidō? (p. 91)"
"q5": "5. Who is your lord and what is your characters duty to them ? (p. 88)",
"q6": "6. What does your character long for, and how might this impede their duty ? (p. 90)",
"q7": "7. What is your characters relationship with their clan ? (p. 91)",
"q8": "8. What does your character think of Bushidō ? (p. 91)"
},
"part4": {
"title": "Part IV: Strengths and Weaknesses",
"q9": "9. What is your characters greatest accomplishment so far?(p. 92)",
"q10": "10. What holds your character back the most in life?(p. 92)",
"q11": "11. What activity Most makes your character feel at peace? (p. 92)",
"q12": "12. What concern, fear, or foible troubles your character the most? (p. 93)",
"q9": "9. What is your characters greatest accomplishment so far ? (p. 92)",
"q10": "10. What holds your character back the most in life ? (p. 92)",
"q11": "11. What activity Most makes your character feel at peace ? (p. 93)",
"q12": "12. What concern, fear, or foible troubles your character the most ? (p. 93)",
"q13": "13. Who has your character learned the most from during their life (p. 93)"
},
"part5": {
"title": "Part V: Personality and Behavior",
"q14": "14. What do people notice first upon encountering your character? (p. 93)",
"q15": "15. How does your character react to stressful situations? (p. 94)",
"q16": "16. What are your characters preexisting relationships with other clans, families, organizations, and traditions? (p. 94)"
"q15": "15. How does your character react to stressful situations ? (p. 94)",
"q16": "16. What are your characters preexisting relationships with other clans, families, organizations, and traditions ? (p. 94)"
},
"part6": {
"title": "Part VI: Ancestry and Family",
"q17": "17. How would your characters parents describe them? (p. 95)",
"q18": "18. Who was your character named to honor? (p. 95)",
"q19": "19. What is your characters personal name? (p. 95)"
"q17": "17. How would your characters parents describe them ? (p. 95)",
"q18": "18. Who was your character named to honor ? (p. 95)",
"q19": "19. What is your characters personal name ? (p. 95)"
},
"part7": {
"title": "Part VII: Death",
"q20": "20. How should your character die? (p. 95)"
"q20": "20. How should your character die ? (p. 95)"
}
}
}

View File

@@ -1,15 +1,12 @@
{
"i18n.language": "Español",
"i18n.maintainers": ["Team L5R"],
"settings.simplemacroshorthandn": "Macro sintaxis acortada",
"settings.simplemacroshorthandl": "Habilitar una sintaxis de macro abreviada que permita referenciar directamente los atributos, por ejemplo @str en lugar de @attributes.str.value. Deshabilitar esta configuración si se necesita la capacidad de referenciar el modelo de atributos completo, por ejemplo @attributes.str.label",
"settings.simpleinitformulan": "Fórmula de iniciativa",
"settings.simpleinitformulal": "Introduzca una fórmula de iniciativa, como d20+@dex",
"simple.notifyinitformulaupdated": "La fórmula de la iniciativa fue actualizada a:",
"simple.notifyinitformulainvalid": "La fórmula de la iniciativa fue inválida:",
"hexa.color": "Introduzca un color hexadecimal (como #FFFFFF)",
"ic.bg.color": "Color de fondo en el gato",
"ic.text.color": "Color del texto en el chat",
@@ -21,7 +18,6 @@
"other.text.color": "Otro color de texto",
"def.chat.pref": "Prefijo del chat por defecto",
"spe.chat.pref": "Si está configurado, la cadena será prefijada para todos los mensajes de chat que no sean ya comandos (como /emote.)",
"l5r5e": {
"logo": {
"título": "¿Necesitas ayuda?",
@@ -223,46 +219,81 @@
"twenty_questions": {
"title": "Twenty questions",
"bt_abrev": "20Q",
"intro": "You can use this sheet to fill in your answers to The Game of Twenty Questions, and to take notes for later!",
"section": "Legend of the Five Rings Core Rulebook, Chapter 2 : Creating a character, p. 41-95",
"incring1": "Ring increase (1)",
"incring2": "Ring increase (2)",
"incskill1": "Skill increases (1)",
"incskill2": "Skill increases (2)",
"incskill3": "Skill increases (3-5)",
"choosem": "Pick one",
"choosef": "Pick one",
"money": "Starting wealth :",
"glory": "Glory :",
"school": "School :",
"status": "Status",
"role": "Roles",
"access": "Technique types available",
"startech": "Starting techniques (2-5)",
"schoolab": "School ability",
"outfit": "Starting outfit",
"honor": "Honor",
"choogiri": "Select giri:",
"chooninjo": "Select ninjō:",
"or": "OR",
"incglory": "Glory increase",
"inchonor": "Honor increase",
"distinction": "Distinction (1)",
"adversity": "Adversity (1)",
"passion": "Passion (1)",
"anxiety": "Anxiety (1)",
"disadvant": "Disadvantage (1)",
"advant": "Advantage (1)",
"accoutr": "Personal accoutrement",
"object": "Item (Rarity 7 or lower)",
"d10r1": "D10 Result (1/2)",
"d10r2": "D10 Result (2/2)",
"generchar": "Generate a new character",
"part1": {
"title": "Partie I: Core Identity (Clan and Family)",
"q1": "1. What clan does your character belong to? (p. 41)",
"q2": "2. What family does your character belong to? (p. 49)"
"title": "Part I: Core Identity (Clan and Family)",
"q1": "1. What clan does your character belong to ? (p. 41)",
"q2": "2. What family does your character belong to ? (p. 49)"
},
"part2": {
"title": "Partie II: Role and School",
"q3": "3. 3. What is your characters school, and what roles does that school fall into?(p. 56)",
"q4": "4. How does your character stand out within their school?(p. 88)"
"title": "Part II: Role and School",
"q3": "3. What is your characters school, and what roles does that school fall into ? (p. 56)",
"q4": "4. How does your character stand out within their school ? (p. 88)"
},
"part3": {
"title": "Partie III: Honor and Glory",
"q5": "5. Who is your lord and what is your characters duty to them? (p. 88)",
"q6": "6. What does your character long for, and how might this impede their duty? (p. 90)",
"q7": "7. What is your characters relationship with their clan?(p. 91)",
"q8": "8. What does your character think of Bushidō? (p. 91)"
"title": "Part III: Honor and Glory",
"q5": "5. Who is your lord and what is your characters duty to them ? (p. 88)",
"q6": "6. What does your character long for, and how might this impede their duty ? (p. 90)",
"q7": "7. What is your characters relationship with their clan ? (p. 91)",
"q8": "8. What does your character think of Bushidō ? (p. 91)"
},
"part4": {
"title": "Partie IV: Strengths and Weaknesses",
"q9": "9. What is your characters greatest accomplishment so far?(p. 92)",
"q10": "10. What holds your character back the most in life?(p. 92)",
"q11": "11. What activity Most makes your character feel at peace? (p. 93)",
"q12": "12. What concern, fear, or foible troubles your character the most? (p. 93)",
"q13": "12. Who has your character learned the most from during their life(p. 93)"
"title": "Part IV: Strengths and Weaknesses",
"q9": "9. What is your characters greatest accomplishment so far ? (p. 92)",
"q10": "10. What holds your character back the most in life ? (p. 92)",
"q11": "11. What activity Most makes your character feel at peace ? (p. 93)",
"q12": "12. What concern, fear, or foible troubles your character the most ? (p. 93)",
"q13": "13. Who has your character learned the most from during their life (p. 93)"
},
"part5": {
"title": "Partie V: Personality and Behavior",
"title": "Part V: Personality and Behavior",
"q14": "14. What do people notice first upon encountering your character? (p. 93)",
"q15": "15. How does your character react to stressful situations? (p. 94)",
"q16": "16. What are your characters preexisting relationships with other clans, families, organizations, and traditions? (p. 94)"
"q15": "15. How does your character react to stressful situations ? (p. 94)",
"q16": "16. What are your characters preexisting relationships with other clans, families, organizations, and traditions ? (p. 94)"
},
"part6": {
"title": "Partie VI: Ancestry and Family",
"q17": "17. How would your characters parents describe them? (p. 95)",
"q18": "18. Who was your character named to honor? (p. 95)",
"q19": "19. What is your characters personal name? (p. 95)"
"title": "Part VI: Ancestry and Family",
"q17": "17. How would your characters parents describe them ? (p. 95)",
"q18": "18. Who was your character named to honor ? (p. 95)",
"q19": "19. What is your characters personal name ? (p. 95)"
},
"part7": {
"title": "Partie VII: Death",
"q20": "20. How should your character die? (p. 95)"
"title": "Part VII: Death",
"q20": "20. How should your character die ? (p. 95)"
}
}
}

View File

@@ -1,15 +1,12 @@
{
"i18n.language": "Français",
"i18n.maintainers": ["Team L5R"],
"settings.simplemacroshorthandn": "Macro syntaxe abrégée",
"settings.simplemacroshorthandl": "Activer une syntaxe de macro raccourcie qui permet de référencer directement les attributs, par exemple @str au lieu de @attributes.str.value. Désactivez ce paramètre si vous avez besoin de pouvoir référencer le modèle d'attribut complet, par exemple @attributes.str.label",
"settings.simpleinitformulan": "Formule d'initiative",
"settings.simpleinitformulal": "Entrez une formule d'initiative, telle que d20+@dex",
"simple.notifyinitformulaupdated": "La formule de l'initiative a été mise à jour pour :",
"simple.notifyinitformulainvalid": "La formule d'initiative suivante n'est pas valable :",
"hexa.color": "Entrer une couleur hexadécimale (telle que #FFFFFF).",
"ic.bg.color": "Couleur de fond dans le chat",
"ic.text.color": "Couleur du texte dans le chat",
@@ -21,7 +18,6 @@
"other.text.color": "Autre couleur de texte",
"def.chat.pref": "Préfixe de Chat par défaut",
"spe.chat.pref": "Si renseignée, la chaîne sera préfixée pour tous les messages de chat qui ne sont pas déjà des commandes (comme /emote.)",
"l5r5e": {
"global": {
"add": "Ajouter",
@@ -228,6 +224,41 @@
"twenty_questions": {
"title": "Vingt questions",
"bt_abrev": "20Q",
"intro": "Renseignez vos réponses au jeu des vingt questions sur ce formulaire et notez-y des éléments à utiliser ultérieurement !",
"section": "Livre de Règles de La Légende des Cinq Anneaux, Chapitre 2 : Création de personnage, p. 41-95",
"incring1": "Augmentation d'anneau (1)",
"incring2": "Augmentations d'anneau (2)",
"incskill1": "Augmentation de compétence (1)",
"incskill2": "Augmentations de compétences (2)",
"incskill3": "Augmentations de compétences (3-5)",
"choosem": "En choisir un",
"choosef": "En choisir une",
"money": "Fortune de départ :",
"glory": "Gloire :",
"school": "École :",
"status": "Statut",
"role": "Rôles",
"access": "Types de techniques accessibles",
"startech": "Techniques de départ (2-5)",
"schoolab": "Capacité d'école",
"outfit": "Équipement de départ",
"honor": "Honneur",
"choogiri": "Choisissez un giri:",
"chooninjo": "Choisissez un ninjō:",
"or": "OU",
"incglory": "Augmentation de la gloire (+5)",
"inchonor": "Augmentation de l'honneur (+10)",
"distinction": "Aptitude (1)",
"adversity": "Coup du sort (1)",
"passion": "Passion (1)",
"anxiety": "Défaillance (1)",
"disadvant": "Désavantage (1)",
"advant": "Avantage (1)",
"accoutr": "Particularités",
"object": "Objet (Rareté inférieur ou égale à 7)",
"d10r1": "Résultat du 1er D10",
"d10r2": "Résultat du 2eme D10",
"generchar": "Générer un nouveau personnage",
"part1": {
"title": "Partie I: Identité (clan et famille)",
"q1": "1. A quel clan appartient votre personnage ? (p. 41)",

View File

@@ -0,0 +1,29 @@
import { ItemSheetL5r5e } from "./item-sheet.js";
/**
* Commun class for Advantages / Disadvantages types
* @extends {ItemSheet}
*/
export class PeculiaritySheetL5r5e extends ItemSheetL5r5e {
/**
* Sub Types of Advantage/Disadvantage
*/
static SUB_TYPES = ["distinction", "passion", "adversity", "anxiety"];
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "peculiarity"],
template: CONFIG.L5r5e.paths.templates + "item/peculiarity-sheet.html",
width: 520,
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
});
}
getData() {
const sheetData = super.getData();
sheetData.data.dtypes = ["String", "Number", "Boolean"];
return sheetData;
}
}

View File

@@ -41,6 +41,36 @@ export class TwentyQuestionsDialog extends FormApplication {
this.datas = this._initFormDatas(actor);
}
/**
* Create drag-and-drop workflow handlers for this Application
* @return An array of DragDrop handlers
*/
_createDragDropHandlers() {
return [
new DragDrop({
dragSelector: ".item",
dropSelector: ".items",
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDropItem.bind(this, "item") },
}),
new DragDrop({
dragSelector: ".technique",
dropSelector: ".techniques",
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDropItem.bind(this, "technique") },
}),
new DragDrop({
dragSelector: ".peculiarity",
dropSelector: ".peculiarities",
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
callbacks: {
dragstart: this._onDragStart.bind(this),
drop: this._onDropItem.bind(this, "peculiarity"),
},
}),
];
}
/**
* Construct and return the data object used to render the HTML template for this form application.
* @param options
@@ -84,6 +114,43 @@ export class TwentyQuestionsDialog extends FormApplication {
// html.find('input[name="approach"]').on("click", async (event) => {});
}
/**
* Handle dropped items
*/
_onDropItem(type, event) {
console.log("*** _onDrop event", event, type);
if (!["item", "technique", "peculiarity"].includes(type)) {
return;
}
// Try to extract the data
// {type: "Item", id: "pC37smMSCqu3aSRM"}
let data;
try {
data = JSON.parse(event.dataTransfer.getData("text/plain"));
if (data.type !== "Item") return;
const item = game.items.get(data.id);
if (item.data.type !== type) {
return;
}
console.log("** OK ", item);
// sub_type === 'peculiarity'
} catch (err) {
return false;
}
// TODO
return false;
}
// _canDragDrop(event) {
// console.log("*** _canDragDrop event", event);
// return false;
// }
/**
* This method is called upon form submission after form data is validated
* @param event The initial triggering submission event
@@ -140,7 +207,7 @@ export class TwentyQuestionsDialog extends FormApplication {
// actorDatas = formData.step11_calms;
// actorDatas = formData.step11_passion;
// actorDatas = formData.step12_worries;
// actorDatas = formData.step12_failure;
// actorDatas = formData.step12_anxiety;
// actorDatas = formData.step13_most_learn;
// actorDatas = formData.step13_disadvantage;
// actorDatas = formData.step13_advantage;

View File

@@ -1,78 +1,88 @@
<form class="l5r5e dice-picker-dialog" autocomplete="off">
<!--TODO Localization !-->
<h1>{{localize 'l5r5e.twenty_questions.title'}}</h1>
<div>
Renseignez vos réponses au jeu des vingt questions sur ce formulaire et notez-y des éléments à utiliser
ultérieurement !
<br><i>Livre de Règles de La Légende des Cinq Anneaux, Chapitre 2 : Création de personnage, p. 41-95</i>
{{localize 'l5r5e.twenty_questions.intro'}}
<br><i> {{localize 'l5r5e.twenty_questions.section'}}</i>
</div>
<h2>{{localize 'l5r5e.twenty_questions.part1.title'}}</h2>
<div>
{{localize 'l5r5e.twenty_questions.part1.q1'}}
<input type="text" name="step1_clan" value="{{datas.step1_clan}}">
<label>
{{localize 'l5r5e.twenty_questions.part1.q1'}}
<input type="text" name="step1_clan" value="{{datas.step1_clan}}">
</label>
<div>
Augmentation d'Anneau (1)
<select name="rings">
<option value="none">En choisir un</option>
{{#each elementsList as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</select>
</div>
<div>
Augmentation de compétence (1)
<select name="skills">
<option value="none">En choisir une</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<label>
{{localize 'l5r5e.twenty_questions.incring1'}}
<select name="rings">
<option value="none">{{localize 'l5r5e.twenty_questions.choosem'}}</option>
{{#each elementsList as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</select>
</select>
</label>
</div>
<div>
<label>
Statut
<input type="number" name="step1_social_status" min="0" max="100" value="{{datas.step1_social_status}}" data-dtype="Number" placeholder="0">
{{localize 'l5r5e.twenty_questions.incskill1'}}
<select name="skills">
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</select>
</label>
</div>
<div>
<label>
{{localize 'l5r5e.twenty_questions.status'}}
<input type="number" name="step1_social_status" min="0" max="100" value="{{datas.step1_social_status}}"
data-dtype="Number" placeholder="0">
</label>
</div>
</div>
<div>
{{localize 'l5r5e.twenty_questions.part1.q2'}}
<input type="text" name="step2_family" value="{{datas.step2_family}}">
<label>
{{localize 'l5r5e.twenty_questions.part1.q2'}}
<input type="text" name="step2_family" value="{{datas.step2_family}}">
</label>
<div>
Augmentation d'Anneau (1)
<select name="rings">
<option value="none">En choisir un</option>
{{#each elementsList as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</select>
</div>
<div>
Augmentation de compétence (2)
<select name="skills">
<option value="none">En choisir une</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<label>
{{localize 'l5r5e.twenty_questions.incring1'}}
<select name="rings">
<option value="none">{{localize 'l5r5e.twenty_questions.choosem'}}</option>
{{#each elementsList as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</select>
</select>
</label>
</div>
<div>
<label>
{{localize 'l5r5e.twenty_questions.incskill2'}}
<select name="skills">
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</select>
</label>
<select name="skills">
<option value="none">En choisir une</option>
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
@@ -85,15 +95,17 @@
<div>
<label>
Fortune de départ :
<input type="text" name="step2_wealth" value="{{datas.step2_wealth}}" data-dtype="Number" placeholder="0">
{{localize 'l5r5e.twenty_questions.money'}}
<input type="text" name="step2_wealth" value="{{datas.step2_wealth}}" data-dtype="Number"
placeholder="0">
</label>
</div>
<div>
<label>
Gloire
<input type="number" name="step2_social_glory" min="0" max="100" value="{{datas.step2_social_glory}}" data-dtype="Number" placeholder="0">
{{localize 'l5r5e.twenty_questions.glory'}}
<input type="number" name="step2_social_glory" min="0" max="100" value="{{datas.step2_social_glory}}"
data-dtype="Number" placeholder="0">
</label>
</div>
</div>
@@ -104,34 +116,48 @@
{{localize 'l5r5e.twenty_questions.part2.q3'}}
<label>
École
{{localize 'l5r5e.twenty_questions.school'}}
<input type="text" name="step3_school" value="{{datas.step3_school}}">
</label>
<label>
Rôles
{{localize 'l5r5e.twenty_questions.role'}}
<input type="text" name="step3_roles" value="{{datas.step3_roles}}">
</label>
<div>
Augmentations d'Anneau (2)
<label>
{{localize 'l5r5e.twenty_questions.incring2'}}
<select name="rings">
<option value="none">{{localize 'l5r5e.twenty_questions.choosem'}}</option>
{{#each elementsList as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</select>
</label>
<select name="rings">
<option value="none">En choisir un</option>
{{#each elementsList as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</select>
<select name="rings">
<option value="none">En choisir un</option>
<option value="none">{{localize 'l5r5e.twenty_questions.choosem'}}</option>
{{#each elementsList as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</select>
</div>
<div>
Augmentations de compétence (3-5)
<label>
{{localize 'l5r5e.twenty_questions.incskill3'}}
<select name="skills">
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</select>
</label>
<select name="skills">
<option value="none">En choisir une</option>
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
@@ -141,7 +167,7 @@
{{/each}}
</select>
<select name="skills">
<option value="none">En choisir une</option>
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
@@ -151,7 +177,7 @@
{{/each}}
</select>
<select name="skills">
<option value="none">En choisir une</option>
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
@@ -161,17 +187,7 @@
{{/each}}
</select>
<select name="skills">
<option value="none">En choisir une</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</select>
<select name="skills">
<option value="none">En choisir une</option>
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
@@ -182,110 +198,147 @@
</select>
</div>
<!--TODO in feat or props ? -->
Types de techniques accessibles
{{localize 'l5r5e.twenty_questions.access'}}
<div>
{{localizeTechnique 'title'}}
{{#each techniquesList as |technique|}}
<label><input type="checkbox" name="step3_technique_{{technique}}">{{localizeTechnique technique}}</label>
<label>
<input type="checkbox" name="step3_technique_{{technique}}">
{{localizeTechnique technique}}
</label>
{{/each}}
</div>
<div>
Techniques de départ (2-5)
<textarea name="step3_techniques">{{datas.step3_techniques}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.startech'}}
<textarea name="step3_techniques">{{datas.step3_techniques}}</textarea>
</label>
<!-- TODO Drag n drop techniques-->
<div class="techniques 20q-droppable">
<span class="techniques 20q-droppable-text">
drop item here
</span>
{{datas.step3_techniques}}
</div>
</div>
<div>
Capacité d'école
<textarea name="step3_school_ability">{{datas.step3_school_ability}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.schoolab'}}
<textarea name="step3_school_ability">{{datas.step3_school_ability}}</textarea>
</label>
</div>
<div>
Équipement de départ
<textarea name="step3_equipment">{{datas.step3_equipment}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.outfit'}}
<textarea name="step3_equipment">{{datas.step3_equipment}}</textarea>
</label>
</div>
</div>
<div>
<label>
Honneur
<input type="number" name="step3_social_honor" min="0" max="100" value="{{datas.step3_social_honor}}" data-dtype="Number" placeholder="0">
{{localize 'l5r5e.twenty_questions.honor'}}
<input type="number" name="step3_social_honor" min="0" max="100" value="{{datas.step3_social_honor}}"
data-dtype="Number" placeholder="0">
</label>
</div>
<div>
{{localize 'l5r5e.twenty_questions.part2.q4'}}
<textarea name="step4_stand_out">{{datas.step4_stand_out}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part2.q4'}}
<textarea name="step4_stand_out">{{datas.step4_stand_out}}</textarea>
</label>
Augmentation d'Anneau (1)
<select name="rings">
<option value="none">En choisir un</option>
{{#each elementsList as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</select>
<label>
{{localize 'l5r5e.twenty_questions.incring1'}}
<select name="rings">
<option value="none">{{localize 'l5r5e.twenty_questions.choosem'}}</option>
{{#each elementsList as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</select>
</label>
</div>
<h2>{{localize 'l5r5e.twenty_questions.part3.title'}}</h2>
<div>
{{localize 'l5r5e.twenty_questions.part3.q5'}}
Choisissez un giri:
<textarea name="step5_social_giri">{{datas.step5_social_giri}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.choogiri'}}
<textarea name="step5_social_giri">{{datas.step5_social_giri}}</textarea>
</label>
</div>
<div>
{{localize 'l5r5e.twenty_questions.part3.q6'}}
Choisissez un ninjō:
<textarea name="step6_social_ninjo">{{datas.step6_social_ninjo}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.chooninjo'}}
<textarea name="step6_social_ninjo">{{datas.step6_social_ninjo}}</textarea>
</label>
</div>
<div>
{{localize 'l5r5e.twenty_questions.part3.q7'}}
<textarea name="step7_clan_relations">{{datas.step7_clan_relations}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part3.q7'}}
<textarea name="step7_clan_relations">{{datas.step7_clan_relations}}</textarea>
</label>
<div>
Augmentation de compétence (1)
<select name="skills">
<option value="none">En choisir une</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
<label>
{{localize 'l5r5e.twenty_questions.incskill1'}}
<select name="skills">
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</optgroup>
{{/each}}
</select>
</select>
</label>
OU
{{localize 'l5r5e.twenty_questions.or'}}
<label>
Augmentation de la gloire (+5)
<input type="number" name="step7_social_add_glory" value="{{datas.step7_social_add_glory}}" data-dtype="Number" placeholder="0">
{{localize 'l5r5e.twenty_questions.incglory'}}
<input type="number" name="step7_social_add_glory" value="{{datas.step7_social_add_glory}}"
data-dtype="Number" placeholder="0">
</label>
</div>
</div>
<div>
{{localize 'l5r5e.twenty_questions.part3.q8'}}
<textarea name="step8_bushido">{{datas.step8_bushido}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part3.q8'}}
<textarea name="step8_bushido">{{datas.step8_bushido}}</textarea>
</label>
<div>
Augmentation de compétence (1)
<select name="skills">
<option value="none">En choisir une</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
<label>
{{localize 'l5r5e.twenty_questions.incskill1'}}
<select name="skills">
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</optgroup>
{{/each}}
</select>
</select>
</label>
OU
{{localize 'l5r5e.twenty_questions.or'}}
<label>
Augmentation de l'honneur (+10)
<input type="number" name="step8_social_add_honor" value="{{datas.step8_social_add_honor}}" data-dtype="Number" placeholder="0">
{{localize 'l5r5e.twenty_questions.inchonor'}}
<input type="number" name="step8_social_add_honor" value="{{datas.step8_social_add_honor}}"
data-dtype="Number" placeholder="0">
</label>
</div>
</div>
@@ -293,41 +346,135 @@
<h2>{{localize 'l5r5e.twenty_questions.part4.title'}}</h2>
<div>
{{localize 'l5r5e.twenty_questions.part4.q9'}}
<textarea name="step9_success">{{datas.step9_success}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part4.q9'}}
<textarea name="step9_success">{{datas.step9_success}}</textarea>
</label>
Aptitude (1)
<textarea name="step9_distinction">{{datas.step9_distinction}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.distinction'}}
<textarea name="step9_distinction">{{datas.step9_distinction}}</textarea>
</label>
<!-- TODO Drag n drop disadv/distinction-->
</div>
<div>
{{localize 'l5r5e.twenty_questions.part4.q10'}}
<textarea name="step10_difficulty">{{datas.step10_difficulty}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part4.q10'}}
<textarea name="step10_difficulty">{{datas.step10_difficulty}}</textarea>
</label>
Coup du sort (1)
<textarea name="step10_adversity">{{datas.step10_adversity}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.adversity'}}
<textarea name="step10_adversity">{{datas.step10_adversity}}</textarea>
</label>
<!-- TODO Drag n drop disadv/adversity-->
</div>
<div>
{{localize 'l5r5e.twenty_questions.part4.q11'}}
<textarea name="step11_calms">{{datas.step11_calms}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part4.q11'}}
<textarea name="step11_calms">{{datas.step11_calms}}</textarea>
</label>
Passion (1)
<textarea name="step11_passion">{{datas.step11_passion}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.passion'}}
<textarea name="step11_passion">{{datas.step11_passion}}</textarea>
</label>
<!-- TODO Drag n drop disadv/passion-->
</div>
<div>
{{localize 'l5r5e.twenty_questions.part4.q12'}}
<textarea name="step12_worries">{{datas.step12_worries}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part4.q12'}}
<textarea name="step12_worries">{{datas.step12_worries}}</textarea>
</label>
Défaillance (1)
<textarea name="step12_failure">{{datas.step12_failure}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.anxiety'}}
<textarea name="step12_anxiety">{{datas.step12_anxiety}}</textarea>
</label>
<!-- TODO Drag n drop disadv/anxiety-->
</div>
<div>
{{localize 'l5r5e.twenty_questions.part4.q13'}}
<textarea name="step13_most_learn">{{datas.step13_most_learn}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part4.q13'}}
<textarea name="step13_most_learn">{{datas.step13_most_learn}}</textarea>
</label>
<div>
Augmentation de compétence (1)
<label>
{{localize 'l5r5e.twenty_questions.incskill1'}}
<select name="skills">
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</select>
</label>
{{localize 'l5r5e.twenty_questions.or'}}
<label>
{{localize 'l5r5e.twenty_questions.advant'}}
<textarea name="step13_advantage">{{datas.step13_advantage}}</textarea>
</label>
<!-- TODO Drag n drop advantage-->
</div>
<div>
<label>
{{localize 'l5r5e.twenty_questions.disadvant'}}
<textarea name="step13_disadvantage">{{datas.step13_disadvantage}}</textarea>
</label>
<!-- TODO Drag n drop disadvantage-->
</div>
</div>
<h2>{{localize 'l5r5e.twenty_questions.part5.title'}}</h2>
<div>
<label>
{{localize 'l5r5e.twenty_questions.part5.q14'}}
<textarea name="step14_first_sight">{{datas.step14_first_sight}}</textarea>
</label>
<label>
{{localize 'l5r5e.twenty_questions.accoutr'}}
<textarea name="step14_special_features">{{datas.step14_special_features}}</textarea>
</label>
</div>
<div>
<label>
{{localize 'l5r5e.twenty_questions.part5.q15'}}
<textarea name="step15_stress">{{datas.step15_stress}}</textarea>
</label>
</div>
<div>
<label>
{{localize 'l5r5e.twenty_questions.part5.q16'}}
<textarea name="step16_relations">{{datas.step16_relations}}</textarea>
</label>
<label>
{{localize 'l5r5e.twenty_questions.object'}}
<textarea name="step16_item">{{datas.step16_item}}</textarea>
<!-- TODO Drag n drop item-->
</label>
</div>
<h2>{{localize 'l5r5e.twenty_questions.part6.title'}}</h2>
<div>
<label>
{{localize 'l5r5e.twenty_questions.part6.q17'}}
<textarea name="step17_parents_pov">{{datas.step17_parents_pov}}</textarea>
</label>
<label>
{{localize 'l5r5e.twenty_questions.incskill1'}}
<select name="skills">
<option value="none">En choisir une</option>
<option value="none">{{localize 'l5r5e.twenty_questions.choosef'}}</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
@@ -336,85 +483,50 @@
</optgroup>
{{/each}}
</select>
Désavantage (1)
<textarea name="step13_disadvantage">{{datas.step13_disadvantage}}</textarea>
</div>
<div>
OU
Avantage (1)
<textarea name="step13_advantage">{{datas.step13_advantage}}</textarea>
</div>
</div>
<h2>{{localize 'l5r5e.twenty_questions.part5.title'}}</h2>
<div>
{{localize 'l5r5e.twenty_questions.part5.q14'}}
<textarea name="step14_first_sight">{{datas.step14_first_sight}}</textarea>
Particularités
<textarea name="step14_special_features">{{datas.step14_special_features}}</textarea>
</label>
</div>
<div>
{{localize 'l5r5e.twenty_questions.part5.q15'}}
<textarea name="step15_stress">{{datas.step15_stress}}</textarea>
</div>
<div>
{{localize 'l5r5e.twenty_questions.part5.q16'}}
<textarea name="step16_relations">{{datas.step16_relations}}</textarea>
Objet (Rareté inférieur ou égale à 7)
<textarea name="step16_item">{{datas.step16_item}}</textarea>
</div>
<h2>{{localize 'l5r5e.twenty_questions.part6.title'}}</h2>
<div>
{{localize 'l5r5e.twenty_questions.part6.q17'}}
<textarea name="step17_parents_pov">{{datas.step17_parents_pov}}</textarea>
Augmentation de compétence (1)
<select name="skills">
<option value="none">En choisir une</option>
{{#each skillsList as |skills catId|}}
<optgroup label="{{localizeSkill catId 'title'}}">
{{#each skills as |obj|}}
<option value="{{obj.id}}">{{obj.label}}</option>
{{/each}}
</optgroup>
{{/each}}
</select>
</div>
<div>
{{localize 'l5r5e.twenty_questions.part6.q18'}}
<textarea name="step18_heritage_name">{{datas.step18_heritage_name}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part6.q18'}}
<textarea name="step18_heritage_name">{{datas.step18_heritage_name}}</textarea>
</label>
<label>
Résultat du 1er D10 [[/r 1d10]]
{{localize 'l5r5e.twenty_questions.d10r1'}}
<a class="inline-roll roll" title="1d10" data-mode="roll"
data-flavor="{{localize 'l5r5e.twenty_questions.d10r1'}}" data-formula="1d10">
<i class="fas fa-dice-d20"></i> 1d10
</a>
<input type="number" name="step18_heritage_1" value="{{datas.step18_heritage_1}}" data-dtype="Number">
</label>
<label>
Résultat du 2eme D10 [[/r 1d10]]
{{localize 'l5r5e.twenty_questions.d10r2'}}
<a class="inline-roll roll" title="1d10" data-mode="roll"
data-flavor="{{localize 'l5r5e.twenty_questions.d10r2'}}" data-formula="1d10">
<i class="fas fa-dice-d20"></i> 1d10
</a>
<input type="number" name="step18_heritage_2" value="{{datas.step18_heritage_2}}" data-dtype="Number">
</label>
</div>
<div>
{{localize 'l5r5e.twenty_questions.part6.q19'}}
<textarea name="step19_firstname">{{datas.step19_firstname}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part6.q19'}}
<textarea name="step19_firstname">{{datas.step19_firstname}}</textarea>
</label>
</div>
<h2>{{localize 'l5r5e.twenty_questions.part7.title'}}</h2>
<div>
{{localize 'l5r5e.twenty_questions.part7.q20'}}
<textarea name="step20_death">{{datas.step20_death}}</textarea>
<label>
{{localize 'l5r5e.twenty_questions.part7.q20'}}
<textarea name="step20_death">{{datas.step20_death}}</textarea>
</label>
</div>
<div class="form-group">
<button name="submit" type="submit">
Générer un nouveau personnage <i class='fas fa-arrow-circle-right'></i>
{{localize 'l5r5e.twenty_questions.generchar'}} <i class='fas fa-arrow-circle-right'></i>
</button>
</div>
</form>