mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
[CLB] Implemented Gond Gate
This commit is contained in:
parent
1f2c8ec650
commit
c92eaee524
2 changed files with 87 additions and 0 deletions
86
Mage.Sets/src/mage/cards/g/GondGate.java
Normal file
86
Mage.Sets/src/mage/cards/g/GondGate.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.mana.AnyColorLandsProduceManaAbility;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GondGate extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.GATE);
|
||||
|
||||
public GondGate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
this.subtype.add(SubType.GATE);
|
||||
|
||||
// Gates you control enter the battlefield untapped.
|
||||
this.addAbility(new SimpleStaticAbility(new GondGateEffect()));
|
||||
|
||||
// {T}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {T}: Add one mana of any color that a Gate you control could produce.
|
||||
this.addAbility(new AnyColorLandsProduceManaAbility(TargetController.YOU, true, filter));
|
||||
}
|
||||
|
||||
private GondGate(final GondGate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GondGate copy() {
|
||||
return new GondGate(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GondGateEffect extends ReplacementEffectImpl {
|
||||
|
||||
GondGateEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "Gates you control enter the battlefield untapped";
|
||||
}
|
||||
|
||||
private GondGateEffect(final GondGateEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
((EntersTheBattlefieldEvent) event).getTarget().setTapped(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent targetObject = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
return targetObject != null
|
||||
&& targetObject.isControlledBy(source.getControllerId())
|
||||
&& targetObject.hasSubtype(SubType.GATE, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GondGateEffect copy() {
|
||||
return new GondGateEffect(this);
|
||||
}
|
||||
}
|
|
@ -263,6 +263,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Goblin Spymaster", 795, Rarity.RARE, mage.cards.g.GoblinSpymaster.class));
|
||||
cards.add(new SetCardInfo("Goggles of Night", 74, Rarity.COMMON, mage.cards.g.GogglesOfNight.class));
|
||||
cards.add(new SetCardInfo("Goliath Paladin", 21, Rarity.COMMON, mage.cards.g.GoliathPaladin.class));
|
||||
cards.add(new SetCardInfo("Gond Gate", 353, Rarity.UNCOMMON, mage.cards.g.GondGate.class));
|
||||
cards.add(new SetCardInfo("Gonti, Lord of Luxury", 753, Rarity.RARE, mage.cards.g.GontiLordOfLuxury.class));
|
||||
cards.add(new SetCardInfo("Gorion, Wise Mentor", 276, Rarity.RARE, mage.cards.g.GorionWiseMentor.class));
|
||||
cards.add(new SetCardInfo("Gray Harbor Merfolk", 75, Rarity.COMMON, mage.cards.g.GrayHarborMerfolk.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue