mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
[DSK] Implement Found Footage
This commit is contained in:
parent
e382951e16
commit
22df21d15d
3 changed files with 79 additions and 6 deletions
50
Mage.Sets/src/mage/cards/f/FoundFootage.java
Normal file
50
Mage.Sets/src/mage/cards/f/FoundFootage.java
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
package mage.cards.f;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.LookAtOpponentFaceDownCreaturesAnyTimeEffect;
|
||||||
|
import mage.abilities.effects.keyword.SurveilEffect;
|
||||||
|
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 java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class FoundFootage extends CardImpl {
|
||||||
|
|
||||||
|
public FoundFootage(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.CLUE);
|
||||||
|
|
||||||
|
// You may look at face-down creatures your opponents control any time.
|
||||||
|
this.addAbility(new SimpleStaticAbility(
|
||||||
|
new LookAtOpponentFaceDownCreaturesAnyTimeEffect(Duration.WhileOnBattlefield, TargetController.OPPONENT)
|
||||||
|
));
|
||||||
|
|
||||||
|
// {2}, Sacrifice Found Footage: Surveil 2, then draw a card.
|
||||||
|
Ability ability = new SimpleActivatedAbility(new SurveilEffect(2), new GenericManaCost(2));
|
||||||
|
ability.addCost(new SacrificeSourceCost());
|
||||||
|
ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy(", then"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private FoundFootage(final FoundFootage card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FoundFootage copy() {
|
||||||
|
return new FoundFootage(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -91,6 +91,7 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Floodfarm Verge", 259, Rarity.RARE, mage.cards.f.FloodfarmVerge.class));
|
cards.add(new SetCardInfo("Floodfarm Verge", 259, Rarity.RARE, mage.cards.f.FloodfarmVerge.class));
|
||||||
cards.add(new SetCardInfo("Floodpits Drowner", 59, Rarity.UNCOMMON, mage.cards.f.FloodpitsDrowner.class));
|
cards.add(new SetCardInfo("Floodpits Drowner", 59, Rarity.UNCOMMON, mage.cards.f.FloodpitsDrowner.class));
|
||||||
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Found Footage", 246, Rarity.COMMON, mage.cards.f.FoundFootage.class));
|
||||||
cards.add(new SetCardInfo("Frantic Strength", 179, Rarity.COMMON, mage.cards.f.FranticStrength.class));
|
cards.add(new SetCardInfo("Frantic Strength", 179, Rarity.COMMON, mage.cards.f.FranticStrength.class));
|
||||||
cards.add(new SetCardInfo("Friendly Ghost", 12, Rarity.COMMON, mage.cards.f.FriendlyGhost.class));
|
cards.add(new SetCardInfo("Friendly Ghost", 12, Rarity.COMMON, mage.cards.f.FriendlyGhost.class));
|
||||||
cards.add(new SetCardInfo("Friendly Teddy", 247, Rarity.COMMON, mage.cards.f.FriendlyTeddy.class));
|
cards.add(new SetCardInfo("Friendly Teddy", 247, Rarity.COMMON, mage.cards.f.FriendlyTeddy.class));
|
||||||
|
|
|
||||||
|
|
@ -14,24 +14,28 @@ import mage.players.Player;
|
||||||
* @author notgreat
|
* @author notgreat
|
||||||
*/
|
*/
|
||||||
public class LookAtOpponentFaceDownCreaturesAnyTimeEffect extends ContinuousEffectImpl {
|
public class LookAtOpponentFaceDownCreaturesAnyTimeEffect extends ContinuousEffectImpl {
|
||||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("face-down creatures you don't control");
|
|
||||||
|
|
||||||
static {
|
private final FilterCreaturePermanent filter;
|
||||||
filter.add(FaceDownPredicate.instance);
|
|
||||||
filter.add(TargetController.NOT_YOU.getControllerPredicate());
|
|
||||||
}
|
|
||||||
|
|
||||||
public LookAtOpponentFaceDownCreaturesAnyTimeEffect() {
|
public LookAtOpponentFaceDownCreaturesAnyTimeEffect() {
|
||||||
this(Duration.WhileOnBattlefield);
|
this(Duration.WhileOnBattlefield);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LookAtOpponentFaceDownCreaturesAnyTimeEffect(Duration duration) {
|
public LookAtOpponentFaceDownCreaturesAnyTimeEffect(Duration duration) {
|
||||||
|
this(duration, TargetController.NOT_YOU);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LookAtOpponentFaceDownCreaturesAnyTimeEffect(Duration duration, TargetController targetController) {
|
||||||
super(duration, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit);
|
super(duration, Layer.PlayerEffects, SubLayer.NA, Outcome.Benefit);
|
||||||
staticText = (duration.toString().isEmpty() ? "" : duration.toString() + ", ") + "you may look at face-down creatures you don't control any time";
|
staticText = makeText(duration, targetController);
|
||||||
|
filter = new FilterCreaturePermanent();
|
||||||
|
filter.add(FaceDownPredicate.instance);
|
||||||
|
filter.add(targetController.getControllerPredicate());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected LookAtOpponentFaceDownCreaturesAnyTimeEffect(final LookAtOpponentFaceDownCreaturesAnyTimeEffect effect) {
|
protected LookAtOpponentFaceDownCreaturesAnyTimeEffect(final LookAtOpponentFaceDownCreaturesAnyTimeEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
|
this.filter = effect.filter.copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Based on LookAtTopCardOfLibraryAnyTimeEffect
|
//Based on LookAtTopCardOfLibraryAnyTimeEffect
|
||||||
|
|
@ -56,4 +60,22 @@ public class LookAtOpponentFaceDownCreaturesAnyTimeEffect extends ContinuousEffe
|
||||||
public LookAtOpponentFaceDownCreaturesAnyTimeEffect copy() {
|
public LookAtOpponentFaceDownCreaturesAnyTimeEffect copy() {
|
||||||
return new LookAtOpponentFaceDownCreaturesAnyTimeEffect(this);
|
return new LookAtOpponentFaceDownCreaturesAnyTimeEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String makeText(Duration duration, TargetController targetController) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
if (!duration.toString().isEmpty()) {
|
||||||
|
sb.append(duration);
|
||||||
|
sb.append(", ");
|
||||||
|
}
|
||||||
|
sb.append("you may look at face-down creatures ");
|
||||||
|
switch (targetController) {
|
||||||
|
case NOT_YOU:
|
||||||
|
sb.append("you don't control ");
|
||||||
|
break;
|
||||||
|
case OPPONENT:
|
||||||
|
sb.append("your opponents control ");
|
||||||
|
}
|
||||||
|
sb.append("any time");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue