mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[CLB] Implemented Solemn Doomguide
This commit is contained in:
parent
686600a4fe
commit
ee9f9c1d77
2 changed files with 89 additions and 0 deletions
88
Mage.Sets/src/mage/cards/s/SolemnDoomguide.java
Normal file
88
Mage.Sets/src/mage/cards/s/SolemnDoomguide.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.UnearthAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SolemnDoomguide extends CardImpl {
|
||||
|
||||
public SolemnDoomguide(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
|
||||
this.subtype.add(SubType.TIEFLING);
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Each creature card in your graveyard that's a Cleric, Rogue, Warrior, and/or Wizard has unearth {1}{B}
|
||||
this.addAbility(new SimpleStaticAbility(new SolemnDoomguideEffect()));
|
||||
}
|
||||
|
||||
private SolemnDoomguide(final SolemnDoomguide card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SolemnDoomguide copy() {
|
||||
return new SolemnDoomguide(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SolemnDoomguideEffect extends ContinuousEffectImpl {
|
||||
|
||||
SolemnDoomguideEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||
staticText = "each creature card in your graveyard that's " +
|
||||
"a Cleric, Rogue, Warrior, and/or Wizard has unearth {1}{B}";
|
||||
}
|
||||
|
||||
private SolemnDoomguideEffect(final SolemnDoomguideEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
for (UUID cardId : controller.getGraveyard()) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card == null || !card.isCreature(game)
|
||||
|| !(card.hasSubtype(SubType.CLERIC, game)
|
||||
|| card.hasSubtype(SubType.ROGUE, game)
|
||||
|| card.hasSubtype(SubType.WARRIOR, game)
|
||||
|| card.hasSubtype(SubType.WIZARD, game))) {
|
||||
continue;
|
||||
}
|
||||
UnearthAbility ability = new UnearthAbility(new ManaCostsImpl<>("{1}{B}"));
|
||||
ability.setSourceId(cardId);
|
||||
ability.setControllerId(card.getOwnerId());
|
||||
game.getState().addOtherAbility(card, ability);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SolemnDoomguideEffect copy() {
|
||||
return new SolemnDoomguideEffect(this);
|
||||
}
|
||||
}
|
|
@ -270,6 +270,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Skullwinder", 256, Rarity.UNCOMMON, mage.cards.s.Skullwinder.class));
|
||||
cards.add(new SetCardInfo("Sky Diamond", 337, Rarity.COMMON, mage.cards.s.SkyDiamond.class));
|
||||
cards.add(new SetCardInfo("Slaughter the Strong", 43, Rarity.UNCOMMON, mage.cards.s.SlaughterTheStrong.class));
|
||||
cards.add(new SetCardInfo("Solemn Doomguide", 672, Rarity.RARE, mage.cards.s.SolemnDoomguide.class));
|
||||
cards.add(new SetCardInfo("Spectacular Showdown", 679, Rarity.RARE, mage.cards.s.SpectacularShowdown.class));
|
||||
cards.add(new SetCardInfo("Spire Garden", 361, Rarity.RARE, mage.cards.s.SpireGarden.class));
|
||||
cards.add(new SetCardInfo("Steadfast Unicorn", 44, Rarity.COMMON, mage.cards.s.SteadfastUnicorn.class));
|
||||
|
|
Loading…
Reference in a new issue