mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[AFR] Implemented Skeletal Swarming
This commit is contained in:
parent
dff5b201d5
commit
2f3328ce20
2 changed files with 74 additions and 0 deletions
73
Mage.Sets/src/mage/cards/s/SkeletalSwarming.java
Normal file
73
Mage.Sets/src/mage/cards/s/SkeletalSwarming.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.MorbidCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.AdditiveDynamicValue;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.hint.common.MorbidHint;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
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.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.permanent.token.SkeletonToken;
|
||||
import mage.watchers.common.MorbidWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SkeletalSwarming extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.SKELETON);
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent(SubType.SKELETON, "");
|
||||
private static final DynamicValue xValue = new AdditiveDynamicValue(new PermanentsOnBattlefieldCount(), StaticValue.get(-1));
|
||||
|
||||
public SkeletalSwarming(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{G}");
|
||||
|
||||
// Each Skeleton you control has trample, attacks each combat if able, and gets +X/+0, where X is the number of other Skeletons you control.
|
||||
Ability ability = new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||
TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter
|
||||
).setText("each Skeleton you control has trample"));
|
||||
ability.addEffect(new AttacksIfAbleAllEffect(filter2).setText(", attacks each combat if able"));
|
||||
ability.addEffect(new BoostControlledEffect(
|
||||
xValue, xValue, Duration.WhileOnBattlefield, filter2, false
|
||||
).setText(", and gets +X/+0, where X is the number of other Skeletons you control"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// At the beginning of your end step, create a tapped 1/1 black Skeleton creature token. If a creature died this turn, create two of those tokens instead.
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||
new ConditionalOneShotEffect(
|
||||
new CreateTokenEffect(new SkeletonToken(), 2, true, false),
|
||||
new CreateTokenEffect(new SkeletonToken(), 1, true, false),
|
||||
MorbidCondition.instance, "create a tapped 1/1 black Skeleton creature token. " +
|
||||
"If a creature died this turn, create two of those tokens instead"
|
||||
), TargetController.YOU, false
|
||||
).addHint(MorbidHint.instance), new MorbidWatcher());
|
||||
}
|
||||
|
||||
private SkeletalSwarming(final SkeletalSwarming card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SkeletalSwarming copy() {
|
||||
return new SkeletalSwarming(this);
|
||||
}
|
||||
}
|
|
@ -186,6 +186,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Shocking Grasp", 72, Rarity.COMMON, mage.cards.s.ShockingGrasp.class));
|
||||
cards.add(new SetCardInfo("Shortcut Seeker", 73, Rarity.COMMON, mage.cards.s.ShortcutSeeker.class));
|
||||
cards.add(new SetCardInfo("Silver Raven", 74, Rarity.COMMON, mage.cards.s.SilverRaven.class));
|
||||
cards.add(new SetCardInfo("Skeletal Swarming", 232, Rarity.RARE, mage.cards.s.SkeletalSwarming.class));
|
||||
cards.add(new SetCardInfo("Skullport Merchant", 120, Rarity.UNCOMMON, mage.cards.s.SkullportMerchant.class));
|
||||
cards.add(new SetCardInfo("Soulknife Spy", 75, Rarity.COMMON, mage.cards.s.SoulknifeSpy.class));
|
||||
cards.add(new SetCardInfo("Spike Pit Trap", 251, Rarity.COMMON, mage.cards.s.SpikePitTrap.class));
|
||||
|
|
Loading…
Reference in a new issue