[MH2] Implemented Lucid Dreams

This commit is contained in:
Evan Kranzler 2021-05-24 20:28:40 -04:00
parent b3ac432377
commit 4127030c9d
48 changed files with 241 additions and 212 deletions

View file

@ -9,7 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
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;
@ -20,7 +20,6 @@ import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
/** /**
@ -51,7 +50,7 @@ public final class AngelOfDeliverance extends CardImpl {
"<i>Delirium</i> &mdash; Whenever {this} deals damage, if there are four or more card types among cards in your graveyard, exile target creature an opponent controls" "<i>Delirium</i> &mdash; Whenever {this} deals damage, if there are four or more card types among cards in your graveyard, exile target creature an opponent controls"
); );
ability.addTarget(new TargetCreaturePermanent(filter)); ability.addTarget(new TargetCreaturePermanent(filter));
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -9,7 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.MillCardsControllerEffect; import mage.abilities.effects.common.MillCardsControllerEffect;
import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -35,7 +35,7 @@ public final class AutumnalGloom extends CardImpl {
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, DeliriumCondition.instance, false); Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new TransformSourceEffect(true), TargetController.YOU, DeliriumCondition.instance, false);
ability.setAbilityWord(AbilityWord.DELIRIUM); ability.setAbilityWord(AbilityWord.DELIRIUM);
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -9,7 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
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.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -33,7 +33,7 @@ public final class BackwoodsSurvivalists extends CardImpl {
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} gets +1/+1"); ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} gets +1/+1");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), DeliriumCondition.instance, "and has trample as long as there are four or more card types among cards in your graveyard.")); ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), DeliriumCondition.instance, "and has trample as long as there are four or more card types among cards in your graveyard."));
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -10,7 +10,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.MillCardsControllerEffect; import mage.abilities.effects.common.MillCardsControllerEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -47,7 +47,7 @@ public final class CropSigil extends CardImpl {
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterCreature)); ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterCreature));
ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterLand)); ability.addTarget(new TargetCardInYourGraveyard(0, 1, filterLand));
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.GreenManaAbility;
@ -38,7 +38,7 @@ public final class DeathcapCultivator extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield), new ConditionalContinuousEffect(new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield),
DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} has deathtouch as long as there are four or more card types among cards in your graveyard")) DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} has deathtouch as long as there are four or more card types among cards in your graveyard"))
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private DeathcapCultivator(final DeathcapCultivator card) { private DeathcapCultivator(final DeathcapCultivator card) {

View file

@ -7,7 +7,7 @@ import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ExileAllEffect; import mage.abilities.effects.common.ExileAllEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -29,7 +29,7 @@ public final class DescendUponTheSinful extends CardImpl {
Effect effect = new ConditionalOneShotEffect(new CreateTokenEffect(new AngelToken()), DeliriumCondition.instance); Effect effect = new ConditionalOneShotEffect(new CreateTokenEffect(new AngelToken()), DeliriumCondition.instance);
effect.setText("<br/><i>Delirium</i> &mdash; Create a 4/4 white Angel creature token with flying if there are four or more card types among cards in your graveyard"); effect.setText("<br/><i>Delirium</i> &mdash; Create a 4/4 white Angel creature token with flying if there are four or more card types among cards in your graveyard");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addHint(DeliriumHint.instance); this.getSpellAbility().addHint(CardTypesInGraveyardHint.YOU);
} }
private DescendUponTheSinful(final DescendUponTheSinful card) { private DescendUponTheSinful(final DescendUponTheSinful card) {

View file

@ -10,7 +10,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -39,7 +39,7 @@ public final class DesperateSentry extends CardImpl {
new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance, new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance,
"<i>Delirium</i> &mdash; {this} gets +3/+0 as long as there are four or more card types among cards in your graveyard."); "<i>Delirium</i> &mdash; {this} gets +3/+0 as long as there are four or more card types among cards in your graveyard.");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -5,7 +5,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
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;
@ -31,7 +31,7 @@ public final class DuskFeaster extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2, DeliriumCondition.instance)); Ability ability = new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2, DeliriumCondition.instance));
ability.setRuleAtTheTop(true); ability.setRuleAtTheTop(true);
ability.setAbilityWord(AbilityWord.DELIRIUM); ability.setAbilityWord(AbilityWord.DELIRIUM);
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
// Flying // Flying

View file

@ -8,7 +8,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CastSourceTriggeredAbility; import mage.abilities.effects.common.CastSourceTriggeredAbility;
import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
@ -48,7 +48,7 @@ public final class EmrakulThePromisedEnd extends CardImpl {
// Emrakul, the Promised End costs {1} less to cast for each card type among cards in your graveyard. // Emrakul, the Promised End costs {1} less to cast for each card type among cards in your graveyard.
Ability ability = new SimpleStaticAbility(Zone.ALL, new EmrakulThePromisedEndCostReductionEffect()); Ability ability = new SimpleStaticAbility(Zone.ALL, new EmrakulThePromisedEndCostReductionEffect());
ability.setRuleAtTheTop(true); ability.setRuleAtTheTop(true);
this.addAbility(ability.addHint(DeliriumHint.instance)); this.addAbility(ability.addHint(CardTypesInGraveyardHint.YOU));
// When you cast Emrakul, you gain control of target opponent during that player's next turn. After that turn, that player takes an extra turn. // When you cast Emrakul, you gain control of target opponent during that player's next turn. After that turn, that player takes an extra turn.
ability = new CastSourceTriggeredAbility(new EmrakulThePromisedEndGainControlEffect()); ability = new CastSourceTriggeredAbility(new EmrakulThePromisedEndGainControlEffect());

View file

@ -11,7 +11,7 @@ import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -56,7 +56,7 @@ public final class ExtricatorOfSin extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, "
+ " transform {this}.") + " transform {this}.")
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private ExtricatorOfSin(final ExtricatorOfSin card) { private ExtricatorOfSin(final ExtricatorOfSin card) {

View file

@ -8,7 +8,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalAsThoughEffect; import mage.abilities.decorator.ConditionalAsThoughEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.DefenderAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -40,7 +40,7 @@ public final class GeistOfTheLonelyVigil extends CardImpl {
new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield), new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
DeliriumCondition.instance); DeliriumCondition.instance);
effect.setText("<i>Delirium</i> &mdash; {this} can attack as though it didn't have defender as long as there are four or more card types among cards in your graveyard"); effect.setText("<i>Delirium</i> &mdash; {this} can attack as though it didn't have defender as long as there are four or more card types among cards in your graveyard");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(DeliriumHint.instance)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(CardTypesInGraveyardHint.YOU));
} }
private GeistOfTheLonelyVigil(final GeistOfTheLonelyVigil card) { private GeistOfTheLonelyVigil(final GeistOfTheLonelyVigil card) {

View file

@ -9,7 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DamagePlayersEffect; import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -38,7 +38,7 @@ public final class GibberingFiend extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
+ "{this} deals 1 damage to that player.") + "{this} deals 1 damage to that player.")
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private GibberingFiend(final GibberingFiend card) { private GibberingFiend(final GibberingFiend card) {

View file

@ -8,7 +8,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -37,7 +37,7 @@ public final class GnarlwoodDryad extends CardImpl {
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), DeliriumCondition.instance, new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), DeliriumCondition.instance,
"<i>Delirium</i> &mdash; {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard."); "<i>Delirium</i> &mdash; {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard.");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -11,7 +11,7 @@ import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -48,7 +48,7 @@ public final class GrimFlayer extends CardImpl {
new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield),
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard")) "<i>Delirium</i> &mdash; {this} gets +2/+2 as long as there are four or more card types among cards in your graveyard"))
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private GrimFlayer(final GrimFlayer card) { private GrimFlayer(final GrimFlayer card) {

View file

@ -8,7 +8,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -36,7 +36,7 @@ public final class HoundOfTheFarbogs extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), DeliriumCondition.instance, RULE)); new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), DeliriumCondition.instance, RULE));
ability.setAbilityWord(AbilityWord.DELIRIUM); ability.setAbilityWord(AbilityWord.DELIRIUM);
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -7,7 +7,7 @@ import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -31,7 +31,7 @@ public final class InexorableBlob extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; Whenever {this} attacks and there are at least four card types among cards in your graveyard, " "<i>Delirium</i> &mdash; Whenever {this} attacks and there are at least four card types among cards in your graveyard, "
+ "create a 3/3 green Ooze creature token tapped and attacking.") + "create a 3/3 green Ooze creature token tapped and attacking.")
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private InexorableBlob(final InexorableBlob card) { private InexorableBlob(final InexorableBlob card) {

View file

@ -9,7 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
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.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
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;
@ -34,7 +34,7 @@ public final class InquisitorsOx extends CardImpl {
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} gets +1/+0"); ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield), DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} gets +1/+0");
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance()), DeliriumCondition.instance, "and has vigilance as long as there are four or more card types among cards in your graveyard.")); ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance()), DeliriumCondition.instance, "and has vigilance as long as there are four or more card types among cards in your graveyard."));
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -7,7 +7,7 @@ import mage.abilities.Ability;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect; import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -36,7 +36,7 @@ public final class InvasiveSurgery extends CardImpl {
// <i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, search the graveyard, hand, and library of that spell's controller for any number of cards with the same name as that spell, exile those cards, then that player shuffles their library. // <i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, search the graveyard, hand, and library of that spell's controller for any number of cards with the same name as that spell, exile those cards, then that player shuffles their library.
this.getSpellAbility().addEffect(new InvasiveSurgeryEffect()); this.getSpellAbility().addEffect(new InvasiveSurgeryEffect());
this.getSpellAbility().addTarget(new TargetSpell(filter)); this.getSpellAbility().addTarget(new TargetSpell(filter));
this.getSpellAbility().addHint(DeliriumHint.instance); this.getSpellAbility().addHint(CardTypesInGraveyardHint.YOU);
} }
private InvasiveSurgery(final InvasiveSurgery card) { private InvasiveSurgery(final InvasiveSurgery card) {

View file

@ -11,7 +11,7 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.hint.ValueHint; import mage.abilities.hint.ValueHint;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.ReachAbility; import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -53,7 +53,7 @@ public final class IshkanahGrafwidow extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; When {this} enters the battlefield, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; When {this} enters the battlefield, if there are four or more card types among cards in your graveyard, "
+ "create three 1/2 green Spider creature tokens with reach."); + "create three 1/2 green Spider creature tokens with reach.");
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
// {5}{B}: Target opponent loses 1 life for each Spider you control. // {5}{B}: Target opponent loses 1 life for each Spider you control.

View file

@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -32,7 +32,7 @@ public final class KessigDireSwine extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield),
DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} has trample as long as there are four or more card types among cards in your graveyard")) DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} has trample as long as there are four or more card types among cards in your graveyard"))
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private KessigDireSwine(final KessigDireSwine card) { private KessigDireSwine(final KessigDireSwine card) {

View file

@ -5,7 +5,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -35,7 +35,7 @@ public final class KindlyStranger extends CardImpl {
Zone.BATTLEFIELD, new TransformSourceEffect(true), new ManaCostsImpl<>("{2}{B}"), Zone.BATTLEFIELD, new TransformSourceEffect(true), new ManaCostsImpl<>("{2}{B}"),
DeliriumCondition.instance, "<i>Delirium</i> &mdash; {2}{B}: Transform {this}. " + DeliriumCondition.instance, "<i>Delirium</i> &mdash; {2}{B}: Transform {this}. " +
"Activate only if there are four or more card types among cards in your graveyard." "Activate only if there are four or more card types among cards in your graveyard."
).addHint(DeliriumHint.instance)); ).addHint(CardTypesInGraveyardHint.YOU));
} }
private KindlyStranger(final KindlyStranger card) { private KindlyStranger(final KindlyStranger card) {

View file

@ -0,0 +1,67 @@
package mage.cards.l;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.Game;
import mage.players.Player;
import java.util.Collection;
import java.util.UUID;
import java.util.stream.Collectors;
/**
* @author TheElk801
*/
public final class LucidDreams extends CardImpl {
public LucidDreams(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}{U}");
// Draw X cards, where X is the number of card types among cards in your graveyard.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(LucidDreamsValue.instance)
.setText("draw X cards, where X is the number of card types among cards in your graveyard"));
this.getSpellAbility().addHint(CardTypesInGraveyardHint.YOU);
}
private LucidDreams(final LucidDreams card) {
super(card);
}
@Override
public LucidDreams copy() {
return new LucidDreams(this);
}
}
enum LucidDreamsValue implements DynamicValue {
instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
Player player = game.getPlayer(sourceAbility.getControllerId());
return player == null ? 0 : player.getGraveyard()
.getCards(game)
.stream()
.map(MageObject::getCardType)
.flatMap(Collection::stream)
.collect(Collectors.toSet())
.size();
}
@Override
public LucidDreamsValue copy() {
return instance;
}
@Override
public String getMessage() {
return "";
}
}

