[SNC] Implemented Hostile Takeover

This commit is contained in:
Daniel Bomar 2022-04-12 15:16:24 -05:00
parent 81d7cbd977
commit 25f9607f29
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.h;
import java.util.UUID;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.other.AnotherTargetPredicate;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.SecondTargetPointer;
/**
*
* @author weirddan455
*/
public final class HostileTakeover extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other target creature");
static {
filter.add(new AnotherTargetPredicate(2));
}
public HostileTakeover(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{B}{R}");
// Up to one target creature has base power and toughness 1/1 until end of turn. Up to one other target creature has base power and toughness 4/4 until end of turn. Then Hostile Takeover deals 3 damage to each creature.
this.getSpellAbility().addEffect(new SetPowerToughnessTargetEffect(1, 1, Duration.EndOfTurn));
TargetCreaturePermanent target1 = new TargetCreaturePermanent(0, 1);
target1.setTargetTag(1);
this.getSpellAbility().addTarget(target1.withChooseHint("1/1"));
this.getSpellAbility().addEffect(new SetPowerToughnessTargetEffect(4, 4, Duration.EndOfTurn)
.setTargetPointer(new SecondTargetPointer())
.setText("up to one other target creature has base power and toughness 4/4 until end of turn"));
TargetCreaturePermanent target2 = new TargetCreaturePermanent(0, 1, filter, false);
target2.setTargetTag(2);
this.getSpellAbility().addTarget(target2.withChooseHint("4/4"));
this.getSpellAbility().addEffect(new DamageAllEffect(3, StaticFilters.FILTER_PERMANENT_CREATURE)
.concatBy("Then"));
}
private HostileTakeover(final HostileTakeover card) {
super(card);
}
@Override
public HostileTakeover copy() {
return new HostileTakeover(this);
}
}

View file

@ -63,6 +63,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
cards.add(new SetCardInfo("Graveyard Shift", 81, Rarity.UNCOMMON, mage.cards.g.GraveyardShift.class));
cards.add(new SetCardInfo("Grisly Sigil", 82, Rarity.UNCOMMON, mage.cards.g.GrislySigil.class));
cards.add(new SetCardInfo("Halo Fountain", 15, Rarity.MYTHIC, mage.cards.h.HaloFountain.class));
cards.add(new SetCardInfo("Hostile Takeover", 191, Rarity.RARE, mage.cards.h.HostileTakeover.class));
cards.add(new SetCardInfo("Hypnotic Grifter", 45, Rarity.UNCOMMON, mage.cards.h.HypnoticGrifter.class));
cards.add(new SetCardInfo("Illicit Shipment", 83, Rarity.UNCOMMON, mage.cards.i.IllicitShipment.class));
cards.add(new SetCardInfo("Illuminator Virtuoso", 17, Rarity.UNCOMMON, mage.cards.i.IlluminatorVirtuoso.class));