fixing up some calls to discard functions.

This commit is contained in:
jendave
2011-08-06 10:03:59 +00:00
parent 06bccb4f7b
commit 792b2c99b4
3 changed files with 17 additions and 17 deletions

View File

@@ -8438,8 +8438,9 @@ public class CardFactory implements NewConstants {
sb.append("Necrogen Spellbomb - ").append(s).append(" discards a card"); sb.append("Necrogen Spellbomb - ").append(s).append(" discards a card");
setStackDescription(sb.toString()); setStackDescription(sb.toString());
if(AllZone.ComputerPlayer.equals(getTargetPlayer())) AllZone.GameAction.discardRandom(getTargetPlayer(), this); getTargetPlayer().discard(this);
else AllZone.InputControl.setInput(CardFactoryUtil.input_discard(this)); //if(AllZone.ComputerPlayer.equals(getTargetPlayer())) AllZone.GameAction.discardRandom(getTargetPlayer(), this);
//else AllZone.InputControl.setInput(CardFactoryUtil.input_discard(this));
}//resolve() }//resolve()
};//SpellAbility };//SpellAbility
ability.setDescription("B, Sacrifice Necrogen Spellbomb: Target player discards a card."); ability.setDescription("B, Sacrifice Necrogen Spellbomb: Target player discards a card.");
@@ -11624,7 +11625,7 @@ public class CardFactory implements NewConstants {
private static final long serialVersionUID = 7825072388166910728L; private static final long serialVersionUID = 7825072388166910728L;
@Override @Override
public void resolve() { public void resolve() {
AllZone.GameAction.discardRandom(card.getController(), this); card.getController().discardRandom(this);
card.getController().drawCards(2); card.getController().drawCards(2);
} }
}; };

View File

@@ -2657,8 +2657,10 @@ class CardFactory_Lands {
@Override @Override
public void resolve() { public void resolve() {
AllZone.InputControl.setInput(CardFactoryUtil.input_discard(this)); AllZone.ComputerPlayer.discard(this);
AllZone.GameAction.discardRandom(AllZone.ComputerPlayer, this); // wise discard should be here AllZone.HumanPlayer.discard(this);
//AllZone.InputControl.setInput(CardFactoryUtil.input_discard(this));
//AllZone.GameAction.discardRandom(AllZone.ComputerPlayer, this); // wise discard should be here
} }
}; };
ability.setDescription("tap 1 B R: Each player discards a card. Activate this ability only any time you could cast a sorcery."); ability.setDescription("tap 1 B R: Each player discards a card. Activate this ability only any time you could cast a sorcery.");

View File

@@ -2230,19 +2230,16 @@ public class CombatUtil {
player.drawCard(); player.drawCard();
} else if(a.getName().equals("Corrupt Official") && !a.getCreatureGotBlockedThisCombat()) { } else if(a.getName().equals("Corrupt Official") && !a.getCreatureGotBlockedThisCombat()) {
Player opp = b.getController(); Player opp = b.getController();
AllZone.GameAction.discardRandom(opp, a.getSpellAbility()[0]); opp.discardRandom(a.getSpellAbility()[0]);
} else if (a.getName().equals("Robber Fly") && !a.getCreatureGotBlockedThisCombat()) { } else if (a.getName().equals("Robber Fly") && !a.getCreatureGotBlockedThisCombat()) {
Player opp = b.getController(); Player opp = b.getController();
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, opp); PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, opp);
CardList list = new CardList(hand.getCards()); CardList list = new CardList(hand.getCards());
int handSize = list.size(); int handSize = list.size();
for (int ctr = 0; ctr < handSize; ctr ++) { // opponent discards their hand, // opponent discards their hand,
AllZone.GameAction.discardRandom(opp, a.getSpellAbility()[0]); opp.discardRandom(handSize, a.getSpellAbility()[0]);
} opp.drawCards(handSize);
for (int ctr = 0; ctr < handSize; ctr ++) { // then draws that many cards
opp.drawCard();;
}
} else if(a.getName().equals("Sylvan Basilisk")) { } else if(a.getName().equals("Sylvan Basilisk")) {
AllZone.GameAction.destroy(b); AllZone.GameAction.destroy(b);
System.out.println("destroyed blocker " + b.getName()); System.out.println("destroyed blocker " + b.getName());