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
811e3d61
Commit
811e3d61
authored
Aug 17, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new master rule check
parent
a9450a78
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
8 deletions
+26
-8
Game/AI/AIFunctions.cs
Game/AI/AIFunctions.cs
+12
-0
Game/AI/Decks/QliphortExecutor.cs
Game/AI/Decks/QliphortExecutor.cs
+8
-8
Game/Duel.cs
Game/Duel.cs
+1
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+5
-0
No files found.
Game/AI/AIFunctions.cs
View file @
811e3d61
...
...
@@ -153,6 +153,18 @@ namespace WindBot.Game.AI
return
card
;
}
public
ClientCard
GetPZone
(
int
player
,
int
id
)
{
if
(
Duel
.
IsNewRule
)
{
return
Duel
.
Fields
[
player
].
SpellZone
[
id
*
4
];
}
else
{
return
Duel
.
Fields
[
player
].
SpellZone
[
6
+
id
];
}
}
public
int
GetStringId
(
int
id
,
int
option
)
{
return
id
*
16
+
option
;
...
...
Game/AI/Decks/QliphortExecutor.cs
View file @
811e3d61
...
...
@@ -221,8 +221,8 @@ namespace WindBot.Game.AI.Decks
{
if
(
Card
.
Location
==
CardLocation
.
Grave
)
{
ClientCard
l
=
Duel
.
Fields
[
0
].
SpellZone
[
6
]
;
ClientCard
r
=
Duel
.
Fields
[
0
].
SpellZone
[
7
]
;
ClientCard
l
=
AI
.
Utils
.
GetPZone
(
0
,
0
)
;
ClientCard
r
=
AI
.
Utils
.
GetPZone
(
0
,
1
)
;
if
(
l
==
null
&&
r
==
null
)
AI
.
SelectCard
((
int
)
CardId
.
机壳工具丑恶
);
}
...
...
@@ -233,8 +233,8 @@ namespace WindBot.Game.AI.Decks
{
if
(
Card
.
Location
!=
CardLocation
.
Hand
)
return
false
;
ClientCard
l
=
Duel
.
Fields
[
0
].
SpellZone
[
6
]
;
ClientCard
r
=
Duel
.
Fields
[
0
].
SpellZone
[
7
]
;
ClientCard
l
=
AI
.
Utils
.
GetPZone
(
0
,
0
)
;
ClientCard
r
=
AI
.
Utils
.
GetPZone
(
0
,
1
)
;
if
(
l
==
null
&&
r
==
null
)
return
true
;
if
(
l
==
null
&&
r
.
RScale
!=
Card
.
LScale
)
...
...
@@ -259,8 +259,8 @@ namespace WindBot.Game.AI.Decks
if
(
card
.
HasType
(
CardType
.
Pendulum
)
&&
card
.
IsFaceup
())
count
++;
}
ClientCard
l
=
Duel
.
Fields
[
0
].
SpellZone
[
6
]
;
ClientCard
r
=
Duel
.
Fields
[
0
].
SpellZone
[
7
]
;
ClientCard
l
=
AI
.
Utils
.
GetPZone
(
0
,
0
)
;
ClientCard
r
=
AI
.
Utils
.
GetPZone
(
0
,
1
)
;
if
(
l
==
null
&&
r
==
null
)
{
if
(
已发动削命
)
...
...
@@ -406,8 +406,8 @@ namespace WindBot.Game.AI.Decks
private
bool
应进行灵摆召唤
()
{
ClientCard
l
=
Duel
.
Fields
[
0
].
SpellZone
[
6
]
;
ClientCard
r
=
Duel
.
Fields
[
0
].
SpellZone
[
7
]
;
ClientCard
l
=
AI
.
Utils
.
GetPZone
(
0
,
0
)
;
ClientCard
r
=
AI
.
Utils
.
GetPZone
(
0
,
1
)
;
if
(
l
!=
null
&&
r
!=
null
&&
l
.
LScale
!=
r
.
RScale
)
{
int
count
=
0
;
...
...
Game/Duel.cs
View file @
811e3d61
...
...
@@ -6,6 +6,7 @@ namespace WindBot.Game
public
class
Duel
{
public
bool
IsFirst
{
get
;
set
;
}
public
bool
IsNewRule
{
get
;
set
;
}
public
int
[]
LifePoints
{
get
;
private
set
;
}
public
ClientField
[]
Fields
{
get
;
private
set
;
}
...
...
Game/GameBehavior.cs
View file @
811e3d61
...
...
@@ -120,6 +120,11 @@ namespace WindBot.Game
private
void
OnJoinGame
(
BinaryReader
packet
)
{
/*int lflist = (int)*/
packet
.
ReadUInt32
();
/*int rule = */
packet
.
ReadByte
();
/*int mode = */
packet
.
ReadByte
();
int
duel_rule
=
packet
.
ReadByte
();
_ai
.
Duel
.
IsNewRule
=
(
duel_rule
==
4
);
BinaryWriter
deck
=
GamePacketFactory
.
Create
(
CtosMessage
.
UpdateDeck
);
deck
.
Write
(
Deck
.
Cards
.
Count
+
Deck
.
ExtraCards
.
Count
);
deck
.
Write
(
Deck
.
SideCards
.
Count
);
...
...
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