Commit a9bcb27d authored by mercury233's avatar mercury233

update new rule 2020

parent c82c7038
...@@ -251,7 +251,7 @@ namespace WindBot.Game.AI ...@@ -251,7 +251,7 @@ namespace WindBot.Game.AI
if (remove.Contains(EnemyMZone[i])) EnemyMZone[i] = null; if (remove.Contains(EnemyMZone[i])) EnemyMZone[i] = null;
} }
if (!Duel.IsNewRule) if (!Duel.IsNewRule || Duel.IsNewRule2020)
return Zones.MainMonsterZones; return Zones.MainMonsterZones;
int result = 0; int result = 0;
......
...@@ -7,6 +7,7 @@ namespace WindBot.Game ...@@ -7,6 +7,7 @@ namespace WindBot.Game
{ {
public bool IsFirst { get; set; } public bool IsFirst { get; set; }
public bool IsNewRule { get; set; } public bool IsNewRule { get; set; }
public bool IsNewRule2020 { get; set; }
public ClientField[] Fields { get; private set; } public ClientField[] Fields { get; private set; }
......
...@@ -150,7 +150,8 @@ namespace WindBot.Game ...@@ -150,7 +150,8 @@ namespace WindBot.Game
/*int rule = */ packet.ReadByte(); /*int rule = */ packet.ReadByte();
/*int mode = */ packet.ReadByte(); /*int mode = */ packet.ReadByte();
int duel_rule = packet.ReadByte(); int duel_rule = packet.ReadByte();
_ai.Duel.IsNewRule = (duel_rule == 4); _ai.Duel.IsNewRule = (duel_rule >= 4);
_ai.Duel.IsNewRule2020 = (duel_rule >= 5);
BinaryWriter deck = GamePacketFactory.Create(CtosMessage.UpdateDeck); BinaryWriter deck = GamePacketFactory.Create(CtosMessage.UpdateDeck);
deck.Write(Deck.Cards.Count + Deck.ExtraCards.Count); deck.Write(Deck.Cards.Count + Deck.ExtraCards.Count);
deck.Write(Deck.SideCards.Count); deck.Write(Deck.SideCards.Count);
...@@ -347,7 +348,8 @@ namespace WindBot.Game ...@@ -347,7 +348,8 @@ namespace WindBot.Game
_duel.IsFirst = (type & 0xF) == 0; _duel.IsFirst = (type & 0xF) == 0;
_duel.Turn = 0; _duel.Turn = 0;
int duel_rule = packet.ReadByte(); int duel_rule = packet.ReadByte();
_ai.Duel.IsNewRule = (duel_rule == 4); _ai.Duel.IsNewRule = (duel_rule >= 4);
_ai.Duel.IsNewRule2020 = (duel_rule >= 5);
_duel.Fields[GetLocalPlayer(0)].LifePoints = packet.ReadInt32(); _duel.Fields[GetLocalPlayer(0)].LifePoints = packet.ReadInt32();
_duel.Fields[GetLocalPlayer(1)].LifePoints = packet.ReadInt32(); _duel.Fields[GetLocalPlayer(1)].LifePoints = packet.ReadInt32();
int deck = packet.ReadInt16(); int deck = packet.ReadInt16();
......
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