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
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
// Let Azure-Eyes spsummon first
return
false
;
}
List
<
int
>
targets
=
new
List
<
int
>
{
IList
<
int
>
targets
=
new
[]
{
CardId
.
HopeHarbingerDragonTitanicGalaxy
,
CardId
.
GalaxyEyesDarkMatterDragon
,
CardId
.
AlternativeWhiteDragon
,
...
...
@@ -391,7 +391,7 @@ namespace WindBot.Game.AI.Decks
private
bool
SageWithEyesOfBlueSummon
()
{
return
!
Bot
.
HasInHand
(
new
List
<
int
>
return
!
Bot
.
HasInHand
(
new
[]
{
CardId
.
WhiteStoneOfAncients
,
CardId
.
WhiteStoneOfLegend
...
...
@@ -424,11 +424,11 @@ namespace WindBot.Game.AI.Decks
{
return
false
;
}
if
(!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
if
(!
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
WhiteStoneOfLegend
,
CardId
.
WhiteStoneOfAncients
})
||
Bot
.
HasInMonstersZone
(
new
List
<
int
>
})
||
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
AlternativeWhiteDragon
,
CardId
.
WhiteDragon
,
...
...
@@ -568,7 +568,7 @@ namespace WindBot.Game.AI.Decks
private
bool
WhiteStoneSummon
()
{
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
return
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
SageWithEyesOfBlue
,
CardId
.
WhiteStoneOfAncients
,
...
...
@@ -865,7 +865,7 @@ namespace WindBot.Game.AI.Decks
{
return
true
;
}
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
if
(
Duel
.
Phase
==
DuelPhase
.
Main1
&&
!
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
AlternativeWhiteDragon
,
CardId
.
WhiteDragon
,
...
...
@@ -978,7 +978,7 @@ namespace WindBot.Game.AI.Decks
private
bool
CanDealWithUsedAlternativeWhiteDragon
()
{
return
Bot
.
HasInMonstersZone
(
new
List
<
int
>
return
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
SageWithEyesOfBlue
,
CardId
.
WhiteStoneOfAncients
,
...
...
Game/AI/Decks/CyberDragonExecutor.cs
View file @
e7486c04
...
...
@@ -96,7 +96,7 @@ namespace WindBot.Game.AI.Decks
private
bool
Capsule
()
{
List
<
int
>
SelectedCard
=
new
List
<
int
>();
I
List
<
int
>
SelectedCard
=
new
List
<
int
>();
SelectedCard
.
Add
(
CardId
.
PowerBond
);
SelectedCard
.
Add
(
CardId
.
DarkHole
);
SelectedCard
.
Add
(
CardId
.
Raigeki
);
...
...
Game/AI/Decks/QliphortExecutor.cs
View file @
e7486c04
...
...
@@ -33,12 +33,12 @@ namespace WindBot.Game.AI.Decks
bool
CardOfDemiseUsed
=
false
;
List
<
int
>
LowScaleCards
=
new
List
<
int
>
IList
<
int
>
LowScaleCards
=
new
[]
{
CardId
.
Stealth
,
CardId
.
Carrier
};
List
<
int
>
HighScaleCards
=
new
List
<
int
>
IList
<
int
>
HighScaleCards
=
new
[]
{
CardId
.
Scout
,
CardId
.
Shell
,
...
...
Game/AI/Decks/ST1732Executor.cs
View file @
e7486c04
...
...
@@ -212,7 +212,7 @@ namespace WindBot.Game.AI.Decks
private
bool
MonsterRebornEffect
()
{
List
<
int
>
targets
=
new
List
<
int
>
{
IList
<
int
>
targets
=
new
[]
{
CardId
.
DecodeTalker
,
CardId
.
EncodeTalker
,
CardId
.
TriGateWizard
,
...
...
@@ -336,7 +336,7 @@ namespace WindBot.Game.AI.Decks
{
if
(
Card
.
Location
==
CardLocation
.
Removed
)
return
true
;
bool
hastarget
=
Bot
.
HasInHand
(
new
List
<
int
>
{
bool
hastarget
=
Bot
.
HasInHand
(
new
[]
{
CardId
.
Draconnet
,
CardId
.
Kleinant
,
CardId
.
BalancerLord
,
...
...
@@ -354,7 +354,7 @@ namespace WindBot.Game.AI.Decks
private
bool
ROMCloudiaSummon
()
{
return
Bot
.
HasInGraveyard
(
new
List
<
int
>
{
return
Bot
.
HasInGraveyard
(
new
[]
{
CardId
.
BootStagguard
,
CardId
.
BalancerLord
,
CardId
.
Kleinant
,
...
...
Game/AI/Decks/ToadallyAwesomeExecutor.cs
View file @
e7486c04
...
...
@@ -124,11 +124,11 @@ namespace WindBot.Game.AI.Decks
private
bool
MedallionOfTheIceBarrierEffect
()
{
if
(
Bot
.
HasInHand
(
new
List
<
int
>
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
DewdarkOfTheIceBarrier
})
||
Bot
.
HasInMonstersZone
(
new
List
<
int
>
})
||
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
CryomancerOfTheIceBarrier
,
CardId
.
DewdarkOfTheIceBarrier
...
...
@@ -308,7 +308,7 @@ namespace WindBot.Game.AI.Decks
{
// negate effect, select a cost for it
List
<
ClientCard
>
monsters
=
Bot
.
GetMonsters
();
List
<
int
>
suitableCost
=
new
List
<
int
>
{
IList
<
int
>
suitableCost
=
new
[]
{
CardId
.
SwapFrog
,
CardId
.
Ronintoadin
,
CardId
.
GraydleSlimeJr
,
...
...
@@ -420,7 +420,7 @@ namespace WindBot.Game.AI.Decks
{
bool
should
=
Bot
.
HasInMonstersZone
(
CardId
.
ToadallyAwesome
)
&&
((
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
&&
!
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
CatShark
,
CardId
.
SkyCavalryCentaurea
...
...
@@ -481,7 +481,7 @@ namespace WindBot.Game.AI.Decks
return
AI
.
Utils
.
IsOneEnemyBetter
(
true
)
&&
AI
.
Utils
.
GetBestAttack
(
Enemy
)
>
2200
&&
num
<
4
&&
!
Bot
.
HasInMonstersZone
(
new
List
<
int
>
&&
!
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
SkyCavalryCentaurea
},
true
,
true
);
...
...
Game/AI/Decks/ZexalWeaponsExecutor.cs
View file @
e7486c04
...
...
@@ -260,7 +260,7 @@ namespace WindBot.Game.AI.Decks
private
bool
SolarWindJammer
()
{
if
(!
Bot
.
HasInHand
(
new
List
<
int
>
{
if
(!
Bot
.
HasInHand
(
new
[]
{
CardId
.
StarDrawing
,
CardId
.
InstantFusion
}))
...
...
Game/AI/Decks/ZoodiacExecutor.cs
View file @
e7486c04
...
...
@@ -306,7 +306,7 @@ namespace WindBot.Game.AI.Decks
return
true
;
}
if
(
Bot
.
HasInMonstersZone
(
CardId
.
Thoroughblade
)
&&
!
TigermortarSpsummoned
&&
Bot
.
HasInGraveyard
(
new
List
<
int
>
&&
Bot
.
HasInGraveyard
(
new
[]
{
CardId
.
Whiptail
,
CardId
.
Ratpier
...
...
Game/ClientField.cs
View file @
e7486c04
...
...
@@ -104,7 +104,7 @@ namespace WindBot.Game
return
HasInCards
(
Hand
,
cardId
);
}
public
bool
HasInHand
(
List
<
int
>
cardId
)
public
bool
HasInHand
(
I
List
<
int
>
cardId
)
{
return
HasInCards
(
Hand
,
cardId
);
}
...
...
@@ -114,7 +114,7 @@ namespace WindBot.Game
return
HasInCards
(
Graveyard
,
cardId
);
}
public
bool
HasInGraveyard
(
List
<
int
>
cardId
)
public
bool
HasInGraveyard
(
I
List
<
int
>
cardId
)
{
return
HasInCards
(
Graveyard
,
cardId
);
}
...
...
@@ -124,7 +124,7 @@ namespace WindBot.Game
return
HasInCards
(
Banished
,
cardId
);
}
public
bool
HasInBanished
(
List
<
int
>
cardId
)
public
bool
HasInBanished
(
I
List
<
int
>
cardId
)
{
return
HasInCards
(
Banished
,
cardId
);
}
...
...
@@ -134,7 +134,7 @@ namespace WindBot.Game
return
HasInCards
(
ExtraDeck
,
cardId
);
}
public
bool
HasInExtra
(
List
<
int
>
cardId
)
public
bool
HasInExtra
(
I
List
<
int
>
cardId
)
{
return
HasInCards
(
ExtraDeck
,
cardId
);
}
...
...
@@ -166,7 +166,7 @@ namespace WindBot.Game
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
);
}
...
...
@@ -176,7 +176,7 @@ namespace WindBot.Game
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
);
}
...
...
@@ -264,7 +264,7 @@ namespace WindBot.Game
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
)
{
...
...
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