From 91176a19ddcf4e2d4ceca93f22cee85df42cfc77 Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Fri, 29 Oct 2021 13:56:48 -0400 Subject: [PATCH] ObjectColor objects are mutable, so let's not assign the 'constant' ones to variables --- Mage/src/main/java/mage/cards/basiclands/Forest.java | 2 +- Mage/src/main/java/mage/cards/basiclands/Island.java | 2 +- Mage/src/main/java/mage/cards/basiclands/Mountain.java | 2 +- Mage/src/main/java/mage/cards/basiclands/Plains.java | 2 +- Mage/src/main/java/mage/cards/basiclands/Swamp.java | 2 +- Mage/src/main/java/mage/game/permanent/token/DrakeToken.java | 2 +- .../main/java/mage/game/permanent/token/ElfDruidToken.java | 2 +- .../java/mage/game/permanent/token/KrakenHexproofToken.java | 5 ++--- .../src/main/java/mage/game/permanent/token/KrakenToken.java | 5 ++--- .../java/mage/game/permanent/token/MerfolkHexproofToken.java | 5 ++--- .../main/java/mage/game/permanent/token/RedHumanToken.java | 2 +- .../java/mage/game/permanent/token/ThatcherHumanToken.java | 2 +- .../token/TitaniaProtectorOfArgothElementalToken.java | 2 +- 13 files changed, 16 insertions(+), 19 deletions(-) diff --git a/Mage/src/main/java/mage/cards/basiclands/Forest.java b/Mage/src/main/java/mage/cards/basiclands/Forest.java index 2092d60e98..c47de36b2a 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Forest.java +++ b/Mage/src/main/java/mage/cards/basiclands/Forest.java @@ -15,7 +15,7 @@ import mage.cards.CardSetInfo; public class Forest extends BasicLand { public Forest(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new GreenManaAbility()); - this.frameColor = ObjectColor.GREEN; + this.frameColor.setGreen(true); } public Forest(final Forest land) { diff --git a/Mage/src/main/java/mage/cards/basiclands/Island.java b/Mage/src/main/java/mage/cards/basiclands/Island.java index 063123bc02..d0ecb8d8ec 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Island.java +++ b/Mage/src/main/java/mage/cards/basiclands/Island.java @@ -15,7 +15,7 @@ import mage.cards.CardSetInfo; public class Island extends BasicLand { public Island(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new BlueManaAbility()); - this.frameColor = ObjectColor.BLUE; + this.frameColor.setBlue(true); } public Island(Island land) { diff --git a/Mage/src/main/java/mage/cards/basiclands/Mountain.java b/Mage/src/main/java/mage/cards/basiclands/Mountain.java index 5db835d232..e16c4ac34a 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Mountain.java +++ b/Mage/src/main/java/mage/cards/basiclands/Mountain.java @@ -15,7 +15,7 @@ import mage.cards.CardSetInfo; public class Mountain extends BasicLand { public Mountain(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new RedManaAbility()); - this.frameColor = ObjectColor.RED; + this.frameColor.setRed(true); } public Mountain(Mountain land) { diff --git a/Mage/src/main/java/mage/cards/basiclands/Plains.java b/Mage/src/main/java/mage/cards/basiclands/Plains.java index cef5b07cc4..4f4151e71b 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Plains.java +++ b/Mage/src/main/java/mage/cards/basiclands/Plains.java @@ -15,7 +15,7 @@ import mage.cards.CardSetInfo; public class Plains extends BasicLand { public Plains(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new WhiteManaAbility()); - this.frameColor = ObjectColor.WHITE; + this.frameColor.setWhite(true); } public Plains(Plains land) { diff --git a/Mage/src/main/java/mage/cards/basiclands/Swamp.java b/Mage/src/main/java/mage/cards/basiclands/Swamp.java index 9ea15701f8..5e866c99d6 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Swamp.java +++ b/Mage/src/main/java/mage/cards/basiclands/Swamp.java @@ -15,7 +15,7 @@ import mage.cards.CardSetInfo; public class Swamp extends BasicLand { public Swamp(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new BlackManaAbility()); - this.frameColor = ObjectColor.BLACK; + this.frameColor.setBlack(true); } public Swamp(Swamp land) { diff --git a/Mage/src/main/java/mage/game/permanent/token/DrakeToken.java b/Mage/src/main/java/mage/game/permanent/token/DrakeToken.java index bfcf8819f1..9fbd97fa03 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DrakeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DrakeToken.java @@ -18,7 +18,7 @@ public final class DrakeToken extends TokenImpl { this.cardType.add(CardType.CREATURE); this.subtype.add(SubType.DRAKE); - this.color = ObjectColor.BLUE; + this.color.setBlue(true); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage/src/main/java/mage/game/permanent/token/ElfDruidToken.java b/Mage/src/main/java/mage/game/permanent/token/ElfDruidToken.java index 38c925dbeb..04adef5c71 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElfDruidToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElfDruidToken.java @@ -26,7 +26,7 @@ public final class ElfDruidToken extends TokenImpl { public ElfDruidToken(String setCode, int tokenType) { super("Elf Druid", "1/1 green Elf Druid creature token with \"{T}: Add {G}.\""); this.cardType.add(CardType.CREATURE); - this.color = ObjectColor.GREEN; + this.color.setGreen(true); this.subtype.add(SubType.ELF); this.subtype.add(SubType.DRUID); diff --git a/Mage/src/main/java/mage/game/permanent/token/KrakenHexproofToken.java b/Mage/src/main/java/mage/game/permanent/token/KrakenHexproofToken.java index e4d61dc9ab..64c9b08ed2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KrakenHexproofToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KrakenHexproofToken.java @@ -16,7 +16,7 @@ public final class KrakenHexproofToken extends TokenImpl { super("Kraken", "8/8 blue Kraken creature token with hexproof"); this.cardType.add(CardType.CREATURE); this.subtype.add(SubType.KRAKEN); - this.color = ObjectColor.BLUE; + this.color.setBlue(true); this.power = new MageInt(8); this.toughness = new MageInt(8); this.addAbility(HexproofAbility.getInstance()); @@ -29,5 +29,4 @@ public final class KrakenHexproofToken extends TokenImpl { public KrakenHexproofToken copy() { return new KrakenHexproofToken(this); } - -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/game/permanent/token/KrakenToken.java b/Mage/src/main/java/mage/game/permanent/token/KrakenToken.java index 2dc5194b46..7a28867ffb 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KrakenToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KrakenToken.java @@ -15,7 +15,7 @@ public final class KrakenToken extends TokenImpl { super("Kraken", "8/8 blue Kraken creature token"); this.cardType.add(CardType.CREATURE); this.subtype.add(SubType.KRAKEN); - this.color = ObjectColor.BLUE; + this.color.setBlue(true); this.power = new MageInt(8); this.toughness = new MageInt(8); } @@ -27,5 +27,4 @@ public final class KrakenToken extends TokenImpl { public KrakenToken copy() { return new KrakenToken(this); } - -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/game/permanent/token/MerfolkHexproofToken.java b/Mage/src/main/java/mage/game/permanent/token/MerfolkHexproofToken.java index debaf39b8a..500cfc2345 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MerfolkHexproofToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MerfolkHexproofToken.java @@ -17,7 +17,7 @@ public final class MerfolkHexproofToken extends TokenImpl { super("Merfolk", "1/1 blue Merfolk creature token with hexproof"); this.cardType.add(CardType.CREATURE); this.subtype.add(SubType.MERFOLK); - this.color = ObjectColor.BLUE; + this.color.setBlue(true); this.power = new MageInt(1); this.toughness = new MageInt(1); this.addAbility(HexproofAbility.getInstance()); @@ -30,5 +30,4 @@ public final class MerfolkHexproofToken extends TokenImpl { public MerfolkHexproofToken copy() { return new MerfolkHexproofToken(this); } - -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/game/permanent/token/RedHumanToken.java b/Mage/src/main/java/mage/game/permanent/token/RedHumanToken.java index 6c72f06f39..dd216253e8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/RedHumanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/RedHumanToken.java @@ -17,7 +17,7 @@ public final class RedHumanToken extends TokenImpl { this.cardType.add(CardType.CREATURE); this.subtype.add(SubType.HUMAN); - this.color = ObjectColor.RED; + this.color.setRed(true); this.power = new MageInt(1); this.toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/ThatcherHumanToken.java b/Mage/src/main/java/mage/game/permanent/token/ThatcherHumanToken.java index 45456e9b3a..dfa8d843bf 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ThatcherHumanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ThatcherHumanToken.java @@ -19,7 +19,7 @@ public final class ThatcherHumanToken extends TokenImpl { this.subtype.add(SubType.HUMAN); addAbility(HasteAbility.getInstance()); - this.color = ObjectColor.RED; + this.color.setRed(true); this.power = new MageInt(1); this.toughness = new MageInt(1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java index 846b80acb2..39b7c41800 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TitaniaProtectorOfArgothElementalToken.java @@ -15,7 +15,7 @@ public final class TitaniaProtectorOfArgothElementalToken extends TokenImpl { public TitaniaProtectorOfArgothElementalToken() { super("Elemental", "5/3 green Elemental creature token"); this.cardType.add(CardType.CREATURE); - this.color = ObjectColor.GREEN; + this.color.setGreen(true); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(3);