mirror of
https://github.com/correl/mage.git
synced 2025-04-09 01:01:06 -09:00
[STX] Implemented Spiteful Squad
This commit is contained in:
parent
3914aa656a
commit
845953c4ec
2 changed files with 91 additions and 0 deletions
Mage.Sets/src/mage
90
Mage.Sets/src/mage/cards/s/SpitefulSquad.java
Normal file
90
Mage.Sets/src/mage/cards/s/SpitefulSquad.java
Normal file
|
@ -0,0 +1,90 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SpitefulSquad extends CardImpl {
|
||||
|
||||
public SpitefulSquad(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{B}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARLOCK);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// Deathtouch
|
||||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
|
||||
// Spiteful Squad enters the battlefield with two +1/+1 counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)),
|
||||
"with two +1/+1 counters on it"
|
||||
));
|
||||
|
||||
// When Spiteful Squad dies, put its counters on target creature you control.
|
||||
Ability ability = new DiesSourceTriggeredAbility(new SpitefulSquadEffect());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private SpitefulSquad(final SpitefulSquad card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpitefulSquad copy() {
|
||||
return new SpitefulSquad(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SpitefulSquadEffect extends OneShotEffect {
|
||||
|
||||
SpitefulSquadEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "put its counters on target creature you control";
|
||||
}
|
||||
|
||||
private SpitefulSquadEffect(final SpitefulSquadEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpitefulSquadEffect copy() {
|
||||
return new SpitefulSquadEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = source.getSourcePermanentOrLKI(game);
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (sourcePermanent == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
sourcePermanent
|
||||
.getCounters(game)
|
||||
.values()
|
||||
.stream()
|
||||
.forEach(counter -> permanent.addCounters(counter, source.getControllerId(), source, game));
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -203,6 +203,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Spell Satchel", 258, Rarity.UNCOMMON, mage.cards.s.SpellSatchel.class));
|
||||
cards.add(new SetCardInfo("Spined Karok", 143, Rarity.COMMON, mage.cards.s.SpinedKarok.class));
|
||||
cards.add(new SetCardInfo("Spirit Summoning", 236, Rarity.COMMON, mage.cards.s.SpiritSummoning.class));
|
||||
cards.add(new SetCardInfo("Spiteful Squad", 237, Rarity.COMMON, mage.cards.s.SpitefulSquad.class));
|
||||
cards.add(new SetCardInfo("Springmane Cervin", 144, Rarity.COMMON, mage.cards.s.SpringmaneCervin.class));
|
||||
cards.add(new SetCardInfo("Square Up", 238, Rarity.COMMON, mage.cards.s.SquareUp.class));
|
||||
cards.add(new SetCardInfo("Star Pupil", 30, Rarity.COMMON, mage.cards.s.StarPupil.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue