congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CanAttackAsThoughItDidntHaveDefenderSourceEffect
Code IndexAdd Tabnine to your IDE (free)

How to use
CanAttackAsThoughItDidntHaveDefenderSourceEffect
in
mage.abilities.effects.common.combat

Best Java code snippets using mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect (Showing top 20 results out of 315)

origin: magefree/mage

@Override
public CanAttackAsThoughItDidntHaveDefenderSourceEffect copy() {
  return new CanAttackAsThoughItDidntHaveDefenderSourceEffect(this);
}
origin: magefree/mage

public PistonFistCyclops(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U/R}{U/R}");
  this.subtype.add(SubType.CYCLOPS);
  this.power = new MageInt(4);
  this.toughness = new MageInt(3);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // As long as you've cast an instant or sorcery spell this turn, Piston-Fist Cyclops can attack as though it didn't have defender.
  this.addAbility(new SimpleStaticAbility(
      Zone.BATTLEFIELD,
      new ConditionalAsThoughEffect(
          new CanAttackAsThoughItDidntHaveDefenderSourceEffect(
              Duration.WhileOnBattlefield
          ), PistonFistCyclopsCondition.instance)
          .setText("As long as you've cast an instant or sorcery spell this turn, "
              + "{this} can attack as though it didn't have defender")
  ),
       new SpellsCastWatcher());
}
origin: magefree/mage

public MirrorWall(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
  this.subtype.add(SubType.WALL);
  this.power = new MageInt(3);
  this.toughness = new MageInt(4);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // {W}: Mirror Wall can attack this turn as though it didn't have defender.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
      new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn),
      new ManaCostsImpl("{W}")));
}
origin: magefree/mage

public ReturnedPhalanx(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
  this.subtype.add(SubType.ZOMBIE);
  this.subtype.add(SubType.SOLDIER);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // {1}{U}: Returned Phalanx can attack this turn as though it didn't have defender.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}")));
}
origin: magefree/mage

public GladeWatcher(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
  this.subtype.add(SubType.ELEMENTAL);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // <i>Formidable</i> &mdash; {G}: Glade Watcher can attack this turn as though it didn't have defender. Activate this ability only if creatures you control have total power 8 or greater.
  Ability ability = new ActivateIfConditionActivatedAbility(
      Zone.BATTLEFIELD,
      new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn),
      new ManaCostsImpl("{G}"),
      FormidableCondition.instance);
  ability.setAbilityWord(AbilityWord.FORMIDABLE);
  this.addAbility(ability);
}
origin: magefree/mage

public PillarOfWar(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}");
  this.subtype.add(SubType.GOLEM);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // As long as Pillar of War is enchanted, it can attack as though it didn't have defender.
  Effect effect = new ConditionalAsThoughEffect(
      new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
      new EnchantedSourceCondition());
  effect.setText("As long as {this} is enchanted, it can attack as though it didn't have defender");
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));        
  
}
origin: magefree/mage

public ThoughtboundPhantasm(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
  this.subtype.add(SubType.SPIRIT);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // Whenever you surveil, put a +1/+1 counter on Thoughtbound Phantasm.
  this.addAbility(new ThoughtboundPhantasmTriggeredAbility());
  // As long as Thoughtbound Phantasm has three or more +1/+1 counters on it, it can attack as though it didn't have defender.
  this.addAbility(new SimpleStaticAbility(
      Zone.BATTLEFIELD,
      new ConditionalAsThoughEffect(
          new CanAttackAsThoughItDidntHaveDefenderSourceEffect(
              Duration.WhileOnBattlefield
          ), new SourceHasCounterCondition(CounterType.P1P1, 3)
      ).setText("As long as {this} has three "
          + "or more +1/+1 counters on it, "
          + "it can attack as though it "
          + "didn't have defender.")
  ));
}
origin: magefree/mage

public HightideHermit(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
  this.subtype.add(SubType.CRAB);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // When Hightide Hermit enters the battlefield, you get {E}{E}{E}{E}.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(4)));
  // Pay {E}{E}: Hightide Hermit can attack this turn as though it didn't have defender.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), new PayEnergyCost(2)));
}
origin: magefree/mage

