mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
added missing access modifier
This commit is contained in:
parent
276066168a
commit
41e34cabe5
21 changed files with 62 additions and 78 deletions
|
@ -84,48 +84,47 @@ public class WaxmaneBaku extends CardImpl<WaxmaneBaku> {
|
|||
public WaxmaneBaku copy() {
|
||||
return new WaxmaneBaku(this);
|
||||
}
|
||||
}
|
||||
|
||||
private class WaxmaneBakuTapEffect extends OneShotEffect<WaxmaneBakuTapEffect> {
|
||||
class WaxmaneBakuTapEffect extends OneShotEffect<WaxmaneBakuTapEffect> {
|
||||
|
||||
FilterPermanent filter = new FilterCreaturePermanent();
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
public WaxmaneBakuTapEffect() {
|
||||
super(Constants.Outcome.Tap);
|
||||
staticText = "Tap X target creatures";
|
||||
}
|
||||
public WaxmaneBakuTapEffect() {
|
||||
super(Constants.Outcome.Tap);
|
||||
staticText = "Tap X target creatures";
|
||||
}
|
||||
|
||||
public WaxmaneBakuTapEffect(final WaxmaneBakuTapEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
public WaxmaneBakuTapEffect(final WaxmaneBakuTapEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int numberToTap = 0;
|
||||
for (Cost cost : source.getCosts()) {
|
||||
if (cost instanceof RemoveVariableCountersSourceCost) {
|
||||
numberToTap = ((RemoveVariableCountersSourceCost)cost).getAmount();
|
||||
}
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int numberToTap = 0;
|
||||
for (Cost cost : source.getCosts()) {
|
||||
if (cost instanceof RemoveVariableCountersSourceCost) {
|
||||
numberToTap = ((RemoveVariableCountersSourceCost) cost).getAmount();
|
||||
}
|
||||
TargetPermanent target = new TargetPermanent(numberToTap, filter);
|
||||
if (target.canChoose(source.getControllerId(), game) && target.choose(Constants.Outcome.Tap, source.getControllerId(), source.getId(), game)) {
|
||||
if (!target.getTargets().isEmpty()) {
|
||||
List<UUID> targets = target.getTargets();
|
||||
for (UUID targetId : targets) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
permanent.tap(game);
|
||||
}
|
||||
}
|
||||
TargetPermanent target = new TargetPermanent(numberToTap, filter);
|
||||
if (target.canChoose(source.getControllerId(), game) && target.choose(Constants.Outcome.Tap, source.getControllerId(), source.getId(), game)) {
|
||||
if (!target.getTargets().isEmpty()) {
|
||||
List<UUID> targets = target.getTargets();
|
||||
for (UUID targetId : targets) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
permanent.tap(game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaxmaneBakuTapEffect copy() {
|
||||
return new WaxmaneBakuTapEffect(this);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaxmaneBakuTapEffect copy() {
|
||||
return new WaxmaneBakuTapEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ import mage.game.permanent.token.ZombieToken;
|
|||
* @author Loki
|
||||
*/
|
||||
public class Wakedancer extends CardImpl<Wakedancer> {
|
||||
static String staticText = "Morbid - When {this} enters the battlefield, if a creature died this turn, put a 2/2 black Zombie creature token onto the battlefield.";
|
||||
private static final String staticText = "Morbid - When {this} enters the battlefield, if a creature died this turn, put a 2/2 black Zombie creature token onto the battlefield.";
|
||||
|
||||
public Wakedancer(UUID ownerId) {
|
||||
super(ownerId, 79, "Wakedancer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
|
|
|
@ -48,8 +48,8 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class RecurringNightmare extends CardImpl<RecurringNightmare> {
|
||||
|
||||
FilterCreatureCard filter = new FilterCreatureCard("creature card in your graveyard");
|
||||
FilterControlledPermanent filter2 = new FilterControlledPermanent("creature to sacrifice");
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card in your graveyard");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("creature to sacrifice");
|
||||
|
||||
public RecurringNightmare(UUID ownerId) {
|
||||
super(ownerId, 72, "Recurring Nightmare", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
|
||||
|
|
|
@ -37,7 +37,6 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -46,8 +45,6 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class Surgespanner extends CardImpl<Surgespanner> {
|
||||
|
||||
FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
public Surgespanner(UUID ownerId) {
|
||||
super(ownerId, 92, "Surgespanner", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
|
||||
this.expansionSetCode = "LRW";
|
||||
|
|
|
@ -51,13 +51,12 @@ import java.util.UUID;
|
|||
*/
|
||||
public class SpiritOfTheNight extends CardImpl<SpiritOfTheNight> {
|
||||
|
||||
private static final String rule = "Spirit of the Night has first strike as long as it's attacking";
|
||||
private static final FilterCard filter = new FilterCard("Black");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLACK));
|
||||
}
|
||||
|
||||
String rule = "Spirit of the Night has first strike as long as it's attacking";
|
||||
|
||||
public SpiritOfTheNight(UUID ownerId) {
|
||||
super(ownerId, 44, "Spirit of the Night", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{B}{B}{B}");
|
||||
|
|
|
@ -53,8 +53,6 @@ import mage.target.common.TargetDefender;
|
|||
*/
|
||||
public class PreeminentCaptain extends CardImpl<PreeminentCaptain> {
|
||||
|
||||
final PreeminentCaptainEffect effect = new PreeminentCaptainEffect();
|
||||
|
||||
public PreeminentCaptain(UUID ownerId) {
|
||||
super(ownerId, 20, "Preeminent Captain", Rarity.RARE,
|
||||
new CardType[] { CardType.CREATURE }, "{2}{W}");
|
||||
|
@ -69,7 +67,7 @@ public class PreeminentCaptain extends CardImpl<PreeminentCaptain> {
|
|||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
// Whenever Preeminent Captain attacks, you may put a Soldier creature
|
||||
// card from your hand onto the battlefield tapped and attacking.
|
||||
this.addAbility(new AttacksTriggeredAbility(effect, true));
|
||||
this.addAbility(new AttacksTriggeredAbility(new PreeminentCaptainEffect(), true));
|
||||
}
|
||||
|
||||
public PreeminentCaptain(final PreeminentCaptain card) {
|
||||
|
@ -115,8 +113,7 @@ class PreeminentCaptainEffect extends OneShotEffect<PreeminentCaptainEffect> {
|
|||
TargetDefender def = new TargetDefender(game
|
||||
.getCombat().getDefenders(), player.getId());
|
||||
if (def.choose(getOutcome(), player.getId(), source.getSourceId(), game)) {
|
||||
// TODO -> If only one option, don't ask, as for
|
||||
// normal attacking.
|
||||
// TODO -> If only one option, don't ask, as for normal attacking.
|
||||
if (def.getTargets().size() > 0) {
|
||||
game.getCombat().declareAttacker(
|
||||
permanent.getId(),
|
||||
|
|
|
@ -47,9 +47,9 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
*/
|
||||
public class ArmoryGuard extends CardImpl<ArmoryGuard> {
|
||||
|
||||
String rule = "Armory Guard has vigilance as long as you control a Gate";
|
||||
private static final String rule = "Armory Guard has vigilance as long as you control a Gate";
|
||||
|
||||
final static private FilterPermanent filter = new FilterPermanent("Gate");
|
||||
private static final FilterPermanent filter = new FilterPermanent("Gate");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Gate"));
|
||||
|
|
|
@ -49,7 +49,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class InduceDespair extends CardImpl<InduceDespair> {
|
||||
|
||||
FilterCreatureCard filter = new FilterCreatureCard("creature card from your hand.");
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your hand.");
|
||||
|
||||
public InduceDespair(UUID ownerId) {
|
||||
super(ownerId, 114, "Induce Despair", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
||||
|
@ -103,4 +103,4 @@ class InduceDespairEffect extends OneShotEffect<InduceDespairEffect> {
|
|||
return new InduceDespairEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public class PerishTheThought extends CardImpl<PerishTheThought> {
|
|||
|
||||
class PerishTheThoughtEffect extends OneShotEffect<PerishTheThoughtEffect> {
|
||||
|
||||
FilterCard filter = new FilterCard("card in target opponent's hand");
|
||||
private static final FilterCard filter = new FilterCard("card in target opponent's hand");
|
||||
|
||||
public PerishTheThoughtEffect() {
|
||||
super(Constants.Outcome.Neutral);
|
||||
|
|
|
@ -72,7 +72,7 @@ public class RealitySpasm extends CardImpl<RealitySpasm> {
|
|||
|
||||
class RealitySpasmTapEffect extends OneShotEffect<RealitySpasmTapEffect> {
|
||||
|
||||
FilterPermanent filter = new FilterPermanent("permanent");
|
||||
private static final FilterPermanent filter = new FilterPermanent("permanent");
|
||||
|
||||
public RealitySpasmTapEffect() {
|
||||
super(Outcome.Tap);
|
||||
|
@ -112,7 +112,7 @@ class RealitySpasmTapEffect extends OneShotEffect<RealitySpasmTapEffect> {
|
|||
|
||||
class RealitySpasmUntapEffect extends OneShotEffect<RealitySpasmUntapEffect> {
|
||||
|
||||
FilterPermanent filter = new FilterPermanent("permanent");
|
||||
private static final FilterPermanent filter = new FilterPermanent("permanent");
|
||||
|
||||
public RealitySpasmUntapEffect() {
|
||||
super(Outcome.Untap);
|
||||
|
|
|
@ -75,7 +75,7 @@ public class VeneratedTeacher extends CardImpl<VeneratedTeacher> {
|
|||
|
||||
class VeneratedTeacherEffect extends OneShotEffect<VeneratedTeacherEffect> {
|
||||
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control");
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control");
|
||||
|
||||
public VeneratedTeacherEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
|
@ -106,4 +106,4 @@ class VeneratedTeacherEffect extends OneShotEffect<VeneratedTeacherEffect> {
|
|||
public VeneratedTeacherEffect copy() {
|
||||
return new VeneratedTeacherEffect(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
|||
*/
|
||||
public class JoragaWarcaller extends CardImpl<JoragaWarcaller> {
|
||||
|
||||
String rule = "Other Elf creatures you control get +1/+1 for each +1/+1 counter on Joraga Warcaller";
|
||||
private static final String rule = "Other Elf creatures you control get +1/+1 for each +1/+1 counter on Joraga Warcaller";
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other elf creatures you control");
|
||||
|
||||
|
|
|
@ -53,13 +53,12 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class QuestForTheGoblinLord extends CardImpl<QuestForTheGoblinLord> {
|
||||
|
||||
final static private FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
private static final String rule = "As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0.";
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
String rule = "As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0.";
|
||||
|
||||
public QuestForTheGoblinLord(UUID ownerId) {
|
||||
super(ownerId, 86, "Quest for the Goblin Lord", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{R}");
|
||||
|
|
|
@ -152,7 +152,8 @@ class QuestForUlasTempleTriggeredAbility extends TriggeredAbilityImpl<QuestForUl
|
|||
|
||||
class QuestForUlasTempleEffect2 extends OneShotEffect<QuestForUlasTempleEffect2> {
|
||||
|
||||
final static private FilterCreatureCard filter = new FilterCreatureCard("Kraken, Leviathan, Octopus, or Serpent creature card from your hand");
|
||||
private static final String query = "Do you want to put a Kraken, Leviathan, Octopus, or Serpent creature card from your hand onto the battlefield?";
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("Kraken, Leviathan, Octopus, or Serpent creature card from your hand");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
|
@ -161,7 +162,6 @@ class QuestForUlasTempleEffect2 extends OneShotEffect<QuestForUlasTempleEffect2>
|
|||
new SubtypePredicate("Octopus"),
|
||||
new SubtypePredicate("Serpent")));
|
||||
}
|
||||
String query = "Do you want to put a Kraken, Leviathan, Octopus, or Serpent creature card from your hand onto the battlefield?";
|
||||
|
||||
QuestForUlasTempleEffect2() {
|
||||
super(Constants.Outcome.PutCreatureInPlay);
|
||||
|
|
|
@ -54,14 +54,12 @@ import mage.target.common.TargetCreatureOrPlayer;
|
|||
*/
|
||||
public class RumblingAftershocks extends CardImpl<RumblingAftershocks> {
|
||||
|
||||
final static private FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
String rule = "As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0.";
|
||||
|
||||
public RumblingAftershocks(UUID ownerId) {
|
||||
super(ownerId, 89, "Rumbling Aftershocks", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{R}");
|
||||
this.expansionSetCode = "WWK";
|
||||
|
|
|
@ -47,14 +47,13 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
|||
*/
|
||||
public class ShorelineSalvager extends CardImpl<ShorelineSalvager> {
|
||||
|
||||
private static final String rule = "Whenever Shoreline Salvager deals combat damage to a player, if you control an Island, you may draw a card.";
|
||||
private static final FilterPermanent filter = new FilterPermanent("Island");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.add(new SubtypePredicate("Island"));
|
||||
}
|
||||
|
||||
String rule = "Whenever Shoreline Salvager deals combat damage to a player, if you control an Island, you may draw a card.";
|
||||
|
||||
public ShorelineSalvager(UUID ownerId) {
|
||||
super(ownerId, 67, "Shoreline Salvager", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
|
|
@ -81,7 +81,7 @@ public class TectonicEdge extends CardImpl<TectonicEdge> {
|
|||
|
||||
class TectonicEdgeCost extends CostImpl<TectonicEdgeCost> {
|
||||
|
||||
FilterLandPermanent filter = new FilterLandPermanent();
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||
|
||||
public TectonicEdgeCost() {
|
||||
this.text = "Activate this ability only if an opponent controls four or more lands";
|
||||
|
|
|
@ -77,7 +77,7 @@ class BraveTheElementsEffect extends GainAbilityControlledEffect {
|
|||
filter1.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
FilterCard filter2;
|
||||
private FilterCard filter2;
|
||||
|
||||
public BraveTheElementsEffect() {
|
||||
super(new ProtectionAbility(new FilterCard()), Duration.EndOfTurn, filter1);
|
||||
|
|
|
@ -130,7 +130,7 @@ class GainProtectionFromChosenColorEffect extends GainAbilityControlledEffect {
|
|||
filter1.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter1.add(new SubtypePredicate("Ally"));
|
||||
}
|
||||
FilterCard filter2;
|
||||
private FilterCard filter2;
|
||||
|
||||
public GainProtectionFromChosenColorEffect() {
|
||||
super(new ProtectionAbility(new FilterCard()), Duration.EndOfTurn, filter1);
|
||||
|
|
|
@ -75,8 +75,6 @@ public class NissasChosen extends CardImpl<NissasChosen> {
|
|||
|
||||
class NissasChosenEffect extends ReplacementEffectImpl<NissasChosenEffect> {
|
||||
|
||||
boolean onTop = false;
|
||||
|
||||
public NissasChosenEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "If {this} would be put into a graveyard from the battlefield, put it on the bottom of its owner's library instead";
|
||||
|
@ -84,7 +82,6 @@ class NissasChosenEffect extends ReplacementEffectImpl<NissasChosenEffect> {
|
|||
|
||||
public NissasChosenEffect(final NissasChosenEffect effect) {
|
||||
super(effect);
|
||||
this.onTop = effect.onTop;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -101,7 +98,7 @@ class NissasChosenEffect extends ReplacementEffectImpl<NissasChosenEffect> {
|
|||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if ( card != null && event.getTargetId().equals(source.getSourceId()) ) {
|
||||
return card.moveToZone(Zone.LIBRARY, source.getId(), game, onTop);
|
||||
return card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -118,4 +115,4 @@ class NissasChosenEffect extends ReplacementEffectImpl<NissasChosenEffect> {
|
|||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,8 +51,6 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class ShoalSerpent extends CardImpl<ShoalSerpent> {
|
||||
|
||||
static String rule = "Landfall - Whenever a land enters the battlefield under your control, Shoal Serpent loses defender until end of turn";
|
||||
|
||||
public ShoalSerpent(UUID ownerId) {
|
||||
super(ownerId, 65, "Shoal Serpent", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{U}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
|
@ -105,8 +103,9 @@ class ShoalSerpentEffect extends ContinuousEffectImpl<ShoalSerpentEffect> {
|
|||
if (sublayer == SubLayer.NA) {
|
||||
for (Iterator<Ability> i = permanent.getAbilities().iterator(); i.hasNext();) {
|
||||
Ability entry = i.next();
|
||||
if (entry.getId().equals(DefenderAbility.getInstance().getId()))
|
||||
if (entry.getId().equals(DefenderAbility.getInstance().getId())) {
|
||||
i.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue