From 999eb18d8d598c9acc10cd08ffe4bb0d3c6b3066 Mon Sep 17 00:00:00 2001 From: GroundThing <68763301+GroundThing@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:30:31 -0800 Subject: [PATCH] Future proofing mana base for 4 color generated decks When generating 4 color decks, the code did not generate any dual lands for the color combo of index 2 and 3 in the colors array. While there are currently no enemies that generate 4 color decks, this change would future proof such decks, in case any 4 color deck templates are added. --- .../src/forge/adventure/util/CardUtil.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/forge-gui-mobile/src/forge/adventure/util/CardUtil.java b/forge-gui-mobile/src/forge/adventure/util/CardUtil.java index f1e87bb344d..b831af7f81d 100644 --- a/forge-gui-mobile/src/forge/adventure/util/CardUtil.java +++ b/forge-gui-mobile/src/forge/adventure/util/CardUtil.java @@ -590,21 +590,25 @@ else if(landName.size()==4) RewardData sub2= new RewardData(base); RewardData sub3= new RewardData(base); RewardData sub4= new RewardData(base); - sub1.count/=5; - sub2.count/=5; - sub3.count/=5; - sub4.count/=5; + RewardData sub5= new RewardData(base); + sub1.count/=6; + sub2.count/=6; + sub3.count/=6; + sub4.count/=6; + sub5.count/=6; base.count-=sub1.count; base.count-=sub2.count; base.count-=sub3.count; base.count-=sub4.count; + base.count-=sub5.count; base.subTypes = new String[]{landName.get(0),landName.get(1)}; sub1.subTypes = new String[]{landName.get(0),landName.get(2)}; sub2.subTypes = new String[]{landName.get(0),landName.get(3)}; sub3.subTypes = new String[]{landName.get(1),landName.get(2)}; sub4.subTypes = new String[]{landName.get(1),landName.get(3)}; - rewards.addAll(Arrays.asList(sub1,sub2,sub3,sub4)); + sub5.subtypes = new String[]{landName.get(2),landName.get(3)}; + rewards.addAll(Arrays.asList(sub1,sub2,sub3,sub4,sub5)); } else if(landName.size()==5) {