mirror of
https://github.com/correl/mage.git
synced 2024-12-28 11:14:13 +00:00
[VOW] Implemented Odric, Blood-Cursed
This commit is contained in:
parent
ab337acb02
commit
890d55cf87
2 changed files with 127 additions and 0 deletions
126
Mage.Sets/src/mage/cards/o/OdricBloodCursed.java
Normal file
126
Mage.Sets/src/mage/cards/o/OdricBloodCursed.java
Normal file
|
@ -0,0 +1,126 @@
|
|||
package mage.cards.o;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.BloodToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class OdricBloodCursed extends CardImpl {
|
||||
|
||||
public OdricBloodCursed(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Odric, Blood-Cursed enters the battlefield, create X Blood tokens, where X is the number of abilities from among flying, first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, reach, trample, and vigilance found among creatures you control.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new OdricBloodCursedEffect()));
|
||||
}
|
||||
|
||||
private OdricBloodCursed(final OdricBloodCursed card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OdricBloodCursed copy() {
|
||||
return new OdricBloodCursed(this);
|
||||
}
|
||||
}
|
||||
|
||||
class OdricBloodCursedEffect extends OneShotEffect {
|
||||
|
||||
public OdricBloodCursedEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "create X Blood tokens, where X is the number of abilities from among flying, first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, reach, trample, and vigilance found among creatures you control";
|
||||
}
|
||||
|
||||
private OdricBloodCursedEffect(final OdricBloodCursedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OdricBloodCursedEffect copy() {
|
||||
return new OdricBloodCursedEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int flying = 0;
|
||||
int firstStrike = 0;
|
||||
int doubleStrike = 0;
|
||||
int deathtouch = 0;
|
||||
int haste = 0;
|
||||
int hexproof = 0;
|
||||
int indestructible = 0;
|
||||
int lifelink = 0;
|
||||
int menance = 0;
|
||||
int reach = 0;
|
||||
int trample = 0;
|
||||
int vigilance = 0;
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) {
|
||||
if (permanent.isCreature(game)) {
|
||||
for (Ability ability : permanent.getAbilities(game)) {
|
||||
if (ability instanceof FlyingAbility) {
|
||||
flying = 1;
|
||||
}
|
||||
if (ability instanceof FirstStrikeAbility) {
|
||||
firstStrike = 1;
|
||||
}
|
||||
if (ability instanceof DoubleStrikeAbility) {
|
||||
doubleStrike = 1;
|
||||
}
|
||||
if (ability instanceof DeathtouchAbility) {
|
||||
deathtouch = 1;
|
||||
}
|
||||
if (ability instanceof HasteAbility) {
|
||||
haste = 1;
|
||||
}
|
||||
if (ability instanceof HexproofAbility) {
|
||||
hexproof = 1;
|
||||
}
|
||||
if (ability instanceof IndestructibleAbility) {
|
||||
indestructible = 1;
|
||||
}
|
||||
if (ability instanceof LifelinkAbility) {
|
||||
lifelink = 1;
|
||||
}
|
||||
if (ability instanceof MenaceAbility) {
|
||||
menance = 1;
|
||||
}
|
||||
if (ability instanceof ReachAbility) {
|
||||
reach = 1;
|
||||
}
|
||||
if (ability instanceof TrampleAbility) {
|
||||
trample = 1;
|
||||
}
|
||||
if (ability instanceof VigilanceAbility) {
|
||||
vigilance = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
int numTokens = flying + firstStrike + doubleStrike + deathtouch + haste + hexproof + indestructible + lifelink + menance + reach + trample + vigilance;
|
||||
if (numTokens < 1) {
|
||||
return false;
|
||||
}
|
||||
return new BloodToken().putOntoBattlefield(numTokens, game, source, source.getControllerId());
|
||||
}
|
||||
}
|
|
@ -129,6 +129,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mountain", 401, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Mulch", 210, Rarity.COMMON, mage.cards.m.Mulch.class));
|
||||
cards.add(new SetCardInfo("Oakshade Stalker", 212, Rarity.UNCOMMON, mage.cards.o.OakshadeStalker.class));
|
||||
cards.add(new SetCardInfo("Odric, Blood-Cursed", 243, Rarity.RARE, mage.cards.o.OdricBloodCursed.class));
|
||||
cards.add(new SetCardInfo("Old Rutstein", 244, Rarity.RARE, mage.cards.o.OldRutstein.class));
|
||||
cards.add(new SetCardInfo("Olivia, Crimson Bride", 245, Rarity.MYTHIC, mage.cards.o.OliviaCrimsonBride.class));
|
||||
cards.add(new SetCardInfo("Ollenbock Escort", 27, Rarity.UNCOMMON, mage.cards.o.OllenbockEscort.class));
|
||||
|
|
Loading…
Reference in a new issue