20Q added step18 status, honor and glory for modifier
This commit is contained in:
@@ -311,7 +311,7 @@
|
||||
"choose_one_skill": "Pick one",
|
||||
"or": "OR",
|
||||
"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"
|
||||
},
|
||||
"part1": {
|
||||
@@ -319,13 +319,13 @@
|
||||
"q1": "1. What clan does your character belong to ? (p. 41)",
|
||||
"status": "Status",
|
||||
"q2": "2. What family does your character belong to ? (p. 49)",
|
||||
"money": "Starting wealth in Koku :",
|
||||
"glory": "Glory :"
|
||||
"money": "Starting wealth in Koku",
|
||||
"glory": "Glory"
|
||||
},
|
||||
"part2": {
|
||||
"title": "Part II: Role and School",
|
||||
"q3": "3. What is your character’s school, and what roles does that school fall into ? (p. 56)",
|
||||
"school": "School :",
|
||||
"school": "School",
|
||||
"role": "Roles",
|
||||
"honor": "Honor",
|
||||
"access": "Technique types available",
|
||||
@@ -372,8 +372,9 @@
|
||||
"q17": "17. How would your character’s parents describe them ? (p. 95)",
|
||||
"q18": "18. Who was your character named to honor ? (p. 95)",
|
||||
"d10r1": "D10 Result (1/2)",
|
||||
"d10r1_choice": "1st D10 Effect",
|
||||
"d10r2": "D10 Result (2/2)",
|
||||
"d10r2_choice": "2nd D10 Effect:",
|
||||
"d10r2_choice": "2nd D10 Effect",
|
||||
"q19": "19. What is your character’s personal name ? (p. 95)"
|
||||
},
|
||||
"part7": {
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
"choose_one_skill": "Pick one",
|
||||
"or": "OR",
|
||||
"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"
|
||||
},
|
||||
"part1": {
|
||||
@@ -319,13 +319,13 @@
|
||||
"q1": "1. What clan does your character belong to ? (p. 41)",
|
||||
"status": "Status",
|
||||
"q2": "2. What family does your character belong to ? (p. 49)",
|
||||
"money": "Starting wealth in Koku :",
|
||||
"glory": "Glory :"
|
||||
"money": "Starting wealth in Koku",
|
||||
"glory": "Glory"
|
||||
},
|
||||
"part2": {
|
||||
"title": "Part II: Role and School",
|
||||
"q3": "3. What is your character’s school, and what roles does that school fall into ? (p. 56)",
|
||||
"school": "School :",
|
||||
"school": "School",
|
||||
"role": "Roles",
|
||||
"honor": "Honor",
|
||||
"access": "Technique types available",
|
||||
@@ -372,8 +372,9 @@
|
||||
"q17": "17. How would your character’s parents describe them ? (p. 95)",
|
||||
"q18": "18. Who was your character named to honor ? (p. 95)",
|
||||
"d10r1": "D10 Result (1/2)",
|
||||
"d10r1_choice": "1st D10 Effect",
|
||||
"d10r2": "D10 Result (2/2)",
|
||||
"d10r2_choice": "2nd D10 Effect:",
|
||||
"d10r2_choice": "2nd D10 Effect",
|
||||
"q19": "19. What is your character’s personal name ? (p. 95)"
|
||||
},
|
||||
"part7": {
|
||||
@@ -382,7 +383,7 @@
|
||||
"summary": "Summary",
|
||||
"generchar": "Generate the character",
|
||||
"generchar_disclaimer": "Warning, this will erase character's current datas !",
|
||||
"generchar_errors": "Correct the errors before continuing !"
|
||||
"generchar_errors": "Clear errors before continuing !"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,13 +319,13 @@
|
||||
"q1": "1. A quel clan appartient votre personnage ? (p. 41)",
|
||||
"status": "Statut",
|
||||
"q2": "2. A quelle famille appartient votre personnage ? (p. 49)",
|
||||
"money": "Fortune de départ en Koku :",
|
||||
"glory": "Gloire :"
|
||||
"money": "Fortune de départ en Koku",
|
||||
"glory": "Gloire"
|
||||
},
|
||||
"part2": {
|
||||
"title": "Partie II: Rôle et École",
|
||||
"q3": "3. Quelle est l'École votre personnage, et quel rôle remplit-elle ? (p. 56)",
|
||||
"school": "École :",
|
||||
"school": "École",
|
||||
"role": "Rôles",
|
||||
"honor": "Honneur",
|
||||
"access": "Types de techniques accessibles",
|
||||
@@ -337,9 +337,9 @@
|
||||
"part3": {
|
||||
"title": "Partie III: Honneur et Gloire",
|
||||
"q5": "5. Qui est le seigneur de votre personnage et quel est le devoir de votre personnage envers lui ? (p. 88)",
|
||||
"choose_giri": "Choisissez un giri:",
|
||||
"choose_giri": "Choisissez un giri",
|
||||
"q6": "6. Que désire votre personnage, et en quoi ce désir risque-t-il de l’empêcher d’accomplir son devoir ? (p. 90)",
|
||||
"choose_ninjo": "Choisissez un ninjō:",
|
||||
"choose_ninjo": "Choisissez un ninjō",
|
||||
"q7": "7. Quelle relation votre personnage entretient-il avec son clan ? (p. 91)",
|
||||
"increase_glory": "Augmentation de la gloire (+5)",
|
||||
"q8": "8. Que pense votre personnage du bushido ? (p. 91)",
|
||||
@@ -372,8 +372,9 @@
|
||||
"q17": "17. Comment les parents de votre personnage le décriraient-ils ? (p. 95)",
|
||||
"q18": "18. En l’honneur de qui votre personnage a-t-il été prénommé ? (p. 95)",
|
||||
"d10r1": "Résultat du 1er D10",
|
||||
"d10r1_choice": "Effet du 1er D10",
|
||||
"d10r2": "Résultat du 2eme D10",
|
||||
"d10r2_choice": "Effet du 2ème D10:",
|
||||
"d10r2_choice": "Effet du 2ème D10",
|
||||
"q19": "19. Quel est le prénom de votre personnage ? (p. 95)"
|
||||
},
|
||||
"part7": {
|
||||
|
||||
@@ -123,16 +123,7 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
e.type === "technique" && e.data.data.technique_type === item.data.data.technique_type
|
||||
)
|
||||
) {
|
||||
new Dialog({
|
||||
title: game.i18n.localize("l5r5e.techniques.title"),
|
||||
content: game.i18n.localize("l5r5e.techniques.only_one"),
|
||||
buttons: {
|
||||
ok: {
|
||||
label: game.i18n.localize("l5r5e.global.ok"),
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
},
|
||||
},
|
||||
}).render(true);
|
||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.only_one"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -143,16 +134,7 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
} else {
|
||||
// Check if technique is allowed for this character
|
||||
if (!game.user.isGM && !this.actor.data.data.techniques[item.data.data.technique_type]) {
|
||||
new Dialog({
|
||||
title: game.i18n.localize("l5r5e.techniques.title"),
|
||||
content: game.i18n.localize("l5r5e.techniques.not_allowed"),
|
||||
buttons: {
|
||||
ok: {
|
||||
label: game.i18n.localize("l5r5e.global.ok"),
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
},
|
||||
},
|
||||
}).render(true);
|
||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
classes: ["l5r5e", "twenty-questions-dialog"],
|
||||
template: CONFIG.l5r5e.paths.templates + "actors/twenty-questions-dialog.html",
|
||||
title: game.i18n.localize("l5r5e.twenty_questions.title"),
|
||||
width: 600,
|
||||
width: 700,
|
||||
height: 800,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "part0" }],
|
||||
resizable: true,
|
||||
@@ -237,7 +237,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
}
|
||||
} else if (!this.object.data.step3.allowed_techniques?.[item.data.data.technique_type]) {
|
||||
// Tech not allowed
|
||||
console.warn("This technique is not allowed for your character", item.data.data.technique_type);
|
||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -149,6 +149,9 @@ export class TwentyQuestions {
|
||||
heritage_1: null,
|
||||
heritage_2: null,
|
||||
heritage_item: [],
|
||||
heritage_add_honor: 0,
|
||||
heritage_add_glory: 0,
|
||||
heritage_add_status: 0,
|
||||
},
|
||||
step19: {
|
||||
firstname: "",
|
||||
@@ -213,6 +216,18 @@ export class TwentyQuestions {
|
||||
const actorDatas = actor.data.data;
|
||||
const formData = this.data;
|
||||
|
||||
const status = parseInt(formData.step1.social_status) + parseInt(formData.step18.heritage_add_status);
|
||||
|
||||
const glory =
|
||||
parseInt(formData.step2.social_glory) +
|
||||
parseInt(formData.step7.social_add_glory) +
|
||||
parseInt(formData.step18.heritage_add_glory);
|
||||
|
||||
const honor =
|
||||
parseInt(formData.step3.social_honor) +
|
||||
parseInt(formData.step8.social_add_honor) +
|
||||
parseInt(formData.step18.heritage_add_honor);
|
||||
|
||||
// Update the actor
|
||||
actorDatas.zeni = Math.floor(formData.step2.wealth * 50);
|
||||
actorDatas.identity = {
|
||||
@@ -225,9 +240,9 @@ export class TwentyQuestions {
|
||||
|
||||
actorDatas.social = {
|
||||
...actorDatas.social,
|
||||
status: formData.step1.social_status,
|
||||
glory: formData.step2.social_glory,
|
||||
honor: formData.step3.social_honor,
|
||||
status: status,
|
||||
glory: glory,
|
||||
honor: honor,
|
||||
giri: formData.step5.social_giri,
|
||||
ninjo: formData.step6.social_ninjo,
|
||||
};
|
||||
@@ -298,6 +313,9 @@ export class TwentyQuestions {
|
||||
summary: {
|
||||
rings: [],
|
||||
skills: [],
|
||||
status: 0,
|
||||
glory: 0,
|
||||
honor: 0,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -332,6 +350,18 @@ export class TwentyQuestions {
|
||||
return a.localeCompare(b);
|
||||
});
|
||||
|
||||
out.summary.status = parseInt(this.data.step1.social_status) + parseInt(this.data.step18.heritage_add_status);
|
||||
|
||||
out.summary.glory =
|
||||
parseInt(this.data.step2.social_glory) +
|
||||
parseInt(this.data.step7.social_add_glory) +
|
||||
parseInt(this.data.step18.heritage_add_glory);
|
||||
|
||||
out.summary.honor =
|
||||
parseInt(this.data.step3.social_honor) +
|
||||
parseInt(this.data.step8.social_add_honor) +
|
||||
parseInt(this.data.step18.heritage_add_honor);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -23,7 +23,7 @@ body {
|
||||
}
|
||||
&.twenty-questions-dialog {
|
||||
.window-content {
|
||||
background: url(https://localhost:30000/systems/l5r5e/assets/imgs/bg20Q.webp) no-repeat;
|
||||
background: url("../assets/imgs/bg20Q.webp") no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,15 +527,33 @@
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td>
|
||||
{{localize 'l5r5e.twenty_questions.part6.d10r1_choice'}}
|
||||
</td>
|
||||
<td>
|
||||
{{localize 'l5r5e.twenty_questions.part6.d10r2_choice'}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="third">
|
||||
<td>
|
||||
<label>
|
||||
{{localize 'l5r5e.twenty_questions.part1.status'}}
|
||||
<input type="number" name="step18.heritage_add_status" min="-100" max="100" value="{{data.step18.heritage_add_status}}"
|
||||
data-dtype="Number" placeholder="0">
|
||||
</label>
|
||||
<label>
|
||||
{{localize 'l5r5e.twenty_questions.part1.glory'}}
|
||||
<input type="number" name="step18.heritage_add_glory" min="-100" max="100" value="{{data.step18.heritage_add_glory}}"
|
||||
data-dtype="Number" placeholder="0">
|
||||
</label>
|
||||
<label>
|
||||
{{localize 'l5r5e.twenty_questions.part2.honor'}}
|
||||
<input type="number" name="step18.heritage_add_honor" min="-100" max="100" value="{{data.step18.heritage_add_honor}}"
|
||||
data-dtype="Number" placeholder="0">
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>
|
||||
{{localize 'l5r5e.twenty_questions.increase_skill1'}}
|
||||
<select name="step18.skill" class="skill-select">
|
||||
@@ -551,11 +569,7 @@
|
||||
{{/select}}
|
||||
</select>
|
||||
</label>
|
||||
</td>
|
||||
<td class="or">
|
||||
{{localize 'l5r5e.twenty_questions.or'}}
|
||||
</td>
|
||||
<td class="">
|
||||
|
||||
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step18.heritage_item stepName='step18.heritage_item' itemType='items' hideDndAt=1 }}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -597,14 +611,14 @@
|
||||
</td>
|
||||
<td>
|
||||
{{localize 'l5r5e.twenty_questions.part1.status'}}
|
||||
{{data.step1.social_status}}
|
||||
{{summary.summary.status}}
|
||||
|
||||
{{localize 'l5r5e.twenty_questions.part1.glory'}}
|
||||
{{data.step2.social_glory}} {{#if data.step7.social_add_glory}} + {{data.step7.social_add_glory}}{{/if}}
|
||||
|
||||
{{summary.summary.glory}}
|
||||
|
||||
{{localize 'l5r5e.twenty_questions.part2.honor'}}
|
||||
{{data.step3.social_honor}} {{#if data.step8.social_add_honor}} + {{data.step8.social_add_honor}}{{/if}}
|
||||
|
||||
{{summary.summary.honor}}
|
||||
|
||||
{{localize 'l5r5e.twenty_questions.part1.money'}}
|
||||
{{data.step2.wealth}}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user