Menu

Submission for Scepter of Empires

216

Comment

tested in magarena 1.43

Config

name=Scepter of Empires
url=http://magiccards.info/m12/en/216.html
image=http://magiccards.info/scans/en/m12/216.jpg
value=2.920
rarity=U
type=Artifact
cost={3}
timing=artifact
requires_groovy_code

Script

[
    new MagicPermanentActivation(
        new MagicActivationHints(MagicTiming.Removal),
        "Damage"
    ) {

        @Override
        public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
            return [new MagicTapEvent(source)];
        }

        @Override
        public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
            return new MagicEvent(
                source,
                MagicTargetChoice.NEG_TARGET_PLAYER,
                new MagicDamageTargetPicker(1),
                this,
                "SN deals 1 damage to target player\$. " +
                "SN deals 3 damage to that player instead if you control " + 
				"artifacts named Crown of Empires and Throne of Empires."
            );
        }

        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            final MagicTargetFilter<MagicPermanent> crown = new MagicTargetFilter.NameTargetFilter("Crown of Empires");
			final MagicTargetFilter<MagicPermanent> throne = new MagicTargetFilter.NameTargetFilter("Throne of Empires");
			final MagicSource source = event.getSource();
			final MagicPlayer player = source.getController();
			final int amount = (player.controlsPermanent(crown) && player.controlsPermanent(throne))? 3 : 1;
			event.processTarget(game,new MagicTargetAction() {
                public void doAction(final MagicTarget target) {
                    final MagicDamage damage = new MagicDamage(
                        source,
                        target,
                        amount
                    );
                    game.doAction(new MagicDealDamageAction(damage));
                }
            });
        }
    }
]
Pushed