mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 04:39:18 -08:00
Merge branch 'master' of https://github.com/magefree/mage
This commit is contained in:
commit
a9fdac22f0
15 changed files with 202 additions and 104 deletions
|
|
@ -46,6 +46,7 @@ import mage.constants.Zone;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
|
|
@ -141,7 +142,7 @@ class InfiniteReflectionEntersBattlefieldEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
return permanent != null && permanent.getControllerId().equals(source.getControllerId())
|
||||
&& permanent.getCardType().contains(CardType.CREATURE)
|
||||
&& !(permanent instanceof PermanentToken);
|
||||
|
|
@ -149,7 +150,7 @@ class InfiniteReflectionEntersBattlefieldEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
MageObject toCopyToObject = game.getObject(event.getTargetId());
|
||||
MageObject toCopyToObject = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null && toCopyToObject != null && sourcePermanent.getAttachedTo() != null) {
|
||||
Permanent toCopyFromPermanent = game.getPermanent(sourcePermanent.getAttachedTo());
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ import mage.target.common.TargetCardInLibrary;
|
|||
/**
|
||||
* @author duncant
|
||||
*/
|
||||
|
||||
public class ScionOfTheUrDragon extends CardImpl {
|
||||
|
||||
public ScionOfTheUrDragon(UUID ownerId) {
|
||||
|
|
@ -69,8 +68,8 @@ public class ScionOfTheUrDragon extends CardImpl {
|
|||
|
||||
// {2}: Search your library for a Dragon permanent card and put it into your graveyard. If you do, Scion of the Ur-Dragon becomes a copy of that card until end of turn. Then shuffle your library.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new ScionOfTheUrDragonEffect(),
|
||||
new ManaCostsImpl("{2}")));
|
||||
new ScionOfTheUrDragonEffect(),
|
||||
new ManaCostsImpl("{2}")));
|
||||
}
|
||||
|
||||
public ScionOfTheUrDragon(final ScionOfTheUrDragon card) {
|
||||
|
|
@ -84,15 +83,16 @@ public class ScionOfTheUrDragon extends CardImpl {
|
|||
}
|
||||
|
||||
class ScionOfTheUrDragonEffect extends SearchEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterPermanentCard("Dragon permanent card");
|
||||
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Dragon"));
|
||||
}
|
||||
|
||||
|
||||
public ScionOfTheUrDragonEffect() {
|
||||
super(new TargetCardInLibrary(filter), Outcome.Copy);
|
||||
staticText = "Search your library for a Dragon permanent card and put it into your graveyard. If you do, Scion of the Ur-Dragon becomes a copy of that card until end of turn. Then shuffle your library.";
|
||||
staticText = "Search your library for a Dragon permanent card and put it into your graveyard. If you do, {this} becomes a copy of that card until end of turn. Then shuffle your library.";
|
||||
}
|
||||
|
||||
ScionOfTheUrDragonEffect(final ScionOfTheUrDragonEffect effect) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue