forked from External/mage
[40K] Implemented Abaddon the Despoiler
This commit is contained in:
parent
d9bb563549
commit
8c9012d192
3 changed files with 88 additions and 0 deletions
86
Mage.Sets/src/mage/cards/a/AbaddonTheDespoiler.java
Normal file
86
Mage.Sets/src/mage/cards/a/AbaddonTheDespoiler.java
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.dynamicvalue.common.OpponentsLostLifeCount;
|
||||
import mage.abilities.effects.GainAbilitySpellsEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.CascadeAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.FilterStackObject;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.card.CastFromZonePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.watchers.common.PlayerLostLifeWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AbaddonTheDespoiler extends CardImpl {
|
||||
|
||||
private static final FilterStackObject filter = new FilterSpell();
|
||||
|
||||
static {
|
||||
filter.add(new CastFromZonePredicate(Zone.HAND));
|
||||
filter.add(AbaddonTheDespoilerPredicate.instance);
|
||||
}
|
||||
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Total life lost by opponents this turn", OpponentsLostLifeCount.instance
|
||||
);
|
||||
|
||||
public AbaddonTheDespoiler(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{B}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ASTARTES);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Mark of the Chaos Ascendant — During your turn, spells you cast from your hand with mana value X or less have cascade, where X is the total amount of life your opponents have lost this turn.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new GainAbilitySpellsEffect(new CascadeAbility(false), filter),
|
||||
MyTurnCondition.instance, "during your turn, spells you cast from " +
|
||||
"your hand with mana value X or less have cascade, where X is the " +
|
||||
"total amount of life your opponents have lost this turn"
|
||||
)));
|
||||
}
|
||||
|
||||
private AbaddonTheDespoiler(final AbaddonTheDespoiler card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbaddonTheDespoiler copy() {
|
||||
return new AbaddonTheDespoiler(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum AbaddonTheDespoilerPredicate implements Predicate<StackObject> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(StackObject input, Game game) {
|
||||
return input.getManaValue() <= game
|
||||
.getState()
|
||||
.getWatcher(PlayerLostLifeWatcher.class)
|
||||
.getAllOppLifeLost(input.getControllerId(), game);
|
||||
}
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@ public final class Warhammer40000 extends ExpansionSet {
|
|||
super("Warhammer 40,000", "40K", ExpansionSet.buildDate(2022, 4, 29), SetType.SUPPLEMENTAL);
|
||||
this.hasBasicLands = false;
|
||||
|
||||
cards.add(new SetCardInfo("Abaddon the Despoiler", 171, Rarity.MYTHIC, mage.cards.a.AbaddonTheDespoiler.class));
|
||||
cards.add(new SetCardInfo("Blood for the Blood God!", 108, Rarity.COMMON, mage.cards.b.BloodForTheBloodGod.class));
|
||||
cards.add(new SetCardInfo("Fabricate", 181, Rarity.RARE, mage.cards.f.Fabricate.class));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public enum SubType {
|
|||
ARTIFICIER("Artificier", SubTypeSet.CreatureType, true),
|
||||
ASSASSIN("Assassin", SubTypeSet.CreatureType),
|
||||
ASSEMBLY_WORKER("Assembly-Worker", SubTypeSet.CreatureType),
|
||||
ASTARTES("Astartes", SubTypeSet.CreatureType),
|
||||
ATOG("Atog", SubTypeSet.CreatureType),
|
||||
ATAT("AT-AT", SubTypeSet.CreatureType, true),
|
||||
AUROCHS("Aurochs", SubTypeSet.CreatureType),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue