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
Tang Xinwei
windbot
Commits
9d28e904
Commit
9d28e904
authored
Apr 12, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update AI.SelectMaterials, fix EaterOfMillions
parent
296c7a5e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
16 deletions
+33
-16
Game/AI/Decks/GrenMajuThunderBoarderExecutor.cs
Game/AI/Decks/GrenMajuThunderBoarderExecutor.cs
+3
-3
Game/AI/Decks/PhantasmExecutor.cs
Game/AI/Decks/PhantasmExecutor.cs
+5
-4
Game/AI/Decks/TrickstarExecutor.cs
Game/AI/Decks/TrickstarExecutor.cs
+2
-2
Game/GameAI.cs
Game/GameAI.cs
+23
-7
No files found.
Game/AI/Decks/GrenMajuThunderBoarderExecutor.cs
View file @
9d28e904
...
...
@@ -523,7 +523,7 @@ namespace WindBot.Game.AI.Decks
targets
.
Add
(
e_c
);
if
(
targets
.
Count
>=
5
)
{
AI
.
Select
Card
(
targets
);
AI
.
Select
Materials
(
targets
,
HintMsg
.
Remove
);
/*AI.SelectCard(new[] {
CardId.BingirsuTheWorldChaliceWarrior,
CardId.TopologicTrisbaena,
...
...
@@ -548,7 +548,7 @@ namespace WindBot.Game.AI.Decks
targets
.
Add
(
s_c
);
if
(
targets
.
Count
>=
5
)
{
AI
.
Select
Card
(
targets
);
AI
.
Select
Materials
(
targets
,
HintMsg
.
Remove
);
return
true
;
}
}
...
...
Game/AI/Decks/PhantasmExecutor.cs
View file @
9d28e904
...
...
@@ -468,13 +468,13 @@ namespace WindBot.Game.AI.Decks
IList
<
ClientCard
>
material_list
=
new
List
<
ClientCard
>();
if
(
Bot
.
HasInExtra
(
CardId
.
BorreloadDragon
))
{
AI
.
Select
Card
(
AI
.
Select
Materials
(
new
[]
{
CardId
.
TopologicBomberDragon
,
CardId
.
TopologicTrisbaena
,
CardId
.
KnightmareGryphon
,
CardId
.
SummonSorceress
,
CardId
.
BorreloadDragon
);
},
HintMsg
.
Remove
);
}
else
{
...
...
@@ -483,6 +483,7 @@ namespace WindBot.Game.AI.Decks
if
(
material_list
.
Count
==
5
)
break
;
material_list
.
Add
(
m
);
}
AI
.
SelectMaterials
(
material_list
,
HintMsg
.
Remove
);
}
return
true
;
}
...
...
Game/AI/Decks/TrickstarExecutor.cs
View file @
9d28e904
...
...
@@ -709,7 +709,7 @@ namespace WindBot.Game.AI.Decks
targets
.
Add
(
e_c
);
if
(
targets
.
Count
>=
5
)
{
AI
.
Select
Card
(
targets
);
AI
.
Select
Materials
(
targets
,
HintMsg
.
Remove
);
return
true
;
}
}
...
...
@@ -719,7 +719,7 @@ namespace WindBot.Game.AI.Decks
targets
.
Add
(
s_c
);
if
(
targets
.
Count
>=
5
)
{
AI
.
Select
Card
(
targets
);
AI
.
Select
Materials
(
targets
,
HintMsg
.
Remove
);
return
true
;
}
}
...
...
Game/GameAI.cs
View file @
9d28e904
...
...
@@ -98,6 +98,7 @@ namespace WindBot.Game
m_position
.
Clear
();
m_selector_pointer
=
-
1
;
m_materialSelector
=
null
;
m_materialSelectorHint
=
0
;
m_option
=
-
1
;
m_yesno
=
-
1
;
m_announce
=
0
;
...
...
@@ -266,10 +267,18 @@ namespace WindBot.Game
}
}
else
{
if
(
m_materialSelector
!=
null
&&
hint
==
m_materialSelectorHint
)
{
//Logger.DebugWriteLine("m_materialSelector hint match");
selector
=
m_materialSelector
;
}
else
{
// Update the next selector.
selector
=
GetSelectedCards
();
}
}
// If we selected a card, use this card.
if
(
selector
!=
null
)
...
...
@@ -745,6 +754,7 @@ namespace WindBot.Game
private
CardSelector
m_materialSelector
;
private
int
m_materialSelectorHint
;
private
int
m_place
;
private
int
m_option
;
private
int
m_number
;
...
...
@@ -912,34 +922,40 @@ namespace WindBot.Game
m_selector
.
Insert
(
m_selector_pointer
,
new
CardSelector
(
loc
));
}
public
void
SelectMaterials
(
ClientCard
card
)
public
void
SelectMaterials
(
ClientCard
card
,
int
hint
=
0
)
{
m_materialSelector
=
new
CardSelector
(
card
);
m_materialSelectorHint
=
hint
;
}
public
void
SelectMaterials
(
IList
<
ClientCard
>
cards
)
public
void
SelectMaterials
(
IList
<
ClientCard
>
cards
,
int
hint
=
0
)
{
m_materialSelector
=
new
CardSelector
(
cards
);
m_materialSelectorHint
=
hint
;
}
public
void
SelectMaterials
(
int
cardId
)
public
void
SelectMaterials
(
int
cardId
,
int
hint
=
0
)
{
m_materialSelector
=
new
CardSelector
(
cardId
);
m_materialSelectorHint
=
hint
;
}
public
void
SelectMaterials
(
IList
<
int
>
ids
)
public
void
SelectMaterials
(
IList
<
int
>
ids
,
int
hint
=
0
)
{
m_materialSelector
=
new
CardSelector
(
ids
);
m_materialSelectorHint
=
hint
;
}
public
void
SelectMaterials
(
CardLocation
loc
)
public
void
SelectMaterials
(
CardLocation
loc
,
int
hint
=
0
)
{
m_materialSelector
=
new
CardSelector
(
loc
);
m_materialSelectorHint
=
hint
;
}
public
void
CleanSelectMaterials
()
{
m_materialSelector
=
null
;
m_materialSelectorHint
=
0
;
}
public
bool
HaveSelectedCards
()
...
...
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