mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Implemented Gingerbread Cabin
This commit is contained in:
parent
538369c248
commit
b4a615b188
2 changed files with 65 additions and 0 deletions
64
Mage.Sets/src/mage/cards/g/GingerbreadCabin.java
Normal file
64
Mage.Sets/src/mage/cards/g/GingerbreadCabin.java
Normal file
|
@ -0,0 +1,64 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldUntappedTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.permanent.token.FoodToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GingerbreadCabin extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledPermanent(SubType.FOREST);
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
private static final Condition condition
|
||||
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.FEWER_THAN, 3);
|
||||
|
||||
public GingerbreadCabin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
this.subtype.add(SubType.FOREST);
|
||||
|
||||
// ({T}: Add {G}.)
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
||||
// Gingerbread Cabin enters the battlefield tapped unless you control three or more other Forests.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new ConditionalOneShotEffect(new TapSourceEffect(), condition),
|
||||
"tapped unless you control three or more other Forests"
|
||||
));
|
||||
|
||||
// When Gingerbread Cabin enters the battlefield untapped, create a Food token.
|
||||
this.addAbility(new EntersBattlefieldUntappedTriggeredAbility(new CreateTokenEffect(new FoodToken()), false));
|
||||
}
|
||||
|
||||
private GingerbreadCabin(final GingerbreadCabin card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GingerbreadCabin copy() {
|
||||
return new GingerbreadCabin(this);
|
||||
}
|
||||
}
|
|
@ -115,6 +115,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Giant Opportunity", 159, Rarity.UNCOMMON, mage.cards.g.GiantOpportunity.class));
|
||||
cards.add(new SetCardInfo("Giant's Skewer", 91, Rarity.COMMON, mage.cards.g.GiantsSkewer.class));
|
||||
cards.add(new SetCardInfo("Gilded Goose", 160, Rarity.RARE, mage.cards.g.GildedGoose.class));
|
||||
cards.add(new SetCardInfo("Gingerbread Cabin", 245, Rarity.COMMON, mage.cards.g.GingerbreadCabin.class));
|
||||
cards.add(new SetCardInfo("Gingerbrute", 219, Rarity.COMMON, mage.cards.g.Gingerbrute.class));
|
||||
cards.add(new SetCardInfo("Glass Casket", 15, Rarity.UNCOMMON, mage.cards.g.GlassCasket.class));
|
||||
cards.add(new SetCardInfo("Gluttonous Troll", 327, Rarity.RARE, mage.cards.g.GluttonousTroll.class));
|
||||
|
|
Loading…
Reference in a new issue