mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
fix RememberDiscarded when Mode$ Hand
This commit is contained in:
@@ -1061,9 +1061,10 @@ public abstract class Player extends GameEntity {
|
|||||||
*
|
*
|
||||||
* @param sa a {@link forge.card.spellability.SpellAbility} object.
|
* @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);
|
CardList list = this.getCardsIn(Zone.Hand);
|
||||||
discardRandom(list.size(), sa);
|
discardRandom(list.size(), sa);
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -936,7 +936,12 @@ public class AbilityFactory_ZoneAffecting {
|
|||||||
for (Player p : tgtPlayers) {
|
for (Player p : tgtPlayers) {
|
||||||
if (tgt == null || p.canTarget(sa)) {
|
if (tgt == null || p.canTarget(sa)) {
|
||||||
if (mode.equals("Hand")) {
|
if (mode.equals("Hand")) {
|
||||||
p.discardHand(sa);
|
CardList list = p.discardHand(sa);
|
||||||
|
if (params.containsKey("RememberDiscarded")) {
|
||||||
|
for (Card c : list) {
|
||||||
|
source.addRemembered(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user