Commit ba55257b authored by Tim Posney's avatar Tim Posney
Browse files

fix for theTargets undefined

parent 49399f55
0.1.73 added spell cast consmption compatibility. That covers the known problems as far as my limted testing is concerned. No support for DR/DI/DV to non-maigical-physical damage yet.
0.1.72 First pass of dnd 0.95 compatibility
0.1.71 reinstate better rolls support
0.1.70 move weapon name out of hit string to make more space in hit chat card
fixup call to notifyStatus to occur before reset.
0.1.69 [Breaking] A bit. autoShiftClick now has 4 values none (the default), attack only, damage only, attack and damage to allow for finer grained workflow. You should set this config item after updating.
0.1.68 Change the text for Damage Applied to Hit Points Updated
add data to Hooks.callAll("MinorQolRollComplete", data)
0.1.75 Fix for target undefined.
0.1.74 Fixed edge caase when using better rolls and attacks miss, but still rolled savaes.
0.1.73 added spell cast consmption compatibility. That covers the known problems as far as my limted testing is concerned. No support for DR/DI/DV to non-maigical-physical damage yet.
0.1.72 First pass of dnd 0.95 compatibility
0.1.71 reinstate better rolls support
0.1.70 move weapon name out of hit string to make more space in hit chat card
fixup call to notifyStatus to occur before reset.
0.1.69 [Breaking] A bit. autoShiftClick now has 4 values none (the default), attack only, damage only, attack and damage to allow for finer grained workflow. You should set this config item after updating.
0.1.68 Change the text for Damage Applied to Hit Points Updated
add data to Hooks.callAll("MinorQolRollComplete", data)
where data is:
```
actor: Actor5e {data: {…}, options: {…}, apps: {…}, compendium: null, items: Map(114), …}
......@@ -26,15 +28,15 @@ targets: Set(3) {Token, Token, Token}
token: Token {_events: i, _eventsCount: 2, tempDisplayObjectParent: null, transform: t, alpha: 1, …}
versatile: false
```
0.1.67 repackage push
0.1.66 [BREAKING] If an item has a saving throw and auto check saving throws are disabled damage application will not happen.
0.1.65 fix for better rolls with attack and saves where it was ignoring the save settings.
0.1.64 [BREAKING] My enenmies' enemy is my friend mode for enemy/ally targeting.
A change to how enemy/ally targeting works:
Tokens with "friendly disposition tokens "enemy" means "hostilecreatures with an opposite disposition are targeted (i.e. for hostile tokens, "enemy" will target friendly disposition tokens, "ally" will target hostile disposition tokens, and vice versa). Any spells/effects enemies/allies will need to be checked.
ally/enemy resolution now applies to all item rolls.
Support for LMRTFY query mode (Player Roll Saves "LMRTFY + Query")
0.1.63 fix for multi level token targeting (I hope)
0.1.67 repackage push
0.1.66 [BREAKING] If an item has a saving throw and auto check saving throws are disabled damage application will not happen.
0.1.65 fix for better rolls with attack and saves where it was ignoring the save settings.
0.1.64 [BREAKING] My enenmies' enemy is my friend mode for enemy/ally targeting.
A change to how enemy/ally targeting works:
Tokens with "friendly disposition tokens "enemy" means "hostilecreatures with an opposite disposition are targeted (i.e. for hostile tokens, "enemy" will target friendly disposition tokens, "ally" will target hostile disposition tokens, and vice versa). Any spells/effects enemies/allies will need to be checked.
ally/enemy resolution now applies to all item rolls.
Support for LMRTFY query mode (Player Roll Saves "LMRTFY + Query")
0.1.63 fix for multi level token targeting (I hope)
0.1.62 fix for betterNPCActor5eSheet
fix for betterRolls templates and feats
fix for resource consumption when not auto rolling damage
......
No preview for this file type
......@@ -2,11 +2,11 @@
"name": "minor-qol",
"title": "Minor Quality of Life Improvements",
"description": "Item delete confirmation|Hide/Show chat card info|speed attack rolls",
"version": "0.1.74",
"version": "0.1.75",
"author": "tposney",
"minimumCoreVersion": "0.5.5",
"compatibleCoreVersion": "0.7.0",
"minimumSystemVersion": 0.92,
"minimumSystemVersion": 0.95,
"languages": [
{
"lang": "en",
......
......@@ -515,7 +515,7 @@ let processpreCreateBetterRollsCard = async (data, options) => {
|| (!item.hasAttack && !item.hasSave)) {
// assume effects only applied to hit targets or thtose that did not save
let spellLevel = MinorQOL._stateData.spellLevel;
if (theTargets.size > 0)
if (theTargets?.size > 0)
DynamicEffects.doEffects({item, actor: item.actor, activate: true, targets: theTargets,
whisper: true, spellLevel: itemLevel || 0, damageTotal: theTargets.size > 1 ? MinorQOL._stateData.damageTotal : appliedDamage})
}
......@@ -1290,7 +1290,7 @@ let processPreCreateAttackRoll = async (data, options) => {
}
MinorQOL._stateData.hitTargets = theTargets;
const damageNotApplied = (autoApplyDamage === "none")
|| theTargets.size === 0 // no targets
|| theTargets?.size === 0 // no targets
|| (!MinorQOL.forceRollDamage && autoRollDamage === "none") // we do not roll damage
|| (item?.hasSave && autoCheckSaves === "none") // it
const templateData = {
......@@ -1326,8 +1326,8 @@ let processPreCreateAttackRoll = async (data, options) => {
((game.user.targets.size === 0) || // nothing selected so roll damage if auto enabled
(autoRollDamage === "always") ||
(autoCheckHit === "none") || // we are not checking for hits so roll damage
(theTargets.size > 0))); // we actually hit something
if (debug) log("process attack roll - roll damage?", shouldRollDamage, item, item.hasDamage, autoRollDamage, game.user.targets.size, autoCheckHit, theTargets.size);
(theTargets?.size > 0))); // we actually hit something
if (debug) log("process attack roll - roll damage?", shouldRollDamage, item, item.hasDamage, autoRollDamage, game.user.targets.size, autoCheckHit, theTargets?.size);
let event = {};
if (["all", "damage"].includes(autoShiftClick) && (MinorQOL._stateData.isCritical || actor.data.flags.dnd5e?.forceCritical))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment