Renamed DynamicValue.clone to DynamicValue.copy

This commit is contained in:
North 2012-12-23 14:58:44 +02:00
parent 5305c3bfaa
commit 5dbe482662
70 changed files with 80 additions and 80 deletions

View file

@ -96,7 +96,7 @@ class AnathemancerCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new AnathemancerCount(); return new AnathemancerCount();
} }

View file

@ -98,7 +98,7 @@ class HighestLifeTotalAmongOpponentsCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new CardsInControllerHandCount(); return new CardsInControllerHandCount();
} }

View file

@ -115,7 +115,7 @@ class TappedCreaturesControlledByTargetCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new TappedCreaturesControlledByTargetCount(); return new TappedCreaturesControlledByTargetCount();
} }

View file

@ -199,7 +199,7 @@ class CardsInTargetHandCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new CardsInTargetHandCount(); return new CardsInTargetHandCount();
} }

View file

@ -120,7 +120,7 @@ class ZuberasDiedDynamicValue implements DynamicValue {
} }
@Override @Override
public ZuberasDiedDynamicValue clone() { public ZuberasDiedDynamicValue copy() {
return new ZuberasDiedDynamicValue(); return new ZuberasDiedDynamicValue();
} }

View file

@ -79,7 +79,7 @@ class SilentChantZuberaDynamicValue implements DynamicValue {
} }
@Override @Override
public SilentChantZuberaDynamicValue clone() { public SilentChantZuberaDynamicValue copy() {
return new SilentChantZuberaDynamicValue(); return new SilentChantZuberaDynamicValue();
} }

View file

@ -140,7 +140,7 @@ class CursesAttachedCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new CursesAttachedCount(); return new CursesAttachedCount();
} }

View file

@ -137,7 +137,7 @@ class CardsInTargetPlayerHandCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new mage.abilities.dynamicvalue.common.CardsInControllerHandCount(); return new mage.abilities.dynamicvalue.common.CardsInControllerHandCount();
} }

View file

@ -85,7 +85,7 @@ class HalfZombiesCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new HalfZombiesCount(); return new HalfZombiesCount();
} }

View file

@ -116,7 +116,7 @@ class GarrukTheVeilCursedValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return this; return this;
} }

View file

@ -176,7 +176,7 @@ class GutterGrimeCounters implements DynamicValue {
} }
@Override @Override
public GutterGrimeCounters clone() { public GutterGrimeCounters copy() {
return this; return this;
} }

View file

@ -96,7 +96,7 @@ class RunechantersPikeValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return this; return this;
} }

View file

@ -104,7 +104,7 @@ class ChandraNalaarXValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return defaultValue; return defaultValue;
} }

View file

@ -160,7 +160,7 @@ class SuturedGhoulPowerCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return getInstance(); return getInstance();
} }
@ -202,7 +202,7 @@ class SuturedGhoulToughnessCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return getInstance(); return getInstance();
} }

View file

@ -98,7 +98,7 @@ class GolemSkinGauntletsAttachedCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new GolemSkinGauntletsAttachedCount(this); return new GolemSkinGauntletsAttachedCount(this);
} }

View file

@ -123,7 +123,7 @@ class FreshMeatDynamicValue implements DynamicValue {
} }
@Override @Override
public FreshMeatDynamicValue clone() { public FreshMeatDynamicValue copy() {
return new FreshMeatDynamicValue(); return new FreshMeatDynamicValue();
} }

View file

@ -87,7 +87,7 @@ class IchorExplosionDynamicValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return this; return this;
} }

View file

@ -91,7 +91,7 @@ class OpponentsPoisonCountersCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new OpponentsPoisonCountersCount(); return new OpponentsPoisonCountersCount();
} }

View file

@ -89,7 +89,7 @@ class CivicSaberColorCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new CivicSaberColorCount(this); return new CivicSaberColorCount(this);
} }

View file

@ -108,7 +108,7 @@ class CardsInEnchantedControllerHandCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new mage.abilities.dynamicvalue.common.CardsInControllerHandCount(); return new mage.abilities.dynamicvalue.common.CardsInControllerHandCount();
} }

View file

@ -145,7 +145,7 @@ class MyrBattlesphereEffect extends OneShotEffect<MyrBattlesphereEffect> {
public MyrBattlesphereEffect(final MyrBattlesphereEffect effect) { public MyrBattlesphereEffect(final MyrBattlesphereEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
} }
@Override @Override

View file

@ -140,7 +140,7 @@ class SameNameAsExiledCountValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return instance; return instance;
} }

View file

@ -77,7 +77,7 @@ class BlessedReversalCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return this; return this;
} }

View file

