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
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
MyCard
windbot
Commits
04074096
Commit
04074096
authored
Mar 01, 2018
by
Momobako
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/moecube/windbot
parents
f9f72259
afa65cfc
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
693 additions
and
151 deletions
+693
-151
Decks/AI_Trickstar.ydk
Decks/AI_Trickstar.ydk
+12
-12
Game/AI/Decks/TrickstarExecutor.cs
Game/AI/Decks/TrickstarExecutor.cs
+651
-130
Game/GameAI.cs
Game/GameAI.cs
+25
-5
Game/GameBehavior.cs
Game/GameBehavior.cs
+5
-4
No files found.
Decks/AI_Trickstar.ydk
View file @
04074096
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
63845230
63845230
63845230
63845230
63845230
63845230
5133471
5133471
18144506
18144506
35261759
35261759
35261759
35261759
...
@@ -34,6 +32,8 @@
...
@@ -34,6 +32,8 @@
35371948
35371948
35371948
35371948
35371948
35371948
10813327
10813327
21076084
21076084
83555666
83555666
40605147
40605147
...
@@ -42,18 +42,18 @@
...
@@ -42,18 +42,18 @@
84749824
84749824
#extra
#extra
41999284
41999284
99111753
3987233
98558751
50588353
2857636
38342335
41999284
74997493
41999284
41999284
74997493
50588353
50588353
98558751
74997493
2857636
2857636
99111753
38342335
38342335
98978921
99111753
31833038
3987233
50588353
41999284
9753964
34408491
!side
!side
Game/AI/Decks/TrickstarExecutor.cs
View file @
04074096
This diff is collapsed.
Click to expand it.
Game/GameAI.cs
View file @
04074096
using
System.Linq
;
using
System.Linq
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
WindBot.Game.AI
;
using
WindBot.Game.AI
;
using
YGOSharp.OCGWrapper.Enums
;
using
YGOSharp.OCGWrapper.Enums
;
...
@@ -90,6 +90,8 @@ namespace WindBot.Game
...
@@ -90,6 +90,8 @@ namespace WindBot.Game
m_option
=
-
1
;
m_option
=
-
1
;
m_yesno
=
-
1
;
m_yesno
=
-
1
;
m_position
=
CardPosition
.
FaceUpAttack
;
m_position
=
CardPosition
.
FaceUpAttack
;
m_attacker
=
null
;
m_defender
=
null
;
Duel
.
LastSummonPlayer
=
-
1
;
Duel
.
LastSummonPlayer
=
-
1
;
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
Draw
)
if
(
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
Draw
)
{
{
...
@@ -167,9 +169,9 @@ namespace WindBot.Game
...
@@ -167,9 +169,9 @@ namespace WindBot.Game
{
{
const
int
HINTMSG_FMATERIAL
=
511
;
const
int
HINTMSG_FMATERIAL
=
511
;
const
int
HINTMSG_SMATERIAL
=
512
;
const
int
HINTMSG_SMATERIAL
=
512
;
const
int
HINTMSG_XMATERIAL
=
513
;
const
int
HINTMSG_XMATERIAL
=
513
;
const
int
HINTMSG_LMATERIAL
=
533
;
const
int
HINTMSG_LMATERIAL
=
533
;
const
int
HINTMSG_SPSUMMON
=
509
;
const
int
HINTMSG_SPSUMMON
=
509
;
// Check for the executor.
// Check for the executor.
IList
<
ClientCard
>
result
=
Executor
.
OnSelectCard
(
cards
,
min
,
max
,
hint
,
cancelable
);
IList
<
ClientCard
>
result
=
Executor
.
OnSelectCard
(
cards
,
min
,
max
,
hint
,
cancelable
);
...
@@ -628,9 +630,27 @@ namespace WindBot.Game
...
@@ -628,9 +630,27 @@ namespace WindBot.Game
private
int
m_number
;
private
int
m_number
;
private
int
m_announce
;
private
int
m_announce
;
private
int
m_yesno
;
private
int
m_yesno
;
private
ClientCard
m_attacker
;
private
ClientCard
m_defender
;
private
IList
<
CardAttribute
>
m_attributes
=
new
List
<
CardAttribute
>();
private
IList
<
CardAttribute
>
m_attributes
=
new
List
<
CardAttribute
>();
private
IList
<
CardRace
>
m_races
=
new
List
<
CardRace
>();
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
)
public
void
SelectCard
(
ClientCard
card
)
{
{
m_selector
=
new
CardSelector
(
card
);
m_selector
=
new
CardSelector
(
card
);
...
@@ -896,4 +916,4 @@ namespace WindBot.Game
...
@@ -896,4 +916,4 @@ namespace WindBot.Game
return
false
;
return
false
;
}
}
}
}
}
}
\ No newline at end of file
Game/GameBehavior.cs
View file @
04074096
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
...
@@ -497,12 +497,13 @@ namespace WindBot.Game
...
@@ -497,12 +497,13 @@ namespace WindBot.Game
int
la
=
packet
.
ReadByte
();
int
la
=
packet
.
ReadByte
();
int
sa
=
packet
.
ReadByte
();
int
sa
=
packet
.
ReadByte
();
packet
.
ReadByte
();
//
packet
.
ReadByte
();
//
packet
.
ReadByte
(
);
// cd
int
cd
=
GetLocalPlayer
(
packet
.
ReadByte
()
);
// cd
int
ld
=
packet
.
ReadByte
();
int
ld
=
packet
.
ReadByte
();
packet
.
ReadByte
();
// sd
int
sd
=
packet
.
ReadByte
();
// sd
packet
.
ReadByte
();
//
packet
.
ReadByte
();
//
ClientCard
attackcard
=
_duel
.
GetCard
(
ca
,
(
CardLocation
)
la
,
sa
);
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
))
if
(
ld
==
0
&&
(
attackcard
!=
null
)
&&
(
ca
!=
0
))
{
{
_ai
.
OnDirectAttack
(
attackcard
);
_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