mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[AFC] Implemented Thorough Investigation
This commit is contained in:
parent
86c2081a82
commit
d7b2d2208d
3 changed files with 43 additions and 2 deletions
40
Mage.Sets/src/mage/cards/t/ThoroughInvestigation.java
Normal file
40
Mage.Sets/src/mage/cards/t/ThoroughInvestigation.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
|
||||
import mage.abilities.common.SacrificePermanentTriggeredAbility;
|
||||
import mage.abilities.effects.keyword.InvestigateEffect;
|
||||
import mage.abilities.effects.keyword.VentureIntoTheDungeonEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ThoroughInvestigation extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.CLUE, "a Clue");
|
||||
|
||||
public ThoroughInvestigation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
|
||||
// Whenever you attack, investigate.
|
||||
this.addAbility(new AttacksWithCreaturesTriggeredAbility(new InvestigateEffect(), 0));
|
||||
|
||||
// Whenever you sacrifice a Clue, venture into the dungeon.
|
||||
this.addAbility(new SacrificePermanentTriggeredAbility(new VentureIntoTheDungeonEffect(), filter));
|
||||
}
|
||||
|
||||
private ThoroughInvestigation(final ThoroughInvestigation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThoroughInvestigation copy() {
|
||||
return new ThoroughInvestigation(this);
|
||||
}
|
||||
}
|
|
@ -217,6 +217,7 @@ public final class ForgottenRealmsCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Terramorphic Expanse", 267, Rarity.COMMON, mage.cards.t.TerramorphicExpanse.class));
|
||||
cards.add(new SetCardInfo("Terror of Mount Velus", 145, Rarity.RARE, mage.cards.t.TerrorOfMountVelus.class));
|
||||
cards.add(new SetCardInfo("Theater of Horrors", 194, Rarity.RARE, mage.cards.t.TheaterOfHorrors.class));
|
||||
cards.add(new SetCardInfo("Thorough Investigation", 12, Rarity.RARE, mage.cards.t.ThoroughInvestigation.class));
|
||||
cards.add(new SetCardInfo("Thriving Grove", 268, Rarity.COMMON, mage.cards.t.ThrivingGrove.class));
|
||||
cards.add(new SetCardInfo("Thriving Heath", 269, Rarity.COMMON, mage.cards.t.ThrivingHeath.class));
|
||||
cards.add(new SetCardInfo("Thriving Isle", 270, Rarity.COMMON, mage.cards.t.ThrivingIsle.class));
|
||||
|
|
|
@ -43,8 +43,8 @@ public class SacrificePermanentTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getPlayerId().equals(this.getControllerId())
|
||||
&& filter.match(game.getPermanentOrLKIBattlefield(event.getTargetId()), game);
|
||||
return isControlledBy(event.getPlayerId())
|
||||
&& filter.match(game.getPermanentOrLKIBattlefield(event.getTargetId()), getSourceId(), getControllerId(), game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue