forked from External/mage
[refactor] removed generic parameter from Cost
This commit is contained in:
parent
a6f1bc7f00
commit
e2c7fdf121
103 changed files with 105 additions and 118 deletions
|
|
@ -74,7 +74,7 @@ public class ElvishSpiritGuide extends CardImpl {
|
|||
}
|
||||
|
||||
|
||||
class ExileSourceFromHandCost extends CostImpl<ExileSourceFromHandCost> {
|
||||
class ExileSourceFromHandCost extends CostImpl {
|
||||
|
||||
public ExileSourceFromHandCost() {
|
||||
this.text = "Exile {this} from your hand";
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class BlindingPowder extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class BlindingPowderUnattachCost extends CostImpl<BlindingPowderUnattachCost> {
|
||||
class BlindingPowderUnattachCost extends CostImpl {
|
||||
|
||||
public BlindingPowderUnattachCost() {
|
||||
this.text = "Unattach Blinding Powder";
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class ShurikenDamageEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
|
||||
class ShurikenUnattachCost extends CostImpl<ShurikenUnattachCost> {
|
||||
class ShurikenUnattachCost extends CostImpl {
|
||||
|
||||
Permanent equipment;
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class HankyuDealsDamageEffect extends OneShotEffect {
|
|||
|
||||
}
|
||||
|
||||
class HankyuCountersSourceCost extends CostImpl<HankyuCountersSourceCost> {
|
||||
class HankyuCountersSourceCost extends CostImpl {
|
||||
|
||||
private int removedCounters;
|
||||
private UUID effectGivingEquipmentId;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class HisokaMinamoSensei extends CardImpl {
|
|||
|
||||
}
|
||||
|
||||
class HisokaMinamoSenseiDiscardTargetCost extends CostImpl<HisokaMinamoSenseiDiscardTargetCost> {
|
||||
class HisokaMinamoSenseiDiscardTargetCost extends CostImpl {
|
||||
|
||||
protected int convertedManaCosts = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class VishKalBloodArbiter extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class VishKalBloodArbiterCost extends CostImpl<VishKalBloodArbiterCost> {
|
||||
class VishKalBloodArbiterCost extends CostImpl {
|
||||
|
||||
private int amount;
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ class MarathWillOfTheWildElementalToken extends Token {
|
|||
}
|
||||
}
|
||||
|
||||
class MarathWillOfTheWildRemoveCountersCost extends CostImpl<MarathWillOfTheWildRemoveCountersCost> {
|
||||
class MarathWillOfTheWildRemoveCountersCost extends CostImpl {
|
||||
|
||||
public MarathWillOfTheWildRemoveCountersCost() {
|
||||
this.text = "Remove X +1/+1 counters from Marath";
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class JarOfEyeballsTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class JarOfEyeballsCost extends CostImpl<JarOfEyeballsCost> {
|
||||
class JarOfEyeballsCost extends CostImpl {
|
||||
|
||||
private int removedCounters;
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class LeoninBola extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class UnattachCost extends CostImpl<UnattachCost> {
|
||||
class UnattachCost extends CostImpl {
|
||||
|
||||
private UUID attachmentid;
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public class HatchetBully extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class HatchetBullyCost extends CostImpl<HatchetBullyCost> {
|
||||
class HatchetBullyCost extends CostImpl {
|
||||
|
||||
public HatchetBullyCost() {
|
||||
this.text = "Put a -1/-1 counter on a creature you control";
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public class ImpelledGiant extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class ImpelledGiantCost extends CostImpl<ImpelledGiantCost> {
|
||||
class ImpelledGiantCost extends CostImpl {
|
||||
|
||||
TargetControlledPermanent target;
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ class BackFromTheBrinkEffect extends OneShotEffect {
|
|||
|
||||
}
|
||||
|
||||
class BackFromTheBrinkCost extends CostImpl<BackFromTheBrinkCost> {
|
||||
class BackFromTheBrinkCost extends CostImpl {
|
||||
|
||||
public BackFromTheBrinkCost() {
|
||||
this.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class VampireToken extends Token {
|
|||
}
|
||||
}
|
||||
|
||||
class ControlFiveVampiresCost extends CostImpl<ControlFiveVampiresCost> {
|
||||
class ControlFiveVampiresCost extends CostImpl {
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public class SkirsdagHighPriest extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SkirsdagHighPriestCost extends CostImpl<SkirsdagHighPriestCost> {
|
||||
class SkirsdagHighPriestCost extends CostImpl {
|
||||
|
||||
public SkirsdagHighPriestCost() {
|
||||
this.text = "Activate this ability only if a creature died this turn";
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class SageOfHours extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SageOfHoursCost extends CostImpl<SageOfHoursCost> {
|
||||
class SageOfHoursCost extends CostImpl {
|
||||
|
||||
private int removedCounters;
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class SilvergillAdept extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SilvergillAdeptCost extends CostImpl<SilvergillAdeptCost> {
|
||||
class SilvergillAdeptCost extends CostImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Merfolk card");
|
||||
private GenericManaCost mana = new GenericManaCost(3);
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class AncientHellkiteAbility extends ActivatedAbilityImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class AncientHellkiteCost extends CostImpl<AncientHellkiteCost> {
|
||||
class AncientHellkiteCost extends CostImpl {
|
||||
|
||||
public AncientHellkiteCost() {
|
||||
this.text = "Activate this ability only if Ancient Hellkite is attacking";
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class LandGrantCondition implements Condition {
|
|||
}
|
||||
}
|
||||
|
||||
class LandGrantReavealCost extends CostImpl<LandGrantReavealCost> {
|
||||
class LandGrantReavealCost extends CostImpl {
|
||||
|
||||
public LandGrantReavealCost() {
|
||||
this.text = "reveal your hand";
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class PhyrexianDreadnought extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class PhyrexianDreadnoughtSacrificeCost extends CostImpl<PhyrexianDreadnoughtSacrificeCost> {
|
||||
class PhyrexianDreadnoughtSacrificeCost extends CostImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("any number of creatures with total power 12 or greater");
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ public class RiftElemental extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class RemoveCounterFromCardCost extends CostImpl<RemoveCounterFromCardCost> {
|
||||
class RemoveCounterFromCardCost extends CostImpl {
|
||||
|
||||
private TargetCard target;
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class GreenhiltTrainee extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class GreenhiltTraineeCost extends CostImpl<GreenhiltTraineeCost> {
|
||||
class GreenhiltTraineeCost extends CostImpl {
|
||||
|
||||
public GreenhiltTraineeCost() {
|
||||
this.text = "Activate this ability only if Greenhilt Trainee's power is 4 or greater";
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public class SimianSpiritGuide extends CardImpl {
|
|||
}
|
||||
|
||||
|
||||
class ExileSourceFromHandCost extends CostImpl<ExileSourceFromHandCost> {
|
||||
class ExileSourceFromHandCost extends CostImpl {
|
||||
|
||||
public ExileSourceFromHandCost() {
|
||||
this.text = "Exile {this} from your hand";
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class RakdosLordOfRiots extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class RakdosLordOfRiotsCost extends CostImpl<RakdosLordOfRiotsCost> {
|
||||
class RakdosLordOfRiotsCost extends CostImpl {
|
||||
|
||||
public RakdosLordOfRiotsCost() {
|
||||
text = "You can't cast Rakdos, Lord of Riots unless an opponent lost life this turn";
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class TombOfUrami extends CardImpl {
|
|||
}
|
||||
|
||||
|
||||
class SacrificeAllLandCost extends CostImpl<SacrificeAllLandCost> {
|
||||
class SacrificeAllLandCost extends CostImpl {
|
||||
|
||||
public SacrificeAllLandCost() {
|
||||
this.text = "Sacrifice all lands you control";
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public class BloodshotTrainee extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class BloodshotTraineeCost extends CostImpl<BloodshotTraineeCost> {
|
||||
class BloodshotTraineeCost extends CostImpl {
|
||||
|
||||
public BloodshotTraineeCost() {
|
||||
this.text = "Activate this ability only if Bloodshot Trainee's power is 4 or greater";
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class LeechriddenSwamp extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class ControlTwoOrMoreBlackPermanentsCost extends CostImpl<ControlTwoOrMoreBlackPermanentsCost> {
|
||||
class ControlTwoOrMoreBlackPermanentsCost extends CostImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class EssenceBottle extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class EssenceBottleCost extends CostImpl<EssenceBottleCost> {
|
||||
class EssenceBottleCost extends CostImpl {
|
||||
|
||||
private int removedCounters;
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class TortureChamber extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class TortureChamberCost extends CostImpl<TortureChamberCost> {
|
||||
class TortureChamberCost extends CostImpl {
|
||||
|
||||
private int removedCounters;
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class WallOfRoots extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class WallOfRootsCost extends CostImpl<WallOfRootsCost> {
|
||||
class WallOfRootsCost extends CostImpl {
|
||||
|
||||
public WallOfRootsCost() {
|
||||
this.text = "Put a -0/-1 counter on {this}";
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class MoltenHydra extends CardImpl {
|
|||
|
||||
|
||||
|
||||
class RemoveAllCountersSourceCost extends CostImpl<RemoveAllCountersSourceCost> {
|
||||
class RemoveAllCountersSourceCost extends CostImpl {
|
||||
|
||||
private int amount;
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class PermafrostTrapWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class PermafrostTrapAlternativeCost extends AlternativeCostImpl<PermafrostTrapAlternativeCost> {
|
||||
class PermafrostTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public PermafrostTrapAlternativeCost() {
|
||||
super("you may pay {U} rather than pay Permafrost Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class RazorBoomerang extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class UnattachCost extends CostImpl<UnattachCost> {
|
||||
class UnattachCost extends CostImpl {
|
||||
|
||||
private UUID attachmentid;
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class RefractionTrapWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class RefractionTrapAlternativeCost extends AlternativeCostImpl<RefractionTrapAlternativeCost> {
|
||||
class RefractionTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public RefractionTrapAlternativeCost() {
|
||||
super("You may pay {W} rather than pay Refraction Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class RicochetTrapWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class RicochetTrapAlternativeCost extends AlternativeCostImpl<RicochetTrapAlternativeCost> {
|
||||
class RicochetTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public RicochetTrapAlternativeCost() {
|
||||
super("You may pay {R} rather than pay Ricochet Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public class SlingbowTrap extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SlingbowTrapAlternativeCost extends AlternativeCostImpl<SlingbowTrapAlternativeCost> {
|
||||
class SlingbowTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public SlingbowTrapAlternativeCost() {
|
||||
super("you may pay {G} rather than pay {this}'s mana cost");
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class TectonicEdge extends CardImpl {
|
|||
|
||||
}
|
||||
|
||||
class TectonicEdgeCost extends CostImpl<TectonicEdgeCost> {
|
||||
class TectonicEdgeCost extends CostImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class ArchiveTrapWatcher extends Watcher {
|
|||
|
||||
}
|
||||
|
||||
class ArchiveTrapAlternativeCost extends AlternativeCostImpl<ArchiveTrapAlternativeCost> {
|
||||
class ArchiveTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public ArchiveTrapAlternativeCost() {
|
||||
super("you may pay {0} rather than pay Archive Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class ArrowVolleyTrap extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class ArrowVolleyTrapAlternativeCost extends AlternativeCostImpl<ArrowVolleyTrapAlternativeCost> {
|
||||
class ArrowVolleyTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public ArrowVolleyTrapAlternativeCost() {
|
||||
super("you may pay {1}{W} rather than pay Arrow Volley Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class BalothCageTrapWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class BalothCageTrapAlternativeCost extends AlternativeCostImpl<BalothCageTrapAlternativeCost> {
|
||||
class BalothCageTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public BalothCageTrapAlternativeCost() {
|
||||
super("you may pay {1}{G} rather than pay Baloth Cage Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class BlazingTorchEvasionEffect extends RestrictionEffect<BlazingTorchEvasionEff
|
|||
}
|
||||
}
|
||||
|
||||
class BlazingTorchCost extends CostImpl<BlazingTorchCost> {
|
||||
class BlazingTorchCost extends CostImpl {
|
||||
|
||||
public BlazingTorchCost() {
|
||||
this.text = "Sacrifice Blazing Torch";
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class CobraTrapWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class CobraTrapAlternativeCost extends AlternativeCostImpl<CobraTrapAlternativeCost> {
|
||||
class CobraTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public CobraTrapAlternativeCost() {
|
||||
super("you may pay {G} rather than pay Cobra Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class FeastOfBlood extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class FeastOfBloodCost extends CostImpl<FeastOfBloodCost> {
|
||||
class FeastOfBloodCost extends CostImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class ControllerDamagedByCreatureWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class InfernoTrapAlternativeCost extends AlternativeCostImpl<InfernoTrapAlternativeCost> {
|
||||
class InfernoTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public InfernoTrapAlternativeCost() {
|
||||
super("you may pay {R} rather than pay Inferno Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ class LavaballTrapWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class LavaballTrapAlternativeCost extends AlternativeCostImpl<LavaballTrapAlternativeCost> {
|
||||
class LavaballTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public LavaballTrapAlternativeCost() {
|
||||
super("you may pay {3}{R}{R} rather than pay Lavaball Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class LethargyTrap extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class LethargyTrapAlternativeCost extends AlternativeCostImpl<LethargyTrapAlternativeCost> {
|
||||
class LethargyTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public LethargyTrapAlternativeCost() {
|
||||
super("you may pay {U} rather than pay Lethargy Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ class LuminarchAscensionTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class SourceHasCountersCost extends CostImpl<SourceHasCountersCost> {
|
||||
class SourceHasCountersCost extends CostImpl {
|
||||
|
||||
private int counters;
|
||||
private CounterType counterType;
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class MindbreakTrapWatcher extends Watcher {
|
|||
|
||||
}
|
||||
|
||||
class MindbreakTrapAlternativeCost extends AlternativeCostImpl<MindbreakTrapAlternativeCost> {
|
||||
class MindbreakTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public MindbreakTrapAlternativeCost() {
|
||||
super("you may pay {0} rather than pay Mindbreak Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class NeedlebiteTrap extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class NeedlebiteTrapAlternativeCost extends AlternativeCostImpl<NeedlebiteTrapAlternativeCost> {
|
||||
class NeedlebiteTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public NeedlebiteTrapAlternativeCost() {
|
||||
super("If an opponent gained life this turn, you may pay {B} rather than pay {this}'s mana cost");
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class PitfallTrap extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class PitfallTrapAlternativeCost extends AlternativeCostImpl<PitfallTrapAlternativeCost> {
|
||||
class PitfallTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public PitfallTrapAlternativeCost() {
|
||||
super("you may pay {W} rather than pay Pitfall Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class RavenousTrap extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class RavenousTrapAlternativeCost extends AlternativeCostImpl<RavenousTrapAlternativeCost> {
|
||||
class RavenousTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public RavenousTrapAlternativeCost() {
|
||||
super("If an opponent had three or more cards put into his or her graveyard from anywhere this turn, you may pay {0} rather than pay Ravenous Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ class CardsDrawnOpponentWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class RuneflareTrapAlternativeCost extends AlternativeCostImpl<RuneflareTrapAlternativeCost> {
|
||||
class RuneflareTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public RuneflareTrapAlternativeCost() {
|
||||
super("you may pay {R} rather than pay Runeflare Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class SummoningTrapWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class SummoningTrapAlternativeCost extends AlternativeCostImpl<SummoningTrapAlternativeCost> {
|
||||
class SummoningTrapAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public SummoningTrapAlternativeCost() {
|
||||
super("you may pay {0} rather than pay Summoning Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class WhiplashTrapWatcher extends Watcher {
|
|||
}
|
||||
}
|
||||
|
||||
class WhiplashAlternativeCost extends AlternativeCostImpl<WhiplashAlternativeCost> {
|
||||
class WhiplashAlternativeCost extends AlternativeCostImpl {
|
||||
|
||||
public WhiplashAlternativeCost() {
|
||||
super("you may pay {U} rather than pay Whiplash Trap's mana cost");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mage.abilities.costs;
|
|||
import mage.abilities.Ability;
|
||||
import mage.game.Game;
|
||||
|
||||
public class AlternativeCostImpl<T extends AlternativeCostImpl<T>> extends CostsImpl<Cost> implements AlternativeCost {
|
||||
public class AlternativeCostImpl extends CostsImpl implements AlternativeCost {
|
||||
|
||||
protected String name;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,16 +33,13 @@ import mage.target.Targets;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class CostImpl<T extends CostImpl<T>> implements Cost {
|
||||
public abstract class CostImpl implements Cost {
|
||||
|
||||
protected UUID id;
|
||||
protected String text;
|
||||
protected boolean paid;
|
||||
protected Targets targets;
|
||||
|
||||
@Override
|
||||
public abstract T copy();
|
||||
|
||||
public CostImpl() {
|
||||
id = UUID.randomUUID();
|
||||
paid = false;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ package mage.abilities.costs;
|
|||
*/
|
||||
|
||||
|
||||
public class OptionalAdditionalCostImpl <T extends OptionalAdditionalCostImpl<T>> extends CostsImpl<Cost> implements OptionalAdditionalCost{
|
||||
public class OptionalAdditionalCostImpl <T extends OptionalAdditionalCostImpl> extends CostsImpl<Cost> implements OptionalAdditionalCost{
|
||||
|
||||
|
||||
protected String name;
|
||||
|
|
|
|||
|
|
@ -38,10 +38,9 @@ import mage.target.Targets;
|
|||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
* @param <T> variable cost type
|
||||
*/
|
||||
|
||||
public abstract class VariableCostImpl<T extends VariableCostImpl<T>> implements Cost, VariableCost {
|
||||
public abstract class VariableCostImpl implements Cost, VariableCost {
|
||||
|
||||
protected UUID id;
|
||||
protected String text;
|
||||
|
|
@ -51,9 +50,6 @@ public abstract class VariableCostImpl<T extends VariableCostImpl<T>> implements
|
|||
protected String xText;
|
||||
protected String actionText;
|
||||
|
||||
@Override
|
||||
public abstract T copy();
|
||||
|
||||
public VariableCostImpl(String actionText) {
|
||||
this("X", actionText);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.game.Game;
|
|||
|
||||
import java.util.UUID;
|
||||
|
||||
public class ControlPermanentCost extends CostImpl<ControlPermanentCost> {
|
||||
public class ControlPermanentCost extends CostImpl {
|
||||
private FilterControlledPermanent filter;
|
||||
|
||||
public ControlPermanentCost(FilterControlledPermanent filter) {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import mage.players.Player;
|
|||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class DiscardHandCost extends CostImpl<DiscardHandCost> {
|
||||
public class DiscardHandCost extends CostImpl {
|
||||
|
||||
public DiscardHandCost() {
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.players.Player;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class DiscardSourceCost extends CostImpl<DiscardSourceCost> {
|
||||
public class DiscardSourceCost extends CostImpl {
|
||||
|
||||
public DiscardSourceCost() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import mage.target.common.TargetCardInHand;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class DiscardTargetCost extends CostImpl<DiscardTargetCost> {
|
||||
public class DiscardTargetCost extends CostImpl {
|
||||
|
||||
List<Card> cards = new ArrayList<>();
|
||||
protected boolean randomDiscard;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import mage.target.common.TargetCardInHand;
|
|||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class DiscardXTargetCost extends VariableCostImpl<DiscardXTargetCost> {
|
||||
public class DiscardXTargetCost extends VariableCostImpl {
|
||||
|
||||
protected FilterCard filter;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ import mage.util.CardUtil;
|
|||
*
|
||||
* @author nantuko
|
||||
*/
|
||||
public class ExileFromGraveCost extends CostImpl<ExileFromGraveCost> {
|
||||
public class ExileFromGraveCost extends CostImpl {
|
||||
|
||||
public ExileFromGraveCost(TargetCardInYourGraveyard target) {
|
||||
this.addTarget(target);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ import mage.target.common.TargetCardInHand;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ExileFromHandCost extends CostImpl<ExileFromHandCost> {
|
||||
public class ExileFromHandCost extends CostImpl {
|
||||
|
||||
List<Card> cards = new ArrayList<Card>();
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import mage.target.TargetSpell;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ExileFromStackCost extends CostImpl<ExileFromStackCost> {
|
||||
public class ExileFromStackCost extends CostImpl {
|
||||
|
||||
public ExileFromStackCost(TargetSpell target) {
|
||||
this.addTarget(target);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class ExileSourceCost extends CostImpl<ExileSourceCost> {
|
||||
public class ExileSourceCost extends CostImpl {
|
||||
|
||||
public ExileSourceCost() {
|
||||
this.text = "Exile {this}";
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author magenoxx_at_gmail.com
|
||||
*/
|
||||
public class ExileSourceFromGraveCost extends CostImpl<ExileSourceFromGraveCost> {
|
||||
public class ExileSourceFromGraveCost extends CostImpl {
|
||||
|
||||
public ExileSourceFromGraveCost() {
|
||||
this.text = "Exile this card from your graveyard";
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import mage.target.common.TargetCardInYourGraveyard;
|
|||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class ExileXFromYourGraveCost extends VariableCostImpl<ExileXFromYourGraveCost> {
|
||||
public class ExileXFromYourGraveCost extends VariableCostImpl {
|
||||
|
||||
protected FilterCard filter;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import mage.target.TargetPlayer;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class GainLifeOpponentCost extends CostImpl<GainLifeOpponentCost> {
|
||||
public class GainLifeOpponentCost extends CostImpl {
|
||||
|
||||
private static final FilterPlayer filter = new FilterPlayer("opponent that can gain life");
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import mage.players.Player;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class GainLifePlayersCost extends CostImpl<GainLifePlayersCost> {
|
||||
public class GainLifePlayersCost extends CostImpl {
|
||||
|
||||
private final int amount;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import mage.game.Game;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class MetalcraftCost extends CostImpl<MetalcraftCost> {
|
||||
public class MetalcraftCost extends CostImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact");
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import mage.game.Game;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class OnlyDuringUpkeepCost extends CostImpl<OnlyDuringUpkeepCost> {
|
||||
public class OnlyDuringUpkeepCost extends CostImpl {
|
||||
|
||||
public OnlyDuringUpkeepCost() {
|
||||
text = "Activate this ability only during your upkeep";
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class PayLifeCost extends CostImpl<PayLifeCost> {
|
||||
public class PayLifeCost extends CostImpl {
|
||||
|
||||
private final int amount;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class PayLoyaltyCost extends CostImpl<PayLoyaltyCost> {
|
||||
public class PayLoyaltyCost extends CostImpl {
|
||||
|
||||
private final int amount;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.players.Player;
|
|||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class PayVariableLifeCost extends VariableCostImpl<PayVariableLifeCost> {
|
||||
public class PayVariableLifeCost extends VariableCostImpl {
|
||||
|
||||
public PayVariableLifeCost() {
|
||||
this(false);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class PayVariableLoyaltyCost extends VariableCostImpl<PayVariableLoyaltyCost> {
|
||||
public class PayVariableLoyaltyCost extends VariableCostImpl {
|
||||
|
||||
public PayVariableLoyaltyCost() {
|
||||
super("loyality counters to remove");
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import mage.util.CardUtil;
|
|||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class PutCountersSourceCost extends CostImpl<PutCountersSourceCost> {
|
||||
public class PutCountersSourceCost extends CostImpl {
|
||||
|
||||
private int amount;
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
|
||||
|
||||
public class PutTopCardOfYourLibraryToGraveyardCost extends CostImpl<PutTopCardOfYourLibraryToGraveyardCost> {
|
||||
public class PutTopCardOfYourLibraryToGraveyardCost extends CostImpl {
|
||||
|
||||
int numberOfCards;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ import mage.util.CardUtil;
|
|||
*
|
||||
* @author LevelX
|
||||
*/
|
||||
public class RemoveCounterCost extends CostImpl<RemoveCounterCost> {
|
||||
public class RemoveCounterCost extends CostImpl {
|
||||
|
||||
private TargetPermanent target;
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import mage.util.CardUtil;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class RemoveCountersSourceCost extends CostImpl<RemoveCountersSourceCost> {
|
||||
public class RemoveCountersSourceCost extends CostImpl {
|
||||
|
||||
private int amount;
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class RemoveVariableCountersSourceCost extends VariableCostImpl<RemoveVariableCountersSourceCost> {
|
||||
public class RemoveVariableCountersSourceCost extends VariableCostImpl {
|
||||
|
||||
protected int minimalCountersToPay = 0;
|
||||
private String counterName;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import mage.target.TargetPermanent;
|
|||
*
|
||||
* @author LevelX
|
||||
*/
|
||||
public class RemoveVariableCountersTargetCost extends VariableCostImpl<RemoveVariableCountersTargetCost> {
|
||||
public class RemoveVariableCountersTargetCost extends VariableCostImpl {
|
||||
|
||||
protected FilterPermanent filter;
|
||||
protected CounterType counterTypeToRemove;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.game.permanent.Permanent;
|
|||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public class ReturnToHandSourceCost extends CostImpl<ReturnToHandSourceCost> {
|
||||
public class ReturnToHandSourceCost extends CostImpl {
|
||||
|
||||
public ReturnToHandSourceCost() {
|
||||
this.text = "return {this} to it's owner's hand";
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class ReturnToHandTargetCost extends CostImpl<ReturnToHandTargetCost> {
|
||||
public class ReturnToHandTargetCost extends CostImpl {
|
||||
|
||||
public ReturnToHandTargetCost(TargetControlledPermanent target) {
|
||||
this.addTarget(target);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ import mage.players.Player;
|
|||
*
|
||||
*/
|
||||
|
||||
public class RevealSourceFromYourHandCost extends CostImpl<RevealSourceFromYourHandCost> {
|
||||
public class RevealSourceFromYourHandCost extends CostImpl {
|
||||
public RevealSourceFromYourHandCost() {
|
||||
this.text = "reveal {this} from your hand";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
public class RevealTargetFromHandCost extends CostImpl<RevealTargetFromHandCost> {
|
||||
public class RevealTargetFromHandCost extends CostImpl {
|
||||
|
||||
public int convertedManaCosts = 0;
|
||||
protected int numberCardsRevealed = 0;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SacrificeAllCost extends CostImpl<SacrificeAllCost> {
|
||||
public class SacrificeAllCost extends CostImpl {
|
||||
|
||||
private FilterPermanent filter;
|
||||
private List<Permanent> permanents = new ArrayList<Permanent>();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class SacrificeSourceCost extends CostImpl<SacrificeSourceCost> {
|
||||
public class SacrificeSourceCost extends CostImpl {
|
||||
|
||||
public SacrificeSourceCost() {
|
||||
this.text = "Sacrifice {this}";
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class SacrificeTargetCost extends CostImpl<SacrificeTargetCost> {
|
||||
public class SacrificeTargetCost extends CostImpl {
|
||||
|
||||
List<Permanent> permanents = new ArrayList<>();
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SacrificeXTargetCost extends VariableCostImpl<SacrificeXTargetCost> {
|
||||
public class SacrificeXTargetCost extends VariableCostImpl {
|
||||
|
||||
protected FilterControlledPermanent filter;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class TapSourceCost extends CostImpl<TapSourceCost> {
|
||||
public class TapSourceCost extends CostImpl {
|
||||
|
||||
public TapSourceCost() {
|
||||
this.text = "{T}";
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import mage.util.CardUtil;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class TapTargetCost extends CostImpl<TapTargetCost> {
|
||||
public class TapTargetCost extends CostImpl {
|
||||
|
||||
TargetControlledPermanent target;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class TapVariableTargetCost extends VariableCostImpl<TapVariableTargetCost> {
|
||||
public class TapVariableTargetCost extends VariableCostImpl {
|
||||
|
||||
protected FilterControlledPermanent filter;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class UntapSourceCost extends CostImpl<UntapSourceCost> {
|
||||
public class UntapSourceCost extends CostImpl {
|
||||
|
||||
public UntapSourceCost() {
|
||||
this.text = "{Q}";
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import java.util.UUID;
|
|||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class UntapTargetCost extends CostImpl<UntapTargetCost> {
|
||||
public class UntapTargetCost extends CostImpl {
|
||||
|
||||
TargetControlledPermanent target;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import mage.constants.ColoredManaSymbol;
|
|||
import mage.game.Game;
|
||||
import mage.players.ManaPool;
|
||||
|
||||
public class ColoredManaCost extends ManaCostImpl<ColoredManaCost> {
|
||||
public class ColoredManaCost extends ManaCostImpl {
|
||||
|
||||
protected ColoredManaSymbol mana;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import mage.constants.ColoredManaSymbol;
|
|||
import mage.game.Game;
|
||||
import mage.players.ManaPool;
|
||||
|
||||
public class GenericManaCost extends ManaCostImpl<GenericManaCost> {
|
||||
public class GenericManaCost extends ManaCostImpl {
|
||||
|
||||
protected int mana;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import mage.constants.ColoredManaSymbol;
|
|||
import mage.game.Game;
|
||||
import mage.players.ManaPool;
|
||||
|
||||
public class HybridManaCost extends ManaCostImpl<HybridManaCost> {
|
||||
public class HybridManaCost extends ManaCostImpl {
|
||||
|
||||
private final ColoredManaSymbol mana1;
|
||||
private final ColoredManaSymbol mana2;
|
||||
|
|
|
|||
|
|
@ -41,16 +41,13 @@ import mage.players.ManaPool;
|
|||
import mage.players.Player;
|
||||
|
||||
|
||||
public abstract class ManaCostImpl<T extends ManaCostImpl<T>> extends CostImpl<T> implements ManaCost {
|
||||
public abstract class ManaCostImpl extends CostImpl implements ManaCost {
|
||||
|
||||
protected Mana payment;
|
||||
protected Mana cost;
|
||||
protected ManaOptions options;
|
||||
protected Filter sourceFilter;
|
||||
|
||||
@Override
|
||||
public abstract T copy();
|
||||
|
||||
public ManaCostImpl() {
|
||||
payment = new Mana();
|
||||
options = new ManaOptions();
|
||||
|
|
@ -204,10 +201,7 @@ public abstract class ManaCostImpl<T extends ManaCostImpl<T>> extends CostImpl<T
|
|||
}
|
||||
|
||||
protected boolean isColorlessPaid(int mana) {
|
||||
if (this.payment.count() >= mana) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return this.payment.count() >= mana;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import mage.constants.ColoredManaSymbol;
|
|||
import mage.game.Game;
|
||||
import mage.players.ManaPool;
|
||||
|
||||
public class MonoHybridManaCost extends ManaCostImpl<MonoHybridManaCost> {
|
||||
public class MonoHybridManaCost extends ManaCostImpl {
|
||||
|
||||
private final ColoredManaSymbol mana;
|
||||
private int mana2 = 2;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue