mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[MSH] Implement Thunderbolts Conspiracy
This commit is contained in:
parent
15cd693acb
commit
c4092116e4
2 changed files with 100 additions and 0 deletions
99
Mage.Sets/src/mage/cards/t/ThunderboltsConspiracy.java
Normal file
99
Mage.Sets/src/mage/cards/t/ThunderboltsConspiracy.java
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.AddCardSubTypeTargetEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.Card;
|
||||
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.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author muz
|
||||
*/
|
||||
public final class ThunderboltsConspiracy extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.VILLAIN, "a Villain you control");
|
||||
|
||||
public ThunderboltsConspiracy(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// Whenever a Villain you control dies, return it to the battlefield under its owner's
|
||||
// control with a finality counter on it. That creature is a Hero in addition to its other types.
|
||||
this.addAbility(new DiesCreatureTriggeredAbility(
|
||||
new ThunderboltsConspiracyEffect(), false, filter, true
|
||||
));
|
||||
}
|
||||
|
||||
private ThunderboltsConspiracy(final ThunderboltsConspiracy card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThunderboltsConspiracy copy() {
|
||||
return new ThunderboltsConspiracy(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ThunderboltsConspiracyEffect extends OneShotEffect {
|
||||
|
||||
ThunderboltsConspiracyEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.staticText = "return it to the battlefield under its owner's control " +
|
||||
"with a finality counter on it. That creature is a Hero in addition to its other types";
|
||||
}
|
||||
|
||||
private ThunderboltsConspiracyEffect(final ThunderboltsConspiracyEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThunderboltsConspiracyEffect copy() {
|
||||
return new ThunderboltsConspiracyEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Card card = game.getCard(getTargetPointer().getFirst(game, source));
|
||||
if (controller == null || card == null || !card.isPermanent(game)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Player owner = game.getPlayer(card.getOwnerId());
|
||||
if (owner == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Counters countersToAdd = new Counters();
|
||||
countersToAdd.addCounter(CounterType.FINALITY.createInstance());
|
||||
game.setEnterWithCounters(card.getId(), countersToAdd);
|
||||
owner.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
Permanent permanent = CardUtil.getPermanentFromCardPutToBattlefield(card, game);
|
||||
game.addEffect(new AddCardSubTypeTargetEffect(
|
||||
SubType.HERO, Duration.Custom
|
||||
).setTargetPointer(new FixedTarget(permanent, game)), source);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -35,5 +35,6 @@ public final class MarvelSuperHeroes extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("The Coming of Galactus", 212, Rarity.MYTHIC, mage.cards.t.TheComingOfGalactus.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("The Coming of Galactus", 307, Rarity.MYTHIC, mage.cards.t.TheComingOfGalactus.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("The Sentry, Golden Guardian", 35, Rarity.RARE, mage.cards.t.TheSentryGoldenGuardian.class));
|
||||
cards.add(new SetCardInfo("Thunderbolts Conspiracy", 117, Rarity.RARE, mage.cards.t.ThunderboltsConspiracy.class));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue