mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Merge branch 'master' into 'master'
[Mobile] fix optional discard GUI See merge request core-developers/forge!3682
This commit is contained in:
@@ -990,7 +990,19 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
|
||||
@Override
|
||||
public CardCollectionView chooseCardsToDiscardFrom(final Player p, final SpellAbility sa,
|
||||
final CardCollection valid, final int min, final int max) {
|
||||
if (p != player || GuiBase.getInterface().isLibgdxPort()) {
|
||||
if (GuiBase.getInterface().isLibgdxPort()) {
|
||||
boolean optional = min == 0;
|
||||
tempShowCards(valid);
|
||||
GameEntityViewMap<Card, CardView> gameCacheDiscard = GameEntityView.getMap(valid);
|
||||
List<CardView> views = getGui().many(String.format(localizer.getMessage("lblChooseMinCardToDiscard"), optional ? max : min),
|
||||
localizer.getMessage("lblDiscarded"), min, max, gameCacheDiscard.getTrackableKeys(), null);
|
||||
endTempShowCards();
|
||||
final CardCollection choices = new CardCollection();
|
||||
gameCacheDiscard.addToList(views, choices);
|
||||
return choices;
|
||||
}
|
||||
|
||||
if (p != player) {
|
||||
tempShowCards(valid);
|
||||
GameEntityViewMap<Card, CardView> gameCacheDiscard = GameEntityView.getMap(valid);
|
||||
List<CardView> views = getGui().many(String.format(localizer.getMessage("lblChooseMinCardToDiscard"), min),
|
||||
|
||||
Reference in New Issue
Block a user