mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[CLB] Implemented Veteran Soldier
This commit is contained in:
parent
a38c0bea3e
commit
f0be17218d
2 changed files with 74 additions and 0 deletions
73
Mage.Sets/src/mage/cards/v/VeteranSoldier.java
Normal file
73
Mage.Sets/src/mage/cards/v/VeteranSoldier.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksOpponentWithMostLifeTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.SoldierToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class VeteranSoldier extends CardImpl {
|
||||
|
||||
public VeteranSoldier(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.BACKGROUND);
|
||||
|
||||
// Commander creatures you own have "Whenever this creature attacks a player, if no opponent has more life than that that player, for each opponent, create a 1/1 white Soldier creature token that's tapped and attacking that player."
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(
|
||||
new AttacksOpponentWithMostLifeTriggeredAbility(new VeteranSoldierEffect(), false),
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURES_OWNED_COMMANDER
|
||||
)));
|
||||
}
|
||||
|
||||
private VeteranSoldier(final VeteranSoldier card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VeteranSoldier copy() {
|
||||
return new VeteranSoldier(this);
|
||||
}
|
||||
}
|
||||
|
||||
class VeteranSoldierEffect extends OneShotEffect {
|
||||
|
||||
VeteranSoldierEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "for each opponent, create a 1/1 white Soldier creature token that's tapped and attacking that player";
|
||||
}
|
||||
|
||||
private VeteranSoldierEffect(final VeteranSoldierEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VeteranSoldierEffect copy() {
|
||||
return new VeteranSoldierEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||
if (game.getPlayer(opponentId) != null) {
|
||||
new SoldierToken().putOntoBattlefield(
|
||||
1, game, source, source.getControllerId(),
|
||||
true, true, opponentId
|
||||
);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -156,6 +156,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Thunderwave", 201, Rarity.UNCOMMON, mage.cards.t.Thunderwave.class));
|
||||
cards.add(new SetCardInfo("Treasure Keeper", 341, Rarity.UNCOMMON, mage.cards.t.TreasureKeeper.class));
|
||||
cards.add(new SetCardInfo("Tymora's Invoker", 101, Rarity.COMMON, mage.cards.t.TymorasInvoker.class));
|
||||
cards.add(new SetCardInfo("Veteran Soldier", 48, Rarity.UNCOMMON, mage.cards.v.VeteranSoldier.class));
|
||||
cards.add(new SetCardInfo("Viconia, Drow Apostate", 156, Rarity.UNCOMMON, mage.cards.v.ViconiaDrowApostate.class));
|
||||
cards.add(new SetCardInfo("Vrock", 157, Rarity.UNCOMMON, mage.cards.v.Vrock.class));
|
||||
cards.add(new SetCardInfo("Wand of Wonder", 204, Rarity.RARE, mage.cards.w.WandOfWonder.class));
|
||||
|
|
Loading…
Reference in a new issue