DFreds / dfreds-convenient-effects

A FoundryVTT module that adds easy to use toggleable active effects for any system.
MIT License
44 stars 37 forks source link

[BUG] Prone applies advantage to thrown weapons at range #304

Closed GhostwheelX closed 6 months ago

GhostwheelX commented 10 months ago

Describe the bug Prone causes thrown melee weapons to be made at advantage.

To Reproduce

  1. Apply prone to a creature.
  2. Make a melee weapon attack at range the creature using a weapon with the thrown property.

Expected behavior The attack should be at disadvantage, but instead it's at advantage as though the creature was in melee.

DFreds commented 6 months ago

I assume this is when using midi? Prone should be working correctly based on the midi flags, so I'm going to guess it's a midi bug.

      changes: [
        {
          key: `flags.${this._flagPrefix}.grants.advantage.attack.mwak`,
          mode: CONST.ACTIVE_EFFECT_MODES.CUSTOM,
          value: '1',
        },
        {
          key: `flags.${this._flagPrefix}.grants.advantage.attack.msak`,
          mode: CONST.ACTIVE_EFFECT_MODES.CUSTOM,
          value: '1',
        },
        {
          key: `flags.${this._flagPrefix}.grants.disadvantage.attack.rwak`,
          mode: CONST.ACTIVE_EFFECT_MODES.CUSTOM,
          value: '1',
        },
        {
          key: `flags.${this._flagPrefix}.grants.disadvantage.attack.rsak`,
          mode: CONST.ACTIVE_EFFECT_MODES.CUSTOM,
          value: '1',
        },
        {
          key: `flags.${this._flagPrefix}.disadvantage.attack.all`,
          mode: CONST.ACTIVE_EFFECT_MODES.CUSTOM,
          value: '1',
        },
        {
          key: 'system.attributes.movement.all',
          mode: CONST.ACTIVE_EFFECT_MODES.CUSTOM,
          value: '*0.5',
          priority: 25,
        },
      ],