mirror of
https://github.com/correl/mage.git
synced 2024-12-27 20:06:31 +00:00
[J22] Implement Termination Facilitator
This commit is contained in:
parent
a479015680
commit
e97311f21f
2 changed files with 96 additions and 0 deletions
95
Mage.Sets/src/mage/cards/t/TerminationFacilitator.java
Normal file
95
Mage.Sets/src/mage/cards/t/TerminationFacilitator.java
Normal file
|
@ -0,0 +1,95 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TerminationFacilitator extends CardImpl {
|
||||
|
||||
public TerminationFacilitator(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ASSASSIN);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {T}: Put a bounty counter on target creature or planeswalker. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
new AddCountersTargetEffect(CounterType.BOUNTY.createInstance()), new TapSourceCost()
|
||||
);
|
||||
ability.addTarget(new TargetCreatureOrPlaneswalker());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever a creature or planeswalker an opponent controls with a bounty counter on it is dealt damage, destroy it.
|
||||
this.addAbility(new TerminationFacilitatorTriggeredAbility());
|
||||
}
|
||||
|
||||
private TerminationFacilitator(final TerminationFacilitator card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerminationFacilitator copy() {
|
||||
return new TerminationFacilitator(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TerminationFacilitatorTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
TerminationFacilitatorTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DestroyTargetEffect());
|
||||
}
|
||||
|
||||
private TerminationFacilitatorTriggeredAbility(final TerminationFacilitatorTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerminationFacilitatorTriggeredAbility copy() {
|
||||
return new TerminationFacilitatorTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_PERMANENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null
|
||||
&& permanent.getCounters(game).containsKey(CounterType.BOUNTY)
|
||||
&& game.getOpponents(getControllerId()).contains(permanent.getControllerId())
|
||||
&& (permanent.isCreature(game) || permanent.isPlaneswalker(game))) {
|
||||
this.getEffects().setTargetPointer(new FixedTarget(permanent, game));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a creature or planeswalker an opponent controls with a bounty counter on it is dealt damage, destroy it.";
|
||||
}
|
||||
}
|
|
@ -707,6 +707,7 @@ public final class Jumpstart2022 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Teferi's Protege", 359, Rarity.COMMON, mage.cards.t.TeferisProtege.class));
|
||||
cards.add(new SetCardInfo("Teferi's Puzzle Box", 801, Rarity.RARE, mage.cards.t.TeferisPuzzleBox.class));
|
||||
cards.add(new SetCardInfo("Tempered Veteran", 254, Rarity.UNCOMMON, mage.cards.t.TemperedVeteran.class));
|
||||
cards.add(new SetCardInfo("Termination Facilitator", 28, Rarity.RARE, mage.cards.t.TerminationFacilitator.class));
|
||||
cards.add(new SetCardInfo("Tezzeret, Artifice Master", 360, Rarity.MYTHIC, mage.cards.t.TezzeretArtificeMaster.class));
|
||||
cards.add(new SetCardInfo("Thaumaturge's Familiar", 802, Rarity.COMMON, mage.cards.t.ThaumaturgesFamiliar.class));
|
||||
cards.add(new SetCardInfo("The Circle of Loyalty", 166, Rarity.MYTHIC, mage.cards.t.TheCircleOfLoyalty.class));
|
||||
|
|
Loading…
Reference in a new issue