mirror of
https://github.com/correl/mage.git
synced 2024-12-28 03:00:10 +00:00
[SNC] Implemented Angel of Suffering
This commit is contained in:
parent
d8f1b4a4ca
commit
4da1fbf765
2 changed files with 87 additions and 0 deletions
86
Mage.Sets/src/mage/cards/a/AngelOfSuffering.java
Normal file
86
Mage.Sets/src/mage/cards/a/AngelOfSuffering.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class AngelOfSuffering extends CardImpl {
|
||||
|
||||
public AngelOfSuffering(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
|
||||
this.subtype.add(SubType.NIGHTMARE);
|
||||
this.subtype.add(SubType.ANGEL);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// If damage would be dealt to you, prevent that damage and mill twice that many cards.
|
||||
this.addAbility(new SimpleStaticAbility(new AngelOfSufferingEffect()));
|
||||
}
|
||||
|
||||
private AngelOfSuffering(final AngelOfSuffering card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelOfSuffering copy() {
|
||||
return new AngelOfSuffering(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AngelOfSufferingEffect extends ReplacementEffectImpl {
|
||||
|
||||
public AngelOfSufferingEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.PreventDamage);
|
||||
this.staticText = "If damage would be dealt to you, prevent that damage and mill twice that many cards";
|
||||
}
|
||||
|
||||
private AngelOfSufferingEffect(final AngelOfSufferingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelOfSufferingEffect copy() {
|
||||
return new AngelOfSufferingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
int cardsToMill = event.getAmount() * 2;
|
||||
game.preventDamage(event, source, game, Integer.MAX_VALUE);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
controller.millCards(cardsToMill, source, game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGE_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getTargetId().equals(source.getControllerId());
|
||||
}
|
||||
}
|
|
@ -29,6 +29,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("A Little Chat", 47, Rarity.UNCOMMON, mage.cards.a.ALittleChat.class));
|
||||
cards.add(new SetCardInfo("All-Seeing Arbiter", 34, Rarity.MYTHIC, mage.cards.a.AllSeeingArbiter.class));
|
||||
cards.add(new SetCardInfo("An Offer You Can't Refuse", 51, Rarity.UNCOMMON, mage.cards.a.AnOfferYouCantRefuse.class));
|
||||
cards.add(new SetCardInfo("Angel of Suffering", 67, Rarity.MYTHIC, mage.cards.a.AngelOfSuffering.class));
|
||||
cards.add(new SetCardInfo("Angelic Observer", 1, Rarity.UNCOMMON, mage.cards.a.AngelicObserver.class));
|
||||
cards.add(new SetCardInfo("Arc Spitter", 233, Rarity.UNCOMMON, mage.cards.a.ArcSpitter.class));
|
||||
cards.add(new SetCardInfo("Attended Socialite", 133, Rarity.COMMON, mage.cards.a.AttendedSocialite.class));
|
||||
|
|
Loading…
Reference in a new issue