From 10df46854a08a862afdf6b7f21530778cb5f57f3 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 21:07:47 +0200 Subject: [PATCH] fixed class restriction logic --- src/playercards/AllCardsBag.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playercards/AllCardsBag.ttslua b/src/playercards/AllCardsBag.ttslua index 0f864339..b0aa65ab 100644 --- a/src/playercards/AllCardsBag.ttslua +++ b/src/playercards/AllCardsBag.ttslua @@ -423,7 +423,7 @@ function buildAvailableWeaknesses(restrictions) -- disable class restricted weaknesses if restrictions.class then local card = cardIdIndex[weaknessId] - if card.metadata.classRestriction ~= restrictions.class then + if card.metadata.classRestriction and card.metadata.classRestriction ~= restrictions.class then eligible = false end end