forked from External/mage
[BRO] Implemented Mishra's Foundry
This commit is contained in:
parent
639e58dedc
commit
278feb9b9a
3 changed files with 82 additions and 32 deletions
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
|
|
@ -14,13 +11,13 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public final class MishrasFactory extends CardImpl {
|
||||
|
|
@ -32,17 +29,23 @@ public final class MishrasFactory extends CardImpl {
|
|||
}
|
||||
|
||||
public MishrasFactory(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {1}: Mishra's Factory becomes a 2/2 Assembly-Worker artifact creature until end of turn. It's still a land.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BecomesCreatureSourceEffect(new AssemblyWorkerToken(), "land", Duration.EndOfTurn),
|
||||
new GenericManaCost(1)));
|
||||
this.addAbility(new SimpleActivatedAbility(new BecomesCreatureSourceEffect(
|
||||
new CreatureToken(
|
||||
2, 2,
|
||||
"2/2 Assembly-Worker artifact creature",
|
||||
SubType.ASSEMBLY_WORKER
|
||||
).withType(CardType.ARTIFACT), "land", Duration.EndOfTurn
|
||||
), new GenericManaCost(1)));
|
||||
|
||||
// {tap}: Target Assembly-Worker creature gets +1/+1 until end of turn.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BoostTargetEffect(1, 1, Duration.EndOfTurn),
|
||||
new TapSourceCost());
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(
|
||||
new BoostTargetEffect(1, 1, Duration.EndOfTurn), new TapSourceCost()
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
@ -56,22 +59,3 @@ public final class MishrasFactory extends CardImpl {
|
|||
return new MishrasFactory(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AssemblyWorkerToken extends TokenImpl {
|
||||
|
||||
public AssemblyWorkerToken() {
|
||||
super("Assembly-Worker", "2/2 Assembly-Worker artifact creature");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
this.subtype.add(SubType.ASSEMBLY_WORKER);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
}
|
||||
public AssemblyWorkerToken(final AssemblyWorkerToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AssemblyWorkerToken copy() {
|
||||
return new AssemblyWorkerToken(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
65
Mage.Sets/src/mage/cards/m/MishrasFoundry.java
Normal file
65
Mage.Sets/src/mage/cards/m/MishrasFoundry.java
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MishrasFoundry extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterAttackingCreature("attacking Assembly-Worker");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ASSEMBLY_WORKER.getPredicate());
|
||||
}
|
||||
|
||||
public MishrasFoundry(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// {T}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {2}: Mishra's Foundry becomes a 2/2 Assembly-Worker artifact creature until end of turn. It's still a land.
|
||||
this.addAbility(new SimpleActivatedAbility(new BecomesCreatureSourceEffect(
|
||||
new CreatureToken(
|
||||
2, 2,
|
||||
"2/2 Assembly-Worker artifact creature",
|
||||
SubType.ASSEMBLY_WORKER
|
||||
).withType(CardType.ARTIFACT), "land", Duration.EndOfTurn
|
||||
), new GenericManaCost(1)));
|
||||
|
||||
// {1}, {T}: Target attacking Assembly-Worker gets +2/+2 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new BoostTargetEffect(2, 2), new GenericManaCost(1)
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private MishrasFoundry(final MishrasFoundry card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MishrasFoundry copy() {
|
||||
return new MishrasFoundry(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ public final class TheBrothersWar extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Forest", 286, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Island", 280, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Mishra's Foundry", 265, Rarity.RARE, mage.cards.m.MishrasFoundry.class));
|
||||
cards.add(new SetCardInfo("Mountain", 284, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Plains", 278, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Recruitment Officer", 23, Rarity.UNCOMMON, mage.cards.r.RecruitmentOfficer.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue