mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Added gate you control hint for cards;
This commit is contained in:
parent
0d4e6772ed
commit
dd2cf5a939
8 changed files with 97 additions and 47 deletions
|
@ -5,6 +5,7 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
|
import mage.abilities.hint.common.GateYouControlHint;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -39,6 +40,7 @@ public final class ArchwayAngel extends CardImpl {
|
||||||
|
|
||||||
// When Archway Angel enters the battlefield, you gain 2 life for each Gate you control.
|
// When Archway Angel enters the battlefield, you gain 2 life for each Gate you control.
|
||||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter, 2)));
|
Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter, 2)));
|
||||||
|
ability.addHint(GateYouControlHint.instance);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.common.PutOnLibrarySourceEffect;
|
import mage.abilities.effects.common.PutOnLibrarySourceEffect;
|
||||||
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
||||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||||
|
import mage.abilities.hint.common.GateYouControlHint;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
@ -39,7 +40,8 @@ public final class GateColossus extends CardImpl {
|
||||||
this.toughness = new MageInt(8);
|
this.toughness = new MageInt(8);
|
||||||
|
|
||||||
// This spell costs {1} less to cast for each Gate you control.
|
// This spell costs {1} less to cast for each Gate you control.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.STACK, new GateColossusCostReductionEffect()));
|
this.addAbility(new SimpleStaticAbility(Zone.STACK, new GateColossusCostReductionEffect())
|
||||||
|
.addHint(GateYouControlHint.instance));
|
||||||
|
|
||||||
// Gate Colossus can't be blocked by creatures with power 2 or less.
|
// Gate Colossus can't be blocked by creatures with power 2 or less.
|
||||||
this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)));
|
this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)));
|
||||||
|
|
|
@ -10,6 +10,7 @@ import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||||
|
import mage.abilities.hint.common.GateYouControlHint;
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
import mage.abilities.keyword.VigilanceAbility;
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -51,7 +52,7 @@ public final class GatebreakerRam extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(
|
this.addAbility(new SimpleStaticAbility(
|
||||||
new BoostSourceEffect(xValue, xValue, Duration.WhileOnBattlefield)
|
new BoostSourceEffect(xValue, xValue, Duration.WhileOnBattlefield)
|
||||||
.setText("{this} gets +1/+1 for each Gate you control.")
|
.setText("{this} gets +1/+1 for each Gate you control.")
|
||||||
));
|
).addHint(GateYouControlHint.instance));
|
||||||
|
|
||||||
// As long as you control two or more Gates, Gatebreaker Ram has vigilance and trample.
|
// As long as you control two or more Gates, Gatebreaker Ram has vigilance and trample.
|
||||||
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
|
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||||
|
|
|
@ -1,32 +1,24 @@
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.GateYouControlCount;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.constants.SubType;
|
import mage.abilities.hint.common.GateYouControlHint;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import java.util.UUID;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class GatekeeperGargoyle extends CardImpl {
|
public final class GatekeeperGargoyle extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterControlledPermanent();
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new SubtypePredicate(SubType.GATE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public GatekeeperGargoyle(UUID ownerId, CardSetInfo setInfo) {
|
public GatekeeperGargoyle(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
|
||||||
|
|
||||||
|
@ -41,9 +33,9 @@ public final class GatekeeperGargoyle extends CardImpl {
|
||||||
this.addAbility(new EntersBattlefieldAbility(
|
this.addAbility(new EntersBattlefieldAbility(
|
||||||
new AddCountersSourceEffect(
|
new AddCountersSourceEffect(
|
||||||
CounterType.P1P1.createInstance(),
|
CounterType.P1P1.createInstance(),
|
||||||
new PermanentsOnBattlefieldCount(filter), true
|
GateYouControlCount.instance, true
|
||||||
), "with a +1/+1 counter on it for each Gate you control"
|
), "with a +1/+1 counter on it for each Gate you control"
|
||||||
));
|
).addHint(GateYouControlHint.instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
public GatekeeperGargoyle(final GatekeeperGargoyle card) {
|
public GatekeeperGargoyle(final GatekeeperGargoyle card) {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package mage.cards.g;
|
package mage.cards.g;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.GateYouControlCount;
|
||||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.hint.common.GateYouControlHint;
|
||||||
import mage.abilities.keyword.EquipAbility;
|
import mage.abilities.keyword.EquipAbility;
|
||||||
import mage.abilities.keyword.MenaceAbility;
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
import mage.abilities.keyword.VigilanceAbility;
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
|
@ -16,23 +16,14 @@ import mage.constants.AttachmentType;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import java.util.UUID;
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class GlaiveOfTheGuildpact extends CardImpl {
|
public final class GlaiveOfTheGuildpact extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter
|
|
||||||
= new FilterControlledPermanent("Gate you control");
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new SubtypePredicate(SubType.GATE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public GlaiveOfTheGuildpact(UUID ownerId, CardSetInfo setInfo) {
|
public GlaiveOfTheGuildpact(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
|
||||||
|
@ -42,7 +33,7 @@ public final class GlaiveOfTheGuildpact extends CardImpl {
|
||||||
Ability ability = new SimpleStaticAbility(
|
Ability ability = new SimpleStaticAbility(
|
||||||
Zone.BATTLEFIELD,
|
Zone.BATTLEFIELD,
|
||||||
new BoostEquippedEffect(
|
new BoostEquippedEffect(
|
||||||
new PermanentsOnBattlefieldCount(filter),
|
GateYouControlCount.instance,
|
||||||
new StaticValue(0)
|
new StaticValue(0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -52,6 +43,7 @@ public final class GlaiveOfTheGuildpact extends CardImpl {
|
||||||
ability.addEffect(new GainAbilityAttachedEffect(
|
ability.addEffect(new GainAbilityAttachedEffect(
|
||||||
new MenaceAbility(), AttachmentType.EQUIPMENT
|
new MenaceAbility(), AttachmentType.EQUIPMENT
|
||||||
).setText("and menace"));
|
).setText("and menace"));
|
||||||
|
ability.addHint(GateYouControlHint.instance);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
// Equip {3}
|
// Equip {3}
|
||||||
|
|
|
@ -1,46 +1,37 @@
|
||||||
|
|
||||||
package mage.cards.h;
|
package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.GateYouControlCount;
|
||||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.hint.common.GateYouControlHint;
|
||||||
import mage.abilities.keyword.VigilanceAbility;
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
|
||||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class HoldTheGates extends CardImpl {
|
public final class HoldTheGates extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterControlledPermanent();
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(new SubtypePredicate(SubType.GATE));
|
|
||||||
}
|
|
||||||
|
|
||||||
public HoldTheGates(UUID ownerId, CardSetInfo setInfo) {
|
public HoldTheGates(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||||
|
|
||||||
|
|
||||||
// Creatures you control get +0/+1 for each Gate you control and have vigilance.
|
// Creatures you control get +0/+1 for each Gate you control and have vigilance.
|
||||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
|
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||||
new BoostControlledEffect(new StaticValue(0),new PermanentsOnBattlefieldCount(filter), Duration.WhileOnBattlefield));
|
new BoostControlledEffect(new StaticValue(0), GateYouControlCount.instance, Duration.WhileOnBattlefield));
|
||||||
ability.addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures"))
|
ability.addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures"))
|
||||||
.setText("Creatures you control get +0/+1 for each Gate you control and have vigilance"));
|
.setText("Creatures you control get +0/+1 for each Gate you control and have vigilance"));
|
||||||
|
ability.addHint(GateYouControlHint.instance);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
package mage.abilities.dynamicvalue.common;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author JayDi85
|
||||||
|
*/
|
||||||
|
public enum GateYouControlCount implements DynamicValue {
|
||||||
|
|
||||||
|
instance;
|
||||||
|
private static final FilterPermanent filter = new FilterControlledPermanent("Gate you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(new SubtypePredicate(SubType.GATE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||||
|
return game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GateYouControlCount copy() {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "X";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMessage() {
|
||||||
|
return "gate you control";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package mage.abilities.hint.common;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.dynamicvalue.common.GateYouControlCount;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
|
import mage.game.Game;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author JayDi85
|
||||||
|
*/
|
||||||
|
public enum GateYouControlHint implements Hint {
|
||||||
|
|
||||||
|
instance;
|
||||||
|
|
||||||
|
private static final Hint hint = new ValueHint("Gate you control", GateYouControlCount.instance);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getText(Game game, Ability ability) {
|
||||||
|
return hint.getText(game, ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Hint copy() {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue