mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
[LTC] Implement Bilbo, Birthday Celebrant
This commit is contained in:
parent
5c390b919d
commit
0bf70260b8
8 changed files with 146 additions and 213 deletions
|
@ -5,17 +5,15 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.replacement.GainPlusOneLifeReplacementEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -36,7 +34,7 @@ public final class AngelOfVitality extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// If you would gain life, you gain that much life plus 1 instead.
|
||||
this.addAbility(new SimpleStaticAbility(new AngelOfVitalityEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new GainPlusOneLifeReplacementEffect()));
|
||||
|
||||
// Angel of Vitality gets +2/+2 as long as you have 25 or more life.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
|
@ -55,44 +53,6 @@ public final class AngelOfVitality extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class AngelOfVitalityEffect extends ReplacementEffectImpl {
|
||||
|
||||
AngelOfVitalityEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "If you would gain life, you gain that much life plus 1 instead";
|
||||
}
|
||||
|
||||
private AngelOfVitalityEffect(final AngelOfVitalityEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelOfVitalityEffect copy() {
|
||||
return new AngelOfVitalityEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(event.getAmount() + 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.GAIN_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
}
|
||||
|
||||
enum AngelOfVitalityCondition implements Condition {
|
||||
instance;
|
||||
|
||||
|
|
72
Mage.Sets/src/mage/cards/b/BilboBirthdayCelebrant.java
Normal file
72
Mage.Sets/src/mage/cards/b/BilboBirthdayCelebrant.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.ExileSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.common.replacement.GainPlusOneLifeReplacementEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BilboBirthdayCelebrant extends CardImpl {
|
||||
|
||||
public BilboBirthdayCelebrant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}{G}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HALFLING);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// If you would gain life, you gain that much life plus 1 instead.
|
||||
this.addAbility(new SimpleStaticAbility(new GainPlusOneLifeReplacementEffect()));
|
||||
|
||||
// {2}{W}{B}{G}, {T}, Exile Bilbo, Birthday Celebrant: Search your library for any number of creature cards, put them onto the battlefield, then shuffle. Activate only if you have 111 or more life.
|
||||
Ability ability = new ConditionalActivatedAbility(new SearchLibraryPutInPlayEffect(
|
||||
new TargetCardInLibrary(0, Integer.MAX_VALUE, StaticFilters.FILTER_CARD_CREATURES)
|
||||
), new ManaCostsImpl<>("{2}{W}{B}{G}"), BilboBirthdayCelebrantCondition.instance);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new ExileSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private BilboBirthdayCelebrant(final BilboBirthdayCelebrant card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BilboBirthdayCelebrant copy() {
|
||||
return new BilboBirthdayCelebrant(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum BilboBirthdayCelebrantCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.getPlayer(source.getControllerId()).getLife() >= 111;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "you have 111 or more life";
|
||||
}
|
||||
}
|
|
@ -5,19 +5,21 @@ import mage.abilities.common.BecomesClassLevelTriggeredAbility;
|
|||
import mage.abilities.common.GainLifeControllerTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.GainClassAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.effects.common.replacement.GainPlusOneLifeReplacementEffect;
|
||||
import mage.abilities.keyword.ClassLevelAbility;
|
||||
import mage.abilities.keyword.ClassReminderAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
@ -39,7 +41,7 @@ public final class ClericClass extends CardImpl {
|
|||
this.addAbility(new ClassReminderAbility());
|
||||
|
||||
// If you would gain life, you gain that much life plus 1 instead.
|
||||
this.addAbility(new SimpleStaticAbility(new ClericClassLifeEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new GainPlusOneLifeReplacementEffect()));
|
||||
|
||||
// {3}{W}: Level 2
|
||||
this.addAbility(new ClassLevelAbility(2, "{3}{W}"));
|
||||
|
@ -70,44 +72,6 @@ public final class ClericClass extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class ClericClassLifeEffect extends ReplacementEffectImpl {
|
||||
|
||||
ClericClassLifeEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "If you would gain life, you gain that much life plus 1 instead";
|
||||
}
|
||||
|
||||
private ClericClassLifeEffect(final ClericClassLifeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClericClassLifeEffect copy() {
|
||||
return new ClericClassLifeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(event.getAmount() + 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.GAIN_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
}
|
||||
|
||||
class ClericClassReturnEffect extends OneShotEffect {
|
||||
|
||||
ClericClassReturnEffect() {
|
||||
|
|
|
@ -1,26 +1,22 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.effects.common.replacement.GainPlusOneLifeReplacementEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class HeronOfHope extends CardImpl {
|
||||
|
@ -36,7 +32,7 @@ public final class HeronOfHope extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// If you would gain life, you gain that much life plus 1 instead.
|
||||
this.addAbility(new SimpleStaticAbility(new HeronOfHopeEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new GainPlusOneLifeReplacementEffect()));
|
||||
|
||||
// {1}{W}: Heron of Hope gains lifelink until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
|
@ -54,36 +50,3 @@ public final class HeronOfHope extends CardImpl {
|
|||
return new HeronOfHope(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HeronOfHopeEffect extends ReplacementEffectImpl {
|
||||
|
||||
public HeronOfHopeEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "If you would gain life, you gain that much life plus 1 instead";
|
||||
}
|
||||
|
||||
private HeronOfHopeEffect(final HeronOfHopeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeronOfHopeEffect copy() {
|
||||
return new HeronOfHopeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(event.getAmount() + 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.GAIN_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,17 +5,15 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.replacement.GainPlusOneLifeReplacementEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -37,7 +35,7 @@ public final class HonorTroll extends CardImpl {
|
|||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// If you would gain life, you gain that much life plus 1 instead.
|
||||
this.addAbility(new SimpleStaticAbility(new HonorTrollEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new GainPlusOneLifeReplacementEffect()));
|
||||
|
||||
// Honor Troll gets +2/+1 as long as you have 25 or more life.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
|
@ -56,44 +54,6 @@ public final class HonorTroll extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class HonorTrollEffect extends ReplacementEffectImpl {
|
||||
|
||||
HonorTrollEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "If you would gain life, you gain that much life plus 1 instead";
|
||||
}
|
||||
|
||||
private HonorTrollEffect(final HonorTrollEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HonorTrollEffect copy() {
|
||||
return new HonorTrollEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(event.getAmount() + 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.GAIN_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
}
|
||||
|
||||
enum HonorTrollCondition implements Condition {
|
||||
instance;
|
||||
|
||||
|
|
|
@ -1,25 +1,21 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.effects.common.replacement.GainPlusOneLifeReplacementEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class KnightOfDawnsLight extends CardImpl {
|
||||
|
@ -36,7 +32,7 @@ public final class KnightOfDawnsLight extends CardImpl {
|
|||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
|
||||
// If you would gain life, you gain that much life plus 1 instead.
|
||||
this.addAbility(new SimpleStaticAbility(new KnightOfDawnsLightEffect()));
|
||||
this.addAbility(new SimpleStaticAbility(new GainPlusOneLifeReplacementEffect()));
|
||||
|
||||
// {1}{W}: Knight of Dawn's Light gets +1/+1 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
|
@ -54,36 +50,3 @@ public final class KnightOfDawnsLight extends CardImpl {
|
|||
return new KnightOfDawnsLight(this);
|
||||
}
|
||||
}
|
||||
|
||||
class KnightOfDawnsLightEffect extends ReplacementEffectImpl {
|
||||
|
||||
public KnightOfDawnsLightEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
this.staticText = "If you would gain life, you gain that much life plus 1 instead.";
|
||||
}
|
||||
|
||||
private KnightOfDawnsLightEffect(final KnightOfDawnsLightEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KnightOfDawnsLightEffect copy() {
|
||||
return new KnightOfDawnsLightEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(event.getAmount() + 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.GAIN_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Battlefield Forge", 296, Rarity.RARE, mage.cards.b.BattlefieldForge.class));
|
||||
cards.add(new SetCardInfo("Beast Within", 234, Rarity.UNCOMMON, mage.cards.b.BeastWithin.class));
|
||||
cards.add(new SetCardInfo("Beregond of the Guard", 9, Rarity.RARE, mage.cards.b.BeregondOfTheGuard.class));
|
||||
cards.add(new SetCardInfo("Bilbo, Birthday Celebrant", 48, Rarity.RARE, mage.cards.b.BilboBirthdayCelebrant.class));
|
||||
cards.add(new SetCardInfo("Birds of Paradise", 235, Rarity.RARE, mage.cards.b.BirdsOfParadise.class));
|
||||
cards.add(new SetCardInfo("Blasphemous Act", 211, Rarity.RARE, mage.cards.b.BlasphemousAct.class));
|
||||
cards.add(new SetCardInfo("Bojuka Bog", 358, Rarity.MYTHIC, mage.cards.b.BojukaBog.class));
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
package mage.abilities.effects.common.replacement;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class GainPlusOneLifeReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
public GainPlusOneLifeReplacementEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "if you would gain life, you gain that much life plus 1 instead";
|
||||
}
|
||||
|
||||
private GainPlusOneLifeReplacementEffect(final GainPlusOneLifeReplacementEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GainPlusOneLifeReplacementEffect copy() {
|
||||
return new GainPlusOneLifeReplacementEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(CardUtil.overflowInc(event.getAmount(), 1));
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.GAIN_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.isControlledBy(event.getPlayerId());
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue