Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
Windbot-408
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-408
Commits
a927ee30
Commit
a927ee30
authored
Mar 20, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update LuckyExecutor select cards
parent
e566287a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
2 deletions
+40
-2
Game/AI/Decks/LuckyExecutor.cs
Game/AI/Decks/LuckyExecutor.cs
+40
-2
No files found.
Game/AI/Decks/LuckyExecutor.cs
View file @
a927ee30
...
@@ -83,7 +83,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -83,7 +83,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
_CardId
.
ExodiaTheForbiddenOne
,
JustDontIt
);
AddExecutor
(
ExecutorType
.
Summon
,
_CardId
.
ExodiaTheForbiddenOne
,
JustDontIt
);
}
}
private
List
<
int
>
HintMsgFor
Remove
=
new
List
<
int
>
private
List
<
int
>
HintMsgFor
Enemy
=
new
List
<
int
>
{
{
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Disable
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Disable
...
@@ -94,6 +94,16 @@ namespace WindBot.Game.AI.Decks
...
@@ -94,6 +94,16 @@ namespace WindBot.Game.AI.Decks
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
Remove
,
HintMsg
.
AddToHand
,
HintMsg
.
FusionMaterial
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
Remove
,
HintMsg
.
AddToHand
,
HintMsg
.
FusionMaterial
};
};
private
List
<
int
>
HintMsgForSelf
=
new
List
<
int
>
{
HintMsg
.
Equip
};
private
List
<
int
>
HintMsgForMaterial
=
new
List
<
int
>
{
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Release
};
private
List
<
int
>
HintMsgForMaxSelect
=
new
List
<
int
>
private
List
<
int
>
HintMsgForMaxSelect
=
new
List
<
int
>
{
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
FusionMaterial
,
HintMsg
.
Destroy
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
FusionMaterial
,
HintMsg
.
Destroy
...
@@ -111,7 +121,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -111,7 +121,7 @@ namespace WindBot.Game.AI.Decks
if
(
max
>
cards
.
Count
)
if
(
max
>
cards
.
Count
)
max
=
cards
.
Count
;
max
=
cards
.
Count
;
if
(
HintMsgFor
Remove
.
Contains
(
hint
))
if
(
HintMsgFor
Enemy
.
Contains
(
hint
))
{
{
IList
<
ClientCard
>
enemyCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
1
).
ToList
();
IList
<
ClientCard
>
enemyCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
1
).
ToList
();
...
@@ -139,6 +149,34 @@ namespace WindBot.Game.AI.Decks
...
@@ -139,6 +149,34 @@ namespace WindBot.Game.AI.Decks
}
}
}
}
if
(
HintMsgForSelf
.
Contains
(
hint
))
{
IList
<
ClientCard
>
botCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
0
).
ToList
();
// select bot's card first
while
(
botCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
botCards
[
Program
.
Rand
.
Next
(
botCards
.
Count
)];
selected
.
Add
(
card
);
botCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
if
(
HintMsgForMaterial
.
Contains
(
hint
))
{
IList
<
ClientCard
>
materials
=
cards
.
OrderBy
(
card
=>
card
.
Attack
).
ToList
();
// select low attack first
while
(
materials
.
Count
>
0
&&
selected
.
Count
<
min
)
{
ClientCard
card
=
materials
[
0
];
selected
.
Add
(
card
);
materials
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
// select random cards
// select random cards
while
(
selected
.
Count
<
min
)
while
(
selected
.
Count
<
min
)
{
{
...
...
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