Skip to content

Commit

Permalink
Update hooks.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
thatlonelybugbear authored Jan 31, 2023
1 parent 5f96d0c commit 20c2d7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/hooks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function _preRollAttack(item, config) {
let singleTargetEffects;
let singleTargetActor = game.user.targets?.first()?.actor;
let singleTargetToken = game.user.targets?.first();
if (singleTargetActor?.size === 1) singleTargetEffects = singleTargetActor.effects.filter(eff=>!eff.disabled);
if (game.user.targets?.size === 1) singleTargetEffects = singleTargetActor.effects.filter(eff=>!eff.disabled);

//Blinded condition
if (sourceActorEffects?.find(eff=>eff.label === "Blinded")) dis = true;
Expand Down Expand Up @@ -124,7 +124,7 @@ export function _preRollDamage(item, config) {
let singleTargetEffects;
let singleTargetActor = game.user.targets?.first()?.actor;
let singleTargetToken = game.user.targets?.first();
if (singleTargetActor?.size === 1) singleTargetEffects = singleTargetActor.effects.filter(eff=>!eff.disabled);
if (game.user.targets?.size === 1) singleTargetEffects = singleTargetActor.effects.filter(eff=>!eff.disabled);

//Paralysed condition.
if (singleTargetEffects?.find(eff=>eff.label === "Paralysed" || eff.label === "Paralyzed") && _getMinimumDistanceBetweenTokens(sourceActorToken,singleTargetToken)<=5) crit = true;
Expand Down

0 comments on commit 20c2d7b

Please sign in to comment.