Category talk

Difference between revisions of "Mulligan"

From Shadow Era Wiki

m
m
 
(10 intermediate revisions by one user not shown)
Line 1: Line 1:
*Explanation of `case GameStateType.mulliganDraw:`<br>
+
__TOC__
In card games, a "mulligan" is a mechanism that allows players to redraw their initial cards before the game begins. This gives them the chance to improve their hand by exchanging unwanted cards or all cards in hand.<br>
+
`GameStateType` is an enumeration (enum) that defines different states of the game. Each state represents a specific moment or phase in the course of the game.<br>
+
`mulliganDraw` is one of these states, indicating that the player is in the mulligan phase, where they the game choose for the player to redraw ''certain cards''.<br><br>
+
The logic within this case is responsible for managing the actions that need to occur when the game is in the mulligan state.<br>
+
This may include operations such as:<br>
+
'''Shuffling the deck''': Before allowing the game to redraw, the game ensures that the deck is shuffled correctly to guarantee the [[:Category_talk:Randomization|randomness]] of the new cards.<br>
+
'''Modifying the state of cards''': Ensuring that the cards being redrawn are handled correctly within the system.<br>
+
This does not include:<br>
+
'''Updating the user interface''': Indicating to the player if they can declare "Mulligan" after the shuffle and allowing the selection of all or some cards to redraw.<br>
+
 
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>
 
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>
== Code Summary and Detailed Code ==
+
== Mulligan ==
 +
 
 +
==== What is a Mulligan? ====
 +
A mulligan allows players to return their initial hand of cards and draw a new set. This mechanism is essential for maintaining balance and fairness, ensuring that players have a chance to start with usable cards.<br>
 +
 
 +
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>
 +
==== Code Summary and Detailed Code ====
 
{| class="wikitable" code-table"
 
{| class="wikitable" code-table"
 
|-
 
|-
Line 27: Line 24:
 
| style="vertical-align: top;" |
 
| style="vertical-align: top;" |
 
* Mulligan
 
* Mulligan
 +
* Hand
 +
* Draw
 +
* Discard
 +
* Shuffle
 
|-
 
|-
 
! colspan="2" | <center>SUMMARY OF THE MULLIGAN PROCESS:</center>
 
! colspan="2" | <center>SUMMARY OF THE MULLIGAN PROCESS:</center>
 
|-
 
|-
 
|colspan="2" |  
 
|colspan="2" |  
# `GameManager.RecordMove(MoveTypeEnum.mulligan, null)` :<br>Records the action of performing a mulligan in the game history.
+
# `GameManager.mpGameOptions.mulligans`:<br>Checks whether the mulligan feature is enabled in the game's settings.
# `PlayerController.Mulligan(null)` :<br>Called when the player initiates a mulligan. It can either skip the mulligan or proceed based on the game state.
+
# `GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, null);` :<br>Records the action of performing a mulligan in the game history.
 
# `GameModel.GameStateActivate(GameState.GameStateType.mulligan)` :<br>Activates the `mulligan` game state, allowing the game to enter the mulligan phase.
 
# `GameModel.GameStateActivate(GameState.GameStateType.mulligan)` :<br>Activates the `mulligan` game state, allowing the game to enter the mulligan phase.
# `GameController.Mulligan(ShadowEraCard card)` :<br>Handles the actual logic of the mulligan process. It checks the card being returned and manages the transition to drawing new cards.
 
 
# `GameModel.HandCount()` :<br>Used within the `Mulligan` function to determine how many cards the player currently has in hand. It helps in deciding how many cards to draw back.
 
# `GameModel.HandCount()` :<br>Used within the `Mulligan` function to determine how many cards the player currently has in hand. It helps in deciding how many cards to draw back.
# `GameModel.DiscardCard(ShadowEraCard card)` :<br>Called within the `Mulligan` function to discard a card selected for the mulligan.
 
 
# `GameModel.ShuffleDeck()` :<br>Shuffles the deck after cards have been discarded as part of the mulligan process, ensuring the draw is random.
 
# `GameModel.ShuffleDeck()` :<br>Shuffles the deck after cards have been discarded as part of the mulligan process, ensuring the draw is random.
 
# `GameModel.GameStateActivate(GameState.GameStateType.mulliganDraw)` :<br>Activates the `mulliganDraw` state, transitioning the game into the phase where new cards are drawn for the player.
 
# `GameModel.GameStateActivate(GameState.GameStateType.mulliganDraw)` :<br>Activates the `mulliganDraw` state, transitioning the game into the phase where new cards are drawn for the player.
# `GameModel.Draw(int side)` :<br>Called during the `mulliganDraw` state to draw new cards for the specified player side. It handles the card drawing mechanics.
 
 
# `GameModel.CurSide()` :<br>Retrieves the current player side, ensuring the appropriate player is drawing cards during the mulligan process.
 
# `GameModel.CurSide()` :<br>Retrieves the current player side, ensuring the appropriate player is drawing cards during the mulligan process.
 
|-
 
|-
Line 50: Line 48:
 
public enum MoveTypeEnum
 
public enum MoveTypeEnum
 
{
 
{
     mulligan,
+
     mulligan, // Represents the mulligan action
 
     // other move types...
 
     // other move types...
 
}
 
}
Line 57: Line 55:
 
public void Mulligan()
 
public void Mulligan()
 
{
 
{
 +
    // Check if no card is clicked and graveyard/deck lists are not showing
 
     if (clickedCard == null && !GraveyardListDisplay.isShowingGraveYard && !DeckListDisplay.isShowingDeck)
 
     if (clickedCard == null && !GraveyardListDisplay.isShowingGraveYard && !DeckListDisplay.isShowingDeck)
 
     {
 
     {
         GameManager.PressedGUIButton();
+
         GameManager.PressedGUIButton(); // Log button press
         GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, null);
+
         GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, null); // Record the mulligan move
         GameController.Mulligan(null);
+
         GameController.Mulligan(null); // Call the Mulligan function in GameController with no specific card
         gameplay.ShowButton(gameplay.buttonBR2Red, "Mulligan");
+
         gameplay.ShowButton(gameplay.buttonBR2Red, "Mulligan"); // Show the Mulligan button
  
 +
        // If the player confirms the mulligan by pressing the button
 
         if (gameplay.button2Pressed)
 
         if (gameplay.button2Pressed)
 
         {
 
         {
             GameManager.PressedGUIButton();
+
             GameManager.PressedGUIButton(); // Log button press
             GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, GameModel.GetHero());
+
             GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, GameModel.GetHero()); // Record the move with the hero
             GameController.Mulligan(GameModel.GetHero());
+
             GameController.Mulligan(GameModel.GetHero()); // Call the Mulligan function with the selected hero
 
         }
 
         }
 
     }
 
     }
Line 76: Line 76:
 
public void Mulligan(ShadowEraCard card)
 
public void Mulligan(ShadowEraCard card)
 
{
 
{
     if (card == null)
+
     if (card == null) // If no specific card is selected
 
     {
 
     {
 
         DebugLogger.Log("GameController Mulligan Skipped - curSide " + GameModel.CurSide() + " turnCounter " + GameModel.turnCounter);
 
         DebugLogger.Log("GameController Mulligan Skipped - curSide " + GameModel.CurSide() + " turnCounter " + GameModel.turnCounter);
         GameModel.SetCurSide(1 - GameModel.CurSide());
+
         GameModel.SetCurSide(1 - GameModel.CurSide()); // Change the current side
         GameModel.turnCounter++;
+
         GameModel.turnCounter++; // Increment the turn counter
 
     }
 
     }
     else
+
     else // If a specific card is selected
 
     {
 
     {
 
         DebugLogger.Log("GameController Mulligan - curSide " + GameModel.CurSide() + " turnCounter " + GameModel.turnCounter);
 
         DebugLogger.Log("GameController Mulligan - curSide " + GameModel.CurSide() + " turnCounter " + GameModel.turnCounter);
 
         GameModel.DiscardCard(card); // Discard the selected card
 
         GameModel.DiscardCard(card); // Discard the selected card
 
         GameModel.ShuffleDeck(); // Shuffle the deck after discarding
 
         GameModel.ShuffleDeck(); // Shuffle the deck after discarding
         GameModel.GameStateActivate(GameState.GameStateType.mulliganDraw); // Transition to mulligan draw state
+
         GameModel.GameStateActivate(GameState.GameStateType.mulliganDraw); // Transition to the mulligan draw state
 
     }
 
     }
 
}
 
}
Line 97: Line 97:
 
}
 
}
  
 +
// DiscardCard function to handle removing a specified card from the player's hand
 
