mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
Some minior changes to committed cards.
This commit is contained in:
parent
2cd91b9d15
commit
2ce5e00c6d
2 changed files with 15 additions and 56 deletions
|
@ -27,11 +27,11 @@
|
|||
*/
|
||||
package mage.sets.invasion;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.condition.common.AfterBlockersAreDeclaredCondition;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
|
@ -49,8 +49,6 @@ import mage.target.common.TargetCardInHand;
|
|||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author nomage
|
||||
*/
|
||||
|
@ -67,7 +65,6 @@ public class CauldronDance extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new CauldronDanceReturnFromGraveyardToBattlefieldTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard")));
|
||||
|
||||
|
||||
// You may put a creature card from your hand onto the battlefield. That creature gains haste. Its controller sacrifices it at the beginning of the next end step.
|
||||
this.getSpellAbility().addEffect(new CauldronDancePutCreatureFromHandOntoBattlefieldEffect());
|
||||
}
|
||||
|
@ -126,7 +123,8 @@ class CauldronDanceReturnFromGraveyardToBattlefieldTargetEffect extends OneShotE
|
|||
}
|
||||
|
||||
class CauldronDancePutCreatureFromHandOntoBattlefieldEffect extends OneShotEffect {
|
||||
private static final String choiceText = "Put a creature card from your hand onto the battlefield?";
|
||||
|
||||
private static final String CHOICE_TEXT = "Put a creature card from your hand onto the battlefield?";
|
||||
|
||||
public CauldronDancePutCreatureFromHandOntoBattlefieldEffect() {
|
||||
super(Outcome.Benefit);
|
||||
|
@ -146,7 +144,7 @@ class CauldronDancePutCreatureFromHandOntoBattlefieldEffect extends OneShotEffec
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (controller.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) {
|
||||
if (controller.chooseUse(Outcome.PutCreatureInPlay, CHOICE_TEXT, source, game)) {
|
||||
TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard());
|
||||
if (controller.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
|
@ -173,4 +171,4 @@ class CauldronDancePutCreatureFromHandOntoBattlefieldEffect extends OneShotEffec
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,14 +29,10 @@ package mage.sets.scourge;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.TurnedFaceUpAllTriggeredAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -45,22 +41,16 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author anonymous
|
||||
* @author nomage
|
||||
*/
|
||||
public class BladewingsThrall extends CardImpl {
|
||||
|
||||
final static private String rule = "{this} has flying as long as you control a Dragon";
|
||||
final static private String RULE = "{this} has flying as long as you control a Dragon";
|
||||
|
||||
public BladewingsThrall(UUID ownerId) {
|
||||
super(ownerId, 55, "Bladewing's Thrall", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{B}");
|
||||
|
@ -70,9 +60,14 @@ public class BladewingsThrall extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Bladewing's Thrall has flying as long as you control a Dragon.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield), new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent("Dragon", "a Dragon")), rule)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new PermanentsOnTheBattlefieldCondition(new FilterControlledCreaturePermanent("Dragon", "a Dragon")),
|
||||
RULE)));
|
||||
|
||||
// When a Dragon enters the battlefield, you may return Bladewing's Thrall from your graveyard to the battlefield.
|
||||
this.addAbility(new BladewingsThrallTriggeredAbility());
|
||||
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToBattlefieldEffect(), new FilterCreaturePermanent("Dragon", "a Dragon"), true));
|
||||
}
|
||||
|
||||
public BladewingsThrall(final BladewingsThrall card) {
|
||||
|
@ -84,37 +79,3 @@ public class BladewingsThrall extends CardImpl {
|
|||
return new BladewingsThrall(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BladewingsThrallTriggeredAbility extends TriggeredAbilityImpl {
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dragon", "a Dragon");
|
||||
|
||||
public BladewingsThrallTriggeredAbility() {
|
||||
super(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), true);
|
||||
}
|
||||
|
||||
public BladewingsThrallTriggeredAbility(BladewingsThrallTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
UUID targetId = event.getTargetId();
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
return filter.match(permanent, getSourceId(), getControllerId(), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When a Dragon enters the battlefield, you may return Bladewing's Thrall from your graveyard to the battlefield";
|
||||
}
|
||||
|
||||
@Override
|
||||
public BladewingsThrallTriggeredAbility copy() {
|
||||
return new BladewingsThrallTriggeredAbility(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue