mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
Implement Aether Web
This commit is contained in:
parent
6c000d9177
commit
836ae4ca27
2 changed files with 89 additions and 0 deletions
88
Mage.Sets/src/mage/cards/a/AetherWeb.java
Normal file
88
Mage.Sets/src/mage/cards/a/AetherWeb.java
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
package mage.cards.a;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import mage.abilities.StaticAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.AsThoughEffectImpl;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||||
|
import mage.abilities.keyword.ReachAbility;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.abilities.keyword.FlashAbility;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author noahg
|
||||||
|
*/
|
||||||
|
public final class AetherWeb extends CardImpl {
|
||||||
|
|
||||||
|
public AetherWeb(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
|
// Flash
|
||||||
|
this.addAbility(FlashAbility.getInstance());
|
||||||
|
|
||||||
|
// Enchant creature
|
||||||
|
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
// Enchanted creature gets +1/+1, has reach, and can block creatures with shadow as though they didn't have shadow.
|
||||||
|
StaticAbility staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1)
|
||||||
|
.setText("Enchanted creature gets +1/+1, has reach, and can block creatures with shadow as though they didn't have shadow."));
|
||||||
|
staticAbility.addEffect(new GainAbilityAttachedEffect(ReachAbility.getInstance(), AttachmentType.AURA).setText(""));
|
||||||
|
staticAbility.addEffect(new AetherWebEffect());
|
||||||
|
this.addAbility(staticAbility);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AetherWeb(final AetherWeb card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AetherWeb copy() {
|
||||||
|
return new AetherWeb(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AetherWebEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
|
public AetherWebEffect() {
|
||||||
|
super(AsThoughEffectType.BLOCK_SHADOW, Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
|
staticText = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public AetherWebEffect(final AetherWebEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AetherWebEffect copy() {
|
||||||
|
return new AetherWebEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
|
||||||
|
Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game);
|
||||||
|
return sourcePermanent != null && sourceId.equals(sourcePermanent.getAttachedTo());
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,6 +26,7 @@ public final class TimeSpiral extends ExpansionSet {
|
||||||
this.numBoosterRare = 1;
|
this.numBoosterRare = 1;
|
||||||
this.ratioBoosterMythic = 0;
|
this.ratioBoosterMythic = 0;
|
||||||
cards.add(new SetCardInfo("Academy Ruins", 269, Rarity.RARE, mage.cards.a.AcademyRuins.class));
|
cards.add(new SetCardInfo("Academy Ruins", 269, Rarity.RARE, mage.cards.a.AcademyRuins.class));
|
||||||
|
cards.add(new SetCardInfo("Aether Web", 189, Rarity.COMMON, mage.cards.a.AetherWeb.class));
|
||||||
cards.add(new SetCardInfo("Amrou Scout", 1, Rarity.COMMON, mage.cards.a.AmrouScout.class));
|
cards.add(new SetCardInfo("Amrou Scout", 1, Rarity.COMMON, mage.cards.a.AmrouScout.class));
|
||||||
cards.add(new SetCardInfo("Amrou Seekers", 2, Rarity.COMMON, mage.cards.a.AmrouSeekers.class));
|
cards.add(new SetCardInfo("Amrou Seekers", 2, Rarity.COMMON, mage.cards.a.AmrouSeekers.class));
|
||||||
cards.add(new SetCardInfo("Ancestral Vision", 48, Rarity.RARE, mage.cards.a.AncestralVision.class));
|
cards.add(new SetCardInfo("Ancestral Vision", 48, Rarity.RARE, mage.cards.a.AncestralVision.class));
|
||||||
|
|
Loading…
Reference in a new issue