forked from External/mage
[CLB] Implemented Colossal Badger
This commit is contained in:
parent
4e83e05a58
commit
2eb03e6382
3 changed files with 119 additions and 0 deletions
83
Mage.Sets/src/mage/cards/c/ColossalBadger.java
Normal file
83
Mage.Sets/src/mage/cards/c/ColossalBadger.java
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ColossalBadger extends AdventureCard {
|
||||
|
||||
public ColossalBadger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{5}{G}", "Dig Deep", "{1}{G}");
|
||||
|
||||
this.subtype.add(SubType.BADGER);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// When Colossal Badger enters the battlefield, you gain 3 life.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)));
|
||||
|
||||
// Dig Deep
|
||||
// Choose target creature. Mill four cards, then put a +1/+1 counter on that creature for each creature card milled this way.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new ColossalBadgerEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private ColossalBadger(final ColossalBadger card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ColossalBadger copy() {
|
||||
return new ColossalBadger(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ColossalBadgerEffect extends OneShotEffect {
|
||||
|
||||
ColossalBadgerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "choose target creature. Mill four cards, then put a +1/+1 counter " +
|
||||
"on that creature for each creature card milled this way";
|
||||
}
|
||||
|
||||
private ColossalBadgerEffect(final ColossalBadgerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ColossalBadgerEffect copy() {
|
||||
return new ColossalBadgerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int amount = player.millCards(4, source, game).count(StaticFilters.FILTER_CARD_CREATURE, game);
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (amount > 0 && permanent != null) {
|
||||
permanent.addCounters(CounterType.P1P1.createInstance(amount), source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
34
Mage.Sets/src/mage/cards/d/DigDeep.java
Normal file
34
Mage.Sets/src/mage/cards/d/DigDeep.java
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DigDeep extends CardImpl {
|
||||
|
||||
public DigDeep(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
|
||||
|
||||
this.subtype.add(SubType.ADVENTURE);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Choose target creature. Mill four cards, then put a +1/+1 counter on that creature for each creature card milled this way.
|
||||
}
|
||||
|
||||
private DigDeep(final DigDeep card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DigDeep copy() {
|
||||
return new DigDeep(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -80,6 +80,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Cloak of the Bat", 307, Rarity.COMMON, mage.cards.c.CloakOfTheBat.class));
|
||||
cards.add(new SetCardInfo("Cloakwood Hermit", 221, Rarity.UNCOMMON, mage.cards.c.CloakwoodHermit.class));
|
||||
cards.add(new SetCardInfo("Clockwork Fox", 308, Rarity.COMMON, mage.cards.c.ClockworkFox.class));
|
||||
cards.add(new SetCardInfo("Colossal Badger", 223, Rarity.COMMON, mage.cards.c.ColossalBadger.class));
|
||||
cards.add(new SetCardInfo("Command Tower", 351, Rarity.COMMON, mage.cards.c.CommandTower.class));
|
||||
cards.add(new SetCardInfo("Cone of Cold", 61, Rarity.UNCOMMON, mage.cards.c.ConeOfCold.class));
|
||||
cards.add(new SetCardInfo("Contact Other Plane", 62, Rarity.COMMON, mage.cards.c.ContactOtherPlane.class));
|
||||
|
|
@ -89,6 +90,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dawnbringer Cleric", 15, Rarity.COMMON, mage.cards.d.DawnbringerCleric.class));
|
||||
cards.add(new SetCardInfo("Deadly Dispute", 124, Rarity.COMMON, mage.cards.d.DeadlyDispute.class));
|
||||
cards.add(new SetCardInfo("Decanter of Endless Water", 309, Rarity.COMMON, mage.cards.d.DecanterOfEndlessWater.class));
|
||||
cards.add(new SetCardInfo("Dig Deep", 223, Rarity.COMMON, mage.cards.d.DigDeep.class));
|
||||
cards.add(new SetCardInfo("Displacer Kitten", 63, Rarity.RARE, mage.cards.d.DisplacerKitten.class));
|
||||
cards.add(new SetCardInfo("Draconic Lore", 64, Rarity.COMMON, mage.cards.d.DraconicLore.class));
|
||||
cards.add(new SetCardInfo("Draconic Muralists", 224, Rarity.UNCOMMON, mage.cards.d.DraconicMuralists.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue