mirror of
https://github.com/correl/mage.git
synced 2025-01-07 11:08:44 +00:00
[LTR] Implement March from the Black Gate
This commit is contained in:
parent
468ef8086a
commit
1fd12288a0
2 changed files with 78 additions and 0 deletions
77
Mage.Sets/src/mage/cards/m/MarchFromTheBlackGate.java
Normal file
77
Mage.Sets/src/mage/cards/m/MarchFromTheBlackGate.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.keyword.AmassEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MarchFromTheBlackGate extends CardImpl {
|
||||
|
||||
public MarchFromTheBlackGate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||
|
||||
// When March from the Black Gate enters the battlefield and whenever an Army you control attacks, amass Orcs 1.
|
||||
this.addAbility(new MarchFromTheBlackGateTriggeredAbility());
|
||||
}
|
||||
|
||||
private MarchFromTheBlackGate(final MarchFromTheBlackGate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MarchFromTheBlackGate copy() {
|
||||
return new MarchFromTheBlackGate(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MarchFromTheBlackGateTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
MarchFromTheBlackGateTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AmassEffect(1, SubType.ORC));
|
||||
this.setTriggerPhrase("When {this} enters the battlefield and whenever an Army you control attacks, ");
|
||||
}
|
||||
|
||||
private MarchFromTheBlackGateTriggeredAbility(final MarchFromTheBlackGateTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MarchFromTheBlackGateTriggeredAbility copy() {
|
||||
return new MarchFromTheBlackGateTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
switch (event.getType()) {
|
||||
case ENTERS_THE_BATTLEFIELD:
|
||||
case ATTACKER_DECLARED:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
switch (event.getType()) {
|
||||
case ENTERS_THE_BATTLEFIELD:
|
||||
return event.getTargetId().equals(this.getSourceId());
|
||||
case ATTACKER_DECLARED:
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
return permanent != null
|
||||
&& permanent.hasSubtype(SubType.ARMY, game)
|
||||
&& permanent.isControlledBy(this.getControllerId());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -143,6 +143,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Lothlorien Lookout", 175, Rarity.COMMON, mage.cards.l.LothlorienLookout.class));
|
||||
cards.add(new SetCardInfo("Lotho, Corrupt Shirriff", 213, Rarity.RARE, mage.cards.l.LothoCorruptShirriff.class));
|
||||
cards.add(new SetCardInfo("Many Partings", 176, Rarity.COMMON, mage.cards.m.ManyPartings.class));
|
||||
cards.add(new SetCardInfo("March from the Black Gate", 94, Rarity.UNCOMMON, mage.cards.m.MarchFromTheBlackGate.class));
|
||||
cards.add(new SetCardInfo("Mauhur, Uruk-hai Captain", 214, Rarity.UNCOMMON, mage.cards.m.MauhurUrukHaiCaptain.class));
|
||||
cards.add(new SetCardInfo("Meriadoc Brandybuck", 177, Rarity.UNCOMMON, mage.cards.m.MeriadocBrandybuck.class));
|
||||
cards.add(new SetCardInfo("Minas Tirith", 256, Rarity.RARE, mage.cards.m.MinasTirith.class));
|
||||
|
|
Loading…
Reference in a new issue