forked from External/mage
[TLE] Implement Chong and Lily, Nomads
This commit is contained in:
parent
7322bf784f
commit
6c45ec6004
2 changed files with 109 additions and 0 deletions
107
Mage.Sets/src/mage/cards/c/ChongAndLilyNomads.java
Normal file
107
Mage.Sets/src/mage/cards/c/ChongAndLilyNomads.java
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
package mage.cards.c;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.Mode;
|
||||||
|
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||||
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class ChongAndLilyNomads extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.BARD, "Bards you control");
|
||||||
|
|
||||||
|
public ChongAndLilyNomads(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.BARD);
|
||||||
|
this.subtype.add(SubType.ALLY);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// Whenever one or more Bards you control attack, choose one --
|
||||||
|
// * Put a lore counter on each of any number of target Sagas you control.
|
||||||
|
Ability ability = new AttacksWithCreaturesTriggeredAbility(
|
||||||
|
new AddCountersTargetEffect(CounterType.LORE.createInstance()), 1, filter
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetPermanent(0, Integer.MAX_VALUE, ChongAndLilyNomadsValue.getFilter()));
|
||||||
|
|
||||||
|
// * Creatures you control get +1/+0 until end of turn for each lore counter among Sagas you control.
|
||||||
|
ability.addMode(new Mode(new BoostControlledEffect(
|
||||||
|
ChongAndLilyNomadsValue.instance, StaticValue.get(0), Duration.WhileOnBattlefield
|
||||||
|
)));
|
||||||
|
this.addAbility(ability.addHint(ChongAndLilyNomadsValue.getHint()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private ChongAndLilyNomads(final ChongAndLilyNomads card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChongAndLilyNomads copy() {
|
||||||
|
return new ChongAndLilyNomads(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ChongAndLilyNomadsValue implements DynamicValue {
|
||||||
|
instance;
|
||||||
|
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.SAGA, "Sagas you control");
|
||||||
|
|
||||||
|
public static FilterPermanent getFilter() {
|
||||||
|
return filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Hint hint = new ValueHint("Lore counters among Sagas you control", instance);
|
||||||
|
|
||||||
|
public static Hint getHint() {
|
||||||
|
return hint;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||||
|
return game
|
||||||
|
.getBattlefield()
|
||||||
|
.getActivePermanents(filter, sourceAbility.getControllerId(), sourceAbility, game)
|
||||||
|
.stream()
|
||||||
|
.mapToInt(permanent -> permanent.getCounters(game).getCount(CounterType.LORE))
|
||||||
|
.sum();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChongAndLilyNomadsValue copy() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMessage() {
|
||||||
|
return "lore counter among Sagas you control";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -72,6 +72,8 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Cathartic Reunion", 164, Rarity.COMMON, mage.cards.c.CatharticReunion.class));
|
cards.add(new SetCardInfo("Cathartic Reunion", 164, Rarity.COMMON, mage.cards.c.CatharticReunion.class));
|
||||||
cards.add(new SetCardInfo("Chakra Meditation", 179, Rarity.RARE, mage.cards.c.ChakraMeditation.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Chakra Meditation", 179, Rarity.RARE, mage.cards.c.ChakraMeditation.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Chakra Meditation", 91, Rarity.RARE, mage.cards.c.ChakraMeditation.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Chakra Meditation", 91, Rarity.RARE, mage.cards.c.ChakraMeditation.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Chong and Lily, Nomads", 113, Rarity.RARE, mage.cards.c.ChongAndLilyNomads.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Chong and Lily, Nomads", 192, Rarity.RARE, mage.cards.c.ChongAndLilyNomads.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Cityscape Leveler", 53, Rarity.MYTHIC, mage.cards.c.CityscapeLeveler.class));
|
cards.add(new SetCardInfo("Cityscape Leveler", 53, Rarity.MYTHIC, mage.cards.c.CityscapeLeveler.class));
|
||||||
cards.add(new SetCardInfo("Clone Legion", 12, Rarity.MYTHIC, mage.cards.c.CloneLegion.class));
|
cards.add(new SetCardInfo("Clone Legion", 12, Rarity.MYTHIC, mage.cards.c.CloneLegion.class));
|
||||||
cards.add(new SetCardInfo("Clone", 11, Rarity.MYTHIC, mage.cards.c.Clone.class));
|
cards.add(new SetCardInfo("Clone", 11, Rarity.MYTHIC, mage.cards.c.Clone.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue