mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[KHM] Implemented Koma, Cosmos Serpent
This commit is contained in:
parent
1b80ecb7b4
commit
efca24d617
3 changed files with 131 additions and 0 deletions
104
Mage.Sets/src/mage/cards/k/KomaCosmosSerpent.java
Normal file
104
Mage.Sets/src/mage/cards/k/KomaCosmosSerpent.java
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
package mage.cards.k;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.Mode;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.common.CantBeCounteredSourceAbility;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.effects.RestrictionEffect;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.TapTargetEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||||
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.token.KomasCoilToken;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author weirddan455
|
||||||
|
*/
|
||||||
|
public final class KomaCosmosSerpent extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledPermanent filter
|
||||||
|
= new FilterControlledPermanent(SubType.SERPENT, "another Serpent");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public KomaCosmosSerpent(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}{U}{U}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.SERPENT);
|
||||||
|
this.power = new MageInt(6);
|
||||||
|
this.toughness = new MageInt(6);
|
||||||
|
|
||||||
|
// This spell can't be countered.
|
||||||
|
this.addAbility(new CantBeCounteredSourceAbility());
|
||||||
|
|
||||||
|
// At the beginning of each upkeep, create a 3/3 blue Serpent creature token named Koma's Coil.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||||
|
Zone.BATTLEFIELD, new CreateTokenEffect(new KomasCoilToken()), TargetController.EACH_PLAYER, false, false
|
||||||
|
));
|
||||||
|
|
||||||
|
// Sacrifice another Serpent: Choose one —
|
||||||
|
// • Tap target permanent. Its activated abilities can't be activated this turn.
|
||||||
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
new TapTargetEffect(), new SacrificeTargetCost(new TargetControlledPermanent(filter))
|
||||||
|
);
|
||||||
|
ability.addEffect(new KomaCosmosSerpentEffect());
|
||||||
|
ability.addTarget(new TargetPermanent());
|
||||||
|
|
||||||
|
// • Koma, Cosmos Serpent gains indestructible until end of turn.
|
||||||
|
ability.addMode(new Mode(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn)));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private KomaCosmosSerpent(final KomaCosmosSerpent card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KomaCosmosSerpent copy() {
|
||||||
|
return new KomaCosmosSerpent(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class KomaCosmosSerpentEffect extends RestrictionEffect {
|
||||||
|
|
||||||
|
public KomaCosmosSerpentEffect() {
|
||||||
|
super(Duration.EndOfTurn);
|
||||||
|
staticText = "Its activated abilities can't be activated this turn";
|
||||||
|
}
|
||||||
|
|
||||||
|
private KomaCosmosSerpentEffect(final KomaCosmosSerpentEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||||
|
return permanent.getId().equals(getTargetPointer().getFirst(game, source));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canUseActivatedAbilities(Permanent permanent, Ability source, Game game, boolean canUseChooseDialogs) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KomaCosmosSerpentEffect copy() {
|
||||||
|
return new KomaCosmosSerpentEffect(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -97,6 +97,7 @@ public final class Kaldheim extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Kaya's Onslaught", 18, Rarity.UNCOMMON, mage.cards.k.KayasOnslaught.class));
|
cards.add(new SetCardInfo("Kaya's Onslaught", 18, Rarity.UNCOMMON, mage.cards.k.KayasOnslaught.class));
|
||||||
cards.add(new SetCardInfo("Koll, the Forgemaster", 220, Rarity.UNCOMMON, mage.cards.k.KollTheForgemaster.class));
|
cards.add(new SetCardInfo("Koll, the Forgemaster", 220, Rarity.UNCOMMON, mage.cards.k.KollTheForgemaster.class));
|
||||||
cards.add(new SetCardInfo("Koma's Faithful", 102, Rarity.COMMON, mage.cards.k.KomasFaithful.class));
|
cards.add(new SetCardInfo("Koma's Faithful", 102, Rarity.COMMON, mage.cards.k.KomasFaithful.class));
|
||||||
|
cards.add(new SetCardInfo("Koma, Cosmos Serpent", 221, Rarity.MYTHIC, mage.cards.k.KomaCosmosSerpent.class));
|
||||||
cards.add(new SetCardInfo("Littjara Kinseekers", 66, Rarity.COMMON, mage.cards.l.LittjaraKinseekers.class));
|
cards.add(new SetCardInfo("Littjara Kinseekers", 66, Rarity.COMMON, mage.cards.l.LittjaraKinseekers.class));
|
||||||
cards.add(new SetCardInfo("Magda, Brazen Outlaw", 142, Rarity.RARE, mage.cards.m.MagdaBrazenOutlaw.class));
|
cards.add(new SetCardInfo("Magda, Brazen Outlaw", 142, Rarity.RARE, mage.cards.m.MagdaBrazenOutlaw.class));
|
||||||
cards.add(new SetCardInfo("Masked Vandal", 184, Rarity.COMMON, mage.cards.m.MaskedVandal.class));
|
cards.add(new SetCardInfo("Masked Vandal", 184, Rarity.COMMON, mage.cards.m.MaskedVandal.class));
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package mage.game.permanent.token;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
public final class KomasCoilToken extends TokenImpl {
|
||||||
|
|
||||||
|
public KomasCoilToken() {
|
||||||
|
super("Koma's Coil", "3/3 blue Serpent creature token named Koma's Coil");
|
||||||
|
cardType.add(CardType.CREATURE);
|
||||||
|
subtype.add(SubType.SERPENT);
|
||||||
|
color.setBlue(true);
|
||||||
|
power = new MageInt(3);
|
||||||
|
toughness = new MageInt(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
private KomasCoilToken(final KomasCoilToken token) {
|
||||||
|
super(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KomasCoilToken copy() {
|
||||||
|
return new KomasCoilToken(this);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue