mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Implement Street Savvy
This commit is contained in:
parent
1b14c6f72d
commit
239222b397
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/s/StreetSavvy.java
Normal file
80
Mage.Sets/src/mage/cards/s/StreetSavvy.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.constants.*;
|
||||
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 StreetSavvy extends CardImpl {
|
||||
|
||||
public StreetSavvy(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// 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 +0/+2 and can block creatures with landwalk abilities as though they didn't have those abilities.
|
||||
SimpleStaticAbility staticAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(0 ,2)
|
||||
.setText("Enchanted creature gets +0/+2 and can block creatures with landwalk abilities as though they didn't have those abilities."));
|
||||
staticAbility.addEffect(new StreetSavvyEffect());
|
||||
this.addAbility(staticAbility);
|
||||
}
|
||||
|
||||
public StreetSavvy(final StreetSavvy card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StreetSavvy copy() {
|
||||
return new StreetSavvy(this);
|
||||
}
|
||||
}
|
||||
|
||||
class StreetSavvyEffect extends AsThoughEffectImpl {
|
||||
|
||||
public StreetSavvyEffect() {
|
||||
super(AsThoughEffectType.BLOCK_LANDWALK, Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "";
|
||||
}
|
||||
|
||||
public StreetSavvyEffect(final StreetSavvyEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StreetSavvyEffect copy() {
|
||||
return new StreetSavvyEffect(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());
|
||||
}
|
||||
}
|
|
@ -173,6 +173,7 @@ public final class Dissension extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Stoic Ephemera", 19, Rarity.UNCOMMON, mage.cards.s.StoicEphemera.class));
|
||||
cards.add(new SetCardInfo("Stomp and Howl", 96, Rarity.UNCOMMON, mage.cards.s.StompAndHowl.class));
|
||||
cards.add(new SetCardInfo("Stormscale Anarch", 74, Rarity.RARE, mage.cards.s.StormscaleAnarch.class));
|
||||
cards.add(new SetCardInfo("Street Savvy", 97, Rarity.COMMON, mage.cards.s.StreetSavvy.class));
|
||||
cards.add(new SetCardInfo("Supply // Demand", 157, Rarity.UNCOMMON, mage.cards.s.SupplyDemand.class));
|
||||
cards.add(new SetCardInfo("Taste for Mayhem", 75, Rarity.COMMON, mage.cards.t.TasteForMayhem.class));
|
||||
cards.add(new SetCardInfo("Thrive", 98, Rarity.COMMON, mage.cards.t.Thrive.class));
|
||||
|
|
Loading…
Reference in a new issue