mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Fixed Hour of Eternity's targeting and another small fix that was causing an error
This commit is contained in:
parent
b4302fb01c
commit
de8ae96aaa
2 changed files with 15 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -44,6 +45,7 @@ import mage.filter.common.FilterCreatureCard;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.token.EmptyToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
|
|
@ -61,6 +63,16 @@ public class HourOfEternity extends CardImpl {
|
|||
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0, Integer.MAX_VALUE, new FilterCreatureCard("creature cards from your graveyard")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
if (ability instanceof SpellAbility) {
|
||||
ability.getTargets().clear();
|
||||
int xValue = ability.getManaCostsToPay().getX();
|
||||
Target target = new TargetCardInYourGraveyard(xValue, new FilterCreatureCard(new StringBuilder(xValue).append(xValue != 1 ? " creature cards" : "creature card").append(" from your graveyard").toString()));
|
||||
ability.addTarget(target);
|
||||
}
|
||||
}
|
||||
|
||||
public HourOfEternity(final HourOfEternity card) {
|
||||
super(card);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ import mage.util.SubTypeList;
|
|||
public class Emblem implements CommandObject {
|
||||
|
||||
private static EnumSet<CardType> emptySet = EnumSet.noneOf(CardType.class);
|
||||
private static List emptyList = new ArrayList();
|
||||
private static ObjectColor emptyColor = new ObjectColor();
|
||||
private static ManaCosts emptyCost = new ManaCostsImpl();
|
||||
|
||||
|
|
@ -297,4 +296,7 @@ public class Emblem implements CommandObject {
|
|||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePTCDA() {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue