Commit 86066c75 authored by mercury233's avatar mercury233

update for new master rule

parent af01d0b9
...@@ -41,7 +41,7 @@ namespace WindBot.Game.AI ...@@ -41,7 +41,7 @@ namespace WindBot.Game.AI
public int GetBestAttack(ClientField field, bool onlyatk) public int GetBestAttack(ClientField field, bool onlyatk)
{ {
int bestAtk = -1; int bestAtk = -1;
for (int i = 0; i < 5; ++i) for (int i = 0; i < 7; ++i)
{ {
ClientCard card = field.MonsterZone[i]; ClientCard card = field.MonsterZone[i];
if (card == null) continue; if (card == null) continue;
...@@ -71,7 +71,7 @@ namespace WindBot.Game.AI ...@@ -71,7 +71,7 @@ namespace WindBot.Game.AI
{ {
int bestValue = -1; int bestValue = -1;
bool nomonster = true; bool nomonster = true;
for (int i = 0; i < 5; ++i) for (int i = 0; i < 7; ++i)
{ {
ClientCard card = Duel.Fields[1].MonsterZone[i]; ClientCard card = Duel.Fields[1].MonsterZone[i];
if (card == null) continue; if (card == null) continue;
...@@ -88,7 +88,7 @@ namespace WindBot.Game.AI ...@@ -88,7 +88,7 @@ namespace WindBot.Game.AI
public bool IsAllEnnemyBetterThanValue(int value, bool onlyatk) public bool IsAllEnnemyBetterThanValue(int value, bool onlyatk)
{ {
bool nomonster = true; bool nomonster = true;
for (int i = 0; i < 5; ++i) for (int i = 0; i < 7; ++i)
{ {
ClientCard card = Duel.Fields[1].MonsterZone[i]; ClientCard card = Duel.Fields[1].MonsterZone[i];
if (card == null || card.Data == null) continue; if (card == null || card.Data == null) continue;
...@@ -103,7 +103,7 @@ namespace WindBot.Game.AI ...@@ -103,7 +103,7 @@ namespace WindBot.Game.AI
public ClientCard GetOneEnnemyBetterThanValue(int value, bool onlyatk) public ClientCard GetOneEnnemyBetterThanValue(int value, bool onlyatk)
{ {
for (int i = 0; i < 5; ++i) for (int i = 0; i < 7; ++i)
{ {
ClientCard card = Duel.Fields[1].MonsterZone[i]; ClientCard card = Duel.Fields[1].MonsterZone[i];
if (card == null) continue; if (card == null) continue;
......
...@@ -189,7 +189,7 @@ namespace WindBot.Game.AI ...@@ -189,7 +189,7 @@ namespace WindBot.Game.AI
return false; return false;
} }
int tributecount = (int)Math.Ceiling((Card.Level - 4.0d) / 2.0d); int tributecount = (int)Math.Ceiling((Card.Level - 4.0d) / 2.0d);
for (int j = 0; j < 5; ++j) for (int j = 0; j < 7; ++j)
{ {
ClientCard tributeCard = Duel.Fields[0].MonsterZone[j]; ClientCard tributeCard = Duel.Fields[0].MonsterZone[j];
if (tributeCard == null) continue; if (tributeCard == null) continue;
......
...@@ -20,7 +20,7 @@ namespace WindBot.Game ...@@ -20,7 +20,7 @@ namespace WindBot.Game
public void Init(int deck, int extra) public void Init(int deck, int extra)
{ {
Hand = new List<ClientCard>(); Hand = new List<ClientCard>();
MonsterZone = new ClientCard[5]; MonsterZone = new ClientCard[7];
SpellZone = new ClientCard[8]; SpellZone = new ClientCard[8];
Graveyard = new List<ClientCard>(); Graveyard = new List<ClientCard>();
Banished = new List<ClientCard>(); Banished = new List<ClientCard>();
......
...@@ -844,11 +844,11 @@ namespace WindBot.Game ...@@ -844,11 +844,11 @@ namespace WindBot.Game
bool pendulumZone = false; bool pendulumZone = false;
int filter; int filter;
if ((field & 0x1f) != 0) if ((field & 0x7f) != 0)
{ {
resp[0] = (byte)GetLocalPlayer(0); resp[0] = (byte)GetLocalPlayer(0);
resp[1] = 0x4; resp[1] = 0x4;
filter = field & 0x1f; filter = field & 0x7f;
} }
else if ((field & 0x1f00) != 0) else if ((field & 0x1f00) != 0)
{ {
...@@ -863,11 +863,11 @@ namespace WindBot.Game ...@@ -863,11 +863,11 @@ namespace WindBot.Game
filter = (field >> 14) & 0x3; filter = (field >> 14) & 0x3;
pendulumZone = true; pendulumZone = true;
} }
else if ((field & 0x1f0000) != 0) else if ((field & 0x7f0000) != 0)
{ {
resp[0] = (byte)GetLocalPlayer(1); resp[0] = (byte)GetLocalPlayer(1);
resp[1] = 0x4; resp[1] = 0x4;
filter = (field >> 16) & 0x1f; filter = (field >> 16) & 0x7f;
} }
else if ((field & 0x1f000000) != 0) else if ((field & 0x1f000000) != 0)
{ {
...@@ -885,7 +885,9 @@ namespace WindBot.Game ...@@ -885,7 +885,9 @@ namespace WindBot.Game
if (!pendulumZone) if (!pendulumZone)
{ {
if ((filter & 0x4) != 0) resp[2] = 2; if ((filter & 0x40) != 0) resp[2] = 6;
else if ((filter & 0x20) != 0) resp[2] = 5;
else if ((filter & 0x4) != 0) resp[2] = 2;
else if ((filter & 0x2) != 0) resp[2] = 1; else if ((filter & 0x2) != 0) resp[2] = 1;
else if ((filter & 0x8) != 0) resp[2] = 3; else if ((filter & 0x8) != 0) resp[2] = 3;
else if ((filter & 0x1) != 0) resp[2] = 0; else if ((filter & 0x1) != 0) resp[2] = 0;
......
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