View file

@ -7,7 +7,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.MillCardsEachPlayerEffect; import mage.abilities.effects.common.MillCardsEachPlayerEffect;
import mage.abilities.effects.common.MillCardsTargetEffect; import mage.abilities.effects.common.MillCardsTargetEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -42,7 +42,7 @@ public final class ManicScribe extends CardImpl {
TargetController.OPPONENT, false, true TargetController.OPPONENT, false, true
), DeliriumCondition.instance, "<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, " + ), DeliriumCondition.instance, "<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, " +
"if there are four or more card types among cards in your graveyard, that player mills three cards." "if there are four or more card types among cards in your graveyard, that player mills three cards."
).addHint(DeliriumHint.instance)); ).addHint(CardTypesInGraveyardHint.YOU));
} }
private ManicScribe(final ManicScribe card) { private ManicScribe(final ManicScribe card) {

View file

@ -5,7 +5,7 @@ import java.util.UUID;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -30,7 +30,7 @@ public final class MightBeyondReason extends CardImpl {
+ "<i>Delirium</i> &mdash; Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard" + "<i>Delirium</i> &mdash; Put three +1/+1 counter on that creature instead if there are four or more card types among cards in your graveyard"
)); ));
getSpellAbility().addTarget(new TargetCreaturePermanent()); getSpellAbility().addTarget(new TargetCreaturePermanent());
getSpellAbility().addHint(DeliriumHint.instance); getSpellAbility().addHint(CardTypesInGraveyardHint.YOU);
} }
private MightBeyondReason(final MightBeyondReason card) { private MightBeyondReason(final MightBeyondReason card) {

View file

@ -11,7 +11,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.MillCardsControllerEffect; import mage.abilities.effects.common.MillCardsControllerEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -45,7 +45,7 @@ public final class MindwrackDemon extends CardImpl {
new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(4), TargetController.YOU, false), new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(4), TargetController.YOU, false),
new InvertCondition(DeliriumCondition.instance), new InvertCondition(DeliriumCondition.instance),
"<i>Delirium</i> &mdash; At the beginning of your upkeep, you lose 4 life unless there are four or more card types among cards in your graveyard."); "<i>Delirium</i> &mdash; At the beginning of your upkeep, you lose 4 life unless there are four or more card types among cards in your graveyard.");
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -31,7 +31,7 @@ public final class MoldgrafScavenger extends CardImpl {
new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield),
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; {this} gets +3/+0 as long as there are four or more card types among cards in your graveyard")) "<i>Delirium</i> &mdash; {this} gets +3/+0 as long as there are four or more card types among cards in your graveyard"))
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private MoldgrafScavenger(final MoldgrafScavenger card) { private MoldgrafScavenger(final MoldgrafScavenger card) {

View file

@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
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;
@ -28,7 +28,7 @@ public final class MoorlandDrifter extends CardImpl {
// <i>Delirium</i> &mdash; Moorland Drifter has flying as long as there are four or more card types among cards in your graveyard. // <i>Delirium</i> &mdash; Moorland Drifter has flying as long as there are four or more card types among cards in your graveyard.
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), DeliriumCondition.instance, "<i>Delirium</i> &mdash; Moorland Drifter has flying as long as there are four or more card types among cards in your graveyard."); ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance()), DeliriumCondition.instance, "<i>Delirium</i> &mdash; Moorland Drifter has flying as long as there are four or more card types among cards in your graveyard.");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(DeliriumHint.instance)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(CardTypesInGraveyardHint.YOU));
} }
private MoorlandDrifter(final MoorlandDrifter card) { private MoorlandDrifter(final MoorlandDrifter card) {

View file

@ -6,7 +6,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.RestrictionEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -40,7 +40,7 @@ public final class Mournwillow extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; When {this} enters the battlefield, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; When {this} enters the battlefield, if there are four or more card types among cards in your graveyard, "
+ "creatures with power 2 or less can't block this turn."); + "creatures with power 2 or less can't block this turn.");
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect; import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.abilities.hint.Hint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.LifelinkAbility;
@ -21,7 +21,6 @@ import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.Collection; import java.util.Collection;
import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -54,7 +53,7 @@ public final class NighthawkScavenger extends CardImpl {
new SetPowerSourceEffect( new SetPowerSourceEffect(
NighthawkScavengerValue.instance, Duration.EndOfGame NighthawkScavengerValue.instance, Duration.EndOfGame
).setText("{this}'s power is equal to 1 plus the number of card types among cards in your opponents' graveyards.") ).setText("{this}'s power is equal to 1 plus the number of card types among cards in your opponents' graveyards.")
).addHint(NighthawkScavengerHint.instance)); ).addHint(CardTypesInGraveyardHint.OPPONENTS));
} }
private NighthawkScavenger(final NighthawkScavenger card) { private NighthawkScavenger(final NighthawkScavenger card) {
@ -96,37 +95,3 @@ enum NighthawkScavengerValue implements DynamicValue {
return ""; return "";
} }
} }
enum NighthawkScavengerHint implements Hint {
instance;
@Override
public String getText(Game game, Ability ability) {
List<String> types = game
.getOpponents(ability.getControllerId())
.stream()
.map(game::getPlayer)
.filter(Objects::nonNull)
.map(Player::getGraveyard)
.map(graveyard -> graveyard.getCards(game))
.flatMap(Collection::stream)
.map(MageObject::getCardType)
.flatMap(Collection::stream)
.distinct()
.map(CardType::toString)
.sorted()
.collect(Collectors.toList());
String message = "" + types.size();
if (types.size() > 0) {
message += " (";
message += types.stream().reduce((a, b) -> a + ", " + b).orElse("");
message += ')';
}
return "Card types in opponents' graveyards: " + message;
}
@Override
public NighthawkScavengerHint copy() {
return instance;
}
}

