Skip to content

Commit

Permalink
[MKM] Implement Hoshot Investigators
Browse files Browse the repository at this point in the history
  • Loading branch information
theelk801 committed Dec 7, 2023
1 parent 7a1c9b2 commit 7c50ab0
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
81 changes: 81 additions & 0 deletions Mage.Sets/src/mage/cards/h/HotshotInvestigators.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package mage.cards.h;

import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.keyword.InvestigateEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;

import java.util.UUID;

/**
* @author TheElk801
*/
public final class HotshotInvestigators extends CardImpl {

public HotshotInvestigators(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}");

this.subtype.add(SubType.VEDALKEN);
this.subtype.add(SubType.DETECTIVE);
this.power = new MageInt(4);
this.toughness = new MageInt(4);

// When Hotshot Investigators enters the battlefield, return up to one other target creature to its owner's hand. If you controlled it, investigate.
Ability ability = new EntersBattlefieldTriggeredAbility(new HotshotInvestigatorsEffect());
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
this.addAbility(ability);
}

private HotshotInvestigators(final HotshotInvestigators card) {
super(card);
}

@Override
public HotshotInvestigators copy() {
return new HotshotInvestigators(this);
}
}

class HotshotInvestigatorsEffect extends OneShotEffect {

HotshotInvestigatorsEffect() {
super(Outcome.Benefit);
staticText = "return up to one other target creature to its owner's hand. If you controlled it, investigate";
}

private HotshotInvestigatorsEffect(final HotshotInvestigatorsEffect effect) {
super(effect);
}

@Override
public HotshotInvestigatorsEffect copy() {
return new HotshotInvestigatorsEffect(this);
}

@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (player == null || permanent == null) {
return false;
}
boolean flag = permanent.isControlledBy(source.getControllerId());
player.moveCards(permanent, Zone.HAND, source, game);
if (flag) {
new InvestigateEffect().apply(game, source);
}
return true;
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ private MurdersAtKarlovManor() {
cards.add(new SetCardInfo("Fanatical Strength", 159, Rarity.COMMON, mage.cards.f.FanaticalStrength.class));
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Gleaming Geardrake", 205, Rarity.UNCOMMON, mage.cards.g.GleamingGeardrake.class));
cards.add(new SetCardInfo("Hotshot Investigators", 60, Rarity.COMMON, mage.cards.h.HotshotInvestigators.class));
cards.add(new SetCardInfo("Island", 273, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Lead Pipe", 90, Rarity.UNCOMMON, mage.cards.l.LeadPipe.class));
cards.add(new SetCardInfo("Lightning Helix", 218, Rarity.UNCOMMON, mage.cards.l.LightningHelix.class));
Expand Down
1 change: 1 addition & 0 deletions Utils/mtg-cards-data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51701,6 +51701,7 @@ Wojek Investigator|Murders at Karlov Manor|36|R|{2}{W}|Creature - Angel Detectiv
Benthic Criminologists|Murders at Karlov Manor|40|C|{4}{U}|Creature - Merfolk Wizard|4|5|Whenever Benthic Criminologists enters the battlefield or attacks, you may sacrifice an artifact. If you do, draw a card.|
Burden of Proof|Murders at Karlov Manor|42|U|{1}{U}|Enchantment - Aura|||Flash$Enchant creature$Enchanted creature gets +2/+2 as long as it's a Detective you control. Otherwise, it has base power and toughness 1/1 and can't block Detectives.|
Deduce|Murders at Karlov Manor|52|C|{1}{U}|Instant|||Draw a card. Investigate.|
Hotshot Investigators|Murders at Karlov Manor|60|C|{5}{U}|Creature - Vedalken Detective|4|4|When Hotshot Investigators enters the battlefield, return up to one other target creature to its owner's hand. If you controlled it, investigate.|
Out Cold|Murders at Karlov Manor|66|C|{3}{U}|Instant|||This spell can't be countered.$Tap up to two target creatures and put a stun counter on each of them. Investigate.|
Lead Pipe|Murders at Karlov Manor|90|U|{B}|Artifact - Clue Equipment|||Equipped creature gets +2/+0.$Whenever equipped creature dies, each opponent loses 1 life.${2}, Sacrifice Lead Pipe: Draw a card.$Equip {2}|
Demand Answers|Murders at Karlov Manor|122|C|{1}{R}|Instant|||As an additional cost to cast this spell, sacrifice an artifact or discard a card.$Draw two cards.|
Expand Down

0 comments on commit 7c50ab0

Please sign in to comment.