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
alstroemeria-silentlove
windbot
Commits
e7486c04
Commit
e7486c04
authored
Nov 04, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use IList if possible
parent
5e56e903
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
27 deletions
+27
-27
Game/AI/Decks/BlueEyesExecutor.cs
Game/AI/Decks/BlueEyesExecutor.cs
+7
-7
Game/AI/Decks/CyberDragonExecutor.cs
Game/AI/Decks/CyberDragonExecutor.cs
+1
-1
Game/AI/Decks/QliphortExecutor.cs
Game/AI/Decks/QliphortExecutor.cs
+2
-2
Game/AI/Decks/ST1732Executor.cs
Game/AI/Decks/ST1732Executor.cs
+3
-3
Game/AI/Decks/ToadallyAwesomeExecutor.cs
Game/AI/Decks/ToadallyAwesomeExecutor.cs
+5
-5
Game/AI/Decks/ZexalWeaponsExecutor.cs
Game/AI/Decks/ZexalWeaponsExecutor.cs
+1
-1
Game/AI/Decks/ZoodiacExecutor.cs
Game/AI/Decks/ZoodiacExecutor.cs
+1
-1
Game/ClientField.cs
Game/ClientField.cs
+7
-7
No files found.
Game/AI/Decks/BlueEyesExecutor.cs
View file @
e7486c04
...
@@ -351,7 +351,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -351,7 +351,7 @@ namespace WindBot.Game.AI.Decks
// Let Azure-Eyes spsummon first
// Let Azure-Eyes spsummon first
return
false
;
return
false
;
}
}
List
<
int
>
targets
=
new
List
<
int
>
{
IList
<
int
>
targets
=
new
[]
{
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
CardId
.
GalaxyEyesDarkMatterDragon
,
CardId
.
GalaxyEyesDarkMatterDragon
,
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
...
@@ -391,7 +391,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -391,7 +391,7 @@ namespace WindBot.Game.AI.Decks
private
bool
SageWithEyesOfBlueSummon
()
private
bool
SageWithEyesOfBlueSummon
()
{
{
return
!
Bot
.
HasInHand
(
new
List
<
int
>
return
!
Bot
.
HasInHand
(
new
[]
{
{
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfLegend
CardId
.
WhiteStoneOfLegend
...
@@ -424,11 +424,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -424,11 +424,11 @@ namespace WindBot.Game.AI.Decks
{
{
return
false
;
return
false
;
}
}
if
(!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
if
(!
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfAncients
CardId
.
WhiteStoneOfAncients
})
||
Bot
.
HasInMonstersZone
(
new
List
<
int
>
})
||
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
...
@@ -568,7 +568,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -568,7 +568,7 @@ namespace WindBot.Game.AI.Decks
private
bool
WhiteStoneSummon
()
private
bool
WhiteStoneSummon
()
{
{
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
return
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
SageWithEyesOfBlue
,
CardId
.
SageWithEyesOfBlue
,
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
...
@@ -865,7 +865,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -865,7 +865,7 @@ namespace WindBot.Game.AI.Decks
{
{
return
true
;
return
true
;
}
}
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
&&
!
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
AlternativeWhiteDragon
,
CardId
.
AlternativeWhiteDragon
,
CardId
.
WhiteDragon
,
CardId
.
WhiteDragon
,
...
@@ -978,7 +978,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -978,7 +978,7 @@ namespace WindBot.Game.AI.Decks
private
bool
CanDealWithUsedAlternativeWhiteDragon
()
private
bool
CanDealWithUsedAlternativeWhiteDragon
()
{
{
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
return
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
SageWithEyesOfBlue
,
CardId
.
SageWithEyesOfBlue
,
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfAncients
,
...
...
Game/AI/Decks/CyberDragonExecutor.cs
View file @
e7486c04
...
@@ -96,7 +96,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -96,7 +96,7 @@ namespace WindBot.Game.AI.Decks
private
bool
Capsule
()
private
bool
Capsule
()
{
{
List
<
int
>
SelectedCard
=
new
List
<
int
>();
I
List
<
int
>
SelectedCard
=
new
List
<
int
>();
SelectedCard
.
Add
(
CardId
.
PowerBond
);
SelectedCard
.
Add
(
CardId
.
PowerBond
);
SelectedCard
.
Add
(
CardId
.
DarkHole
);
SelectedCard
.
Add
(
CardId
.
DarkHole
);
SelectedCard
.
Add
(
CardId
.
Raigeki
);
SelectedCard
.
Add
(
CardId
.
Raigeki
);
...
...
Game/AI/Decks/QliphortExecutor.cs
View file @
e7486c04
...
@@ -33,12 +33,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -33,12 +33,12 @@ namespace WindBot.Game.AI.Decks
bool
CardOfDemiseUsed
=
false
;
bool
CardOfDemiseUsed
=
false
;
List
<
int
>
LowScaleCards
=
new
List
<
int
>
IList
<
int
>
LowScaleCards
=
new
[]
{
{
CardId
.
Stealth
,
CardId
.
Stealth
,
CardId
.
Carrier
CardId
.
Carrier
};
};
List
<
int
>
HighScaleCards
=
new
List
<
int
>
IList
<
int
>
HighScaleCards
=
new
[]
{
{
CardId
.
Scout
,
CardId
.
Scout
,
CardId
.
Shell
,
CardId
.
Shell
,
...
...
Game/AI/Decks/ST1732Executor.cs
View file @
e7486c04
...
@@ -212,7 +212,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -212,7 +212,7 @@ namespace WindBot.Game.AI.Decks
private
bool
MonsterRebornEffect
()
private
bool
MonsterRebornEffect
()
{
{
List
<
int
>
targets
=
new
List
<
int
>
{
IList
<
int
>
targets
=
new
[]
{
CardId
.
DecodeTalker
,
CardId
.
DecodeTalker
,
CardId
.
EncodeTalker
,
CardId
.
EncodeTalker
,
CardId
.
TriGateWizard
,
CardId
.
TriGateWizard
,
...
@@ -336,7 +336,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -336,7 +336,7 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
Card
.
Location
==
CardLocation
.
Removed
)
if
(
Card
.
Location
==
CardLocation
.
Removed
)
return
true
;
return
true
;
bool
hastarget
=
Bot
.
HasInHand
(
new
List
<
int
>
{
bool
hastarget
=
Bot
.
HasInHand
(
new
[]
{
CardId
.
Draconnet
,
CardId
.
Draconnet
,
CardId
.
Kleinant
,
CardId
.
Kleinant
,
CardId
.
BalancerLord
,
CardId
.
BalancerLord
,
...
@@ -354,7 +354,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -354,7 +354,7 @@ namespace WindBot.Game.AI.Decks
private
bool
ROMCloudiaSummon
()
private
bool
ROMCloudiaSummon
()
{
{
return
Bot
.
HasInGraveyard
(
new
List
<
int
>
{
return
Bot
.
HasInGraveyard
(
new
[]
{
CardId
.
BootStagguard
,
CardId
.
BootStagguard
,
CardId
.
BalancerLord
,
CardId
.
BalancerLord
,
CardId
.
Kleinant
,
CardId
.
Kleinant
,
...
...
Game/AI/Decks/ToadallyAwesomeExecutor.cs
View file @
e7486c04
...
@@ -124,11 +124,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -124,11 +124,11 @@ namespace WindBot.Game.AI.Decks
private
bool
MedallionOfTheIceBarrierEffect
()
private
bool
MedallionOfTheIceBarrierEffect
()
{
{
if
(
Bot
.
HasInHand
(
new
List
<
int
>
if
(
Bot
.
HasInHand
(
new
[]
{
{
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
DewdarkOfTheIceBarrier
CardId
.
DewdarkOfTheIceBarrier
})
||
Bot
.
HasInMonstersZone
(
new
List
<
int
>
})
||
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
DewdarkOfTheIceBarrier
CardId
.
DewdarkOfTheIceBarrier
...
@@ -308,7 +308,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -308,7 +308,7 @@ namespace WindBot.Game.AI.Decks
{
{
// negate effect, select a cost for it
// negate effect, select a cost for it
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
List
<
int
>
suitableCost
=
new
List
<
int
>
{
IList
<
int
>
suitableCost
=
new
[]
{
CardId
.
SwapFrog
,
CardId
.
SwapFrog
,
CardId
.
Ronintoadin
,
CardId
.
Ronintoadin
,
CardId
.
GraydleSlimeJr
,
CardId
.
GraydleSlimeJr
,
...
@@ -420,7 +420,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -420,7 +420,7 @@ namespace WindBot.Game.AI.Decks
{
{
bool
should
=
Bot
.
HasInMonstersZone
(
CardId
.
ToadallyAwesome
)
bool
should
=
Bot
.
HasInMonstersZone
(
CardId
.
ToadallyAwesome
)
&&
((
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
&&
((
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
&&
!
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
CatShark
,
CardId
.
CatShark
,
CardId
.
SkyCavalryCentaurea
CardId
.
SkyCavalryCentaurea
...
@@ -481,7 +481,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -481,7 +481,7 @@ namespace WindBot.Game.AI.Decks
return
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
return
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
&&
AI
.
Utils
.
GetBestAttack
(
Enemy
)
>
2200
&&
AI
.
Utils
.
GetBestAttack
(
Enemy
)
>
2200
&&
num
<
4
&&
num
<
4
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
&&
!
Bot
.
HasInMonstersZone
(
new
[]
{
{
CardId
.
SkyCavalryCentaurea
CardId
.
SkyCavalryCentaurea
},
true
,
true
);
},
true
,
true
);
...
...
Game/AI/Decks/ZexalWeaponsExecutor.cs
View file @
e7486c04
...
@@ -260,7 +260,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -260,7 +260,7 @@ namespace WindBot.Game.AI.Decks
private
bool
SolarWindJammer
()
private
bool
SolarWindJammer
()
{
{
if
(!
Bot
.
HasInHand
(
new
List
<
int
>
{
if
(!
Bot
.
HasInHand
(
new
[]
{
CardId
.
StarDrawing
,
CardId
.
StarDrawing
,
CardId
.
InstantFusion
CardId
.
InstantFusion
}))
}))
...
...
Game/AI/Decks/ZoodiacExecutor.cs
View file @
e7486c04
...
@@ -306,7 +306,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -306,7 +306,7 @@ namespace WindBot.Game.AI.Decks
return
true
;
return
true
;
}
}
if
(
Bot
.
HasInMonstersZone
(
CardId
.
Thoroughblade
)
&&
!
TigermortarSpsummoned
if
(
Bot
.
HasInMonstersZone
(
CardId
.
Thoroughblade
)
&&
!
TigermortarSpsummoned
&&
Bot
.
HasInGraveyard
(
new
List
<
int
>
&&
Bot
.
HasInGraveyard
(
new
[]
{
{
CardId
.
Whiptail
,
CardId
.
Whiptail
,
CardId
.
Ratpier
CardId
.
Ratpier
...
...
Game/ClientField.cs
View file @
e7486c04
...
@@ -104,7 +104,7 @@ namespace WindBot.Game
...
@@ -104,7 +104,7 @@ namespace WindBot.Game
return
HasInCards
(
Hand
,
cardId
);
return
HasInCards
(
Hand
,
cardId
);
}
}
public
bool
HasInHand
(
List
<
int
>
cardId
)
public
bool
HasInHand
(
I
List
<
int
>
cardId
)
{
{
return
HasInCards
(
Hand
,
cardId
);
return
HasInCards
(
Hand
,
cardId
);
}
}
...
@@ -114,7 +114,7 @@ namespace WindBot.Game
...
@@ -114,7 +114,7 @@ namespace WindBot.Game
return
HasInCards
(
Graveyard
,
cardId
);
return
HasInCards
(
Graveyard
,
cardId
);
}
}
public
bool
HasInGraveyard
(
List
<
int
>
cardId
)
public
bool
HasInGraveyard
(
I
List
<
int
>
cardId
)
{
{
return
HasInCards
(
Graveyard
,
cardId
);
return
HasInCards
(
Graveyard
,
cardId
);
}
}
...
@@ -124,7 +124,7 @@ namespace WindBot.Game
...
@@ -124,7 +124,7 @@ namespace WindBot.Game
return
HasInCards
(
Banished
,
cardId
);
return
HasInCards
(
Banished
,
cardId
);
}
}
public
bool
HasInBanished
(
List
<
int
>
cardId
)
public
bool
HasInBanished
(
I
List
<
int
>
cardId
)
{
{
return
HasInCards
(
Banished
,
cardId
);
return
HasInCards
(
Banished
,
cardId
);
}
}
...
@@ -134,7 +134,7 @@ namespace WindBot.Game
...
@@ -134,7 +134,7 @@ namespace WindBot.Game
return
HasInCards
(
ExtraDeck
,
cardId
);
return
HasInCards
(
ExtraDeck
,
cardId
);
}
}
public
bool
HasInExtra
(
List
<
int
>
cardId
)
public
bool
HasInExtra
(
I
List
<
int
>
cardId
)
{
{
return
HasInCards
(
ExtraDeck
,
cardId
);
return
HasInCards
(
ExtraDeck
,
cardId
);
}
}
...
@@ -166,7 +166,7 @@ namespace WindBot.Game
...
@@ -166,7 +166,7 @@ namespace WindBot.Game
return
HasInCards
(
MonsterZone
,
cardId
,
notDisabled
,
hasXyzMaterial
);
return
HasInCards
(
MonsterZone
,
cardId
,
notDisabled
,
hasXyzMaterial
);
}
}
public
bool
HasInMonstersZone
(
List
<
int
>
cardId
,
bool
notDisabled
=
false
,
bool
hasXyzMaterial
=
false
)
public
bool
HasInMonstersZone
(
I
List
<
int
>
cardId
,
bool
notDisabled
=
false
,
bool
hasXyzMaterial
=
false
)
{
{
return
HasInCards
(
MonsterZone
,
cardId
,
notDisabled
,
hasXyzMaterial
);
return
HasInCards
(
MonsterZone
,
cardId
,
notDisabled
,
hasXyzMaterial
);
}
}
...
@@ -176,7 +176,7 @@ namespace WindBot.Game
...
@@ -176,7 +176,7 @@ namespace WindBot.Game
return
HasInCards
(
SpellZone
,
cardId
,
notDisabled
);
return
HasInCards
(
SpellZone
,
cardId
,
notDisabled
);
}
}
public
bool
HasInSpellZone
(
List
<
int
>
cardId
,
bool
notDisabled
=
false
)
public
bool
HasInSpellZone
(
I
List
<
int
>
cardId
,
bool
notDisabled
=
false
)
{
{
return
HasInCards
(
SpellZone
,
cardId
,
notDisabled
);
return
HasInCards
(
SpellZone
,
cardId
,
notDisabled
);
}
}
...
@@ -264,7 +264,7 @@ namespace WindBot.Game
...
@@ -264,7 +264,7 @@ namespace WindBot.Game
return
false
;
return
false
;
}
}
private
static
bool
HasInCards
(
IEnumerable
<
ClientCard
>
cards
,
List
<
int
>
cardId
,
bool
notDisabled
=
false
,
bool
hasXyzMaterial
=
false
)
private
static
bool
HasInCards
(
IEnumerable
<
ClientCard
>
cards
,
I
List
<
int
>
cardId
,
bool
notDisabled
=
false
,
bool
hasXyzMaterial
=
false
)
{
{
foreach
(
ClientCard
card
in
cards
)
foreach
(
ClientCard
card
in
cards
)
{
{
...
...
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