merged new cards
commit
c00a3e201f
|
@ -0,0 +1,34 @@
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Pump),
|
||||
"Pump"
|
||||
) {
|
||||
|
||||
@Override
|
||||
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
||||
return [new MagicPayManaCostEvent(source,"{R}{G}{W}")];
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
this,
|
||||
"SN and each other creature with the same name as it get +3/+3 until end of turn."
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
final MagicTargetFilter<MagicPermanent> targetFilter =
|
||||
new MagicTargetFilter.NameTargetFilter(
|
||||
MagicTargetFilter.TARGET_CREATURE,
|
||||
event.getPermanent().getName()
|
||||
);
|
||||
final Collection<MagicPermanent> targets =
|
||||
game.filterPermanents(event.getPlayer(), targetFilter);
|
||||
for (final MagicPermanent permanent : targets) {
|
||||
game.doAction(new MagicChangeTurnPTAction(permanent,3,3));
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
|
@ -0,0 +1,11 @@
|
|||
name=Cylian Sunsinger
|
||||
url=http://magiccards.info/cfx/en/80.html
|
||||
image=http://magiccards.info/scans/en/cfx/80.jpg
|
||||
value=2.802
|
||||
rarity=R
|
||||
type=Creature
|
||||
subtype=Elf,Shaman
|
||||
cost={1}{G}
|
||||
pt=2/2
|
||||
timing=main
|
||||
requires_groovy_code
|
|
@ -0,0 +1,49 @@
|
|||
def ST = new MagicStatic(MagicLayer.Type, MagicStatic.UntilEOT) {
|
||||
@Override
|
||||
public void modSubTypeFlags(final MagicPermanent permanent, final Set<MagicSubType> flags) {
|
||||
flags.add(MagicSubType.Treefolk);
|
||||
}
|
||||
@Override
|
||||
public int getTypeFlags(final MagicPermanent permanent,final int flags) {
|
||||
return flags|MagicType.Creature.getMask();
|
||||
}
|
||||
};
|
||||
|
||||
[
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Animate),
|
||||
"Animate"
|
||||
) {
|
||||
|
||||
@Override
|
||||
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
||||
return [new MagicTapEvent(source)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
MagicTargetChoice.Positive("target Forest"),
|
||||
this,
|
||||
"Until end of turn, target Forest\$ becomes an X/X Treefolk creature in addition to its other types, " +
|
||||
"where X is the number of Elves you control."
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game, {
|
||||
final MagicPermanent land ->
|
||||
final int amount = event.getPlayer().getNrOfPermanents(MagicSubType.Elf);
|
||||
final MagicStatic PT = new MagicStatic(MagicLayer.SetPT, MagicStatic.UntilEOT) {
|
||||
@Override
|
||||
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
|
||||
pt.set(amount,amount);
|
||||
}
|
||||
};
|
||||
game.doAction(new MagicBecomesCreatureAction(land,PT,ST));
|
||||
} as MagicPermanentAction);
|
||||
}
|
||||
}
|
||||
]
|
|
@ -0,0 +1,11 @@
|
|||
name=Elvish Branchbender
|
||||
url=http://magiccards.info/lw/en/204.html
|
||||
image=http://magiccards.info/scans/en/lw/204.jpg
|
||||
value=3.500
|
||||
rarity=C
|
||||
type=Creature
|
||||
subtype=Elf,Druid
|
||||
cost={2}{G}
|
||||
pt=2/2
|
||||
timing=main
|
||||
requires_groovy_code
|
|
@ -0,0 +1,35 @@
|
|||
[
|
||||
new MagicPermanentActivation(
|
||||
new MagicActivationHints(MagicTiming.Tapping),
|
||||
"Paralyze"
|
||||
) {
|
||||
@Override
|
||||
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
|
||||
return [
|
||||
new MagicPayManaCostTapEvent(source,"{1}{G}")
|
||||
];
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
MagicTargetChoice.NEG_TARGET_CREATURE,
|
||||
new MagicNoCombatTargetPicker(true,true,false),
|
||||
this,
|
||||
"Target creature\$ doesn't untap during its controller's next untap step."
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent creature) {
|
||||
game.doAction(MagicChangeStateAction.Set(
|
||||
creature,
|
||||
MagicPermanentState.DoesNotUntapDuringNext
|
||||
));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
|
@ -0,0 +1,11 @@
|
|||
name=Elvish Hunter
|
||||
url=http://magiccards.info/me2/en/157.html
|
||||
image=http://magiccards.info/scans/en/me2/157.jpg
|
||||
value=3.058
|
||||
rarity=C
|
||||
type=Creature
|
||||
subtype=Elf,Archer
|
||||
cost={1}{G}
|
||||
pt=1/1
|
||||
timing=main
|
||||
requires_groovy_code
|
|
@ -0,0 +1,14 @@
|
|||
[
|
||||
new MagicIfDamageWouldBeDealtTrigger(MagicTrigger.PREVENT_DAMAGE) {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicDamage damage) {
|
||||
final MagicTarget target = damage.getTarget();
|
||||
if (target.isCreature() &&
|
||||
target.isToken() &&
|
||||
target.isFriend(permanent)) {
|
||||
damage.prevent();
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
}
|
||||
]
|
|
@ -0,0 +1,11 @@
|
|||
name=Emmara Tandris
|
||||
url=http://magiccards.info/dgm/en/68.html
|
||||
image=http://magiccards.info/scans/en/dgm/68.jpg
|
||||
value=1.454
|
||||
rarity=R
|
||||
type=Legendary,Creature
|
||||
subtype=Elf,Shaman
|
||||
cost={5}{G}{W}
|
||||
pt=5/7
|
||||
timing=main
|
||||
requires_groovy_code
|
|
@ -0,0 +1,35 @@
|
|||
def NON_ELF_CREATURE = new MagicPermanentFilterImpl() {
|
||||
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicPermanent target) {
|
||||
return target.isCreature() &&
|
||||
!target.hasSubType(MagicSubType.Elf);
|
||||
}
|
||||
};
|
||||
|
||||
def TARGET_NON_ELF_CREATURE = new MagicTargetChoice(
|
||||
NON_ELF_CREATURE,
|
||||
MagicTargetHint.Negative,
|
||||
"target non-Elf creature"
|
||||
);
|
||||
|
||||
[
|
||||
new MagicSpellCardEvent() {
|
||||
@Override
|
||||
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
cardOnStack,
|
||||
TARGET_NON_ELF_CREATURE,
|
||||
new MagicDestroyTargetPicker(false),
|
||||
this,
|
||||
"Destroy target non-Elf creature\$."
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
||||
event.processTargetPermanent(game,new MagicPermanentAction() {
|
||||
public void doAction(final MagicPermanent creature) {
|
||||
game.doAction(new MagicDestroyAction(creature));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
|
@ -0,0 +1,10 @@
|
|||
name=Eyeblight's Ending
|
||||
url=http://magiccards.info/lw/en/110.html
|
||||
image=http://magiccards.info/scans/en/lw/110.jpg
|
||||
value=4.074
|
||||
rarity=C
|
||||
type=Tribal,Instant
|
||||
subtype=Elf
|
||||
cost={2}{B}
|
||||
timing=removal
|
||||
requires_groovy_code
|
|
@ -1,6 +1,7 @@
|
|||
package magic.model;
|
||||
|
||||
public interface MagicObject extends MagicCopyable {
|
||||
boolean isToken();
|
||||
boolean isSpell();
|
||||
boolean isSpell(MagicType type);
|
||||
boolean isInstantOrSorcerySpell();
|
||||
|
|
|
@ -35,4 +35,9 @@ public abstract class MagicObjectImpl implements MagicObject {
|
|||
public boolean isSpell(MagicType type) {
|
||||
return isSpell() && hasType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isToken() {
|
||||
return isPermanent() && ((MagicPermanent)this).isToken();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue