mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[KHM] Implemented Littjara Kinseekers
This commit is contained in:
parent
4f4ea502e1
commit
e966b760fb
3 changed files with 90 additions and 1 deletions
88
Mage.Sets/src/mage/cards/l/LittjaraKinseekers.java
Normal file
88
Mage.Sets/src/mage/cards/l/LittjaraKinseekers.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.abilities.keyword.ChangelingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LittjaraKinseekers extends CardImpl {
|
||||
|
||||
public LittjaraKinseekers(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Changeling
|
||||
this.setIsAllCreatureTypes(true);
|
||||
this.addAbility(ChangelingAbility.getInstance());
|
||||
|
||||
// When Littjara Kinseekers enters the battlefield, if you control three or more creatures that share a creature type, put a +1/+1 counter on Littjara Kinseekers, then scry 1.
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance())
|
||||
), LittjaraKinseekersCondition.instance, "When {this} enters the battlefield, " +
|
||||
"if you control three or more creatures that share a creature type, " +
|
||||
"put a +1/+1 counter on {this}, then scry 1."
|
||||
);
|
||||
ability.addEffect(new ScryEffect(1));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private LittjaraKinseekers(final LittjaraKinseekers card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LittjaraKinseekers copy() {
|
||||
return new LittjaraKinseekers(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum LittjaraKinseekersCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
List<Permanent> permanentList = game.getBattlefield().getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE,
|
||||
source.getControllerId(), source.getSourceId(), game
|
||||
);
|
||||
permanentList.removeIf(Objects::isNull);
|
||||
long changelings = permanentList
|
||||
.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(MageObject::isAllCreatureTypes)
|
||||
.count();
|
||||
if (changelings > 2) {
|
||||
return true;
|
||||
}
|
||||
permanentList.removeIf(MageObject::isAllCreatureTypes);
|
||||
Map<SubType, Integer> typeMap = new HashMap<>();
|
||||
return permanentList
|
||||
.stream()
|
||||
.map(permanent -> permanent.getSubtype(game))
|
||||
.flatMap(Collection::stream)
|
||||
.mapToInt(subType -> typeMap.compute(subType, (s, i) -> i == null ? 1 : Integer.sum(i, 1)))
|
||||
.anyMatch(x -> x + changelings > 2);
|
||||
}
|
||||
}
|
|
@ -96,6 +96,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("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("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("Masked Vandal", 184, Rarity.COMMON, mage.cards.m.MaskedVandal.class));
|
||||
cards.add(new SetCardInfo("Maskwood Nexus", 240, Rarity.RARE, mage.cards.m.MaskwoodNexus.class));
|
||||
|
|
|
@ -40035,7 +40035,7 @@ Cosmos Charger|Kaldheim|51|R|{3}{U}|Creature - Horse Spirit|3|3|Flash$Flying$For
|
|||
Giant's Amulet|Kaldheim|59|U|{U}|Artifact - Equipment|||When Giant's Amulet enters the battlefield, you may pay {3}{U}. If you do, create a 4/4 blue Giant Wizard creature token, then attach Giant's Amulet to it.$Equipped creature gets +0/+1 and has "This creature has hexproof as long as it's untapped."$Equip {2}|
|
||||
Glimpse the Cosmos|Kaldheim|60|U|{1}{U}|Sorcery|||Look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order.$As long as you control a Giant, you may cast Glimpse the Cosmos from your graveyard by paying {U} rather than paying its mana cost. If you cast Glimpse the Cosmos this way and it would be put into your graveyard, exile it instead.|
|
||||
Inga Rune-Eyes|Kaldheim|64|U|{3}{U}|Legendary Creature - Human Wizard|3|3|When Inga Rune-Eyes enters the battlefield, scry 3.$When Inga Rune-Eyes dies, draw three cards if three or more creatures died this turn.|
|
||||
Littjara Kinseekers|Kaldheim|66|C|{3}{U}|Creature - Shapeshifter|2|4|Changeling (This card is every creature type.$When Littjara Kinseekers enters the battlefield, if you control three or more creatures that share a creature type, put a +1/+1 counter on Littjara Kinseekers, then scry 1.|
|
||||
Littjara Kinseekers|Kaldheim|66|C|{3}{U}|Creature - Shapeshifter|2|4|Changeling$When Littjara Kinseekers enters the battlefield, if you control three or more creatures that share a creature type, put a +1/+1 counter on Littjara Kinseekers, then scry 1.|
|
||||
Ravenform|Kaldheim|72|C|{2}{U}|Sorcery|||Exile target artifact or creature. Its controller creates a 1/1 blue Bird creature token with flying.$Foretell {U}|
|
||||
Reflections of Littjara|Kaldheim|73|R|{4}{U}|Enchantment|||As Reflections of Littjara enters the battlefield, choose a creature type.$Whenever you cast a spell of the chosen type, copy that spell.|
|
||||
Saw It Coming|Kaldheim|76|U|{1}{U}{U}|Instant|||Counter target spell.$Foretell {1}{U}|
|
||||
|
|
Loading…
Reference in a new issue