fix RememberDiscarded when Mode$ Hand

This commit is contained in:
slapshot5
2011-10-11 04:37:49 +00:00
parent b3497727d9
commit 472829f47a
2 changed files with 8 additions and 2 deletions

View File

@@ -1061,9 +1061,10 @@ public abstract class Player extends GameEntity {
*
* @param sa a {@link forge.card.spellability.SpellAbility} object.
*/
public void discardHand(SpellAbility sa) {
public CardList discardHand(SpellAbility sa) {
CardList list = this.getCardsIn(Zone.Hand);
discardRandom(list.size(), sa);
return list;
}
/**

View File

@@ -936,7 +936,12 @@ public class AbilityFactory_ZoneAffecting {
for (Player p : tgtPlayers) {
if (tgt == null || p.canTarget(sa)) {
if (mode.equals("Hand")) {
p.discardHand(sa);
CardList list = p.discardHand(sa);
if (params.containsKey("RememberDiscarded")) {
for (Card c : list) {
source.addRemembered(c);
}
}
continue;
}