View file

@ -9,7 +9,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -43,7 +43,7 @@ public final class ObsessiveSkinner extends CardImpl {
"<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
+ "put a +1/+1 counter on target creature."); + "put a +1/+1 counter on target creature.");
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -9,7 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
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.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -38,7 +38,7 @@ public final class ParanoidParishBlade extends CardImpl {
effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield), effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield),
DeliriumCondition.instance, "and has first strike as long as there are four or more card types among cards in your graveyard."); DeliriumCondition.instance, "and has first strike as long as there are four or more card types among cards in your graveyard.");
ability.addEffect(effect); ability.addEffect(effect);
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -6,7 +6,7 @@ import mage.abilities.Ability;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect; import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -31,7 +31,7 @@ public final class PickTheBrain extends CardImpl {
// <i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, search that player's graveyard, hand, and library for any number of cards with the same name as the exiled card, exile those cards, then that player shuffles their library. // <i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, search that player's graveyard, hand, and library for any number of cards with the same name as the exiled card, exile those cards, then that player shuffles their library.
this.getSpellAbility().addEffect(new PickTheBrainEffect()); this.getSpellAbility().addEffect(new PickTheBrainEffect());
this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addTarget(new TargetOpponent());
this.getSpellAbility().addHint(DeliriumHint.instance); this.getSpellAbility().addHint(CardTypesInGraveyardHint.YOU);
} }
private PickTheBrain(final PickTheBrain card) { private PickTheBrain(final PickTheBrain card) {

View file

@ -7,7 +7,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
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;
@ -42,7 +42,7 @@ public final class ReaperOfFlightMoonsilver extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; Sacrifice another creature: Reaper of Flight Moonsilver gets +2/+1 until end of turn. " "<i>Delirium</i> &mdash; Sacrifice another creature: Reaper of Flight Moonsilver gets +2/+1 until end of turn. "
+ "Activate only if there are four or more card types among cards in your graveyard.") + "Activate only if there are four or more card types among cards in your graveyard.")
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private ReaperOfFlightMoonsilver(final ReaperOfFlightMoonsilver card) { private ReaperOfFlightMoonsilver(final ReaperOfFlightMoonsilver card) {

View file

@ -6,7 +6,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AbilityWord; import mage.constants.AbilityWord;
@ -25,7 +25,7 @@ public final class ScourTheLaboratory extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2, DeliriumCondition.instance)); Ability ability = new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2, DeliriumCondition.instance));
ability.setRuleAtTheTop(true); ability.setRuleAtTheTop(true);
ability.setAbilityWord(AbilityWord.DELIRIUM); ability.setAbilityWord(AbilityWord.DELIRIUM);
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
// Draw three cards. // Draw three cards.

