Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
082c94e4
Commit
082c94e4
authored
Jan 01, 2011
by
Max-Wilhelm Bruker
Browse files
improved mulligan behaviour
parent
a77dc1ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/server_protocolhandler.cpp
View file @
082c94e4
...
@@ -503,12 +503,10 @@ ResponseCode Server_ProtocolHandler::cmdMulligan(Command_Mulligan * /*cmd*/, Com
...
@@ -503,12 +503,10 @@ ResponseCode Server_ProtocolHandler::cmdMulligan(Command_Mulligan * /*cmd*/, Com
if
(
!
game
->
getGameStarted
())
if
(
!
game
->
getGameStarted
())
return
RespGameNotStarted
;
return
RespGameNotStarted
;
int
number
=
player
->
getInitialCards
();
if
(
!
number
)
return
RespContextError
;
Server_CardZone
*
hand
=
player
->
getZones
().
value
(
"hand"
);
Server_CardZone
*
hand
=
player
->
getZones
().
value
(
"hand"
);
int
number
=
(
hand
->
cards
.
size
()
<=
1
)
?
player
->
getInitialCards
()
:
hand
->
cards
.
size
()
-
1
;
while
(
!
hand
->
cards
.
isEmpty
())
while
(
!
hand
->
cards
.
isEmpty
())
player
->
moveCard
(
cont
,
"hand"
,
hand
->
cards
.
first
()
->
getId
(),
"deck"
,
0
,
0
,
false
,
false
);
player
->
moveCard
(
cont
,
"hand"
,
hand
->
cards
.
first
()
->
getId
(),
"deck"
,
0
,
0
,
false
,
false
);
...
@@ -517,7 +515,6 @@ ResponseCode Server_ProtocolHandler::cmdMulligan(Command_Mulligan * /*cmd*/, Com
...
@@ -517,7 +515,6 @@ ResponseCode Server_ProtocolHandler::cmdMulligan(Command_Mulligan * /*cmd*/, Com
cont
->
enqueueGameEventPublic
(
new
Event_Shuffle
(
player
->
getPlayerId
()),
game
->
getGameId
());
cont
->
enqueueGameEventPublic
(
new
Event_Shuffle
(
player
->
getPlayerId
()),
game
->
getGameId
());
drawCards
(
game
,
player
,
cont
,
number
);
drawCards
(
game
,
player
,
cont
,
number
);
player
->
setInitialCards
(
number
-
1
);
return
RespOk
;
return
RespOk
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment