[LCI] Implement Bloodletter of Aclazotz

This commit is contained in:
Susucre 2023-10-28 16:41:24 +02:00
parent 4543babd72
commit a588bea1ad
2 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1,88 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author Susucr
*/
public final class BloodletterOfAclazotz extends CardImpl {
public BloodletterOfAclazotz(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}{B}");
this.subtype.add(SubType.VAMPIRE);
this.subtype.add(SubType.DEMON);
this.power = new MageInt(2);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// If an opponent would lose life during your turn, they lose twice that much life instead.
this.addAbility(new SimpleStaticAbility(new BloodletterOfAclazotzEffect()));
}
private BloodletterOfAclazotz(final BloodletterOfAclazotz card) {
super(card);
}
@Override
public BloodletterOfAclazotz copy() {
return new BloodletterOfAclazotz(this);
}
}
class BloodletterOfAclazotzEffect extends ReplacementEffectImpl {
public BloodletterOfAclazotzEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "If an opponent would lose life during your turn, they lose twice that much life instead";
}
private BloodletterOfAclazotzEffect(final BloodletterOfAclazotzEffect effect) {
super(effect);
}
@Override
public BloodletterOfAclazotzEffect copy() {
return new BloodletterOfAclazotzEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
return true;
}
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
event.setAmount(CardUtil.overflowMultiply(event.getAmount(), 2));
return false;
}
@Override
public boolean checksEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.LOSE_LIFE;
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return game.isActivePlayer(source.getControllerId())
&& game.getOpponents(source.getControllerId()).contains(event.getPlayerId());
}
}

View file

@ -25,6 +25,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet {
cards.add(new SetCardInfo("Amalia Benavides Aguirre", 221, Rarity.RARE, mage.cards.a.AmaliaBenavidesAguirre.class));
cards.add(new SetCardInfo("Bartolome del Presidio", 224, Rarity.UNCOMMON, mage.cards.b.BartolomeDelPresidio.class));
cards.add(new SetCardInfo("Bladewheel Chariot", 36, Rarity.UNCOMMON, mage.cards.b.BladewheelChariot.class));
cards.add(new SetCardInfo("Bloodletter of Aclazotz", 92, Rarity.MYTHIC, mage.cards.b.BloodletterOfAclazotz.class));
cards.add(new SetCardInfo("Breeches, Eager Pillager", 137, Rarity.RARE, mage.cards.b.BreechesEagerPillager.class));
cards.add(new SetCardInfo("Broodrage Mycoid", 95, Rarity.COMMON, mage.cards.b.BroodrageMycoid.class));
cards.add(new SetCardInfo("Captain Storm, Cosmium Raider", 227, Rarity.UNCOMMON, mage.cards.c.CaptainStormCosmiumRaider.class));