mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
added hint for domain
This commit is contained in:
parent
1b78edd7c8
commit
988740ab53
33 changed files with 134 additions and 50 deletions
|
@ -4,6 +4,7 @@ package mage.cards.a;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.DrawCardTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
|
@ -23,6 +24,7 @@ public final class AlliedStrategies extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new DrawCardTargetEffect(new DomainValue(true)));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.continuous.SetToughnessSourceEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -32,7 +33,7 @@ public final class AvenTrailblazer extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Domain - Aven Trailblazer's toughness is equal to the number of basic land types among lands you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetToughnessSourceEffect(new DomainValue(), Duration.EndOfGame)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetToughnessSourceEffect(new DomainValue(), Duration.EndOfGame)).addHint(DomainHint.instance));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.dynamicvalue.common.DomainValue;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.GainLifeTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
|
@ -32,7 +33,7 @@ public final class CollapsingBorders extends CardImpl {
|
|||
effect.setText("Then {this} deals 3 damage to that player");
|
||||
ability.addEffect(effect);
|
||||
ability.setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private CollapsingBorders(final CollapsingBorders card) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.costs.mana.ManaCosts;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
|
@ -28,7 +29,7 @@ public final class CollectiveRestraint extends CardImpl {
|
|||
// Domain - Creatures can't attack you unless their controller pays {X} for each creature they control that's attacking you, where X is the number of basic land types you control.
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new CollectiveRestraintPayManaToAttackAllEffect());
|
||||
ability.setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.addHint(DomainHint.instance));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.costs.Cost;
|
|||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -35,7 +36,7 @@ public final class Draco extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Domain - Draco costs {2} less to cast for each basic land type among lands you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new DracoCostReductionEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new DracoCostReductionEffect()).addHint(DomainHint.instance));
|
||||
|
||||
// Domain - At the beginning of your upkeep, sacrifice Draco unless you pay {10}. This cost is reduced by {2} for each basic land type among lands you control.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DracoSacrificeUnlessPaysEffect(), TargetController.YOU, false));
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.d;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -23,6 +24,7 @@ public final class DragDown extends CardImpl {
|
|||
// Domain - Target creature gets -1/-1 until end of turn for each basic land type among lands you control.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(-1), new DomainValue(-1), Duration.EndOfTurn, true));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private DragDown(final DragDown card) {
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.e;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
|
@ -23,6 +24,7 @@ public final class EvasiveAction extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new DomainValue()));
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private EvasiveAction(final EvasiveAction card) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.dynamicvalue.common.DomainValue;
|
|||
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -35,7 +36,7 @@ public final class ExoticCurse extends CardImpl {
|
|||
DynamicValue unboost = new SignInversionDynamicValue(new DomainValue());
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(unboost, unboost, Duration.WhileOnBattlefield));
|
||||
ability.setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private ExoticCurse(final ExoticCurse card) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import mage.abilities.dynamicvalue.common.DomainValue;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -23,12 +24,13 @@ public final class ExoticDisease extends CardImpl {
|
|||
// Domain - Target player loses X life and you gain X life, where X is the number of basic land types among lands you control.
|
||||
DomainValue dv = new DomainValue();
|
||||
Effect effect = new LoseLifeTargetEffect(dv);
|
||||
effect.setText("Domain - Target player loses X life");
|
||||
effect.setText("<i>Domain</i> — Target player loses X life");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
effect = new GainLifeEffect(dv);
|
||||
effect.setText("and you gain X life, where X is the number of basic land types among lands you control");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private ExoticDisease(final ExoticDisease card) {
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.e;
|
|||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -26,6 +27,7 @@ public final class ExplodingBorders extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true));
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue()));
|
||||
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private ExplodingBorders(final ExplodingBorders card) {
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.g;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
|
@ -24,6 +25,7 @@ public final class GaeasMight extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(), new DomainValue(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private GaeasMight(final GaeasMight card) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
|
@ -33,7 +34,7 @@ public final class KavuScout extends CardImpl {
|
|||
// Domain - Kavu Scout gets +1/+0 for each basic land type among lands you control.
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), StaticValue.get(0), Duration.WhileOnBattlefield));
|
||||
ability.setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private KavuScout(final KavuScout card) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -26,7 +27,7 @@ public final class ManaforceMace extends CardImpl {
|
|||
|
||||
// Domain - Equipped creature gets +1/+1 for each basic land type among lands you control.
|
||||
DomainValue value = new DomainValue();
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(value, value)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(value, value)).addHint(DomainHint.instance));
|
||||
// Equip {3}
|
||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3)));
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import mage.abilities.condition.IntCompareCondition;
|
|||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -29,7 +30,7 @@ public final class MaskOfIntolerance extends CardImpl {
|
|||
// At the beginning of each player's upkeep, if there are four or more basic land types among lands that player controls, Mask of Intolerance deals 3 damage to that player.
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(3), TargetController.ANY, false);
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new MaskOfIntoleranceCondition(),
|
||||
"At the beginning of each player's upkeep, if there are four or more basic land types among lands that player controls, {this} deals 3 damage to that player."));
|
||||
"At the beginning of each player's upkeep, if there are four or more basic land types among lands that player controls, {this} deals 3 damage to that player.").addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private MaskOfIntolerance(final MaskOfIntolerance card) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -30,8 +31,8 @@ public final class MatcaRioters extends CardImpl {
|
|||
|
||||
// Domain - Matca Rioters's power and toughness are each equal to the number of basic land types among lands you control.
|
||||
Effect effect = new SetPowerToughnessSourceEffect(new DomainValue(), Duration.EndOfGame);
|
||||
effect.setText("Domain - {this}'s power and toughness are each equal to the number of basic land types among lands you control.");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));
|
||||
effect.setText("<i>Domain</i> — {this}'s power and toughness are each equal to the number of basic land types among lands you control.");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, effect).addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private MatcaRioters(final MatcaRioters card) {
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.m;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -23,6 +24,7 @@ public final class MightOfAlara extends CardImpl {
|
|||
// Domain - Target creature gets +1/+1 until end of turn for each basic land type among lands you control.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(), new DomainValue(), Duration.EndOfTurn, true));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private MightOfAlara(final MightOfAlara card) {
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.o;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
|
@ -23,6 +24,7 @@ public final class OrderedMigration extends CardImpl {
|
|||
// Domain - Create a 1/1 blue Bird creature token with flying for each basic land type among lands you control.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new OrderedMigrationBirdToken(), new DomainValue()));
|
||||
this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private OrderedMigration(final OrderedMigration card) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.dynamicvalue.common.DomainValue;
|
|||
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -25,8 +26,9 @@ public final class PlanarDespair extends CardImpl {
|
|||
// Domain - All creatures get -1/-1 until end of turn for each basic land type among lands you control.
|
||||
DynamicValue dv = new SignInversionDynamicValue(new DomainValue());
|
||||
Effect effect = new BoostAllEffect(dv, dv, Duration.EndOfTurn);
|
||||
effect.setText("Domain - All creatures get -1/-1 until end of turn for each basic land type among lands you control.");
|
||||
effect.setText("<i>Domain</i> — All creatures get -1/-1 until end of turn for each basic land type among lands you control.");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private PlanarDespair(final PlanarDespair card) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
|
@ -31,7 +32,7 @@ public final class PowerArmor extends CardImpl {
|
|||
ability.addCost(new ManaCostsImpl("{3}"));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private PowerArmor(final PowerArmor card) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -32,7 +33,7 @@ public final class PrismaticGeoscope extends CardImpl {
|
|||
+ " where X is the number of basic land types among lands you control."
|
||||
);
|
||||
ability.setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private PrismaticGeoscope(final PrismaticGeoscope card) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
@ -32,7 +33,7 @@ public final class SamitePilgrim extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SamitePilgrimPreventDamageToTargetEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.setAbilityWord(AbilityWord.DOMAIN);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private SamitePilgrim(final SamitePilgrim card) {
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.s;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -21,6 +22,7 @@ public final class SporeBurst extends CardImpl {
|
|||
|
||||
// Domain - Create a 1/1 green Saproling creature token for each basic land type among lands you control.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new DomainValue()));
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private SporeBurst(final SporeBurst card) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -32,7 +33,7 @@ public final class Stratadon extends CardImpl {
|
|||
this.toughness = new MageInt(5);
|
||||
|
||||
// Domain - Stratadon costs {1} less to cast for each basic land type among lands you control.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new StratadonCostReductionEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new StratadonCostReductionEffect()).addHint(DomainHint.instance));
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.dynamicvalue.common.DomainValue;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -38,8 +39,8 @@ public final class StrengthOfUnity extends CardImpl {
|
|||
// Domain - Enchanted creature gets +1/+1 for each basic land type among lands you control.
|
||||
DomainValue dv = new DomainValue();
|
||||
Effect effect = new BoostEnchantedEffect(dv, dv);
|
||||
effect.setText("Domain - Enchanted creature gets +1/+1 for each basic land type among lands you control.");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
effect.setText("<i>Domain</i> — Enchanted creature gets +1/+1 for each basic land type among lands you control.");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private StrengthOfUnity(final StrengthOfUnity card) {
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.t;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -22,6 +23,7 @@ public final class TribalFlames extends CardImpl {
|
|||
// Domain - Tribal Flames deals X damage to any target, where X is the number of basic land types among lands you control.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue()));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private TribalFlames(final TribalFlames card) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.dynamicvalue.common.DomainValue;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -31,6 +32,7 @@ public final class TrompTheDomains extends CardImpl {
|
|||
effect = new BoostControlledEffect(domain, domain, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false);
|
||||
effect.setText("and get +1/+1 for each basic land type among lands you control");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ package mage.cards.v;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -22,6 +23,7 @@ public final class VoicesFromTheVoid extends CardImpl {
|
|||
// Domain - Target player discards a card for each basic land type among lands you control.
|
||||
this.getSpellAbility().addEffect(new DiscardTargetEffect(new DomainValue()));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private VoicesFromTheVoid(final VoicesFromTheVoid card) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -30,7 +31,7 @@ public final class WanderingGoblins extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Domain - {3}: Wandering Goblins gets +1/+0 until end of turn for each basic land type among lands you control.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), StaticValue.get(0), Duration.EndOfTurn), new GenericManaCost(3)));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), StaticValue.get(0), Duration.EndOfTurn, true), new GenericManaCost(3)).addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private WanderingGoblins(final WanderingGoblins card) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import mage.abilities.dynamicvalue.MultipliedValue;
|
|||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -21,8 +22,9 @@ public final class WanderingStream extends CardImpl {
|
|||
|
||||
// Domain - You gain 2 life for each basic land type among lands you control.
|
||||
Effect effect = new GainLifeEffect(new MultipliedValue(new DomainValue(), 2));
|
||||
effect.setText("Domain - You gain 2 life for each basic land type among lands you control");
|
||||
effect.setText("<i>Domain</i> — You gain 2 life for each basic land type among lands you control");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private WanderingStream(final WanderingStream card) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -30,8 +31,8 @@ public final class WayfaringGiant extends CardImpl {
|
|||
// Domain - Wayfaring Giant gets +1/+1 for each basic land type among lands you control.
|
||||
DomainValue dv = new DomainValue();
|
||||
Effect effect = new BoostSourceEffect(dv, dv, Duration.WhileOnBattlefield);
|
||||
effect.setText("Domain - {this} gets +1/+1 for each basic land type among lands you control.");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
effect.setText("<i>Domain</i> — {this} gets +1/+1 for each basic land type among lands you control.");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(DomainHint.instance));
|
||||
}
|
||||
|
||||
private WayfaringGiant(final WayfaringGiant card) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -29,6 +30,7 @@ public final class WorldlyCounsel extends CardImpl {
|
|||
|
||||
// Domain - Look at the top X cards of your library, where X is the number of basic land types among lands you control. Put one of those cards into your hand and the rest on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new WorldlyCounselEffect());
|
||||
this.getSpellAbility().addHint(DomainHint.instance);
|
||||
}
|
||||
|
||||
private WorldlyCounsel(final WorldlyCounsel card) {
|
||||
|
|
|
@ -4,18 +4,20 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public class DomainValue implements DynamicValue {
|
||||
|
||||
private int amount;
|
||||
private boolean countTargetPlayer;
|
||||
private final int amount;
|
||||
private final boolean countTargetPlayer;
|
||||
private UUID playerId;
|
||||
|
||||
public DomainValue() {
|
||||
|
@ -48,11 +50,6 @@ public class DomainValue implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
int havePlains = 0;
|
||||
int haveIslands = 0;
|
||||
int haveMountains = 0;
|
||||
int haveSwamps = 0;
|
||||
int haveForests = 0;
|
||||
UUID targetPlayer;
|
||||
if (playerId != null) {
|
||||
targetPlayer = playerId;
|
||||
|
@ -61,26 +58,20 @@ public class DomainValue implements DynamicValue {
|
|||
} else {
|
||||
targetPlayer = sourceAbility.getControllerId();
|
||||
}
|
||||
for (Permanent p : game.getBattlefield().getAllActivePermanents(targetPlayer)) {
|
||||
if (p.isLand()) {
|
||||
if (havePlains == 0 && p.hasSubtype(SubType.PLAINS, game)) {
|
||||
havePlains = 1;
|
||||
}
|
||||
if (haveIslands == 0 && p.hasSubtype(SubType.ISLAND, game)) {
|
||||
haveIslands = 1;
|
||||
}
|
||||
if (haveMountains == 0 && p.hasSubtype(SubType.MOUNTAIN, game)) {
|
||||
haveMountains = 1;
|
||||
}
|
||||
if (haveSwamps == 0 && p.hasSubtype(SubType.SWAMP, game)) {
|
||||
haveSwamps = 1;
|
||||
}
|
||||
if (haveForests == 0 && p.hasSubtype(SubType.FOREST, game)) {
|
||||
haveForests = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return amount * (haveForests + haveIslands + haveMountains + havePlains + haveSwamps);
|
||||
return game.getBattlefield()
|
||||
.getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS,
|
||||
targetPlayer, sourceAbility.getSourceId(), game
|
||||
).stream()
|
||||
.map(permanent -> SubType
|
||||
.getBasicLands()
|
||||
.stream()
|
||||
.filter(subType -> permanent.hasSubtype(subType, game))
|
||||
.collect(Collectors.toSet()))
|
||||
.flatMap(Collection::stream)
|
||||
.distinct()
|
||||
.mapToInt(x -> amount)
|
||||
.sum();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
package mage.abilities.hint.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum DomainHint implements Hint {
|
||||
instance;
|
||||
private static final List<String> typesInOrder = Arrays.asList("Plains", "Island", "Swamp", "Mountain", "Forest");
|
||||
|
||||
@Override
|
||||
public String getText(Game game, Ability ability) {
|
||||
List<String> landTypes = game.getBattlefield()
|
||||
.getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS,
|
||||
ability.getControllerId(), ability.getSourceId(), game
|
||||
).stream()
|
||||
.map(permanent -> SubType
|
||||
.getBasicLands()
|
||||
.stream()
|
||||
.filter(subType -> permanent.hasSubtype(subType, game))
|
||||
.collect(Collectors.toSet()))
|
||||
.flatMap(Collection::stream)
|
||||
.distinct()
|
||||
.map(SubType::getDescription)
|
||||
.sorted(Comparator.comparing(typesInOrder::indexOf))
|
||||
.collect(Collectors.toList());
|
||||
return "Basic land types among lands you control: " + landTypes.size()
|
||||
+ (landTypes.size() > 0 ? " (" + String.join(", ", landTypes) + ')' : "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainHint copy() {
|
||||
return instance;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue