Skip to content

Commit 979cbdf

Browse files
committed
fix(plugin25): do not count market buy as card action
Fixes swap carrots being incorrectly disallowed
1 parent 17a8907 commit 979cbdf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugin2025/src/main/kotlin/sc/plugin2025/GameState.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ data class GameState @JvmOverloads constructor(
136136
} ?: move.perform(this)
137137
if(mist != null)
138138
throw InvalidMoveException(mist, move)
139-
currentPlayer.lastAction = if(move is Advance) move.getCards().lastOrNull() ?: move else move
139+
currentPlayer.lastAction =
140+
if(move is Advance && currentField != Field.MARKET)
141+
move.getCards().lastOrNull() ?: move
142+
else move
140143
turn++
141144
awardPositionFields()
142145
if(!moveIterator().hasNext()) {

0 commit comments

Comments
 (0)