foundryvtt / pf2e

A community contributed game system for Pathfinder Second Edition.
https://foundryvtt.com/packages/pf2e
Apache License 2.0
411 stars 344 forks source link

AdjustStrike missing certain target options like distance #16698

Open 7H3LaughingMan opened 3 weeks ago

7H3LaughingMan commented 3 weeks ago

I am trying to setup a rule element on an item that applies a Monk's Mystic Strike if they are in the Monastic Archer Stance; however, due to the way Monastic Arche Stance works it should only apply if the target is within half of the first range increment of the bow. I am trying to predicate on target:distance being less than or equal to 50 which would be half of the first range increment but it doesn't work. If I remove this predicate or replace it with something like target:size:medium it works fine.

{
  "definition": [
    "item:id:{item|id}"
  ],
  "key": "AdjustStrike",
  "mode": "add",
  "predicate": [
    "self:effect:monastic-archer-stance",
    "feature:mystic-strikes",
    {
      "lte": [
        "target:distance",
        50
      ]
    }
  ],
  "property": "weapon-traits",
  "value": "magical"
}
CarlosFdez commented 2 weeks ago

Is this still an issue? Should be working as of the latest hotfix.

7H3LaughingMan commented 2 weeks ago

This is still an issue, I went ahead and even simplified it more for quicker testing. If you add the below to an item and attack someone within 50 ft it should make the strike magical; however, it does not. You can remove the predicate entirely to see that the rest of the rule element works.

{
  "definition": [
    "item:id:{item|id}"
  ],
  "key": "AdjustStrike",
  "mode": "add",
  "predicate": [
    {
      "lte": [
        "target:distance",
        50
      ]
    }
  ],
  "property": "weapon-traits",
  "value": "magical"
}
CarlosFdez commented 2 weeks ago

Repro'd. I first tested if it was just that target options were missing, but it seems like its just the distance option that's missing there. Maybe a few others.