Fix for Q13: "skill and disadv" OR "adv"

This commit is contained in:
Vlyan
2021-01-06 10:57:46 +01:00
parent c474015e5c
commit 0a1750de30
7 changed files with 24 additions and 15 deletions

View File

@@ -312,8 +312,10 @@ export class TwentyQuestionsDialog extends FormApplication {
// Check "Or" conditions
formData["step7.social_add_glory"] = formData["step7.skill"] === "none" ? 5 : 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";
setProperty(this.object.data, "step13.disadvantage", []);
}
// Update 20Q object data