mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[BOT] Implemented Flamewar, Brash Veteran / Flamewar, Streetwise Operative
This commit is contained in:
parent
4d81b76180
commit
17be0c11ba
5 changed files with 206 additions and 1 deletions
106
Mage.Sets/src/mage/cards/f/FlamewarBrashVeteran.java
Normal file
106
Mage.Sets/src/mage/cards/f/FlamewarBrashVeteran.java
Normal file
|
@ -0,0 +1,106 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.DiscardHandCost;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.MoreThanMeetsTheEyeAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FlamewarBrashVeteran extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledArtifactPermanent("another artifact");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
public FlamewarBrashVeteran(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{B}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ROBOT);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
this.secondSideCardClazz = mage.cards.f.FlamewarStreetwiseOperative.class;
|
||||
|
||||
// More Than Meets the Eye {B}{R}
|
||||
this.addAbility(new MoreThanMeetsTheEyeAbility(this, "{B}{R}"));
|
||||
|
||||
// Sacrifice another artifact: Put a +1/+1 counter on Flamewar and convert it. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new SacrificeTargetCost(filter)
|
||||
);
|
||||
ability.addEffect(new TransformSourceEffect().setText("and convert it"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {1}, Discard your hand: Put all exiled cards you own with intel counters on them into your hand.
|
||||
ability = new SimpleActivatedAbility(new FlamewarBrashVeteranEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new DiscardHandCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private FlamewarBrashVeteran(final FlamewarBrashVeteran card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlamewarBrashVeteran copy() {
|
||||
return new FlamewarBrashVeteran(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FlamewarBrashVeteranEffect extends OneShotEffect {
|
||||
|
||||
FlamewarBrashVeteranEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "put all exiled cards you own with intel counters on them into your hand";
|
||||
}
|
||||
|
||||
private FlamewarBrashVeteranEffect(final FlamewarBrashVeteranEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlamewarBrashVeteranEffect copy() {
|
||||
return new FlamewarBrashVeteranEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Set<Card> cards = game
|
||||
.getExile()
|
||||
.getAllCards(game, source.getControllerId())
|
||||
.stream()
|
||||
.filter(card -> card.getCounters(game).containsKey(CounterType.INTEL))
|
||||
.collect(Collectors.toSet());
|
||||
return !cards.isEmpty() && player.moveCards(cards, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
96
Mage.Sets/src/mage/cards/f/FlamewarStreetwiseOperative.java
Normal file
96
Mage.Sets/src/mage/cards/f/FlamewarStreetwiseOperative.java
Normal file
|
@ -0,0 +1,96 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.LivingMetalAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FlamewarStreetwiseOperative extends CardImpl {
|
||||
|
||||
public FlamewarStreetwiseOperative(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.VEHICLE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
this.color.setRed(true);
|
||||
this.color.setBlack(true);
|
||||
this.nightCard = true;
|
||||
|
||||
// Living metal
|
||||
this.addAbility(new LivingMetalAbility());
|
||||
|
||||
// Menace
|
||||
this.addAbility(new MenaceAbility(false));
|
||||
|
||||
// Deathtouch
|
||||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
|
||||
// Whenever Flamewar deals combat damage to a player, exile that many cards from the top of your library face down. Put an intel counter on each of them. Convert Flamewar.
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new FlamewarBrashVeteranEffect(), false);
|
||||
ability.addEffect(new TransformSourceEffect().setText("convert {this}"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private FlamewarStreetwiseOperative(final FlamewarStreetwiseOperative card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlamewarStreetwiseOperative copy() {
|
||||
return new FlamewarStreetwiseOperative(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FlamewarStreetwiseOperativeEffect extends OneShotEffect {
|
||||
|
||||
FlamewarStreetwiseOperativeEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "exile that many cards from the top of your library face down. " +
|
||||
"Put an intel counter on each of them";
|
||||
}
|
||||
|
||||
private FlamewarStreetwiseOperativeEffect(final FlamewarStreetwiseOperativeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlamewarStreetwiseOperativeEffect copy() {
|
||||
return new FlamewarStreetwiseOperativeEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
int damage = (Integer) getValue("damage");
|
||||
if (player == null || damage < 1) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, damage));
|
||||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
cards.retainZone(Zone.EXILED, game);
|
||||
cards.getCards(game).stream().forEach(card -> {
|
||||
card.setFaceDown(true, game);
|
||||
card.addCounters(CounterType.INTEL.createInstance(), source, game);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -19,6 +19,8 @@ public final class Transformers extends ExpansionSet {
|
|||
super("Transformers", "BOT", ExpansionSet.buildDate(2022, 11, 18), SetType.SUPPLEMENTAL);
|
||||
this.hasBasicLands = false;
|
||||
|
||||
cards.add(new SetCardInfo("Flamewar, Brash Veteran", 10, Rarity.MYTHIC, mage.cards.f.FlamewarBrashVeteran.class));
|
||||
cards.add(new SetCardInfo("Flamewar, Streetwise Operative", 10, Rarity.MYTHIC, mage.cards.f.FlamewarStreetwiseOperative.class));
|
||||
cards.add(new SetCardInfo("Goldbug, Humanity's Ally", 11, Rarity.MYTHIC, mage.cards.g.GoldbugHumanitysAlly.class));
|
||||
cards.add(new SetCardInfo("Goldbug, Scrappy Scout", 11, Rarity.MYTHIC, mage.cards.g.GoldbugScrappyScout.class));
|
||||
cards.add(new SetCardInfo("Ultra Magnus, Armored Carrier", 15, Rarity.MYTHIC, mage.cards.u.UltraMagnusArmoredCarrier.class));
|
||||
|
|
|
@ -96,6 +96,7 @@ public enum CounterType {
|
|||
INDESTRUCTIBLE("indestructible"),
|
||||
INFECTION("infection"),
|
||||
INGENUITY("ingenuity"),
|
||||
INTEL("intel"),
|
||||
INTERVENTION("intervention"),
|
||||
INVITATION("invitation"),
|
||||
ISOLATION("isolation"),
|
||||
|
|
|
@ -86,7 +86,7 @@ public class Exile implements Serializable, Copyable<Exile> {
|
|||
List<Card> res = new ArrayList<>();
|
||||
for (ExileZone exile : exileZones.values()) {
|
||||
for (Card card : exile.getCards(game)) {
|
||||
if (fromPlayerId == null || card.getOwnerId().equals(fromPlayerId)) {
|
||||
if (fromPlayerId == null || card.isOwnedBy(fromPlayerId)) {
|
||||
res.add(card);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue