mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
@@ -116,6 +116,14 @@ public class GameView extends TrackableObject {
|
||||
public boolean isMatchOver() {
|
||||
return get(TrackableProperty.MatchOver);
|
||||
}
|
||||
public boolean isMulligan() {
|
||||
if (get(TrackableProperty.Mulligan) == null)
|
||||
return false;
|
||||
return get(TrackableProperty.Mulligan);
|
||||
}
|
||||
public void updateIsMulligan(boolean value) {
|
||||
set(TrackableProperty.Mulligan, value);
|
||||
}
|
||||
public String getWinningPlayerName() {
|
||||
return get(TrackableProperty.WinningPlayerName);
|
||||
}
|
||||
|
||||
@@ -206,6 +206,7 @@ public enum TrackableProperty {
|
||||
WinningPlayerName(TrackableTypes.StringType),
|
||||
WinningTeam(TrackableTypes.IntegerType),
|
||||
MatchOver(TrackableTypes.BooleanType),
|
||||
Mulligan(TrackableTypes.BooleanType),
|
||||
NumGamesInMatch(TrackableTypes.IntegerType),
|
||||
NumPlayedGamesInMatch(TrackableTypes.IntegerType),
|
||||
Stack(TrackableTypes.StackItemViewListType),
|
||||
|
||||
@@ -358,10 +358,10 @@ public class MatchScreen extends FScreen {
|
||||
if(gameMenu!=null) {
|
||||
if(gameMenu.getChildCount()>3){
|
||||
if(viewWinLose == null) {
|
||||
gameMenu.getChildAt(0).setEnabled(true);
|
||||
gameMenu.getChildAt(1).setEnabled(true);
|
||||
gameMenu.getChildAt(2).setEnabled(true);
|
||||
gameMenu.getChildAt(3).setEnabled(true);
|
||||
gameMenu.getChildAt(0).setEnabled(!game.isMulligan());
|
||||
gameMenu.getChildAt(1).setEnabled(!game.isMulligan());
|
||||
gameMenu.getChildAt(2).setEnabled(!game.isMulligan());
|
||||
gameMenu.getChildAt(3).setEnabled(!game.isMulligan());
|
||||
gameMenu.getChildAt(4).setEnabled(false);
|
||||
} else {
|
||||
gameMenu.getChildAt(0).setEnabled(false);
|
||||
|
||||
@@ -54,6 +54,7 @@ public class InputLondonMulligan extends InputSyncronizedBase {
|
||||
public final void showMessage() {
|
||||
final Localizer localizer = Localizer.getInstance();
|
||||
final Game game = player.getGame();
|
||||
game.getView().updateIsMulligan(true);
|
||||
int cardsLeft = toReturn - selected.size();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -79,6 +80,7 @@ public class InputLondonMulligan extends InputSyncronizedBase {
|
||||
|
||||
private void done() {
|
||||
resetCardHighlights();
|
||||
getController().getGame().getView().updateIsMulligan(false);
|
||||
stop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user