mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Add more missing copy constructors. (#10758)
This commit is contained in:
parent
3bf2b0aac3
commit
fa77261e3a
6 changed files with 51 additions and 8 deletions
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ConditionalMana;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -14,6 +13,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
|
|
@ -44,6 +45,15 @@ class GeosurgeConditionalMana extends ConditionalMana {
|
|||
staticText = "Spend this mana only to cast artifact or creature spells";
|
||||
addCondition(new GeosurgeManaCondition());
|
||||
}
|
||||
|
||||
private GeosurgeConditionalMana(final GeosurgeConditionalMana conditionalMana) {
|
||||
super(conditionalMana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GeosurgeConditionalMana copy() {
|
||||
return new GeosurgeConditionalMana(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GeosurgeManaCondition implements Condition {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import mage.abilities.mana.ActivatedManaAbilityImpl;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
|
@ -24,7 +25,6 @@ import mage.target.TargetPermanent;
|
|||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com, nantuko
|
||||
|
|
@ -134,6 +134,15 @@ class GrandArchitectConditionalMana extends ConditionalMana {
|
|||
staticText = "Spend this mana only to cast artifact spells or activate abilities of artifacts";
|
||||
addCondition(new GrandArchitectManaCondition());
|
||||
}
|
||||
|
||||
private GrandArchitectConditionalMana(final GrandArchitectConditionalMana conditionalMana) {
|
||||
super(conditionalMana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrandArchitectConditionalMana copy() {
|
||||
return new GrandArchitectConditionalMana(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GrandArchitectManaCondition implements Condition {
|
||||
|
|
|
|||
|
|
@ -67,4 +67,13 @@ class RosheenMeandererConditionalMana extends ConditionalMana {
|
|||
staticText = "Spend this mana only on costs that contain {X}";
|
||||
addCondition(new XCostManaCondition());
|
||||
}
|
||||
|
||||
private RosheenMeandererConditionalMana(final RosheenMeandererConditionalMana conditionalMana) {
|
||||
super(conditionalMana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RosheenMeandererConditionalMana copy() {
|
||||
return new RosheenMeandererConditionalMana(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,15 @@ class TitansNestConditionalMana extends ConditionalMana {
|
|||
staticText = "Spend this mana only to cast a spell that's one or more colors without {X} in its mana cost.";
|
||||
addCondition(new TitansNestManaCondition());
|
||||
}
|
||||
|
||||
private TitansNestConditionalMana(final TitansNestConditionalMana conditionalMana) {
|
||||
super(conditionalMana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TitansNestConditionalMana copy() {
|
||||
return new TitansNestConditionalMana(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TitansNestManaCondition extends ManaCondition {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
|
||||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.RequirementEffect;
|
||||
import mage.constants.AttachmentType;
|
||||
|
|
@ -11,20 +8,20 @@ import mage.constants.Duration;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class MustBeBlockedByAllAttachedEffect extends RequirementEffect {
|
||||
|
||||
protected AttachmentType attachmentType;
|
||||
|
||||
public MustBeBlockedByAllAttachedEffect(AttachmentType attachmentType) {
|
||||
this(Duration.WhileOnBattlefield, attachmentType);
|
||||
}
|
||||
|
||||
public MustBeBlockedByAllAttachedEffect(Duration duration, AttachmentType attachmentType) {
|
||||
super(duration);
|
||||
this.attachmentType = attachmentType;
|
||||
staticText = "All creatures able to block " + attachmentType.verb().toLowerCase(Locale.ENGLISH) + " creature do so";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,4 +44,13 @@ class AddPoisonCountersEffect extends AddCountersTargetEffect {
|
|||
setText(n == 1 ? "that player gets a poison counter"
|
||||
: String.format("that player gets %d poison counters", n));
|
||||
}
|
||||
|
||||
private AddPoisonCountersEffect(final AddPoisonCountersEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddPoisonCountersEffect copy() {
|
||||
return new AddPoisonCountersEffect(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue