Package mage.watchers.common

Examples of mage.watchers.common.PlayerAttackedWatcher


    private RaidCondition() {}

    @Override
    public boolean apply(Game game, Ability source) {
        PlayerAttackedWatcher watcher = (PlayerAttackedWatcher) game.getState().getWatchers().get("PlayerAttackedWatcher");
        return watcher != null && watcher.getNumberOfAttackersCurrentTurn(source.getControllerId()) > 0;
    }
View Full Code Here


        this.toughness = new MageInt(3);

        // <em>Raid</em> - When Mardu Warshrieker enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool.
        this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new AddManaToControllersManaPoolEffect(new Mana(1,0,0,1,1,0,0))), RaidCondition.getInstance(),
                 "<i>Raid</i> -  When {this} enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool.", false));
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1), false),
                RaidCondition.getInstance(),
                true,
                "<i>Raid</i> - {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn",
                "{this} enters the battlefield with a +1/+1 counter"));
        this.addWatcher(new PlayerAttackedWatcher());

        // War-Name Aspirant can't be blocked by creatures with power 1 or less.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)));
    }
View Full Code Here

        this.addAbility(FlyingAbility.getInstance());
       
        // <em>Raid</em> - When Wingmate Roc enters the battlefield, if you attacked with a creature this turn, put a 3/4 white Bird creature token with flying onto the battlefield.
        this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WingmateRocToken())), RaidCondition.getInstance(),
                 "<i>Raid</i> -  When {this} enters the battlefield, if you attacked with a creature this turn, put a 3/4 white Bird creature token with flying onto the battlefield.", false));       
        this.addWatcher(new PlayerAttackedWatcher());

        // Whenever Wingmate Roc attacks, you gain 1 life for each attacking creature.
        Effect effect = new GainLifeEffect(new AttackingCreatureCount());
        effect.setText("you gain 1 life for each attacking creature");
        this.addAbility(new AttacksTriggeredAbility(effect, false));
View Full Code Here

        // <i>Raid</i> - When Timely Hordemate enters the battlefield, if you attacked this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.
        Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect()), RaidCondition.getInstance(),
                 "<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield.", false);
        ability.addTarget(new TargetCardInYourGraveyard(filter));
        this.addAbility(ability);
        this.addWatcher(new PlayerAttackedWatcher());

    }
View Full Code Here

        this.addAbility(new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(4)),
                new InvertCondition(RaidCondition.getInstance()),
                "<i>Raid</i> - When {this} enters the battlefield, you lose 4 life unless you attacked with a creature this turn"
        ));
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

        // <i>Raid</i> - When Mardu Hordechief enters the battlefield, if you attacked with a creature this turn, put a 1/1 white Warrior creature token onto the battlefield
        this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new MarduHordechiefToken())), RaidCondition.getInstance(),
                 "<i>Raid</i> -  When {this} enters the battlefield, if you attacked with a creature this turn, put a 1/1 white Warrior creature token onto the battlefield.", false));

        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

                new ReturnSourceFromGraveyardToBattlefieldEffect(),
                new ManaCostsImpl<>("{1}{B}"),
                RaidCondition.getInstance(),
                "<i>Raid</i> - {1}{B}: Return {this} from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn");
        this.addAbility(ability);
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

        // <em>Raid</em> - When Mardu Heart-Piercer enters the battlefield, if you attacked with a creature this turn, Mardu Heart-Piercer deals 2 damage to target creature or player.
        Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2)), RaidCondition.getInstance(),
                 "<i>Raid</i> - When {this} enters the battlefield, if you attacked with a creature this turn, {this} deals 2 damage to target creature or player.", false);
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

        // Raid - If you attacked with a creature this turn, instead Arrow Storm deals 5 damage to that creature or player and the damage can't be prevented.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
                new DamageTargetEffect(5, false),
                RaidCondition.getInstance(),
                "<br/><br/><i>Raid</i> - If you attacked with a creature this turn, instead {this} deals 5 damage to that creature or player and the damage can't be prevented"));
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

TOP

Related Classes of mage.watchers.common.PlayerAttackedWatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.