Tabnine Logo
SacrificeSourceEffect.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
mage.abilities.effects.common.SacrificeSourceEffect
constructor

Best Java code snippets using mage.abilities.effects.common.SacrificeSourceEffect.<init> (Showing top 20 results out of 315)

origin: magefree/mage

public EvokeAbility(Card card, String manaString) {
  super(Zone.ALL, null);
  name = EVOKE_KEYWORD;
  this.addEvokeCost(manaString);
  Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceEffect()), EvokedCondition.instance, "Sacrifice {this} when it enters the battlefield and was evoked.");
  ability.setRuleVisible(false);
  addSubAbility(ability);
}
origin: magefree/mage

public EndangeredArmodon(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}");
  this.subtype.add(SubType.ELEPHANT);
  this.power = new MageInt(4);
  this.toughness = new MageInt(5);
  // When you control a creature with toughness 2 or less, sacrifice Endangered Armodon.
  this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
      filter,
      new SacrificeSourceEffect()));
}
origin: magefree/mage

public TarPitWarrior(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
  this.subtype.add(SubType.CYCLOPS);
  this.subtype.add(SubType.WARRIOR);
  this.power = new MageInt(3);
  this.toughness = new MageInt(4);
  // When Tar Pit Warrior becomes the target of a spell or ability, sacrifice it.
  this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect()));
}
origin: magefree/mage

public CrumblingColossus(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}");
  this.subtype.add(SubType.GOLEM);
  this.power = new MageInt(7);
  this.toughness = new MageInt(4);
  this.addAbility(TrampleAbility.getInstance());
  this.addAbility(new AttacksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect())), false));
}
origin: magefree/mage

public VeilApparitionToken() {
  super("Illusion", "3/3 Illusion creature with flying and \"At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}.");
  cardType.add(CardType.CREATURE);
  subtype.add(SubType.ILLUSION);
  power = new MageInt(3);
  toughness = new MageInt(3);
  Ability ability = new BeginningOfUpkeepTriggeredAbility(new DoUnlessControllerPaysEffect(new SacrificeSourceEffect(), new ManaCostsImpl("{1}{U}")), TargetController.YOU, false);
  this.addAbility(ability);
}
origin: magefree/mage

public EnergyField(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
  // Prevent all damage that would be dealt to you by sources you don't control.
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EnergyFieldEffect()));
  // When a card is put into your graveyard from anywhere, sacrifice Energy Field.
  this.addAbility(new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
      new SacrificeSourceEffect(), false, TargetController.YOU));
}
origin: magefree/mage

public PhantasmalBear(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}");
  this.subtype.add(SubType.BEAR);
  this.subtype.add(SubType.ILLUSION);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // When Phantasmal Bear becomes the target of a spell or ability, sacrifice it.
  this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect()));
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  ActivationInfo activationInfo = ActivationInfo.getInstance(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
  activationInfo.addActivation(game);
  if (activationInfo.getActivationCounter() >= 4) {
    DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect());
    game.addDelayedTriggeredAbility(delayedAbility, source);
  }
  return true;
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  ActivationInfo activationInfo = ActivationInfo.getInstance(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
  activationInfo.addActivation(game);
  if (activationInfo.getActivationCounter() == 4) {
    DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect());
    game.addDelayedTriggeredAbility(delayedAbility, source);
  }
  return true;
}
origin: magefree/mage

public PhantasmalAbomination(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
  this.subtype.add(SubType.ILLUSION);
  this.power = new MageInt(5);
  this.toughness = new MageInt(5);
  this.addAbility(DefenderAbility.getInstance());
  this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect()));
}
origin: magefree/mage

public BarbarianOutcast(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
  this.subtype.add(SubType.HUMAN, SubType.BARBARIAN, SubType.BEAST);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // When you control no Swamps, sacrifice Barbarian Outcast.
  this.addAbility(new ControlsPermanentsControllerTriggeredAbility(
      new FilterLandPermanent(SubType.SWAMP, "no Swamps"), ComparisonType.EQUAL_TO, 0,
      new SacrificeSourceEffect()));
}
origin: magefree/mage