@ -158,7 +158,7 @@ class MotltenHydraDynamicValue implements DynamicValue {
} }
@Override @Override
public MotltenHydraDynamicValue clone() { public MotltenHydraDynamicValue copy() {
return new MotltenHydraDynamicValue(this); return new MotltenHydraDynamicValue(this);
} }

View file

@ -88,7 +88,7 @@ class CardsInHandCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new CardsInHandCount(); return new CardsInHandCount();
} }

View file

@ -93,7 +93,7 @@ class BoldDefensePTCount implements DynamicValue {
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new BoldDefensePTCount(); return new BoldDefensePTCount();
} }

View file

@ -89,7 +89,7 @@ class TargetPlayerCardsInHandCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new TargetPlayerCardsInHandCount(); return new TargetPlayerCardsInHandCount();
} }

View file

@ -7,6 +7,6 @@ import java.io.Serializable;
public interface DynamicValue extends Serializable { public interface DynamicValue extends Serializable {
int calculate(Game game, Ability sourceAbility); int calculate(Game game, Ability sourceAbility);
DynamicValue clone(); DynamicValue copy();
String getMessage(); String getMessage();
} }

View file

@ -72,7 +72,7 @@ public class AuraAttachedCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new AuraAttachedCount(this); return new AuraAttachedCount(this);
} }

View file

@ -46,7 +46,7 @@ public class CardsInAllGraveyardsCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new CardsInAllGraveyardsCount(this); return new CardsInAllGraveyardsCount(this);
} }

View file

@ -43,7 +43,7 @@ public class CardsInControllerGraveyardCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new CardsInControllerGraveyardCount(this); return new CardsInControllerGraveyardCount(this);
} }

View file

@ -18,7 +18,7 @@ public class CardsInControllerHandCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new CardsInControllerHandCount(); return new CardsInControllerHandCount();
} }

View file

@ -16,7 +16,7 @@ public class ControllerLifeCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new ControllerLifeCount(); return new ControllerLifeCount();
} }

View file

@ -35,7 +35,7 @@ public class CountersCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new CountersCount(this); return new CountersCount(this);
} }

View file

@ -28,7 +28,7 @@ public class DiscardCostCardConvertedMana implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new DiscardCostCardConvertedMana(); return new DiscardCostCardConvertedMana();
} }

View file

@ -49,7 +49,7 @@ public class DomainValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new DomainValue(this); return new DomainValue(this);
} }

View file

@ -72,7 +72,7 @@ public class EquipmentAttachedCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new EquipmentAttachedCount(this); return new EquipmentAttachedCount(this);
} }

View file

@ -69,7 +69,7 @@ public class ExileFromHandCostCardConvertedMana implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new ExileFromHandCostCardConvertedMana(); return new ExileFromHandCostCardConvertedMana();
} }

View file

@ -47,7 +47,7 @@ public class GetXValue implements DynamicValue {
} }
@Override @Override
public GetXValue clone() { public GetXValue copy() {
return new GetXValue(); return new GetXValue();
} }

View file

@ -33,7 +33,7 @@ public class ManaTypeInManaPoolCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new ManaTypeInManaPoolCount(this); return new ManaTypeInManaPoolCount(this);
} }

View file

@ -11,7 +11,7 @@ public class ManacostVariableValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new ManacostVariableValue(); return new ManacostVariableValue();
} }

View file

@ -57,7 +57,7 @@ public class MultikickerCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new MultikickerCount(); return new MultikickerCount();
} }

View file

@ -59,7 +59,7 @@ public class OpponentsLostLifeCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new OpponentsLostLifeCount(); return new OpponentsLostLifeCount();
} }

View file

@ -38,7 +38,7 @@ public class PermanentsOnBattlefieldCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new PermanentsOnBattlefieldCount(this); return new PermanentsOnBattlefieldCount(this);
} }

View file

@ -28,7 +28,7 @@ public class SacrificeCostCreaturesPower implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new SacrificeCostCreaturesPower(); return new SacrificeCostCreaturesPower();
} }

View file

@ -28,7 +28,7 @@ public class SacrificeCostCreaturesToughness implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new SacrificeCostCreaturesToughness(); return new SacrificeCostCreaturesToughness();
} }

View file

@ -8,11 +8,11 @@ public class SignInversionDynamicValue implements DynamicValue {
private DynamicValue value; private DynamicValue value;
public SignInversionDynamicValue(DynamicValue value) { public SignInversionDynamicValue(DynamicValue value) {
this.value = value.clone(); this.value = value.copy();
} }
SignInversionDynamicValue(final SignInversionDynamicValue dynamicValue) { SignInversionDynamicValue(final SignInversionDynamicValue dynamicValue) {
this.value = dynamicValue.value.clone(); this.value = dynamicValue.value.copy();
} }
@Override @Override
@ -21,7 +21,7 @@ public class SignInversionDynamicValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new SignInversionDynamicValue(this); return new SignInversionDynamicValue(this);
} }

