Commit d6eb54c2 authored by mercury233's avatar mercury233

update GameMessage.SelectChain

parent e560f1f1
...@@ -1048,11 +1048,20 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1048,11 +1048,20 @@ public class Ocgcore : ServantWithCardDescription
r.ReadChar(); r.ReadChar();
int count = r.ReadByte(); int count = r.ReadByte();
int spcount = r.ReadByte(); int spcount = r.ReadByte();
int forced = r.ReadByte();
var hint0 = r.ReadInt32(); var hint0 = r.ReadInt32();
var hint1 = r.ReadInt32(); var hint1 = r.ReadInt32();
var ignore = false; var ignore = false;
if (forced == 0) bool forced = false;
for (int i = 0; i < count; i++)
{
r.ReadByte(); // flag
int f = r.ReadByte(); // forced
if (f == 1) forced = true;
r.ReadInt32(); // card id
r.ReadGPS();
r.ReadInt32(); // desc
}
if (!forced)
{ {
var condition = gameInfo.get_condition(); var condition = gameInfo.get_condition();
if (condition == gameInfo.chainCondition.no) if (condition == gameInfo.chainCondition.no)
...@@ -3106,14 +3115,14 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3106,14 +3115,14 @@ public class Ocgcore : ServantWithCardDescription
player = localPlayer(r.ReadChar()); player = localPlayer(r.ReadChar());
count = r.ReadByte(); count = r.ReadByte();
int spcount = r.ReadByte(); int spcount = r.ReadByte();
int forced = r.ReadByte();
var hint0 = r.ReadInt32(); var hint0 = r.ReadInt32();
var hint1 = r.ReadInt32(); var hint1 = r.ReadInt32();
var chainCards = new List<gameCard>(); var chainCards = new List<gameCard>();
var forced = 0;
for (var i = 0; i < count; i++) for (var i = 0; i < count; i++)
{ {
var flag = 0; var flag = r.ReadChar();
if (length_of_message % 12 != 0) flag = r.ReadChar(); forced += r.ReadByte();
code = r.ReadInt32() % 1000000000; code = r.ReadInt32() % 1000000000;
gps = r.ReadGPS(); gps = r.ReadGPS();
desc = GameStringManager.get(r.ReadInt32()); desc = GameStringManager.get(r.ReadInt32());
...@@ -3133,7 +3142,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3133,7 +3142,7 @@ public class Ocgcore : ServantWithCardDescription
var chain_condition = gameInfo.get_condition(); var chain_condition = gameInfo.get_condition();
var handle_flag = 0; var handle_flag = 0;
if (forced == 0) if (forced == 0) // TODO: 按每张卡的forced处理
{ {
//无强制发动的卡 //无强制发动的卡
if (spcount == 0) if (spcount == 0)
......
...@@ -732,11 +732,11 @@ namespace Percy ...@@ -732,11 +732,11 @@ namespace Percy
move(1); move(1);
count = move(1); count = move(1);
move(1); move(1);
move(1);
move(4); move(4);
move(4); move(4);
for (var i = 0; i < count; i++) for (var i = 0; i < count; i++)
{ {
move(1);
move(1); move(1);
move(4); move(4);
move(4); move(4);
......
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