moo-man / WFRP4e-FoundryVTT

The premiere system for running grim and perilous games of Warhammer Fantasy Role-play in the Foundry VTT environment.
Apache License 2.0
92 stars 54 forks source link

Ammo with Blast Quality causes successfull Attacks to fail silently. #2273

Closed kylania closed 1 month ago

kylania commented 1 month ago

Describe the bug When using a Blunderbuss with Small Shot and Powder Ammo with the Blast Quality of 1 when you hit a target there is no Chat Card result.

To Reproduce Created a new world. Imported two random enemies. Created a Solider Character via /char and granted him a Blunderbuss and Ammo as Trappings. Loaded ammo into the weapon. Targeted the enemies via Shift-T. Fired the Blunderbuss and missed with Chat Card for the failure and proper Reloading sequence. Fired again, this time with Advantage 8 to ensure a hit, no Chat Card only a Console error.

Results in this error:

VM22965:3 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'other')
    at Object.eval (eval at execute (warhammer.js:319:21), <anonymous>:3:38)
    at WarhammerScript.execute (warhammer.js:319:121)
    at ItemWfrp4e.runScripts (warhammer.js:4176:38)
    at WeaponTest.runPostEffects (wfrp4e.js:13907:33)
    at async WeaponTest.roll (wfrp4e.js:1440:5)
    at async WeaponTest.roll (wfrp4e.js:13917:5)
    at async ActorWFRP4e.weaponTest (wfrp4e.js:15676:5)
eval @ VM22965:3
execute @ warhammer.js:319
runScripts @ warhammer.js:4176
runPostEffects @ wfrp4e.js:13907
await in runPostEffects (async)
(anonymous) @ wfrp4e.js:9551
Promise.then (async)
_onWeaponNameClick @ wfrp4e.js:9549
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2

I then removed Blast 1 Quality from the Small Shot Ammo and fired again, this time successfully.

Video Reproduction

Screenshots Added Screenshots of the initial miss and reload as well as the Successful Hit after removing Blast 1 from the Ammo. Video of the whole process as well. Console log as well. Demo world included.

Version Numbers

Foundry: Version 12 Stable Build 331 wfrp4e: 8.1.3 wfrp4e-core: 6.0.1

Screenshot 2024-10-15 072048 Screenshot 2024-10-15 072129 Screenshot 2024-10-15 072155 localhost-1728994920827.log blast-demo-world.zip