public GeistOfTheLonelyVigil(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
  this.subtype.add(SubType.SPIRIT);
  this.subtype.add(SubType.CLERIC);
  this.power = new MageInt(2);
  this.toughness = new MageInt(3);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // <i>Delirium</i> &mdash; Geist of the Lonely Vigil can attack as though it didn't have defender as long as there are four or more card types among cards in your graveyard.
  Effect effect = new ConditionalAsThoughEffect(
      new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
      DeliriumCondition.instance);
  effect.setText("<i>Delirium</i> &mdash; {this} can attack as though it didn't have defender as long as there are four or more card types among cards in your graveyard");
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}
origin: magefree/mage

public Scuttlegator(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G/U}{G/U}");
  this.subtype.add(SubType.CRAB);
  this.subtype.add(SubType.TURTLE);
  this.subtype.add(SubType.CROCODILE);
  this.power = new MageInt(6);
  this.toughness = new MageInt(6);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // {6}{G/U}{G/U}: Adapt 3.
  this.addAbility(new AdaptAbility(3, "{6}{G/U}{G/U}"));
  // As long as Scuttlegator has a +1/+1 counter on it, it can attack as though it didn't have defender.
  this.addAbility(new SimpleStaticAbility(
      Zone.BATTLEFIELD,
      new ConditionalAsThoughEffect(
          new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
          new SourceHasCounterCondition(CounterType.P1P1)
      ).setText("As long as {this} has a +1/+1 counter on it, " +
          "it can attack as though it didn't have defender.")
  ));
}
origin: magefree/mage

public SpireSerpent(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
  this.subtype.add(SubType.SERPENT);
  this.color.setBlue(true);
  this.power = new MageInt(3);
  this.toughness = new MageInt(5);
  this.addAbility(DefenderAbility.getInstance());
  ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), MetalcraftCondition.instance, abilityText1);
  Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect1);
  Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
      MetalcraftCondition.instance);
  effect.setText("and can attack as though it didn't have defender");
  ability.addEffect(effect);
  this.addAbility(ability);
}
origin: magefree/mage

public AnimateWall(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{W}");
  this.subtype.add(SubType.AURA);
  // Enchant Wall
  TargetPermanent auraTarget = new TargetCreaturePermanent(filter);
  this.getSpellAbility().addTarget(auraTarget);
  this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
  Ability ability = new EnchantAbility(auraTarget.getTargetName());
  this.addAbility(ability);
  
  // Enchanted Wall can attack as though it didn't have defender.
  Ability canAttackAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield));
  Effect enchantEffect = new GainAbilityAttachedEffect(canAttackAbility, AttachmentType.AURA, Duration.WhileOnBattlefield);
  enchantEffect.setText("Enchanted Wall can attack as though it didn't have defender");
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, enchantEffect));
}
origin: magefree/mage

public SlitheringShade(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
  this.subtype.add(SubType.SHADE);
  this.power = new MageInt(0);
  this.toughness = new MageInt(1);
  //Defender
  this.addAbility(DefenderAbility.getInstance());
  //{B}: Slithering Shade gets +1/+1 until end of turn.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{B}")));
  // Hellbent — Slithering Shade can attack as though it didn't have defender as long as you have no cards in hand.
  Effect effect = new ConditionalAsThoughEffect(
      new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
      HellbentCondition.instance);
  effect.setText("<i>Hellbent</i> &mdash; {this} can attack as though it didn't have defender as long as you have no cards in hand");
  this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
}
origin: magefree/mage

public DarkMaze(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}");
  this.subtype.add(SubType.WALL);
  this.power = new MageInt(4);
  this.toughness = new MageInt(5);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // {0}: Dark Maze can attack this turn as though it didn't have defender. Exile it at the beginning of the next end step.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
      new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn),
      new GenericManaCost(0));
  ability.addEffect(new CreateDelayedTriggeredAbilityEffect(
      new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ExileSourceEffect())));
  this.addAbility(ability);
}
origin: magefree/mage

