[SOI] Fixed to Skulk and Investigate. Some minor tweaks to SOI cards.

This commit is contained in:
LevelX2 2016-02-09 12:37:20 +01:00
parent 2a92f5e77a
commit 60bc03e284
10 changed files with 44 additions and 88 deletions

View file

@ -44,19 +44,13 @@ import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.CardTypePredicate;
/** /**
* *
* @author fireshoes * @author fireshoes
*/ */
public class DuskwatchRecruiter extends CardImpl { public class DuskwatchRecruiter extends CardImpl {
private static final FilterCard filter = new FilterCard("a creature card");
static {
filter.add(new CardTypePredicate(CardType.CREATURE));
}
public DuskwatchRecruiter(UUID ownerId) { public DuskwatchRecruiter(UUID ownerId) {
super(ownerId, 203, "Duskwatch Recruiter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); super(ownerId, 203, "Duskwatch Recruiter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}");
@ -64,19 +58,19 @@ public class DuskwatchRecruiter extends CardImpl {
this.subtype.add("Human"); this.subtype.add("Human");
this.subtype.add("Warrior"); this.subtype.add("Warrior");
this.subtype.add("Werewolf"); this.subtype.add("Werewolf");
this.canTransform = true; this.canTransform = true;
this.secondSideCard = new KrallenhordeHowler(ownerId); this.secondSideCard = new KrallenhordeHowler(ownerId);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// {2}{G}: Look at the top three cards of your library. You may reveal a creature card from among them and put it into your hand. // {2}{G}: Look at the top three cards of your library. You may reveal a creature card from among them and put it into your hand.
// Put the rest on the bottom of your library in any order. // Put the rest on the bottom of your library in any order.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), filter, false), new LookLibraryAndPickControllerEffect(new StaticValue(3), false, new StaticValue(1), new FilterCreatureCard("a creature card"), false),
new ManaCostsImpl("{2}{G}"))); new ManaCostsImpl("{2}{G}")));
// At the beginning of each upkeep, if no spells were cast last turn, transform Duskwatch Recruiter. // At the beginning of each upkeep, if no spells were cast last turn, transform Duskwatch Recruiter.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);

View file

@ -48,8 +48,8 @@ public class ExposeEvil extends CardImpl {
// Tap up to two target creatures. // Tap up to two target creatures.
this.getSpellAbility().addEffect(new TapTargetEffect()); this.getSpellAbility().addEffect(new TapTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
// Investigate. // Investigate (Put a colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\")
this.getSpellAbility().addEffect(new InvestigateEffect()); this.getSpellAbility().addEffect(new InvestigateEffect());
} }

View file

@ -47,7 +47,7 @@ public class FurtiveHomunculus extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// Skulk // Skulk (This creature can't be blocked by creatures with greater power.)
this.addAbility(new SkulkAbility()); this.addAbility(new SkulkAbility());
} }

View file

