Package mage.abilities.common

Examples of mage.abilities.common.OnEventTriggeredAbility


      Permanent creature = game.getPermanent(enchantment.getAttachedTo());
      if (creature != null) {
        switch (layer) {
          case AbilityAddingRemovingEffects_6:
            if (sublayer == SubLayer.NA) {
              creature.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new SacrificeSourceEffect()));
              creature.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new NecroticPlagueEffect2(source.getSourceId()), false));
            }
            break;
        }
        return true;
View Full Code Here


    this.color.setRed(true);
    this.power = new MageInt(5);
    this.toughness = new MageInt(1);

    this.addAbility(HasteAbility.getInstance());
    this.addAbility(new OnEventTriggeredAbility(EventType.END_TURN_STEP_PRE, "beginning of the end step", new SacrificeSourceEffect()));
  }
View Full Code Here

        // Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Hired Muscle.  
        this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), filter, true));
       
        // At the beginning of the end step, if there are two or more ki counters on Hired Muscle, you may flip it.
        this.addAbility(new ConditionalTriggeredAbility(
                new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new Scarmaker())),
                new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
                "At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it.", true));
    }
View Full Code Here

        this.power = new MageInt(5);
        this.toughness = new MageInt(3);
        this.addAbility(TrampleAbility.getInstance());
        this.addAbility(HasteAbility.getInstance());
        this.addAbility(InfectAbility.getInstance());
        this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()));
    }
View Full Code Here

        // At the beginning of each player's upkeep, that player sacrifices a non-Zombie creature.
        Ability ability = new BeginningOfUpkeepTriggeredAbility(new SacrificeEffect(filter, 1, "that player "), TargetController.ANY, false);
        this.addAbility(ability);
        // At the beginning of the end step, if no creatures are on the battlefield, sacrifice Call to the Grave.
        TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect());
        this.addAbility(new ConditionalTriggeredAbility(triggered, new NoCreatureCondition(), ruleText));
    }
View Full Code Here

        this.color.setBlack(true);

        // At the beginning of your upkeep, put X 2/2 black Zombie creature tokens onto the battlefield,
        // where X is half the number of Zombies you control, rounded down.
        this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep",
                new CreateTokenEffect(new ZombieToken("ISD"), new HalfZombiesCount())));

    }
View Full Code Here

        this.power = new MageInt(5);
        this.toughness = new MageInt(4);

        this.addAbility(FlyingAbility.getInstance());
        // At the beginning of your upkeep, target player draws a card and loses 1 life.
        Ability ability = new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new DrawCardTargetEffect(1), false);
        ability.addEffect(new LoseLifeTargetEffect(1));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
    }
View Full Code Here

    public TortureChamber(UUID ownerId) {
        super(ownerId, 303, "Torture Chamber", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{3}");
        this.expansionSetCode = "TMP";

        // At the beginning of your upkeep, put a pain counter on Torture Chamber.
        this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new AddCountersSourceEffect(CounterType.PAIN.createInstance())));
        // At the beginning of your end step, Torture Chamber deals damage to you equal to the number of pain counters on it.
        this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new TortureChamberEffect1(), false));
        // {1}, {tap}, Remove all pain counters from Torture Chamber: Torture Chamber deals damage to target creature equal to the number of pain counters removed this way.
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TortureChamberEffect2(), new GenericManaCost(1));
        ability.addCost(new TapSourceCost());
View Full Code Here

        this.addAbility(TrampleAbility.getInstance());
        // Splinterfright's power and toughness are each equal to the number of creature cards in your graveyard.
        CardsInControllerGraveyardCount count = new CardsInControllerGraveyardCount(new FilterCreatureCard("creature cards"));
        this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(count, Duration.EndOfGame)));
        // At the beginning of your upkeep, put the top two cards of your library into your graveyard.
        this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new PutTopCardOfLibraryIntoGraveControllerEffect(2), false));
    }
View Full Code Here

        this.color.setWhite(true);

        // At the beginning of your upkeep, destroy all artifacts and enchantments. They can't be regenerated.
        Effect effect = new DestroyAllEffect(new FilterPermanent(filter), true);
        Ability ability = new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", effect, false);
        this.addAbility(ability);
    }
View Full Code Here

TOP

Related Classes of mage.abilities.common.OnEventTriggeredAbility

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.