public SpiritualAsylum(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}");
  // Creatures and lands you control have shroud.
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ShroudAbility.getInstance(),
      Duration.WhileOnBattlefield, filter)));
  // When a creature you control attacks, sacrifice Spiritual Asylum.
  AttacksCreatureYouControlTriggeredAbility ability = new AttacksCreatureYouControlTriggeredAbility(new SacrificeSourceEffect());
  ability.setOnce(true);
  this.addAbility(ability);
}
origin: magefree/mage

public Groundbreaker(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}{G}");
  this.subtype.add(SubType.ELEMENTAL);
  this.power = new MageInt(6);
  this.toughness = new MageInt(1);
  // Trample
  this.addAbility(TrampleAbility.getInstance());
  // Haste
  this.addAbility(HasteAbility.getInstance());
  // At the beginning of the end step, sacrifice Groundbreaker.
  this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.ANY, false));
}
origin: magefree/mage

public CallToTheGrave(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}");
  // 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 ConditionalInterveningIfTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText));
}
origin: magefree/mage

public SparkElementalToken() {
  super("Spark Elemental", "3/1 red Elemental creature token named Spark Elemental with trample, haste, and \"At the beginning of the end step, sacrifice Spark Elemental.\"");
  this.setOriginalExpansionSetCode("FUT");
  cardType.add(CardType.CREATURE);
  color.setRed(true);
  subtype.add(SubType.ELEMENTAL);
  power = new MageInt(3);
  toughness = new MageInt(1);
  this.addAbility(TrampleAbility.getInstance());
  this.addAbility(HasteAbility.getInstance());
  this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.ANY, false));
}
origin: magefree/mage

public WhisperingSpecter(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
  this.subtype.add(SubType.SPECTER);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  this.addAbility(FlyingAbility.getInstance());
  this.addAbility(InfectAbility.getInstance());
  Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new SacrificeSourceEffect(), true, true);
  ability.addEffect(new WhisperingSpecterEffect());
  this.addAbility(ability);
}
origin: magefree/mage

public IcyPrison(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}");
  // When Icy Prison enters the battlefield, exile target creature.
  Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), false);
  ability1.addTarget(new TargetCreaturePermanent());
  this.addAbility(ability1);
  // At the beginning of your upkeep, sacrifice Icy Prison unless any player pays {3}.
  this.addAbility(new BeginningOfUpkeepTriggeredAbility(
      new DoUnlessAnyPlayerPaysEffect(new SacrificeSourceEffect(), new GenericManaCost(3)), TargetController.YOU, false));
  // When Icy Prison leaves the battlefield, return the exiled card to the battlefield under its owner's control.
  this.addAbility(new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD, false, true), false));
}
origin: magefree/mage

public HellsThunder(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}");
  this.subtype.add(SubType.ELEMENTAL);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  this.addAbility(FlyingAbility.getInstance());
  this.addAbility(HasteAbility.getInstance());
  this.addAbility(new OnEventTriggeredAbility(EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect()));
  this.addAbility(new UnearthAbility(new ManaCostsImpl("{4}{R}")));
}
origin: magefree/mage

public BloodSpeaker (UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
  this.subtype.add(SubType.OGRE, SubType.SHAMAN);
  this.power = new MageInt(3);
  this.toughness = new MageInt(2);
  // At the beginning of your upkeep, you may sacrifice Blood Speaker. If you do, search your library for a Demon card, reveal that card, and put it into your hand. Then shuffle your library.
  Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceEffect(), TargetController.YOU, true);
  ability.addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterCard), true, true, "If you do, search your library for "));
  this.addAbility(ability);
  // Whenever a Demon enters the battlefield under your control, return Blood Speaker from your graveyard to your hand.
  this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), filter, false));
}
origin: magefree/mage

public GoblinCannon(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
  // {2}: Goblin Cannon deals 1 damage to any target. Sacrifice Goblin Cannon.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}"));
  ability.addTarget(new TargetAnyTarget());
  ability.addEffect(new SacrificeSourceEffect());
  this.addAbility(ability);
}
mage.abilities.effects.commonSacrificeSourceEffect<init>

Popular methods of SacrificeSourceEffect

  • apply
  • setText

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • addToBackStack (FragmentTransaction)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Table (org.hibernate.mapping)
    A relational table
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now