Commit c62bc9ee authored by mercury233's avatar mercury233
parents aa31628f 029d67e6
#!/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
{
"welcome": [
"AI功能正在测试中,遇到问题请及时反馈。",
"密码输入 AI#复制植物 就可以和我打牌了~"
"你好,我是一个机器人。",
"AI功能正在测试中,遇到问题请及时反馈。"
],
"deckerror": [
"我的超主流卡组需要{0}才能玩。"
......
{
"welcome": [
"你好,我是一个机器人。",
"AI功能正在测试中,遇到问题请及时反馈。",
"新的风暴已经出现,怎么能够停滞不前!我的R5卡组也得到了加强!"
"AI功能正在测试中,遇到问题请及时反馈。"
],
"deckerror": [
"抱歉,我的卡组里的{0}的数量似乎出了问题。"
......
......@@ -88,6 +88,7 @@ namespace WindBot.Game
_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 @@ namespace WindBot.Game
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());
......
......@@ -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
......
......@@ -21,7 +21,7 @@ namespace WindBot
Host = "127.0.0.1";
Port = 7911;
HostInfo = "";
Version = 0x1341;
Version = 0x1342;
Hand = 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