[ZNR] Implemented Squad Commander

This commit is contained in:
Evan Kranzler 2020-09-08 12:00:42 -04:00
parent 67be7a36a5
commit 7c50e8cb49
2 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,68 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.FullPartyCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.dynamicvalue.common.PartyCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.hint.common.PartyCountHint;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.StaticFilters;
import mage.game.permanent.token.KorWarriorToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SquadCommander extends CardImpl {
public SquadCommander(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add(SubType.KOR);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// When Squad Commander enters the battlefield, create a 1/1 white Kor Warrior creature token for each creature in your party.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(
new KorWarriorToken(), PartyCount.instance)
).addHint(PartyCountHint.instance));
// At the beginning of combat on your turn, if you have a full party, creatures you control get +1/+0 and gain indestructible until end of turn.
Ability ability = new ConditionalInterveningIfTriggeredAbility(
new BeginningOfCombatTriggeredAbility(
new BoostControlledEffect(
1, 0, Duration.EndOfTurn
), TargetController.YOU, false
), FullPartyCondition.instance, "At the beginning of combat on your turn, " +
"if you have a full party, creatures you control get +1/+0 and gain indestructible until end of turn."
);
ability.addEffect(new GainAbilityAllEffect(
IndestructibleAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_CONTROLLED_CREATURE
));
this.addAbility(ability);
}
private SquadCommander(final SquadCommander card) {
super(card);
}
@Override
public SquadCommander copy() {
return new SquadCommander(this);
}
}

View file

@ -275,6 +275,7 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Spitfire Lagac", 167, Rarity.COMMON, mage.cards.s.SpitfireLagac.class));
cards.add(new SetCardInfo("Spoils of Adventure", 237, Rarity.UNCOMMON, mage.cards.s.SpoilsOfAdventure.class));
cards.add(new SetCardInfo("Springmantle Cleric", 205, Rarity.UNCOMMON, mage.cards.s.SpringmantleCleric.class));
cards.add(new SetCardInfo("Squad Commander", 41, Rarity.RARE, mage.cards.s.SquadCommander.class));
cards.add(new SetCardInfo("Stonework Packbeast", 255, Rarity.COMMON, mage.cards.s.StoneworkPackbeast.class));
cards.add(new SetCardInfo("Subtle Strike", 128, Rarity.COMMON, mage.cards.s.SubtleStrike.class));
cards.add(new SetCardInfo("Sure-Footed Infiltrator", 83, Rarity.UNCOMMON, mage.cards.s.SureFootedInfiltrator.class));