diff --git a/BotWrapper/BotWrapper.sh b/BotWrapper/BotWrapper.sh new file mode 100755 index 00000000..b5ddfb74 --- /dev/null +++ b/BotWrapper/BotWrapper.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cd windbot + +if [ "$#" -ne 3 ]; then + mono WindBot.exe +else + command=$1 + flag=$2 + port=$3 + arg="${command//\'/\"}" # replace ' to " + if [ "$flag" -eq 1 ]; then arg=$arg" Hand=1"; fi + arg=$arg" Port="$port + eval "mono WindBot.exe "$arg +fi diff --git a/Dialogs/copy.zh-CN.json b/Dialogs/copy.zh-CN.json index 9c0cda2d..29cc816e 100644 --- a/Dialogs/copy.zh-CN.json +++ b/Dialogs/copy.zh-CN.json @@ -1,7 +1,7 @@ { "welcome": [ - "AI功能正在测试中,遇到问题请及时反馈。", - "密码输入 AI#复制植物 就可以和我打牌了~" + "你好,我是一个机器人。", + "AI功能正在测试中,遇到问题请及时反馈。" ], "deckerror": [ "我的超主流卡组需要{0}才能玩。" diff --git a/Dialogs/swordsman.zh-CN.json b/Dialogs/swordsman.zh-CN.json index 40aaa141..c77ba9d4 100644 --- a/Dialogs/swordsman.zh-CN.json +++ b/Dialogs/swordsman.zh-CN.json @@ -1,8 +1,7 @@ { "welcome": [ "你好,我是一个机器人。", - "AI功能正在测试中,遇到问题请及时反馈。", - "新的风暴已经出现,怎么能够停滞不前!我的R5卡组也得到了加强!" + "AI功能正在测试中,遇到问题请及时反馈。" ], "deckerror": [ "抱歉,我的卡组里的{0}的数量似乎出了问题。" diff --git a/Game/GameBehavior.cs b/Game/GameBehavior.cs index 5ad5df8b..5878e37e 100644 --- a/Game/GameBehavior.cs +++ b/Game/GameBehavior.cs @@ -88,6 +88,7 @@ private void RegisterPackets() _messages.Add(GameMessage.Draw, OnDraw); _messages.Add(GameMessage.ShuffleDeck, OnShuffleDeck); _messages.Add(GameMessage.ShuffleHand, OnShuffleHand); + _messages.Add(GameMessage.ShuffleExtra, OnShuffleExtra); _messages.Add(GameMessage.TagSwap, OnTagSwap); _messages.Add(GameMessage.NewTurn, OnNewTurn); _messages.Add(GameMessage.NewPhase, OnNewPhase); @@ -371,6 +372,17 @@ private void OnShuffleHand(BinaryReader packet) card.SetId(packet.ReadInt32()); } + private void OnShuffleExtra(BinaryReader packet) + { + int player = GetLocalPlayer(packet.ReadByte()); + packet.ReadByte(); + foreach (ClientCard card in _duel.Fields[player].ExtraDeck) + { + if (!card.IsFaceup()) + card.SetId(packet.ReadInt32()); + } + } + private void OnTagSwap(BinaryReader packet) { int player = GetLocalPlayer(packet.ReadByte()); diff --git a/README.md b/README.md index 35638789..16ee1eb1 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,11 @@ The parameters are same as commandlines, but low cased. ### Changelog +#### v0x1342 (2017-12-26) + + - Update YGOPro protrol to 0x1342 + - Add Linux BotWrapper (a simple bash script) + #### v0x1341 (2017-11-27) - Update YGOPro protrol to 0x1341 diff --git a/WindBotInfo.cs b/WindBotInfo.cs index 11a39262..6c615f5d 100644 --- a/WindBotInfo.cs +++ b/WindBotInfo.cs @@ -21,7 +21,7 @@ public WindBotInfo() Host = "127.0.0.1"; Port = 7911; HostInfo = ""; - Version = 0x1341; + Version = 0x1342; Hand = 0; } } diff --git a/YGOSharp.OCGWrapper.Enums.dll b/YGOSharp.OCGWrapper.Enums.dll index f8808461..09b2e778 100644 Binary files a/YGOSharp.OCGWrapper.Enums.dll and b/YGOSharp.OCGWrapper.Enums.dll differ