Commit 69eecef7 authored by mercury233's avatar mercury233

add Bot.BattlingMonster

parent 25923ed1
......@@ -14,6 +14,7 @@ namespace WindBot.Game
public IList<ClientCard> ExtraDeck { get; private set; }
public int LifePoints;
public ClientCard BattlingMonster;
public ClientField()
{
......
......@@ -91,6 +91,8 @@ namespace WindBot.Game
m_yesno = -1;
m_position = CardPosition.FaceUpAttack;
Duel.LastSummonPlayer = -1;
Duel.Fields[0].BattlingMonster = null;
Duel.Fields[1].BattlingMonster = null;
if (Duel.Player == 0 && Duel.Phase == DuelPhase.Draw)
{
_dialogs.SendNewTurn();
......
......@@ -494,12 +494,16 @@ namespace WindBot.Game
int la = packet.ReadByte();
int sa = packet.ReadByte();
packet.ReadByte(); //
packet.ReadByte(); // cd
int cd = packet.ReadByte();
int ld = packet.ReadByte();
packet.ReadByte(); // sd
int sd = packet.ReadByte();
packet.ReadByte(); //
ClientCard attackcard = _duel.GetCard(ca, (CardLocation)la, sa);
ClientCard defendcard = _duel.GetCard(cd, (CardLocation)ld, sd);
_duel.Fields[attackcard.Controller].BattlingMonster = attackcard;
_duel.Fields[1 - attackcard.Controller].BattlingMonster = defendcard;
if (ld == 0 && (attackcard != null) && (ca != 0))
{
_ai.OnDirectAttack(attackcard);
......
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