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
60b24dd7
Commit
60b24dd7
authored
Oct 27, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix link summon rule
parent
87379695
Pipeline
#30750
passed with stage
in 36 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+14
-7
No files found.
Game/AI/DefaultExecutor.cs
View file @
60b24dd7
...
@@ -255,16 +255,23 @@ namespace WindBot.Game.AI
...
@@ -255,16 +255,23 @@ namespace WindBot.Game.AI
SetFuncFilter
(
ExecutorType
.
SpSummon
,()
=>
{
SetFuncFilter
(
ExecutorType
.
SpSummon
,()
=>
{
if
(
Card
.
HasType
(
CardType
.
Link
))
//链接怪兽特殊召唤前过滤
if
(
Card
.
HasType
(
CardType
.
Link
))
//链接怪兽特殊召唤前过滤
{
{
List
<
ClientCard
>
cards
=
Bot
.
GetMonsters
();
List
<
ClientCard
>
materialList
=
Bot
.
GetMonsters
().
Where
(
card
=>
List
<
ClientCard
>
noLinkCards
=
Bot
.
GetMonsters
().
Where
(
card
=>
card
!=
null
&&
card
.
IsFaceup
()
&&
Card
.
Attack
<
3000
card
==
null
||
card
.
IsFacedown
()
||
card
.
Level
>=
8
||
card
.
LinkCount
>=
4
||
&&
((!
Card
.
HasType
(
CardType
.
Xyz
|
CardType
.
Link
)
&&
Card
.
Level
<
8
)
card
.
Rank
>=
8
||
card
.
Attack
>=
3000
).
ToList
();
||
Card
.
HasType
(
CardType
.
Xyz
)
&&
Card
.
Rank
<
8
foreach
(
var
card
in
noLinkCards
)
cards
.
Remove
(
card
);
||
Card
.
HasType
(
CardType
.
Link
)
&&
Card
.
LinkCount
<
4
)
).
OrderBy
(
card
=>
card
.
Attack
).
ToList
();
int
link_count
=
0
;
int
link_count
=
0
;
foreach
(
var
card
in
cards
)
int
totalAttack
=
0
;
foreach
(
var
card
in
materialList
)
{
{
link_count
+=
(
card
.
HasType
(
CardType
.
Link
))
?
card
.
LinkCount
:
1
;
link_count
+=
(
card
.
HasType
(
CardType
.
Link
))
?
card
.
LinkCount
:
1
;
if
(
link_count
>=
Card
.
LinkCount
)
return
true
;
totalAttack
+=
card
.
Attack
;
if
(
link_count
>=
Card
.
LinkCount
)
{
return
totalAttack
<=
Card
.
Attack
;
}
}
}
}
}
return
false
;
return
false
;
...
...
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