mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
[MKM] Implement Person of Interest
This commit is contained in:
parent
291f88b1f6
commit
1f3d184ead
3 changed files with 80 additions and 0 deletions
43
Mage.Sets/src/mage/cards/p/PersonOfInterest.java
Normal file
43
Mage.Sets/src/mage/cards/p/PersonOfInterest.java
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.SuspectSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.permanent.token.DetectiveToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class PersonOfInterest extends CardImpl {
|
||||
|
||||
public PersonOfInterest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ROGUE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Person of Interest enters the battlefield, suspect it. Create a 2/2 white and blue Detective creature token.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new SuspectSourceEffect());
|
||||
ability.addEffect(new CreateTokenEffect(new DetectiveToken()));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private PersonOfInterest(final PersonOfInterest card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersonOfInterest copy() {
|
||||
return new PersonOfInterest(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -120,6 +120,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Offender at Large", 138, Rarity.COMMON, mage.cards.o.OffenderAtLarge.class));
|
||||
cards.add(new SetCardInfo("On the Job", 30, Rarity.COMMON, mage.cards.o.OnTheJob.class));
|
||||
cards.add(new SetCardInfo("Out Cold", 66, Rarity.COMMON, mage.cards.o.OutCold.class));
|
||||
cards.add(new SetCardInfo("Person of Interest", 139, Rarity.COMMON, mage.cards.p.PersonOfInterest.class));
|
||||
cards.add(new SetCardInfo("Persuasive Interrogators", 98, Rarity.UNCOMMON, mage.cards.p.PersuasiveInterrogators.class));
|
||||
cards.add(new SetCardInfo("Pick Your Poison", 170, Rarity.COMMON, mage.cards.p.PickYourPoison.class));
|
||||
cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class SuspectSourceEffect extends OneShotEffect {
|
||||
|
||||
public SuspectSourceEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "suspect it";
|
||||
}
|
||||
|
||||
private SuspectSourceEffect(final SuspectSourceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuspectSourceEffect copy() {
|
||||
return new SuspectSourceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Optional.ofNullable(source.getSourcePermanentIfItStillExists(game))
|
||||
.ifPresent(permanent -> permanent.setSuspected(true, game, source));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue