mirror of
https://github.com/correl/mage.git
synced 2024-12-30 19:10:36 +00:00
[VOW] Implemented Serpentine Ambush
This commit is contained in:
parent
86277a72e3
commit
b6ab7dbaac
2 changed files with 96 additions and 0 deletions
95
Mage.Sets/src/mage/cards/s/SerpentineAmbush.java
Normal file
95
Mage.Sets/src/mage/cards/s/SerpentineAmbush.java
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class SerpentineAmbush extends CardImpl {
|
||||||
|
|
||||||
|
public SerpentineAmbush(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||||
|
|
||||||
|
// Until end of turn, target creature becomes a blue Serpent with base power and toughness 5/5.
|
||||||
|
this.getSpellAbility().addEffect(new SerpentineAmbushEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
|
}
|
||||||
|
|
||||||
|
private SerpentineAmbush(final SerpentineAmbush card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SerpentineAmbush copy() {
|
||||||
|
return new SerpentineAmbush(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SerpentineAmbushEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
SerpentineAmbushEffect() {
|
||||||
|
super(Duration.EndOfTurn, Outcome.Benefit);
|
||||||
|
staticText = "until end of turn, target creature becomes " +
|
||||||
|
"a blue Serpent with base power and toughness 5/5";
|
||||||
|
}
|
||||||
|
|
||||||
|
private SerpentineAmbushEffect(final SerpentineAmbushEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SerpentineAmbushEffect copy() {
|
||||||
|
return new SerpentineAmbushEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||||
|
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||||
|
if (permanent == null) {
|
||||||
|
discard();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
switch (layer) {
|
||||||
|
case TypeChangingEffects_4:
|
||||||
|
permanent.removeAllCreatureTypes(game);
|
||||||
|
permanent.addSubType(game, SubType.SERPENT);
|
||||||
|
return true;
|
||||||
|
case ColorChangingEffects_5:
|
||||||
|
permanent.getColor(game).setColor(ObjectColor.BLUE);
|
||||||
|
return true;
|
||||||
|
case PTChangingEffects_7:
|
||||||
|
if (sublayer == SubLayer.SetPT_7b) {
|
||||||
|
permanent.getPower().setValue(5);
|
||||||
|
permanent.getToughness().setValue(5);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasLayer(Layer layer) {
|
||||||
|
switch (layer) {
|
||||||
|
case TypeChangingEffects_4:
|
||||||
|
case ColorChangingEffects_5:
|
||||||
|
case PTChangingEffects_7:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -225,6 +225,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Sawblade Slinger", 217, Rarity.UNCOMMON, mage.cards.s.SawbladeSlinger.class));
|
cards.add(new SetCardInfo("Sawblade Slinger", 217, Rarity.UNCOMMON, mage.cards.s.SawbladeSlinger.class));
|
||||||
cards.add(new SetCardInfo("Scattered Thoughts", 74, Rarity.COMMON, mage.cards.s.ScatteredThoughts.class));
|
cards.add(new SetCardInfo("Scattered Thoughts", 74, Rarity.COMMON, mage.cards.s.ScatteredThoughts.class));
|
||||||
cards.add(new SetCardInfo("Selhoff Entomber", 76, Rarity.COMMON, mage.cards.s.SelhoffEntomber.class));
|
cards.add(new SetCardInfo("Selhoff Entomber", 76, Rarity.COMMON, mage.cards.s.SelhoffEntomber.class));
|
||||||
|
cards.add(new SetCardInfo("Serpentine Ambush", 77, Rarity.COMMON, mage.cards.s.SerpentineAmbush.class));
|
||||||
cards.add(new SetCardInfo("Shattered Sanctum", 264, Rarity.RARE, mage.cards.s.ShatteredSanctum.class));
|
cards.add(new SetCardInfo("Shattered Sanctum", 264, Rarity.RARE, mage.cards.s.ShatteredSanctum.class));
|
||||||
cards.add(new SetCardInfo("Sheltering Boughs", 218, Rarity.COMMON, mage.cards.s.ShelteringBoughs.class));
|
cards.add(new SetCardInfo("Sheltering Boughs", 218, Rarity.COMMON, mage.cards.s.ShelteringBoughs.class));
|
||||||
cards.add(new SetCardInfo("Sigarda's Imprisonment", 35, Rarity.COMMON, mage.cards.s.SigardasImprisonment.class));
|
cards.add(new SetCardInfo("Sigarda's Imprisonment", 35, Rarity.COMMON, mage.cards.s.SigardasImprisonment.class));
|
||||||
|
|
Loading…
Reference in a new issue