Commit e1d02411 authored by salix5's avatar salix5

MSG_CONFIRM_CARDS

The server should inform both players that their cards are confirmed.
LOCATION_DECK is excluded since it is used in some card effects.
parent f6f95e72
......@@ -753,7 +753,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
case MSG_CONFIRM_CARDS: {
player = BufferIO::ReadInt8(pbuf);
count = BufferIO::ReadInt8(pbuf);
if(pbuf[5] != LOCATION_REMOVED) {
if(pbuf[5] != LOCATION_DECK) {
pbuf += count * 7;
NetServer::SendBufferToPlayer(players[player], STOC_GAME_MSG, offset, pbuf - offset);
NetServer::ReSendToPlayer(players[1 - player]);
......
......@@ -22,9 +22,10 @@ function c24317029.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c24317029.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else
elseif Duel.IsPlayerCanSpecialSummon(tp) then
local cg=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg)
Duel.ConfirmCards(tp,cg)
Duel.ShuffleDeck(tp)
end
end
......@@ -88,6 +88,7 @@ function c31516413.spop(e,tp,eg,ep,ev,re,r,rp)
local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ConfirmCards(tp,cg2)
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
end
......
......@@ -91,6 +91,7 @@ function c3300267.spop(e,tp,eg,ep,ev,re,r,rp)
local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ConfirmCards(tp,cg2)
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
end
......
......@@ -101,6 +101,7 @@ function c4022819.spop(e,tp,eg,ep,ev,re,r,rp)
local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ConfirmCards(tp,cg2)
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
end
......
......@@ -49,6 +49,7 @@ function c41639001.spop(e,tp,eg,ep,ev,re,r,rp)
local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ConfirmCards(tp,cg2)
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
end
......
......@@ -47,6 +47,7 @@ function c51858306.operation(e,tp,eg,ep,ev,re,r,rp)
else
local cg=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg)
Duel.ConfirmCards(tp,cg)
Duel.ShuffleDeck(tp)
end
end
......
......@@ -62,6 +62,7 @@ function c77901552.spop(e,tp,eg,ep,ev,re,r,rp)
local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ConfirmCards(tp,cg2)
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
end
......
......@@ -65,6 +65,7 @@ function c78033100.spop(e,tp,eg,ep,ev,re,r,rp)
local cg2=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ConfirmCards(tp,cg2)
Duel.ShuffleHand(tp)
Duel.ShuffleDeck(tp)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment