Additional validation

This commit is contained in:
marcin.sciesinski
2019-08-28 13:43:01 -07:00
parent 5e218b106e
commit 9f2704838d

View File

@@ -644,6 +644,8 @@ public class BuiltLotroCardBlueprint implements LotroCardBlueprint {
throw new InvalidCardDefinitionException("Card has to have a title");
if (cardType == null)
throw new InvalidCardDefinitionException("Card has to have a type");
if (cardType != CardType.THE_ONE_RING && side == null)
throw new InvalidCardDefinitionException("Only The One Ring does not have a side defined");
if (siteNumber != 0
&& cardType != CardType.SITE
&& cardType != CardType.MINION)