added missing cost to Priest of Forgotten Gods

This commit is contained in:
Evan Kranzler 2019-01-09 22:34:43 -05:00
parent 12e4bcb0ab
commit 8b2cae6176
2 changed files with 18 additions and 5 deletions

View file

@ -4,6 +4,7 @@ import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
@ -14,6 +15,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
@ -22,6 +27,13 @@ import java.util.UUID;
*/
public final class PriestOfForgottenGods extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledCreaturePermanent("other creatures");
static {
filter.add(new AnotherPredicate());
}
public PriestOfForgottenGods(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
@ -42,6 +54,7 @@ public final class PriestOfForgottenGods extends CardImpl {
);
ability.addEffect(new BasicManaEffect(Mana.BlackMana(2)).setText("You add {B}{B}"));
ability.addEffect(new DrawCardSourceControllerEffect(1).setText("and draw a card"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(0, 2, filter, true)));
this.addAbility(ability);
}

View file

@ -1,9 +1,6 @@
package mage.abilities.costs.common;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.ActivatedAbilityImpl;
import mage.abilities.costs.Cost;
@ -14,13 +11,16 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledPermanent;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class SacrificeTargetCost extends CostImpl {
List<Permanent> permanents = new ArrayList<>();
private final List<Permanent> permanents = new ArrayList<>();
public SacrificeTargetCost(TargetControlledPermanent target) {
this.addTarget(target);