mirror of
https://github.com/correl/mage.git
synced 2025-04-09 01:01:06 -09:00
Implemented Protean Thaumaturge
This commit is contained in:
parent
50a40290e4
commit
b0853fae8b
3 changed files with 94 additions and 17 deletions
Mage.Sets/src/mage
|
@ -1,11 +1,8 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CopyPermanentEffect;
|
||||
import mage.abilities.keyword.HeroicAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -18,8 +15,9 @@ import mage.game.permanent.Permanent;
|
|||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.util.functions.ApplyToPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class ArtisanOfForms extends CardImpl {
|
||||
|
@ -33,14 +31,10 @@ public final class ArtisanOfForms extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// <i>Heroic</i> — Whenever you cast a spell that targets Artisan of Forms, you may have Artisan of Forms become a copy of target creature, except it has this ability.
|
||||
Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new ArtisanOfFormsApplyToPermanent(), true);
|
||||
effect.setText("have {this} become a copy of target creature, except it has this ability");
|
||||
Ability ability = new HeroicAbility(effect, true);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
this.addAbility(createAbility());
|
||||
}
|
||||
|
||||
public ArtisanOfForms(final ArtisanOfForms card) {
|
||||
private ArtisanOfForms(final ArtisanOfForms card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -48,24 +42,28 @@ public final class ArtisanOfForms extends CardImpl {
|
|||
public ArtisanOfForms copy() {
|
||||
return new ArtisanOfForms(this);
|
||||
}
|
||||
|
||||
static Ability createAbility() {
|
||||
Ability ability = new HeroicAbility(new CopyPermanentEffect(
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE,
|
||||
new ArtisanOfFormsApplyToPermanent(), true
|
||||
).setText("have {this} become a copy of target creature, except it has this ability"), true);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
return ability;
|
||||
}
|
||||
}
|
||||
|
||||
class ArtisanOfFormsApplyToPermanent extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
|
||||
Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent());
|
||||
effect.setText("have {this} become a copy of target creature, except it has this ability");
|
||||
mageObject.getAbilities().add(new HeroicAbility(effect, true));
|
||||
mageObject.getAbilities().add(ArtisanOfForms.createAbility());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
|
||||
Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent());
|
||||
effect.setText("have {this} become a copy of target creature, except it has this ability");
|
||||
permanent.addAbility(new HeroicAbility(effect, true), game);
|
||||
permanent.addAbility(ArtisanOfForms.createAbility(), game);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
78
Mage.Sets/src/mage/cards/p/ProteanThaumaturge.java
Normal file
78
Mage.Sets/src/mage/cards/p/ProteanThaumaturge.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.abilityword.ConstellationAbility;
|
||||
import mage.abilities.effects.common.CopyPermanentEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.functions.ApplyToPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ProteanThaumaturge extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("another target creature");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public ProteanThaumaturge(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Constellation — Whenever an enchantment enters the battlefield under your control, you may have Protean Thaumaturge become a copy of another target creature, except it has this ability.
|
||||
this.addAbility(createAbility());
|
||||
}
|
||||
|
||||
private ProteanThaumaturge(final ProteanThaumaturge card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProteanThaumaturge copy() {
|
||||
return new ProteanThaumaturge(this);
|
||||
}
|
||||
|
||||
static Ability createAbility() {
|
||||
Ability ability = new ConstellationAbility(new CopyPermanentEffect(
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE,
|
||||
new ProteanThaumaturgeApplyToPermanent(), true
|
||||
).setText("have {this} become a copy of another target creature, except it has this ability"), true, false);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
return ability;
|
||||
}
|
||||
}
|
||||
|
||||
class ProteanThaumaturgeApplyToPermanent extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, MageObject mageObject, Ability source, UUID copyToObjectId) {
|
||||
mageObject.getAbilities().add(ProteanThaumaturge.createAbility());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) {
|
||||
permanent.addAbility(ProteanThaumaturge.createAbility(), game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -184,6 +184,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Plummet", 194, Rarity.COMMON, mage.cards.p.Plummet.class));
|
||||
cards.add(new SetCardInfo("Polukranos, Unchained", 224, Rarity.MYTHIC, mage.cards.p.PolukranosUnchained.class));
|
||||
cards.add(new SetCardInfo("Portent of Betrayal", 149, Rarity.COMMON, mage.cards.p.PortentOfBetrayal.class));
|
||||
cards.add(new SetCardInfo("Protean Thaumaturge", 60, Rarity.RARE, mage.cards.p.ProteanThaumaturge.class));
|
||||
cards.add(new SetCardInfo("Purphoros's Intervention", 151, Rarity.RARE, mage.cards.p.PurphorossIntervention.class));
|
||||
cards.add(new SetCardInfo("Purphoros, Bronze-Blooded", 150, Rarity.MYTHIC, mage.cards.p.PurphorosBronzeBlooded.class));
|
||||
cards.add(new SetCardInfo("Rage-Scarred Berserker", 113, Rarity.COMMON, mage.cards.r.RageScarredBerserker.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue