arbron / fvtt-summoner

Easy to use interface for configuring and summoning actors within DnD5e.
MIT License
4 stars 4 forks source link

[BUG] Armour causes issues in dnd5e when summoning a spiritual weapon #36

Closed maxobremer closed 1 year ago

maxobremer commented 1 year ago

Describe the bug After a lot of testing i found that (in dnd5e) having studded leather armour or a shield or both equipped causes issues. if you have either equipped and try to summon a creature that uses for example your proficiency or to hit bonus, it will summon, but not with any bonusses or information that could be derived from the summoner.

To Reproduce Steps to reproduce the behaviour:

  1. make a new world and enable just this module and warp gate
  2. make a summoning creature like a spiritual weapon and a character with a spell or feature that summons the summon
  3. give the summoner a shield or studded leather armour and equip it
  4. try to summon the weapon or other summon
  5. get the following error in the f12 menu image

Expected behavior To work as intended even if your cleric is wearing armour.

Screenshots see above image wrong behaviour, summon also lacks the dismiss button.

image Correct behaviour when no armour is equipped

Environment:

Additional context Add any other context about the problem here.

kaelad02 commented 1 year ago

+1 can confirm. Odd that unequipping any armor or shields makes it work again.

YenBenGrey commented 1 year ago

+2 only in v11, works perfectly in v10.

Also can confirm, works when the Cleric unequips their armour.

StephenDiamond commented 1 year ago

This appears to be caused by the mergeObject call within the actor.update call in warpgate. When you pass in the rollData to the arbron-summoner flag it includes the attributes of the summoner - including their ac calculation and that includes "equippedArmor" which appears to be read-only. So when it attempts to merge the object, this causes an error and doesn't apply the summoner calculation changes.