summaryrefslogtreecommitdiff
path: root/sw-common-model
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-05-28 09:57:13 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-05-28 13:34:56 +0200
commit0f2ef6c219266b5ca877eef80020a0f2d14e4af7 (patch)
tree98181d1972d18ecc3ab134b82aedae5153802017 /sw-common-model
parentRename discardHand to clearHand for clarity (diff)
downloadseven-wonders-0f2ef6c219266b5ca877eef80020a0f2d14e4af7.tar.gz
seven-wonders-0f2ef6c219266b5ca877eef80020a0f2d14e4af7.tar.bz2
seven-wonders-0f2ef6c219266b5ca877eef80020a0f2d14e4af7.zip
Add server-side support for PLAY_FREE_DISCARDED special ability
So far, there was no "turn" generated for the player who could play a free card from the discarded pile.
Diffstat (limited to 'sw-common-model')
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt5
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt1
2 files changed, 5 insertions, 1 deletions
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt
index d5503bc9..12084539 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/Moves.kt
@@ -15,6 +15,7 @@ enum class Action(val message: String) {
PLAY("Pick the card you want to play or discard."),
PLAY_2("Pick the first card you want to play or discard. Note that you have the ability to play these 2 last cards. You will choose how to play the last one during your next turn."),
PLAY_LAST("You have the special ability to play your last card. Choose how you want to play it."),
+ PLAY_FREE_DISCARDED("Pick a card from the discarded deck, you can play it for free."),
PICK_NEIGHBOR_GUILD("Choose a Guild card (purple) that you want to copy from one of your neighbours."),
WAIT("Please wait for other players to perform extra actions."),
WATCH_SCORE("The game is over! Look at the scoreboard to see the final ranking!")
@@ -27,7 +28,8 @@ data class PlayerTurnInfo(
val action: Action,
val hand: List<HandCard>?,
val preparedMove: PlayedMove?,
- val neighbourGuildCards: List<TableCard>,
+ val neighbourGuildCards: List<HandCard>,
+ val discardedCards: List<HandCard>?, // only present when the player can actually see them
val scoreBoard: ScoreBoard? = null
) {
val currentAge: Int = table.currentAge
@@ -62,6 +64,7 @@ data class PlayerMove(
enum class MoveType {
PLAY,
PLAY_FREE,
+ PLAY_FREE_DISCARDED,
UPGRADE_WONDER,
DISCARD,
COPY_GUILD;
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt
index fdb4d11b..5c7616a1 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt
@@ -55,6 +55,7 @@ data class CardBack(val image: String)
enum class PlayabilityLevel(val message: String) {
CHAINABLE("free because of a card on the board"),
NO_REQUIREMENTS("free"),
+ SPECIAL_FREE("free because of a special ability"),
ENOUGH_RESOURCES("free"),
ENOUGH_GOLD("enough gold"),
ENOUGH_GOLD_AND_RES("enough gold and resources"),
bgstack15