mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Fixed cards that used EntersBattlefieldAbility instead of EntersBattlefieldTriggeredAbility
This commit is contained in:
parent
68d8c5dcc2
commit
fac0b0046d
8 changed files with 29 additions and 71 deletions
|
@ -25,7 +25,6 @@
|
||||||
* authors and should not be interpreted as representing official policies, either expressed
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
* or implied, of BetaSteward_at_googlemail.com.
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package mage.sets.championsofkamigawa;
|
package mage.sets.championsofkamigawa;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -35,16 +34,13 @@ import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.Mana;
|
import mage.Mana;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.effects.common.ManaEffect;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.players.Player;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Loki
|
* @author Loki, North
|
||||||
*/
|
*/
|
||||||
public class AkkiRockspeaker extends CardImpl<AkkiRockspeaker> {
|
public class AkkiRockspeaker extends CardImpl<AkkiRockspeaker> {
|
||||||
|
|
||||||
|
@ -53,10 +49,12 @@ public class AkkiRockspeaker extends CardImpl<AkkiRockspeaker> {
|
||||||
this.expansionSetCode = "CHK";
|
this.expansionSetCode = "CHK";
|
||||||
this.subtype.add("Goblin");
|
this.subtype.add("Goblin");
|
||||||
this.subtype.add("Shaman");
|
this.subtype.add("Shaman");
|
||||||
|
|
||||||
this.color.setRed(true);
|
this.color.setRed(true);
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
this.addAbility(new EntersBattlefieldAbility(new AkkiRockspeakerEffect(), "add {R} to your mana pool"));
|
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new ManaEffect(new Mana(Constants.ColoredManaSymbol.R))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AkkiRockspeaker(final AkkiRockspeaker card) {
|
public AkkiRockspeaker(final AkkiRockspeaker card) {
|
||||||
|
@ -68,28 +66,3 @@ public class AkkiRockspeaker extends CardImpl<AkkiRockspeaker> {
|
||||||
return new AkkiRockspeaker(this);
|
return new AkkiRockspeaker(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AkkiRockspeakerEffect extends OneShotEffect<AkkiRockspeakerEffect> {
|
|
||||||
AkkiRockspeakerEffect() {
|
|
||||||
super(Constants.Outcome.PutManaInPool);
|
|
||||||
}
|
|
||||||
|
|
||||||
AkkiRockspeakerEffect(final AkkiRockspeakerEffect effect) {
|
|
||||||
super(effect);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
|
||||||
if (player != null) {
|
|
||||||
player.getManaPool().changeMana(Mana.RedMana);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AkkiRockspeakerEffect copy() {
|
|
||||||
return new AkkiRockspeakerEffect(this);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Duration;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||||
import mage.abilities.keyword.FlashAbility;
|
import mage.abilities.keyword.FlashAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -50,11 +50,13 @@ public class AffaGuardHound extends CardImpl<AffaGuardHound> {
|
||||||
super(ownerId, 14, "Affa Guard Hound", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
super(ownerId, 14, "Affa Guard Hound", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||||
this.expansionSetCode = "ROE";
|
this.expansionSetCode = "ROE";
|
||||||
this.subtype.add("Hound");
|
this.subtype.add("Hound");
|
||||||
|
|
||||||
this.color.setWhite(true);
|
this.color.setWhite(true);
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
this.addAbility(FlashAbility.getInstance());
|
this.addAbility(FlashAbility.getInstance());
|
||||||
Ability ability = new EntersBattlefieldAbility(new BoostTargetEffect(0, 3, Duration.EndOfTurn), "target creature gets +0/+3 until end of turn");
|
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(0, 3, Duration.EndOfTurn));
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ import mage.filter.common.FilterLandPermanent;
|
||||||
*/
|
*/
|
||||||
public class BlackcleaveCliffs extends CardImpl<BlackcleaveCliffs> {
|
public class BlackcleaveCliffs extends CardImpl<BlackcleaveCliffs> {
|
||||||
|
|
||||||
private static FilterLandPermanent filter = new FilterLandPermanent();
|
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.setScopeSubtype(ComparisonScope.Any);
|
filter.setScopeSubtype(ComparisonScope.Any);
|
||||||
|
|
|
@ -32,14 +32,12 @@ import java.util.UUID;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: Javadoc me
|
|
||||||
*
|
*
|
||||||
* @author maurer.it_at_gmail.com
|
* @author maurer.it_at_gmail.com
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -32,35 +32,31 @@ import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.filter.common.FilterArtifactPermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Loki
|
* @author Loki, North
|
||||||
*/
|
*/
|
||||||
public class OxiddaScrapmelter extends CardImpl<OxiddaScrapmelter> {
|
public class OxiddaScrapmelter extends CardImpl<OxiddaScrapmelter> {
|
||||||
private static FilterPermanent filter = new FilterPermanent("artifact");
|
private static final FilterArtifactPermanent filter = new FilterArtifactPermanent("artifact");
|
||||||
|
|
||||||
static {
|
|
||||||
filter.getCardType().add(CardType.ARTIFACT);
|
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
|
||||||
|
|
||||||
public OxiddaScrapmelter (UUID ownerId) {
|
public OxiddaScrapmelter (UUID ownerId) {
|
||||||
super(ownerId, 101, "Oxidda Scrapmelter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
super(ownerId, 101, "Oxidda Scrapmelter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||||
this.expansionSetCode = "SOM";
|
this.expansionSetCode = "SOM";
|
||||||
this.subtype.add("Beast");
|
this.subtype.add("Beast");
|
||||||
|
|
||||||
this.color.setRed(true);
|
this.color.setRed(true);
|
||||||
this.power = new MageInt(3);
|
this.power = new MageInt(3);
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
Ability ability = new EntersBattlefieldAbility(new DestroyTargetEffect(), "destroy target artifact");
|
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
|
||||||
ability.addTarget(new TargetPermanent(filter));
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,11 +30,8 @@ package mage.sets.scarsofmirrodin;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Duration;
|
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.Constants.Zone;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.DestroyAllEffect;
|
import mage.abilities.effects.common.DestroyAllEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
|
|
@ -32,11 +32,10 @@ import java.util.UUID;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
import mage.abilities.effects.common.search.SearchLibraryRevealPutInHandEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.filter.Filter;
|
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
|
|
||||||
|
@ -45,23 +44,23 @@ import mage.target.common.TargetCardInLibrary;
|
||||||
* @author Loki
|
* @author Loki
|
||||||
*/
|
*/
|
||||||
public class PilgrimsEye extends CardImpl<PilgrimsEye> {
|
public class PilgrimsEye extends CardImpl<PilgrimsEye> {
|
||||||
private static FilterCard filter = new FilterCard("basic land card");
|
private static final FilterCard filter = new FilterCard("basic land card");
|
||||||
|
|
||||||
static {
|
static {
|
||||||
filter.getSupertype().add("Basic");
|
filter.getSupertype().add("Basic");
|
||||||
filter.setScopeSupertype(Filter.ComparisonScope.Any);
|
|
||||||
filter.getCardType().add(CardType.LAND);
|
filter.getCardType().add(CardType.LAND);
|
||||||
filter.setScopeCardType(Filter.ComparisonScope.Any);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PilgrimsEye (UUID ownerId) {
|
public PilgrimsEye (UUID ownerId) {
|
||||||
super(ownerId, 128, "Pilgrim's Eye", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
|
super(ownerId, 128, "Pilgrim's Eye", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
|
||||||
this.expansionSetCode = "WWK";
|
this.expansionSetCode = "WWK";
|
||||||
this.subtype.add("Thopter");
|
this.subtype.add("Thopter");
|
||||||
|
|
||||||
this.power = new MageInt(1);
|
this.power = new MageInt(1);
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
this.addAbility(new EntersBattlefieldAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter)), "you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library"));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryRevealPutInHandEffect(new TargetCardInLibrary(filter))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public PilgrimsEye (final PilgrimsEye card) {
|
public PilgrimsEye (final PilgrimsEye card) {
|
||||||
|
|
|
@ -90,15 +90,8 @@ public class SearchLibraryRevealPutInHandEffect extends SearchEffect<SearchLibra
|
||||||
else {
|
else {
|
||||||
sb.append("a ").append(target.getTargetName()).append(", reveal that card, and put it into your hand");
|
sb.append("a ").append(target.getTargetName()).append(", reveal that card, and put it into your hand");
|
||||||
}
|
}
|
||||||
sb.append(". Then shuffle your library");
|
sb.append(", then shuffle your library");
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
|
||||||
// public void setSource(Ability ability) {
|
|
||||||
// super.setSource(ability);
|
|
||||||
// target.setAbility(ability);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue