Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
windbot
Commits
042ffe18
Commit
042ffe18
authored
Apr 04, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add AI.GetAttacker() and AI.GetDefender() (#3)"
This reverts commit
258990b9
.
parent
5d4b0151
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
30 deletions
+9
-30
Game/GameAI.cs
Game/GameAI.cs
+5
-25
Game/GameBehavior.cs
Game/GameBehavior.cs
+4
-5
No files found.
Game/GameAI.cs
View file @
042ffe18
using
System.Linq
;
using
System.Linq
;
using
System.Collections.Generic
;
using
WindBot.Game.AI
;
using
YGOSharp.OCGWrapper.Enums
;
...
...
@@ -90,8 +90,6 @@ namespace WindBot.Game
m_option
=
-
1
;
m_yesno
=
-
1
;
m_position
=
CardPosition
.
FaceUpAttack
;
m_attacker
=
null
;
m_defender
=
null
;
Duel
.
LastSummonPlayer
=
-
1
;
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
Draw
)
{
...
...
@@ -628,27 +626,9 @@ namespace WindBot.Game
private
int
m_number
;
private
int
m_announce
;
private
int
m_yesno
;
private
ClientCard
m_attacker
;
private
ClientCard
m_defender
;
private
IList
<
CardAttribute
>
m_attributes
=
new
List
<
CardAttribute
>();
private
IList
<
CardRace
>
m_races
=
new
List
<
CardRace
>();
public
void
SendBattleMsg
(
ClientCard
attackcard
,
ClientCard
defendcard
)
{
m_attacker
=
attackcard
;
m_defender
=
defendcard
;
}
public
ClientCard
GetAttacker
()
{
return
m_attacker
;
}
public
ClientCard
GetDefender
()
{
return
m_defender
;
}
public
void
SelectCard
(
ClientCard
card
)
{
m_selector
=
new
CardSelector
(
card
);
...
...
Game/GameBehavior.cs
View file @
042ffe18
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Text.RegularExpressions
;
...
...
@@ -494,13 +494,12 @@ namespace WindBot.Game
int
la
=
packet
.
ReadByte
();
int
sa
=
packet
.
ReadByte
();
packet
.
ReadByte
();
//
int
cd
=
GetLocalPlayer
(
packet
.
ReadByte
()
);
// cd
packet
.
ReadByte
(
);
// cd
int
ld
=
packet
.
ReadByte
();
int
sd
=
packet
.
ReadByte
();
// sd
packet
.
ReadByte
();
// sd
packet
.
ReadByte
();
//
ClientCard
attackcard
=
_duel
.
GetCard
(
ca
,
(
CardLocation
)
la
,
sa
);
ClientCard
defendcard
=
_duel
.
GetCard
(
cd
,
(
CardLocation
)
ld
,
sd
);
_ai
.
SendBattleMsg
(
attackcard
,
defendcard
);
if
(
ld
==
0
&&
(
attackcard
!=
null
)
&&
(
ca
!=
0
))
{
_ai
.
OnDirectAttack
(
attackcard
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment