mirror of
https://github.com/correl/mage.git
synced 2024-12-28 03:00:10 +00:00
[VOW] Implemented Cultivator Colossus
This commit is contained in:
parent
091c6cb48d
commit
4b7250e2b9
3 changed files with 105 additions and 9 deletions
|
@ -3,8 +3,7 @@ package mage.cards.a;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.dynamicvalue.common.LandsYouControlCount;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
|
@ -12,7 +11,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -25,9 +23,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class AshayaSoulOfTheWild extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue
|
||||
= new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS);
|
||||
|
||||
public AshayaSoulOfTheWild(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
|
||||
|
@ -38,9 +33,8 @@ public final class AshayaSoulOfTheWild extends CardImpl {
|
|||
|
||||
// Ashaya, Soul of the Wild’s power and toughness are each equal to the number of lands you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SetPowerToughnessSourceEffect(
|
||||
xValue, Duration.EndOfGame
|
||||
)));
|
||||
Zone.ALL, new SetPowerToughnessSourceEffect(LandsYouControlCount.instance, Duration.EndOfGame)
|
||||
));
|
||||
|
||||
// Nontoken creatures you control are Forest lands in addition to their other types. (They’re still affected by summoning sickness.)
|
||||
this.addAbility(new SimpleStaticAbility(new AshayaSoulOfTheWildEffect()));
|
||||
|
|
101
Mage.Sets/src/mage/cards/c/CultivatorColossus.java
Normal file
101
Mage.Sets/src/mage/cards/c/CultivatorColossus.java
Normal file
|
@ -0,0 +1,101 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.LandsYouControlCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CultivatorColossus extends CardImpl {
|
||||
|
||||
public CultivatorColossus(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{G}{G}");
|
||||
|
||||
this.subtype.add(SubType.PLANT);
|
||||
this.subtype.add(SubType.BEAST);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Cultivator Colossus's power and toughness are each equal to the number of lands you control.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SetPowerToughnessSourceEffect(LandsYouControlCount.instance, Duration.EndOfGame)
|
||||
));
|
||||
|
||||
// When Cultivator Colossus enters the battlefield, you may put a land card from your hand onto the battlefield tapped. If you do, draw a card and repeat this process.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CultivatorColossusEffect()));
|
||||
}
|
||||
|
||||
private CultivatorColossus(final CultivatorColossus card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CultivatorColossus copy() {
|
||||
return new CultivatorColossus(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CultivatorColossusEffect extends OneShotEffect {
|
||||
|
||||
CultivatorColossusEffect() {
|
||||
super(Outcome.PutLandInPlay);
|
||||
staticText = "you may put a land card from your hand onto the battlefield tapped. " +
|
||||
"If you do, draw a card and repeat this process";
|
||||
}
|
||||
|
||||
private CultivatorColossusEffect(final CultivatorColossusEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CultivatorColossusEffect copy() {
|
||||
return new CultivatorColossusEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
while (player.getHand().count(StaticFilters.FILTER_CARD_LAND, game) > 0) {
|
||||
TargetCard target = new TargetCardInHand(
|
||||
0, 1, StaticFilters.FILTER_CARD_LAND
|
||||
);
|
||||
player.choose(outcome, target, source.getSourceId(), game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card == null) {
|
||||
break;
|
||||
}
|
||||
player.moveCards(
|
||||
card, Zone.BATTLEFIELD, source, game, true,
|
||||
false, false, null
|
||||
);
|
||||
if (game.getPermanent(card.getId()) == null) {
|
||||
break;
|
||||
}
|
||||
player.drawCards(1, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -83,6 +83,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Crawling Infestation", 193, Rarity.UNCOMMON, mage.cards.c.CrawlingInfestation.class));
|
||||
cards.add(new SetCardInfo("Cruel Witness", 55, Rarity.COMMON, mage.cards.c.CruelWitness.class));
|
||||
cards.add(new SetCardInfo("Crushing Canopy", 194, Rarity.COMMON, mage.cards.c.CrushingCanopy.class));
|
||||
cards.add(new SetCardInfo("Cultivator Colossus", 195, Rarity.MYTHIC, mage.cards.c.CultivatorColossus.class));
|
||||
cards.add(new SetCardInfo("Dawnhart Disciple", 196, Rarity.COMMON, mage.cards.d.DawnhartDisciple.class));
|
||||
cards.add(new SetCardInfo("Dawnhart Geist", 8, Rarity.UNCOMMON, mage.cards.d.DawnhartGeist.class));
|
||||
cards.add(new SetCardInfo("Daybreak Combatants", 153, Rarity.COMMON, mage.cards.d.DaybreakCombatants.class));
|
||||
|
|
Loading…
Reference in a new issue