Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MKM] Implement Call a Surprise Witness #11979

Merged
merged 1 commit into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions Mage.Sets/src/mage/cards/c/CallASurpriseWitness.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package mage.cards.c;

import java.util.UUID;

import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.abilities.effects.common.continuous.AddCreatureTypeAdditionEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.target.common.TargetCardInYourGraveyard;

/**
* @author Cguy7777
*/
public final class CallASurpriseWitness extends CardImpl {

private static final FilterCreatureCard filter
= new FilterCreatureCard("creature card with mana value 3 or less from your graveyard");

static {
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 4));
}

public CallASurpriseWitness(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}");

// Return target creature card with mana value 3 or less from your graveyard to the battlefield.
// Put a flying counter on it. It's a Spirit in addition to its other types.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.FLYING.createInstance())
.setText("put a flying counter on it"));
this.getSpellAbility().addEffect(new AddCreatureTypeAdditionEffect(SubType.SPIRIT, false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to PR: AddCreatureTypeAdditionEffect must be renamed to AddCreatureTypeAdditionTargetEffect cause it uses target.

.setText("it's a Spirit in addition to its other types"));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
}

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

@Override
public CallASurpriseWitness copy() {
return new CallASurpriseWitness(this);
}
}
2 changes: 2 additions & 0 deletions Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ private MurdersAtKarlovManor() {
cards.add(new SetCardInfo("Branch of Vitu-Ghazi", 258, Rarity.UNCOMMON, mage.cards.b.BranchOfVituGhazi.class));
cards.add(new SetCardInfo("Burden of Proof", 42, Rarity.UNCOMMON, mage.cards.b.BurdenOfProof.class));
cards.add(new SetCardInfo("Buried in the Garden", 191, Rarity.UNCOMMON, mage.cards.b.BuriedInTheGarden.class));
cards.add(new SetCardInfo("Call a Surprise Witness", 6, Rarity.UNCOMMON, mage.cards.c.CallASurpriseWitness.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Call a Surprise Witness", 289, Rarity.UNCOMMON, mage.cards.c.CallASurpriseWitness.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Candlestick", 43, Rarity.UNCOMMON, mage.cards.c.Candlestick.class));
cards.add(new SetCardInfo("Case of the Burning Masks", 113, Rarity.UNCOMMON, mage.cards.c.CaseOfTheBurningMasks.class));
cards.add(new SetCardInfo("Case of the Crimson Pulse", 114, Rarity.RARE, mage.cards.c.CaseOfTheCrimsonPulse.class));
Expand Down
Loading