mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 20:59:14 -08:00
[filters] added WasDealtDamageThisTurn Predicate
This commit is contained in:
parent
badb0ede21
commit
50b650bb7d
7 changed files with 65 additions and 53 deletions
|
|
@ -42,6 +42,7 @@ import mage.abilities.keyword.BushidoAbility;
|
|||
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -54,8 +55,7 @@ public class BushiTenderfoot extends CardImpl<BushiTenderfoot> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
|
||||
|
||||
static {
|
||||
filter.setUseDamageDealt(true);
|
||||
filter.setDamageDealt(true);
|
||||
filter.add(new WasDealtDamageThisTurnPredicate());
|
||||
}
|
||||
|
||||
public BushiTenderfoot(UUID ownerId) {
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -45,14 +46,15 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class CrushingPain extends CardImpl<CrushingPain> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
|
||||
|
||||
static {
|
||||
filter.setUseDamageDealt(true);
|
||||
filter.setDamageDealt(true);
|
||||
filter.add(new WasDealtDamageThisTurnPredicate());
|
||||
}
|
||||
|
||||
public CrushingPain (UUID ownerId) {
|
||||
super(ownerId, 162, "Crushing Pain", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.color.setRed(true);
|
||||
this.color.setRed(true);
|
||||
|
||||
// Crushing Pain deals 6 damage to target creature that was dealt damage this turn.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(6));
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.abilities.effects.common.FlipSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
|
@ -57,8 +58,7 @@ public class InitiateOfBlood extends CardImpl<InitiateOfBlood> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
|
||||
|
||||
static {
|
||||
filter.setUseDamageDealt(true);
|
||||
filter.setDamageDealt(true);
|
||||
filter.add(new WasDealtDamageThisTurnPredicate());
|
||||
}
|
||||
|
||||
public InitiateOfBlood(UUID ownerId) {
|
||||
|
|
@ -98,8 +98,7 @@ class GokaTheUnjust extends Token {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
|
||||
|
||||
static {
|
||||
filter.setUseDamageDealt(true);
|
||||
filter.setDamageDealt(true);
|
||||
filter.add(new WasDealtDamageThisTurnPredicate());
|
||||
}
|
||||
|
||||
GokaTheUnjust() {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -47,15 +48,16 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class WitchsMist extends CardImpl<WitchsMist> {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
|
||||
|
||||
static {
|
||||
filter.setUseDamageDealt(true);
|
||||
filter.setDamageDealt(true);
|
||||
filter.add(new WasDealtDamageThisTurnPredicate());
|
||||
}
|
||||
|
||||
public WitchsMist(UUID ownerId) {
|
||||
super(ownerId, 92, "Witch's Mist", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
|
||||
this.expansionSetCode = "FUT";
|
||||
this.color.setBlack(true);
|
||||
|
||||
// {2}{B}, {T}: Destroy target creature that was dealt damage this turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(),new ManaCostsImpl("{2}{B}"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -50,8 +51,7 @@ public class Opportunist extends CardImpl<Opportunist> {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
|
||||
|
||||
static {
|
||||
filter.setUseDamageDealt(true);
|
||||
filter.setDamageDealt(true);
|
||||
filter.add(new WasDealtDamageThisTurnPredicate());
|
||||
}
|
||||
|
||||
public Opportunist(UUID ownerId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue