congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
RepairAbility
Code IndexAdd Tabnine to your IDE (free)

How to use
RepairAbility
in
mage.abilities.keyword

Best Java code snippets using mage.abilities.keyword.RepairAbility (Showing top 19 results out of 315)

origin: magefree/mage

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

public RepairAbility(int count) {
  super(new AddCountersSourceEffect(CounterType.REPAIR.createInstance(), new StaticValue(count), false, true));
  addSubAbility(new RepairBeginningOfUpkeepInterveningIfTriggeredAbility());
  addSubAbility(new RepairCastFromGraveyardTriggeredAbility());
  ruleText = "Repair " + count + " <i>(When this creature dies, put " + count
      + " repair counters on it. At the beginning of your upkeep, remove a repair counter. "
      + "Whenever the last is removed, you may cast it from graveyard until end of turn.)</i>";
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
      Set<Card> cards = controller.getGraveyard().getCards(filterCard, game);
      cards.stream().forEach((card) -> {
        game.getState().addOtherAbility(card, new RepairAbility(6));
      });
      return true;
    }
    return false;
  }
}
origin: magefree/mage

public SuperBattleDroid(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}{U}");
  this.subtype.add(SubType.DROID);
  this.power = new MageInt(4);
  this.toughness = new MageInt(5);
  // Repair 2
  this.addAbility(new RepairAbility(2));
}
origin: magefree/mage

public MaintenanceHangar(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
  // At the beginning of your upkeep, remove an additional repair counter from each card in your graveyard.
  this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RemoveCounterMaintenanceHangarEffect(), TargetController.YOU, false));
  // Starship creatures you control and starship creatures in your graveyard have Repair 6.
  Effect effect = new GainAbilityControlledEffect(new RepairAbility(6), Duration.WhileOnBattlefield, filterPermanent);
  effect.setText("Starship creatures you control");
  Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
  ability.addEffect(new MaintenanceHangarEffect());
  this.addAbility(ability);
}
origin: magefree/mage

public DarkTrooper(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
  this.subtype.add(SubType.DROID);
  this.subtype.add(SubType.TROOPER);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // Repair 2
  this.addAbility(new RepairAbility(2));
}
origin: magefree/mage

public TriFighter(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{U/B}{U/B}");
  this.subtype.add(SubType.DROID);
  this.subtype.add(SubType.STARSHIP);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // Spaceflight
  this.addAbility(SpaceflightAbility.getInstance());
  // Repair 3
  this.addAbility(new RepairAbility(3));
}
origin: magefree/mage

public MouseDroid(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{U}");
  
  this.subtype.add(SubType.DROID);
  this.power = new MageInt(0);
  this.toughness = new MageInt(1);
  // When Mouse Droid dies, draw a card.
  this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(1)));
  // Repair 3
  this.addAbility(new RepairAbility(3));
}
origin: magefree/mage

public SecurityDroid(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{W}");
  this.subtype.add(SubType.DROID);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // When Security Droid enters the battlefield, create a 1/1 colorless Droid creature token.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new DroidToken(), 1), false));
  
  // Repair 3
  this.addAbility(new RepairAbility(3));
}
origin: magefree/mage

public MaintenanceDroid(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{W}{U}");
  this.subtype.add(SubType.DROID);
  this.power = new MageInt(1);
  this.toughness = new MageInt(2);
  // {T}: Choose target card you own with a repair counter on it. You may remove a repair counter from it or put another repair counter on it.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MaintenanceDroidEffect(), new TapSourceCost());
  ability.addTarget(new TargetCardInYourGraveyard(filter));
  this.addAbility(ability);
  // Repair 4
  this.addAbility(new RepairAbility(4));
}
origin: magefree/mage

public ArmedProtocolDroid(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{U}");
  this.subtype.add(SubType.DROID);
  this.subtype.add(SubType.ROGUE);
  this.power = new MageInt(1);
  this.toughness = new MageInt(3);
  // When {this} enters the battlefield, target nonartifact creature gets -2/-0 until end of turn.
  Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(-2, 0, Duration.EndOfTurn), false);
  ability.addTarget(new TargetCreaturePermanent(filter));
  this.addAbility(ability);
  // Repair 3
  this.addAbility(new RepairAbility(3));
}
origin: magefree/mage

public ProbeDroid(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{1}{U}");
  this.subtype.add(SubType.DROID);
  this.subtype.add(SubType.SCOUT);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // When Probe Droid enters the battlefield, target player reveals their hand.
  Ability ability = new EntersBattlefieldTriggeredAbility(new LookAtTargetPlayerHandEffect());
  ability.addTarget(new TargetPlayer());
  this.addAbility(ability);
  // Repair 3
  this.addAbility(new RepairAbility(3));
}
origin: magefree/mage

public Droideka(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{4}{W}");
  this.subtype.add(SubType.DROID);
  this.power = new MageInt(3);
  this.toughness = new MageInt(6);
  // {2}{U}: Change a target of target spell or ability to Droideka.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChangeATargetOfTargetSpellAbilityToSourceEffect(), new ManaCostsImpl("{2}{U}"));
  ability.addTarget(new TargetStackObject());
  this.addAbility(ability);
  // Repair 3
  this.addAbility(new RepairAbility(3));
}
origin: magefree/mage

public DroidCommando(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{B}");
  this.subtype.add(SubType.DROID);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // When Droid Commando dies, target player loses 2 life and you gain 2 life.
  Ability ability = new DiesTriggeredAbility(new LoseLifeTargetEffect(2));
  ability.addEffect(new GainLifeEffect(2));
  ability.addTarget(new TargetPlayer());
  this.addAbility(ability);
  // Repair 3
  this.addAbility(new RepairAbility(3));
}
origin: magefree/mage

public C3POAndR2D2(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{W}{U}");
  addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.DROID);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // When C-3PO and R2D2 leaves the battlefield, you gain 4 life and draw a card.
  Ability ability = new LeavesBattlefieldTriggeredAbility(new GainLifeEffect(4), false);
  Effect effect = new DrawCardSourceControllerEffect(1);
  effect.setText("and draw a card");
  ability.addEffect(effect);
  this.addAbility(ability);
  // Repair 2
  this.addAbility(new RepairAbility(2));
}
origin: magefree/mage

public IG88B(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}{B}");
  addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.DROID);
  this.subtype.add(SubType.HUNTER);
  this.power = new MageInt(1);
  this.toughness = new MageInt(4);
  // Deathtouch
  this.addAbility(DeathtouchAbility.getInstance());
  // <i>Bounty</i> &mdash; Whenever IF-88B deals combat damage to a player, that player loses life equal to the number of bounty counters on creatures he or she controls.
  this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
      new LoseLifeTargetEffect(new CountersOnDefendingPlayerCreaturesCount(CounterType.BOUNTY)),
      false,
      "<i>Bounty</i> &mdash; Whenever {this} deals combat damage to a player, that player loses life equal to the number of bounty counters on creatures he or she controls",
      true)
  );
  // Repair 3
  this.addAbility(new RepairAbility(3));
}
origin: magefree/mage

public TankDroid(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{W}{U}{B}");
  this.subtype.add(SubType.DROID);
  this.power = new MageInt(5);
  this.toughness = new MageInt(5);
  // Whenever Tank Droid enters the battlefield, attacks, blocks or dies, create a 1/1 colorless Droid token creature.
  Ability ability = new AttacksOrBlocksTriggeredAbility(new CreateTokenEffect(new DroidToken()), false);
  this.addAbility(ability);
  ability = new EntersBattlefieldOrDiesSourceTriggeredAbility(new CreateTokenEffect(new DroidToken()), false);
  this.addAbility(ability);
  // Repair 3
  this.addAbility(new RepairAbility(3));
}
origin: magefree/mage

public AstromechDroid(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{W}");
  
  this.subtype.add(SubType.DROID);
  this.power = new MageInt(0);
  this.toughness = new MageInt(1);
  // {T}: Target starship creature you control gets +1/+1 and gains vigilance until end of turn.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
      new BoostTargetEffect(1, 1, Duration.EndOfTurn)
        .setText("Target starship creature you control gets +1/+1"),
      new TapSourceCost());
  ability.addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn)
        .setText("and gains vigilance until end of turn"));
  ability.addTarget(new TargetCreaturePermanent(filter));
  this.addAbility(ability);
  // Repair 4
  this.addAbility(new RepairAbility(4));
}
origin: magefree/mage

public AAT1(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{W}{U}{B}");
  this.subtype.add(SubType.DROID);
  this.subtype.add(SubType.CONSTRUCT);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  // Whenever a repair counter is removed from a creature card your graveyard, you may pay {W/B}. If you do, target player loses 1 life and you gain 1 life. 
  DoIfCostPaid effect = new DoIfCostPaid(new LoseLifeTargetEffect(1), new ManaCostsImpl("{W/B}"));
  Effect additionalEffect = new GainLifeEffect(1);
  additionalEffect.setText("and you gain 1 life");
  effect.addEffect(additionalEffect);
  Ability ability = new AAT1TriggeredAbility(effect);
  ability.addTarget(new TargetPlayer());
  this.addAbility(ability);
  // Repair 4
  this.addAbility(new RepairAbility(4));
}
mage.abilities.keywordRepairAbility

Most used methods

  • <init>
  • addSubAbility

Popular in Java

  • Finding current android device location
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JList (javax.swing)
  • JPanel (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for WebStorm
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