fix(models): require a positive range_increment_ft (reject 0 and negatives)
This commit is contained in:
@@ -278,7 +278,11 @@ class AttackSpec(_FrozenModel):
|
||||
crit_mult: int = Field(default=2, ge=2, le=4)
|
||||
reach_ft: int = 5
|
||||
reach_weapon: bool = False
|
||||
range_increment_ft: int | None = None
|
||||
# Positive or None (None = no range increments: melee, or touch at natural
|
||||
# reach). A zero increment would crash the engine's range_penalty with a
|
||||
# ZeroDivisionError (dist_ft // 0); a negative one silently makes the
|
||||
# weapon unusable -- both are data errors, rejected at the schema.
|
||||
range_increment_ft: int | None = Field(default=None, ge=1)
|
||||
count: int = Field(default=1, ge=1)
|
||||
firearm: bool = False
|
||||
two_handed: bool = False
|
||||
|
||||
Reference in New Issue
Block a user