[MID] changed daybound/nightbound from being singleton

This commit is contained in:
Evan Kranzler 2021-09-12 18:06:46 -04:00
parent 4902a31720
commit 5f32fe5308
39 changed files with 50 additions and 78 deletions

View file

@ -35,7 +35,7 @@ public final class ArlinnTheMoonsFury extends CardImpl {
this.nightCard = true; this.nightCard = true;
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
// +2: Add {R}{G}. // +2: Add {R}{G}.
this.addAbility(new LoyaltyAbility(new BasicManaEffect(new Mana( this.addAbility(new LoyaltyAbility(new BasicManaEffect(new Mana(

View file

@ -40,7 +40,7 @@ public final class ArlinnThePacksHope extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
// +1: Until your next turn, you may cast creature spells as though they had flash, and each creature you control enters the battlefield with an additional +1/+1 counter on it. // +1: Until your next turn, you may cast creature spells as though they had flash, and each creature you control enters the battlefield with an additional +1/+1 counter on it.
Ability ability = new LoyaltyAbility(new CastAsThoughItHadFlashAllEffect( Ability ability = new LoyaltyAbility(new CastAsThoughItHadFlashAllEffect(

View file

@ -32,7 +32,7 @@ public final class BirdAdmirer extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private BirdAdmirer(final BirdAdmirer card) { private BirdAdmirer(final BirdAdmirer card) {

View file

@ -40,7 +40,7 @@ public final class BrutalCathar extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private BrutalCathar(final BrutalCathar card) { private BrutalCathar(final BrutalCathar card) {

View file

@ -32,7 +32,7 @@ public final class BurlyBreaker extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private BurlyBreaker(final BurlyBreaker card) { private BurlyBreaker(final BurlyBreaker card) {

View file

@ -29,7 +29,7 @@ public final class DireStrainBrawler extends CardImpl {
this.addAbility(VigilanceAbility.getInstance()); this.addAbility(VigilanceAbility.getInstance());
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private DireStrainBrawler(final DireStrainBrawler card) { private DireStrainBrawler(final DireStrainBrawler card) {

View file

@ -30,7 +30,7 @@ public final class DireStrainDemolisher extends CardImpl {
this.addAbility(new WardAbility(new ManaCostsImpl<>("{3}"))); this.addAbility(new WardAbility(new ManaCostsImpl<>("{3}")));
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private DireStrainDemolisher(final DireStrainDemolisher card) { private DireStrainDemolisher(final DireStrainDemolisher card) {

View file

@ -43,7 +43,7 @@ public final class FangbladeBrigand extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private FangbladeBrigand(final FangbladeBrigand card) { private FangbladeBrigand(final FangbladeBrigand card) {

View file

@ -47,7 +47,7 @@ public final class FangbladeEviscerator extends CardImpl {
), new ManaCostsImpl<>("{4}{R}"))); ), new ManaCostsImpl<>("{4}{R}")));
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private FangbladeEviscerator(final FangbladeEviscerator card) { private FangbladeEviscerator(final FangbladeEviscerator card) {

View file

@ -52,7 +52,7 @@ public final class FrenziedTrapbreaker extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private FrenziedTrapbreaker(final FrenziedTrapbreaker card) { private FrenziedTrapbreaker(final FrenziedTrapbreaker card) {

View file

@ -46,7 +46,7 @@ public final class GraveyardGlutton extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private GraveyardGlutton(final GraveyardGlutton card) { private GraveyardGlutton(final GraveyardGlutton card) {

View file

@ -48,7 +48,7 @@ public final class GraveyardTrespasser extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private GraveyardTrespasser(final GraveyardTrespasser card) { private GraveyardTrespasser(final GraveyardTrespasser card) {

View file

@ -29,7 +29,7 @@ public final class HarvesttideAssailant extends CardImpl {
this.addAbility(TrampleAbility.getInstance()); this.addAbility(TrampleAbility.getInstance());
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private HarvesttideAssailant(final HarvesttideAssailant card) { private HarvesttideAssailant(final HarvesttideAssailant card) {

View file

@ -31,7 +31,7 @@ public final class HarvesttideInfiltrator extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private HarvesttideInfiltrator(final HarvesttideInfiltrator card) { private HarvesttideInfiltrator(final HarvesttideInfiltrator card) {

View file

@ -44,7 +44,7 @@ public final class HoundTamer extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private HoundTamer(final HoundTamer card) { private HoundTamer(final HoundTamer card) {

View file

@ -38,7 +38,7 @@ public final class KessigNaturalist extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private KessigNaturalist(final KessigNaturalist card) { private KessigNaturalist(final KessigNaturalist card) {

View file

@ -56,7 +56,7 @@ public final class LordOfTheUlvenwald extends CardImpl {
this.addAbility(new AttacksTriggeredAbility(new LordOfTheUlvenwaldEffect())); this.addAbility(new AttacksTriggeredAbility(new LordOfTheUlvenwaldEffect()));
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private LordOfTheUlvenwald(final LordOfTheUlvenwald card) { private LordOfTheUlvenwald(final LordOfTheUlvenwald card) {

View file

@ -34,7 +34,7 @@ public final class MoonrageBrute extends CardImpl {
this.addAbility(new WardAbility(new PayLifeCost(3))); this.addAbility(new WardAbility(new PayLifeCost(3)));
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private MoonrageBrute(final MoonrageBrute card) { private MoonrageBrute(final MoonrageBrute card) {

View file

@ -37,7 +37,7 @@ public final class OutlandLiberator extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private OutlandLiberator(final OutlandLiberator card) { private OutlandLiberator(final OutlandLiberator card) {

View file

@ -47,7 +47,7 @@ public final class RecklessStormseeker extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private RecklessStormseeker(final RecklessStormseeker card) { private RecklessStormseeker(final RecklessStormseeker card) {

View file

@ -36,7 +36,7 @@ public final class SeafaringWerewolf extends CardImpl {
)); ));
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private SeafaringWerewolf(final SeafaringWerewolf card) { private SeafaringWerewolf(final SeafaringWerewolf card) {

View file

@ -31,7 +31,7 @@ public final class ShadyTraveler extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private ShadyTraveler(final ShadyTraveler card) { private ShadyTraveler(final ShadyTraveler card) {

View file

@ -35,7 +35,7 @@ public final class SpellruneHowler extends CardImpl {
)); ));
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private SpellruneHowler(final SpellruneHowler card) { private SpellruneHowler(final SpellruneHowler card) {

View file

@ -38,7 +38,7 @@ public final class SpellrunePainter extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private SpellrunePainter(final SpellrunePainter card) { private SpellrunePainter(final SpellrunePainter card) {

View file

@ -29,7 +29,7 @@ public final class StalkingPredator extends CardImpl {
this.addAbility(new MenaceAbility()); this.addAbility(new MenaceAbility());
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private StalkingPredator(final StalkingPredator card) { private StalkingPredator(final StalkingPredator card) {

View file

@ -49,7 +49,7 @@ public final class StormChargedSlasher extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private StormChargedSlasher(final StormChargedSlasher card) { private StormChargedSlasher(final StormChargedSlasher card) {

View file

@ -39,7 +39,7 @@ public final class SuspiciousStowaway extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private SuspiciousStowaway(final SuspiciousStowaway card) { private SuspiciousStowaway(final SuspiciousStowaway card) {

View file

@ -29,7 +29,7 @@ public final class TavernRuffian extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private TavernRuffian(final TavernRuffian card) { private TavernRuffian(final TavernRuffian card) {

View file

@ -28,7 +28,7 @@ public final class TavernSmasher extends CardImpl {
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private TavernSmasher(final TavernSmasher card) { private TavernSmasher(final TavernSmasher card) {

View file

@ -31,7 +31,7 @@ public final class TirelessHauler extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private TirelessHauler(final TirelessHauler card) { private TirelessHauler(final TirelessHauler card) {

View file

@ -33,7 +33,7 @@ public final class TovolarsHuntmaster extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private TovolarsHuntmaster(final TovolarsHuntmaster card) { private TovolarsHuntmaster(final TovolarsHuntmaster card) {

View file

@ -61,7 +61,7 @@ public final class TovolarsPackleader extends CardImpl {
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL)); ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private TovolarsPackleader(final TovolarsPackleader card) { private TovolarsPackleader(final TovolarsPackleader card) {

View file

@ -61,7 +61,7 @@ public final class UntamedPup extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private UntamedPup(final UntamedPup card) { private UntamedPup(final UntamedPup card) {

View file

@ -49,7 +49,7 @@ public final class VillageReavers extends CardImpl {
))); )));
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private VillageReavers(final VillageReavers card) { private VillageReavers(final VillageReavers card) {

View file

@ -32,7 +32,7 @@ public final class VillageWatch extends CardImpl {
// Daybound // Daybound
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
this.addAbility(DayboundAbility.getInstance()); this.addAbility(new DayboundAbility());
} }
private VillageWatch(final VillageWatch card) { private VillageWatch(final VillageWatch card) {

View file

@ -30,7 +30,7 @@ public final class WingShredder extends CardImpl {
this.addAbility(ReachAbility.getInstance()); this.addAbility(ReachAbility.getInstance());
// Nightbound // Nightbound
this.addAbility(NightboundAbility.getInstance()); this.addAbility(new NightboundAbility());
} }
private WingShredder(final WingShredder card) { private WingShredder(final WingShredder card) {

View file

@ -1,34 +1,20 @@
package mage.abilities.keyword; package mage.abilities.keyword;
import mage.abilities.MageSingleton;
import mage.abilities.StaticAbility; import mage.abilities.StaticAbility;
import mage.constants.Zone; import mage.constants.Zone;
import java.io.ObjectStreamException;
/** /**
* @author TheElk801 * @author TheElk801
* TODO: Implement this * TODO: Implement this
*/ */
public class DayboundAbility extends StaticAbility implements MageSingleton { public class DayboundAbility extends StaticAbility {
private static final DayboundAbility instance; public DayboundAbility() {
super(Zone.BATTLEFIELD, null);
static {
instance = new DayboundAbility();
// instance.addIcon(DayboundAbilityIcon.instance); (needs to be added)
} }
private Object readResolve() throws ObjectStreamException { private DayboundAbility(final DayboundAbility ability) {
return instance; super(ability);
}
public static DayboundAbility getInstance() {
return instance;
}
private DayboundAbility() {
super(Zone.ALL, null);
} }
@Override @Override
@ -38,6 +24,6 @@ public class DayboundAbility extends StaticAbility implements MageSingleton {
@Override @Override
public DayboundAbility copy() { public DayboundAbility copy() {
return instance; return new DayboundAbility(this);
} }
} }

View file

@ -1,34 +1,20 @@
package mage.abilities.keyword; package mage.abilities.keyword;
import mage.abilities.MageSingleton;
import mage.abilities.StaticAbility; import mage.abilities.StaticAbility;
import mage.constants.Zone; import mage.constants.Zone;
import java.io.ObjectStreamException;
/** /**
* @author TheElk801 * @author TheElk801
* TODO: Implement this * TODO: Implement this
*/ */
public class NightboundAbility extends StaticAbility implements MageSingleton { public class NightboundAbility extends StaticAbility {
private static final NightboundAbility instance; public NightboundAbility() {
super(Zone.BATTLEFIELD, null);
static {
instance = new NightboundAbility();
// instance.addIcon(NightboundAbilityIcon.instance); (needs to be added)
} }
private Object readResolve() throws ObjectStreamException { private NightboundAbility(final NightboundAbility ability) {
return instance; super(ability);
}
public static NightboundAbility getInstance() {
return instance;
}
private NightboundAbility() {
super(Zone.ALL, null);
} }
@Override @Override
@ -38,6 +24,6 @@ public class NightboundAbility extends StaticAbility implements MageSingleton {
@Override @Override
public NightboundAbility copy() { public NightboundAbility copy() {
return instance; return new NightboundAbility(this);
} }
} }

View file

@ -16,7 +16,7 @@ Crew|number|
Cumulative upkeep|cost| Cumulative upkeep|cost|
Cycling|cost| Cycling|cost|
Dash|card, manaString| Dash|card, manaString|
Daybound|instance| Daybound|new|
Deathtouch|instance| Deathtouch|instance|
Demonstrate|new| Demonstrate|new|
Delve|new| Delve|new|
@ -73,7 +73,7 @@ Mountainwalk|new|
Morph|card, cost| Morph|card, cost|
Mutate|card, manaString| Mutate|card, manaString|
Myriad|new| Myriad|new|
Nightbound|instance| Nightbound|new|
Ninjutsu|cost| Ninjutsu|cost|
Outlast|cost| Outlast|cost|
Partner|instance| Partner|instance|