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:
+1
-1
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user