added Mikaeus, the Unhallowed and Sightless Ghoul

master
beholder 2012-02-24 13:47:42 +01:00
parent a9c0b05ca7
commit 9f643beb64
4 changed files with 111 additions and 0 deletions

View File

@ -0,0 +1,15 @@
>Mikaeus, the Unhallowed
url=http://magiccards.info/dka/en/70.html
image=http://magiccards.info/scans/en/dka/70.jpg
value=5
rarity=M
type=Legendary,Creature
subtype=Zombie,Cleric
color=b
converted=6
cost={3}{B}{B}{B}
pt=5/5
ability=intimidate
static=player
timing=main
requires_card_code

View File

@ -0,0 +1,13 @@
>Sightless Ghoul
url=http://magiccards.info/dka/en/73.html
image=http://magiccards.info/scans/en/dka/73.jpg
value=2
rarity=C
type=Creature
subtype=Zombie,Soldier
color=b
converted=4
cost={3}{B}
pt=2/2
ability=can't block,undying
timing=main

View File

@ -0,0 +1,72 @@
package magic.card;
import magic.model.MagicAbility;
import magic.model.MagicDamage;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPlayer;
import magic.model.MagicPowerToughness;
import magic.model.MagicSubType;
import magic.model.action.MagicDestroyAction;
import magic.model.event.MagicEvent;
import magic.model.mstatic.MagicLayer;
import magic.model.mstatic.MagicStatic;
import magic.model.target.MagicTargetFilter;
import magic.model.trigger.MagicWhenDamageIsDealtTrigger;
public class Mikaeus__the_Unhallowed {
public static final MagicStatic S1 = new MagicStatic(
MagicLayer.ModPT,
MagicTargetFilter.TARGET_NONHUMAN_CREATURE_YOU_CONTROL) {
@Override
public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) {
pt.add(1,1);
}
@Override
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
return source != target;
}
};
public static final MagicStatic S2 = new MagicStatic(
MagicLayer.Ability,
MagicTargetFilter.TARGET_NONHUMAN_CREATURE_YOU_CONTROL) {
@Override
public long getAbilityFlags(final MagicGame game,final MagicPermanent permanent,final long flags) {
return flags | MagicAbility.Undying.getMask();
}
@Override
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
return source != target;
}
};
public static final MagicWhenDamageIsDealtTrigger T = new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicDamage damage) {
final MagicPlayer player = permanent.getController();
return (damage.getTarget() == player &&
damage.getSource().isPermanent() &&
((MagicPermanent)damage.getSource()).hasSubType(MagicSubType.Human,game)) ?
new MagicEvent(
permanent,
player,
new Object[]{damage.getSource()},
this,
"Destroy " + damage.getSource() + "."):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event,
final Object data[],
final Object[] choiceResults) {
game.doAction(new MagicDestroyAction((MagicPermanent)data[0]));
}
};
}

View File

@ -1051,6 +1051,17 @@ public interface MagicTargetFilter {
}
};
MagicTargetFilter TARGET_NONHUMAN_CREATURE_YOU_CONTROL = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
return target.getController() == player &&
((MagicPermanent)target).isCreature(game) &&
!((MagicPermanent)target).hasSubType(MagicSubType.Human,game);
}
public boolean acceptType(final MagicTargetType targetType) {
return targetType==MagicTargetType.Permanent;
}
};
MagicTargetFilter TARGET_SOLDIER = new MagicTargetFilter() {
public boolean accept(final MagicGame game,final MagicPlayer player,final MagicTarget target) {
return ((MagicPermanent)target).isCreature(game) &&