public void DiscardCard(ShadowEraCard card)
 
public void DiscardCard(ShadowEraCard card)
 
{
 
{
    // Logic to remove the specified card from the player's hand
+
 
 
}
 
}
  
 +
// Logic to shuffle the player's deck
 
public void ShuffleDeck()
 
public void ShuffleDeck()
 
{
 
{
    // Logic to shuffle the player's deck
+
 
 
}
 
}
  
 +
// Logic to change the game state
 
public void GameStateActivate(GameState.GameStateType newState)
 
public void GameStateActivate(GameState.GameStateType newState)
 
{
 
{
    // Logic to change the game state
+
 
 
}
 
}
  
Line 115: Line 118:
 
public void Update(float deltaTime)
 
public void Update(float deltaTime)
 
{
 
{
     switch (GameModel.CurGameState())
+
     switch (GameModel.CurGameState()) // Check the current game state
 
     {
 
     {
 
         case GameState.GameStateType.mulligan:
 
         case GameState.GameStateType.mulligan:
Line 123: Line 126:
 
             if (stateTime == deltaTime)
 
             if (stateTime == deltaTime)
 
             {
 
             {
                 for (int i = 0; i < 5; i++)
+
                 for (int i = 0; i < 5; i++) // Draw 5 new cards for the player
 
                 {
 
                 {
                     GameModel.Draw(GameModel.CurSide()); // Draw new cards for the player
+
                     GameModel.Draw(GameModel.CurSide());
 
                 }
 
                 }
             }
+
             }               //In the mulligan case, the break statement is placed immediately after the comment,
             break;
+
             break;       //meaning no logic is executed when the game state is mulligan. This means the game
     }
+
     }                       //won't perform any actions related to the mulligan phase when it’s active, which is likely
}
+
}                           //unintended.
 
+
                            //Typically, we would expect some logic to handle the actions specific to the mulligan
 +
                            //state, such as displaying buttons for the player to choose whether to mulligan or skip.
 
// GameState.cs
 
// GameState.cs
 
public enum GameStateType
 
public enum GameStateType
Line 137: Line 141:
 
     pre,
 
     pre,
 
     draw,
 
     draw,
     mulligan,
+
     mulligan, // Mulligan state
     mulliganDraw,
+
     mulliganDraw, // State when drawing new cards after a mulligan
 
     sacrifice,
 
     sacrifice,
 
     action,
 
     action,
 
     // other states...
 
     // other states...
 +
}
 +
 +
// AIController.cs (if applicable for automated actions)
 +
public void HandleMulligan() // Located in AIController.cs
 +
{
 +
    // Logic to automatically decide on a mulligan based on AI criteria
 
}
 
}
 
</syntaxhighlight></small>
 
</syntaxhighlight></small>
 
|}
 
|}
 +
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>
 +
 +
==== A Hidden & Unfinished Mulligan? ====
 +
While the game's code incorporates a mulligan feature, it is not directly accessible in the game options. Players cannot see or adjust this option, suggesting that the developers may have chosen to obscure it, either for gameplay reasons or because it is not yet ready for public use.<br>
 +
<br>
 +
'''Logical Inconsistencies'''<br>
 +
<u>The logic behind the mulligan mechanic in Shadow Era presents several inconsistencies</u>:<br>
 +
Discarding and Drawing: The code allows a player to discard a single card and then draw 5 new cards, without any specified action after the drawing of these 5 cards. This mechanism would create a starting hand that can reach 10 cards which clearly show the feature is still not yet completed.<br><br>
 +
 +
<u>Lack of Clarity on Discarded Cards</u>:<br>
 +
The code does not specify what happens to the discarded card. Is it returned to the deck or set aside? This ambiguity regarding the management of discarded cards adds to the overall uncertainty of the mechanic.<br><br>
 +
The mulligan mechanic in Shadow Era '''appears to be an unfinished feature''' that requires adjustments to ensure balance and clarity in gameplay. Hidden from players and accompanied by questionable logic, this functionality raises concerns about its integration and effectiveness.<br><br>
 +
 +
For both players and developers, it is essential to reconsider this option to enhance and coherently integrate it into the overall gaming experience.
 +
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>
 +
==== Player Can Cecide Whether To Initiate A Mulligan ====
 +
{| class="wikitable" code-table"
 +
|-
 +
|
 +
<small><syntaxhighlight lang="csharp">
 +
case GameState.GameStateType.mulligan:
 +
if (clickedCard == null && !GraveyardListDisplay.isShowingGraveYard && !DeckListDisplay.isShowingDeck)
 +
{
 +
gameplay.ShowButton(gameplay.buttonBR1Red, ScriptLocalization.SKIP);
 +
if (gameplay.button1Pressed)
 +
{
 +
GameManager.PressedGUIButton();
 +
GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, null);
 +
Mulligan(null);
 +
}
 +
gameplay.ShowButton(gameplay.buttonBR2Red, "Mulligan");
 +
if (gameplay.button2Pressed)
 +
{
 +
GameManager.PressedGUIButton();
 +
GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, GameModel.GetHero());
 +
Mulligan(GameModel.GetHero());
 +
</syntaxhighlight></small>
 +
|}
 +
<big>'''Explanation'''</big><br><br>
 +
<u>Game State Check</u>:<br>
 +
The code is within the case for the mulligan game state. This indicates that the game is currently in the phase where the player can decide whether to initiate a mulligan.<br><br>
 +
 +
<u>Condition Check</u>:<br>
 +
 +
`if (clickedCard == null && !GraveyardListDisplay.isShowingGraveYard && !DeckListDisplay.isShowingDeck)`:<br>
 +
This condition checks if:<br>
 +
No card has been clicked `(clickedCard == null)`.<br>
 +
The graveyard display is not showing.<br>
 +
The deck list is not showing.<br>
 +
If all these conditions are met, it allows the player to interact with the mulligan options.<br><br>
 +
 +
<u>Showing Buttons</u>:<br>
 +
 +
Skip Button:<br>
 +
`gameplay.ShowButton(gameplay.buttonBR1Red, ScriptLocalization.SKIP);` displays a button labeled "Skip". This button allows the player to bypass the mulligan phase.<br>
 +
Mulligan Button:<br>
 +
`gameplay.ShowButton(gameplay.buttonBR2Red, "Mulligan");` displays a button labeled "Mulligan". This button allows the player to initiate the mulligan process.<br><br>
 +
 +
<u>Button Press Logic</u>:<br>
 +
 +
Skip Button Pressed:
 +
If the player presses the Skip button `(if (gameplay.button1Pressed))`, the following actions occur:<br>
 +
The button press is logged with `GameManager.PressedGUIButton();`.<br>
 +
The move is recorded as a mulligan without a specific card `(GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, null);)`.<br>
 +
The `Mulligan(null);` function is called to handle the skip action.<br><br>
 +
 +
Mulligan Button Pressed:<br>
 +
If the player presses the Mulligan button `(if (gameplay.button2Pressed))`, the following actions occur:<br>
 +
The button press is logged similarly.<br>
 +
The move is recorded as a mulligan associated with the selected hero `(GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, GameModel.GetHero());)`.<br>
 +
The `Mulligan(GameModel.GetHero());` function is called to execute the mulligan process with the selected hero.<br>
 
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>
 
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>
 
<br><br>
 
<br><br>
 
[[Category:Shuffle]]
 
[[Category:Shuffle]]

Latest revision as of 04:23, 3 October 2024


Mulligan

What is a Mulligan?

A mulligan allows players to return their initial hand of cards and draw a new set. This mechanism is essential for maintaining balance and fairness, ensuring that players have a chance to start with usable cards.


Code Summary and Detailed Code

FILE REFERENCES IN THE GAME
TERMS TO LOCATE MULLIGAN REFERENCE
  • AIController.cs: Manages AI player logic, including conditions for entering the `mulligan` state and invoking the `DoMulligan()` method to handle AI-specific mulligan actions.
  • PlayerController.cs: Contains player interaction logic, with specific handling for the `mulligan` state, allowing players to initiate and execute a mulligan through the `Mulligan()` method.
  • ReplayController.cs: Manages game replays, with logic to activate the `mulligan` state when processing replay commands.
  • GameController.cs: Implements the `Mulligan(ShadowEraCard card)` method to manage the process of performing a mulligan, including logging and transitioning to the `mulliganDraw` state.
  • GameOptions.cs: Contains the `mulligans` boolean option, allowing players to enable or disable the mulligan feature when setting up game options.
  • GameManager.cs: Defines an enumeration for move types that includes `mulligan`, indicating that this action is tracked as part of game moves.
  • Gameplay.cs: Supervises the game logic and checks for the `mulligan` state during game updates, enabling specific actions when in this state.
  • GameState.cs: Defines game states including `mulligan` and `mulliganDraw`, providing a framework for managing the transitions related to the mulligan mechanism.
  • Lobby.cs: Manages game lobby interactions, with options related to the `mulligans` toggle when creating or joining games.
  • Mulligan
  • Hand
  • Draw
  • Discard
  • Shuffle
