added Bone Dancer and Crypt Cobra
parent
86830b58b7
commit
1ca917e116
|
@ -17775,3 +17775,29 @@ converted=7
|
|||
cost={5}{B}{B}
|
||||
pt=4/4
|
||||
timing=fmain
|
||||
|
||||
>Bone Dancer
|
||||
url=http://magiccards.info/wl/en/4.html
|
||||
image=http://magiccards.info/scans/en/wl/4.jpg
|
||||
value=3
|
||||
rarity=R
|
||||
type=Creature
|
||||
subtype=Zombie
|
||||
color=b
|
||||
converted=3
|
||||
cost={1}{B}{B}
|
||||
pt=2/2
|
||||
timing=main
|
||||
|
||||
>Crypt Cobra
|
||||
url=http://magiccards.info/mr/en/12.html
|
||||
image=http://magiccards.info/scans/en/mr/12.jpg
|
||||
value=3
|
||||
rarity=U
|
||||
type=Creature
|
||||
subtype=Snake
|
||||
color=b
|
||||
converted=4
|
||||
cost={3}{B}
|
||||
pt=3/3
|
||||
timing=main
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
package magic.card;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import magic.model.MagicCard;
|
||||
import magic.model.MagicDamage;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicDealDamageAction;
|
||||
import magic.model.action.MagicPlayCardAction;
|
||||
import magic.model.action.MagicReanimateAction;
|
||||
import magic.model.choice.MagicMayChoice;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.target.MagicTarget;
|
||||
import magic.model.target.MagicTargetFilter;
|
||||
import magic.model.trigger.MagicIfDamageWouldBeDealtTrigger;
|
||||
|
||||
public class Bone_Dancer {
|
||||
public static final MagicIfDamageWouldBeDealtTrigger T = new MagicIfDamageWouldBeDealtTrigger(1) {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
||||
if (damage.getSource() == permanent &&
|
||||
damage.isCombat() &&
|
||||
damage.getTarget().isPlayer() &&
|
||||
!permanent.isBlocked()) {
|
||||
final MagicPlayer player = permanent.getController();
|
||||
final int amount = damage.getAmount();
|
||||
damage.setAmount(0);
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
player,
|
||||
new MagicMayChoice(
|
||||
player + " may put the top creature card of " +
|
||||
damage.getTarget() + "'s graveyard onto the " +
|
||||
"battlefield under his or her control."),
|
||||
new Object[]{player,permanent,damage.getTarget(),amount},
|
||||
this,
|
||||
player + " may put the top creature card of " +
|
||||
damage.getTarget() + "'s graveyard onto the " +
|
||||
"battlefield under his or her control.");
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
if (MagicMayChoice.isYesChoice(choiceResults[0])) {
|
||||
final MagicPlayer opponent = (MagicPlayer)data[2];
|
||||
final List<MagicTarget> targets =
|
||||
game.filterTargets(opponent,MagicTargetFilter.TARGET_CREATURE_CARD_FROM_GRAVEYARD);
|
||||
if (targets.size() > 0) {
|
||||
final MagicCard card = (MagicCard)targets.get(targets.size()-1);
|
||||
game.doAction(new MagicReanimateAction(
|
||||
(MagicPlayer)data[0],
|
||||
card,
|
||||
MagicPlayCardAction.NONE));
|
||||
}
|
||||
} else {
|
||||
final MagicDamage damage = new MagicDamage(
|
||||
(MagicPermanent)data[1],
|
||||
(MagicTarget)data[2],
|
||||
(Integer)data[3],
|
||||
false);
|
||||
game.doAction(new MagicDealDamageAction(damage));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package magic.card;
|
||||
|
||||
import magic.model.MagicDamage;
|
||||
import magic.model.MagicGame;
|
||||
import magic.model.MagicPermanent;
|
||||
import magic.model.MagicPlayer;
|
||||
import magic.model.action.MagicChangePoisonAction;
|
||||
import magic.model.event.MagicEvent;
|
||||
import magic.model.trigger.MagicIfDamageWouldBeDealtTrigger;
|
||||
|
||||
public class Crypt_Cobra {
|
||||
public static final MagicIfDamageWouldBeDealtTrigger T = new MagicIfDamageWouldBeDealtTrigger(1) {
|
||||
@Override
|
||||
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
||||
if (damage.getSource() == permanent &&
|
||||
damage.isCombat() &&
|
||||
damage.getTarget().isPlayer() &&
|
||||
!permanent.isBlocked()) {
|
||||
return new MagicEvent(
|
||||
permanent,
|
||||
permanent.getController(),
|
||||
new Object[]{damage.getTarget()},
|
||||
this,
|
||||
damage.getTarget() + " gets a poison counter.");
|
||||
}
|
||||
return MagicEvent.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeEvent(
|
||||
final MagicGame game,
|
||||
final MagicEvent event,
|
||||
final Object data[],
|
||||
final Object[] choiceResults) {
|
||||
game.doAction(new MagicChangePoisonAction((MagicPlayer)data[0],1));
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue