mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
[LCI] Implement Belligerent Yearling
This commit is contained in:
parent
713753471a
commit
c31d29af6a
3 changed files with 102 additions and 8 deletions
90
Mage.Sets/src/mage/cards/b/BelligerentYearling.java
Normal file
90
Mage.Sets/src/mage/cards/b/BelligerentYearling.java
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class BelligerentYearling extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.DINOSAUR, "another Dinosaur");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public BelligerentYearling(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.DINOSAUR);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Whenever another Dinosaur enters the battlefield under your control, you may have Belligerent Yearling's base power become equal to that creature's power until end of turn.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new BelligerentYearlingEffect(), filter,
|
||||
true, SetTargetPointer.PERMANENT
|
||||
));
|
||||
}
|
||||
|
||||
private BelligerentYearling(final BelligerentYearling card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BelligerentYearling copy() {
|
||||
return new BelligerentYearling(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inspired by {@link mage.cards.e.EldraziMimic}
|
||||
*/
|
||||
class BelligerentYearlingEffect extends OneShotEffect {
|
||||
|
||||
public BelligerentYearlingEffect() {
|
||||
super(Outcome.Detriment);
|
||||
staticText = "have {this}'s base power become equal to that creature's power until end of turn";
|
||||
}
|
||||
|
||||
private BelligerentYearlingEffect(final BelligerentYearlingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BelligerentYearlingEffect copy() {
|
||||
return new BelligerentYearlingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
|
||||
if (controller == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ContinuousEffect effect = new SetBasePowerSourceEffect(permanent.getPower().getValue(), Duration.EndOfTurn);
|
||||
game.addEffect(effect, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||
|
|
@ -11,24 +10,25 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class EldraziMimic extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent FILTER = new FilterCreaturePermanent("another colorless creature");
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another colorless creature");
|
||||
|
||||
static {
|
||||
FILTER.add(AnotherPredicate.instance);
|
||||
FILTER.add(ColorlessPredicate.instance);
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(ColorlessPredicate.instance);
|
||||
}
|
||||
|
||||
public EldraziMimic(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
@ -39,7 +39,10 @@ public final class EldraziMimic extends CardImpl {
|
|||
|
||||
// Whenever another colorless creature enters the battlefield under your control, you may have the base power and toughness of Eldrazi Mimic
|
||||
// become that creature's power and toughness until end of turn.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new EldraziMimicEffect(), FILTER, true, SetTargetPointer.PERMANENT));
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new EldraziMimicEffect(), filter,
|
||||
true, SetTargetPointer.PERMANENT
|
||||
));
|
||||
}
|
||||
|
||||
private EldraziMimic(final EldraziMimic card) {
|
||||
|
|
@ -55,7 +58,7 @@ public final class EldraziMimic extends CardImpl {
|
|||
class EldraziMimicEffect extends OneShotEffect {
|
||||
|
||||
public EldraziMimicEffect() {
|
||||
super(Outcome.Detriment);
|
||||
super(Outcome.BoostCreature);
|
||||
staticText = "you may have the base power and toughness of {this} become that creature's power and toughness until end of turn";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Amalia Benavides Aguirre", 221, Rarity.RARE, mage.cards.a.AmaliaBenavidesAguirre.class));
|
||||
cards.add(new SetCardInfo("Bartolome del Presidio", 224, Rarity.UNCOMMON, mage.cards.b.BartolomeDelPresidio.class));
|
||||
cards.add(new SetCardInfo("Bedrock Tortoise", 176, Rarity.RARE, mage.cards.b.BedrockTortoise.class));
|
||||
cards.add(new SetCardInfo("Belligerent Yearling", 133, Rarity.UNCOMMON, mage.cards.b.BelligerentYearling.class));
|
||||
cards.add(new SetCardInfo("Bladewheel Chariot", 36, Rarity.UNCOMMON, mage.cards.b.BladewheelChariot.class));
|
||||
cards.add(new SetCardInfo("Bloodletter of Aclazotz", 92, Rarity.MYTHIC, mage.cards.b.BloodletterOfAclazotz.class));
|
||||
cards.add(new SetCardInfo("Bloodthorn Flail", 93, Rarity.UNCOMMON, mage.cards.b.BloodthornFlail.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue