Fix for rounded vigilance (now ceil instead of floor)

Fix for symbol replaced once
Added 20Q 2nd die skill or tech/item...
This commit is contained in:
Vlyan
2021-01-03 18:12:54 +01:00
parent 791a98eb3c
commit bafa0fb995
12 changed files with 77 additions and 26 deletions

View File

@@ -193,13 +193,20 @@ export class TwentyQuestionsDialog extends FormApplication {
console.warn("event stepKey is undefined");
return;
}
try {
// Get item
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
if (item.entity !== "Item" || !item) {
console.warn("forbidden item for this drop zone", type, item.data.type);
return;
}
// Specific step18_heritage, all item/tech allowed
if (stepKey === "step18.heritage_item") {
type = item.data.type;
}
if (
item.entity !== "Item" ||
!item ||
(type !== "item" && item.data.type !== type) ||
(type === "item" && !["item", "weapon", "armor"].includes(item.data.type))
) {

View File

@@ -23,6 +23,7 @@ export class TwentyQuestions {
"step8.skill",
"step13.skill",
"step17.skill",
"step18.skill",
];
/**
@@ -40,6 +41,7 @@ export class TwentyQuestions {
"step13.disadvantage",
"step14.special_features",
"step16.item",
"step18.heritage_item",
];
/**
@@ -146,6 +148,7 @@ export class TwentyQuestions {
heritage_name: "",
heritage_1: null,
heritage_2: null,
heritage_item: [],
},
step19: {
firstname: "",