mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[VOW] Implemented Dreadlight Monstrosity
This commit is contained in:
parent
e4e0e1b89b
commit
248015308c
2 changed files with 79 additions and 0 deletions
78
Mage.Sets/src/mage/cards/d/DreadlightMonstrosity.java
Normal file
78
Mage.Sets/src/mage/cards/d/DreadlightMonstrosity.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
|
||||
import mage.abilities.hint.ConditionHint;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DreadlightMonstrosity extends CardImpl {
|
||||
|
||||
private static final Hint hint = new ConditionHint(
|
||||
DreadlightMonstrosityCondition.instance, "You own a card in exile"
|
||||
);
|
||||
|
||||
public DreadlightMonstrosity(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}");
|
||||
|
||||
this.subtype.add(SubType.CRAB);
|
||||
this.subtype.add(SubType.HORROR);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Ward {2}
|
||||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
|
||||
|
||||
// {3}{U}{U}: Dreadlight Monstrosity can't be blocked this turn. Activate only if you own a card in exile.
|
||||
this.addAbility(new ActivateIfConditionActivatedAbility(
|
||||
Zone.BATTLEFIELD, new CantBeBlockedSourceEffect(Duration.EndOfTurn),
|
||||
new ManaCostsImpl<>("{3}{U}{U}"), DreadlightMonstrosityCondition.instance
|
||||
).addHint(hint));
|
||||
}
|
||||
|
||||
private DreadlightMonstrosity(final DreadlightMonstrosity card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DreadlightMonstrosity copy() {
|
||||
return new DreadlightMonstrosity(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum DreadlightMonstrosityCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game
|
||||
.getExile()
|
||||
.getExileZones()
|
||||
.stream()
|
||||
.flatMap(Collection::stream)
|
||||
.map(game::getOwnerId)
|
||||
.anyMatch(source::isControlledBy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "you own a card in exile";
|
||||
}
|
||||
}
|
|
@ -95,6 +95,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Doomed Dissenter", 106, Rarity.COMMON, mage.cards.d.DoomedDissenter.class));
|
||||
cards.add(new SetCardInfo("Dormant Grove", 198, Rarity.UNCOMMON, mage.cards.d.DormantGrove.class));
|
||||
cards.add(new SetCardInfo("Dreadfeast Demon", 108, Rarity.RARE, mage.cards.d.DreadfeastDemon.class));
|
||||
cards.add(new SetCardInfo("Dreadlight Monstrosity", 57, Rarity.COMMON, mage.cards.d.DreadlightMonstrosity.class));
|
||||
cards.add(new SetCardInfo("Dreamroot Cascade", 262, Rarity.RARE, mage.cards.d.DreamrootCascade.class));
|
||||
cards.add(new SetCardInfo("Drogskol Armaments", 10, Rarity.COMMON, mage.cards.d.DrogskolArmaments.class));
|
||||
cards.add(new SetCardInfo("Drogskol Infantry", 10, Rarity.COMMON, mage.cards.d.DrogskolInfantry.class));
|
||||
|
|
Loading…
Reference in a new issue