mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
modified inputUntapUpToNType so same card cannot be chosen more than once
This commit is contained in:
@@ -2910,6 +2910,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
private final int stop = n;
|
private final int stop = n;
|
||||||
private int count = 0;
|
private int count = 0;
|
||||||
|
private List<Card> choices = new ArrayList<Card>();;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showMessage() {
|
public void showMessage() {
|
||||||
@@ -2927,8 +2928,9 @@ public class CardFactoryUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void selectCard(final Card card) {
|
public void selectCard(final Card card) {
|
||||||
Zone zone = Singletons.getModel().getGame().getZoneOf(card);
|
Zone zone = Singletons.getModel().getGame().getZoneOf(card);
|
||||||
if (card.isType(type) && zone.is(ZoneType.Battlefield)) {
|
if (card.isType(type) && zone.is(ZoneType.Battlefield) && !choices.contains(card)) {
|
||||||
card.untap();
|
card.untap();
|
||||||
|
choices.add(card);
|
||||||
this.count++;
|
this.count++;
|
||||||
if (this.count == this.stop) {
|
if (this.count == this.stop) {
|
||||||
this.stop();
|
this.stop();
|
||||||
|
|||||||
Reference in New Issue
Block a user