forked from External/mage
[MID] Implemented Search Party Captain
This commit is contained in:
parent
6afe6c968a
commit
887cbe8ca1
2 changed files with 81 additions and 0 deletions
80
Mage.Sets/src/mage/cards/s/SearchPartyCaptain.java
Normal file
80
Mage.Sets/src/mage/cards/s/SearchPartyCaptain.java
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.PlayerAttackedWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SearchPartyCaptain extends CardImpl {
|
||||
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Creatures you attacked with this turn", SearchPartyCaptainValue.instance
|
||||
);
|
||||
|
||||
public SearchPartyCaptain(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// This spell costs {1} less to cast for each creature you attacked with this turn.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SpellCostReductionSourceEffect(SearchPartyCaptainValue.instance)
|
||||
.setText("this spell costs {1} less to cast for each creature you attacked with this turn")
|
||||
).addHint(hint), new PlayerAttackedWatcher());
|
||||
|
||||
// When Search Party Captain enters the battlefield, draw a card.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
||||
}
|
||||
|
||||
private SearchPartyCaptain(final SearchPartyCaptain card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchPartyCaptain copy() {
|
||||
return new SearchPartyCaptain(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum SearchPartyCaptainValue implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return game
|
||||
.getState()
|
||||
.getWatcher(PlayerAttackedWatcher.class)
|
||||
.getNumberOfAttackersCurrentTurn(sourceAbility.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchPartyCaptainValue copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -244,6 +244,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sacred Fire", 239, Rarity.UNCOMMON, mage.cards.s.SacredFire.class));
|
||||
cards.add(new SetCardInfo("Saryth, the Viper's Fang", 197, Rarity.RARE, mage.cards.s.SarythTheVipersFang.class));
|
||||
cards.add(new SetCardInfo("Seafaring Werewolf", 80, Rarity.RARE, mage.cards.s.SeafaringWerewolf.class));
|
||||
cards.add(new SetCardInfo("Search Party Captain", 32, Rarity.COMMON, mage.cards.s.SearchPartyCaptain.class));
|
||||
cards.add(new SetCardInfo("Seasoned Cathar", 2, Rarity.UNCOMMON, mage.cards.s.SeasonedCathar.class));
|
||||
cards.add(new SetCardInfo("Secrets of the Key", 73, Rarity.COMMON, mage.cards.s.SecretsOfTheKey.class));
|
||||
cards.add(new SetCardInfo("Seize the Storm", 158, Rarity.UNCOMMON, mage.cards.s.SeizeTheStorm.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue