mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
[FIC] Implement Shadow, Mysterious Assassin
This commit is contained in:
parent
34129fed3f
commit
32b354b9b1
2 changed files with 104 additions and 0 deletions
102
Mage.Sets/src/mage/cards/s/ShadowMysteriousAssassin.java
Normal file
102
Mage.Sets/src/mage/cards/s/ShadowMysteriousAssassin.java
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetSacrifice;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ShadowMysteriousAssassin extends CardImpl {
|
||||
|
||||
public ShadowMysteriousAssassin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ASSASSIN);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Deathtouch
|
||||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
|
||||
// Throw -- Whenever Shadow deals combat damage to a player, you may sacrifice another nonland permanent. If you do, draw two cards and each opponent loses life equal to the mana value of the sacrificed permanent.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ShadowMysteriousAssassinEffect()).withFlavorWord("Throw"));
|
||||
}
|
||||
|
||||
private ShadowMysteriousAssassin(final ShadowMysteriousAssassin card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShadowMysteriousAssassin copy() {
|
||||
return new ShadowMysteriousAssassin(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ShadowMysteriousAssassinEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterNonlandPermanent("another nonland permanent");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
ShadowMysteriousAssassinEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "you may sacrifice another nonland permanent. If you do, " +
|
||||
"draw two cards and each opponent loses life equal to the mana value of the sacrificed permanent";
|
||||
}
|
||||
|
||||
private ShadowMysteriousAssassinEffect(final ShadowMysteriousAssassinEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShadowMysteriousAssassinEffect copy() {
|
||||
return new ShadowMysteriousAssassinEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
TargetSacrifice target = new TargetSacrifice(0, 1, filter);
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent == null || !permanent.sacrifice(source, game)) {
|
||||
return false;
|
||||
}
|
||||
int mv = permanent.getManaValue();
|
||||
player.drawCards(2, source, game);
|
||||
if (mv < 1) {
|
||||
return true;
|
||||
}
|
||||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||
Optional.ofNullable(opponentId)
|
||||
.map(game::getPlayer)
|
||||
.ifPresent(opponent -> opponent.loseLife(mv, game, source, false));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -272,6 +272,8 @@ public final class FinalFantasyCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sepulchral Primordial", 284, Rarity.RARE, mage.cards.s.SepulchralPrimordial.class));
|
||||
cards.add(new SetCardInfo("Setzer, Wandering Gambler", 183, Rarity.RARE, mage.cards.s.SetzerWanderingGambler.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Setzer, Wandering Gambler", 93, Rarity.RARE, mage.cards.s.SetzerWanderingGambler.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Shadow, Mysterious Assassin", 148, Rarity.RARE, mage.cards.s.ShadowMysteriousAssassin.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Shadow, Mysterious Assassin", 50, Rarity.RARE, mage.cards.s.ShadowMysteriousAssassin.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Shadowblood Ridge", 421, Rarity.RARE, mage.cards.s.ShadowbloodRidge.class));
|
||||
cards.add(new SetCardInfo("Shelinda, Yevon Acolyte", 184, Rarity.RARE, mage.cards.s.ShelindaYevonAcolyte.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Shelinda, Yevon Acolyte", 94, Rarity.RARE, mage.cards.s.ShelindaYevonAcolyte.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue