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
神之吹息
windbot
Commits
e7b3bf05
Commit
e7b3bf05
authored
Apr 26, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ClientCard.IsCanRevive
parent
b56e66dc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
Game/AI/Decks/DragunityExecutor.cs
Game/AI/Decks/DragunityExecutor.cs
+2
-2
Game/AI/Decks/HorusExecutor.cs
Game/AI/Decks/HorusExecutor.cs
+2
-2
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+1
-1
Game/ClientCard.cs
Game/ClientCard.cs
+10
-1
No files found.
Game/AI/Decks/DragunityExecutor.cs
View file @
e7b3bf05
...
...
@@ -253,7 +253,7 @@ namespace WindBot.Game.AI.Decks
private
bool
MonsterReborn
()
{
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
Bot
.
Graveyard
);
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
())
);
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
ClientCard
selectedCard
=
null
;
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
...
...
@@ -269,7 +269,7 @@ namespace WindBot.Game.AI.Decks
break
;
}
}
cards
=
new
List
<
ClientCard
>(
Enemy
.
Graveyard
);
cards
=
new
List
<
ClientCard
>(
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
())
);
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
...
...
Game/AI/Decks/HorusExecutor.cs
View file @
e7b3bf05
...
...
@@ -114,7 +114,7 @@ namespace WindBot.Game.AI.Decks
private
bool
MonsterReborn
()
{
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
Bot
.
Graveyard
);
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
())
);
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
ClientCard
selectedCard
=
null
;
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
...
...
@@ -128,7 +128,7 @@ namespace WindBot.Game.AI.Decks
break
;
}
}
cards
=
new
List
<
ClientCard
>(
Enemy
.
Graveyard
);
cards
=
new
List
<
ClientCard
>(
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
())
);
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
...
...
Game/AI/DefaultExecutor.cs
View file @
e7b3bf05
...
...
@@ -346,7 +346,7 @@ namespace WindBot.Game.AI
{
if
(!
Util
.
IsAllEnemyBetter
(
true
))
return
false
;
ClientCard
selected
=
Bot
.
Graveyard
.
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
ClientCard
selected
=
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()).
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
AI
.
SelectCard
(
selected
);
return
true
;
}
...
...
Game/ClientCard.cs
View file @
e7b3bf05
...
...
@@ -34,6 +34,7 @@ namespace WindBot.Game
public
int
Owner
{
get
;
private
set
;
}
public
int
Controller
{
get
;
private
set
;
}
public
int
Disabled
{
get
;
private
set
;
}
public
int
ProcCompleted
{
get
;
private
set
;
}
public
int
SelectSeq
{
get
;
set
;
}
public
int
OpParam1
{
get
;
set
;
}
public
int
OpParam2
{
get
;
set
;
}
...
...
@@ -145,7 +146,10 @@ namespace WindBot.Game
Owner
=
duel
.
GetLocalPlayer
(
packet
.
ReadInt32
());
if
((
flag
&
(
int
)
Query
.
Status
)
!=
0
)
{
int
status
=
packet
.
ReadInt32
();
Disabled
=
status
&
0x0001
;
const
int
STATUS_DISABLED
=
0x0001
;
const
int
STATUS_PROC_COMPLETE
=
0x0008
;
Disabled
=
status
&
STATUS_DISABLED
;
ProcCompleted
=
status
&
STATUS_PROC_COMPLETE
;
}
if
((
flag
&
(
int
)
Query
.
LScale
)
!=
0
)
LScale
=
packet
.
ReadInt32
();
...
...
@@ -312,6 +316,11 @@ namespace WindBot.Game
return
Disabled
!=
0
;
}
public
bool
IsCanRevive
()
{
return
ProcCompleted
!=
0
||
!(
IsExtraCard
()
||
HasType
(
CardType
.
Ritual
)
||
HasType
(
CardType
.
SpSummon
));
}
public
bool
IsCode
(
int
id
)
{
return
Id
==
id
||
Alias
!=
0
&&
Alias
==
id
;
...
...
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