Menu

Submission for

Comment

tested in magarena 1.43

Config

name=Kaalia of the Vast
url=http://magiccards.info/cma/en/9.html
image=http://magiccards.info/scans/en/cma/9.jpg
value=4.120
rarity=M
type=Legendary,Creature
subtype=Human,Cleric
cost={1}{W}{B}{R}
pt=2/2
ability=flying
timing=main
requires_groovy_code

Script

def TARGET_ANGEL_OR_DEMON_OR_DRAGON_CARD_FROM_HAND = new MagicCardFilterImpl() {
	public boolean accept(final MagicGame game,final MagicPlayer player,final MagicCard target) {
		return target.hasType(MagicType.Creature) &&
			   (target.hasSubType(MagicSubType.Angel) ||
			   target.hasSubType(MagicSubType.Demon) ||
			   target.hasSubType(MagicSubType.Dragon));
	}
	public boolean acceptType(final MagicTargetType targetType) {
		return targetType == MagicTargetType.Hand;
	}
}; 
def ANGEL_OR_DEMON_OR_DRAGON_CARD_FROM_HAND = new MagicTargetChoice(
	TARGET_ANGEL_OR_DEMON_OR_DRAGON_CARD_FROM_HAND,  
	MagicTargetHint.None,
	"an Angel, Demon or Dragon creature card from your hand"
);
[
    new MagicWhenAttacksTrigger(1) {
        @Override
        public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent attacker) {
            return permanent == attacker ?
                new MagicEvent(
					permanent,
					new MagicMayChoice(
                        ANGEL_OR_DEMON_OR_DRAGON_CARD_FROM_HAND
                    ),
					MagicGraveyardTargetPicker.PutOntoBattlefield,
					this,
					"PN may\$ put an Angel, Demon or Dragon creature card\$ from his or her hand onto the battlefield tapped and attacking."
				):
                MagicEvent.NONE;
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            if(event.isYes()){
				event.processTargetCard(game,new MagicCardAction() {
					public void doAction(final MagicCard card) {
						game.doAction(new MagicRemoveCardAction(card,MagicLocationType.OwnersHand));
						game.doAction(new MagicPlayCardAction(
							card,
							event.getPlayer(), 
							[MagicPlayMod.TAPPED, MagicPlayMod.ATTACKING]
						));
					}
				});
			}
        }
    }
]
Pushed