mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Added card "Allegiant General Pryde" and its abilities and effects
This commit is contained in:
parent
32ff6ada7b
commit
cfad8d5078
3 changed files with 65 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
|
@ -49,6 +50,7 @@ public final class AJedisFervor extends CardImpl {
|
||||||
class AJedisFervorEffect extends OneShotEffect {
|
class AJedisFervorEffect extends OneShotEffect {
|
||||||
public AJedisFervorEffect() {
|
public AJedisFervorEffect() {
|
||||||
super(Outcome.Sacrifice);
|
super(Outcome.Sacrifice);
|
||||||
|
staticText = "If an opponent cast a black spell this turn, that player sacrifices a creature or planeswalker.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public AJedisFervorEffect(final AJedisFervorEffect effect) {
|
public AJedisFervorEffect(final AJedisFervorEffect effect) {
|
||||||
|
|
|
@ -1,4 +1,65 @@
|
||||||
package mage.cards.a;
|
package mage.cards.a;
|
||||||
|
|
||||||
public class AllegiantGeneralPryde {
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Merlingilb
|
||||||
|
*/
|
||||||
|
public class AllegiantGeneralPryde extends CardImpl {
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Trooper creatures");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(TargetController.YOU.getControllerPredicate());
|
||||||
|
filter.add(SubType.TROOPER.getPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllegiantGeneralPryde(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||||
|
addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.TROOPER);
|
||||||
|
this.subtype.add(SubType.ADVISOR);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Trooper creatures you control have "When this creature enters the battlefield, you may sacrifice a creature. If you do, draw two cards and lose 2 life."
|
||||||
|
SacrificeEffect sacrifceEffect = new SacrificeEffect(
|
||||||
|
StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED, 1, "");
|
||||||
|
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(sacrifceEffect, true, true);
|
||||||
|
ability.setTriggerPhrase("When this creature enters the battlefield, ");
|
||||||
|
ability.addTarget(new TargetControlledCreaturePermanent(1));
|
||||||
|
DrawCardSourceControllerEffect drawCardSourceControllerEffect = new DrawCardSourceControllerEffect(2);
|
||||||
|
drawCardSourceControllerEffect.setText("If you do, draw two cards");
|
||||||
|
ability.addEffect(drawCardSourceControllerEffect);
|
||||||
|
LoseLifeSourceControllerEffect loseLifeSourceControllerEffect = new LoseLifeSourceControllerEffect(2);
|
||||||
|
loseLifeSourceControllerEffect.setText("and lose 2 life.");
|
||||||
|
ability.addEffect(loseLifeSourceControllerEffect);
|
||||||
|
//EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(2), true);
|
||||||
|
GainAbilityControlledEffect effect = new GainAbilityControlledEffect(
|
||||||
|
ability, Duration.WhileOnBattlefield, filter);
|
||||||
|
this.addAbility(new SimpleStaticAbility(effect));
|
||||||
|
}
|
||||||
|
|
||||||
|
public AllegiantGeneralPryde(final AllegiantGeneralPryde card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Card copy() {
|
||||||
|
return new AllegiantGeneralPryde(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,6 +203,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
|
||||||
|| ruleLow.startsWith("attach")
|
|| ruleLow.startsWith("attach")
|
||||||
|| ruleLow.startsWith("counter")
|
|| ruleLow.startsWith("counter")
|
||||||
|| ruleLow.startsWith("destroy")
|
|| ruleLow.startsWith("destroy")
|
||||||
|
|| ruleLow.startsWith("sacrifice")
|
||||||
|| ruleLow.startsWith("exchange")
|
|| ruleLow.startsWith("exchange")
|
||||||
|| ruleLow.startsWith("exile")
|
|| ruleLow.startsWith("exile")
|
||||||
|| ruleLow.startsWith("gain")
|
|| ruleLow.startsWith("gain")
|
||||||
|
|
Loading…
Reference in a new issue