mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
Implemented Blitz Leech
This commit is contained in:
parent
d7947100db
commit
f0d1cff7b9
2 changed files with 85 additions and 0 deletions
84
Mage.Sets/src/mage/cards/b/BlitzLeech.java
Normal file
84
Mage.Sets/src/mage/cards/b/BlitzLeech.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BlitzLeech extends CardImpl {
|
||||
|
||||
public BlitzLeech(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}");
|
||||
|
||||
this.subtype.add(SubType.LEECH);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Blitz Leech enters the battlefield, target creature an opponent controls gets -2/-2 until end of turn. Remove all counters from that creature.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-2, -2));
|
||||
ability.addEffect(new BlitzLeechEffect());
|
||||
ability.addTarget(new TargetOpponentsCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private BlitzLeech(final BlitzLeech card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlitzLeech copy() {
|
||||
return new BlitzLeech(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BlitzLeechEffect extends OneShotEffect {
|
||||
|
||||
BlitzLeechEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Remove all counters from that creature.";
|
||||
}
|
||||
|
||||
private BlitzLeechEffect(final BlitzLeechEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlitzLeechEffect copy() {
|
||||
return new BlitzLeechEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
Set<String> counterTypes = permanent
|
||||
.getCounters(game)
|
||||
.keySet()
|
||||
.stream()
|
||||
.collect(Collectors.toSet());
|
||||
counterTypes.forEach(permanent.getCounters(game)::removeAllCounters);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -75,6 +75,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Blade Banish", 4, Rarity.COMMON, mage.cards.b.BladeBanish.class));
|
||||
cards.add(new SetCardInfo("Blazing Volley", 107, Rarity.COMMON, mage.cards.b.BlazingVolley.class));
|
||||
cards.add(new SetCardInfo("Blisterspit Gremlin", 108, Rarity.COMMON, mage.cards.b.BlisterspitGremlin.class));
|
||||
cards.add(new SetCardInfo("Blitz Leech", 74, Rarity.COMMON, mage.cards.b.BlitzLeech.class));
|
||||
cards.add(new SetCardInfo("Blitz of the Thunder-Raptor", 109, Rarity.UNCOMMON, mage.cards.b.BlitzOfTheThunderRaptor.class));
|
||||
cards.add(new SetCardInfo("Blood Curdle", 75, Rarity.COMMON, mage.cards.b.BloodCurdle.class));
|
||||
cards.add(new SetCardInfo("Bloodfell Caves", 243, Rarity.COMMON, mage.cards.b.BloodfellCaves.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue