* Fixed target handling of 4 Primordial cards.

This commit is contained in:
LevelX2 2015-02-21 17:31:54 +01:00
parent 2189236284
commit f953735263
4 changed files with 4 additions and 4 deletions

View file

@ -71,10 +71,10 @@ public class LuminatePrimordial extends CardImpl {
@Override @Override
public void adjustTargets(Ability ability, Game game) { public void adjustTargets(Ability ability, Game game) {
if (ability instanceof EntersBattlefieldTriggeredAbility) { if (ability instanceof EntersBattlefieldTriggeredAbility) {
ability.getTargets().clear();
for(UUID opponentId : game.getOpponents(ability.getControllerId())) { for(UUID opponentId : game.getOpponents(ability.getControllerId())) {
Player opponent = game.getPlayer(opponentId); Player opponent = game.getPlayer(opponentId);
if (opponent != null) { if (opponent != null) {
ability.getTargets().clear();
FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature from opponent ").append(opponent.getName()).toString()); FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature from opponent ").append(opponent.getName()).toString());
filter.add(new ControllerIdPredicate(opponentId)); filter.add(new ControllerIdPredicate(opponentId));
TargetCreaturePermanent target = new TargetCreaturePermanent(0,1, filter,false); TargetCreaturePermanent target = new TargetCreaturePermanent(0,1, filter,false);

View file

@ -76,10 +76,10 @@ public class MoltenPrimordial extends CardImpl {
@Override @Override
public void adjustTargets(Ability ability, Game game) { public void adjustTargets(Ability ability, Game game) {
if (ability instanceof EntersBattlefieldTriggeredAbility) { if (ability instanceof EntersBattlefieldTriggeredAbility) {
ability.getTargets().clear();
for(UUID opponentId : game.getOpponents(ability.getControllerId())) { for(UUID opponentId : game.getOpponents(ability.getControllerId())) {
Player opponent = game.getPlayer(opponentId); Player opponent = game.getPlayer(opponentId);
if (opponent != null) { if (opponent != null) {
ability.getTargets().clear();
FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature from opponent ").append(opponent.getName()).toString()); FilterCreaturePermanent filter = new FilterCreaturePermanent(new StringBuilder("creature from opponent ").append(opponent.getName()).toString());
filter.add(new ControllerIdPredicate(opponentId)); filter.add(new ControllerIdPredicate(opponentId));
TargetCreaturePermanent target = new TargetCreaturePermanent(0,1, filter,false); TargetCreaturePermanent target = new TargetCreaturePermanent(0,1, filter,false);

View file

@ -73,10 +73,10 @@ public class SepulchralPrimordial extends CardImpl {
@Override @Override
public void adjustTargets(Ability ability, Game game) { public void adjustTargets(Ability ability, Game game) {
if (ability instanceof EntersBattlefieldTriggeredAbility) { if (ability instanceof EntersBattlefieldTriggeredAbility) {
ability.getTargets().clear();
for(UUID opponentId : game.getOpponents(ability.getControllerId())) { for(UUID opponentId : game.getOpponents(ability.getControllerId())) {
Player opponent = game.getPlayer(opponentId); Player opponent = game.getPlayer(opponentId);
if (opponent != null) { if (opponent != null) {
ability.getTargets().clear();
FilterCard filter = new FilterCreatureCard(new StringBuilder("creature card from ").append(opponent.getName()).append("'s graveyard").toString()); FilterCard filter = new FilterCreatureCard(new StringBuilder("creature card from ").append(opponent.getName()).append("'s graveyard").toString());
filter.add(new OwnerIdPredicate(opponentId)); filter.add(new OwnerIdPredicate(opponentId));
TargetCardInOpponentsGraveyard target = new TargetCardInOpponentsGraveyard(0,1, filter); TargetCardInOpponentsGraveyard target = new TargetCardInOpponentsGraveyard(0,1, filter);

View file

@ -76,10 +76,10 @@ public class SylvanPrimordial extends CardImpl {
@Override @Override
public void adjustTargets(Ability ability, Game game) { public void adjustTargets(Ability ability, Game game) {
if (ability instanceof EntersBattlefieldTriggeredAbility) { if (ability instanceof EntersBattlefieldTriggeredAbility) {
ability.getTargets().clear();
for(UUID opponentId : game.getOpponents(ability.getControllerId())) { for(UUID opponentId : game.getOpponents(ability.getControllerId())) {
Player opponent = game.getPlayer(opponentId); Player opponent = game.getPlayer(opponentId);
if (opponent != null) { if (opponent != null) {
ability.getTargets().clear();
FilterPermanent filter = new FilterPermanent(new StringBuilder("noncreature permanent from opponent ").append(opponent.getName()).toString()); FilterPermanent filter = new FilterPermanent(new StringBuilder("noncreature permanent from opponent ").append(opponent.getName()).toString());
filter.add(new ControllerIdPredicate(opponentId)); filter.add(new ControllerIdPredicate(opponentId));
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));