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
86066c75
Commit
86066c75
authored
Apr 02, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update for new master rule
parent
af01d0b9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
11 deletions
+13
-11
Game/AI/AIFunctions.cs
Game/AI/AIFunctions.cs
+4
-4
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+1
-1
Game/ClientField.cs
Game/ClientField.cs
+1
-1
Game/GameBehavior.cs
Game/GameBehavior.cs
+7
-5
No files found.
Game/AI/AIFunctions.cs
View file @
86066c75
...
@@ -41,7 +41,7 @@ namespace WindBot.Game.AI
...
@@ -41,7 +41,7 @@ namespace WindBot.Game.AI
public
int
GetBestAttack
(
ClientField
field
,
bool
onlyatk
)
public
int
GetBestAttack
(
ClientField
field
,
bool
onlyatk
)
{
{
int
bestAtk
=
-
1
;
int
bestAtk
=
-
1
;
for
(
int
i
=
0
;
i
<
5
;
++
i
)
for
(
int
i
=
0
;
i
<
7
;
++
i
)
{
{
ClientCard
card
=
field
.
MonsterZone
[
i
];
ClientCard
card
=
field
.
MonsterZone
[
i
];
if
(
card
==
null
)
continue
;
if
(
card
==
null
)
continue
;
...
@@ -71,7 +71,7 @@ namespace WindBot.Game.AI
...
@@ -71,7 +71,7 @@ namespace WindBot.Game.AI
{
{
int
bestValue
=
-
1
;
int
bestValue
=
-
1
;
bool
nomonster
=
true
;
bool
nomonster
=
true
;
for
(
int
i
=
0
;
i
<
5
;
++
i
)
for
(
int
i
=
0
;
i
<
7
;
++
i
)
{
{
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
[
i
];
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
[
i
];
if
(
card
==
null
)
continue
;
if
(
card
==
null
)
continue
;
...
@@ -88,7 +88,7 @@ namespace WindBot.Game.AI
...
@@ -88,7 +88,7 @@ namespace WindBot.Game.AI
public
bool
IsAllEnnemyBetterThanValue
(
int
value
,
bool
onlyatk
)
public
bool
IsAllEnnemyBetterThanValue
(
int
value
,
bool
onlyatk
)
{
{
bool
nomonster
=
true
;
bool
nomonster
=
true
;
for
(
int
i
=
0
;
i
<
5
;
++
i
)
for
(
int
i
=
0
;
i
<
7
;
++
i
)
{
{
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
[
i
];
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
[
i
];
if
(
card
==
null
||
card
.
Data
==
null
)
continue
;
if
(
card
==
null
||
card
.
Data
==
null
)
continue
;
...
@@ -103,7 +103,7 @@ namespace WindBot.Game.AI
...
@@ -103,7 +103,7 @@ namespace WindBot.Game.AI
public
ClientCard
GetOneEnnemyBetterThanValue
(
int
value
,
bool
onlyatk
)
public
ClientCard
GetOneEnnemyBetterThanValue
(
int
value
,
bool
onlyatk
)
{
{
for
(
int
i
=
0
;
i
<
5
;
++
i
)
for
(
int
i
=
0
;
i
<
7
;
++
i
)
{
{
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
[
i
];
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
[
i
];
if
(
card
==
null
)
continue
;
if
(
card
==
null
)
continue
;
...
...
Game/AI/DefaultExecutor.cs
View file @
86066c75
...
@@ -189,7 +189,7 @@ namespace WindBot.Game.AI
...
@@ -189,7 +189,7 @@ namespace WindBot.Game.AI
return
false
;
return
false
;
}
}
int
tributecount
=
(
int
)
Math
.
Ceiling
((
Card
.
Level
-
4.0d
)
/
2.0d
);
int
tributecount
=
(
int
)
Math
.
Ceiling
((
Card
.
Level
-
4.0d
)
/
2.0d
);
for
(
int
j
=
0
;
j
<
5
;
++
j
)
for
(
int
j
=
0
;
j
<
7
;
++
j
)
{
{
ClientCard
tributeCard
=
Duel
.
Fields
[
0
].
MonsterZone
[
j
];
ClientCard
tributeCard
=
Duel
.
Fields
[
0
].
MonsterZone
[
j
];
if
(
tributeCard
==
null
)
continue
;
if
(
tributeCard
==
null
)
continue
;
...
...
Game/ClientField.cs
View file @
86066c75
...
@@ -20,7 +20,7 @@ namespace WindBot.Game
...
@@ -20,7 +20,7 @@ namespace WindBot.Game
public
void
Init
(
int
deck
,
int
extra
)
public
void
Init
(
int
deck
,
int
extra
)
{
{
Hand
=
new
List
<
ClientCard
>();
Hand
=
new
List
<
ClientCard
>();
MonsterZone
=
new
ClientCard
[
5
];
MonsterZone
=
new
ClientCard
[
7
];
SpellZone
=
new
ClientCard
[
8
];
SpellZone
=
new
ClientCard
[
8
];
Graveyard
=
new
List
<
ClientCard
>();
Graveyard
=
new
List
<
ClientCard
>();
Banished
=
new
List
<
ClientCard
>();
Banished
=
new
List
<
ClientCard
>();
...
...
Game/GameBehavior.cs
View file @
86066c75
...
@@ -844,11 +844,11 @@ namespace WindBot.Game
...
@@ -844,11 +844,11 @@ namespace WindBot.Game
bool
pendulumZone
=
false
;
bool
pendulumZone
=
false
;
int
filter
;
int
filter
;
if
((
field
&
0x
1
f
)
!=
0
)
if
((
field
&
0x
7
f
)
!=
0
)
{
{
resp
[
0
]
=
(
byte
)
GetLocalPlayer
(
0
);
resp
[
0
]
=
(
byte
)
GetLocalPlayer
(
0
);
resp
[
1
]
=
0x4
;
resp
[
1
]
=
0x4
;
filter
=
field
&
0x
1
f
;
filter
=
field
&
0x
7
f
;
}
}
else
if
((
field
&
0x1f00
)
!=
0
)
else
if
((
field
&
0x1f00
)
!=
0
)
{
{
...
@@ -863,11 +863,11 @@ namespace WindBot.Game
...
@@ -863,11 +863,11 @@ namespace WindBot.Game
filter
=
(
field
>>
14
)
&
0x3
;
filter
=
(
field
>>
14
)
&
0x3
;
pendulumZone
=
true
;
pendulumZone
=
true
;
}
}
else
if
((
field
&
0x
1
f0000
)
!=
0
)
else
if
((
field
&
0x
7
f0000
)
!=
0
)
{
{
resp
[
0
]
=
(
byte
)
GetLocalPlayer
(
1
);
resp
[
0
]
=
(
byte
)
GetLocalPlayer
(
1
);
resp
[
1
]
=
0x4
;
resp
[
1
]
=
0x4
;
filter
=
(
field
>>
16
)
&
0x
1
f
;
filter
=
(
field
>>
16
)
&
0x
7
f
;
}
}
else
if
((
field
&
0x1f000000
)
!=
0
)
else
if
((
field
&
0x1f000000
)
!=
0
)
{
{
...
@@ -885,7 +885,9 @@ namespace WindBot.Game
...
@@ -885,7 +885,9 @@ namespace WindBot.Game
if
(!
pendulumZone
)
if
(!
pendulumZone
)
{
{
if
((
filter
&
0x4
)
!=
0
)
resp
[
2
]
=
2
;
if
((
filter
&
0x40
)
!=
0
)
resp
[
2
]
=
6
;
else
if
((
filter
&
0x20
)
!=
0
)
resp
[
2
]
=
5
;
else
if
((
filter
&
0x4
)
!=
0
)
resp
[
2
]
=
2
;
else
if
((
filter
&
0x2
)
!=
0
)
resp
[
2
]
=
1
;
else
if
((
filter
&
0x2
)
!=
0
)
resp
[
2
]
=
1
;
else
if
((
filter
&
0x8
)
!=
0
)
resp
[
2
]
=
3
;
else
if
((
filter
&
0x8
)
!=
0
)
resp
[
2
]
=
3
;
else
if
((
filter
&
0x1
)
!=
0
)
resp
[
2
]
=
0
;
else
if
((
filter
&
0x1
)
!=
0
)
resp
[
2
]
=
0
;
...
...
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