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
f7366b40
Commit
f7366b40
authored
Aug 07, 2024
by
wind2009
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream'
parents
fc1f021c
4c4c5c66
Pipeline
#28976
passed with stages
in 4 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
Game/AI/CardContainer.cs
Game/AI/CardContainer.cs
+8
-4
Game/AI/Decks/SuperheavySamuraiExecutor.cs
Game/AI/Decks/SuperheavySamuraiExecutor.cs
+1
-0
No files found.
Game/AI/CardContainer.cs
View file @
f7366b40
...
@@ -55,28 +55,32 @@ namespace WindBot.Game.AI
...
@@ -55,28 +55,32 @@ namespace WindBot.Game.AI
{
{
return
cards
return
cards
.
Where
(
card
=>
card
?.
Data
!=
null
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
&&
!(
canBeTarget
&&
card
.
IsShouldNotBeTarget
()))
.
Where
(
card
=>
card
?.
Data
!=
null
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
&&
!(
canBeTarget
&&
card
.
IsShouldNotBeTarget
()))
.
OrderBy
(
card
=>
card
.
Attack
).
FirstOrDefault
();
.
OrderByDescending
(
card
=>
card
.
Attack
)
.
FirstOrDefault
();
}
}
public
static
ClientCard
GetHighestDefenseMonster
(
this
IEnumerable
<
ClientCard
>
cards
,
bool
canBeTarget
=
false
)
public
static
ClientCard
GetHighestDefenseMonster
(
this
IEnumerable
<
ClientCard
>
cards
,
bool
canBeTarget
=
false
)
{
{
return
cards
return
cards
.
Where
(
card
=>
card
?.
Data
!=
null
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
&&
!(
canBeTarget
&&
card
.
IsShouldNotBeTarget
()))
.
Where
(
card
=>
card
?.
Data
!=
null
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
&&
!(
canBeTarget
&&
card
.
IsShouldNotBeTarget
()))
.
OrderBy
(
card
=>
card
.
Defense
).
FirstOrDefault
();
.
OrderByDescending
(
card
=>
card
.
Defense
)
.
FirstOrDefault
();
}
}
public
static
ClientCard
GetLowestAttackMonster
(
this
IEnumerable
<
ClientCard
>
cards
,
bool
canBeTarget
=
false
)
public
static
ClientCard
GetLowestAttackMonster
(
this
IEnumerable
<
ClientCard
>
cards
,
bool
canBeTarget
=
false
)
{
{
return
cards
return
cards
.
Where
(
card
=>
card
?.
Data
!=
null
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
&&
!(
canBeTarget
&&
card
.
IsShouldNotBeTarget
()))
.
Where
(
card
=>
card
?.
Data
!=
null
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
&&
!(
canBeTarget
&&
card
.
IsShouldNotBeTarget
()))
.
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
.
OrderBy
(
card
=>
card
.
Attack
)
.
FirstOrDefault
();
}
}
public
static
ClientCard
GetLowestDefenseMonster
(
this
IEnumerable
<
ClientCard
>
cards
,
bool
canBeTarget
=
false
)
public
static
ClientCard
GetLowestDefenseMonster
(
this
IEnumerable
<
ClientCard
>
cards
,
bool
canBeTarget
=
false
)
{
{
return
cards
return
cards
.
Where
(
card
=>
card
?.
Data
!=
null
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
&&
!(
canBeTarget
&&
card
.
IsShouldNotBeTarget
()))
.
Where
(
card
=>
card
?.
Data
!=
null
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
&&
!(
canBeTarget
&&
card
.
IsShouldNotBeTarget
()))
.
OrderByDescending
(
card
=>
card
.
Defense
).
FirstOrDefault
();
.
OrderBy
(
card
=>
card
.
Defense
)
.
FirstOrDefault
();
}
}
public
static
bool
ContainsMonsterWithLevel
(
this
IEnumerable
<
ClientCard
>
cards
,
int
level
)
public
static
bool
ContainsMonsterWithLevel
(
this
IEnumerable
<
ClientCard
>
cards
,
int
level
)
...
...
Game/AI/Decks/SuperheavySamuraiExecutor.cs
View file @
f7366b40
...
@@ -212,6 +212,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -212,6 +212,7 @@ namespace WindBot.Game.AI.Decks
activate_Genius
=
false
;
activate_Genius
=
false
;
activate_Sarutobi
=
false
;
activate_Sarutobi
=
false
;
to_deck
=
false
;
to_deck
=
false
;
base
.
OnNewTurn
();
}
}
public
override
bool
OnSelectHand
()
public
override
bool
OnSelectHand
()
{
{
...
...
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