View file

@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.DoubleStrikeAbility; import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -35,7 +35,7 @@ public final class ScourgeWolf extends CardImpl {
// <i>Delirium</i> &mdash; Scourge Wolf has double strike as long as there are four or more card types among cards in your graveyard. // <i>Delirium</i> &mdash; Scourge Wolf has double strike as long as there are four or more card types among cards in your graveyard.
ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield), ConditionalContinuousEffect effect = new ConditionalContinuousEffect(new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield),
DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} has double strike as long as there are four or more card types among cards in your graveyard."); DeliriumCondition.instance, "<i>Delirium</i> &mdash; {this} has double strike as long as there are four or more card types among cards in your graveyard.");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(DeliriumHint.instance)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(CardTypesInGraveyardHint.YOU));
} }
private ScourgeWolf(final ScourgeWolf card) { private ScourgeWolf(final ScourgeWolf card) {

View file

@ -7,7 +7,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -37,7 +37,7 @@ public final class SoulSwallower extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, "
+ "put three +1/+1 counters on Soul Swallower.") + "put three +1/+1 counters on Soul Swallower.")
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private SoulSwallower(final SoulSwallower card) { private SoulSwallower(final SoulSwallower card) {

View file

@ -5,7 +5,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.decorator.ConditionalActivatedAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
@ -30,7 +30,7 @@ public final class StallionOfAshmouth extends CardImpl {
Zone.BATTLEFIELD, Zone.BATTLEFIELD,
new BoostSourceEffect(1, 1, Duration.EndOfTurn), new BoostSourceEffect(1, 1, Duration.EndOfTurn),
new ManaCostsImpl<>("{1}{B}"), DeliriumCondition.instance new ManaCostsImpl<>("{1}{B}"), DeliriumCondition.instance
).setAbilityWord(AbilityWord.DELIRIUM).addHint(DeliriumHint.instance)); ).setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardHint.YOU));
} }
private StallionOfAshmouth(final StallionOfAshmouth card) { private StallionOfAshmouth(final StallionOfAshmouth card) {

View file

@ -8,7 +8,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -41,7 +41,7 @@ public final class StrangeAugmentation extends CardImpl {
// <i>Delirium</i> &mdash Enchanted creature gets an additional +2/+2 as long as there are four or more card types among cards in your graveyard. // <i>Delirium</i> &mdash Enchanted creature gets an additional +2/+2 as long as there are four or more card types among cards in your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostEnchantedEffect(2, 2), DeliriumCondition.instance, this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostEnchantedEffect(2, 2), DeliriumCondition.instance,
"<i>Delirium</i> &mdash; Enchanted creature gets an additional +2/+2 as long as there are four or more card types among cards in your graveyard.")) "<i>Delirium</i> &mdash; Enchanted creature gets an additional +2/+2 as long as there are four or more card types among cards in your graveyard."))
.addHint(DeliriumHint.instance)); .addHint(CardTypesInGraveyardHint.YOU));
} }
private StrangeAugmentation(final StrangeAugmentation card) { private StrangeAugmentation(final StrangeAugmentation card) {

View file

@ -5,7 +5,7 @@ import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.hint.Hint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -13,8 +13,9 @@ import mage.constants.*;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.*; import java.util.EnumSet;
import java.util.stream.Collectors; import java.util.Set;
import java.util.UUID;
/** /**
* @author Plopman * @author Plopman
@ -29,7 +30,7 @@ public final class Tarmogoyf extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. // Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new TarmogoyfEffect()).addHint(TarmogoyfHint.instance)); this.addAbility(new SimpleStaticAbility(Zone.ALL, new TarmogoyfEffect()).addHint(CardTypesInGraveyardHint.ALL));
} }
private Tarmogoyf(final Tarmogoyf card) { private Tarmogoyf(final Tarmogoyf card) {
@ -84,37 +85,3 @@ class TarmogoyfEffect extends ContinuousEffectImpl {
} }
} }
enum TarmogoyfHint implements Hint {
instance;
@Override
public String getText(Game game, Ability ability) {
List<String> types = game.getState()
.getPlayersInRange(ability.getControllerId(), game)
.stream()
.map(game::getPlayer)
.filter(Objects::nonNull)
.map(Player::getGraveyard)
.map(graveyard -> graveyard.getCards(game))
.flatMap(Collection::stream)
.map(MageObject::getCardType)
.flatMap(Collection::stream)
.distinct()
.map(CardType::toString)
.sorted()
.collect(Collectors.toList());
String message = "" + types.size();
if (types.size() > 0) {
message += " (";
message += types.stream().reduce((a, b) -> a + ", " + b).orElse("");
message += ')';
}
return "Card types in graveyards: " + message;
}
@Override
public TarmogoyfHint copy() {
return instance;
}
}

View file

@ -9,7 +9,7 @@ import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
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.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -35,7 +35,7 @@ public final class ThrabenFoulbloods extends CardImpl {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility()), DeliriumCondition.instance, ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility()), DeliriumCondition.instance,
"and has menace as long as there are four or more card types among cards in your graveyard. <i>(A creature with menace can't be blocked except by two or more creatures.)</i>")); "and has menace as long as there are four or more card types among cards in your graveyard. <i>(A creature with menace can't be blocked except by two or more creatures.)</i>"));
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -6,7 +6,7 @@ import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.SacrificeEffect; import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -37,7 +37,7 @@ public final class ToTheSlaughter extends CardImpl {
new SacrificeEffect(StaticFilters.FILTER_PERMANENT_PLANESWALKER, 1, "Target player"), new SacrificeEffect(StaticFilters.FILTER_PERMANENT_PLANESWALKER, 1, "Target player"),
DeliriumCondition.instance, "and a planeswalker.")); DeliriumCondition.instance, "and a planeswalker."));
this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addHint(DeliriumHint.instance); this.getSpellAbility().addHint(CardTypesInGraveyardHint.YOU);
} }
private ToTheSlaughter(final ToTheSlaughter card) { private ToTheSlaughter(final ToTheSlaughter card) {

View file

@ -9,7 +9,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -21,7 +21,6 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -55,7 +54,7 @@ public final class ToothCollector extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
+ "target creature that player controls gets -1/-1 until end of turn."); + "target creature that player controls gets -1/-1 until end of turn.");
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -9,7 +9,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
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;
@ -21,7 +21,6 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
@ -57,7 +56,7 @@ public final class Topplegeist extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, " "<i>Delirium</i> &mdash; At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
+ "tap target creature that player controls."); + "tap target creature that player controls.");
ability.addHint(DeliriumHint.instance); ability.addHint(CardTypesInGraveyardHint.YOU);
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -4,7 +4,7 @@ import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -42,7 +42,7 @@ public final class TraverseTheUlvenwald extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<br><i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, instead search your library for a creature or land card, " "<br><i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, instead search your library for a creature or land card, "
+ "reveal it, put it into your hand, then shuffle.")); + "reveal it, put it into your hand, then shuffle."));
this.getSpellAbility().addHint(DeliriumHint.instance); this.getSpellAbility().addHint(CardTypesInGraveyardHint.YOU);
} }
private TraverseTheUlvenwald(final TraverseTheUlvenwald card) { private TraverseTheUlvenwald(final TraverseTheUlvenwald card) {

View file

@ -6,7 +6,7 @@ import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.abilities.hint.common.DeliriumHint; import mage.abilities.hint.common.CardTypesInGraveyardHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -32,7 +32,7 @@ public final class WhispersOfEmrakul extends CardImpl {
DeliriumCondition.instance, DeliriumCondition.instance,
"<br><i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, that player discards two cards at random instead")); "<br><i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, that player discards two cards at random instead"));
this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addTarget(new TargetOpponent());
this.getSpellAbility().addHint(DeliriumHint.instance); this.getSpellAbility().addHint(CardTypesInGraveyardHint.YOU);
} }
private WhispersOfEmrakul(final WhispersOfEmrakul card) { private WhispersOfEmrakul(final WhispersOfEmrakul card) {

View file

@ -38,6 +38,7 @@ public final class ModernHorizons2 extends ExpansionSet {
cards.add(new SetCardInfo("Fractured Sanity", 44, Rarity.RARE, mage.cards.f.FracturedSanity.class)); cards.add(new SetCardInfo("Fractured Sanity", 44, Rarity.RARE, mage.cards.f.FracturedSanity.class));
cards.add(new SetCardInfo("Grief", 87, Rarity.MYTHIC, mage.cards.g.Grief.class)); cards.add(new SetCardInfo("Grief", 87, Rarity.MYTHIC, mage.cards.g.Grief.class));
cards.add(new SetCardInfo("Island", 483, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 483, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Lucid Dreams", 50, Rarity.UNCOMMON, mage.cards.l.LucidDreams.class));
cards.add(new SetCardInfo("Marsh Flats", 248, Rarity.RARE, mage.cards.m.MarshFlats.class)); cards.add(new SetCardInfo("Marsh Flats", 248, Rarity.RARE, mage.cards.m.MarshFlats.class));
cards.add(new SetCardInfo("Misty Rainforest", 250, Rarity.RARE, mage.cards.m.MistyRainforest.class)); cards.add(new SetCardInfo("Misty Rainforest", 250, Rarity.RARE, mage.cards.m.MistyRainforest.class));
cards.add(new SetCardInfo("Mountain", 487, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 487, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));

View file

@ -0,0 +1,82 @@
package mage.abilities.hint.common;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.hint.Hint;
import mage.cards.Card;
import mage.constants.CardType;
import mage.game.Game;
import mage.players.Player;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @author JayDi85
*/
public enum CardTypesInGraveyardHint implements Hint {
YOU("your graveyard"),
ALL("all graveyards"),
OPPONENTS("your opponents' graveyards");
private final String message;
CardTypesInGraveyardHint(String message) {
this.message = message;
}
@Override
public String getText(Game game, Ability ability) {
Stream<Card> stream = getStream(game, ability);
if (stream == null) {
return null;
}
List<String> types = stream
.map(MageObject::getCardType)
.flatMap(Collection::stream)
.distinct()
.map(CardType::toString)
.sorted()
.collect(Collectors.toList());
String message = "" + types.size();
if (types.size() > 0) {
message += " (" + String.join(" , ", types) + ')';
}
return "Card types in " + message + ": " + message;
}
@Override
public Hint copy() {
return YOU;
}
private final Stream<Card> getStream(Game game, Ability ability) {
Collection<UUID> playerIds;
switch (this) {
case YOU:
Player player = game.getPlayer(ability.getControllerId());
return player == null
? null : player
.getGraveyard()
.getCards(game)
.stream();
case OPPONENTS:
playerIds = game.getOpponents(ability.getControllerId());
break;
case ALL:
playerIds = game.getState().getPlayersInRange(ability.getControllerId(), game);
break;
default:
return null;
}
return playerIds.stream()
.map(game::getPlayer)
.filter(Objects::nonNull)
.map(Player::getGraveyard)
.map(graveyard -> graveyard.getCards(game))
.flatMap(Collection::stream);
}
}

View file

@ -1,50 +0,0 @@
package mage.abilities.hint.common;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.hint.Hint;
import mage.constants.CardType;
import mage.game.Game;
import mage.players.Player;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author JayDi85
*/
public enum DeliriumHint implements Hint {
instance;
@Override
public String getText(Game game, Ability ability) {
Player player = game.getPlayer(ability.getControllerId());
if (player == null) {
return null;
}
List<String> types = player
.getGraveyard()
.getCards(game)
.stream()
.map(MageObject::getCardType)
.flatMap(Collection::stream)
.distinct()
.map(CardType::toString)
.sorted()
.collect(Collectors.toList());
String message = "" + types.size();
if (types.size() > 0) {
message += " (";
message += types.stream().reduce((a, b) -> a + ", " + b).orElse("");
message += ')';
}
return "Card types in your graveyard: " + message;
}
@Override
public Hint copy() {
return instance;
}
}