Implemented Loyal Unicorn

This commit is contained in:
Evan Kranzler 2018-07-26 17:14:05 -04:00
parent 4779b86da8
commit 660d9ec8c3
2 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,66 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbility;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.condition.common.CommanderInPlayCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.PreventAllDamageToAllEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.constants.SubType;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.filter.StaticFilters;
/**
*
* @author TheElk801
*/
public final class LoyalUnicorn extends CardImpl {
public LoyalUnicorn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add(SubType.UNICORN);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Lieutenant At the beginning of combat on your turn, if you control your commander, prevent all combat damage that would be dealt to creatures you control this turn. Other creatures you control gain vigilance until end of turn.
TriggeredAbility ability = new BeginningOfCombatTriggeredAbility(
new PreventAllDamageToAllEffect(
Duration.EndOfTurn,
StaticFilters.FILTER_CONTROLLED_CREATURES,
true
), TargetController.YOU, false
);
ability.addEffect(new GainAbilityAllEffect(
VigilanceAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_CONTROLLED_CREATURES, true
));
this.addAbility(new ConditionalTriggeredAbility(
ability, CommanderInPlayCondition.instance,
"<i>Lieutenant</i> &mdash; At the beginning of combat "
+ "on your turn, if you control your commander, "
+ "prevent all combat damage that would be dealt "
+ "to creatures you control this turn. "
+ "Other creatures you control gain vigilance until end of turn."
));
}
public LoyalUnicorn(final LoyalUnicorn card) {
super(card);
}
@Override
public LoyalUnicorn copy() {
return new LoyalUnicorn(this);
}
}

View file

@ -54,6 +54,7 @@ public final class Commander2018 extends ExpansionSet {
cards.add(new SetCardInfo("Loyal Drake", 10, Rarity.UNCOMMON, mage.cards.l.LoyalDrake.class));
cards.add(new SetCardInfo("Loyal Guardian", 31, Rarity.UNCOMMON, mage.cards.l.LoyalGuardian.class));
cards.add(new SetCardInfo("Loyal Subordinate", 16, Rarity.UNCOMMON, mage.cards.l.LoyalSubordinate.class));
cards.add(new SetCardInfo("Loyal Unicorn", 4, Rarity.UNCOMMON, mage.cards.l.LoyalUnicorn.class));
cards.add(new SetCardInfo("Magus of the Balance", 5, Rarity.RARE, mage.cards.m.MagusOfTheBalance.class));
cards.add(new SetCardInfo("Nesting Dragon", 24, Rarity.RARE, mage.cards.n.NestingDragon.class));
cards.add(new SetCardInfo("Night Incarnate", 17, Rarity.RARE, mage.cards.n.NightIncarnate.class));