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
05925209
Commit
05925209
authored
Jan 05, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/IceYGO/windbot
parents
096bd7ed
eab7b31c
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
57 additions
and
19 deletions
+57
-19
Game/AI/CardExtension.cs
Game/AI/CardExtension.cs
+2
-1
Game/AI/Decks/DragunExecutor.cs
Game/AI/Decks/DragunExecutor.cs
+14
-5
Game/AI/Decks/Level8Executor.cs
Game/AI/Decks/Level8Executor.cs
+6
-1
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
+8
-2
Game/AI/Decks/OrcustExecutor.cs
Game/AI/Decks/OrcustExecutor.cs
+6
-1
Game/AI/Decks/SalamangreatExecutor.cs
Game/AI/Decks/SalamangreatExecutor.cs
+1
-0
Game/AI/Decks/ToadallyAwesomeExecutor.cs
Game/AI/Decks/ToadallyAwesomeExecutor.cs
+1
-1
Game/AI/Decks/ZoodiacExecutor.cs
Game/AI/Decks/ZoodiacExecutor.cs
+1
-1
Game/AI/Enums/FusionSpell.cs
Game/AI/Enums/FusionSpell.cs
+1
-0
Game/AI/Enums/ShouldNotBeTarget.cs
Game/AI/Enums/ShouldNotBeTarget.cs
+3
-1
Game/ClientCard.cs
Game/ClientCard.cs
+5
-0
Game/ClientField.cs
Game/ClientField.cs
+5
-4
README.md
README.md
+4
-2
No files found.
Game/AI/CardExtension.cs
View file @
05925209
using
System
;
using
WindBot.Game.AI.Enums
;
using
YGOSharp.OCGWrapper.Enums
;
namespace
WindBot.Game.AI
{
...
...
@@ -34,7 +35,7 @@ namespace WindBot.Game.AI
/// </summary>
public
static
bool
IsShouldNotBeTarget
(
this
ClientCard
card
)
{
return
!
card
.
IsDisabled
()
&&
Enum
.
IsDefined
(
typeof
(
ShouldNotBeTarget
),
card
.
Id
);
return
!
card
.
IsDisabled
()
&&
!
card
.
HasType
(
CardType
.
Normal
)
&&
Enum
.
IsDefined
(
typeof
(
ShouldNotBeTarget
),
card
.
Id
);
}
/// <summary>
...
...
Game/AI/Decks/DragunExecutor.cs
View file @
05925209
...
...
@@ -184,7 +184,7 @@ namespace WindBot.Game.AI.Decks
private
bool
RedEyesFusionEffect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
DragunofRedEyes
))
if
(
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
DragunofRedEyes
,
CardId
.
RedEyesBDragon
}
))
{
// you don't want to use DragunofRedEyes which is treated as RedEyesBDragon as fusion material
if
(
Util
.
GetBotAvailZonesFromExtraDeck
()
==
0
)
return
false
;
...
...
@@ -319,7 +319,15 @@ namespace WindBot.Game.AI.Decks
}
else
{
// TODO
int
[]
costs
=
new
[]
{
CardId
.
RedEyesInsight
,
CardId
.
RedEyesFusion
};
if
(
Bot
.
HasInHand
(
costs
))
{
AI
.
SelectCard
(
costs
);
return
true
;
}
return
false
;
}
}
...
...
@@ -354,7 +362,7 @@ namespace WindBot.Game.AI.Decks
private
bool
MagicalizedFusionEffect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
DragunofRedEyes
))
if
(
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
DragunofRedEyes
,
CardId
.
RedEyesBDragon
}
))
{
// you don't want to use DragunofRedEyes which is treated as RedEyesBDragon as fusion material
if
(
Util
.
GetBotAvailZonesFromExtraDeck
()
==
0
)
return
false
;
...
...
@@ -367,6 +375,8 @@ namespace WindBot.Game.AI.Decks
private
bool
PredaplantVerteAnacondaEffect
()
{
if
(
ActivateDescription
==
Util
.
GetStringId
(
CardId
.
PredaplantVerteAnaconda
,
0
))
return
false
;
AI
.
SelectCard
(
CardId
.
RedEyesFusion
);
AI
.
SelectMaterials
(
CardLocation
.
Deck
);
return
true
;
...
...
@@ -450,7 +460,6 @@ namespace WindBot.Game.AI.Decks
CardId
.
AshBlossomJoyousSpring
,
CardId
.
SeaMonsterofTheseus
,
CardId
.
MechaPhantomBeastOLionToken
,
CardId
.
RedEyesBDragon
,
CardId
.
DarkMagician
,
CardId
.
ImdukTheWorldChaliceDragon
,
CardId
.
Sangan
,
...
...
@@ -486,7 +495,7 @@ namespace WindBot.Game.AI.Decks
private
bool
TrapSet
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
DragunofRedEyes
)
&&
Bot
.
GetHandCount
()
==
1
)
if
(
Bot
.
HasInMonstersZone
(
new
[]
{
CardId
.
DragunofRedEyes
,
CardId
.
RedEyesBDragon
}
)
&&
Bot
.
GetHandCount
()
==
1
)
return
false
;
AI
.
SelectPlace
(
Zones
.
z0
+
Zones
.
z1
+
Zones
.
z3
+
Zones
.
z4
);
return
true
;
...
...
Game/AI/Decks/Level8Executor.cs
View file @
05925209
...
...
@@ -184,6 +184,7 @@ namespace WindBot.Game.AI.Decks
private
bool
JetSynchronUsed
=
false
;
private
bool
ScrapWyvernUsed
=
false
;
private
bool
MaskedChameleonUsed
=
false
;
private
int
ShootingRiserDragonCount
=
0
;
private
int
[]
HandCosts
=
new
[]
{
...
...
@@ -217,6 +218,7 @@ namespace WindBot.Game.AI.Decks
JetSynchronUsed
=
false
;
ScrapWyvernUsed
=
false
;
MaskedChameleonUsed
=
false
;
ShootingRiserDragonCount
=
0
;
}
public
override
void
OnChainEnd
()
...
...
@@ -843,12 +845,15 @@ namespace WindBot.Game.AI.Decks
}
else
{
if
(
Duel
.
LastChainPlayer
==
0
||
ShootingRiserDragonCount
>=
10
)
return
false
;
ShootingRiserDragonCount
++;
AI
.
SelectCard
(
new
[]
{
CardId
.
BlackRoseMoonlightDragon
,
CardId
.
ScrapDragon
,
CardId
.
PSYFramelordOmega
});
return
Duel
.
LastChainPlayer
!=
0
;
return
true
;
}
}
...
...
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
View file @
05925209
...
...
@@ -106,7 +106,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Lumina
,
Luminaeff
);
//activate
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
GlowUpBulb
,
GlowUpBulbeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
TG_WonderMagician
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
TG_WonderMagician
,
TG_WonderMagicianeff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CoralDragon
,
CoralDragoneff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
RedWyvern
,
RedWyverneff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CrystalWingSynchroDragon
,
CrystalWingSynchroDragoneff
);
...
...
@@ -230,6 +230,7 @@ namespace WindBot.Game.AI.Decks
}
int
Ultimate_ss
=
0
;
int
Enemy_atk
=
0
;
int
TG_WonderMagician_count
=
0
;
bool
Pillused
=
false
;
bool
CrystronNeedlefibereff_used
=
false
;
bool
OvertexCoatlseff_used
=
false
;
...
...
@@ -274,6 +275,7 @@ namespace WindBot.Game.AI.Decks
ShaddollSquamata_used
=
false
;
ShaddollDragon_used
=
false
;
ShaddollHedgehog_used
=
false
;
TG_WonderMagician_count
=
0
;
}
private
bool
Luminasummon
()
...
...
@@ -572,7 +574,11 @@ namespace WindBot.Game.AI.Decks
return
false
;
}
private
bool
TG_WonderMagicianeff
()
{
TG_WonderMagician_count
++;
return
TG_WonderMagician_count
<=
10
;
}
private
bool
AllureofDarkness
()
{
IList
<
ClientCard
>
materials
=
Bot
.
Hand
;
...
...
Game/AI/Decks/OrcustExecutor.cs
View file @
05925209
...
...
@@ -181,6 +181,7 @@ namespace WindBot.Game.AI.Decks
private
bool
CymbalSkeletonUsed
=
false
;
private
bool
BorrelswordDragonUsed
=
false
;
private
ClientCard
RustyBardicheTarget
=
null
;
private
int
ShootingRiserDragonCount
=
0
;
private
int
[]
HandCosts
=
new
[]
{
...
...
@@ -214,6 +215,7 @@ namespace WindBot.Game.AI.Decks
CymbalSkeletonUsed
=
false
;
BorrelswordDragonUsed
=
false
;
RustyBardicheTarget
=
null
;
ShootingRiserDragonCount
=
0
;
}
public
override
void
OnChainEnd
()
...
...
@@ -609,7 +611,10 @@ namespace WindBot.Game.AI.Decks
}
else
{
return
Duel
.
LastChainPlayer
!=
0
;
if
(
Duel
.
LastChainPlayer
==
0
)
return
false
;
ShootingRiserDragonCount
++;
return
ShootingRiserDragonCount
<=
10
;
}
}
...
...
Game/AI/Decks/SalamangreatExecutor.cs
View file @
05925209
...
...
@@ -1096,6 +1096,7 @@ namespace WindBot.Game.AI.Decks
{
if
(
Duel
.
Phase
!=
DuelPhase
.
Main1
)
return
false
;
if
(
Duel
.
Turn
==
1
)
return
false
;
if
(
wasStallioActivated
)
return
false
;
List
<
ClientCard
>
material_list
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
bot_monster
=
Bot
.
GetMonsters
();
...
...
Game/AI/Decks/ToadallyAwesomeExecutor.cs
View file @
05925209
...
...
@@ -6,7 +6,7 @@ using WindBot.Game.AI;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"Toadally Awesome"
,
"AI_ToadallyAwesome"
,
"OutDated"
)]
[
Deck
(
"Toadally Awesome"
,
"AI_ToadallyAwesome"
)]
public
class
ToadallyAwesomeExecutor
:
DefaultExecutor
{
public
class
CardId
...
...
Game/AI/Decks/ZoodiacExecutor.cs
View file @
05925209
...
...
@@ -6,7 +6,7 @@ using WindBot.Game.AI;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"Zoodiac"
,
"AI_Zoodiac"
,
"OutDated"
)]
[
Deck
(
"Zoodiac"
,
"AI_Zoodiac"
)]
class
ZoodiacExecutor
:
DefaultExecutor
{
public
class
CardId
...
...
Game/AI/Enums/FusionSpell.cs
View file @
05925209
...
...
@@ -54,5 +54,6 @@
PyroxeneFusion
=
55824220
,
FragmentFusion
=
72029628
,
NecroFusion
=
81223446
,
PredaplantVerteAnaconda
=
70369116
,
}
}
Game/AI/Enums/ShouldNotBeTarget.cs
View file @
05925209
...
...
@@ -46,6 +46,8 @@
RaidraptorUltimateFalcon
=
86221741
,
DisdainfulBirdofParadise
=
27240101
,
DarkestDiabolosLordOfTheLair
=
50383626
,
Blackwing_FullArmoredWing
=
54082269
Blackwing_FullArmoredWing
=
54082269
,
DragunofRedEyes
=
37818794
,
RedEyesBDragon
=
74677422
,
// sometimes the name of DragunofRedEyes will be changed to RedEyesBDragon
}
}
Game/ClientCard.cs
View file @
05925209
...
...
@@ -336,6 +336,11 @@ namespace WindBot.Game
return
ids
.
Contains
(
Id
)
||
Alias
!=
0
&&
ids
.
Contains
(
Alias
);
}
public
bool
IsOriginalCode
(
int
id
)
{
return
Id
==
id
||
Alias
-
Id
<
10
&&
Alias
==
id
;
}
public
bool
HasXyzMaterial
()
{
return
Overlays
.
Count
>
0
;
...
...
Game/ClientField.cs
View file @
05925209
...
...
@@ -306,10 +306,11 @@ namespace WindBot.Game
public
int
GetRemainingCount
(
int
cardId
,
int
initialCount
)
{
int
remaining
=
initialCount
;
remaining
=
remaining
-
Hand
.
Count
(
card
=>
card
!=
null
&&
card
.
IsCode
(
cardId
));
remaining
=
remaining
-
SpellZone
.
Count
(
card
=>
card
!=
null
&&
card
.
IsCode
(
cardId
));
remaining
=
remaining
-
Graveyard
.
Count
(
card
=>
card
!=
null
&&
card
.
IsCode
(
cardId
));
remaining
=
remaining
-
Banished
.
Count
(
card
=>
card
!=
null
&&
card
.
IsCode
(
cardId
));
remaining
=
remaining
-
Hand
.
Count
(
card
=>
card
!=
null
&&
card
.
IsOriginalCode
(
cardId
));
remaining
=
remaining
-
SpellZone
.
Count
(
card
=>
card
!=
null
&&
card
.
IsOriginalCode
(
cardId
));
remaining
=
remaining
-
MonsterZone
.
Count
(
card
=>
card
!=
null
&&
card
.
IsOriginalCode
(
cardId
));
remaining
=
remaining
-
Graveyard
.
Count
(
card
=>
card
!=
null
&&
card
.
IsOriginalCode
(
cardId
));
remaining
=
remaining
-
Banished
.
Count
(
card
=>
card
!=
null
&&
card
.
IsOriginalCode
(
cardId
));
return
(
remaining
<
0
)
?
0
:
remaining
;
}
...
...
README.md
View file @
05925209
...
...
@@ -75,6 +75,8 @@ WindBot can run as a "server", provide a http interface to create bot.
*
DarkMagician
*
Dragun
*
Dragunity
*
GrenMajuThunderBoarder
...
...
@@ -99,7 +101,7 @@ WindBot can run as a "server", provide a http interface to create bot.
*
ST1732
*
Toadally Awesome
(old lflist, master rule 3 only)
*
Toadally Awesome
*
Trickstar
...
...
@@ -107,7 +109,7 @@ WindBot can run as a "server", provide a http interface to create bot.
*
Zexal Weapons
*
Zoodiac
(old lflist, master rule 3 only)
*
Zoodiac
### Unfinished decks
...
...
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