From 0ac1e3f456d4745b4cfe0c95dffc6d936076a317 Mon Sep 17 00:00:00 2001 From: VeryGreatFrog Date: Thu, 29 Aug 2024 22:24:38 +0200 Subject: [PATCH] Update Save type to allow multiple saves Update models.py --- automation_common/validation/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/automation_common/validation/models.py b/automation_common/validation/models.py index cee2963..8002d79 100644 --- a/automation_common/validation/models.py +++ b/automation_common/validation/models.py @@ -120,9 +120,12 @@ class Attack(Effect): # --- save --- +SaveType = Literal["str", "dex", "con", "int", "wis", "cha"] + + class Save(Effect): type: Literal["save"] - stat: Literal["str", "dex", "con", "int", "wis", "cha"] + stat: Union[conlist(SaveType, min_items=1), SaveType] fail: ValidatedAutomation success: ValidatedAutomation dc: Optional[IntExpression]