View file

@ -23,7 +23,7 @@ public class SourcePermanentPowerCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new SourcePermanentPowerCount(); return new SourcePermanentPowerCount();
} }

View file

@ -22,7 +22,7 @@ public class StaticValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new StaticValue(this); return new StaticValue(this);
} }

View file

@ -73,7 +73,7 @@ public class SunburstCount implements DynamicValue{
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new SunburstCount(); return new SunburstCount();
} }

View file

@ -48,7 +48,7 @@ public class TargetConvertedManaCost implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new TargetConvertedManaCost(); return new TargetConvertedManaCost();
} }

View file

@ -53,7 +53,7 @@ public class TargetPermanentPowerCount implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new TargetPermanentPowerCount(); return new TargetPermanentPowerCount();
} }

View file

@ -37,7 +37,7 @@ public class UrzaTerrainValue implements DynamicValue {
} }
@Override @Override
public DynamicValue clone() { public DynamicValue copy() {
return new UrzaTerrainValue(v); return new UrzaTerrainValue(v);
} }

View file

@ -56,13 +56,13 @@ public class CreateTokenEffect extends OneShotEffect<CreateTokenEffect> {
public CreateTokenEffect(Token token, DynamicValue amount) { public CreateTokenEffect(Token token, DynamicValue amount) {
super(Outcome.PutCreatureInPlay); super(Outcome.PutCreatureInPlay);
this.token = token; this.token = token;
this.amount = amount.clone(); this.amount = amount.copy();
setText(); setText();
} }
public CreateTokenEffect(final CreateTokenEffect effect) { public CreateTokenEffect(final CreateTokenEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
this.token = effect.token.copy(); this.token = effect.token.copy();
} }

View file

@ -27,7 +27,7 @@ public class CreateTokenTargetEffect extends OneShotEffect<CreateTokenTargetEffe
public CreateTokenTargetEffect(Token token, DynamicValue amount) { public CreateTokenTargetEffect(Token token, DynamicValue amount) {
super(Constants.Outcome.PutCreatureInPlay); super(Constants.Outcome.PutCreatureInPlay);
this.token = token; this.token = token;
this.amount = amount.clone(); this.amount = amount.copy();
} }
public CreateTokenTargetEffect(final CreateTokenTargetEffect effect) { public CreateTokenTargetEffect(final CreateTokenTargetEffect effect) {

View file

@ -90,7 +90,7 @@ public class DamageTargetEffect extends OneShotEffect<DamageTargetEffect> {
public DamageTargetEffect(final DamageTargetEffect effect) { public DamageTargetEffect(final DamageTargetEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
this.preventable = effect.preventable; this.preventable = effect.preventable;
this.targetDescription = effect.targetDescription; this.targetDescription = effect.targetDescription;
} }

View file

@ -55,7 +55,7 @@ public class DiscardControllerEffect extends OneShotEffect<DiscardControllerEffe
public DiscardControllerEffect(final DiscardControllerEffect effect) { public DiscardControllerEffect(final DiscardControllerEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
} }
@Override @Override

View file

@ -66,7 +66,7 @@ public class DiscardTargetEffect extends OneShotEffect<DiscardTargetEffect> {
public DiscardTargetEffect(final DiscardTargetEffect effect) { public DiscardTargetEffect(final DiscardTargetEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
this.randomDiscard = effect.randomDiscard; this.randomDiscard = effect.randomDiscard;
} }

View file

@ -50,13 +50,13 @@ public class DrawCardControllerEffect extends OneShotEffect<DrawCardControllerEf
public DrawCardControllerEffect(DynamicValue amount) { public DrawCardControllerEffect(DynamicValue amount) {
super(Outcome.DrawCard); super(Outcome.DrawCard);
this.amount = amount.clone(); this.amount = amount.copy();
setText(); setText();
} }
public DrawCardControllerEffect(final DrawCardControllerEffect effect) { public DrawCardControllerEffect(final DrawCardControllerEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
} }
@Override @Override

View file

@ -51,12 +51,12 @@ public class DrawCardTargetEffect extends OneShotEffect<DrawCardTargetEffect> {
public DrawCardTargetEffect(DynamicValue amount) { public DrawCardTargetEffect(DynamicValue amount) {
super(Outcome.DrawCard); super(Outcome.DrawCard);
this.amount = amount.clone(); this.amount = amount.copy();
} }
public DrawCardTargetEffect(final DrawCardTargetEffect effect) { public DrawCardTargetEffect(final DrawCardTargetEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
} }
@Override @Override

View file

@ -51,7 +51,7 @@ public class DynamicManaEffect extends BasicManaEffect {
public DynamicManaEffect(final DynamicManaEffect effect) { public DynamicManaEffect(final DynamicManaEffect effect) {
super(effect); super(effect);
this.computedMana = effect.computedMana.copy(); this.computedMana = effect.computedMana.copy();
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
} }
@Override @Override

View file

@ -56,7 +56,7 @@ public class GainLifeEffect extends OneShotEffect<GainLifeEffect> {
public GainLifeEffect(final GainLifeEffect effect) { public GainLifeEffect(final GainLifeEffect effect) {
super(effect); super(effect);
this.life = effect.life.clone(); this.life = effect.life.copy();
} }
@Override @Override

View file

@ -73,7 +73,7 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff
public LookLibraryAndPickControllerEffect(final LookLibraryAndPickControllerEffect effect) { public LookLibraryAndPickControllerEffect(final LookLibraryAndPickControllerEffect effect) {
super(effect); super(effect);
this.numberToPick = effect.numberToPick.clone(); this.numberToPick = effect.numberToPick.copy();
this.filter = effect.filter.copy(); this.filter = effect.filter.copy();
this.revealPickedCards = effect.revealPickedCards; this.revealPickedCards = effect.revealPickedCards;
this.targetPickedCards = effect.targetPickedCards; this.targetPickedCards = effect.targetPickedCards;

View file

@ -91,7 +91,7 @@ public class LookLibraryControllerEffect extends OneShotEffect<LookLibraryContro
public LookLibraryControllerEffect(final LookLibraryControllerEffect effect) { public LookLibraryControllerEffect(final LookLibraryControllerEffect effect) {
super(effect); super(effect);
this.numberOfCards = effect.numberOfCards.clone(); this.numberOfCards = effect.numberOfCards.copy();
this.mayShuffleAfter = effect.mayShuffleAfter; this.mayShuffleAfter = effect.mayShuffleAfter;
this.targetZoneLookedCards = effect.targetZoneLookedCards; this.targetZoneLookedCards = effect.targetZoneLookedCards;
this.putOnTop = effect.putOnTop; this.putOnTop = effect.putOnTop;

View file

@ -56,7 +56,7 @@ public class LoseLifeTargetEffect extends OneShotEffect<LoseLifeTargetEffect> {
public LoseLifeTargetEffect(final LoseLifeTargetEffect effect) { public LoseLifeTargetEffect(final LoseLifeTargetEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
} }
@Override @Override

View file

@ -58,7 +58,7 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect<PutLibraryInt
public PutLibraryIntoGraveTargetEffect(final PutLibraryIntoGraveTargetEffect effect) { public PutLibraryIntoGraveTargetEffect(final PutLibraryIntoGraveTargetEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.clone(); this.amount = effect.amount.copy();
} }
public void setAmount(DynamicValue value) { public void setAmount(DynamicValue value) {

View file

@ -69,8 +69,8 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl<BoostEnchantedEff
public BoostEnchantedEffect(final BoostEnchantedEffect effect) { public BoostEnchantedEffect(final BoostEnchantedEffect effect) {
super(effect); super(effect);
this.power = effect.power.clone(); this.power = effect.power.copy();
this.toughness = effect.toughness.clone(); this.toughness = effect.toughness.copy();
} }
@Override @Override

View file

@ -73,8 +73,8 @@ public class BoostEquippedEffect extends ContinuousEffectImpl<BoostEquippedEffec
public BoostEquippedEffect(final BoostEquippedEffect effect) { public BoostEquippedEffect(final BoostEquippedEffect effect) {
super(effect); super(effect);
this.power = effect.power.clone(); this.power = effect.power.copy();
this.toughness = effect.toughness.clone(); this.toughness = effect.toughness.copy();
this.fixedTarget = effect.fixedTarget; this.fixedTarget = effect.fixedTarget;
} }

View file

@ -69,8 +69,8 @@ public class BoostSourceEffect extends ContinuousEffectImpl<BoostSourceEffect> i
public BoostSourceEffect(final BoostSourceEffect effect) { public BoostSourceEffect(final BoostSourceEffect effect) {
super(effect); super(effect);
this.power = effect.power.clone(); this.power = effect.power.copy();
this.toughness = effect.toughness.clone(); this.toughness = effect.toughness.copy();
this.lockedIn = effect.lockedIn; this.lockedIn = effect.lockedIn;
} }

View file

@ -72,8 +72,8 @@ public class BoostTargetEffect extends ContinuousEffectImpl<BoostTargetEffect> {
public BoostTargetEffect(final BoostTargetEffect effect) { public BoostTargetEffect(final BoostTargetEffect effect) {
super(effect); super(effect);
this.power = effect.power.clone(); this.power = effect.power.copy();
this.toughness = effect.toughness.clone(); this.toughness = effect.toughness.copy();
this.lockedIn = effect.lockedIn; this.lockedIn = effect.lockedIn;
} }