fix: weapon roll crash on NPC actors with embedded weapons

NPC actors have flat attribute numbers (e.g. strength: 3) not objects
({value: 3}) and no system.skills object at all. Both _onWeaponRoll
and _onRoll were crashing when Group NPC-generated actors used their
attack buttons.

Fix:
- Read attributes via typeof check — flat number used directly,
  object uses .value — so NPC stat values are used correctly
- skills accessed via system.skills?.[skill] optional chaining so
  missing skills object returns 0 rather than throwing TypeError
This commit is contained in:
2026-06-03 17:57:41 +01:00
parent 5482acd2f9
commit 2713db753f
2 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
"id": "zero-engine",
"title": "Zero Engine (SLA Industries)",
"description": "A basic game system for SLA Industries using the Zero Engine rules.",
"version": "1.5.4",
"version": "1.5.5",
"compatibility": {
"minimum": 13,
"verified": "14.359"