Going back to the input from the preview no longer empties the textfield, allowing for easier edits before importing
This commit is contained in:
parent
b6a1af9926
commit
3e9bc42ca4
4 changed files with 19 additions and 6 deletions
|
|
@ -314,10 +314,18 @@ export class DHImporter {
|
|||
};
|
||||
|
||||
if (isAction) {
|
||||
// Determine if this is an attack or a generic ability
|
||||
const isAttack = buffer.description.match(/make.*?attack/i) ||
|
||||
buffer.description.match(/(?:deal|inflict|take)\s+(\d+(?:d\d+)?(?:[\s]*[\+\-][\s]*\d+)?)\s+(direct\s+)?(\w+)\s+damage/i);
|
||||
|
||||
const actionType = isAttack ? "attack" : "ability";
|
||||
const rollType = isAttack ? "attack" : "ability";
|
||||
|
||||
const actionId = foundry.utils.randomID();
|
||||
|
||||
const action = {
|
||||
_id: actionId,
|
||||
type: "attack",
|
||||
type: actionType,
|
||||
name: buffer.name,
|
||||
actionType: "action",
|
||||
img: "icons/svg/item-bag.svg",
|
||||
|
|
@ -327,7 +335,7 @@ export class DHImporter {
|
|||
damage: { parts: [], includeBase: false, direct: false },
|
||||
range: "",
|
||||
roll: {
|
||||
type: "attack", // Default to attack
|
||||
type: rollType,
|
||||
diceRolling: { multiplier: "flat", dice: "d6" }
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue