From ef38ff10e995faf53d8c5fc8e3025c164ae1006c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 5 Jan 2019 16:41:04 -0500 Subject: [PATCH] changed some small issues --- .../src/mage/cards/a/ArchonOfValorsReach.java | 28 ++++++--------- Mage.Sets/src/mage/cards/a/AureliasFury.java | 34 ++++++++++++------- .../src/mage/cards/c/CathedralMembrane.java | 26 ++++++++------ Mage.Sets/src/mage/cards/c/CyclopeanTomb.java | 20 +++++------ 4 files changed, 59 insertions(+), 49 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/ArchonOfValorsReach.java b/Mage.Sets/src/mage/cards/a/ArchonOfValorsReach.java index ffc743472c..fd4d1baa2a 100644 --- a/Mage.Sets/src/mage/cards/a/ArchonOfValorsReach.java +++ b/Mage.Sets/src/mage/cards/a/ArchonOfValorsReach.java @@ -1,7 +1,6 @@ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; @@ -9,26 +8,23 @@ import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.abilities.effects.OneShotEffect; -import mage.constants.SubType; import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceImpl; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; import mage.util.CardUtil; +import java.util.UUID; + /** - * * @author TheElk801 */ public final class ArchonOfValorsReach extends CardImpl { @@ -56,7 +52,7 @@ public final class ArchonOfValorsReach extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ArchonOfValorsReachReplacementEffect())); } - public ArchonOfValorsReach(final ArchonOfValorsReach card) { + private ArchonOfValorsReach(final ArchonOfValorsReach card) { super(card); } @@ -68,14 +64,12 @@ public final class ArchonOfValorsReach extends CardImpl { class ArchonOfValorsReachChooseEffect extends OneShotEffect { - public static String VALUE_KEY = "_cardtype"; - - public ArchonOfValorsReachChooseEffect() { + ArchonOfValorsReachChooseEffect() { super(Outcome.Benefit); this.staticText = "choose artifact, enchantment, instant, sorcery, or planeswalker"; } - public ArchonOfValorsReachChooseEffect(final ArchonOfValorsReachChooseEffect effect) { + private ArchonOfValorsReachChooseEffect(final ArchonOfValorsReachChooseEffect effect) { super(effect); } @@ -96,7 +90,7 @@ class ArchonOfValorsReachChooseEffect extends OneShotEffect { if (controller.choose(Outcome.Neutral, choices, game)) { game.informPlayers(mageObject.getName() + ": Chosen card type is " + choices.getChoice()); System.out.println(mageObject.getId()); - game.getState().setValue(mageObject.getId().toString() + VALUE_KEY, choices.getChoice()); + game.getState().setValue(mageObject.getId().toString() + "_cardtype", choices.getChoice()); if (mageObject instanceof Permanent) { ((Permanent) mageObject).addInfo("chosen color", CardUtil.addToolTipMarkTags("Chosen card type: " + choices.getChoice()), game); } @@ -109,7 +103,7 @@ class ArchonOfValorsReachChooseEffect extends OneShotEffect { class ArchonOfValorsReachChoice extends ChoiceImpl { - public ArchonOfValorsReachChoice() { + ArchonOfValorsReachChoice() { super(true); this.choices.add("Artifact"); this.choices.add("Enchantment"); @@ -119,7 +113,7 @@ class ArchonOfValorsReachChoice extends ChoiceImpl { this.message = "Choose artifact, enchantment, instant, sorcery, or planeswalker"; } - public ArchonOfValorsReachChoice(final ArchonOfValorsReachChoice choice) { + private ArchonOfValorsReachChoice(final ArchonOfValorsReachChoice choice) { super(choice); } @@ -154,7 +148,7 @@ class ArchonOfValorsReachReplacementEffect extends ContinuousRuleModifyingEffect staticText = "Players can't cast spells of the chosen type"; } - ArchonOfValorsReachReplacementEffect(final ArchonOfValorsReachReplacementEffect effect) { + private ArchonOfValorsReachReplacementEffect(final ArchonOfValorsReachReplacementEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/a/AureliasFury.java b/Mage.Sets/src/mage/cards/a/AureliasFury.java index 30fd2f477b..3660c4cfb2 100644 --- a/Mage.Sets/src/mage/cards/a/AureliasFury.java +++ b/Mage.Sets/src/mage/cards/a/AureliasFury.java @@ -1,7 +1,6 @@ package mage.cards.a; -import java.util.*; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; @@ -27,6 +26,10 @@ import mage.target.common.TargetAnyTargetAmount; import mage.target.targetpointer.FixedTarget; import mage.watchers.Watcher; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** * GATECRASH FAQ 11.01.2013 *

@@ -67,7 +70,7 @@ public final class AureliasFury extends CardImpl { } - public AureliasFury(final AureliasFury card) { + private AureliasFury(final AureliasFury card) { super(card); } @@ -79,12 +82,12 @@ public final class AureliasFury extends CardImpl { class AureliasFuryEffect extends OneShotEffect { - public AureliasFuryEffect() { + AureliasFuryEffect() { super(Outcome.Benefit); this.staticText = "Tap each creature dealt damage this way. Players dealt damage this way can't cast noncreature spells this turn"; } - public AureliasFuryEffect(final AureliasFuryEffect effect) { + private AureliasFuryEffect(final AureliasFuryEffect effect) { super(effect); } @@ -97,13 +100,13 @@ class AureliasFuryEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { AureliasFuryDamagedByWatcher watcher = (AureliasFuryDamagedByWatcher) game.getState().getWatchers().get(AureliasFuryDamagedByWatcher.class.getSimpleName(), source.getSourceId()); if (watcher != null) { - for (UUID creatureId : watcher.damagedCreatures) { + for (UUID creatureId : watcher.getDamagedCreatures()) { Permanent permanent = game.getPermanent(creatureId); if (permanent != null) { permanent.tap(game); } } - for (UUID playerId : watcher.damagedPlayers) { + for (UUID playerId : watcher.getDamagedPlayers()) { ContinuousEffect effect = new AureliasFuryCantCastEffect(); effect.setTargetPointer(new FixedTarget(playerId)); game.addEffect(effect, source); @@ -117,12 +120,12 @@ class AureliasFuryEffect extends OneShotEffect { class AureliasFuryCantCastEffect extends ContinuousRuleModifyingEffectImpl { - public AureliasFuryCantCastEffect() { + AureliasFuryCantCastEffect() { super(Duration.EndOfTurn, Outcome.Benefit); staticText = "Players dealt damage this way can't cast noncreature spells this turn"; } - public AureliasFuryCantCastEffect(final AureliasFuryCantCastEffect effect) { + private AureliasFuryCantCastEffect(final AureliasFuryCantCastEffect effect) { super(effect); } @@ -165,14 +168,14 @@ class AureliasFuryCantCastEffect extends ContinuousRuleModifyingEffectImpl { class AureliasFuryDamagedByWatcher extends Watcher { - public Set damagedCreatures = new HashSet<>(); - public Set damagedPlayers = new HashSet<>(); + private final Set damagedCreatures = new HashSet<>(); + private final Set damagedPlayers = new HashSet<>(); - public AureliasFuryDamagedByWatcher() { + AureliasFuryDamagedByWatcher() { super(AureliasFuryDamagedByWatcher.class.getSimpleName(), WatcherScope.CARD); } - public AureliasFuryDamagedByWatcher(final AureliasFuryDamagedByWatcher watcher) { + private AureliasFuryDamagedByWatcher(final AureliasFuryDamagedByWatcher watcher) { super(watcher); this.damagedCreatures.addAll(watcher.damagedCreatures); this.damagedPlayers.addAll(watcher.damagedPlayers); @@ -210,4 +213,11 @@ class AureliasFuryDamagedByWatcher extends Watcher { damagedPlayers.clear(); } + Set getDamagedCreatures() { + return damagedCreatures; + } + + Set getDamagedPlayers() { + return damagedPlayers; + } } diff --git a/Mage.Sets/src/mage/cards/c/CathedralMembrane.java b/Mage.Sets/src/mage/cards/c/CathedralMembrane.java index 01c4248f3f..5c41e0029f 100644 --- a/Mage.Sets/src/mage/cards/c/CathedralMembrane.java +++ b/Mage.Sets/src/mage/cards/c/CathedralMembrane.java @@ -1,7 +1,6 @@ package mage.cards.c; -import java.util.*; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ZoneChangeTriggeredAbility; @@ -15,6 +14,10 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.watchers.Watcher; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + /** * @author BetaSteward */ @@ -35,7 +38,7 @@ public final class CathedralMembrane extends CardImpl { } - public CathedralMembrane(final CathedralMembrane card) { + private CathedralMembrane(final CathedralMembrane card) { super(card); } @@ -47,11 +50,11 @@ public final class CathedralMembrane extends CardImpl { class CathedralMembraneAbility extends ZoneChangeTriggeredAbility { - public CathedralMembraneAbility() { + CathedralMembraneAbility() { super(Zone.BATTLEFIELD, Zone.GRAVEYARD, new CathedralMembraneEffect(), "When {this} dies during combat, ", false); } - public CathedralMembraneAbility(CathedralMembraneAbility ability) { + private CathedralMembraneAbility(CathedralMembraneAbility ability) { super(ability); } @@ -74,12 +77,12 @@ class CathedralMembraneAbility extends ZoneChangeTriggeredAbility { class CathedralMembraneEffect extends OneShotEffect { - public CathedralMembraneEffect() { + CathedralMembraneEffect() { super(Outcome.Damage); staticText = "it deals 6 damage to each creature it blocked this combat"; } - public CathedralMembraneEffect(final CathedralMembraneEffect effect) { + private CathedralMembraneEffect(final CathedralMembraneEffect effect) { super(effect); } @@ -92,7 +95,7 @@ class CathedralMembraneEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { CathedralMembraneWatcher watcher = (CathedralMembraneWatcher) game.getState().getWatchers().get(CathedralMembraneWatcher.class.getSimpleName(), source.getSourceId()); if (watcher != null) { - for (UUID uuid : watcher.blockedCreatures) { + for (UUID uuid : watcher.getBlockedCreatures()) { Permanent permanent = game.getPermanent(uuid); if (permanent != null) { permanent.damage(6, source.getSourceId(), game, false, true); @@ -105,13 +108,13 @@ class CathedralMembraneEffect extends OneShotEffect { class CathedralMembraneWatcher extends Watcher { - public Set blockedCreatures = new HashSet<>(); + private final Set blockedCreatures = new HashSet<>(); - public CathedralMembraneWatcher() { + CathedralMembraneWatcher() { super(CathedralMembraneWatcher.class.getSimpleName(), WatcherScope.CARD); } - public CathedralMembraneWatcher(final CathedralMembraneWatcher watcher) { + private CathedralMembraneWatcher(final CathedralMembraneWatcher watcher) { super(watcher); this.blockedCreatures.addAll(watcher.blockedCreatures); } @@ -134,4 +137,7 @@ class CathedralMembraneWatcher extends Watcher { blockedCreatures.clear(); } + Set getBlockedCreatures() { + return blockedCreatures; + } } diff --git a/Mage.Sets/src/mage/cards/c/CyclopeanTomb.java b/Mage.Sets/src/mage/cards/c/CyclopeanTomb.java index 2095015f46..1e8379f450 100644 --- a/Mage.Sets/src/mage/cards/c/CyclopeanTomb.java +++ b/Mage.Sets/src/mage/cards/c/CyclopeanTomb.java @@ -60,7 +60,7 @@ public final class CyclopeanTomb extends CardImpl { this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CyclopeanTombCreateTriggeredEffect())); } - public CyclopeanTomb(final CyclopeanTomb card) { + private CyclopeanTomb(final CyclopeanTomb card) { super(card); } @@ -72,12 +72,12 @@ public final class CyclopeanTomb extends CardImpl { class BecomeSwampEffect extends BecomesBasicLandTargetEffect { - public BecomeSwampEffect(Duration duration, boolean chooseLandType, boolean loseOther, SubType... landNames) { + BecomeSwampEffect(Duration duration, boolean chooseLandType, boolean loseOther, SubType... landNames) { super(duration, chooseLandType, loseOther, landNames); staticText = "That land is a Swamp for as long as it has a mire counter on it"; } - public BecomeSwampEffect(final BecomeSwampEffect effect) { + private BecomeSwampEffect(final BecomeSwampEffect effect) { super(effect); } @@ -102,12 +102,12 @@ class BecomeSwampEffect extends BecomesBasicLandTargetEffect { class CyclopeanTombCreateTriggeredEffect extends OneShotEffect { - public CyclopeanTombCreateTriggeredEffect() { + CyclopeanTombCreateTriggeredEffect() { super(Outcome.Benefit); this.staticText = "at the beginning of each of your upkeeps for the rest of the game, remove all mire counters from a land that a mire counter was put onto with {this} but that a mire counter has not been removed from with {this}"; } - public CyclopeanTombCreateTriggeredEffect(final CyclopeanTombCreateTriggeredEffect effect) { + private CyclopeanTombCreateTriggeredEffect(final CyclopeanTombCreateTriggeredEffect effect) { super(effect); } @@ -133,12 +133,12 @@ class CyclopeanTombCreateTriggeredEffect extends OneShotEffect { class CyclopeanTombEffect extends OneShotEffect { - public CyclopeanTombEffect() { + CyclopeanTombEffect() { super(Outcome.Benefit); this.staticText = "At the beginning of each of your upkeeps for the rest of the game, remove all mire counters from a land that a mire counter was put onto with {this} but that a mire counter has not been removed from with {this}"; } - public CyclopeanTombEffect(final CyclopeanTombEffect effect) { + private CyclopeanTombEffect(final CyclopeanTombEffect effect) { super(effect); } @@ -190,13 +190,13 @@ class CyclopeanTombEffect extends OneShotEffect { class CyclopeanTombCounterWatcher extends Watcher { - public HashMap> counterData = new HashMap<>(); + private final HashMap> counterData = new HashMap<>(); - public CyclopeanTombCounterWatcher() { + CyclopeanTombCounterWatcher() { super(CyclopeanTombCounterWatcher.class.getSimpleName(), WatcherScope.GAME); } - public CyclopeanTombCounterWatcher(final CyclopeanTombCounterWatcher watcher) { + private CyclopeanTombCounterWatcher(final CyclopeanTombCounterWatcher watcher) { super(watcher); for (MageObjectReference mageObjectReference : watcher.counterData.keySet()) { Set miredLands = new HashSet<>();