mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[CLB] Implemented Sword Coast Serpent
This commit is contained in:
parent
e7c2b14e62
commit
72f957583c
2 changed files with 74 additions and 0 deletions
73
Mage.Sets/src/mage/cards/s/SwordCoastSerpent.java
Normal file
73
Mage.Sets/src/mage/cards/s/SwordCoastSerpent.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalRestrictionEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.common.SpellsCastWatcher;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SwordCoastSerpent extends AdventureCard {
|
||||
|
||||
public SwordCoastSerpent(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.INSTANT}, "{5}{U}{U}", "Capsizing Wave", "{1}{U}");
|
||||
|
||||
this.subtype.add(SubType.SERPENT);
|
||||
this.subtype.add(SubType.DRAGON);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Sword Coast Serpent can't be blocked as long as you've cast a noncreature spell this turn.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalRestrictionEffect(
|
||||
new CantBeBlockedSourceEffect(), SwordCoastSerpentCondition.instance,
|
||||
"{this} can't be blocked as long as you've cast a noncreature spell this turn"
|
||||
)), new SpellsCastWatcher());
|
||||
|
||||
// Capsizing Wave
|
||||
// Return target creature to its owner's hand.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private SwordCoastSerpent(final SwordCoastSerpent card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SwordCoastSerpent copy() {
|
||||
return new SwordCoastSerpent(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum SwordCoastSerpentCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
SpellsCastWatcher watcher = game.getState().getWatcher(SpellsCastWatcher.class);
|
||||
if (watcher == null) {
|
||||
return false;
|
||||
}
|
||||
List<Spell> spells = watcher.getSpellsCastThisTurn(source.getControllerId());
|
||||
return spells != null && spells
|
||||
.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.anyMatch(spell -> !spell.isCreature(game));
|
||||
}
|
||||
}
|
|
@ -256,6 +256,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Swamp", 459, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Swiftfoot Boots", 339, Rarity.UNCOMMON, mage.cards.s.SwiftfootBoots.class));
|
||||
cards.add(new SetCardInfo("Sword Coast Sailor", 98, Rarity.UNCOMMON, mage.cards.s.SwordCoastSailor.class));
|
||||
cards.add(new SetCardInfo("Sword Coast Serpent", 99, Rarity.COMMON, mage.cards.s.SwordCoastSerpent.class));
|
||||
cards.add(new SetCardInfo("Tabaxi Toucaneers", 46, Rarity.COMMON, mage.cards.t.TabaxiToucaneers.class));
|
||||
cards.add(new SetCardInfo("Tasha, the Witch Queen", 294, Rarity.MYTHIC, mage.cards.t.TashaTheWitchQueen.class));
|
||||
cards.add(new SetCardInfo("Taunting Kobold", 199, Rarity.UNCOMMON, mage.cards.t.TauntingKobold.class));
|
||||
|
|
Loading…
Reference in a new issue