mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented missing third activated ability of Stillmoon Cavalier (issue #152). Combined protection abilities.
This commit is contained in:
parent
d118981ee2
commit
97031d957e
1 changed files with 12 additions and 10 deletions
|
@ -28,20 +28,22 @@
|
||||||
package mage.sets.eventide;
|
package mage.sets.eventide;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import mage.Constants;
|
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
|
import mage.Constants.Duration;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
|
import mage.Constants.Zone;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
|
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||||
import mage.abilities.keyword.FirstStrikeAbility;
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.ProtectionAbility;
|
import mage.abilities.keyword.ProtectionAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,12 +51,12 @@ import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public class StillmoonCavalier extends CardImpl<StillmoonCavalier> {
|
public class StillmoonCavalier extends CardImpl<StillmoonCavalier> {
|
||||||
private static final FilterCard filterBlack = new FilterCard("black");
|
|
||||||
private static final FilterCard filterWhite = new FilterCard("white");
|
|
||||||
|
|
||||||
|
private static final FilterCard filter = new FilterCard("white and from black");
|
||||||
static {
|
static {
|
||||||
filterBlack.add(new ColorPredicate(ObjectColor.BLACK));
|
filter.add(Predicates.or(
|
||||||
filterWhite.add(new ColorPredicate(ObjectColor.WHITE));
|
new ColorPredicate(ObjectColor.WHITE),
|
||||||
|
new ColorPredicate(ObjectColor.BLACK)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public StillmoonCavalier(UUID ownerId) {
|
public StillmoonCavalier(UUID ownerId) {
|
||||||
|
@ -69,13 +71,13 @@ public class StillmoonCavalier extends CardImpl<StillmoonCavalier> {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Protection from white and from black
|
// Protection from white and from black
|
||||||
this.addAbility(new ProtectionAbility(filterBlack));
|
this.addAbility(new ProtectionAbility(filter));
|
||||||
this.addAbility(new ProtectionAbility(filterWhite));
|
|
||||||
// {WB}: Stillmoon Cavalier gains flying until end of turn.
|
// {WB}: Stillmoon Cavalier gains flying until end of turn.
|
||||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Constants.Duration.EndOfTurn), new ManaCostsImpl("{W/B}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{W/B}")));
|
||||||
// {WB}: Stillmoon Cavalier gains first strike until end of turn.
|
// {WB}: Stillmoon Cavalier gains first strike until end of turn.
|
||||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Constants.Duration.EndOfTurn), new ManaCostsImpl("{W/B}")));
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{W/B}")));
|
||||||
// {WB}{WB}: Stillmoon Cavalier gets +1/+0 until end of turn.
|
// {WB}{WB}: Stillmoon Cavalier gets +1/+0 until end of turn.
|
||||||
|
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0, Duration.EndOfTurn), new ManaCostsImpl("{W/B}{W/B}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public StillmoonCavalier(final StillmoonCavalier card) {
|
public StillmoonCavalier(final StillmoonCavalier card) {
|
||||||
|
|
Loading…
Reference in a new issue