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))
) {