mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
[DMU] Implemented Keldon Strike Team
This commit is contained in:
parent
e700d91246
commit
7b097f89a4
2 changed files with 83 additions and 0 deletions
82
Mage.Sets/src/mage/cards/k/KeldonStrikeTeam.java
Normal file
82
Mage.Sets/src/mage/cards/k/KeldonStrikeTeam.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.SoldierToken;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class KeldonStrikeTeam extends CardImpl {
|
||||
|
||||
public KeldonStrikeTeam(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Kicker {1}{W}
|
||||
this.addAbility(new KickerAbility("{1}{W}"));
|
||||
|
||||
// When Keldon Strike Team enters the battlefield, if it was kicked, create two 1/1 white Soldier creature tokens.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), 2)),
|
||||
KickedCondition.ONCE, "When {this} enters the battlefield, if it was kicked, " +
|
||||
"create two 1/1 white Soldier creature tokens."
|
||||
));
|
||||
|
||||
// As long as Keldon Strike Team entered the battlefield this turn, creatures you control have haste.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new GainAbilityControlledEffect(
|
||||
HasteAbility.getInstance(), Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE
|
||||
), KeldonStrikeTeamCondition.instance, "as long as {this} " +
|
||||
"entered the battlefield this turn, creatures you control have haste"
|
||||
)));
|
||||
}
|
||||
|
||||
private KeldonStrikeTeam(final KeldonStrikeTeam card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KeldonStrikeTeam copy() {
|
||||
return new KeldonStrikeTeam(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum KeldonStrikeTeamCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return Optional.ofNullable(source.getSourcePermanentIfItStillExists(game))
|
||||
.filter(Objects::nonNull)
|
||||
.map(Permanent::getTurnsOnBattlefield)
|
||||
.orElse(-1) == 0;
|
||||
}
|
||||
}
|
|
@ -122,6 +122,7 @@ public final class DominariaUnited extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Joint Exploration", 56, Rarity.UNCOMMON, mage.cards.j.JointExploration.class));
|
||||
cards.add(new SetCardInfo("Juniper Order Rootweaver", 22, Rarity.COMMON, mage.cards.j.JuniperOrderRootweaver.class));
|
||||
cards.add(new SetCardInfo("Karplusan Forest", 250, Rarity.RARE, mage.cards.k.KarplusanForest.class));
|
||||
cards.add(new SetCardInfo("Keldon Strike Team", 136, Rarity.COMMON, mage.cards.k.KeldonStrikeTeam.class));
|
||||
cards.add(new SetCardInfo("King Darien XLVIII", 204, Rarity.RARE, mage.cards.k.KingDarienXLVIII.class));
|
||||
cards.add(new SetCardInfo("Knight of Dawn's Light", 23, Rarity.UNCOMMON, mage.cards.k.KnightOfDawnsLight.class));
|
||||
cards.add(new SetCardInfo("Knight of Dusk's Shadow", 96, Rarity.UNCOMMON, mage.cards.k.KnightOfDusksShadow.class));
|
||||
|
|
Loading…
Reference in a new issue