@ -29,12 +29,14 @@ package mage.sets.shadowsoverinnistrad;
import java.util.UUID; import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DeliriumCondition; import mage.abilities.condition.common.DeliriumCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.AbilityWord;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Rarity; import mage.constants.Rarity;
@ -45,8 +47,8 @@ import mage.constants.Zone;
* @author fireshoes * @author fireshoes
*/ */
public class HoundOfTheFarbogs extends CardImpl { public class HoundOfTheFarbogs extends CardImpl {
final static private String rule = "{this} has menace as long as there are four or more card types among cards in your graveyard"; final static private String RULE = "{this} has menace as long as there are four or more card types among cards in your graveyard";
public HoundOfTheFarbogs(UUID ownerId) { public HoundOfTheFarbogs(UUID ownerId) {
super(ownerId, 117, "Hound of the Farbogs", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}"); super(ownerId, 117, "Hound of the Farbogs", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{B}");
@ -57,8 +59,10 @@ public class HoundOfTheFarbogs extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// <i>Delirium</i> &mdash; Hound of the Farborgs has menace as long as there are four or more card types among cards in your graveyard. // <i>Delirium</i> &mdash; Hound of the Farborgs has menace as long as there are four or more card types among cards in your graveyard.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), new DeliriumCondition(), rule))); new ConditionalContinuousEffect(new GainAbilitySourceEffect(new MenaceAbility(), Duration.WhileOnBattlefield), new DeliriumCondition(), RULE));
ability.setAbilityWord(AbilityWord.DELIRIUM);
this.addAbility(ability);
} }
public HoundOfTheFarbogs(final HoundOfTheFarbogs card) { public HoundOfTheFarbogs(final HoundOfTheFarbogs card) {

View file

@ -52,10 +52,10 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
*/ */
public class KrallenhordeHowler extends CardImpl { public class KrallenhordeHowler extends CardImpl {
private static final FilterCard filter = new FilterCard("Creature spells"); private static final FilterCard FILTER = new FilterCard("Creature spells");
static { static {
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE))); FILTER.add(Predicates.or(new CardTypePredicate(CardType.CREATURE)));
} }
public KrallenhordeHowler(UUID ownerId) { public KrallenhordeHowler(UUID ownerId) {
@ -71,7 +71,7 @@ public class KrallenhordeHowler extends CardImpl {
this.canTransform = true; this.canTransform = true;
// Creature spells you cast cost {1} less to cast. // Creature spells you cast cost {1} less to cast.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(filter, 1))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SpellsCostReductionControllerEffect(FILTER, 1)));
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler. // At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false); TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);

View file

@ -28,19 +28,15 @@
package mage.sets.shadowsoverinnistrad; package mage.sets.shadowsoverinnistrad;
import java.util.UUID; import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamageTargetControllerEffect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate; import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
/** /**
@ -48,11 +44,11 @@ import mage.target.TargetPermanent;
* @author fireshoes * @author fireshoes
*/ */
public class StructuralDistortion extends CardImpl { public class StructuralDistortion extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("artifact or land"); private static final FilterPermanent FILTER = new FilterPermanent("artifact or land");
static { static {
filter.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT),new CardTypePredicate(CardType.LAND))); FILTER.add(Predicates.or(new CardTypePredicate(CardType.ARTIFACT), new CardTypePredicate(CardType.LAND)));
} }
public StructuralDistortion(UUID ownerId) { public StructuralDistortion(UUID ownerId) {
@ -60,9 +56,11 @@ public class StructuralDistortion extends CardImpl {
this.expansionSetCode = "SOI"; this.expansionSetCode = "SOI";
// Exile target artifact or land. Structural Distortion deals 2 damage to that permanent's controller. // Exile target artifact or land. Structural Distortion deals 2 damage to that permanent's controller.
this.getSpellAbility().addEffect(new StructuralDistortionEffect()); this.getSpellAbility().addEffect(new ExileTargetEffect());
Target target = new TargetPermanent(filter); Effect effect = new DamageTargetControllerEffect(2);
this.getSpellAbility().addTarget(target); effect.setText("{this} deals 2 damage to that permanent's controller");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetPermanent(FILTER));
} }
public StructuralDistortion(final StructuralDistortion card) { public StructuralDistortion(final StructuralDistortion card) {
@ -74,34 +72,3 @@ public class StructuralDistortion extends CardImpl {
return new StructuralDistortion(this); return new StructuralDistortion(this);
} }
} }
class StructuralDistortionEffect extends OneShotEffect {
public StructuralDistortionEffect() {
super(Outcome.DestroyPermanent);
this.staticText = "Exile target artifact or land. {this} deals 2 damage to that permanent's controller";
}
public StructuralDistortionEffect(final StructuralDistortionEffect effect) {
super(effect);
}
@Override
public StructuralDistortionEffect copy() {
return new StructuralDistortionEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (permanent != null) {
permanent.moveToExile(source.getSourceId(), null, source.getSourceId(), game);
Player permController = game.getPlayer(permanent.getControllerId());
if (permController != null) {
permController.damage(2, source.getSourceId(), game, false, true);
return true;
}
}
return false;
}
}

View file

@ -38,14 +38,14 @@ import mage.players.Player;
/** /**
* *
* *
* @author fireshoes * @author fireshoes
*/ */
public class DeliriumCondition implements Condition { public class DeliriumCondition implements Condition {
private static DeliriumCondition fInstance = new DeliriumCondition(); private final static DeliriumCondition INSTANCE = new DeliriumCondition();
public static Condition getInstance() { public static Condition getInstance() {
return fInstance; return INSTANCE;
} }
@Override @Override

View file

@ -9,22 +9,20 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.token.Token; import mage.game.permanent.token.Token;
/** /**
* *
* @author LevelX2 * @author LevelX2
*/ */
public class InvestigateEffect extends OneShotEffect { public class InvestigateEffect extends CreateTokenEffect {
public InvestigateEffect() { public InvestigateEffect() {
super(Outcome.PutCreatureInPlay); super(new ClueArtifactToken());
this.staticText = "Investigate. <i>(Put a colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\")</i>"; this.staticText = "Investigate. <i>(Put a colorless Clue artifact token onto the battlefield with \"{2}, Sacrifice this artifact: Draw a card.\")</i>";
} }
@ -37,10 +35,6 @@ public class InvestigateEffect extends OneShotEffect {
return new InvestigateEffect(this); return new InvestigateEffect(this);
} }
@Override
public boolean apply(Game game, Ability source) {
return false;
}
} }
class ClueArtifactToken extends Token { class ClueArtifactToken extends Token {

View file

@ -52,13 +52,12 @@ class SkulkEffect extends RestrictionEffect {
@Override @Override
public boolean applies(Permanent permanent, Ability source, Game game) { public boolean applies(Permanent permanent, Ability source, Game game) {
return !permanent.getControllerId().equals(source.getControllerId()); return permanent.getId().equals(source.getSourceId());
} }
@Override @Override
public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) {
return blocker.getId().equals(source.getSourceId()) return blocker.getPower().getValue() <= attacker.getPower().getValue();
&& blocker.getPower().getValue() >= attacker.getPower().getValue();
} }
@Override @Override

View file

@ -27,8 +27,7 @@
*/ */
package mage.game.permanent.token; package mage.game.permanent.token;
import java.util.ArrayList; import java.util.Arrays;
import java.util.List;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.common.DiesTriggeredAbility;
@ -43,17 +42,16 @@ import mage.target.common.TargetCreatureOrPlayer;
*/ */
public class DevilToken extends Token { public class DevilToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
public DevilToken() { public DevilToken() {
super("Devil", "1/1 red Devil creature with \"When this creature dies, it deals 1 damage to target creature or player.\""); super("Devil", "1/1 red Devil creature with \"When this creature dies, it deals 1 damage to target creature or player.\"");
availableImageSetCodes.addAll(Arrays.asList("SOI"));
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
subtype.add("Devil"); subtype.add("Devil");
color.setRed(true); color.setRed(true);
power = new MageInt(1); power = new MageInt(1);
toughness = new MageInt(1); toughness = new MageInt(1);
Effect effect = new DamageTargetEffect(1); Effect effect = new DamageTargetEffect(1);
effect.setText("When {this} dies, it deals 1 damage to target creature or player"); effect.setText("it deals 1 damage to target creature or player");
Ability ability = new DiesTriggeredAbility(effect); Ability ability = new DiesTriggeredAbility(effect);
ability.addTarget(new TargetCreatureOrPlayer()); ability.addTarget(new TargetCreatureOrPlayer());
this.addAbility(ability); this.addAbility(ability);