[TLA] Implement Boiling Rock Rioter

This commit is contained in:
theelk801 2025-11-11 17:20:40 -05:00
parent 4eaf1233c9
commit 019e3ecf1c
2 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,104 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileTargetForSourceEffect;
import mage.abilities.keyword.FirebendingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInGraveyard;
import mage.util.CardUtil;
import java.util.Optional;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BoilingRockRioter extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledPermanent(SubType.ALLY, "untaped Ally you control");
static {
filter.add(TappedPredicate.UNTAPPED);
}
public BoilingRockRioter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE);
this.subtype.add(SubType.ALLY);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Firebending 1
this.addAbility(new FirebendingAbility(1));
// Tap an untapped Ally you control: Exile target card from a graveyard.
Ability ability = new SimpleActivatedAbility(new ExileTargetForSourceEffect(), new TapTargetCost(filter));
ability.addTarget(new TargetCardInGraveyard());
this.addAbility(ability);
// Whenever this creature attacks, you may cast an Ally spell from among cards you own exiled with this creature.
this.addAbility(new AttacksTriggeredAbility(new BoilingRockRioterEffect()));
}
private BoilingRockRioter(final BoilingRockRioter card) {
super(card);
}
@Override
public BoilingRockRioter copy() {
return new BoilingRockRioter(this);
}
}
class BoilingRockRioterEffect extends OneShotEffect {
private static final FilterCard filter = new FilterCard(SubType.ALLY);
BoilingRockRioterEffect() {
super(Outcome.Benefit);
staticText = "you may cast an Ally spell from among cards you own exiled with this creature";
}
private BoilingRockRioterEffect(final BoilingRockRioterEffect effect) {
super(effect);
}
@Override
public BoilingRockRioterEffect copy() {
return new BoilingRockRioterEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Cards cards = Optional
.ofNullable(CardUtil.getExileZoneId(game, source))
.map(game.getExile()::getExileZone)
.map(CardsImpl::new)
.orElseGet(CardsImpl::new);
cards.removeIf(uuid -> !source.isControlledBy(game.getOwnerId(uuid)));
return CardUtil.castSpellWithAttributesForFree(player, source, game, cards, filter);
}
}

View file

@ -64,6 +64,8 @@ public final class AvatarTheLastAirbender extends ExpansionSet {
cards.add(new SetCardInfo("Benevolent River Spirit", 45, Rarity.UNCOMMON, mage.cards.b.BenevolentRiverSpirit.class));
cards.add(new SetCardInfo("Boar-q-pine", 124, Rarity.COMMON, mage.cards.b.BoarQPine.class));
cards.add(new SetCardInfo("Boiling Rock Prison", 267, Rarity.COMMON, mage.cards.b.BoilingRockPrison.class));
cards.add(new SetCardInfo("Boiling Rock Rioter", 372, Rarity.RARE, mage.cards.b.BoilingRockRioter.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Boiling Rock Rioter", 87, Rarity.RARE, mage.cards.b.BoilingRockRioter.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Boomerang Basics", 46, Rarity.UNCOMMON, mage.cards.b.BoomerangBasics.class));
cards.add(new SetCardInfo("Bumi Bash", 125, Rarity.COMMON, mage.cards.b.BumiBash.class));
cards.add(new SetCardInfo("Bumi, Unleashed", 211, Rarity.MYTHIC, mage.cards.b.BumiUnleashed.class, NON_FULL_USE_VARIOUS));