public WalkingWall(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}");
  this.subtype.add(SubType.WALL);
  this.power = new MageInt(0);
  this.toughness = new MageInt(6);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // {3}: Walking Wall gets +3/-1 until end of turn and can attack this turn as though it didn't have defender. Activate this ability only once each turn.
  Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, -1, Duration.EndOfTurn), new GenericManaCost(3));
  ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn));
  this.addAbility(ability);
}
origin: magefree/mage

public WallOfWonder(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}");
  this.subtype.add(SubType.WALL);
  this.power = new MageInt(1);
  this.toughness = new MageInt(5);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // {2}{U}{U}: Wall of Wonder gets +4/-4 until end of turn and can attack this turn as though it didn't have defender.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(4, -4, Duration.EndOfTurn),
    new ManaCostsImpl("{2}{U}{U}"));
  ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn));
  this.addAbility(ability);
}
origin: magefree/mage

public VodalianWarMachine(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
  this.subtype.add(SubType.WALL);
  this.power = new MageInt(0);
  this.toughness = new MageInt(4);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // Tap an untapped Merfolk you control: Vodalian War Machine can attack this turn as though it didn't have defender.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
  this.addAbility(ability);
  // Tap an untapped Merfolk you control: Vodalian War Machine gets +2/+1 until end of turn.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 1, Duration.EndOfTurn), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))));
  // When Vodalian War Machine dies, destroy all Merfolk tapped this turn to pay for its abilities.
  this.addAbility(new VodalianWarMachineTriggeredAbility(), new VodalianWarMachineWatcher());
}
origin: magefree/mage

public ColossusOfAkros(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{8}");
  this.subtype.add(SubType.GOLEM);
  this.power = new MageInt(10);
  this.toughness = new MageInt(10);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // indestructible.
  this.addAbility(IndestructibleAbility.getInstance());
  // {10}: Monstrosity 10.
  this.addAbility(new MonstrosityAbility("{10}", 10));
  // As long as Colossus of Akros is monstrous, it has trample and can attack as though it didn't have defender.
  Ability ability = new SimpleStaticAbility(
      Zone.BATTLEFIELD,
      new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield),
      MonstrousCondition.instance,
      "As long as {this} is monstrous, it has trample"));
  Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield),
      MonstrousCondition.instance);
  effect.setText("and can attack as though it didn't have defender");
  ability.addEffect(effect);
  this.addAbility(ability);
}
origin: magefree/mage

public PrisonBarricade(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
  this.subtype.add(SubType.WALL);
  this.power = new MageInt(1);
  this.toughness = new MageInt(3);
  // Kicker {1}{W}
  this.addAbility(new KickerAbility("{1}{W}"));
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  // If Prison Barricade was kicked, it enters the battlefield with a +1/+1 counter on it and with "Prison Barricade can attack as though it didn't have defender."
  Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)),
      KickedCondition.instance, "If {this} was kicked, it enters the battlefield with a +1/+1 counter on it and with \"{this} can attack as though it didn't have defender.\"", "");
  ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield));
  this.addAbility(ability);
}
origin: magefree/mage

public MobileFort(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}");
  this.subtype.add(SubType.WALL);
  this.power = new MageInt(0);
  this.toughness = new MageInt(6);
  // Defender
  this.addAbility(DefenderAbility.getInstance());
  
  // {3}: Mobile Fort gets +3/-1 until end of turn and can attack this turn as though it didn't have defender. Activate this ability only once each turn.
  Effect effect = new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn);
  effect.setText("and can attack as though it didn't have defender");
  Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, -1, Duration.EndOfTurn), new ManaCostsImpl("{3}"));
  ability.addEffect(effect);
  this.addAbility(ability);
}
mage.abilities.effects.common.combatCanAttackAsThoughItDidntHaveDefenderSourceEffect

Most used methods

  • <init>

Popular in Java

  • Updating database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JFrame (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Table (org.hibernate.mapping)
    A relational table
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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