[UNF] Implemented Dissatisfied Customer

This commit is contained in:
Evan Kranzler 2022-09-28 08:40:11 -04:00
parent 29ecfb9f08
commit 3101b247c3
2 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,80 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DissatisfiedCustomer extends CardImpl {
public DissatisfiedCustomer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.VAMPIRE);
this.subtype.add(SubType.GUEST);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Haste
this.addAbility(HasteAbility.getInstance());
// When Dissatisfied Customer enters the battlefield, roll a six-sided die. If the result is 3 or less, you lose that much life.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DissatisfiedCustomerEffect()));
}
private DissatisfiedCustomer(final DissatisfiedCustomer card) {
super(card);
}
@Override
public DissatisfiedCustomer copy() {
return new DissatisfiedCustomer(this);
}
}
class DissatisfiedCustomerEffect extends OneShotEffect {
DissatisfiedCustomerEffect() {
super(Outcome.Benefit);
staticText = "roll a six-sided die. If the result is 3 or less, you lose that much life";
}
private DissatisfiedCustomerEffect(final DissatisfiedCustomerEffect effect) {
super(effect);
}
@Override
public DissatisfiedCustomerEffect copy() {
return new DissatisfiedCustomerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
int result = player.rollDice(outcome, source, game, 6);
if (result <= 3) {
player.loseLife(result, game, source, false);
}
return true;
}
}

View file

@ -26,6 +26,7 @@ public final class Unfinity extends ExpansionSet {
cards.add(new SetCardInfo("Breeding Pool", 286, Rarity.RARE, mage.cards.b.BreedingPool.class)); cards.add(new SetCardInfo("Breeding Pool", 286, Rarity.RARE, mage.cards.b.BreedingPool.class));
cards.add(new SetCardInfo("Circuits Act", 103, Rarity.COMMON, mage.cards.c.CircuitsAct.class)); cards.add(new SetCardInfo("Circuits Act", 103, Rarity.COMMON, mage.cards.c.CircuitsAct.class));
cards.add(new SetCardInfo("Clown Car", 186, Rarity.RARE, mage.cards.c.ClownCar.class)); cards.add(new SetCardInfo("Clown Car", 186, Rarity.RARE, mage.cards.c.ClownCar.class));
cards.add(new SetCardInfo("Dissatisfied Customer", 72, Rarity.COMMON, mage.cards.d.DissatisfiedCustomer.class));
cards.add(new SetCardInfo("Forest", 239, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Forest", 239, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Godless Shrine", 282, Rarity.RARE, mage.cards.g.GodlessShrine.class)); cards.add(new SetCardInfo("Godless Shrine", 282, Rarity.RARE, mage.cards.g.GodlessShrine.class));
cards.add(new SetCardInfo("Hallowed Fountain", 277, Rarity.RARE, mage.cards.h.HallowedFountain.class)); cards.add(new SetCardInfo("Hallowed Fountain", 277, Rarity.RARE, mage.cards.h.HallowedFountain.class));