forked from External/mage
[WOE] Implement Welcome to Sweettooth (#10937)
This commit is contained in:
parent
319e5df120
commit
d789aea306
3 changed files with 74 additions and 0 deletions
69
Mage.Sets/src/mage/cards/w/WelcomeToSweettooth.java
Normal file
69
Mage.Sets/src/mage/cards/w/WelcomeToSweettooth.java
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.abilities.common.SagaAbility;
|
||||
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
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.SagaChapter;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.FoodToken;
|
||||
import mage.game.permanent.token.HumanToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class WelcomeToSweettooth extends CardImpl {
|
||||
|
||||
private static final DynamicValue numberFood =
|
||||
new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_FOOD);
|
||||
private static final DynamicValue xValue = new AdditiveDynamicValue(StaticValue.get(1), numberFood);
|
||||
|
||||
private static final Hint hint = new ValueHint("Controlled Foods", numberFood);
|
||||
|
||||
public WelcomeToSweettooth(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||
|
||||
this.subtype.add(SubType.SAGA);
|
||||
|
||||
// (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)
|
||||
SagaAbility sagaAbility = new SagaAbility(this);
|
||||
// I -- Create a 1/1 white Human creature token.
|
||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new CreateTokenEffect(new HumanToken()));
|
||||
|
||||
// II -- Create a Food token.
|
||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new CreateTokenEffect(new FoodToken()));
|
||||
|
||||
// III -- Put X +1/+1 counters on target creature you control, where X is one plus the number of Foods you control.
|
||||
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III,
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance(), xValue)
|
||||
.setText("put X +1/+1 counters on target creature you control, "
|
||||
+ "where X is one plus the number of Foods you control"),
|
||||
new TargetControlledCreaturePermanent()
|
||||
);
|
||||
sagaAbility.addHint(hint);
|
||||
|
||||
this.addAbility(sagaAbility);
|
||||
}
|
||||
|
||||
private WelcomeToSweettooth(final WelcomeToSweettooth card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WelcomeToSweettooth copy() {
|
||||
return new WelcomeToSweettooth(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -163,6 +163,7 @@ public final class WildsOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Virtue of Persistence", 115, Rarity.MYTHIC, mage.cards.v.VirtueOfPersistence.class));
|
||||
cards.add(new SetCardInfo("Voracious Vermin", 116, Rarity.COMMON, mage.cards.v.VoraciousVermin.class));
|
||||
cards.add(new SetCardInfo("Warehouse Tabby", 117, Rarity.COMMON, mage.cards.w.WarehouseTabby.class));
|
||||
cards.add(new SetCardInfo("Welcome to Sweettooth", 198, Rarity.UNCOMMON, mage.cards.w.WelcomeToSweettooth.class));
|
||||
cards.add(new SetCardInfo("Werefox Bodyguard", 39, Rarity.RARE, mage.cards.w.WerefoxBodyguard.class));
|
||||
cards.add(new SetCardInfo("Will, Scion of Peace", 218, Rarity.MYTHIC, mage.cards.w.WillScionOfPeace.class));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@ public class SagaAbility extends SimpleStaticAbility {
|
|||
addChapterEffect(card, chapter, chapter, new Effects(effects));
|
||||
}
|
||||
|
||||
public void addChapterEffect(Card card, SagaChapter chapter, Effect effect, Target target) {
|
||||
addChapterEffect(card, chapter, chapter, new Effects(effect), target);
|
||||
}
|
||||
|
||||
public void addChapterEffect(Card card, SagaChapter chapter, Effects effects, Target target) {
|
||||
addChapterEffect(card, chapter, chapter, effects, target);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue