[BRO] Implemented Gixian Puppeteer

This commit is contained in:
Daniel Bomar 2022-11-02 15:07:44 -05:00
parent 0fbdea965d
commit 7244700fdb
No known key found for this signature in database
GPG key ID: C86C8658F4023918
3 changed files with 69 additions and 2 deletions

View file

@ -0,0 +1,62 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.common.DrawSecondCardTriggeredAbility;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.constants.ComparisonType;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.target.common.TargetCardInYourGraveyard;
/**
*
* @author weirddan455
*/
public final class GixianPuppeteer extends CardImpl {
private static final FilterCreatureCard filter
= new FilterCreatureCard("another target creature card with mana value 3 or less from your graveyard");
static {
filter.add(AnotherPredicate.instance);
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
}
public GixianPuppeteer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.WARLOCK);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// Whenever you draw your second card each turn, each opponent loses 2 life and you gain 2 life.
Ability ability = new DrawSecondCardTriggeredAbility(new LoseLifeOpponentsEffect(2), false);
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
this.addAbility(ability);
// When Gixian Puppeteer dies, return another target creature card with mana value 3 or less from your graveyard to the battlefield.
ability = new DiesSourceTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect());
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}
private GixianPuppeteer(final GixianPuppeteer card) {
super(card);
}
@Override
public GixianPuppeteer copy() {
return new GixianPuppeteer(this);
}
}

View file

@ -62,6 +62,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Gaea's Courser", 181, Rarity.UNCOMMON, mage.cards.g.GaeasCourser.class));
cards.add(new SetCardInfo("Giant Growth", 183, Rarity.COMMON, mage.cards.g.GiantGrowth.class));
cards.add(new SetCardInfo("Gix's Caress", 96, Rarity.COMMON, mage.cards.g.GixsCaress.class));
cards.add(new SetCardInfo("Gixian Puppeteer", 99, Rarity.RARE, mage.cards.g.GixianPuppeteer.class));
cards.add(new SetCardInfo("Gnawing Vermin", 101, Rarity.UNCOMMON, mage.cards.g.GnawingVermin.class));
cards.add(new SetCardInfo("Go for the Throat", 102, Rarity.UNCOMMON, mage.cards.g.GoForTheThroat.class));
cards.add(new SetCardInfo("Goblin Firebomb", 235, Rarity.COMMON, mage.cards.g.GoblinFirebomb.class));

View file

@ -93,7 +93,11 @@ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect
}
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' ');
}
sb.append("target ").append(mode.getTargets().get(0).getTargetName());
String targetName = mode.getTargets().get(0).getTargetName();
if (!targetName.contains("target ")) {
sb.append("target ");
}
sb.append(targetName);
}
sb.append(yourGrave ? " to" : " onto");
sb.append(" the battlefield");
@ -109,4 +113,4 @@ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect
}
return sb.toString();
}
}
}