added Skinshifter
parent
272c4c0464
commit
ee054d2226
|
@ -799,6 +799,19 @@ power=3
|
|||
toughness=3
|
||||
timing=fmain
|
||||
|
||||
>Skinshifter
|
||||
image=http://magiccards.info/scans/en/m12/195.jpg
|
||||
value=3
|
||||
rarity=R
|
||||
type=Creature
|
||||
subtype=Human,Shaman
|
||||
color=g
|
||||
converted=2
|
||||
cost={1}{G}
|
||||
power=1
|
||||
toughness=1
|
||||
timing=main
|
||||
|
||||
>Safehold Elite
|
||||
image=http://magiccards.info/scans/en/shm/239.jpg
|
||||
value=2
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.*;
|
||||
import magic.model.action.MagicBecomesCreatureAction;
|
||||
import magic.model.condition.MagicCondition;
|
||||
import magic.model.event.MagicActivationHints;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.event.MagicPayManaCostEvent;
|
||||
import magic.model.event.MagicPermanentActivation;
|
||||
import magic.model.event.MagicTiming;
|
||||
import magic.model.variable.MagicDummyLocalVariable;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class Skinshifter {
|
||||
// becomes a 4/4 Rhino and gains trample
|
||||
private static final MagicDummyLocalVariable LV1 = new MagicDummyLocalVariable() {
|
||||
@Override
|
||||
public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) {
|
||||
pt.power = 4;
|
||||
pt.toughness = 4;
|
||||
}
|
||||
@Override
|
||||
public long getAbilityFlags(final MagicGame game,final MagicPermanent permanent,final long flags) {
|
||||
return flags|MagicAbility.Trample.getMask();
|
||||
}
|
||||
@Override
|
||||
public EnumSet<MagicSubType> getSubTypeFlags(final MagicPermanent permanent,final EnumSet<MagicSubType> flags) {
|
||||
return EnumSet.of(MagicSubType.Rhino);
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicPermanentActivation A1 = new MagicPermanentActivation(
|
||||
new MagicCondition[]{MagicManaCost.GREEN.getCondition()},
|
||||
new MagicActivationHints(MagicTiming.Animate,false,1),
|
||||
"Rhino") {
|
||||
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{new MagicPayManaCostEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
MagicManaCost.GREEN)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(
|
||||
final MagicPermanent source,
|
||||
final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
new Object[]{source},
|
||||
this,
|
||||
"Until end of turn, " + source +
|
||||
" becomes a 4/4 Rhino and gains trample.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicBecomesCreatureAction((MagicPermanent)data[0],LV1));
|
||||
}
|
||||
};
|
||||
|
||||
// becomes a 2/2 Bird and gains flying
|
||||
private static final MagicDummyLocalVariable LV2 = new MagicDummyLocalVariable() {
|
||||
@Override
|
||||
public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) {
|
||||
pt.power = 2;
|
||||
pt.toughness = 2;
|
||||
}
|
||||
@Override
|
||||
public long getAbilityFlags(final MagicGame game,final MagicPermanent permanent,final long flags) {
|
||||
return flags|MagicAbility.Flying.getMask();
|
||||
}
|
||||
@Override
|
||||
public EnumSet<MagicSubType> getSubTypeFlags(final MagicPermanent permanent,final EnumSet<MagicSubType> flags) {
|
||||
return EnumSet.of(MagicSubType.Bird);
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicPermanentActivation A2 = new MagicPermanentActivation(
|
||||
new MagicCondition[]{MagicManaCost.GREEN.getCondition()},
|
||||
new MagicActivationHints(MagicTiming.Animate,false,1),
|
||||
"Bird") {
|
||||
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{new MagicPayManaCostEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
MagicManaCost.GREEN)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(
|
||||
final MagicPermanent source,
|
||||
final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
new Object[]{source},
|
||||
this,
|
||||
"Until end of turn, " + source +
|
||||
" becomes a 2/2 Bird and gains flying.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicBecomesCreatureAction((MagicPermanent)data[0],LV2));
|
||||
}
|
||||
};
|
||||
|
||||
// becomes a 0/8 Plant
|
||||
private static final MagicDummyLocalVariable LV3 = new MagicDummyLocalVariable() {
|
||||
@Override
|
||||
public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) {
|
||||
pt.power = 0;
|
||||
pt.toughness = 8;
|
||||
}
|
||||
@Override
|
||||
public EnumSet<MagicSubType> getSubTypeFlags(final MagicPermanent permanent,final EnumSet<MagicSubType> flags) {
|
||||
return EnumSet.of(MagicSubType.Plant);
|
||||
}
|
||||
};
|
||||
|
||||
public static final MagicPermanentActivation A3 = new MagicPermanentActivation(
|
||||
new MagicCondition[]{MagicManaCost.GREEN.getCondition()},
|
||||
new MagicActivationHints(MagicTiming.Animate,false,1),
|
||||
"Plant") {
|
||||
|
||||
@Override
|
||||
public MagicEvent[] getCostEvent(final MagicSource source) {
|
||||
return new MagicEvent[]{new MagicPayManaCostEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
MagicManaCost.GREEN)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public MagicEvent getPermanentEvent(
|
||||
final MagicPermanent source,
|
||||
final MagicPayedCost payedCost) {
|
||||
return new MagicEvent(
|
||||
source,
|
||||
source.getController(),
|
||||
new Object[]{source},
|
||||
this,
|
||||
"Until end of turn, " + source +
|
||||
" becomes a becomes a 0/8 Plant.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object[] data,
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicBecomesCreatureAction((MagicPermanent)data[0],LV3));
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue