Fix for Q13: "skill and disadv" OR "adv"
This commit is contained in:
@@ -311,6 +311,7 @@
|
|||||||
"choose_one_ring": "Pick one",
|
"choose_one_ring": "Pick one",
|
||||||
"choose_one_skill": "Pick one",
|
"choose_one_skill": "Pick one",
|
||||||
"or": "OR",
|
"or": "OR",
|
||||||
|
"and": "AND",
|
||||||
"part0": {
|
"part0": {
|
||||||
"intro": "You can use this sheet to fill in your answers to The Game of Twenty Questions, and to take notes for later !",
|
"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"
|
"section": "Legend of the Five Rings Core Rulebook, Chapter 2 : Creating a character, p. 41-95"
|
||||||
|
|||||||
@@ -311,6 +311,7 @@
|
|||||||
"choose_one_ring": "Pick one",
|
"choose_one_ring": "Pick one",
|
||||||
"choose_one_skill": "Pick one",
|
"choose_one_skill": "Pick one",
|
||||||
"or": "OR",
|
"or": "OR",
|
||||||
|
"and": "AND",
|
||||||
"part0": {
|
"part0": {
|
||||||
"intro": "You can use this sheet to fill in your answers to The Game of Twenty Questions, and to take notes for later !",
|
"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"
|
"section": "Legend of the Five Rings Core Rulebook, Chapter 2 : Creating a character, p. 41-95"
|
||||||
|
|||||||
@@ -311,6 +311,7 @@
|
|||||||
"choose_one_ring": "En choisir un",
|
"choose_one_ring": "En choisir un",
|
||||||
"choose_one_skill": "En choisir une",
|
"choose_one_skill": "En choisir une",
|
||||||
"or": "OU",
|
"or": "OU",
|
||||||
|
"and": "ET",
|
||||||
"part0": {
|
"part0": {
|
||||||
"intro": "Renseignez vos réponses au jeu des vingt questions sur ce formulaire et notez-y des éléments à utiliser ultérieurement !",
|
"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"
|
"section": "Livre de Règles de La Légende des Cinq Anneaux, Chapitre 2 : Création de personnage, p. 41-95"
|
||||||
|
|||||||
@@ -312,8 +312,10 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
// Check "Or" conditions
|
// Check "Or" conditions
|
||||||
formData["step7.social_add_glory"] = formData["step7.skill"] === "none" ? 5 : 0;
|
formData["step7.social_add_glory"] = formData["step7.skill"] === "none" ? 5 : 0;
|
||||||
formData["step8.social_add_honor"] = formData["step8.skill"] === "none" ? 10 : 0;
|
formData["step8.social_add_honor"] = formData["step8.skill"] === "none" ? 10 : 0;
|
||||||
if (formData["step13.skill"] !== "none" && this.object.data.step13.advantage.length > 0) {
|
|
||||||
|
if (this.object.data.step13.advantage.length > 0) {
|
||||||
formData["step13.skill"] = "none";
|
formData["step13.skill"] = "none";
|
||||||
|
setProperty(this.object.data, "step13.disadvantage", []);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update 20Q object data
|
// Update 20Q object data
|
||||||
|
|||||||
@@ -45,13 +45,12 @@ export class HelpDialog extends FormApplication {
|
|||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
["edge", "drivethrurpg", "discord"].forEach((name) => {
|
html.find(`button`).on("click", (event) => {
|
||||||
html.find(`button[name='${name}']`).on("click", (event) => {
|
event.preventDefault();
|
||||||
event.preventDefault();
|
event.stopPropagation();
|
||||||
event.stopPropagation();
|
const name = $(event.currentTarget).data("type");
|
||||||
ui.notifications.info(game.i18n.localize(`l5r5e.logo.${name}-info`));
|
ui.notifications.info(game.i18n.localize(`l5r5e.logo.${name}-info`));
|
||||||
window.open(game.i18n.localize(`l5r5e.logo.${name}-link`), "_blank");
|
window.open(game.i18n.localize(`l5r5e.logo.${name}-link`), "_blank");
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -422,9 +422,14 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="third">
|
<td class="third">
|
||||||
|
{{localize 'l5r5e.twenty_questions.part4.disadvantage'}}
|
||||||
|
{{#ifCond data.step13.advantage.length '==' 0}}
|
||||||
|
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step13.disadvantage stepName='step13.disadvantage' itemType='peculiarities' hideDndAt=1 }}
|
||||||
|
{{/ifCond}}
|
||||||
|
{{localize 'l5r5e.twenty_questions.and'}}<br />
|
||||||
<label>
|
<label>
|
||||||
{{localize 'l5r5e.twenty_questions.increase_skill1'}}
|
{{localize 'l5r5e.twenty_questions.increase_skill1'}}
|
||||||
<select name="step13.skill" class="skill-select">
|
<select name="step13.skill" class="skill-select" {{#ifCond data.step13.advantage.length '>' 0}}disabled{{/ifCond}}>
|
||||||
{{#select data.step13.skill}}
|
{{#select data.step13.skill}}
|
||||||
<option value="none">{{localize 'l5r5e.twenty_questions.choose_one_skill'}}</option>
|
<option value="none">{{localize 'l5r5e.twenty_questions.choose_one_skill'}}</option>
|
||||||
{{#ifCond cache.step13.advantage.length '==' '0'}}
|
{{#ifCond cache.step13.advantage.length '==' '0'}}
|
||||||
@@ -445,12 +450,12 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="">
|
<td class="">
|
||||||
{{localize 'l5r5e.twenty_questions.part4.advantage'}}
|
{{localize 'l5r5e.twenty_questions.part4.advantage'}}
|
||||||
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step13.advantage stepName='step13.advantage' itemType='peculiarities' hideDndAt=1 }}
|
{{#ifCond (ifCond data.step13.disadvantage.length '==' 0) '&&' (ifCond data.step13.skill '==' 'none')}}
|
||||||
|
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step13.advantage stepName='step13.advantage' itemType='peculiarities' hideDndAt=1 }}
|
||||||
|
{{/ifCond}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{{localize 'l5r5e.twenty_questions.part4.disadvantage'}}
|
|
||||||
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step13.disadvantage stepName='step13.disadvantage' itemType='peculiarities' hideDndAt=1 }}
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br /><button class="next" name="next" type="button">{{localize 'l5r5e.twenty_questions.bt_next'}} <i class='fas fa-arrow-right'></i></button>
|
<br /><button class="next" name="next" type="button">{{localize 'l5r5e.twenty_questions.bt_next'}} <i class='fas fa-arrow-right'></i></button>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<form class="l5r5e help-dialog" autocomplete="off">
|
<form class="l5r5e help-dialog" autocomplete="off">
|
||||||
<p>{{localize 'l5r5e.logo.content'}}</p>
|
<p>{{localize 'l5r5e.logo.content'}}</p>
|
||||||
|
|
||||||
<button name="edge"><i class="fas fa-check"></i> {{localize 'l5r5e.logo.edge'}}</button>
|
<button name="edge" data-type="edge"><i class="fas fa-check"></i> {{localize 'l5r5e.logo.edge'}}</button>
|
||||||
|
|
||||||
<button name="drivethrurpg"><i class="fas fa-check"></i> {{localize 'l5r5e.logo.drivethrurpg'}}</button>
|
<button name="drivethrurpg" data-type="drivethrurpg"><i class="fas fa-check"></i> {{localize 'l5r5e.logo.drivethrurpg'}}</button>
|
||||||
|
|
||||||
<button name="discord"><i class="fas fa-check"></i> {{localize 'l5r5e.logo.discord'}}</button>
|
<button name="discord" data-type="discord"><i class="fas fa-check"></i> {{localize 'l5r5e.logo.discord'}}</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user