SUMMARY OF THE MULLIGAN PROCESS:
  1. `GameManager.mpGameOptions.mulligans`:
    Checks whether the mulligan feature is enabled in the game's settings.
  2. `GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, null);` :
    Records the action of performing a mulligan in the game history.
  3. `GameModel.GameStateActivate(GameState.GameStateType.mulligan)` :
    Activates the `mulligan` game state, allowing the game to enter the mulligan phase.
  4. `GameModel.HandCount()` :
    Used within the `Mulligan` function to determine how many cards the player currently has in hand. It helps in deciding how many cards to draw back.
  5. `GameModel.ShuffleDeck()` :
    Shuffles the deck after cards have been discarded as part of the mulligan process, ensuring the draw is random.
  6. `GameModel.GameStateActivate(GameState.GameStateType.mulliganDraw)` :
    Activates the `mulliganDraw` state, transitioning the game into the phase where new cards are drawn for the player.
  7. `GameModel.CurSide()` :
    Retrieves the current player side, ensuring the appropriate player is drawing cards during the mulligan process.
DETAILED CODE
This code is a collection of all the functions involved in the shuffle mechanic, though it doesn't exist as a single block in any one file.
// GameManager.cs
public enum MoveTypeEnum
{
    mulligan, // Represents the mulligan action
    // other move types...
}
 
// PlayerController.cs
public void Mulligan()
{
    // Check if no card is clicked and graveyard/deck lists are not showing
    if (clickedCard == null && !GraveyardListDisplay.isShowingGraveYard && !DeckListDisplay.isShowingDeck)
    {
        GameManager.PressedGUIButton(); // Log button press
        GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, null); // Record the mulligan move
        GameController.Mulligan(null); // Call the Mulligan function in GameController with no specific card
        gameplay.ShowButton(gameplay.buttonBR2Red, "Mulligan"); // Show the Mulligan button
 
        // If the player confirms the mulligan by pressing the button
        if (gameplay.button2Pressed)
        {
            GameManager.PressedGUIButton(); // Log button press
            GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, GameModel.GetHero()); // Record the move with the hero
            GameController.Mulligan(GameModel.GetHero()); // Call the Mulligan function with the selected hero
        }
    }
}
 
// GameController.cs
public void Mulligan(ShadowEraCard card)
{
    if (card == null) // If no specific card is selected
    {
        DebugLogger.Log("GameController Mulligan Skipped - curSide " + GameModel.CurSide() + " turnCounter " + GameModel.turnCounter);
        GameModel.SetCurSide(1 - GameModel.CurSide()); // Change the current side
        GameModel.turnCounter++; // Increment the turn counter
    }
    else // If a specific card is selected
    {
        DebugLogger.Log("GameController Mulligan - curSide " + GameModel.CurSide() + " turnCounter " + GameModel.turnCounter);
        GameModel.DiscardCard(card); // Discard the selected card
        GameModel.ShuffleDeck(); // Shuffle the deck after discarding
        GameModel.GameStateActivate(GameState.GameStateType.mulliganDraw); // Transition to the mulligan draw state
    }
}
 
// GameModel.cs
public int HandCount()
{
    // Returns the number of cards in the player's hand
}
 
// DiscardCard function to handle removing a specified card from the player's hand
public void DiscardCard(ShadowEraCard card)
{
 
}
 
// Logic to shuffle the player's deck
public void ShuffleDeck()
{
 
}
 
// Logic to change the game state
public void GameStateActivate(GameState.GameStateType newState)
{
 
}
 
// Gameplay.cs
public void Update(float deltaTime)
{
    switch (GameModel.CurGameState()) // Check the current game state
    {
        case GameState.GameStateType.mulligan:
            // Handle actions specific to the mulligan state
            break;
        case GameState.GameStateType.mulliganDraw:
            if (stateTime == deltaTime)
            {
                for (int i = 0; i < 5; i++) // Draw 5 new cards for the player
                {
                    GameModel.Draw(GameModel.CurSide());
                }
            }                //In the mulligan case, the break statement is placed immediately after the comment,
            break;       //meaning no logic is executed when the game state is mulligan. This means the game
    }                        //won't perform any actions related to the mulligan phase when it’s active, which is likely
}                            //unintended.
                             //Typically, we would expect some logic to handle the actions specific to the mulligan
                             //state, such as displaying buttons for the player to choose whether to mulligan or skip.
// GameState.cs
public enum GameStateType
{
    pre,
    draw,
    mulligan, // Mulligan state
    mulliganDraw, // State when drawing new cards after a mulligan
    sacrifice,
    action,
    // other states...
}
 
// AIController.cs (if applicable for automated actions)
public void HandleMulligan() // Located in AIController.cs
{
    // Logic to automatically decide on a mulligan based on AI criteria
}

A Hidden & Unfinished Mulligan?

While the game's code incorporates a mulligan feature, it is not directly accessible in the game options. Players cannot see or adjust this option, suggesting that the developers may have chosen to obscure it, either for gameplay reasons or because it is not yet ready for public use.

Logical Inconsistencies
The logic behind the mulligan mechanic in Shadow Era presents several inconsistencies:
Discarding and Drawing: The code allows a player to discard a single card and then draw 5 new cards, without any specified action after the drawing of these 5 cards. This mechanism would create a starting hand that can reach 10 cards which clearly show the feature is still not yet completed.

Lack of Clarity on Discarded Cards:
The code does not specify what happens to the discarded card. Is it returned to the deck or set aside? This ambiguity regarding the management of discarded cards adds to the overall uncertainty of the mechanic.

The mulligan mechanic in Shadow Era appears to be an unfinished feature that requires adjustments to ensure balance and clarity in gameplay. Hidden from players and accompanied by questionable logic, this functionality raises concerns about its integration and effectiveness.

For both players and developers, it is essential to reconsider this option to enhance and coherently integrate it into the overall gaming experience.


Player Can Cecide Whether To Initiate A Mulligan

case GameState.GameStateType.mulligan:
	if (clickedCard == null && !GraveyardListDisplay.isShowingGraveYard && !DeckListDisplay.isShowingDeck)
	{
		gameplay.ShowButton(gameplay.buttonBR1Red, ScriptLocalization.SKIP);
		if (gameplay.button1Pressed)
		{
			GameManager.PressedGUIButton();
			GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, null);
			Mulligan(null);
		}
		gameplay.ShowButton(gameplay.buttonBR2Red, "Mulligan");
		if (gameplay.button2Pressed)
		{
			GameManager.PressedGUIButton();
			GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, GameModel.GetHero());
			Mulligan(GameModel.GetHero());

Explanation

Game State Check:
The code is within the case for the mulligan game state. This indicates that the game is currently in the phase where the player can decide whether to initiate a mulligan.

Condition Check:

`if (clickedCard == null && !GraveyardListDisplay.isShowingGraveYard && !DeckListDisplay.isShowingDeck)`:
This condition checks if:
No card has been clicked `(clickedCard == null)`.
The graveyard display is not showing.
The deck list is not showing.
If all these conditions are met, it allows the player to interact with the mulligan options.

Showing Buttons:

Skip Button:
`gameplay.ShowButton(gameplay.buttonBR1Red, ScriptLocalization.SKIP);` displays a button labeled "Skip". This button allows the player to bypass the mulligan phase.
Mulligan Button:
`gameplay.ShowButton(gameplay.buttonBR2Red, "Mulligan");` displays a button labeled "Mulligan". This button allows the player to initiate the mulligan process.

Button Press Logic:

Skip Button Pressed: If the player presses the Skip button `(if (gameplay.button1Pressed))`, the following actions occur:
The button press is logged with `GameManager.PressedGUIButton();`.
The move is recorded as a mulligan without a specific card `(GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, null);)`.
The `Mulligan(null);` function is called to handle the skip action.

Mulligan Button Pressed:
If the player presses the Mulligan button `(if (gameplay.button2Pressed))`, the following actions occur:
The button press is logged similarly.
The move is recorded as a mulligan associated with the selected hero `(GameManager.RecordMove(GameManager.MoveTypeEnum.mulligan, GameModel.GetHero());)`.
The `Mulligan(GameModel.GetHero());` function is called to execute the mulligan process with the selected hero.