mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
all refactoring ConditionalInterveningIfTriggeredAbility and no play makes the elk a dull boy
This commit is contained in:
parent
79a2f80563
commit
59f7126f64
59 changed files with 498 additions and 844 deletions
|
|
@ -5,7 +5,6 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.PlaneswalkEffect;
|
import mage.abilities.effects.common.PlaneswalkEffect;
|
||||||
import mage.abilities.effects.common.continuous.NextSpellCastHasAbilityEffect;
|
import mage.abilities.effects.common.continuous.NextSpellCastHasAbilityEffect;
|
||||||
import mage.abilities.hint.ConditionHint;
|
import mage.abilities.hint.ConditionHint;
|
||||||
|
|
@ -25,11 +24,12 @@ import java.util.UUID;
|
||||||
* @author Skiwkr
|
* @author Skiwkr
|
||||||
*/
|
*/
|
||||||
public final class TARDIS extends CardImpl {
|
public final class TARDIS extends CardImpl {
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.TIME_LORD);
|
|
||||||
|
|
||||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||||
|
new FilterControlledPermanent(SubType.TIME_LORD, "you control a Time Lord")
|
||||||
|
);
|
||||||
|
|
||||||
private static final Hint hint = new ConditionHint(condition, "You control a Time Lord");
|
private static final Hint hint = new ConditionHint(condition);
|
||||||
|
|
||||||
public TARDIS(UUID ownerId, CardSetInfo setInfo) {
|
public TARDIS(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
|
@ -40,19 +40,14 @@ public final class TARDIS extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// Whenever TARDIS attacks, if you control a Time Lord, the next spell you cast this turn has cascade and you may planeswalk.
|
// Whenever TARDIS attacks, if you control a Time Lord, the next spell you cast this turn has cascade and you may planeswalk.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new AttacksTriggeredAbility(
|
||||||
new AttacksTriggeredAbility(new NextSpellCastHasAbilityEffect(new CascadeAbility()), false),
|
new NextSpellCastHasAbilityEffect(new CascadeAbility())
|
||||||
new PermanentsOnTheBattlefieldCondition(filter),
|
).withInterveningIf(condition);
|
||||||
"Whenever {this} attacks, if you control a Time Lord, the next spell you cast this turn has cascade and you may planeswalk.");
|
ability.addEffect(new PlaneswalkEffect(true).concatBy("and"));
|
||||||
|
this.addAbility(ability.addHint(hint));
|
||||||
|
|
||||||
ability.addEffect(new PlaneswalkEffect(true));
|
|
||||||
|
|
||||||
ability.addHint(hint);
|
|
||||||
|
|
||||||
this.addAbility(ability);
|
|
||||||
// Crew 2
|
// Crew 2
|
||||||
this.addAbility(new CrewAbility(2));
|
this.addAbility(new CrewAbility(2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TARDIS(final TARDIS card) {
|
private TARDIS(final TARDIS card) {
|
||||||
|
|
|
||||||
|
|
@ -2,26 +2,22 @@ package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.DelayedTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.condition.common.AttackedThisTurnSourceCondition;
|
import mage.abilities.condition.common.AttackedThisTurnSourceCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.ContinuousEffectImpl;
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.abilities.effects.Effect;
|
|
||||||
import mage.abilities.effects.common.CantBeCounteredControlledEffect;
|
import mage.abilities.effects.common.CantBeCounteredControlledEffect;
|
||||||
import mage.abilities.keyword.ReboundAbility;
|
import mage.abilities.keyword.ReboundAbility;
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterSpell;
|
import mage.filter.FilterSpell;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.players.Player;
|
|
||||||
import mage.target.targetpointer.FixedTarget;
|
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -29,16 +25,14 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class TaigamOjutaiMaster extends CardImpl {
|
public final class TaigamOjutaiMaster extends CardImpl {
|
||||||
|
|
||||||
private static final String effectText = "Whenever you cast an instant or sorcery spell from your hand, if {this} attacked this turn, that spell gains rebound.";
|
private static final FilterSpell filter = new FilterSpell("instant, sorcery, and Dragon spells you control");
|
||||||
private static final FilterSpell filter = new FilterSpell("Instant, sorcery, and Dragon spells you control");
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(
|
filter.add(Predicates.or(
|
||||||
(Predicates.or(
|
|
||||||
CardType.INSTANT.getPredicate(),
|
CardType.INSTANT.getPredicate(),
|
||||||
CardType.SORCERY.getPredicate(),
|
CardType.SORCERY.getPredicate(),
|
||||||
SubType.DRAGON.getPredicate()))
|
SubType.DRAGON.getPredicate()
|
||||||
);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public TaigamOjutaiMaster(UUID ownerId, CardSetInfo setInfo) {
|
public TaigamOjutaiMaster(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
@ -54,10 +48,11 @@ public final class TaigamOjutaiMaster extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(new CantBeCounteredControlledEffect(filter, Duration.WhileOnBattlefield)));
|
this.addAbility(new SimpleStaticAbility(new CantBeCounteredControlledEffect(filter, Duration.WhileOnBattlefield)));
|
||||||
|
|
||||||
// Whenever you cast an instant or sorcery spell from your hand, if Taigam, Ojutai Master attacked this turn, that spell gains rebound.
|
// Whenever you cast an instant or sorcery spell from your hand, if Taigam, Ojutai Master attacked this turn, that spell gains rebound.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(new TaigamOjutaiMasterTriggeredAbility(),
|
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||||
AttackedThisTurnSourceCondition.instance,
|
Zone.BATTLEFIELD, new TaigamOjutaiMasterEffect(),
|
||||||
effectText);
|
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
|
||||||
this.addAbility(ability);
|
false, SetTargetPointer.SPELL, Zone.HAND
|
||||||
|
).withInterveningIf(AttackedThisTurnSourceCondition.instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
private TaigamOjutaiMaster(final TaigamOjutaiMaster card) {
|
private TaigamOjutaiMaster(final TaigamOjutaiMaster card) {
|
||||||
|
|
@ -70,84 +65,33 @@ public final class TaigamOjutaiMaster extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TaigamOjutaiMasterTriggeredAbility extends DelayedTriggeredAbility {
|
class TaigamOjutaiMasterEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
public TaigamOjutaiMasterTriggeredAbility() {
|
TaigamOjutaiMasterEffect() {
|
||||||
super(new TaigamOjutaiMasterGainReboundEffect(), Duration.EndOfTurn, true);
|
|
||||||
setTriggerPhrase("Whenever you cast an instant or sorcery spell from your hand, if {this} attacked this turn, ");
|
|
||||||
}
|
|
||||||
|
|
||||||
private TaigamOjutaiMasterTriggeredAbility(final TaigamOjutaiMasterTriggeredAbility ability) {
|
|
||||||
super(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TaigamOjutaiMasterTriggeredAbility copy() {
|
|
||||||
return new TaigamOjutaiMasterTriggeredAbility(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
|
||||||
return event.getType() == GameEvent.EventType.SPELL_CAST;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
|
||||||
if (event.getPlayerId().equals(this.getControllerId())) {
|
|
||||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
|
||||||
if (spell != null && spell.getFromZone() == Zone.HAND) {
|
|
||||||
if (spell.getCard() != null
|
|
||||||
&& spell.getCard().isInstantOrSorcery(game)) {
|
|
||||||
for (Effect effect : getEffects()) {
|
|
||||||
effect.setTargetPointer(new FixedTarget(spell.getId()));
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class TaigamOjutaiMasterGainReboundEffect extends ContinuousEffectImpl {
|
|
||||||
|
|
||||||
TaigamOjutaiMasterGainReboundEffect() {
|
|
||||||
super(Duration.Custom, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
super(Duration.Custom, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||||
staticText = "that spell gains rebound";
|
staticText = "that spell gains rebound";
|
||||||
}
|
}
|
||||||
|
|
||||||
private TaigamOjutaiMasterGainReboundEffect(final TaigamOjutaiMasterGainReboundEffect effect) {
|
private TaigamOjutaiMasterEffect(final TaigamOjutaiMasterEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TaigamOjutaiMasterGainReboundEffect copy() {
|
public TaigamOjutaiMasterEffect copy() {
|
||||||
return new TaigamOjutaiMasterGainReboundEffect(this);
|
return new TaigamOjutaiMasterEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
|
||||||
if (player != null) {
|
|
||||||
Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source));
|
Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source));
|
||||||
if (spell != null) {
|
if (spell == null) {
|
||||||
Card card = spell.getCard();
|
|
||||||
if (card != null) {
|
|
||||||
addReboundAbility(card, source, game);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
discard();
|
discard();
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Optional.of(spell)
|
||||||
private void addReboundAbility(Card card, Ability source, Game game) {
|
.map(Spell::getCard)
|
||||||
boolean found = card.getAbilities(game).containsClass(ReboundAbility.class);
|
.filter(card -> !card.getAbilities(game).containsClass(ReboundAbility.class))
|
||||||
if (!found) {
|
.ifPresent(card -> game.getState().addOtherAbility(card, new ReboundAbility()));
|
||||||
Ability ability = new ReboundAbility();
|
return true;
|
||||||
game.getState().addOtherAbility(card, ability);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.combat.CantBeBlockedByAllTargetEffect;
|
import mage.abilities.effects.common.combat.CantBeBlockedByAllTargetEffect;
|
||||||
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
||||||
|
|
@ -34,7 +33,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class TatsunariToadRider extends CardImpl {
|
public final class TatsunariToadRider extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("you don't control a creature named Keimi");
|
||||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent();
|
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent();
|
||||||
private static final FilterPermanent filter3 = new FilterControlledPermanent(SubType.FROG);
|
private static final FilterPermanent filter3 = new FilterControlledPermanent(SubType.FROG);
|
||||||
|
|
||||||
|
|
@ -56,14 +55,10 @@ public final class TatsunariToadRider extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Whenever you cast an enchantment spell, if you don't control a creature named Keimi, create Keimi, a legendary 3/3 black and green Frog creature token with "Whenever you cast an enchantment spell, each opponent loses 1 life and you gain 1 life."
|
// Whenever you cast an enchantment spell, if you don't control a creature named Keimi, create Keimi, a legendary 3/3 black and green Frog creature token with "Whenever you cast an enchantment spell, each opponent loses 1 life and you gain 1 life."
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new SpellCastControllerTriggeredAbility(
|
||||||
new SpellCastControllerTriggeredAbility(
|
|
||||||
new CreateTokenEffect(new KeimiToken()),
|
new CreateTokenEffect(new KeimiToken()),
|
||||||
StaticFilters.FILTER_SPELL_AN_ENCHANTMENT, false
|
StaticFilters.FILTER_SPELL_AN_ENCHANTMENT, false
|
||||||
), condition, "Whenever you cast an enchantment spell, if you don't control " +
|
).withInterveningIf(condition));
|
||||||
"a creature named Keimi, create Keimi, a legendary 3/3 black and green Frog creature token with " +
|
|
||||||
"\"Whenever you cast an enchantment spell, each opponent loses 1 life and you gain 1 life.\""
|
|
||||||
));
|
|
||||||
|
|
||||||
// {1}{G/U}: Tatsunari, Toad Rider and target Frog you control can't be blocked this turn except by creatures with flying or reach.
|
// {1}{G/U}: Tatsunari, Toad Rider and target Frog you control can't be blocked this turn except by creatures with flying or reach.
|
||||||
Ability ability = new SimpleActivatedAbility(
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@ package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
import mage.abilities.common.LandfallAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
|
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.hint.common.LandsYouControlHint;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.HasteAbility;
|
import mage.abilities.keyword.HasteAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -16,6 +16,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.permanent.token.custom.CreatureToken;
|
import mage.game.permanent.token.custom.CreatureToken;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
@ -34,7 +35,8 @@ public final class TatyovaStewardOfTides extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||||
StaticFilters.FILTER_LAND, ComparisonType.MORE_THAN, 6, true
|
new FilterControlledLandPermanent("you control seven or more lands"),
|
||||||
|
ComparisonType.MORE_THAN, 6, true
|
||||||
);
|
);
|
||||||
|
|
||||||
public TatyovaStewardOfTides(UUID ownerId, CardSetInfo setInfo) {
|
public TatyovaStewardOfTides(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
@ -52,17 +54,13 @@ public final class TatyovaStewardOfTides extends CardImpl {
|
||||||
)));
|
)));
|
||||||
|
|
||||||
// Whenever a land you control enters, if you control seven or more lands, up to one target land you control becomes a 3/3 Elemental creature with haste. It's still a land.
|
// Whenever a land you control enters, if you control seven or more lands, up to one target land you control becomes a 3/3 Elemental creature with haste. It's still a land.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new LandfallAbility(
|
||||||
new EntersBattlefieldControlledTriggeredAbility(new BecomesCreatureTargetEffect(
|
new BecomesCreatureTargetEffect(new CreatureToken(
|
||||||
new CreatureToken(
|
|
||||||
3, 3, "3/3 Elemental creature with haste", SubType.ELEMENTAL
|
3, 3, "3/3 Elemental creature with haste", SubType.ELEMENTAL
|
||||||
).withAbility(HasteAbility.getInstance()), false, true, Duration.Custom
|
).withAbility(HasteAbility.getInstance()), false, true, Duration.Custom)
|
||||||
), StaticFilters.FILTER_LAND_A), condition, "Whenever a land enters the battlefield " +
|
).withInterveningIf(condition);
|
||||||
"under your control, if you control seven or more lands, up to one target land you control " +
|
|
||||||
"becomes a 3/3 Elemental creature with haste. It's still a land."
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND));
|
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability.setAbilityWord(null).addHint(LandsYouControlHint.instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
private TatyovaStewardOfTides(final TatyovaStewardOfTides card) {
|
private TatyovaStewardOfTides(final TatyovaStewardOfTides card) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
|
import mage.abilities.effects.common.combat.MustBeBlockedByAllTargetEffect;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -33,11 +32,7 @@ public final class TauntingArbormage extends CardImpl {
|
||||||
this.addAbility(new KickerAbility("{3}"));
|
this.addAbility(new KickerAbility("{3}"));
|
||||||
|
|
||||||
// When Taunting Arbormage enters the battlefield, if it was kicked, all creatures able to block target creature this turn do so.
|
// When Taunting Arbormage enters the battlefield, if it was kicked, all creatures able to block target creature this turn do so.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn)).withInterveningIf(KickedCondition.ONCE);
|
||||||
new EntersBattlefieldTriggeredAbility(new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn)),
|
|
||||||
KickedCondition.ONCE, "When {this} enters, if it was kicked, " +
|
|
||||||
"all creatures able to block target creature this turn do so."
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,13 @@ import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -22,9 +20,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class TazeemRoilmage extends CardImpl {
|
public final class TazeemRoilmage extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCard filter
|
|
||||||
= new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard");
|
|
||||||
|
|
||||||
public TazeemRoilmage(UUID ownerId, CardSetInfo setInfo) {
|
public TazeemRoilmage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||||
|
|
||||||
|
|
@ -37,12 +32,8 @@ public final class TazeemRoilmage extends CardImpl {
|
||||||
this.addAbility(new KickerAbility("{4}"));
|
this.addAbility(new KickerAbility("{4}"));
|
||||||
|
|
||||||
// When Tazeem Roilmage enters the battlefield, if it was kicked, return target instant or sorcery card from your graveyard to your hand.
|
// When Tazeem Roilmage enters the battlefield, if it was kicked, return target instant or sorcery card from your graveyard to your hand.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()).withInterveningIf(KickedCondition.ONCE);
|
||||||
new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false),
|
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY_FROM_YOUR_GRAVEYARD));
|
||||||
KickedCondition.ONCE, "When {this} enters, if it was kicked, " +
|
|
||||||
"return target instant or sorcery card from your graveyard to your hand."
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.TapTargetEffect;
|
import mage.abilities.effects.common.TapTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
|
|
@ -13,11 +11,12 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Rafbill
|
* @author Rafbill
|
||||||
*/
|
*/
|
||||||
public final class TempestOwl extends CardImpl {
|
public final class TempestOwl extends CardImpl {
|
||||||
|
|
@ -36,9 +35,9 @@ public final class TempestOwl extends CardImpl {
|
||||||
this.addAbility(new KickerAbility("{4}{U}"));
|
this.addAbility(new KickerAbility("{4}{U}"));
|
||||||
|
|
||||||
// When Tempest Owl enters the battlefield, if it was kicked, tap up to three target permanents.
|
// When Tempest Owl enters the battlefield, if it was kicked, tap up to three target permanents.
|
||||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false);
|
Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect(), false).withInterveningIf(KickedCondition.ONCE);
|
||||||
ability.addTarget(new TargetPermanent(0, 3, new FilterPermanent(), false));
|
ability.addTarget(new TargetPermanent(0, 3, StaticFilters.FILTER_PERMANENTS));
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.ONCE, "When {this} enters, if it was kicked, tap up to three target permanents."));
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TempestOwl(final TempestOwl card) {
|
private TempestOwl(final TempestOwl card) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.BargainedCondition;
|
import mage.abilities.condition.common.BargainedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||||
import mage.abilities.hint.common.BargainCostWasPaidHint;
|
import mage.abilities.hint.common.BargainCostWasPaidHint;
|
||||||
import mage.abilities.keyword.BargainAbility;
|
import mage.abilities.keyword.BargainAbility;
|
||||||
|
|
@ -34,11 +33,7 @@ public final class TenaciousTomeseeker extends CardImpl {
|
||||||
this.addAbility(new BargainAbility());
|
this.addAbility(new BargainAbility());
|
||||||
|
|
||||||
// When Tenacious Tomeseeker enters the battlefield, if it was bargained, return target instant or sorcery card from your graveyard to your hand.
|
// When Tenacious Tomeseeker enters the battlefield, if it was bargained, return target instant or sorcery card from your graveyard to your hand.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect()).withInterveningIf(BargainedCondition.instance);
|
||||||
new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect()),
|
|
||||||
BargainedCondition.instance, "When {this} enters, if it was bargained, " +
|
|
||||||
"return target instant or sorcery card from your graveyard to your hand."
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY_FROM_YOUR_GRAVEYARD));
|
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY_FROM_YOUR_GRAVEYARD));
|
||||||
this.addAbility(ability.addHint(BargainCostWasPaidHint.instance));
|
this.addAbility(ability.addHint(BargainCostWasPaidHint.instance));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,21 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.FightTargetSourceEffect;
|
import mage.abilities.effects.common.FightTargetSourceEffect;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class TerritorialAllosaurus extends CardImpl {
|
public final class TerritorialAllosaurus extends CardImpl {
|
||||||
|
|
@ -34,14 +31,9 @@ public final class TerritorialAllosaurus extends CardImpl {
|
||||||
this.addAbility(new KickerAbility("{2}{G}"));
|
this.addAbility(new KickerAbility("{2}{G}"));
|
||||||
|
|
||||||
// When Territorial Allosaurus enters the battlefield, if it was kicked, it fights another target creature.
|
// When Territorial Allosaurus enters the battlefield, if it was kicked, it fights another target creature.
|
||||||
EntersBattlefieldTriggeredAbility ability
|
Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect()).withInterveningIf(KickedCondition.ONCE);
|
||||||
= new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect());
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
|
||||||
Ability conditionalAbility = new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.ONCE,
|
this.addAbility(ability);
|
||||||
"When {this} enters, if it was kicked, it fights another target creature.");
|
|
||||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
|
||||||
filter.add(AnotherPredicate.instance);
|
|
||||||
conditionalAbility.addTarget(new TargetCreaturePermanent(filter));
|
|
||||||
this.addAbility(conditionalAbility);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TerritorialAllosaurus(final TerritorialAllosaurus card) {
|
private TerritorialAllosaurus(final TerritorialAllosaurus card) {
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,22 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
|
||||||
import mage.abilities.condition.common.FerociousCondition;
|
import mage.abilities.condition.common.FerociousCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect;
|
import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.abilities.hint.common.FerociousHint;
|
import mage.abilities.hint.common.FerociousHint;
|
||||||
import mage.abilities.keyword.DefenderAbility;
|
import mage.abilities.keyword.DefenderAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Xanderhall
|
* @author Xanderhall
|
||||||
*/
|
*/
|
||||||
public final class TerritorialWitchstalker extends CardImpl {
|
public final class TerritorialWitchstalker extends CardImpl {
|
||||||
|
|
@ -34,16 +32,11 @@ public final class TerritorialWitchstalker extends CardImpl {
|
||||||
this.addAbility(DefenderAbility.getInstance());
|
this.addAbility(DefenderAbility.getInstance());
|
||||||
|
|
||||||
// At the beginning of combat on your turn, if you control a creature with power 4 or greater, Territorial Witchstalker gets +1/+0 until end of turn and can attack this turn as though it didn't have defender.
|
// At the beginning of combat on your turn, if you control a creature with power 4 or greater, Territorial Witchstalker gets +1/+0 until end of turn and can attack this turn as though it didn't have defender.
|
||||||
TriggeredAbility ability = new BeginningOfCombatTriggeredAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn));
|
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||||
ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn));
|
new BoostSourceEffect(1, 0, Duration.EndOfTurn)
|
||||||
ability.addHint(FerociousHint.instance);
|
).withInterveningIf(FerociousCondition.instance);
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn, "and"));
|
||||||
ability,
|
this.addAbility(ability.addHint(FerociousHint.instance));
|
||||||
FerociousCondition.instance,
|
|
||||||
"At the beginning of combat on your turn, if you control a creature with power 4 or greater, "
|
|
||||||
+ "{this} gets +1/+0 until end of turn and can attack this turn as though it didn't have defender"
|
|
||||||
));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TerritorialWitchstalker(final TerritorialWitchstalker card) {
|
private TerritorialWitchstalker(final TerritorialWitchstalker card) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import mage.abilities.ActivatedAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.ContinuousEffectImpl;
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.abilities.effects.common.ExileTargetEffect;
|
import mage.abilities.effects.common.ExileTargetEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
|
|
@ -37,11 +36,8 @@ public final class TerritoryForge extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}{R}");
|
||||||
|
|
||||||
// When Territory Forge enters the battlefield, if you cast it, exile target artifact or land.
|
// When Territory Forge enters the battlefield, if you cast it, exile target artifact or land.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect().setToSourceExileZone(true))
|
||||||
new EntersBattlefieldTriggeredAbility(new ExileTargetEffect().setToSourceExileZone(true)),
|
.withInterveningIf(CastFromEverywhereSourceCondition.instance);
|
||||||
CastFromEverywhereSourceCondition.instance,
|
|
||||||
"When {this} enters, if you cast it, exile target artifact or land."
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetPermanent(filter));
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,29 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.TriggeredAbility;
|
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.condition.common.LifeCompareCondition;
|
||||||
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.game.Game;
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class TestOfEndurance extends CardImpl {
|
public final class TestOfEndurance extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new LifeCompareCondition(TargetController.YOU, ComparisonType.OR_GREATER, 50);
|
||||||
|
|
||||||
public TestOfEndurance(UUID ownerId, CardSetInfo setInfo) {
|
public TestOfEndurance(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
|
||||||
|
|
||||||
// At the beginning of your upkeep, if you have 50 or more life, you win the game.
|
// At the beginning of your upkeep, if you have 50 or more life, you win the game.
|
||||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect());
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect()).withInterveningIf(condition));
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new FiftyOrMoreLifeCondition(), "At the beginning of your upkeep, if you have 50 or more life, you win the game."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TestOfEndurance(final TestOfEndurance card) {
|
private TestOfEndurance(final TestOfEndurance card) {
|
||||||
|
|
@ -36,12 +35,3 @@ public final class TestOfEndurance extends CardImpl {
|
||||||
return new TestOfEndurance(this);
|
return new TestOfEndurance(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class FiftyOrMoreLifeCondition implements Condition {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
return game.getPlayer(source.getControllerId()).getLife() >= 50;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,9 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.condition.common.EquippedSourceCondition;
|
import mage.abilities.condition.common.EquippedSourceCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.dynamicvalue.common.GreatestAmongPermanentsValue;
|
import mage.abilities.dynamicvalue.common.GreatestAmongPermanentsValue;
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.common.cost.CastFromHandForFreeEffect;
|
import mage.abilities.effects.common.cost.CastFromHandForFreeEffect;
|
||||||
import mage.abilities.hint.Hint;
|
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
|
@ -40,7 +38,6 @@ public final class TetsuoImperialChampion extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
static final GreatestAmongPermanentsValue xValue = new GreatestAmongPermanentsValue(GreatestAmongPermanentsValue.Quality.ManaValue, filterEquipment);
|
static final GreatestAmongPermanentsValue xValue = new GreatestAmongPermanentsValue(GreatestAmongPermanentsValue.Quality.ManaValue, filterEquipment);
|
||||||
private static final Hint hint = xValue.getHint();
|
|
||||||
private static final FilterCard filter = new FilterInstantOrSorceryCard(
|
private static final FilterCard filter = new FilterInstantOrSorceryCard(
|
||||||
"an instant or sorcery spell from your hand with mana value " +
|
"an instant or sorcery spell from your hand with mana value " +
|
||||||
"less than or equal to the highest mana value among Equipment attached to {this}"
|
"less than or equal to the highest mana value among Equipment attached to {this}"
|
||||||
|
|
@ -61,19 +58,16 @@ public final class TetsuoImperialChampion extends CardImpl {
|
||||||
|
|
||||||
// Whenever Tetsuo, Imperial Champion attacks, if it's equipped, choose one --
|
// Whenever Tetsuo, Imperial Champion attacks, if it's equipped, choose one --
|
||||||
// * Tetsuo deals damage equal to the greatest mana value among Equipment attached to it to any target.
|
// * Tetsuo deals damage equal to the greatest mana value among Equipment attached to it to any target.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new AttacksTriggeredAbility(
|
||||||
new AttacksTriggeredAbility(new DamageTargetEffect(
|
new DamageTargetEffect(xValue, "it")
|
||||||
xValue, "it"
|
.setText("{this} deals damage equal to the greatest mana value " +
|
||||||
).setText("{this} deals damage equal to the greatest mana value " +
|
|
||||||
"among Equipment attached to it to any target")
|
"among Equipment attached to it to any target")
|
||||||
).setTriggerPhrase("Whenever {this} attacks, if it's equipped, "),
|
).setTriggerPhrase("Whenever {this} attacks, if it's equipped, ").withInterveningIf(EquippedSourceCondition.instance);
|
||||||
EquippedSourceCondition.instance, null
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetAnyTarget());
|
ability.addTarget(new TargetAnyTarget());
|
||||||
|
|
||||||
// * You may cast an instant or sorcery spell from your hand with mana value less than or equal to the greatest mana value among Equipment attached to Tetsuo without paying its mana cost.
|
// * You may cast an instant or sorcery spell from your hand with mana value less than or equal to the greatest mana value among Equipment attached to Tetsuo without paying its mana cost.
|
||||||
ability.addMode(new Mode(new CastFromHandForFreeEffect(filter)));
|
ability.addMode(new Mode(new CastFromHandForFreeEffect(filter)));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability.addHint(xValue.getHint()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private TetsuoImperialChampion(final TetsuoImperialChampion card) {
|
private TetsuoImperialChampion(final TetsuoImperialChampion card) {
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,36 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbility;
|
|
||||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||||
|
import mage.abilities.hint.common.LandsYouControlHint;
|
||||||
import mage.abilities.keyword.TransformAbility;
|
import mage.abilities.keyword.TransformAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterLandPermanent;
|
import mage.filter.common.FilterLandPermanent;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class ThaumaticCompass extends CardImpl {
|
public final class ThaumaticCompass extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||||
|
new FilterLandPermanent("you control seven or more lands"),
|
||||||
|
ComparisonType.MORE_THAN, 6, true
|
||||||
|
);
|
||||||
|
|
||||||
public ThaumaticCompass(UUID ownerId, CardSetInfo setInfo) {
|
public ThaumaticCompass(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
this.secondSideCardClazz = mage.cards.s.SpiresOfOrazca.class;
|
this.secondSideCardClazz = mage.cards.s.SpiresOfOrazca.class;
|
||||||
|
|
@ -41,11 +44,8 @@ public final class ThaumaticCompass extends CardImpl {
|
||||||
|
|
||||||
// At the beginning of your end step, if you control seven or more lands, transform Thaumatic Compass.
|
// At the beginning of your end step, if you control seven or more lands, transform Thaumatic Compass.
|
||||||
this.addAbility(new TransformAbility());
|
this.addAbility(new TransformAbility());
|
||||||
TriggeredAbility ability2 = new BeginningOfEndStepTriggeredAbility(new TransformSourceEffect());
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(new TransformSourceEffect())
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
.withInterveningIf(condition).addHint(LandsYouControlHint.instance));
|
||||||
ability2,
|
|
||||||
new PermanentsOnTheBattlefieldCondition(new FilterLandPermanent(), ComparisonType.MORE_THAN, 6, true),
|
|
||||||
"At the beginning of your end step, if you control seven or more lands, transform {this}."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ThaumaticCompass(final ThaumaticCompass card) {
|
private ThaumaticCompass(final ThaumaticCompass card) {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.costs.common.ExileSourceCost;
|
import mage.abilities.costs.common.ExileSourceCost;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.continuous.CantLoseGameSourceControllerEffect;
|
import mage.abilities.effects.common.continuous.CantLoseGameSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
|
@ -33,7 +32,7 @@ import java.util.UUID;
|
||||||
public final class TheBookOfExaltedDeeds extends CardImpl {
|
public final class TheBookOfExaltedDeeds extends CardImpl {
|
||||||
|
|
||||||
private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2);
|
private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2);
|
||||||
private static final Hint hint = new ConditionHint(condition, "You gained 3 or more life this turn");
|
private static final Hint hint = new ConditionHint(condition);
|
||||||
private static final FilterPermanent filter = new FilterPermanent(SubType.ANGEL, "Angel");
|
private static final FilterPermanent filter = new FilterPermanent(SubType.ANGEL, "Angel");
|
||||||
|
|
||||||
public TheBookOfExaltedDeeds(UUID ownerId, CardSetInfo setInfo) {
|
public TheBookOfExaltedDeeds(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
|
@ -42,12 +41,8 @@ public final class TheBookOfExaltedDeeds extends CardImpl {
|
||||||
this.supertype.add(SuperType.LEGENDARY);
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
|
||||||
// At the beginning of your end step, if you gained 3 or more life this turn, create a 3/3 white Angel creature token with flying.
|
// At the beginning of your end step, if you gained 3 or more life this turn, create a 3/3 white Angel creature token with flying.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(new CreateTokenEffect(new Angel33Token()))
|
||||||
new BeginningOfEndStepTriggeredAbility(
|
.withInterveningIf(condition).addHint(hint), new PlayerGainedLifeWatcher());
|
||||||
new CreateTokenEffect(new Angel33Token())
|
|
||||||
), condition, "At the beginning of your end step, "
|
|
||||||
+ "if you gained 3 or more life this turn, create a 3/3 white Angel creature token with flying."
|
|
||||||
).addHint(hint), new PlayerGainedLifeWatcher());
|
|
||||||
|
|
||||||
// {W}{W}{W}, {T}, Exile The Book of Exalted Deeds: Put an enlightened counter on target Angel. It gains "You can't lose the game and your opponents can't win the game." Activate only as a sorcery.
|
// {W}{W}{W}, {T}, Exile The Book of Exalted Deeds: Put an enlightened counter on target Angel. It gains "You can't lose the game and your opponents can't win the game." Activate only as a sorcery.
|
||||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.DescendCondition;
|
import mage.abilities.condition.common.DescendCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
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.keyword.TransformAbility;
|
import mage.abilities.keyword.TransformAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.AbilityWord;
|
import mage.constants.AbilityWord;
|
||||||
|
|
@ -18,7 +17,6 @@ import mage.constants.SuperType;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
public class TheEverflowingWell extends CardImpl {
|
public class TheEverflowingWell extends CardImpl {
|
||||||
|
|
@ -37,11 +35,8 @@ public class TheEverflowingWell extends CardImpl {
|
||||||
|
|
||||||
// Descend 8 -- At the beginning of your upkeep, if there are eight or more permanent cards in your graveyard, transform The Everflowing Well.
|
// Descend 8 -- At the beginning of your upkeep, if there are eight or more permanent cards in your graveyard, transform The Everflowing Well.
|
||||||
this.addAbility(new TransformAbility());
|
this.addAbility(new TransformAbility());
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect())
|
||||||
new TransformSourceEffect()),
|
.withInterveningIf(DescendCondition.EIGHT).setAbilityWord(AbilityWord.DESCEND_8).addHint(DescendCondition.getHint()));
|
||||||
DescendCondition.EIGHT, "At the beginning of your upkeep, if there are eight or more permanent cards in your graveyard, transform {this}.");
|
|
||||||
ability.setAbilityWord(AbilityWord.DESCEND_8).addHint(DescendCondition.getHint());
|
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TheEverflowingWell(final TheEverflowingWell card) {
|
private TheEverflowingWell(final TheEverflowingWell card) {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
|
@ -15,6 +13,7 @@ import mage.abilities.effects.common.continuous.GainAbilityControllerEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
import mage.abilities.keyword.ProtectionFromEverythingAbility;
|
import mage.abilities.keyword.ProtectionFromEverythingAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
|
@ -40,17 +39,12 @@ public final class TheOneRing extends CardImpl {
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(IndestructibleAbility.getInstance());
|
||||||
|
|
||||||
// When The One Ring enters the battlefield, if you cast it, you gain protection from everything until your next turn.
|
// When The One Ring enters the battlefield, if you cast it, you gain protection from everything until your next turn.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||||
new EntersBattlefieldTriggeredAbility(new GainAbilityControllerEffect(
|
new GainAbilityControllerEffect(new ProtectionFromEverythingAbility(), Duration.UntilYourNextTurn)
|
||||||
new ProtectionFromEverythingAbility(), Duration.UntilYourNextTurn
|
).withInterveningIf(CastFromEverywhereSourceCondition.instance));
|
||||||
)), CastFromEverywhereSourceCondition.instance, "When {this} enters, " +
|
|
||||||
"if you cast it, you gain protection from everything until your next turn."
|
|
||||||
));
|
|
||||||
|
|
||||||
// At the beginning of your upkeep, you lose 1 life for each burden counter on The One Ring.
|
// At the beginning of your upkeep, you lose 1 life for each burden counter on The One Ring.
|
||||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(xValue)));
|
||||||
new LoseLifeSourceControllerEffect(xValue)
|
|
||||||
));
|
|
||||||
|
|
||||||
// {T}: Put a burden counter on The One Ring, then draw a card for each burden counter on The One Ring.
|
// {T}: Put a burden counter on The One Ring, then draw a card for each burden counter on The One Ring.
|
||||||
Ability ability = new SimpleActivatedAbility(
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
|
||||||
import mage.abilities.common.LeavesBattlefieldAllTriggeredAbility;
|
import mage.abilities.common.LeavesBattlefieldAllTriggeredAbility;
|
||||||
import mage.abilities.condition.common.SourceHasCountersCondition;
|
import mage.abilities.condition.common.SourceHasCountersCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
|
@ -36,12 +35,9 @@ public final class TheOzolith extends CardImpl {
|
||||||
this.addAbility(new TheOzolithTriggeredAbility());
|
this.addAbility(new TheOzolithTriggeredAbility());
|
||||||
|
|
||||||
// At the beginning of combat on your turn, if The Ozolith has counters on it, you may move all counters from The Ozolith onto target creature.
|
// At the beginning of combat on your turn, if The Ozolith has counters on it, you may move all counters from The Ozolith onto target creature.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||||
new BeginningOfCombatTriggeredAbility(
|
|
||||||
new TheOzolithMoveCountersEffect(), true
|
new TheOzolithMoveCountersEffect(), true
|
||||||
), SourceHasCountersCondition.instance, "At the beginning of combat on your turn, " +
|
).withInterveningIf(SourceHasCountersCondition.instance);
|
||||||
"if {this} has counters on it, you may move all counters from {this} onto target creature."
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
@ -126,6 +122,7 @@ class TheOzolithMoveCountersEffect extends OneShotEffect {
|
||||||
|
|
||||||
TheOzolithMoveCountersEffect() {
|
TheOzolithMoveCountersEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
|
staticText = "you may move all counters from {this} onto target creature";
|
||||||
}
|
}
|
||||||
|
|
||||||
private TheOzolithMoveCountersEffect(final TheOzolithMoveCountersEffect effect) {
|
private TheOzolithMoveCountersEffect(final TheOzolithMoveCountersEffect effect) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package mage.cards.t;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect;
|
import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -30,13 +29,11 @@ public final class ThicketElemental extends CardImpl {
|
||||||
this.addAbility(new KickerAbility("{1}{G}"));
|
this.addAbility(new KickerAbility("{1}{G}"));
|
||||||
|
|
||||||
// When Thicket Elemental enters the battlefield, if it was kicked, you may reveal cards from the top of your library until you reveal a creature card. If you do, put that card onto the battlefield and shuffle all other cards revealed this way into your library.
|
// When Thicket Elemental enters the battlefield, if it was kicked, you may reveal cards from the top of your library until you reveal a creature card. If you do, put that card onto the battlefield and shuffle all other cards revealed this way into your library.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new RevealCardsFromLibraryUntilEffect(
|
||||||
new EntersBattlefieldTriggeredAbility(new RevealCardsFromLibraryUntilEffect(
|
|
||||||
StaticFilters.FILTER_CARD_CREATURE, PutCards.BATTLEFIELD, PutCards.SHUFFLE
|
StaticFilters.FILTER_CARD_CREATURE, PutCards.BATTLEFIELD, PutCards.SHUFFLE
|
||||||
)), KickedCondition.ONCE, "When {this} enters, if it was kicked, " +
|
).setText("reveal cards from the top of your library until you reveal a creature card. If you do, " +
|
||||||
"you may reveal cards from the top of your library until you reveal a creature card. If you do, " +
|
"put that card onto the battlefield and shuffle all other cards revealed this way into your library"), true
|
||||||
"put that card onto the battlefield and shuffle all other cards revealed this way into your library."
|
).withInterveningIf(KickedCondition.ONCE));
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ThicketElemental(final ThicketElemental card) {
|
private ThicketElemental(final ThicketElemental card) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
|
@ -44,12 +43,8 @@ public final class ThievingSkydiver extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// When Thieving Skydiver enters the battlefield, if it was kicked, gain control of target artifact with converted mana cost X or less. If that artifact is an Equipment, attach it to Thieving Skydiver.
|
// When Thieving Skydiver enters the battlefield, if it was kicked, gain control of target artifact with converted mana cost X or less. If that artifact is an Equipment, attach it to Thieving Skydiver.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.Custom)
|
||||||
new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.Custom), false),
|
.setText("gain control of target artifact with mana value X or less")).withInterveningIf(KickedCondition.ONCE);
|
||||||
KickedCondition.ONCE, "When {this} enters, if it was kicked, " +
|
|
||||||
"gain control of target artifact with mana value X or less. " +
|
|
||||||
"If that artifact is an Equipment, attach it to {this}."
|
|
||||||
);
|
|
||||||
ability.addEffect(new ThievingSkydiverEffect());
|
ability.addEffect(new ThievingSkydiverEffect());
|
||||||
ability.addTarget(new TargetArtifactPermanent());
|
ability.addTarget(new TargetArtifactPermanent());
|
||||||
ability.setTargetAdjuster(new XManaValueTargetAdjuster(ComparisonType.OR_LESS));
|
ability.setTargetAdjuster(new XManaValueTargetAdjuster(ComparisonType.OR_LESS));
|
||||||
|
|
@ -70,6 +65,7 @@ class ThievingSkydiverEffect extends OneShotEffect {
|
||||||
|
|
||||||
ThievingSkydiverEffect() {
|
ThievingSkydiverEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
|
staticText = "If that artifact is an Equipment, attach it to {this}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private ThievingSkydiverEffect(final ThievingSkydiverEffect effect) {
|
private ThievingSkydiverEffect(final ThievingSkydiverEffect effect) {
|
||||||
|
|
@ -84,11 +80,8 @@ class ThievingSkydiverEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||||
Permanent artifact = game.getPermanent(source.getFirstTarget());
|
Permanent artifact = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
if (permanent == null
|
if (permanent == null || artifact == null || !artifact.hasSubtype(SubType.EQUIPMENT, game)) {
|
||||||
|| artifact == null
|
|
||||||
|| !artifact.isArtifact(game)
|
|
||||||
|| !artifact.hasSubtype(SubType.EQUIPMENT, game)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
game.processAction();
|
game.processAction();
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,18 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageObjectReference;
|
import mage.MageObjectReference;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbility;
|
|
||||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.CompoundCondition;
|
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.InvertCondition;
|
|
||||||
import mage.abilities.condition.common.AttachedCondition;
|
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.SacrificeEquippedEffect;
|
import mage.abilities.effects.common.SacrificeEquippedEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||||
import mage.abilities.keyword.EquipAbility;
|
import mage.abilities.keyword.EquipAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.DamagedEvent;
|
import mage.game.events.DamagedEvent;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
|
@ -25,10 +20,9 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Quercitron
|
* @author Quercitron
|
||||||
|
|
@ -43,17 +37,12 @@ public final class ThirstingAxe extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(4, 0)));
|
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(4, 0)));
|
||||||
|
|
||||||
// At the beginning of your end step, if equipped creature didn't deal combat damage to a creature this turn, sacrifice it.
|
// At the beginning of your end step, if equipped creature didn't deal combat damage to a creature this turn, sacrifice it.
|
||||||
TriggeredAbility ability = new BeginningOfEndStepTriggeredAbility(new SacrificeEquippedEffect());
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
Condition condition = new CompoundCondition(
|
new SacrificeEquippedEffect().setText("sacrifice it")
|
||||||
AttachedCondition.instance,
|
).withInterveningIf(ThirstingAxeCondition.instance), new ThirstingAxeWatcher());
|
||||||
new InvertCondition(new EquippedDealtCombatDamageToCreatureCondition()));
|
|
||||||
String triggeredAbilityText = "At the beginning of your end step, if equipped creature " +
|
|
||||||
"didn't deal combat damage to a creature this turn, sacrifice it.";
|
|
||||||
ConditionalInterveningIfTriggeredAbility sacrificeTriggeredAbility = new ConditionalInterveningIfTriggeredAbility(ability, condition, triggeredAbilityText);
|
|
||||||
this.addAbility(sacrificeTriggeredAbility, new CombatDamageToCreatureWatcher());
|
|
||||||
|
|
||||||
// Equip {2}
|
// Equip {2}
|
||||||
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2), new TargetControlledCreaturePermanent(), false));
|
this.addAbility(new EquipAbility(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
private ThirstingAxe(final ThirstingAxe card) {
|
private ThirstingAxe(final ThirstingAxe card) {
|
||||||
|
|
@ -66,43 +55,42 @@ public final class ThirstingAxe extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class EquippedDealtCombatDamageToCreatureCondition implements Condition {
|
enum ThirstingAxeCondition implements Condition {
|
||||||
|
instance;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent equipment = game.getPermanent(source.getSourceId());
|
return Optional
|
||||||
if (equipment != null && equipment.getAttachedTo() != null) {
|
.ofNullable(source.getSourcePermanentOrLKI(game))
|
||||||
CombatDamageToCreatureWatcher watcher =
|
.map(Permanent::getAttachedTo)
|
||||||
game.getState().getWatcher(CombatDamageToCreatureWatcher.class);
|
.filter(uuid -> ThirstingAxeWatcher.checkCreature(uuid, game))
|
||||||
return watcher != null && watcher.dealtDamage(equipment.getAttachedTo(), equipment.getAttachedToZoneChangeCounter(), game);
|
.isPresent();
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "equipped creature didn't deal combat damage to a creature this turn";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CombatDamageToCreatureWatcher extends Watcher {
|
class ThirstingAxeWatcher extends Watcher {
|
||||||
|
|
||||||
// which objects dealt combat damage to creature during the turn
|
// which objects dealt combat damage to creature during the turn
|
||||||
private final Set<MageObjectReference> dealtCombatDamageToCreature;
|
private final Set<MageObjectReference> dealtCombatDamageToCreature = new HashSet<>();
|
||||||
|
|
||||||
public CombatDamageToCreatureWatcher() {
|
public ThirstingAxeWatcher() {
|
||||||
super(WatcherScope.GAME);
|
super(WatcherScope.GAME);
|
||||||
dealtCombatDamageToCreature = new HashSet<>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void watch(GameEvent event, Game game) {
|
public void watch(GameEvent event, Game game) {
|
||||||
if (event.getType() != GameEvent.EventType.DAMAGED_PERMANENT
|
if (event.getType() != GameEvent.EventType.DAMAGED_PERMANENT || !((DamagedEvent) event).isCombatDamage()) {
|
||||||
|| !((DamagedEvent) event).isCombatDamage()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||||
if (permanent == null || !permanent.isCreature(game)) {
|
if (permanent != null && permanent.isCreature(game)) {
|
||||||
return;
|
dealtCombatDamageToCreature.add(new MageObjectReference(event.getSourceId(), game));
|
||||||
}
|
}
|
||||||
MageObjectReference damageSource = new MageObjectReference(event.getSourceId(), game);
|
|
||||||
dealtCombatDamageToCreature.add(damageSource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -111,9 +99,12 @@ class CombatDamageToCreatureWatcher extends Watcher {
|
||||||
dealtCombatDamageToCreature.clear();
|
dealtCombatDamageToCreature.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean dealtDamage(UUID objectId, int zoneChangeCounter, Game game) {
|
static boolean checkCreature(UUID permanentId, Game game) {
|
||||||
MageObjectReference reference = new MageObjectReference(objectId, zoneChangeCounter, game);
|
return game
|
||||||
return dealtCombatDamageToCreature.contains(reference);
|
.getState()
|
||||||
|
.getWatcher(ThirstingAxeWatcher.class)
|
||||||
|
.dealtCombatDamageToCreature
|
||||||
|
.stream()
|
||||||
|
.anyMatch(mor -> mor.refersTo(permanentId, game));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,12 @@ package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
|
@ -25,7 +24,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class ThopterAssembly extends CardImpl {
|
public final class ThopterAssembly extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent(SubType.THOPTER, "");
|
private static final FilterPermanent filter = new FilterPermanent(SubType.THOPTER, "you control no Thopters other than {this}");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(AnotherPredicate.instance);
|
filter.add(AnotherPredicate.instance);
|
||||||
|
|
@ -44,15 +43,8 @@ public final class ThopterAssembly extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// At the beginning of your upkeep, if you control no Thopters other than Thopter Assembly, return Thopter Assembly to its owner's hand and create five 1/1 colorless Thopter artifact creature tokens with flying.
|
// At the beginning of your upkeep, if you control no Thopters other than Thopter Assembly, return Thopter Assembly to its owner's hand and create five 1/1 colorless Thopter artifact creature tokens with flying.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true)).withInterveningIf(condition);
|
||||||
new BeginningOfUpkeepTriggeredAbility(
|
ability.addEffect(new CreateTokenEffect(new ThopterColorlessToken(), 5).concatBy("and"));
|
||||||
new ReturnToHandSourceEffect(true), false
|
|
||||||
), condition, "At the beginning of your upkeep, " +
|
|
||||||
"if you control no Thopters other than {this}, " +
|
|
||||||
"return {this} to its owner's hand and create five 1/1 colorless " +
|
|
||||||
"Thopter artifact creature tokens with flying."
|
|
||||||
);
|
|
||||||
ability.addEffect(new CreateTokenEffect(new ThopterColorlessToken(), 5));
|
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.KickedCostCondition;
|
import mage.abilities.condition.common.KickedCostCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
|
|
@ -14,15 +12,19 @@ import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.target.common.TargetArtifactPermanent;
|
|
||||||
import mage.target.common.TargetAnyTarget;
|
import mage.target.common.TargetAnyTarget;
|
||||||
|
import mage.target.common.TargetArtifactPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author FenrisulfrX
|
* @author FenrisulfrX
|
||||||
*/
|
*/
|
||||||
public final class ThornscapeBattlemage extends CardImpl {
|
public final class ThornscapeBattlemage extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new KickedCostCondition("{R}");
|
||||||
|
private static final Condition condition2 = new KickedCostCondition("{W}");
|
||||||
|
|
||||||
public ThornscapeBattlemage(UUID ownerId, CardSetInfo setInfo) {
|
public ThornscapeBattlemage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||||
this.subtype.add(SubType.ELF);
|
this.subtype.add(SubType.ELF);
|
||||||
|
|
@ -36,16 +38,16 @@ public final class ThornscapeBattlemage extends CardImpl {
|
||||||
this.addAbility(kickerAbility);
|
this.addAbility(kickerAbility);
|
||||||
|
|
||||||
// When {this} enters, if it was kicked with its {R} kicker, it deals 2 damage to any target.
|
// When {this} enters, if it was kicked with its {R} kicker, it deals 2 damage to any target.
|
||||||
TriggeredAbility ability1 = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it"));
|
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||||
ability1.addTarget(new TargetAnyTarget());
|
new DamageTargetEffect(2, "it")
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability1, new KickedCostCondition("{R}"),
|
).withInterveningIf(condition);
|
||||||
"When {this} enters, if it was kicked with its {R} kicker, it deals 2 damage to any target."));
|
ability.addTarget(new TargetAnyTarget());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
// When {this} enters, if it was kicked with its {W} kicker, destroy target artifact.
|
// When {this} enters, if it was kicked with its {W} kicker, destroy target artifact.
|
||||||
TriggeredAbility ability2 = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
|
ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()).withInterveningIf(condition2);
|
||||||
ability2.addTarget(new TargetArtifactPermanent());
|
ability.addTarget(new TargetArtifactPermanent());
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability2, new KickedCostCondition("{W}"),
|
this.addAbility(ability);
|
||||||
"When {this} enters, if it was kicked with its {W} kicker, destroy target artifact."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ThornscapeBattlemage(final ThornscapeBattlemage card) {
|
private ThornscapeBattlemage(final ThornscapeBattlemage card) {
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,28 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author awjackson
|
* @author awjackson
|
||||||
*/
|
*/
|
||||||
public final class ThoughtboundPrimoc extends CardImpl {
|
public final class ThoughtboundPrimoc extends CardImpl {
|
||||||
|
|
@ -37,12 +39,8 @@ public final class ThoughtboundPrimoc extends CardImpl {
|
||||||
|
|
||||||
// At the beginning of your upkeep, if a player controls more Wizards than each other player,
|
// At the beginning of your upkeep, if a player controls more Wizards than each other player,
|
||||||
// the player who controls the most Wizards gains control of Thoughtbound Primoc.
|
// the player who controls the most Wizards gains control of Thoughtbound Primoc.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ThoughtboundPrimocEffect())
|
||||||
new BeginningOfUpkeepTriggeredAbility(new ThoughtboundPrimocEffect()),
|
.withInterveningIf(OnePlayerHasTheMostWizards.instance));
|
||||||
OnePlayerHasTheMostWizards.instance,
|
|
||||||
"At the beginning of your upkeep, if a player controls more Wizards than each other player, the player who controls the most Wizards gains control of {this}"
|
|
||||||
));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ThoughtboundPrimoc(final ThoughtboundPrimoc card) {
|
private ThoughtboundPrimoc(final ThoughtboundPrimoc card) {
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,38 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.common.OnEventTriggeredAbility;
|
|
||||||
import mage.abilities.condition.common.CreatureCountCondition;
|
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||||
import mage.abilities.mana.AnyColorManaAbility;
|
import mage.abilities.mana.AnyColorManaAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.game.events.GameEvent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class ThranQuarry extends CardImpl {
|
public final class ThranQuarry extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||||
|
new FilterControlledCreaturePermanent("you control no creatures"), ComparisonType.EQUAL_TO, 0
|
||||||
|
);
|
||||||
|
|
||||||
public ThranQuarry(UUID ownerId, CardSetInfo setInfo) {
|
public ThranQuarry(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||||
|
|
||||||
// At the beginning of the end step, if you control no creatures, sacrifice Thran Quarry.
|
// At the beginning of the end step, if you control no creatures, sacrifice Thran Quarry.
|
||||||
TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect());
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.YOU),
|
TargetController.NEXT, new SacrificeSourceEffect(), false, condition
|
||||||
"At the beginning of the end step, if you control no creatures, sacrifice {this}."));
|
));
|
||||||
|
|
||||||
// {tap}: Add one mana of any color.
|
// {tap}: Add one mana of any color.
|
||||||
this.addAbility(new AnyColorManaAbility());
|
this.addAbility(new AnyColorManaAbility());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ThranQuarry(final ThranQuarry card) {
|
private ThranQuarry(final ThranQuarry card) {
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,32 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.TriggeredAbility;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.CardsInHandCondition;
|
import mage.abilities.condition.common.CardsInHandCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.target.common.TargetOpponentOrPlaneswalker;
|
import mage.target.common.TargetOpponentOrPlaneswalker;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class Thumbscrews extends CardImpl {
|
public final class Thumbscrews extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new CardsInHandCondition(ComparisonType.MORE_THAN, 4);
|
||||||
|
|
||||||
public Thumbscrews(UUID ownerId, CardSetInfo setInfo) {
|
public Thumbscrews(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||||
|
|
||||||
// At the beginning of your upkeep, if you have five or more cards in hand, Thumbscrews deals 1 damage to target opponent.
|
// At the beginning of your upkeep, if you have five or more cards in hand, Thumbscrews deals 1 damage to target opponent.
|
||||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(
|
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(1)).withInterveningIf(condition);
|
||||||
new DamageTargetEffect(1));
|
|
||||||
ability.addTarget(new TargetOpponentOrPlaneswalker());
|
ability.addTarget(new TargetOpponentOrPlaneswalker());
|
||||||
CardsInHandCondition condition = new CardsInHandCondition(ComparisonType.MORE_THAN, 4);
|
this.addAbility(ability);
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
|
||||||
ability, condition,
|
|
||||||
"At the beginning of your upkeep, if you have five or more cards in hand, "
|
|
||||||
+ "{this} deals 1 damage to target opponent or planeswalker."
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Thumbscrews(final Thumbscrews card) {
|
private Thumbscrews(final Thumbscrews card) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
@ -32,12 +31,14 @@ public final class ThunderBrute extends CardImpl {
|
||||||
|
|
||||||
// Trample
|
// Trample
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
// Tribute 3</i>
|
|
||||||
|
// Tribute 3
|
||||||
this.addAbility(new TributeAbility(3));
|
this.addAbility(new TributeAbility(3));
|
||||||
|
|
||||||
// When Thunder Brute enters the battlefield, if tribute wasn't paid, it gains haste until end of turn.
|
// When Thunder Brute enters the battlefield, if tribute wasn't paid, it gains haste until end of turn.
|
||||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn), false);
|
this.addAbility( new EntersBattlefieldTriggeredAbility(new GainAbilitySourceEffect(
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TributeNotPaidCondition.instance,
|
HasteAbility.getInstance(), Duration.EndOfTurn
|
||||||
"When {this} enters, if tribute wasn't paid, it gains haste until end of turn."));
|
).setText("it gains haste until end of turn")).withInterveningIf(TributeNotPaidCondition.instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
private ThunderBrute(final ThunderBrute card) {
|
private ThunderBrute(final ThunderBrute card) {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.KickedCostCondition;
|
import mage.abilities.condition.common.KickedCostCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
|
|
@ -17,12 +15,16 @@ import mage.constants.SubType;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
import mage.target.common.TargetEnchantmentPermanent;
|
import mage.target.common.TargetEnchantmentPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author FenrisulfrX
|
* @author FenrisulfrX
|
||||||
*/
|
*/
|
||||||
public final class ThunderscapeBattlemage extends CardImpl {
|
public final class ThunderscapeBattlemage extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new KickedCostCondition("{1}{B}");
|
||||||
|
private static final Condition condition2 = new KickedCostCondition("{G}");
|
||||||
|
|
||||||
public ThunderscapeBattlemage(UUID ownerId, CardSetInfo setInfo) {
|
public ThunderscapeBattlemage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
|
@ -36,16 +38,14 @@ public final class ThunderscapeBattlemage extends CardImpl {
|
||||||
this.addAbility(kickerAbility);
|
this.addAbility(kickerAbility);
|
||||||
|
|
||||||
// When {this} enters, if it was kicked with its {1}{B} kicker, target player discards two cards.
|
// When {this} enters, if it was kicked with its {1}{B} kicker, target player discards two cards.
|
||||||
TriggeredAbility ability1 = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(2));
|
Ability ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(2)).withInterveningIf(condition);
|
||||||
ability1.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer());
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability1, new KickedCostCondition("{1}{B}"),
|
this.addAbility(ability);
|
||||||
"When {this} enters, if it was kicked with its {1}{B} kicker, target player discards two cards."));
|
|
||||||
|
|
||||||
// When {this} enters, if it was kicked with its {G} kicker, destroy target enchantment.
|
// When {this} enters, if it was kicked with its {G} kicker, destroy target enchantment.
|
||||||
TriggeredAbility ability2 = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
|
ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()).withInterveningIf(condition2);
|
||||||
ability2.addTarget(new TargetEnchantmentPermanent());
|
ability.addTarget(new TargetEnchantmentPermanent());
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability2, new KickedCostCondition("{G}"),
|
this.addAbility(ability);
|
||||||
"When {this} enters, if it was kicked with its {G} kicker, destroy target enchantment."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ThunderscapeBattlemage(final ThunderscapeBattlemage card) {
|
private ThunderscapeBattlemage(final ThunderscapeBattlemage card) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package mage.cards.t;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -45,13 +44,9 @@ public final class Tiamat extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// When Tiamat enters the battlefield, if you cast it, search your library for up to five Dragon cards named Tiama that each have different names, reveal them, put them into your hand, then shuffle.
|
// When Tiamat enters the battlefield, if you cast it, search your library for up to five Dragon cards named Tiama that each have different names, reveal them, put them into your hand, then shuffle.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(
|
||||||
new SearchLibraryPutInHandEffect(
|
|
||||||
new TargetCardWithDifferentNameInLibrary(0, 5, filter), true
|
new TargetCardWithDifferentNameInLibrary(0, 5, filter), true
|
||||||
)), CastFromEverywhereSourceCondition.instance, "When {this} enters, " +
|
)).withInterveningIf(CastFromEverywhereSourceCondition.instance));
|
||||||
"if you cast it, search your library for up to five Dragon cards not named Tiamat " +
|
|
||||||
"that each have different names, reveal them, put them into your hand, then shuffle."
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tiamat(final Tiamat card) {
|
private Tiamat(final Tiamat card) {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect;
|
import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.abilities.hint.ConditionHint;
|
import mage.abilities.hint.ConditionHint;
|
||||||
|
|
@ -16,7 +15,10 @@ import mage.abilities.hint.Hint;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetLandPermanent;
|
import mage.target.common.TargetLandPermanent;
|
||||||
|
|
@ -50,11 +52,7 @@ public final class TideShaper extends CardImpl {
|
||||||
this.addAbility(new KickerAbility("{1}"));
|
this.addAbility(new KickerAbility("{1}"));
|
||||||
|
|
||||||
// When Tide Shaper enters the battlefield, if it was kicked, target land becomes an Island for as long as Tide Shaper remains on the battlefield.
|
// When Tide Shaper enters the battlefield, if it was kicked, target land becomes an Island for as long as Tide Shaper remains on the battlefield.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(new TideShaperEffect()).withInterveningIf(KickedCondition.ONCE);
|
||||||
new EntersBattlefieldTriggeredAbility(new TideShaperEffect()),
|
|
||||||
KickedCondition.ONCE, "When {this} enters, if it was kicked, " +
|
|
||||||
"target land becomes an Island for as long as {this} remains on the battlefield."
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetLandPermanent());
|
ability.addTarget(new TargetLandPermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
|
@ -79,6 +77,7 @@ class TideShaperEffect extends BecomesBasicLandTargetEffect {
|
||||||
|
|
||||||
TideShaperEffect() {
|
TideShaperEffect() {
|
||||||
super(Duration.Custom, false, true, SubType.ISLAND);
|
super(Duration.Custom, false, true, SubType.ISLAND);
|
||||||
|
staticText = "target land becomes an Island for as long as {this} remains on the battlefield";
|
||||||
}
|
}
|
||||||
|
|
||||||
private TideShaperEffect(final TideShaperEffect effect) {
|
private TideShaperEffect(final TideShaperEffect effect) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.ThresholdCondition;
|
import mage.abilities.condition.common.ThresholdCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.keyword.MenaceAbility;
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -33,11 +32,7 @@ public final class TidecallerMentor extends CardImpl {
|
||||||
this.addAbility(new MenaceAbility(false));
|
this.addAbility(new MenaceAbility(false));
|
||||||
|
|
||||||
// Threshold -- When Tidecaller Mentor enters, if seven or more cards are in your graveyard, return up to one target nonland permanent to its owner's hand.
|
// Threshold -- When Tidecaller Mentor enters, if seven or more cards are in your graveyard, return up to one target nonland permanent to its owner's hand.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()).withInterveningIf(ThresholdCondition.instance);
|
||||||
new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect()),
|
|
||||||
ThresholdCondition.instance, "When {this} enters, if seven or more cards " +
|
|
||||||
"are in your graveyard, return up to one target nonland permanent to its owner's hand."
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetNonlandPermanent(0, 1));
|
ability.addTarget(new TargetNonlandPermanent(0, 1));
|
||||||
this.addAbility(ability.setAbilityWord(AbilityWord.THRESHOLD));
|
this.addAbility(ability.setAbilityWord(AbilityWord.THRESHOLD));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,27 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.filter.common.FilterControlledPermanent;
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class TilonallisKnight extends CardImpl {
|
public final class TilonallisKnight extends CardImpl {
|
||||||
|
|
||||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||||
|
new FilterControlledPermanent(SubType.DINOSAUR, "you control a Dinosaur")
|
||||||
static {
|
);
|
||||||
filter.add(SubType.DINOSAUR.getPredicate());
|
|
||||||
}
|
|
||||||
|
|
||||||
public TilonallisKnight(UUID ownerId, CardSetInfo setInfo) {
|
public TilonallisKnight(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||||
|
|
@ -36,12 +32,7 @@ public final class TilonallisKnight extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Whenever Tilonalli's Knight attacks, if you control a Dinosaur, Tilonalli's Knight gets +1/+1 until end of turn.
|
// Whenever Tilonalli's Knight attacks, if you control a Dinosaur, Tilonalli's Knight gets +1/+1 until end of turn.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn)).withInterveningIf(condition));
|
||||||
new AttacksTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false),
|
|
||||||
new PermanentsOnTheBattlefieldCondition(filter),
|
|
||||||
"Whenever {this} attacks, if you control a Dinosaur, {this} gets +1/+1 until end of turn."
|
|
||||||
);
|
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TilonallisKnight(final TilonallisKnight card) {
|
private TilonallisKnight(final TilonallisKnight card) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.RaidCondition;
|
import mage.abilities.condition.common.RaidCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||||
import mage.abilities.hint.common.RaidHint;
|
import mage.abilities.hint.common.RaidHint;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -40,13 +39,9 @@ public final class TimelyHordemate extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// <i>Raid</i> — When Timely Hordemate enters the battlefield, if you attacked this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
|
// <i>Raid</i> — When Timely Hordemate enters the battlefield, if you attacked this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()), RaidCondition.instance,
|
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()).withInterveningIf(RaidCondition.instance);
|
||||||
"When {this} enters, if you attacked this turn, return target creature card with mana value 2 or less from your graveyard to the battlefield.");
|
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||||
ability.setAbilityWord(AbilityWord.RAID);
|
this.addAbility(ability.setAbilityWord(AbilityWord.RAID).addHint(RaidHint.instance), new PlayerAttackedWatcher());
|
||||||
ability.addHint(RaidHint.instance);
|
|
||||||
this.addAbility(ability, new PlayerAttackedWatcher());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TimelyHordemate(final TimelyHordemate card) {
|
private TimelyHordemate(final TimelyHordemate card) {
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,19 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.ManaWasSpentCondition;
|
import mage.abilities.condition.common.ManaWasSpentCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.ColoredManaSymbol;
|
|
||||||
import mage.target.common.TargetArtifactPermanent;
|
import mage.target.common.TargetArtifactPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public final class TinStreetHooligan extends CardImpl {
|
public final class TinStreetHooligan extends CardImpl {
|
||||||
|
|
@ -30,10 +27,7 @@ public final class TinStreetHooligan extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.
|
// When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()).withInterveningIf(ManaWasSpentCondition.GREEN);
|
||||||
new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()),
|
|
||||||
ManaWasSpentCondition.GREEN,
|
|
||||||
"When {this} enters, if {G} was spent to cast it, destroy target artifact.");
|
|
||||||
ability.addTarget(new TargetArtifactPermanent());
|
ability.addTarget(new TargetArtifactPermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,13 @@ package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||||
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
|
@ -37,14 +36,11 @@ public final class TinybonesTrinketThief extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// At the beginning of each end step, if an opponent discarded a card this turn, you draw a card and you lose 1 life.
|
// At the beginning of each end step, if an opponent discarded a card this turn, you draw a card and you lose 1 life.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new BeginningOfEndStepTriggeredAbility(
|
||||||
new BeginningOfEndStepTriggeredAbility(
|
TargetController.EACH_PLAYER, new DrawCardSourceControllerEffect(1, true),
|
||||||
TargetController.EACH_PLAYER, new DrawCardSourceControllerEffect(1),
|
false, TinybonesTrinketThiefCondition.instance
|
||||||
false
|
|
||||||
), TinybonesTrinketThiefCondition.instance, "At the beginning of each end step, " +
|
|
||||||
"if an opponent discarded a card this turn, you draw a card and you lose 1 life."
|
|
||||||
);
|
);
|
||||||
ability.addEffect(new LoseLifeSourceControllerEffect(1));
|
ability.addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and"));
|
||||||
this.addAbility(ability, new TinybonesTrinketThiefWatcher());
|
this.addAbility(ability, new TinybonesTrinketThiefWatcher());
|
||||||
|
|
||||||
// {4}{B}{B}: Each opponent with no cards in hand loses 10 life.
|
// {4}{B}{B}: Each opponent with no cards in hand loses 10 life.
|
||||||
|
|
@ -69,6 +65,11 @@ enum TinybonesTrinketThiefCondition implements Condition {
|
||||||
TinybonesTrinketThiefWatcher watcher = game.getState().getWatcher(TinybonesTrinketThiefWatcher.class);
|
TinybonesTrinketThiefWatcher watcher = game.getState().getWatcher(TinybonesTrinketThiefWatcher.class);
|
||||||
return watcher != null && watcher.checkPlayer(source.getControllerId());
|
return watcher != null && watcher.checkPlayer(source.getControllerId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "an opponent discarded a card this turn";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TinybonesTrinketThiefWatcher extends Watcher {
|
class TinybonesTrinketThiefWatcher extends Watcher {
|
||||||
|
|
|
||||||
|
|
@ -2,25 +2,22 @@ package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.InvertCondition;
|
import mage.abilities.condition.InvertCondition;
|
||||||
import mage.abilities.condition.common.MorbidCondition;
|
import mage.abilities.condition.common.MorbidCondition;
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.hint.common.MorbidHint;
|
import mage.abilities.hint.common.MorbidHint;
|
||||||
|
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
@ -29,7 +26,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class TitanHunter extends CardImpl {
|
public final class TitanHunter extends CardImpl {
|
||||||
|
|
||||||
private static final Condition condition = new InvertCondition(MorbidCondition.instance);
|
private static final Condition condition = new InvertCondition(MorbidCondition.instance, "no creatures died this turn");
|
||||||
|
|
||||||
public TitanHunter(UUID ownerId, CardSetInfo setInfo) {
|
public TitanHunter(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
|
||||||
|
|
@ -40,11 +37,10 @@ public final class TitanHunter extends CardImpl {
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
// At the beginning of each player's end step, if no creatures died this turn, Titan Hunter deals 4 damage to that player.
|
// At the beginning of each player's end step, if no creatures died this turn, Titan Hunter deals 4 damage to that player.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
new BeginningOfEndStepTriggeredAbility(
|
TargetController.EACH_PLAYER,
|
||||||
TargetController.EACH_PLAYER, new TitanHunterEffect(), false
|
new DamageTargetEffect(4, true, "that player"),
|
||||||
), condition, "At the beginning of each player's end step, " +
|
false, condition
|
||||||
"if no creatures died this turn, {this} deals 4 damage to that player."
|
|
||||||
).addHint(MorbidHint.instance));
|
).addHint(MorbidHint.instance));
|
||||||
|
|
||||||
// {1}{B}, Sacrifice a creature: You gain 4 life.
|
// {1}{B}, Sacrifice a creature: You gain 4 life.
|
||||||
|
|
@ -62,27 +58,3 @@ public final class TitanHunter extends CardImpl {
|
||||||
return new TitanHunter(this);
|
return new TitanHunter(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TitanHunterEffect extends OneShotEffect {
|
|
||||||
|
|
||||||
TitanHunterEffect() {
|
|
||||||
super(Outcome.Benefit);
|
|
||||||
}
|
|
||||||
|
|
||||||
private TitanHunterEffect(final TitanHunterEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TitanHunterEffect copy() {
|
|
||||||
return new TitanHunterEffect(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
return game.damagePlayerOrPermanent(
|
|
||||||
game.getActivePlayerId(), 4, source.getSourceId(),
|
|
||||||
source, game, false, true
|
|
||||||
) > 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -2,19 +2,21 @@ package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.condition.CompoundCondition;
|
import mage.abilities.condition.CompoundCondition;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
||||||
import mage.abilities.condition.common.MeldCondition;
|
import mage.abilities.condition.common.MeldCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.MeldEffect;
|
import mage.abilities.effects.common.MeldEffect;
|
||||||
import mage.abilities.keyword.ReachAbility;
|
import mage.abilities.keyword.ReachAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
|
@ -28,6 +30,8 @@ import java.util.UUID;
|
||||||
public final class TitaniaVoiceOfGaea extends CardImpl {
|
public final class TitaniaVoiceOfGaea extends CardImpl {
|
||||||
|
|
||||||
private static final Condition condition = new CompoundCondition(
|
private static final Condition condition = new CompoundCondition(
|
||||||
|
"there are four or more land cards in your graveyard and you " +
|
||||||
|
"both own and control {this} and a land named Argoth, Sanctum of Nature",
|
||||||
new CardsInControllerGraveyardCondition(4, StaticFilters.FILTER_CARD_LAND),
|
new CardsInControllerGraveyardCondition(4, StaticFilters.FILTER_CARD_LAND),
|
||||||
new MeldCondition("Argoth, Sanctum of Nature", CardType.LAND)
|
new MeldCondition("Argoth, Sanctum of Nature", CardType.LAND)
|
||||||
);
|
);
|
||||||
|
|
@ -50,13 +54,9 @@ public final class TitaniaVoiceOfGaea extends CardImpl {
|
||||||
this.addAbility(new TitaniaVoiceOfGaeaTriggeredAbility());
|
this.addAbility(new TitaniaVoiceOfGaeaTriggeredAbility());
|
||||||
|
|
||||||
// At the beginning of your upkeep, if there are four or more land cards in your graveyard and you both own and control Titania, Voice of Gaea and a land named Argoth, Sanctum of Nature, exile them, then meld them into Titania, Gaea Incarnate.
|
// At the beginning of your upkeep, if there are four or more land cards in your graveyard and you both own and control Titania, Voice of Gaea and a land named Argoth, Sanctum of Nature, exile them, then meld them into Titania, Gaea Incarnate.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new MeldEffect(
|
||||||
new BeginningOfUpkeepTriggeredAbility(new MeldEffect(
|
|
||||||
"Argoth, Sanctum of Nature", "Titania, Gaea Incarnate"
|
"Argoth, Sanctum of Nature", "Titania, Gaea Incarnate"
|
||||||
)), condition, "At the beginning of your upkeep, " +
|
)).withInterveningIf(condition));
|
||||||
"if there are four or more land cards in your graveyard and you both own and control {this} " +
|
|
||||||
"and a land named Argoth, Sanctum of Nature, exile them, then meld them into Titania, Gaea Incarnate."
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TitaniaVoiceOfGaea(final TitaniaVoiceOfGaea card) {
|
private TitaniaVoiceOfGaea(final TitaniaVoiceOfGaea card) {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
|
|
@ -16,10 +13,10 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.target.common.TargetEnchantmentPermanent;
|
import mage.target.common.TargetEnchantmentPermanent;
|
||||||
|
|
||||||
/**
|
import java.util.UUID;
|
||||||
*
|
|
||||||
* @author LoneFox
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author LoneFox
|
||||||
*/
|
*/
|
||||||
public final class TolarianEmissary extends CardImpl {
|
public final class TolarianEmissary extends CardImpl {
|
||||||
|
|
||||||
|
|
@ -32,13 +29,14 @@ public final class TolarianEmissary extends CardImpl {
|
||||||
|
|
||||||
// Kicker {1}{W}
|
// Kicker {1}{W}
|
||||||
this.addAbility(new KickerAbility("{1}{W}"));
|
this.addAbility(new KickerAbility("{1}{W}"));
|
||||||
|
|
||||||
// Flying
|
// Flying
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// When Tolarian Emissary enters the battlefield, if it was kicked, destroy target enchantment.
|
// When Tolarian Emissary enters the battlefield, if it was kicked, destroy target enchantment.
|
||||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
|
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()).withInterveningIf(KickedCondition.ONCE);
|
||||||
ability.addTarget(new TargetEnchantmentPermanent());
|
ability.addTarget(new TargetEnchantmentPermanent());
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.ONCE,
|
this.addAbility(ability);
|
||||||
"When {this} enters, if it was kicked, destroy target enchantment."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TolarianEmissary(final TolarianEmissary card) {
|
private TolarianEmissary(final TolarianEmissary card) {
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,17 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObjectReference;
|
import mage.MageObjectReference;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AttacksAllTriggeredAbility;
|
import mage.abilities.common.AttacksAllTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.RequirementEffect;
|
import mage.abilities.effects.RequirementEffect;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.SetTargetPointer;
|
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.abilities.keyword.LifelinkAbility;
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.*;
|
||||||
import mage.constants.TargetController;
|
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
|
@ -26,8 +19,9 @@ import mage.game.permanent.token.TolsimirMidnightsLightToken;
|
||||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||||
import mage.watchers.common.AttackedOrBlockedThisCombatWatcher;
|
import mage.watchers.common.AttackedOrBlockedThisCombatWatcher;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author DominionSpy
|
* @author DominionSpy
|
||||||
*/
|
*/
|
||||||
public final class TolsimirMidnightsLight extends CardImpl {
|
public final class TolsimirMidnightsLight extends CardImpl {
|
||||||
|
|
@ -54,10 +48,10 @@ public final class TolsimirMidnightsLight extends CardImpl {
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TolsimirMidnightsLightToken())));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new TolsimirMidnightsLightToken())));
|
||||||
|
|
||||||
// Whenever a Wolf you control attacks, if Tolsimir attacked this combat, target creature an opponent controls blocks that Wolf this combat if able.
|
// Whenever a Wolf you control attacks, if Tolsimir attacked this combat, target creature an opponent controls blocks that Wolf this combat if able.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new AttacksAllTriggeredAbility(
|
||||||
new AttacksAllTriggeredAbility(new TolsimirMidnightsLightEffect(), false, filter, SetTargetPointer.PERMANENT, false),
|
new TolsimirMidnightsLightEffect(), false, filter,
|
||||||
TolsimirMidnightsLightCondition.instance,
|
SetTargetPointer.PERMANENT, false
|
||||||
"Whenever a Wolf you control attacks, if {this} attacked this combat, target creature an opponent controls blocks that Wolf this combat if able.");
|
).withInterveningIf(TolsimirMidnightsLightCondition.instance);
|
||||||
ability.addTarget(new TargetOpponentsCreaturePermanent());
|
ability.addTarget(new TargetOpponentsCreaturePermanent());
|
||||||
this.addAbility(ability, new AttackedOrBlockedThisCombatWatcher());
|
this.addAbility(ability, new AttackedOrBlockedThisCombatWatcher());
|
||||||
}
|
}
|
||||||
|
|
@ -92,12 +86,18 @@ enum TolsimirMidnightsLightCondition implements Condition {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "{this} attacked this combat";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TolsimirMidnightsLightEffect extends RequirementEffect {
|
class TolsimirMidnightsLightEffect extends RequirementEffect {
|
||||||
|
|
||||||
TolsimirMidnightsLightEffect() {
|
TolsimirMidnightsLightEffect() {
|
||||||
super(Duration.EndOfCombat);
|
super(Duration.EndOfCombat);
|
||||||
|
staticText = "target creature an opponent controls blocks that Wolf this combat if able";
|
||||||
}
|
}
|
||||||
|
|
||||||
private TolsimirMidnightsLightEffect(final TolsimirMidnightsLightEffect effect) {
|
private TolsimirMidnightsLightEffect(final TolsimirMidnightsLightEffect effect) {
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,39 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.LockedInCondition;
|
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.effects.common.AddContinuousEffectToGame;
|
||||||
import mage.abilities.effects.Effect;
|
|
||||||
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.ArtifactYouControlHint;
|
||||||
import mage.abilities.keyword.FirstStrikeAbility;
|
import mage.abilities.keyword.FirstStrikeAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class ToolcraftExemplar extends CardImpl {
|
public final class ToolcraftExemplar extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||||
|
new FilterControlledArtifactPermanent("you control an artifact")
|
||||||
|
);
|
||||||
|
private static final Condition condition2 = new PermanentsOnTheBattlefieldCondition(
|
||||||
|
StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT, ComparisonType.MORE_THAN, 2
|
||||||
|
);
|
||||||
|
|
||||||
public ToolcraftExemplar(UUID ownerId, CardSetInfo setInfo) {
|
public ToolcraftExemplar(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
|
||||||
this.subtype.add(SubType.DWARF);
|
this.subtype.add(SubType.DWARF);
|
||||||
|
|
@ -36,16 +43,13 @@ public final class ToolcraftExemplar extends CardImpl {
|
||||||
|
|
||||||
// At the beginning of combat on your turn, if you control an artifact, Toolcraft Exemplar gets +2/+1 until end of turn.
|
// At the beginning of combat on your turn, if you control an artifact, Toolcraft Exemplar gets +2/+1 until end of turn.
|
||||||
// If you control at least 3 artifacts, it also gains first strike until end of turn.
|
// If you control at least 3 artifacts, it also gains first strike until end of turn.
|
||||||
Effect effect = new ConditionalContinuousEffect(
|
Ability ability = new BeginningOfCombatTriggeredAbility(new BoostSourceEffect(
|
||||||
new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn),
|
2, 1, Duration.EndOfTurn
|
||||||
new LockedInCondition(new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent(), ComparisonType.MORE_THAN, 2)), null);
|
)).withInterveningIf(condition);
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
ability.addEffect(new ConditionalOneShotEffect(new AddContinuousEffectToGame(
|
||||||
new BeginningOfCombatTriggeredAbility(new BoostSourceEffect(2, 1, Duration.EndOfTurn)),
|
new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)
|
||||||
new PermanentsOnTheBattlefieldCondition(new FilterControlledArtifactPermanent()),
|
), condition2, "If you control at least 3 artifacts, it also gains first strike until end of turn"));
|
||||||
"At the beginning of combat on your turn, if you control an artifact, {this} gets +2/+1 until end of turn."
|
this.addAbility(ability.addHint(ArtifactYouControlHint.instance));
|
||||||
+ " If you control at least 3 artifacts, it also gains first strike until end of turn.");
|
|
||||||
ability.addEffect(effect);
|
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ToolcraftExemplar(final ToolcraftExemplar card) {
|
private ToolcraftExemplar(final ToolcraftExemplar card) {
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,34 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
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.dynamicvalue.common.CardTypesInGraveyardCount;
|
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.*;
|
||||||
import mage.constants.SubType;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
import mage.target.TargetPermanent;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
import mage.players.Player;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class ToothCollector extends CardImpl {
|
public final class ToothCollector extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterCreaturePermanent("creature that player controls");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(TargetController.ACTIVE.getControllerPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
public ToothCollector(UUID ownerId, CardSetInfo setInfo) {
|
public ToothCollector(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
|
@ -43,13 +43,11 @@ public final class ToothCollector extends CardImpl {
|
||||||
|
|
||||||
// {<i>Delirium</i> — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard,
|
// {<i>Delirium</i> — 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 = new ConditionalInterveningIfTriggeredAbility(
|
ability = new BeginningOfUpkeepTriggeredAbility(
|
||||||
new ToothCollectorAbility(),
|
TargetController.OPPONENT, new BoostTargetEffect(-1, -1), false
|
||||||
DeliriumCondition.instance,
|
).withInterveningIf(DeliriumCondition.instance);
|
||||||
"<i>Delirium</i> — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
+ "target creature that player controls gets -1/-1 until end of turn.");
|
this.addAbility(ability.setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardCount.YOU.getHint()));
|
||||||
ability.addHint(CardTypesInGraveyardCount.YOU.getHint());
|
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ToothCollector(final ToothCollector card) {
|
private ToothCollector(final ToothCollector card) {
|
||||||
|
|
@ -61,45 +59,3 @@ public final class ToothCollector extends CardImpl {
|
||||||
return new ToothCollector(this);
|
return new ToothCollector(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ToothCollectorAbility extends TriggeredAbilityImpl {
|
|
||||||
|
|
||||||
public ToothCollectorAbility() {
|
|
||||||
super(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn));
|
|
||||||
}
|
|
||||||
|
|
||||||
private ToothCollectorAbility(final ToothCollectorAbility ability) {
|
|
||||||
super(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ToothCollectorAbility copy() {
|
|
||||||
return new ToothCollectorAbility(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
|
||||||
return event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
|
||||||
if (game.getOpponents(controllerId).contains(event.getPlayerId())) {
|
|
||||||
Player opponent = game.getPlayer(event.getPlayerId());
|
|
||||||
if (opponent != null) {
|
|
||||||
FilterCreaturePermanent FILTER = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls");
|
|
||||||
FILTER.add(new ControllerIdPredicate(opponent.getId()));
|
|
||||||
this.getTargets().clear();
|
|
||||||
this.addTarget(new TargetCreaturePermanent(FILTER));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "<i>Delirium</i> — 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.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,38 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
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.dynamicvalue.common.CardTypesInGraveyardCount;
|
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||||
import mage.abilities.effects.common.TapTargetEffect;
|
import mage.abilities.effects.common.TapTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.AbilityWord;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
import mage.target.TargetPermanent;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
import mage.players.Player;
|
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class Topplegeist extends CardImpl {
|
public final class Topplegeist extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterCreaturePermanent("creature that player controls");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(TargetController.ACTIVE.getControllerPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
public Topplegeist(UUID ownerId, CardSetInfo setInfo) {
|
public Topplegeist(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
|
||||||
this.subtype.add(SubType.SPIRIT);
|
this.subtype.add(SubType.SPIRIT);
|
||||||
|
|
@ -45,13 +49,10 @@ public final class Topplegeist extends CardImpl {
|
||||||
|
|
||||||
// <i>Delirium</i> — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard,
|
// <i>Delirium</i> — 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 = new ConditionalInterveningIfTriggeredAbility(
|
ability = new BeginningOfUpkeepTriggeredAbility(TargetController.OPPONENT, new TapTargetEffect(), false)
|
||||||
new TopplegeistAbility(),
|
.withInterveningIf(DeliriumCondition.instance);
|
||||||
DeliriumCondition.instance,
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
"<i>Delirium</i> — At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, "
|
this.addAbility(ability.setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardCount.YOU.getHint()));
|
||||||
+ "tap target creature that player controls.");
|
|
||||||
ability.addHint(CardTypesInGraveyardCount.YOU.getHint());
|
|
||||||
this.addAbility(ability);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Topplegeist(final Topplegeist card) {
|
private Topplegeist(final Topplegeist card) {
|
||||||
|
|
@ -63,44 +64,3 @@ public final class Topplegeist extends CardImpl {
|
||||||
return new Topplegeist(this);
|
return new Topplegeist(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TopplegeistAbility extends TriggeredAbilityImpl {
|
|
||||||
|
|
||||||
public TopplegeistAbility() {
|
|
||||||
super(Zone.BATTLEFIELD, new TapTargetEffect());
|
|
||||||
}
|
|
||||||
|
|
||||||
private TopplegeistAbility(final TopplegeistAbility ability) {
|
|
||||||
super(ability);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TopplegeistAbility copy() {
|
|
||||||
return new TopplegeistAbility(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
|
||||||
return event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
|
||||||
if (game.getOpponents(controllerId).contains(event.getPlayerId())) {
|
|
||||||
Player opponent = game.getPlayer(event.getPlayerId());
|
|
||||||
if (opponent != null) {
|
|
||||||
FilterCreaturePermanent FILTER = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls");
|
|
||||||
FILTER.add(new ControllerIdPredicate(opponent.getId()));
|
|
||||||
this.getTargets().clear();
|
|
||||||
this.addTarget(new TargetCreaturePermanent(FILTER));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getRule() {
|
|
||||||
return "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.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -14,8 +12,9 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author North
|
* @author North
|
||||||
*/
|
*/
|
||||||
public final class TorchSlinger extends CardImpl {
|
public final class TorchSlinger extends CardImpl {
|
||||||
|
|
@ -31,11 +30,10 @@ public final class TorchSlinger extends CardImpl {
|
||||||
// Kicker {1}{R} (You may pay an additional {1}{R} as you cast this spell.)
|
// Kicker {1}{R} (You may pay an additional {1}{R} as you cast this spell.)
|
||||||
this.addAbility(new KickerAbility("{1}{R}"));
|
this.addAbility(new KickerAbility("{1}{R}"));
|
||||||
|
|
||||||
|
|
||||||
// When Torch Slinger enters the battlefield, if it was kicked, it deals 2 damage to target creature.
|
// When Torch Slinger enters the battlefield, if it was kicked, it deals 2 damage to target creature.
|
||||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), false);
|
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2, "it")).withInterveningIf(KickedCondition.ONCE);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.ONCE, "When {this} enters, if it was kicked, it deals 2 damage to target creature."));
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TorchSlinger(final TorchSlinger card) {
|
private TorchSlinger(final TorchSlinger card) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DiscardsACardOpponentTriggeredAbility;
|
import mage.abilities.common.DiscardsACardOpponentTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
|
|
@ -47,11 +46,7 @@ public final class TourachDreadCantor extends CardImpl {
|
||||||
));
|
));
|
||||||
|
|
||||||
// When Tourach enters the battelfield, if it was kicked, target opponent discards two cards at random.
|
// When Tourach enters the battelfield, if it was kicked, target opponent discards two cards at random.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(2, true)).withInterveningIf(KickedCondition.ONCE);
|
||||||
new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(2, true)),
|
|
||||||
KickedCondition.ONCE, "When {this} enters, if it was kicked, " +
|
|
||||||
"target opponent discards two cards at random."
|
|
||||||
);
|
|
||||||
ability.addTarget(new TargetOpponent());
|
ability.addTarget(new TargetOpponent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,16 @@ package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility;
|
import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.hint.Hint;
|
import mage.abilities.hint.Hint;
|
||||||
import mage.abilities.hint.ValueHint;
|
import mage.abilities.hint.ValueHint;
|
||||||
import mage.abilities.keyword.DayboundAbility;
|
import mage.abilities.keyword.DayboundAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
|
@ -31,7 +30,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class TovolarDireOverlord extends CardImpl {
|
public final class TovolarDireOverlord extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterControlledPermanent("a Wolf or Werewolf you control");
|
private static final FilterPermanent filter = new FilterControlledPermanent("you control three or more Wolves and/or Werewolves");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(Predicates.or(
|
filter.add(Predicates.or(
|
||||||
|
|
@ -57,15 +56,10 @@ public final class TovolarDireOverlord extends CardImpl {
|
||||||
this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(
|
this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(
|
||||||
new DrawCardSourceControllerEffect(1), filter,
|
new DrawCardSourceControllerEffect(1), filter,
|
||||||
false, SetTargetPointer.NONE, true
|
false, SetTargetPointer.NONE, true
|
||||||
));
|
).setTriggerPhrase("Whenever a Wolf or Werewolf you control deals combat damage to a player, "));
|
||||||
|
|
||||||
// At the beginning of your upkeep, if you control three or more Wolves and/or Werewolves, it becomes night. Then transform any number of Human Werewolves you control.
|
// At the beginning of your upkeep, if you control three or more Wolves and/or Werewolves, it becomes night. Then transform any number of Human Werewolves you control.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TovolarDireOverlordEffect()).withInterveningIf(condition).addHint(hint));
|
||||||
new BeginningOfUpkeepTriggeredAbility(
|
|
||||||
new TovolarDireOverlordEffect(), false
|
|
||||||
), condition, "At the beginning of your upkeep, if you control three or more Wolves " +
|
|
||||||
"and/or Werewolves, it becomes night. Then transform any number of Human Werewolves you control."
|
|
||||||
));
|
|
||||||
|
|
||||||
// Daybound
|
// Daybound
|
||||||
this.addAbility(new DayboundAbility());
|
this.addAbility(new DayboundAbility());
|
||||||
|
|
@ -92,6 +86,7 @@ class TovolarDireOverlordEffect extends OneShotEffect {
|
||||||
|
|
||||||
TovolarDireOverlordEffect() {
|
TovolarDireOverlordEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
|
staticText = "it becomes night. Then transform any number of Human Werewolves you control";
|
||||||
}
|
}
|
||||||
|
|
||||||
private TovolarDireOverlordEffect(final TovolarDireOverlordEffect effect) {
|
private TovolarDireOverlordEffect(final TovolarDireOverlordEffect effect) {
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,21 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.CardsInHandCondition;
|
import mage.abilities.condition.common.CardsInHandCondition;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
|
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.ComparisonType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
@ -39,12 +41,7 @@ public final class Triskaidekaphile extends CardImpl {
|
||||||
)));
|
)));
|
||||||
|
|
||||||
// At the beginning of your upkeep, if you have exactly thirteen cards in your hand, you win the game.
|
// At the beginning of your upkeep, if you have exactly thirteen cards in your hand, you win the game.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect()).withInterveningIf(condition));
|
||||||
new BeginningOfUpkeepTriggeredAbility(
|
|
||||||
new WinGameSourceControllerEffect(), false
|
|
||||||
), condition, "At the beginning of your upkeep, " +
|
|
||||||
"if you have exactly thirteen cards in your hand, you win the game."
|
|
||||||
));
|
|
||||||
|
|
||||||
// {3}{U}: Draw a card.
|
// {3}{U}: Draw a card.
|
||||||
this.addAbility(new SimpleActivatedAbility(
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.BargainedCondition;
|
import mage.abilities.condition.common.BargainedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.ExileTargetEffect;
|
import mage.abilities.effects.common.ExileTargetEffect;
|
||||||
import mage.abilities.keyword.BargainAbility;
|
import mage.abilities.keyword.BargainAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -44,13 +43,10 @@ public final class TroublemakerOuphe extends CardImpl {
|
||||||
this.addAbility(new BargainAbility());
|
this.addAbility(new BargainAbility());
|
||||||
|
|
||||||
// When Troublemaker Ouphe enters the battlefield, if it was bargained, exile target artifact or enchantment an opponent controls.
|
// When Troublemaker Ouphe enters the battlefield, if it was bargained, exile target artifact or enchantment an opponent controls.
|
||||||
TriggeredAbility trigger = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect());
|
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect())
|
||||||
trigger.addTarget(new TargetPermanent(filter));
|
.withInterveningIf(BargainedCondition.instance);
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
trigger,
|
this.addAbility(ability);
|
||||||
BargainedCondition.instance,
|
|
||||||
"When {this} enters, if it was bargained, exile target artifact or enchantment an opponent controls."
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TroublemakerOuphe(final TroublemakerOuphe card) {
|
private TroublemakerOuphe(final TroublemakerOuphe card) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||||
import mage.abilities.keyword.ReachAbility;
|
import mage.abilities.keyword.ReachAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -15,8 +14,8 @@ import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
|
||||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
@ -25,7 +24,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class TurretOgre extends CardImpl {
|
public final class TurretOgre extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("you control another creature with power 4 or greater");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(AnotherPredicate.instance);
|
filter.add(AnotherPredicate.instance);
|
||||||
|
|
@ -46,13 +45,7 @@ public final class TurretOgre extends CardImpl {
|
||||||
this.addAbility(ReachAbility.getInstance());
|
this.addAbility(ReachAbility.getInstance());
|
||||||
|
|
||||||
// When Turret Ogre enters the battlefield, if you control another creature with power 4 or greater, Turret Ogre deals 2 damage to each opponent.
|
// When Turret Ogre enters the battlefield, if you control another creature with power 4 or greater, Turret Ogre deals 2 damage to each opponent.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new DamagePlayersEffect(2, TargetController.OPPONENT)).withInterveningIf(condition));
|
||||||
new EntersBattlefieldTriggeredAbility(
|
|
||||||
new DamagePlayersEffect(2, TargetController.OPPONENT)
|
|
||||||
), condition, "When {this} enters, " +
|
|
||||||
"if you control another creature with power 4 or greater, " +
|
|
||||||
"{this} deals 2 damage to each opponent."
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TurretOgre(final TurretOgre card) {
|
private TurretOgre(final TurretOgre card) {
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,21 @@ package mage.cards.t;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.condition.common.CitysBlessingCondition;
|
import mage.abilities.condition.common.CitysBlessingCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||||
import mage.abilities.hint.common.CitysBlessingHint;
|
import mage.abilities.hint.common.CitysBlessingHint;
|
||||||
import mage.abilities.keyword.AscendAbility;
|
import mage.abilities.keyword.AscendAbility;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.cards.CardsImpl;
|
import mage.cards.CardsImpl;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
|
|
@ -42,12 +44,8 @@ public final class TwilightProphet extends CardImpl {
|
||||||
|
|
||||||
// At the beginning of your upkeep, if you have the city's blessing, reveal the top card of your library and put it into your hand.
|
// At the beginning of your upkeep, if you have the city's blessing, reveal the top card of your library and put it into your hand.
|
||||||
// Each opponent loses X life and you gain X life, where X is that card's converted mana cost.
|
// Each opponent loses X life and you gain X life, where X is that card's converted mana cost.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TwilightProphetEffect())
|
||||||
new TwilightProphetEffect()), CitysBlessingCondition.instance,
|
.withInterveningIf(CitysBlessingCondition.instance).addHint(CitysBlessingHint.instance));
|
||||||
"At the beginning of your upkeep, if you have the city's blessing, reveal the top card of your library and put it into your hand. "
|
|
||||||
+ "Each opponent loses X life and you gain X life, where X is that card's mana value.")
|
|
||||||
.addHint(CitysBlessingHint.instance));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TwilightProphet(final TwilightProphet card) {
|
private TwilightProphet(final TwilightProphet card) {
|
||||||
|
|
@ -64,7 +62,7 @@ class TwilightProphetEffect extends OneShotEffect {
|
||||||
|
|
||||||
TwilightProphetEffect() {
|
TwilightProphetEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "if you have the city's blessing, reveal the top card of your library and put it into your hand. "
|
this.staticText = "reveal the top card of your library and put it into your hand. "
|
||||||
+ "Each opponent loses X life and you gain X life, where X is that card's mana value.";
|
+ "Each opponent loses X life and you gain X life, where X is that card's mana value.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
import mage.abilities.effects.common.TransformSourceEffect;
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
import mage.abilities.effects.keyword.ExploreTargetEffect;
|
import mage.abilities.effects.keyword.ExploreTargetEffect;
|
||||||
|
|
@ -17,6 +17,7 @@ import mage.constants.ComparisonType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterControlledLandPermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.ExploreEvent;
|
import mage.game.events.ExploreEvent;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
|
@ -29,6 +30,11 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class TwistsAndTurns extends CardImpl {
|
public final class TwistsAndTurns extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||||
|
new FilterControlledLandPermanent("you control seven or more lands"),
|
||||||
|
ComparisonType.MORE_THAN, 6, true
|
||||||
|
);
|
||||||
|
|
||||||
public TwistsAndTurns(UUID ownerId, CardSetInfo setInfo) {
|
public TwistsAndTurns(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
|
||||||
this.secondSideCardClazz = mage.cards.m.MycoidMaze.class;
|
this.secondSideCardClazz = mage.cards.m.MycoidMaze.class;
|
||||||
|
|
@ -43,12 +49,9 @@ public final class TwistsAndTurns extends CardImpl {
|
||||||
|
|
||||||
// When a land you control enters, if you control seven or more lands, transform Twists and Turns.
|
// When a land you control enters, if you control seven or more lands, transform Twists and Turns.
|
||||||
this.addAbility(new TransformAbility());
|
this.addAbility(new TransformAbility());
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
|
||||||
new EntersBattlefieldControlledTriggeredAbility(new TransformSourceEffect(), StaticFilters.FILTER_LAND),
|
new TransformSourceEffect(), StaticFilters.FILTER_LAND
|
||||||
new PermanentsOnTheBattlefieldCondition(StaticFilters.FILTER_LANDS, ComparisonType.MORE_THAN, 6, true),
|
).withInterveningIf(condition));
|
||||||
"When a land you control enters, if you control seven or more lands, transform {this}."
|
|
||||||
));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TwistsAndTurns(final TwistsAndTurns card) {
|
private TwistsAndTurns(final TwistsAndTurns card) {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
|
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.SurgedCondition;
|
import mage.abilities.condition.common.SurgedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.SurgeAbility;
|
import mage.abilities.keyword.SurgeAbility;
|
||||||
|
|
@ -15,8 +13,9 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.target.common.TargetAnyTarget;
|
import mage.target.common.TargetAnyTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author fireshoes
|
* @author fireshoes
|
||||||
*/
|
*/
|
||||||
public final class TyrantOfValakut extends CardImpl {
|
public final class TyrantOfValakut extends CardImpl {
|
||||||
|
|
@ -34,10 +33,10 @@ public final class TyrantOfValakut extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// When Tyrant of Valakut enters the battlefield, if its surge cost was paid, it deals 3 damage to any target.
|
// When Tyrant of Valakut enters the battlefield, if its surge cost was paid, it deals 3 damage to any target.
|
||||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3), false);
|
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(3))
|
||||||
|
.withInterveningIf(SurgedCondition.instance);
|
||||||
ability.addTarget(new TargetAnyTarget());
|
ability.addTarget(new TargetAnyTarget());
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, SurgedCondition.instance,
|
this.addAbility(ability);
|
||||||
"When {this} enters, if its surge cost was paid, it deals 3 damage to any target."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private TyrantOfValakut(final TyrantOfValakut card) {
|
private TyrantOfValakut(final TyrantOfValakut card) {
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
|
|
||||||
package mage.cards.u;
|
package mage.cards.u;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.MorbidCondition;
|
import mage.abilities.condition.common.MorbidCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
import mage.abilities.hint.common.MorbidHint;
|
import mage.abilities.hint.common.MorbidHint;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -14,12 +11,12 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.constants.AbilityWord;
|
import mage.constants.AbilityWord;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public final class UlvenwaldBear extends CardImpl {
|
public final class UlvenwaldBear extends CardImpl {
|
||||||
|
|
@ -32,8 +29,9 @@ public final class UlvenwaldBear extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// <i>Morbid</i> — When Ulvenwald Bear enters the battlefield, if a creature died this turn, put two +1/+1 counters on target creature.
|
// <i>Morbid</i> — When Ulvenwald Bear enters the battlefield, if a creature died this turn, put two +1/+1 counters on target creature.
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2), Outcome.BoostCreature)),
|
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||||
MorbidCondition.instance, "When {this} enters, if a creature died this turn, put two +1/+1 counters on target creature.");
|
new AddCountersTargetEffect(CounterType.P1P1.createInstance(2))
|
||||||
|
).withInterveningIf(MorbidCondition.instance);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability.addHint(MorbidHint.instance).setAbilityWord(AbilityWord.MORBID));
|
this.addAbility(ability.addHint(MorbidHint.instance).setAbilityWord(AbilityWord.MORBID));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
|
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.TakeTheInitiativeEffect;
|
import mage.abilities.effects.common.TakeTheInitiativeEffect;
|
||||||
import mage.abilities.hint.common.InitiativeHint;
|
import mage.abilities.hint.common.InitiativeHint;
|
||||||
|
|
@ -25,15 +24,14 @@ public final class UndercellarSweep extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}");
|
||||||
|
|
||||||
// When Undercellar Sweep enters the battlefield, you take the initiative.
|
// When Undercellar Sweep enters the battlefield, you take the initiative.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new TakeTheInitiativeEffect()).addHint(InitiativeHint.instance));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new TakeTheInitiativeEffect())
|
||||||
|
.addHint(InitiativeHint.instance));
|
||||||
|
|
||||||
// Whenever you attack, if you or a player you're attacking has the initiative, you create two 1/1 white Soldier creature token that are tapped and attacking.
|
// Whenever you attack, if you or a player you're attacking has the initiative, you create two 1/1 white Soldier creature token that are tapped and attacking.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new AttacksWithCreaturesTriggeredAbility(
|
||||||
new AttacksWithCreaturesTriggeredAbility(
|
new CreateTokenEffect(new SoldierToken(), 2, true, true)
|
||||||
new CreateTokenEffect(new SoldierToken(), 2, true, true), 1
|
.setText("you create two 1/1 white Soldier creature tokens that are tapped and attacking"), 1
|
||||||
), UndercellarSweepCondition.instance, "Whenever you attack, if you or a player you're attacking " +
|
).withInterveningIf(UndercellarSweepCondition.instance));
|
||||||
"has the initiative, you create two 1/1 white Soldier creature tokens that are tapped and attacking."
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private UndercellarSweep(final UndercellarSweep card) {
|
private UndercellarSweep(final UndercellarSweep card) {
|
||||||
|
|
@ -63,4 +61,9 @@ enum UndercellarSweepCondition implements Condition {
|
||||||
.map(game.getCombat()::getDefenderId)
|
.map(game.getCombat()::getDefenderId)
|
||||||
.anyMatch(game.getInitiativeId()::equals);
|
.anyMatch(game.getInitiativeId()::equals);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "you or a player you're attacking has the initiative";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ package mage.cards.u;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.common.DesertControlledOrGraveyardCondition;
|
import mage.abilities.condition.common.DesertControlledOrGraveyardCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.AttachEffect;
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect;
|
import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect;
|
||||||
import mage.abilities.effects.common.TapEnchantedEffect;
|
import mage.abilities.effects.common.TapEnchantedEffect;
|
||||||
|
|
@ -36,11 +35,8 @@ public final class UnquenchableThirst extends CardImpl {
|
||||||
this.addAbility(new EnchantAbility(auraTarget));
|
this.addAbility(new EnchantAbility(auraTarget));
|
||||||
|
|
||||||
// When Unquenchable Thirst enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, tap enchanted creature.
|
// When Unquenchable Thirst enters the battlefield, if you control a Desert or there is a Desert card in your graveyard, tap enchanted creature.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect())
|
||||||
new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect()),
|
.withInterveningIf(DesertControlledOrGraveyardCondition.instance).addHint(DesertControlledOrGraveyardCondition.getHint()));
|
||||||
DesertControlledOrGraveyardCondition.instance, "When {this} enters, " +
|
|
||||||
"if you control a Desert or there is a Desert card in your graveyard, tap enchanted creature."
|
|
||||||
).addHint(DesertControlledOrGraveyardCondition.getHint()));
|
|
||||||
|
|
||||||
// Enchanted creature doesn't untap during its controller's untap step.
|
// Enchanted creature doesn't untap during its controller's untap step.
|
||||||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepEnchantedEffect()));
|
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepEnchantedEffect()));
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package mage.cards.u;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
import mage.abilities.condition.common.CastFromEverywhereSourceCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.keyword.CraftAbility;
|
import mage.abilities.keyword.CraftAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -25,7 +24,6 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author notgreat
|
* @author notgreat
|
||||||
*/
|
*/
|
||||||
public final class UnstableGlyphbridge extends CardImpl {
|
public final class UnstableGlyphbridge extends CardImpl {
|
||||||
|
|
@ -35,12 +33,8 @@ public final class UnstableGlyphbridge extends CardImpl {
|
||||||
this.secondSideCardClazz = mage.cards.s.SandswirlWanderglyph.class;
|
this.secondSideCardClazz = mage.cards.s.SandswirlWanderglyph.class;
|
||||||
|
|
||||||
// When Unstable Glyphbridge enters the battlefield, if you cast it, for each player, choose a creature with power 2 or less that player controls. Then destroy all creatures except creatures chosen this way.
|
// When Unstable Glyphbridge enters the battlefield, if you cast it, for each player, choose a creature with power 2 or less that player controls. Then destroy all creatures except creatures chosen this way.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new UnstableGlyphbridgeEffect())
|
||||||
new UnstableGlyphbridgeEffect()), CastFromEverywhereSourceCondition.instance,
|
.withInterveningIf(CastFromEverywhereSourceCondition.instance));
|
||||||
"When {this} enters, if you cast it, " +
|
|
||||||
"for each player, choose a creature with power 2 or less that player controls. " +
|
|
||||||
"Then destroy all creatures except creatures chosen this way."
|
|
||||||
));
|
|
||||||
|
|
||||||
// Craft with artifact {3}{W}{W}
|
// Craft with artifact {3}{W}{W}
|
||||||
this.addAbility(new CraftAbility("{3}{W}{W}"));
|
this.addAbility(new CraftAbility("{3}{W}{W}"));
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.LoseHalfLifeTargetEffect;
|
import mage.abilities.effects.common.LoseHalfLifeTargetEffect;
|
||||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldWithCounterEffect;
|
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldWithCounterEffect;
|
||||||
import mage.abilities.keyword.DeathtouchAbility;
|
import mage.abilities.keyword.DeathtouchAbility;
|
||||||
|
|
@ -39,9 +38,12 @@ public final class UnstoppableSlasher extends CardImpl {
|
||||||
.setText("they lose half their life, rounded up"), false, true));
|
.setText("they lose half their life, rounded up"), false, true));
|
||||||
|
|
||||||
// When Unstoppable Slasher dies, if it had no counters on it, return it to the battlefield tapped under its owner's control with two stun counters on it.
|
// When Unstoppable Slasher dies, if it had no counters on it, return it to the battlefield tapped under its owner's control with two stun counters on it.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new DiesSourceTriggeredAbility(new ReturnSourceFromGraveyardToBattlefieldWithCounterEffect(
|
this.addAbility(new DiesSourceTriggeredAbility(
|
||||||
CounterType.STUN.createInstance(2), true, true, false, false
|
new ReturnSourceFromGraveyardToBattlefieldWithCounterEffect(
|
||||||
), false), UnstoppableSlasherCondition.instance, "When {this} dies, if it had no counters on it, return it to the battlefield tapped under its owner's control with two stun counters on it"));
|
CounterType.STUN.createInstance(2),
|
||||||
|
true, true, false, false
|
||||||
|
), false
|
||||||
|
).withInterveningIf(UnstoppableSlasherCondition.instance));
|
||||||
}
|
}
|
||||||
|
|
||||||
private UnstoppableSlasher(final UnstoppableSlasher card) {
|
private UnstoppableSlasher(final UnstoppableSlasher card) {
|
||||||
|
|
@ -60,14 +62,17 @@ enum UnstoppableSlasherCondition implements Condition {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = source.getSourcePermanentOrLKI(game);
|
Permanent permanent = source.getSourcePermanentOrLKI(game);
|
||||||
if (permanent == null) {
|
return permanent != null
|
||||||
return false;
|
&& permanent
|
||||||
}
|
|
||||||
return permanent
|
|
||||||
.getCounters(game)
|
.getCounters(game)
|
||||||
.values()
|
.values()
|
||||||
.stream()
|
.stream()
|
||||||
.mapToInt(Counter::getCount)
|
.mapToInt(Counter::getCount)
|
||||||
.sum() == 0;
|
.sum() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "it had no counters on it";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
|
|
||||||
package mage.cards.u;
|
package mage.cards.u;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbility;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.condition.common.KickedCondition;
|
import mage.abilities.condition.common.KickedCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||||
import mage.abilities.keyword.KickerAbility;
|
import mage.abilities.keyword.KickerAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -15,10 +12,10 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
/**
|
import java.util.UUID;
|
||||||
*
|
|
||||||
* @author LoneFox
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author LoneFox
|
||||||
*/
|
*/
|
||||||
public final class UrborgEmissary extends CardImpl {
|
public final class UrborgEmissary extends CardImpl {
|
||||||
|
|
||||||
|
|
@ -31,11 +28,12 @@ public final class UrborgEmissary extends CardImpl {
|
||||||
|
|
||||||
// Kicker {1}{U}
|
// Kicker {1}{U}
|
||||||
this.addAbility(new KickerAbility("{1}{U}"));
|
this.addAbility(new KickerAbility("{1}{U}"));
|
||||||
|
|
||||||
// When Urborg Emissary enters the battlefield, if it was kicked, return target permanent to its owner's hand.
|
// When Urborg Emissary enters the battlefield, if it was kicked, return target permanent to its owner's hand.
|
||||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect());
|
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect())
|
||||||
|
.withInterveningIf(KickedCondition.ONCE);
|
||||||
ability.addTarget(new TargetPermanent());
|
ability.addTarget(new TargetPermanent());
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.ONCE,
|
this.addAbility(ability);
|
||||||
"When {this} enters, if it was kicked, return target permanent to its owner's hand."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private UrborgEmissary(final UrborgEmissary card) {
|
private UrborgEmissary(final UrborgEmissary card) {
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,37 @@
|
||||||
|
|
||||||
package mage.cards.u;
|
package mage.cards.u;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.common.DamageTargetEffect;
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
import mage.constants.SubType;
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterNonlandPermanent;
|
||||||
import mage.filter.predicate.Predicates;
|
import mage.filter.predicate.Predicates;
|
||||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class UrborgStalker extends CardImpl {
|
public final class UrborgStalker extends CardImpl {
|
||||||
|
|
||||||
private static final FilterPermanent filter = new FilterPermanent();
|
private static final FilterPermanent filter = new FilterNonlandPermanent("that player controls a nonblack, nonland permanent");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.add(TargetController.ACTIVE.getControllerPredicate());
|
filter.add(TargetController.ACTIVE.getControllerPredicate());
|
||||||
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK)));
|
||||||
filter.add(Predicates.not(CardType.LAND.getPredicate()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
|
||||||
|
|
||||||
public UrborgStalker(UUID ownerId, CardSetInfo setInfo) {
|
public UrborgStalker(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||||
|
|
||||||
|
|
@ -39,13 +40,9 @@ public final class UrborgStalker extends CardImpl {
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
// At the beginning of each player's upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.
|
// At the beginning of each player's upkeep, if that player controls a nonblack, nonland permanent, Urborg Stalker deals 1 damage to that player.
|
||||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||||
new BeginningOfUpkeepTriggeredAbility(TargetController.ANY, new DamageTargetEffect(1), false),
|
TargetController.ANY, new DamageTargetEffect(1, true, "that player"), false
|
||||||
new PermanentsOnTheBattlefieldCondition(filter),
|
).withInterveningIf(condition));
|
||||||
"At the beginning of each player's upkeep, "
|
|
||||||
+ "if that player controls a nonblack, nonland permanent, "
|
|
||||||
+ "{this} deals 1 damage to that player."
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private UrborgStalker(final UrborgStalker card) {
|
private UrborgStalker(final UrborgStalker card) {
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,15 @@ import mage.MageObjectReference;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.SpellAbility;
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
|
||||||
import mage.abilities.effects.ContinuousEffectImpl;
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
||||||
|
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||||
import mage.cards.*;
|
import mage.cards.*;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
|
|
@ -58,9 +57,7 @@ public final class UvildaDeanOfPerfection extends ModalDoubleFacedCard {
|
||||||
this.getRightHalfCard().setPT(4, 4);
|
this.getRightHalfCard().setPT(4, 4);
|
||||||
|
|
||||||
// At the beginning of your upkeep, exile the top card of each opponent's library. Until end of turn, you may cast spells from among those exiled cards, and you many spend mana as though it were mana of any color to cast those spells.
|
// At the beginning of your upkeep, exile the top card of each opponent's library. Until end of turn, you may cast spells from among those exiled cards, and you many spend mana as though it were mana of any color to cast those spells.
|
||||||
this.getRightHalfCard().addAbility(new BeginningOfUpkeepTriggeredAbility(
|
this.getRightHalfCard().addAbility(new BeginningOfUpkeepTriggeredAbility(new NassariDeanOfExpressionEffect()));
|
||||||
new NassariDeanOfExpressionEffect()
|
|
||||||
));
|
|
||||||
|
|
||||||
// Whenever you cast a spell from exile, put a +1/+1 counter on Nassari, Dean of Expression.
|
// Whenever you cast a spell from exile, put a +1/+1 counter on Nassari, Dean of Expression.
|
||||||
this.getRightHalfCard().addAbility(SpellCastControllerTriggeredAbility.createWithFromZone(
|
this.getRightHalfCard().addAbility(SpellCastControllerTriggeredAbility.createWithFromZone(
|
||||||
|
|
@ -150,13 +147,11 @@ class UvildaDeanOfPerfectionGainAbilityEffect extends ContinuousEffectImpl {
|
||||||
discard();
|
discard();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
Ability ability = new BeginningOfUpkeepTriggeredAbility(
|
||||||
new BeginningOfUpkeepTriggeredAbility(
|
Zone.EXILED, TargetController.YOU,
|
||||||
Zone.EXILED, TargetController.YOU, new RemoveCounterSourceEffect(CounterType.HONE.createInstance()),
|
new RemoveCounterSourceEffect(CounterType.HONE.createInstance())
|
||||||
false
|
.setText("remove a hone counter from it"), false
|
||||||
), UvildaDeanOfPerfectionCondition.instance, "At the beginning of your upkeep, " +
|
).withInterveningIf(UvildaDeanOfPerfectionCondition.instance);
|
||||||
"if this card is exiled, remove a hone counter from it."
|
|
||||||
);
|
|
||||||
ability.setSourceId(card.getId());
|
ability.setSourceId(card.getId());
|
||||||
ability.setControllerId(source.getControllerId());
|
ability.setControllerId(source.getControllerId());
|
||||||
game.getState().addOtherAbility(card, ability);
|
game.getState().addOtherAbility(card, ability);
|
||||||
|
|
@ -175,6 +170,11 @@ enum UvildaDeanOfPerfectionCondition implements Condition {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
return game.getState().getZone(source.getSourceId()) == Zone.EXILED;
|
return game.getState().getZone(source.getSourceId()) == Zone.EXILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "this card is exiled";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class UvildaDeanOfPerfectionTriggeredAbility extends TriggeredAbilityImpl {
|
class UvildaDeanOfPerfectionTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue