mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
fixed protection from multicolor sources - fixed issue 57
This commit is contained in:
parent
ee613eb042
commit
6de60b926d
16 changed files with 45 additions and 4 deletions
|
@ -34,6 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -46,6 +47,7 @@ public class GoblinOutlander extends CardImpl<GoblinOutlander> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public GoblinOutlander(UUID ownerId) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -46,6 +47,7 @@ public class NacatlOutlander extends CardImpl<NacatlOutlander> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlue(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public NacatlOutlander(UUID ownerId) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -46,6 +47,7 @@ public class ValeronOutlander extends CardImpl<ValeronOutlander> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public ValeronOutlander(UUID ownerId) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -46,6 +47,7 @@ public class VedalkenOutlander extends CardImpl<VedalkenOutlander> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public VedalkenOutlander(UUID ownerId) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -46,6 +47,7 @@ public class ZombieOutlander extends CardImpl<ZombieOutlander> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setGreen(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public ZombieOutlander(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
||||
|
@ -51,6 +52,8 @@ public class BaneslayerAngel extends CardImpl<BaneslayerAngel> {
|
|||
static {
|
||||
filter1.getSubtype().add("Demon");
|
||||
filter2.getSubtype().add("Dragon");
|
||||
filter1.setScopeSubtype(ComparisonScope.Any);
|
||||
filter2.setScopeSubtype(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public BaneslayerAngel(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.MageInt;
|
|||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -48,6 +49,7 @@ public class BlackKnight extends CardImpl<BlackKnight> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setWhite(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public BlackKnight(UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.common.CantCounterSourceEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -50,8 +51,10 @@ public class GreatSableStag extends CardImpl<GreatSableStag> {
|
|||
static {
|
||||
filter1.setUseColor(true);
|
||||
filter1.getColor().setBlue(true);
|
||||
filter1.setScopeColor(ComparisonScope.Any);
|
||||
filter2.setUseColor(true);
|
||||
filter2.getColor().setBlack(true);
|
||||
filter2.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public GreatSableStag(UUID ownerId) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.MageInt;
|
|||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -43,6 +44,14 @@ import mage.filter.FilterCard;
|
|||
*/
|
||||
public class WhiteKnight extends CardImpl<WhiteKnight> {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Black");
|
||||
|
||||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public WhiteKnight(UUID ownerId) {
|
||||
super(ownerId, 41, "White Knight", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}{W}");
|
||||
this.expansionSetCode = "M10";
|
||||
|
@ -53,9 +62,6 @@ public class WhiteKnight extends CardImpl<WhiteKnight> {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
FilterCard filter = new FilterCard("Black");
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
this.addAbility(new ProtectionAbility(filter));
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.MageInt;
|
|||
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -48,9 +49,11 @@ public class MirranCrusader extends CardImpl<MirranCrusader> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setBlack(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
|
||||
filter2.setUseColor(true);
|
||||
filter2.getColor().setGreen(true);
|
||||
filter2.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public MirranCrusader (UUID ownerId) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.keyword.InfectAbility;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -53,9 +54,11 @@ public class PhyrexianCrusader extends CardImpl<PhyrexianCrusader> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
|
||||
filter2.setUseColor(true);
|
||||
filter2.getColor().setWhite(true);
|
||||
filter2.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public PhyrexianCrusader (UUID ownerId) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.Constants.Rarity;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
/**
|
||||
|
@ -46,6 +47,7 @@ public class VulshokRefugee extends CardImpl<VulshokRefugee> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public VulshokRefugee(UUID ownerId) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -53,6 +54,7 @@ public class KorFirewalker extends CardImpl<KorFirewalker> {
|
|||
static {
|
||||
filter.setUseColor(true);
|
||||
filter.getColor().setRed(true);
|
||||
filter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public KorFirewalker (UUID ownerId) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.choices.ChoiceColor;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
|
@ -68,11 +69,12 @@ public class BraveTheElements extends CardImpl<BraveTheElements> {
|
|||
|
||||
class BraveTheElementsEffect extends GainAbilityControlledEffect {
|
||||
|
||||
private static FilterCreaturePermanent filter1 = new FilterCreaturePermanent();
|
||||
private static final FilterCreaturePermanent filter1 = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter1.setUseColor(true);
|
||||
filter1.getColor().setWhite(true);
|
||||
filter1.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
FilterCard filter2;
|
||||
|
@ -81,6 +83,7 @@ class BraveTheElementsEffect extends GainAbilityControlledEffect {
|
|||
super(new ProtectionAbility(new FilterCard()), Duration.EndOfTurn, filter1);
|
||||
filter2 = (FilterCard)((ProtectionAbility)ability).getFilter();
|
||||
filter2.setUseColor(true);
|
||||
filter2.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public BraveTheElementsEffect(final BraveTheElementsEffect effect) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
@ -51,6 +52,7 @@ public class DevoutLightcaster extends CardImpl<DevoutLightcaster> {
|
|||
static {
|
||||
filterProtection.setUseColor(true);
|
||||
filterProtection.getColor().setBlack(true);
|
||||
filterProtection.setScopeColor(ComparisonScope.Any);
|
||||
filterTarget.setUseColor(true);
|
||||
filterTarget.getColor().setBlack(true);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import mage.Constants.Duration;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.choices.ChoiceColor;
|
||||
import mage.filter.Filter.ComparisonScope;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -48,6 +49,7 @@ public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect
|
|||
super(new ProtectionAbility(new FilterCard()), duration);
|
||||
protectionFilter = (FilterCard)((ProtectionAbility)ability).getFilter();
|
||||
protectionFilter.setUseColor(true);
|
||||
protectionFilter.setScopeColor(ComparisonScope.Any);
|
||||
}
|
||||
|
||||
public GainProtectionFromColorTargetEffect(final GainProtectionFromColorTargetEffect effect) {
|
||||
|
|
Loading…
Reference in a new issue