[CLB] Implemented Wyll, Blade of Frontiers

This commit is contained in:
Evan Kranzler 2022-05-20 21:04:15 -04:00
parent 12af6ab2e5
commit e11619dc19
2 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,96 @@
package mage.cards.w;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ChooseABackgroundAbility;
import mage.abilities.common.OneOrMoreDiceRolledTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.RollDiceEvent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class WyllBladeOfFrontiers extends CardImpl {
public WyllBladeOfFrontiers(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARLOCK);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// If you would roll one or more dice, instead roll that many dice plus one and ignore the lowest roll.
this.addAbility(new SimpleStaticAbility(new WyllBladeOfFrontiersEffect()));
// Whenever you roll one or more dice, put a +1/+1 counter on Wyll, Blade of Frontiers.
this.addAbility(new OneOrMoreDiceRolledTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance())
));
// Choose a Background
this.addAbility(ChooseABackgroundAbility.getInstance());
}
private WyllBladeOfFrontiers(final WyllBladeOfFrontiers card) {
super(card);
}
@Override
public WyllBladeOfFrontiers copy() {
return new WyllBladeOfFrontiers(this);
}
}
class WyllBladeOfFrontiersEffect extends ReplacementEffectImpl {
WyllBladeOfFrontiersEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "if you would roll one or more dice, " +
"instead roll that many dice plus one and ignore the lowest roll";
}
private WyllBladeOfFrontiersEffect(final WyllBladeOfFrontiersEffect effect) {
super(effect);
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
RollDiceEvent rdEvent = (RollDiceEvent) event;
rdEvent.incAmount(1);
rdEvent.incIgnoreLowestAmount(1);
return false;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ROLL_DICE
&& ((RollDiceEvent) event).getRollDieType() == RollDieType.NUMERICAL;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return source.isControlledBy(event.getPlayerId());
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public WyllBladeOfFrontiersEffect copy() {
return new WyllBladeOfFrontiersEffect(this);
}
}

View file

@ -113,6 +113,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
cards.add(new SetCardInfo("Wayfarer's Bauble", 344, Rarity.COMMON, mage.cards.w.WayfarersBauble.class));
cards.add(new SetCardInfo("White Plume Adventurer", 49, Rarity.RARE, mage.cards.w.WhitePlumeAdventurer.class));
cards.add(new SetCardInfo("Wilson, Refined Grizzly", 261, Rarity.UNCOMMON, mage.cards.w.WilsonRefinedGrizzly.class));
cards.add(new SetCardInfo("Wyll, Blade of Frontiers", 208, Rarity.RARE, mage.cards.w.WyllBladeOfFrontiers.class));
cards.add(new SetCardInfo("Zevlor, Elturel Exile", 296, Rarity.RARE, mage.cards.z.ZevlorElturelExile.class));
}
}