This commit is contained in:
Jeff 2019-01-11 08:21:25 -06:00
parent ac9a3f4a3d
commit a6721613fa

View file

@ -1,4 +1,3 @@
package mage.cards.t;
import java.util.UUID;
@ -20,19 +19,19 @@ import mage.target.TargetPermanent;
* @author LevelX2
*/
public final class TormentOfHailfire extends CardImpl {
public TormentOfHailfire(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{B}");
// Repeat the following process X times. Each opponent loses 3 life unless he or she sacrifices a nonland permanent or discards a card.
this.getSpellAbility().addEffect(new TormentOfHailfireEffect());
}
public TormentOfHailfire(final TormentOfHailfire card) {
super(card);
}
@Override
public TormentOfHailfire copy() {
return new TormentOfHailfire(this);
@ -40,21 +39,21 @@ public final class TormentOfHailfire extends CardImpl {
}
class TormentOfHailfireEffect extends OneShotEffect {
public TormentOfHailfireEffect() {
super(Outcome.LoseLife);
this.staticText = "Repeat the following process X times. Each opponent loses 3 life unless he or she sacrifices a nonland permanent or discards a card";
}
public TormentOfHailfireEffect(final TormentOfHailfireEffect effect) {
super(effect);
}
@Override
public TormentOfHailfireEffect copy() {
return new TormentOfHailfireEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
@ -68,6 +67,7 @@ class TormentOfHailfireEffect extends OneShotEffect {
if (permanents > 0 && opponent.chooseUse(outcome, "Sacrifices a nonland permanent? (Iteration " + i + " of " + repeat + ")",
"Otherwise you have to discard a card or lose 3 life.", "Sacrifice", "Discard or life loss", source, game)) {
Target target = new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_NON_LAND);
target.setNotTarget(true);
if (opponent.choose(outcome, target, source.getSourceId(), game)) {
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null) {
@ -85,7 +85,7 @@ class TormentOfHailfireEffect extends OneShotEffect {
opponent.loseLife(3, game, false);
}
}
}
return true;
}