added Walking Corpse and Woodland Sleuth
parent
aad7a1fdb2
commit
fdf4c09450
|
@ -5242,3 +5242,27 @@ cost={2}{W}
|
|||
pt=2/1
|
||||
ability=flying,first strike
|
||||
timing=main
|
||||
|
||||
>Walking Corpse
|
||||
image=http://magiccards.info/scans/en/isd/126.jpg
|
||||
value=2
|
||||
rarity=C
|
||||
type=Creature
|
||||
subtype=Zombie
|
||||
color=b
|
||||
converted=2
|
||||
cost={1}{B}
|
||||
pt=2/2
|
||||
timing=main
|
||||
|
||||
>Woodland Sleuth
|
||||
image=http://magiccards.info/scans/en/isd/210.jpg
|
||||
value=3
|
||||
rarity=C
|
||||
type=Creature
|
||||
subtype=Human,Scout
|
||||
color=g
|
||||
converted=4
|
||||
cost={3}{G}
|
||||
pt=2/3
|
||||
timing=main
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package magic.card;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import magic.model.MagicCard;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.MagicLocationType;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.action.MagicMoveCardAction;
|
||||
import magic.model.action.MagicRemoveCardAction;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.target.MagicTarget;
|
||||
import magic.model.target.MagicTargetFilter;
|
||||
import magic.model.trigger.MagicWhenComesIntoPlayTrigger;
|
||||
|
||||
public class Woodland_Sleuth {
|
||||
public static final MagicWhenComesIntoPlayTrigger T = new MagicWhenComesIntoPlayTrigger() {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
new Object[]{player,permanent},
|
||||
this,
|
||||
"Return a creature card at random from your graveyard to your hand.");
|
||||
}
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
final MagicPlayer player = (MagicPlayer)data[0];
|
||||
final List<MagicTarget> targets =
|
||||
game.filterTargets(player,MagicTargetFilter.TARGET_CREATURE_CARD_FROM_GRAVEYARD);
|
||||
if (targets.size() > 0) {
|
||||
final MagicPermanent permanent = (MagicPermanent)data[1];
|
||||
final magic.MersenneTwisterFast rng =
|
||||
new magic.MersenneTwisterFast(permanent.getId() + player.getId());
|
||||
final int index = rng.nextInt(targets.size());
|
||||
final MagicCard card = (MagicCard)targets.get(index);
|
||||
game.doAction(new MagicRemoveCardAction(card,MagicLocationType.Graveyard));
|
||||
game.doAction(new MagicMoveCardAction(card,MagicLocationType.Graveyard,MagicLocationType.OwnersHand));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue