Move DealsDamageToOpponentTriggeredAbility out of effects directory

It is obviously an ability and not an effect...
This commit is contained in:
LoneFox 2015-08-05 07:51:23 +03:00
parent 17d6fc327f
commit e9a7257703
14 changed files with 31 additions and 31 deletions

View file

@ -29,7 +29,7 @@ package mage.sets.alarareborn;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
@ -54,7 +54,7 @@ public class VedalkenHeretic extends CardImpl {
// Whenever Vedalken Heretic deals damage to an opponent, you may draw a card.
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DrawCardSourceControllerEffect(1), true));
}
public VedalkenHeretic(final VedalkenHeretic card) {

View file

@ -30,8 +30,8 @@ package mage.sets.apocalypse;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.abilities.keyword.TrampleAbility;

View file

@ -30,8 +30,8 @@ package mage.sets.avacynrestored;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.GainAbilityPairedEffect;
import mage.abilities.keyword.SoulbondAbility;

View file

@ -31,8 +31,8 @@ import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;

View file

@ -29,7 +29,7 @@ package mage.sets.commander2013;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.HorsemanshipAbility;
import mage.cards.CardImpl;

View file

@ -28,14 +28,14 @@
package mage.sets.conflux;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.target.common.TargetCardInYourGraveyard;
/**

View file

@ -30,7 +30,7 @@ package mage.sets.fatereforged;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
@ -53,7 +53,7 @@ public class MindscourDragon extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Mindscour Dragon deals combat damage to an opponent, target player puts the top four cards of his or her library into his or her graveyard.
Ability ability = new DealsDamageToOpponentTriggeredAbility(new PutLibraryIntoGraveTargetEffect(4), false, true);
ability.addTarget(new TargetPlayer());

View file

@ -30,8 +30,8 @@ package mage.sets.legends;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.effects.common.discard.DiscardHandTargetEffect;
import mage.abilities.keyword.FlyingAbility;
@ -60,7 +60,7 @@ public class NicolBolas extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// At the beginning of your upkeep, sacrifice Nicol Bolas unless you pay {U}{B}{R}.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{U}{B}{R}")), TargetController.YOU, false));
// Whenever Nicol Bolas deals damage to an opponent, that player discards his or her hand.
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardHandTargetEffect("that player"), false));
}

View file

@ -27,13 +27,13 @@
*/
package mage.sets.magic2010;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import java.util.UUID;
@ -65,4 +65,4 @@ public class HypnoticSpecter extends CardImpl {
public HypnoticSpecter copy() {
return new HypnoticSpecter(this);
}
}
}

View file

@ -28,13 +28,13 @@
package mage.sets.ninthedition;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*

View file

@ -29,18 +29,18 @@ package mage.sets.riseoftheeldrazi;
import java.util.UUID;
import mage.constants.*;
import mage.abilities.Ability;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.TotemArmorAbility;
import mage.cards.CardImpl;
import mage.constants.*;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -61,17 +61,17 @@ public class SnakeUmbra extends CardImpl {
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature gets +1/+1
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1, Duration.WhileOnBattlefield));
// and has "Whenever this creature deals damage to an opponent, you may draw a card."
Ability gainedAbility = new DealsDamageToOpponentTriggeredAbility(new DrawCardSourceControllerEffect(1), true);
Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA);
effect.setText("and has \"Whenever this creature deals damage to an opponent, you may draw a card.\"");
ability.addEffect(effect);
this.addAbility(ability);
// Totem armor
this.addAbility(new TotemArmorAbility());
}

View file

@ -31,9 +31,9 @@ import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.WitherAbility;
import mage.cards.CardImpl;

View file

@ -28,13 +28,13 @@
package mage.sets.timespiral;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
import mage.abilities.keyword.ShadowAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
/**
*

View file

@ -25,7 +25,7 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.abilities.effects.common;
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
@ -46,7 +46,7 @@ public class DealsDamageToOpponentTriggeredAbility extends TriggeredAbilityImpl
public DealsDamageToOpponentTriggeredAbility(Effect effect) {
this(effect, false, false);
}
public DealsDamageToOpponentTriggeredAbility(Effect effect, boolean optional) {
this(effect, optional, false);
}