Commit aa293795 authored by nanahira's avatar nanahira

tricky

parent 9781bfe2
Pipeline #4891 passed with stage
in 55 seconds
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
{ {
Activate = 0, Activate = 0,
Attack = 1, Attack = 1,
ToMainPhaseTwo = 2, ToMainPhaseTwo = 3,
ToEndPhase = 3 ToEndPhase = 2
} }
public BattleAction Action { get; private set; } public BattleAction Action { get; private set; }
...@@ -30,4 +30,4 @@ ...@@ -30,4 +30,4 @@
return (Index << 16) + (int)Action; return (Index << 16) + (int)Action;
} }
} }
} }
\ No newline at end of file
...@@ -941,8 +941,8 @@ namespace WindBot.Game ...@@ -941,8 +941,8 @@ namespace WindBot.Game
monster.Attacked = true; monster.Attacked = true;
} }
battle.CanMainPhaseTwo = packet.ReadByte() != 0;
battle.CanEndPhase = packet.ReadByte() != 0; battle.CanEndPhase = packet.ReadByte() != 0;
battle.CanMainPhaseTwo = packet.ReadByte() != 0;
Connection.Send(CtosMessage.Response, _ai.OnSelectBattleCmd(battle).ToValue()); Connection.Send(CtosMessage.Response, _ai.OnSelectBattleCmd(battle).ToValue());
} }
...@@ -1191,7 +1191,7 @@ namespace WindBot.Game ...@@ -1191,7 +1191,7 @@ namespace WindBot.Game
ClientCard card = _duel.GetCard(player, loc, seq); ClientCard card = _duel.GetCard(player, loc, seq);
if (card == null) if (card == null)
{ {
Connection.Send(CtosMessage.Response, 0); Connection.Send(CtosMessage.Response, 1);
return; return;
} }
...@@ -1199,7 +1199,7 @@ namespace WindBot.Game ...@@ -1199,7 +1199,7 @@ namespace WindBot.Game
card.SetId(cardId); card.SetId(cardId);
int reply = _ai.OnSelectEffectYn(card, desc) ? (1) : (0); int reply = _ai.OnSelectEffectYn(card, desc) ? (1) : (0);
Connection.Send(CtosMessage.Response, reply); Connection.Send(CtosMessage.Response, 1 - reply);
} }
private void OnSelectIdleCmd(BinaryReader packet) private void OnSelectIdleCmd(BinaryReader packet)
...@@ -1223,7 +1223,7 @@ namespace WindBot.Game ...@@ -1223,7 +1223,7 @@ namespace WindBot.Game
card.ActionIndex[k] = i; card.ActionIndex[k] = i;
switch (k) switch (k)
{ {
case 0: case 3:
main.SummonableCards.Add(card); main.SummonableCards.Add(card);
break; break;
case 1: case 1:
...@@ -1232,7 +1232,7 @@ namespace WindBot.Game ...@@ -1232,7 +1232,7 @@ namespace WindBot.Game
case 2: case 2:
main.ReposableCards.Add(card); main.ReposableCards.Add(card);
break; break;
case 3: case 0:
main.MonsterSetableCards.Add(card); main.MonsterSetableCards.Add(card);
break; break;
case 4: case 4:
...@@ -1260,8 +1260,8 @@ namespace WindBot.Game ...@@ -1260,8 +1260,8 @@ namespace WindBot.Game
main.ActivableDescs.Add(desc); main.ActivableDescs.Add(desc);
} }
main.CanBattlePhase = packet.ReadByte() != 0;
main.CanEndPhase = packet.ReadByte() != 0; main.CanEndPhase = packet.ReadByte() != 0;
main.CanBattlePhase = packet.ReadByte() != 0;
packet.ReadByte(); // CanShuffle packet.ReadByte(); // CanShuffle
Connection.Send(CtosMessage.Response, _ai.OnSelectIdleCmd(main).ToValue()); Connection.Send(CtosMessage.Response, _ai.OnSelectIdleCmd(main).ToValue());
...@@ -1470,7 +1470,7 @@ namespace WindBot.Game ...@@ -1470,7 +1470,7 @@ namespace WindBot.Game
reply = _ai.OnSelectBattleReplay() ? 1 : 0; reply = _ai.OnSelectBattleReplay() ? 1 : 0;
else else
reply = _ai.OnSelectYesNo(desc) ? 1 : 0; reply = _ai.OnSelectYesNo(desc) ? 1 : 0;
Connection.Send(CtosMessage.Response, reply); Connection.Send(CtosMessage.Response, 1 - reply);
} }
private void OnAnnounceAttrib(BinaryReader packet) private void OnAnnounceAttrib(BinaryReader packet)
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
{ {
public enum MainAction public enum MainAction
{ {
Summon = 0, Summon = 3,
SpSummon = 1, SpSummon = 1,
Repos = 2, Repos = 2,
SetMonster = 3, SetMonster = 0,
SetSpell = 4, SetSpell = 4,
Activate = 5, Activate = 5,
ToBattlePhase = 6, ToBattlePhase = 7,
ToEndPhase = 7 ToEndPhase = 6
} }
public MainAction Action { get; private set; } public MainAction Action { get; private set; }
...@@ -40,4 +40,4 @@ ...@@ -40,4 +40,4 @@
return (Index << 16) + (int)Action; return (Index << 16) + (int)Action;
} }
} }
} }
\ No newline at end of file
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