forked from External/mage
implement [LCI] Kutzil, Malamet Exemplar
This commit is contained in:
parent
87a313e89c
commit
4a250c48a5
7 changed files with 137 additions and 88 deletions
|
|
@ -1,8 +1,6 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
|
|
@ -16,10 +14,11 @@ import mage.constants.SubType;
|
|||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.filter.predicate.mageobject.PowerGreaterThanBasePowerPredicate;
|
||||
import mage.game.permanent.token.SoldierToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author awjackson
|
||||
|
|
@ -29,7 +28,7 @@ public final class BairdArgivianRecruiter extends CardImpl {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("you control a creature with power greater than its base power");
|
||||
|
||||
static {
|
||||
filter.add(BairdArgivianRecruiterPredicate.instance);
|
||||
filter.add(PowerGreaterThanBasePowerPredicate.instance);
|
||||
}
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
|
||||
|
|
@ -59,13 +58,3 @@ public final class BairdArgivianRecruiter extends CardImpl {
|
|||
return new BairdArgivianRecruiter(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum BairdArgivianRecruiterPredicate implements Predicate<MageObject> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
MageInt power = input.getPower();
|
||||
return power.getValue() > power.getModifiedBaseValue();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,18 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CantBeCounteredSourceAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.ruleModifying.CantCastDuringYourTurnEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -36,7 +35,7 @@ public final class DragonlordDromoka extends CardImpl {
|
|||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
// Your opponents can't cast spells during your turn.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DragonlordDromokaEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new CantCastDuringYourTurnEffect()));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -49,34 +48,3 @@ public final class DragonlordDromoka extends CardImpl {
|
|||
return new DragonlordDromoka(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DragonlordDromokaEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
public DragonlordDromokaEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "Your opponents can't cast spells during your turn";
|
||||
}
|
||||
|
||||
private DragonlordDromokaEffect(final DragonlordDromokaEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DragonlordDromokaEffect copy() {
|
||||
return new DragonlordDromokaEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CAST_SPELL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (game.isActivePlayer(source.getControllerId()) &&
|
||||
game.getPlayer(source.getControllerId()).hasOpponent(event.getPlayerId(), game)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
57
Mage.Sets/src/mage/cards/k/KutzilMalametExemplar.java
Normal file
57
Mage.Sets/src/mage/cards/k/KutzilMalametExemplar.java
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.DealCombatDamageControlledTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CantCastDuringYourTurnEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerGreaterThanBasePowerPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author xenohedron
|
||||
*/
|
||||
public final class KutzilMalametExemplar extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(PowerGreaterThanBasePowerPredicate.instance);
|
||||
}
|
||||
|
||||
public KutzilMalametExemplar(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.CAT);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Your opponents can't cast spells during your turn.
|
||||
this.addAbility(new SimpleStaticAbility(new CantCastDuringYourTurnEffect()));
|
||||
|
||||
// Whenever one or more creatures you control each with power greater than its base power deals combat damage to a player, draw a card.
|
||||
this.addAbility(new DealCombatDamageControlledTriggeredAbility(new DrawCardSourceControllerEffect(1), filter)
|
||||
.setTriggerPhrase("Whenever one or more creatures you control each with power greater than its base power"
|
||||
+ " deals combat damage to a player, ")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
private KutzilMalametExemplar(final KutzilMalametExemplar card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KutzilMalametExemplar copy() {
|
||||
return new KutzilMalametExemplar(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +1,15 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.abilities.effects.common.ruleModifying.CantCastDuringYourTurnEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -37,7 +33,7 @@ public final class TidalBarracuda extends CardImpl {
|
|||
)));
|
||||
|
||||
// Your opponents can't cast spells during your turn.
|
||||
this.addAbility(new SimpleStaticAbility(new TidalBarracudaEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new CantCastDuringYourTurnEffect()));
|
||||
}
|
||||
|
||||
private TidalBarracuda(final TidalBarracuda card) {
|
||||
|
|
@ -49,31 +45,3 @@ public final class TidalBarracuda extends CardImpl {
|
|||
return new TidalBarracuda(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TidalBarracudaEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
TidalBarracudaEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "Your opponents can't cast spells during your turn";
|
||||
}
|
||||
|
||||
private TidalBarracudaEffect(final TidalBarracudaEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TidalBarracudaEffect copy() {
|
||||
return new TidalBarracudaEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CAST_SPELL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return game.isActivePlayer(source.getControllerId()) &&
|
||||
game.getPlayer(source.getControllerId()).hasOpponent(event.getPlayerId(), game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Kinjalli's Dawnrunner", 19, Rarity.UNCOMMON, mage.cards.k.KinjallisDawnrunner.class));
|
||||
cards.add(new SetCardInfo("Kitesail Larcenist", 61, Rarity.RARE, mage.cards.k.KitesailLarcenist.class));
|
||||
cards.add(new SetCardInfo("Kutzil's Flanker", 20, Rarity.RARE, mage.cards.k.KutzilsFlanker.class));
|
||||
cards.add(new SetCardInfo("Kutzil, Malamet Exemplar", 232, Rarity.UNCOMMON, mage.cards.k.KutzilMalametExemplar.class));
|
||||
cards.add(new SetCardInfo("Locus of Enlightenment", 55, Rarity.MYTHIC, mage.cards.l.LocusOfEnlightenment.class));
|
||||
cards.add(new SetCardInfo("Lodestone Needle", 62, Rarity.UNCOMMON, mage.cards.l.LodestoneNeedle.class));
|
||||
cards.add(new SetCardInfo("Malamet Battle Glyph", 198, Rarity.UNCOMMON, mage.cards.m.MalametBattleGlyph.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package mage.abilities.effects.common.ruleModifying;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
* @author xenohedron
|
||||
*/
|
||||
public class CantCastDuringYourTurnEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
/**
|
||||
* "Your opponents can't cast spells during your turn."
|
||||
*/
|
||||
public CantCastDuringYourTurnEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "Your opponents can't cast spells during your turn";
|
||||
}
|
||||
|
||||
protected CantCastDuringYourTurnEffect(final CantCastDuringYourTurnEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CantCastDuringYourTurnEffect copy() {
|
||||
return new CantCastDuringYourTurnEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CAST_SPELL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return game.isActivePlayer(source.getControllerId()) &&
|
||||
game.getPlayer(source.getControllerId()).hasOpponent(event.getPlayerId(), game);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author xenohedron
|
||||
*/
|
||||
public enum PowerGreaterThanBasePowerPredicate implements Predicate<MageObject> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(MageObject input, Game game) {
|
||||
MageInt power = input.getPower();
|
||||
return power.getValue() > power.getModifiedBaseValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "power greater than its base power";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue