mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
fixing up some calls to discard functions.
This commit is contained in:
@@ -8438,8 +8438,9 @@ public class CardFactory implements NewConstants {
|
||||
sb.append("Necrogen Spellbomb - ").append(s).append(" discards a card");
|
||||
setStackDescription(sb.toString());
|
||||
|
||||
if(AllZone.ComputerPlayer.equals(getTargetPlayer())) AllZone.GameAction.discardRandom(getTargetPlayer(), this);
|
||||
else AllZone.InputControl.setInput(CardFactoryUtil.input_discard(this));
|
||||
getTargetPlayer().discard(this);
|
||||
//if(AllZone.ComputerPlayer.equals(getTargetPlayer())) AllZone.GameAction.discardRandom(getTargetPlayer(), this);
|
||||
//else AllZone.InputControl.setInput(CardFactoryUtil.input_discard(this));
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
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;
|
||||
@Override
|
||||
public void resolve() {
|
||||
AllZone.GameAction.discardRandom(card.getController(), this);
|
||||
card.getController().discardRandom(this);
|
||||
card.getController().drawCards(2);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2657,8 +2657,10 @@ class CardFactory_Lands {
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
AllZone.InputControl.setInput(CardFactoryUtil.input_discard(this));
|
||||
AllZone.GameAction.discardRandom(AllZone.ComputerPlayer, this); // wise discard should be here
|
||||
AllZone.ComputerPlayer.discard(this);
|
||||
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.");
|
||||
|
||||
@@ -2230,19 +2230,16 @@ public class CombatUtil {
|
||||
player.drawCard();
|
||||
} else if(a.getName().equals("Corrupt Official") && !a.getCreatureGotBlockedThisCombat()) {
|
||||
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()) {
|
||||
Player opp = b.getController();
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, opp);
|
||||
CardList list = new CardList(hand.getCards());
|
||||
int handSize = list.size();
|
||||
|
||||
for (int ctr = 0; ctr < handSize; ctr ++) { // opponent discards their hand,
|
||||
AllZone.GameAction.discardRandom(opp, a.getSpellAbility()[0]);
|
||||
}
|
||||
for (int ctr = 0; ctr < handSize; ctr ++) { // then draws that many cards
|
||||
opp.drawCard();;
|
||||
}
|
||||
// opponent discards their hand,
|
||||
opp.discardRandom(handSize, a.getSpellAbility()[0]);
|
||||
opp.drawCards(handSize);
|
||||
} else if(a.getName().equals("Sylvan Basilisk")) {
|
||||
AllZone.GameAction.destroy(b);
|
||||
System.out.println("destroyed blocker " + b.getName());
|
||||
|
||||
Reference in New Issue
Block a user