mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
Cleanup copy methods (#11038)
* remove System.out.println * Card copy() covariant return * Effect copy() covariant return * Cost copy() covariant return * Ability copy() covariant return * ContinuousEffect copy() covariant return
This commit is contained in:
parent
948b5e2c25
commit
66cc15ed4b
71 changed files with 185 additions and 286 deletions
|
|
@ -82,7 +82,7 @@ public class CompositeCost implements Cost {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cost copy() {
|
||||
public CompositeCost copy() {
|
||||
return new CompositeCost(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ public class OrCost implements Cost {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Cost copy() {
|
||||
public OrCost copy() {
|
||||
return new OrCost(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -28,5 +27,5 @@ public interface ReplacementEffect extends ContinuousEffect {
|
|||
boolean hasSelfScope();
|
||||
|
||||
@Override
|
||||
public ContinuousEffect copy();
|
||||
ReplacementEffect copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
|
@ -25,7 +24,7 @@ public class CantBlockCreaturesSourceEffect extends RestrictionEffect {
|
|||
staticText = "{this} can't block " + filter.getMessage();
|
||||
}
|
||||
|
||||
public CantBlockCreaturesSourceEffect(CantBlockCreaturesSourceEffect effect) {
|
||||
protected CantBlockCreaturesSourceEffect(final CantBlockCreaturesSourceEffect effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter;
|
||||
}
|
||||
|
|
@ -44,7 +43,7 @@ public class CantBlockCreaturesSourceEffect extends RestrictionEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ContinuousEffect copy() {
|
||||
public CantBlockCreaturesSourceEffect copy() {
|
||||
return new CantBlockCreaturesSourceEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,10 +18,6 @@ public class BecomesChosenCreatureTypeSourceEffect extends OneShotEffect {
|
|||
this(false, Duration.EndOfTurn);
|
||||
}
|
||||
|
||||
public BecomesChosenCreatureTypeSourceEffect(boolean nonWall) {
|
||||
this(nonWall, Duration.EndOfTurn);
|
||||
}
|
||||
|
||||
public BecomesChosenCreatureTypeSourceEffect(boolean nonWall, Duration duration) {
|
||||
super(Outcome.BoostCreature);
|
||||
this.nonWall = nonWall;
|
||||
|
|
@ -47,7 +43,7 @@ public class BecomesChosenCreatureTypeSourceEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Effect copy() {
|
||||
public BecomesChosenCreatureTypeSourceEffect copy() {
|
||||
return new BecomesChosenCreatureTypeSourceEffect(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package mage.abilities.effects.common.continuous;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.choices.Choice;
|
||||
|
|
@ -80,7 +79,7 @@ public class BecomesChosenCreatureTypeTargetEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Effect copy() {
|
||||
public BecomesChosenCreatureTypeTargetEffect copy() {
|
||||
return new BecomesChosenCreatureTypeTargetEffect(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class SkulkAbility extends StaticAbility {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Ability copy() {
|
||||
public SkulkAbility copy() {
|
||||
return new SkulkAbility(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue