06-30-2023, 04:53 AM
Hi,
I would recommend using a custom trait to track whether a piece has been promoted on the previous turn. For example, you could create a trait called "Recently Promoted" with a boolean value that is set to true when a piece is promoted, and false otherwise.
Then, in your movement rules, you can add a conditional statement that checks whether the piece attempting to move has the "Recently Promoted" trait set to true. If it does, then the movement is forbidden. To ensure that this restriction only applies to the current turn, you can add a game state variable that is set to true at the end of each turn, and then reset to false at the beginning of the next turn.
I would recommend using a custom trait to track whether a piece has been promoted on the previous turn. For example, you could create a trait called "Recently Promoted" with a boolean value that is set to true when a piece is promoted, and false otherwise.
Then, in your movement rules, you can add a conditional statement that checks whether the piece attempting to move has the "Recently Promoted" trait set to true. If it does, then the movement is forbidden. To ensure that this restriction only applies to the current turn, you can add a game state variable that is set to true at the end of each turn, and then reset to false at the beginning of the next turn.