mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Implemented Disinformation Campaign
This commit is contained in:
parent
78d34f7289
commit
f92b36dc75
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/d/DisinformationCampaign.java
Normal file
80
Mage.Sets/src/mage/cards/d/DisinformationCampaign.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardEachPlayerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DisinformationCampaign extends CardImpl {
|
||||
|
||||
public DisinformationCampaign(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{B}");
|
||||
|
||||
// When Disinformation Campaign enters the battlefield, you draw a card and each opponent discards a card.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new DrawCardSourceControllerEffect(1).setText("you draw a card")
|
||||
);
|
||||
ability.addEffect(new DiscardEachPlayerEffect(
|
||||
new StaticValue(1), false, TargetController.OPPONENT
|
||||
).setText("and each opponent discards a card"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever you surveil, return Disinformation Campaign to its owner's hand.
|
||||
this.addAbility(new DisinformationCampaignTriggeredAbility());
|
||||
}
|
||||
|
||||
public DisinformationCampaign(final DisinformationCampaign card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DisinformationCampaign copy() {
|
||||
return new DisinformationCampaign(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DisinformationCampaignTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public DisinformationCampaignTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), false);
|
||||
}
|
||||
|
||||
public DisinformationCampaignTriggeredAbility(final DisinformationCampaignTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DisinformationCampaignTriggeredAbility copy() {
|
||||
return new DisinformationCampaignTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.SURVEIL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getPlayerId().equals(this.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you surveil, return {this} to its owner's hand.";
|
||||
}
|
||||
}
|
|
@ -58,6 +58,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dimir Spybug", 166, Rarity.UNCOMMON, mage.cards.d.DimirSpybug.class));
|
||||
cards.add(new SetCardInfo("Direct Current", 96, Rarity.COMMON, mage.cards.d.DirectCurrent.class));
|
||||
cards.add(new SetCardInfo("Disdainful Stroke", 37, Rarity.COMMON, mage.cards.d.DisdainfulStroke.class));
|
||||
cards.add(new SetCardInfo("Disinformation Campaign", 167, Rarity.UNCOMMON, mage.cards.d.DisinformationCampaign.class));
|
||||
cards.add(new SetCardInfo("District Guide", 128, Rarity.UNCOMMON, mage.cards.d.DistrictGuide.class));
|
||||
cards.add(new SetCardInfo("Doom Whisperer", 69, Rarity.MYTHIC, mage.cards.d.DoomWhisperer.class));
|
||||
cards.add(new SetCardInfo("Dream Eater", 38, Rarity.MYTHIC, mage.cards.d.DreamEater.class));
|
||||
|
|
Loading…
Reference in a new issue