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
03f3161a
Commit
03f3161a
authored
Oct 07, 2021
by
苍蓝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重命名
parent
1eb0cb01
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
648 additions
and
844 deletions
+648
-844
Decks/AI_Dragun.ydk
Decks/AI_Dragun.ydk
+41
-55
Decks/AI_Mathmech.ydk
Decks/AI_Mathmech.ydk
+40
-55
Decks/AI_SaikyoBattleFlag.ydk
Decks/AI_SaikyoBattleFlag.ydk
+8
-11
Game/AI/Decks/DragunExecutor.cs
Game/AI/Decks/DragunExecutor.cs
+198
-438
Game/AI/Decks/MathMechExecutor.cs
Game/AI/Decks/MathMechExecutor.cs
+359
-283
bots.json
bots.json
+2
-2
No files found.
Decks/AI_Dragun.ydk
View file @
03f3161a
#created by ...
#main
46986414
46986414
74677422
74677422
67300516
1
0802915
1
0802915
26202165
91646304
1
4558127
1
4558127
72291078
72291078
72291078
23434538
23434538
23434538
97631303
97631303
97631303
1
845204
1
845204
6172122
6172122
6172122
1
1827244
1
1827244
1
8144506
8143917
3
83764718
92353449
92353449
24224830
24224830
24224830
1
0045474
1
0045474
1
0045474
40605147
40605147
120120000
120120000
120120000
120170000
120170000
1
20110001
1
20110001
120183000
120194002
1
20194002
1
20194002
120194003
120194003
120194003
120151010
120151010
120151010
120110009
120110009
120110009
1
20170035
1
20170035
120120017
120120017
120120017
1
20151023
1
20151023
1
20151023
12018100
3
120181003
120181003
120151018
120151018
120151018
120194004
1
20194005
1
20194005
1
20150019
120150019
120150019
#extra
37818794
37818794
37818794
96334243
63519819
50588353
70369116
70369116
98978921
98978921
31226177
31226177
60303245
60303245
60303245
!side
Decks/AI_Mathmech.ydk
View file @
03f3161a
#created by ...
#main
8567955
8567955
8567955
89743495
89743495
27182739
27182739
27182739
53577438
53577438
53577438
1
636014
2
1
636014
2
1
636014
2
80965043
80965043
80965043
52354896
52354896
12
580477
1
4025912
1
4532163
1
4532163
35261759
35261759
35261759
57160136
57160136
57160136
70368879
70368879
70368879
81439173
93104632
9310463
2
8267140
41410651
3636163
3
36361633
36361633
120181011
120181011
120181011
120181001
120181001
120181001
120155015
120155015
120155015
120193002
120193002
1
2019300
2
1
2018300
2
1
2018300
2
120183024
120183024
120183030
120183030
120183030
12
0151010
1
20151010
1
20183031
1
20183031
120193003
120193003
120193003
120130039
120130039
120183054
120183054
120183054
120151023
120155060
120155060
12018306
2
120183062
120183063
12018306
3
120170061
120183064
#extra
42632209
42632209
42632209
15248594
15248594
15248594
61399402
61399402
61399402
85692042
85692042
85692042
88021907
88021907
88021907
!side
Decks/AI_SaikyoBattleFlag.ydk
View file @
03f3161a
...
...
@@ -2,34 +2,31 @@
#main
120183024
120183054
120193002
120181011
120181011
120181011
120183054
120183054
120181001
120193002
120193002
120193002
120183002
120183002
120183054
120181001
120181001
120155015
120155015
120155015
120193002
120193002
120183002
120183002
120183024
120183030
120183030
120183030
120151010
120151010
120183031
120183031
120183031
120193003
120193003
...
...
Game/AI/Decks/DragunExecutor.cs
View file @
03f3161a
using
System
;
using
YGOSharp.OCGWrapper.Enums
;
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
System.Linq
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
using
System
.Linq
;
using
System
;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"Dragun"
,
"AI_Dragun"
)]
class
DragunExecutor
:
DefaultExecutor
public
class
DragunExecutor
:
DefaultExecutor
{
public
class
CardId
{
public
const
int
DarkMagician
=
46986414
;
public
const
int
RedEyesBDragon
=
74677422
;
public
const
int
RedEyesWyvern
=
67300516
;
public
const
int
TourGuideFromTheUnderworld
=
10802915
;
public
const
int
Sangan
=
26202165
;
public
const
int
CrusadiaArboria
=
91646304
;
public
const
int
AshBlossomJoyousSpring
=
14558127
;
public
const
int
MechaPhantomBeastOLion
=
72291078
;
public
const
int
MechaPhantomBeastOLionToken
=
72291079
;
public
const
int
MaxxC
=
23434538
;
public
const
int
MagiciansSouls
=
97631303
;
public
const
int
InstantFusion
=
1845204
;
public
const
int
RedEyesFusion
=
6172122
;
public
const
int
MagicalizedFusion
=
11827244
;
public
const
int
HarpiesFeatherDuster
=
18144506
;
public
const
int
FoolishBurial
=
81439173
;
public
const
int
MonsterReborn
=
83764718
;
public
const
int
RedEyesInsight
=
92353449
;
public
const
int
CalledbyTheGrave
=
24224830
;
public
const
int
InfiniteImpermanence
=
10045474
;
public
const
int
SolemnStrike
=
40605147
;
public
const
int
DragunofRedEyes
=
37818794
;
public
const
int
SeaMonsterofTheseus
=
96334243
;
public
const
int
ThousandEyesRestrict
=
63519819
;
public
const
int
CrystronHalqifibrax
=
50588353
;
public
const
int
PredaplantVerteAnaconda
=
70369116
;
public
const
int
LinkSpider
=
98978921
;
public
const
int
ImdukTheWorldChaliceDragon
=
31226177
;
public
const
int
SalamangreatAlmiraj
=
60303245
;
public
const
int
青眼白龙
=
120120000
;
public
const
int
破坏之剑士
=
120170000
;
public
const
int
连击龙
=
120110001
;
public
const
int
电子科技翼龙
=
120183000
;
public
const
int
血腥魔兽人
=
120194002
;
public
const
int
圣精灵
=
120194003
;
public
const
int
成金恐龙王
=
120151010
;
public
const
int
机器栗子
=
120120017
;
public
const
int
斗牛士
=
120170035
;
public
const
int
凤凰龙
=
120110009
;
public
const
int
死苏
=
120194004
;
public
const
int
成金哥布林
=
120151018
;
public
const
int
强欲之壶
=
120181003
;
public
const
int
对死者的供奉
=
120151023
;
public
const
int
落穴
=
120150019
;
public
const
int
圣防
=
120198003
;
public
const
int
炸甲
=
120194005
;
}
public
DragunExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
// counter
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
AshBlossomJoyousSpring
,
DefaultAshBlossomAndJoyousSpring
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CalledbyTheGrave
,
DefaultCalledByTheGrave
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
InfiniteImpermanence
,
DefaultInfiniteImpermanence
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SolemnStrike
,
DefaultSolemnStrike
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DragunofRedEyes
,
DragunofRedEyesCounter
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MaxxC
,
DefaultMaxxC
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
HarpiesFeatherDuster
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DragunofRedEyes
,
DragunofRedEyesDestroy
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
ThousandEyesRestrict
,
ThousandEyesRestrictEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
RedEyesInsight
,
RedEyesInsightEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
RedEyesFusion
,
RedEyesFusionEffect
);
AddExecutor
(
ExecutorType
.
Repos
,
MonsterRepos
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
TourGuideFromTheUnderworld
,
TourGuideFromTheUnderworldSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
TourGuideFromTheUnderworld
,
TourGuideFromTheUnderworldEffect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
Sangan
,
SanganSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Sangan
,
SanganEffect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MechaPhantomBeastOLion
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MechaPhantomBeastOLion
,
MechaPhantomBeastOLionEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
SalamangreatAlmiraj
,
SalamangreatAlmirajSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
ImdukTheWorldChaliceDragon
,
ImdukTheWorldChaliceDragonSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
LinkSpider
,
LinkSpiderSummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
CrusadiaArboria
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
InstantFusion
,
InstantFusionEffect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
RedEyesWyvern
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
CrusadiaArboria
,
SummonForMaterial
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
AshBlossomJoyousSpring
,
SummonForMaterial
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MaxxC
,
SummonForMaterial
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
FoolishBurial
,
FoolishBurialEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MonsterReborn
,
MonsterRebornEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MagiciansSouls
,
MagiciansSoulsEffect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MagiciansSouls
,
SummonForMaterial
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
CrystronHalqifibrax
,
CrystronNeedlefiberSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CrystronHalqifibrax
,
CrystronNeedlefiberEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
PredaplantVerteAnaconda
,
PredaplantVerteAnacondaSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MagicalizedFusion
,
MagicalizedFusionEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PredaplantVerteAnaconda
,
PredaplantVerteAnacondaEffect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
InfiniteImpermanence
,
TrapSet
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
SolemnStrike
,
TrapSet
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
Sangan
);
}
private
bool
BeastOLionUsed
=
false
;
private
bool
RedEyesFusionUsed
=
false
;
public
override
bool
OnSelectHand
()
{
// go first
return
true
;
}
public
override
void
OnNewTurn
()
{
BeastOLionUsed
=
false
;
RedEyesFusionUsed
=
false
;
}
public
override
CardPosition
OnSelectPosition
(
int
cardId
,
IList
<
CardPosition
>
positions
)
{
YGOSharp
.
OCGWrapper
.
NamedCard
cardData
=
YGOSharp
.
OCGWrapper
.
NamedCard
.
Get
(
cardId
);
if
(
cardData
!=
null
)
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
强欲之壶
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
成金哥布林
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
成金恐龙王
,
成金恐龙王
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
机器栗子
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
连击龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
斗牛士
,
斗牛士
Effect
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
连击龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
电子科技翼龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
机器栗子
,
栗子
summon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect2
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
斗牛士
,
Monsterset
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
斗牛士
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
血腥魔兽人
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
,
凤凰龙
summon
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
圣防
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
落穴
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
圣防
,
圣防
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
炸甲
,
炸甲
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
对死者的供奉
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
圣精灵
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
机器栗子
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
成金恐龙王
);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
SpellSet
);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
}
private
List
<
int
>
HintMsgForEnemy
=
new
List
<
int
>
{
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Disable
};
private
List
<
int
>
HintMsgForMaxSelect
=
new
List
<
int
>
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Destroy
};
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
_cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
if
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
return
null
;
if
(
AI
.
HaveSelectedCards
())
return
null
;
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
_cards
);
if
(
max
>
cards
.
Count
)
max
=
cards
.
Count
;
if
(
HintMsgForEnemy
.
Contains
(
hint
))
{
if
(
cardData
.
Attack
<=
1000
)
return
CardPosition
.
FaceUpDefence
;
IList
<
ClientCard
>
enemyCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
1
).
ToList
();
// select enemy's card first
while
(
enemyCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
enemyCards
[
Program
.
Rand
.
Next
(
enemyCards
.
Count
)];
selected
.
Add
(
card
);
enemyCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
return
0
;
}
public
override
int
OnSelectPlace
(
int
cardId
,
int
player
,
CardLocation
location
,
int
available
)
{
if
(
location
==
CardLocation
.
MonsterZone
)
if
(
HintMsgForMaxSelect
.
Contains
(
hint
))
{
return
available
&
~
Bot
.
GetLinkedZones
();
// select max cards
while
(
selected
.
Count
<
max
)
{
ClientCard
card
=
cards
[
Program
.
Rand
.
Next
(
cards
.
Count
)];
selected
.
Add
(
card
);
cards
.
Remove
(
card
);
}
}
return
0
;
}
private
bool
DragunofRedEyesCounter
()
{
if
(
ActivateDescription
!=
-
1
&&
ActivateDescription
!=
Util
.
GetStringId
(
CardId
.
DragunofRedEyes
,
1
))
return
false
;
if
(
Duel
.
LastChainPlayer
!=
1
)
return
false
;
AI
.
SelectCard
(
new
[]
{
CardId
.
RedEyesWyvern
,
CardId
.
MechaPhantomBeastOLion
});
return
true
;
return
selected
;
}
private
bool
DragunofRedEyesDestroy
()
{
if
(
ActivateDescription
==
-
1
||
ActivateDescription
==
Util
.
GetStringId
(
CardId
.
DragunofRedEyes
,
1
))
return
false
;
AI
.
SelectCard
(
Util
.
GetBestEnemyMonster
());
return
true
;
}
private
bool
ThousandEyesRestrictEffect
()
{
AI
.
SelectCard
(
Util
.
GetBestEnemyMonster
());
return
true
;
}
private
bool
RedEyesInsightEffect
()
public
override
bool
OnSelectHand
()
{
if
(
Bot
.
HasInHand
(
CardId
.
RedEyesFusion
))
return
false
;
if
(
Bot
.
GetRemainingCount
(
CardId
.
RedEyesWyvern
,
1
)
==
0
&&
Bot
.
GetRemainingCount
(
CardId
.
RedEyesBDragon
,
2
)
==
1
&&
!
Bot
.
HasInHand
(
CardId
.
RedEyesBDragon
))
return
false
;
AI
.
SelectCard
(
CardId
.
RedEyesWyvern
);
// go first
return
true
;
}
private
bool
RedEyesFusionEffect
()
public
bool
Monsterset
()
{
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
;
if
(
Bot
.
GetRemainingCount
(
CardId
.
RedEyesBDragon
,
2
)
==
0
&&
!
Bot
.
HasInHand
(
CardId
.
RedEyesBDragon
))
return
false
;
if
(
Duel
.
Turn
==
1
)
{
return
true
;
}
AI
.
SelectMaterials
(
CardLocation
.
Deck
);
RedEyesFusionUsed
=
true
;
return
true
;
}
private
bool
TourGuideFromTheUnderworldSummon
()
{
if
(
Bot
.
GetRemainingCount
(
CardId
.
TourGuideFromTheUnderworld
,
2
)
==
0
&&
Bot
.
GetRemainingCount
(
CardId
.
Sangan
,
2
)
==
0
)
return
false
;
return
true
;
}
private
bool
TourGuideFromTheUnderworldEffect
()
{
AI
.
SelectCard
(
CardId
.
Sangan
);
return
true
;
}
private
bool
SanganSummon
()
{
return
true
;
}
private
bool
SanganEffect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
SalamangreatAlmiraj
)
&&
!
Bot
.
HasInHand
(
CardId
.
CrusadiaArboria
))
AI
.
SelectCard
(
CardId
.
CrusadiaArboria
);
else
if
(!
Bot
.
HasInHand
(
CardId
.
MaxxC
))
AI
.
SelectCard
(
CardId
.
MaxxC
);
else
if
(!
Bot
.
HasInHand
(
CardId
.
AshBlossomJoyousSpring
))
AI
.
SelectCard
(
CardId
.
AshBlossomJoyousSpring
);
else
if
(!
Bot
.
HasInHand
(
CardId
.
MagiciansSouls
))
AI
.
SelectCard
(
CardId
.
MagiciansSouls
);
else
if
(!
Bot
.
HasInHand
(
CardId
.
CrusadiaArboria
))
AI
.
SelectCard
(
CardId
.
CrusadiaArboria
);
else
AI
.
SelectCard
(
new
[]
{
CardId
.
AshBlossomJoyousSpring
,
CardId
.
MaxxC
,
CardId
.
CrusadiaArboria
});
return
true
;
}
private
bool
SalamangreatAlmirajSummon
()
{
int
[]
materials
=
new
[]
{
CardId
.
Sangan
,
CardId
.
MechaPhantomBeastOLion
};
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
IsCode
(
materials
)
&&
!
card
.
IsSpecialSummoned
)
==
0
)
return
false
;
AI
.
SelectMaterials
(
materials
);
return
true
;
}
private
bool
ImdukTheWorldChaliceDragonSummon
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
PredaplantVerteAnaconda
,
true
)
||
!
Bot
.
HasInExtra
(
CardId
.
PredaplantVerteAnaconda
))
return
false
;
if
(
Bot
.
Graveyard
.
GetMatchingCardsCount
(
card
=>
(
card
.
Race
&
(
int
)
CardRace
.
Dragon
)
>
0
)
>=
0
)
return
false
;
if
(
Bot
.
GetMonsterCount
()
==
1
&&
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<=
4
)
==
0
&&
!
Util
.
IsTurn1OrMain2
())
return
false
;
if
(
Bot
.
GetMonsterCount
()
>=
2
&&
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
8
)
>
0
)
return
false
;
return
true
;
}
private
bool
LinkSpiderSummon
()
{
if
(!
Bot
.
HasInMonstersZone
(
CardId
.
MechaPhantomBeastOLionToken
))
else
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
连击龙
,
CardId
.
青眼白龙
,
CardId
.
电子科技翼龙
,
CardId
.
破坏之剑士
,
}))
return
false
;
AI
.
SelectMaterials
(
CardId
.
MechaPhantomBeastOLionToken
);
return
true
;
}
private
bool
NeedMonster
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
PredaplantVerteAnaconda
,
true
)
||
!
Bot
.
HasInExtra
(
CardId
.
PredaplantVerteAnaconda
))
return
false
;
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
8
)
>
0
)
return
false
;
if
(
Bot
.
GetMonsterCount
()
==
0
&&
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<=
4
)
==
0
)
return
false
;
if
(
Bot
.
GetMonsterCount
()
>=
2
)
return
false
;
return
true
;
private
bool
落穴
Effect
()
{
foreach
(
ClientCard
n
in
Duel
.
LastSummonedCards
)
{
if
(
n
.
Attack
>=
1900
)
return
true
;
}
return
false
;
}
private
bool
InstantFusionEffect
()
private
bool
圣防
Effect
()
{
if
(!
NeedMonster
())
return
false
;
if
(
Enemy
.
GetMonsterCount
()
>
0
)
AI
.
SelectCard
(
CardId
.
ThousandEyesRestrict
);
else
AI
.
SelectCard
(
CardId
.
SeaMonsterofTheseus
);
return
true
;
if
(
Util
.
GetTotalAttackingMonsterAttack
(
1
)
>
1900
)
return
true
;
return
false
;
}
private
bool
SummonForMaterial
()
private
bool
炸甲
Effect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
PredaplantVerteAnaconda
,
true
)
||
!
Bot
.
HasInExtra
(
CardId
.
PredaplantVerteAnaconda
))
return
false
;
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
(
card
.
HasType
(
CardType
.
Effect
)
||
card
.
IsTuner
())
&&
card
.
Level
<
8
)
==
1
)
return
true
;
if
(
Bot
.
HasInHand
(
CardId
.
MagiciansSouls
))
return
true
;
if
(
Enemy
.
BattlingMonster
.
Attack
>
1500
)
return
true
;
return
false
;
}
private
bool
MagiciansSoulsEffect
()
private
bool
死苏
effect
()
{
if
(
Card
.
Location
==
CardLocation
.
Hand
)
{
if
(
RedEyesFusionUsed
)
return
false
;
if
(
Bot
.
GetMonsterCount
()
>=
2
)
return
false
;
AI
.
SelectOption
(
1
);
AI
.
SelectYesNo
(
true
);
return
true
;
}
else
{
int
[]
costs
=
new
[]
{
CardId
.
RedEyesInsight
,
CardId
.
RedEyesFusion
IList
<
int
>
targets
=
new
[]
{
CardId
.
青眼白龙
,
CardId
.
破坏之剑士
,
CardId
.
连击龙
,
CardId
.
电子科技翼龙
,
};
if
(
Bot
.
HasInHand
(
costs
))
{
AI
.
SelectCard
(
costs
);
return
true
;
}
return
false
;
if
(!
Bot
.
HasInGraveyard
(
targets
)
||
!
Enemy
.
HasInGraveyard
(
targets
))
{
AI
.
SelectCard
(
targets
);
return
true
;
}
return
false
;
}
private
bool
PredaplantVerteAnacondaSummon
()
private
bool
死苏
effect2
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
PredaplantVerteAnaconda
,
true
))
if
(
!
Util
.
IsAllEnemyBetter
(
true
))
return
false
;
int
[]
materials
=
new
[]
{
CardId
.
ImdukTheWorldChaliceDragon
,
CardId
.
Sangan
,
CardId
.
TourGuideFromTheUnderworld
,
CardId
.
CrusadiaArboria
,
CardId
.
MechaPhantomBeastOLion
,
CardId
.
MagiciansSouls
,
CardId
.
SalamangreatAlmiraj
,
CardId
.
LinkSpider
,
CardId
.
ThousandEyesRestrict
,
CardId
.
AshBlossomJoyousSpring
,
CardId
.
MaxxC
,
CardId
.
RedEyesWyvern
,
CardId
.
CrystronHalqifibrax
};
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
IsCode
(
materials
))
>=
2
)
ClientCard
selected
=
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()).
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
if
(
selected
.
Attack
>=
2400
)
{
AI
.
Select
Materials
(
materials
);
return
true
;
AI
.
Select
Card
(
selected
);
return
true
;
}
return
false
;
}
private
bool
MagicalizedFusionEffect
()
private
bool
成金恐龙王
Effect
()
{
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
;
if
(
Bot
.
Graveyard
.
GetMatchingCardsCount
(
card
=>
(
card
.
Race
&
(
int
)
CardRace
.
Dragon
)
>
0
)
==
0
)
return
false
;
}
AI
.
SelectMaterials
(
CardLocation
.
Grave
);
AI
.
SelectCard
(
CardId
.
成金哥布林
);
return
true
;
}
private
bool
PredaplantVerteAnacondaEffect
()
private
bool
成金恐龙王
Summon
()
{
if
(
ActivateDescription
==
Util
.
GetStringId
(
CardId
.
PredaplantVerteAnaconda
,
0
))
return
false
;
AI
.
SelectCard
(
CardId
.
RedEyesFusion
);
AI
.
SelectMaterials
(
CardLocation
.
Deck
);
return
true
;
if
(
Enemy
.
GetHandCount
()
<
1
)
return
true
;
return
false
;
}
private
bool
FoolishBurialEffect
()
private
bool
栗子
summon
()
{
if
(
RedEyesFusionUsed
)
return
false
;
if
(
Bot
.
HasInHand
(
CardId
.
MagicalizedFusion
))
{
if
(
Bot
.
HasInGraveyard
(
CardId
.
DarkMagician
)
&&
Bot
.
Graveyard
.
GetMatchingCardsCount
(
card
=>
(
card
.
Race
&
(
int
)
CardRace
.
Dragon
)
>
0
)
==
0
)
{
AI
.
SelectCard
(
new
[]
{
CardId
.
RedEyesWyvern
,
CardId
.
RedEyesBDragon
});
return
true
;
}
if
(!
Bot
.
HasInGraveyard
(
CardId
.
DarkMagician
)
&&
Bot
.
Graveyard
.
GetMatchingCardsCount
(
card
=>
(
card
.
Race
&
(
int
)
CardRace
.
Dragon
)
>
0
)
>
0
)
{
AI
.
SelectCard
(
CardId
.
DarkMagician
);
if
(
Bot
.
HasInHand
(
CardId
.
机器栗子
)
&&
(
Bot
.
GetMonstersInMainZone
().
Count
==
0
))
return
true
;
}
}
if
(!
NeedMonster
())
return
false
;
AI
.
SelectCard
(
new
[]
{
CardId
.
MechaPhantomBeastOLion
});
return
true
;
}
private
bool
MonsterRebornEffect
()
{
if
(
Bot
.
HasInGraveyard
(
CardId
.
DragunofRedEyes
))
{
AI
.
SelectCard
(
CardId
.
DragunofRedEyes
);
return
true
;
}
else
{
if
(!
NeedMonster
())
return
false
;
AI
.
SelectCard
(
new
[]
{
CardId
.
PredaplantVerteAnaconda
,
CardId
.
Sangan
,
CardId
.
ThousandEyesRestrict
,
CardId
.
MechaPhantomBeastOLion
,
CardId
.
CrusadiaArboria
,
CardId
.
AshBlossomJoyousSpring
});
return
true
;
}
return
false
;
}
private
bool
MechaPhantomBeastOLionEffect
()
private
bool
凤凰龙
summon
()
{
if
(
ActivateDescription
==
-
1
)
{
BeastOLionUsed
=
true
;
if
(
Bot
.
HasInGraveyard
(
new
[]
{
CardId
.
连击龙
,
CardId
.
青眼白龙
}))
return
true
;
}
return
!
BeastOLionUsed
;
return
false
;
}
private
bool
CrystronNeedlefiberSummon
()
private
bool
死供
Effect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
PredaplantVerteAnaconda
,
true
))
return
false
;
int
[]
materials
=
new
[]
{
CardId
.
CrusadiaArboria
,
CardId
.
MechaPhantomBeastOLion
,
CardId
.
AshBlossomJoyousSpring
,
CardId
.
SeaMonsterofTheseus
,
CardId
.
MechaPhantomBeastOLionToken
,
CardId
.
DarkMagician
,
CardId
.
ImdukTheWorldChaliceDragon
,
CardId
.
Sangan
,
CardId
.
TourGuideFromTheUnderworld
,
CardId
.
MagiciansSouls
,
CardId
.
SalamangreatAlmiraj
,
CardId
.
LinkSpider
,
CardId
.
ThousandEyesRestrict
,
CardId
.
SeaMonsterofTheseus
,
CardId
.
MaxxC
,
CardId
.
RedEyesWyvern
};
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
IsCode
(
materials
))
>=
2
)
if
(
Util
.
IsOneEnemyBetterThanValue
(
1900
,
false
))
{
AI
.
SelectMaterials
(
materials
);
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
foreach
(
ClientCard
mon
in
Enemy
.
GetMonsters
())
if
(
mon
.
Level
>=
9
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
8
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
7
)
AI
.
SelectNextCard
(
mon
);
return
true
;
}
return
false
;
}
private
bool
CrystronNeedlefiberEffect
()
private
bool
斗牛士
Effect
()
{
if
(
Duel
.
Player
==
0
)
{
AI
.
SelectCard
(
CardId
.
MechaPhantomBeastOLion
);
return
true
;
}
else
{
//if (Util.IsOneEnemyBetterThanValue(1900, false))
{
foreach
(
ClientCard
o
in
Bot
.
Graveyard
)
AI
.
SelectCard
(
o
);
if
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
()
==
null
)
AI
.
SelectNextCard
(
Enemy
.
MonsterZone
.
GetHighestAttackMonster
());
return
true
;
}
}
// return false;
}
private
bool
TrapSet
()
{
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
;
}
private
bool
MonsterRepos
()
{
if
(
Card
.
IsFacedown
())
return
true
;
return
DefaultMonsterRepos
();
}
}
}
Game/AI/Decks/MathMechExecutor.cs
View file @
03f3161a
using
System
;
using
YGOSharp.OCGWrapper.Enums
;
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
System.
Diagnostics
;
using
System.
Linq
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
using
System
.Linq
;
using
System
;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"MathMech"
,
"AI_Mathmech"
)]
public
class
Math
m
echExecutor
:
DefaultExecutor
public
class
Math
M
echExecutor
:
DefaultExecutor
{
public
class
CardId
{
public
const
int
MathmechNebla
=
53577438
;
public
const
int
MathmechSigma
=
27182739
;
public
const
int
MathmechDivision
=
89743495
;
public
const
int
MathmechAddition
=
80965043
;
public
const
int
MathmechSubtra
=
16360142
;
public
const
int
Mathmechdouble
=
52354896
;
public
const
int
MathmechFinalSigma
=
42632209
;
public
const
int
Mathmechalem
=
85692042
;
public
const
int
MathmechMagma
=
15248594
;
public
const
int
BalancerLord
=
08567955
;
public
const
int
LightDragon
=
61399402
;
public
const
int
最强战旗
=
120181001
;
public
const
int
钢机神
=
120155015
;
public
const
int
连击龙
=
120110001
;
public
const
int
恶德
=
120183024
;
public
const
int
旗兽
=
120193002
;
public
const
int
社员
=
120183002
;
// spells
public
const
int
upstartGoblin
=
70368879
;
public
const
int
raigeki
=
12580477
;
public
const
int
cynetmining
=
57160136
;
public
const
int
PotOfDesires
=
35261759
;
public
const
int
lightningStorm
=
14532163
;
public
const
int
cosmicCyclone
=
08267140
;
public
const
int
foolishBurial
=
81439173
;
public
const
int
OneTimePasscode
=
93104632
;
public
const
int
mathmechEquation
=
14025912
;
//traps
public
const
int
threanteningRoar
=
36361633
;
//tokens
public
const
int
securitytoken
=
93104633
;
public
const
int
成金恐龙王
=
120151010
;
public
const
int
突击坦克
=
120183031
;
public
const
int
工匠无人机
=
120183030
;
public
const
int
双角兽
=
120181011
;
public
const
int
瞄准鹰
=
120193003
;
public
const
int
死苏
=
120194004
;
public
const
int
世纪末兽机界
=
120130039
;
public
const
int
铁之重击
=
120183054
;
public
const
int
对死者的供奉
=
120151023
;
public
const
int
兽之拳
=
120155060
;
public
const
int
减俸
=
120183062
;
public
const
int
左迁
=
120183063
;
public
const
int
冻结
=
120183064
;
}
public
MathmechExecutor
(
GameAI
ai
,
Duel
duel
)
public
MathMechExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
raigeki
,
when_raigeki
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
upstartGoblin
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
OneTimePasscode
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
threanteningRoar
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
cosmicCyclone
,
when_cosmic
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
lightningStorm
,
lightstorm_target
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
foolishBurial
,
foolish_burial_target
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
mathmechEquation
,
mathmech_equation_target
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PotOfDesires
);
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
铁之重击
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
成金恐龙王
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
恶德
,
恶德
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Eff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
最强战旗
,
最强战旗
Eff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
突击坦克
,
突击坦克
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
瞄准鹰
,
瞄准鹰
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
双角兽
,
双角兽
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
最强战旗
,
DefaultDoubleSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
钢机神
,
DefaultDoubleSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
恶德
,
DefaultDoubleSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
最强战旗
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
钢机神
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
恶德
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MathmechNebla
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
BalancerLord
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
Mathmechdouble
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MathmechSubtra
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MathmechAddition
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MathmechDivision
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
MathmechDivision
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MathmechSigma
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
threanteningRoar
);
//xyz summons
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
Mathmechalem
,
when_Mathmechalem
);
//xyz effects
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Mathmechalem
,
mathchalenEffect
);
//Synchro
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
MathmechFinalSigma
,
FinalSigmaSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
双角兽
,
双角兽
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
瞄准鹰
,
瞄准鹰
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
瞄准鹰
,
瞄准鹰
summon2
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
瞄准鹰
,
瞄准鹰
summon3
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
双角兽
,
瞄准鹰双角兽
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
成金恐龙王
,
瞄准鹰成金恐龙王
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
突击坦克
,
瞄准鹰坦克
summon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
最强战旗
,
最强战旗
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
钢机神
,
钢机神
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
钢机神
,
钢机神
1
Effect
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
成金恐龙王
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
工匠无人机
,
无人机
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
工匠无人机
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
突击坦克
,
突击坦克
summon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Mathmechdouble
,
doubleEffect
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
旗兽
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
社员
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
工匠无人机
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
突击坦克
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
瞄准鹰
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
双角兽
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
世纪末兽机界
,
DefaultField
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
兽之拳
,
兽之拳
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
左迁
,
左迁
1
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
减俸
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
左迁
,
左迁
2
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
冻结
,
冻结
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
兽之拳
);
//normal effects
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MathmechNebla
,
NeblaEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MathmechDivision
,
divisionEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
BalancerLord
,
active_balancer
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MathmechSubtra
,
whom_subtra
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MathmechAddition
,
whom_addition
);
//spell effects
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
cynetmining
,
how_to_cynet_mine
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
MathmechMagma
,
MagmaSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MathmechFinalSigma
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MathmechMagma
);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
//function
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
SpellSet
,
DefaultSpellSet
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
铁之重击
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
死苏
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
对死者的供奉
);
}
public
override
bool
OnSelectHand
()
{
return
false
;
}
private
bool
when_cosmic
()
private
List
<
int
>
HintMsgForEnemy
=
new
List
<
int
>
{
if
(
Enemy
.
GetSpellCount
()
>
1
)
{
AI
.
SelectCard
(
Util
.
GetBestEnemySpell
());
return
true
;
}
else
{
return
false
;
}
}
private
bool
divisionEffect
()
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Disable
};
private
List
<
int
>
HintMsgForMaxSelect
=
new
List
<
int
>
{
if
(
Enemy
.
GetMonsterCount
()
>
0
)
{
AI
.
SelectCard
(
Util
.
GetBestEnemyMonster
(
canBeTarget
:
true
,
onlyFaceup
:
true
));
return
true
;
}
else
{
return
false
;
}
}
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Destroy
};
p
rivate
bool
when_raigeki
(
)
p
ublic
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
_cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
if
(
Enemy
.
GetMonsterCount
()
>
3
)
if
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
return
null
;
if
(
AI
.
HaveSelectedCards
())
return
null
;
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
_cards
);
if
(
max
>
cards
.
Count
)
max
=
cards
.
Count
;
if
(
HintMsgForEnemy
.
Contains
(
hint
))
{
return
true
;
IList
<
ClientCard
>
enemyCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
1
).
ToList
();
// select enemy's card first
while
(
enemyCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
enemyCards
[
Program
.
Rand
.
Next
(
enemyCards
.
Count
)];
selected
.
Add
(
card
);
enemyCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
else
if
(
HintMsgForMaxSelect
.
Contains
(
hint
))
{
return
false
;
}
//select max cards
while
(
selected
.
Count
<
max
)
{
ClientCard
card
=
cards
[
Program
.
Rand
.
Next
(
cards
.
Count
)];
selected
.
Add
(
card
);
cards
.
Remove
(
card
);
}
}
return
selected
;
}
p
rivate
bool
whom_addition
()
p
ublic
override
bool
OnSelectHand
()
{
AI
.
SelectCard
(
Util
.
GetBestBotMonster
(
onlyATK
:
true
));
// go first
return
true
;
}
private
bool
whom_subtra
()
bool
DoubleTribute
=
false
;
public
override
void
OnNewTurn
()
{
try
{
AI
.
SelectCard
(
Util
.
GetBestEnemyMonster
(
onlyFaceup
:
true
,
canBeTarget
:
true
));
return
true
;
}
catch
(
Exception
e
)
{
return
true
;
}
DoubleTribute
=
false
;
}
private
bool
active_balancer
()
{
if
(
Bot
.
HasInHand
(
CardId
.
MathmechNebla
))
{
AI
.
SelectCard
(
CardId
.
MathmechNebla
);
return
true
;
}
private
bool
DefaultDoubleSummon
()
{
if
(!
DoubleTribute
)
return
false
;
else
{
return
tru
e
;
}
AI
.
SelectCard
(
CardId
.
双角兽
);
DoubleTribute
=
fals
e
;
return
true
;
}
private
bool
lightstorm_targe
t
()
private
bool
左迁
1
Effec
t
()
{
if
((
Enemy
.
MonsterZone
.
ToList
().
Count
>
Enemy
.
SpellZone
.
ToList
().
Count
)
&&
Enemy
.
MonsterZone
.
ToList
().
Count
>
3
)
{
AI
.
SelectPlace
(
Zones
.
MonsterZones
);
return
true
;
}
else
if
(
Enemy
.
BattlingMonster
.
Attack
>
2000
)
{
AI
.
SelectPlace
(
Zones
.
SpellZones
);
return
true
;
AI
.
SelectCard
(
Enemy
.
BattlingMonster
);
return
true
;
}
return
false
;
}
private
bool
mathmech_equation_target
()
private
bool
左迁
2
Effect
()
{
ClientCard
target
=
Util
.
GetBestEnemyMonster
(
true
,
true
);
if
(
target
!=
null
)
AI
.
SelectCard
(
target
);
return
true
;
}
private
bool
冻结
Effect
()
{
if
(
Bot
.
HasInGraveyard
(
CardId
.
MathmechNebla
))
foreach
(
ClientCard
monster
in
Bot
.
GetMonsters
(
))
{
AI
.
SelectCard
(
CardId
.
MathmechNebla
);
return
true
;
if
(
monster
.
IsFacedown
())
{
AI
.
SelectCard
(
monster
);
return
true
;
}
else
if
(
monster
.
IsDefense
())
{
AI
.
SelectCard
(
monster
);
return
true
;
}
}
else
AI
.
SelectCard
(
Bot
.
MonsterZone
.
GetLowestAttackMonster
());
return
true
;
}
private
bool
钢机神
Effect
()
{
if
(
Duel
.
Turn
==
1
)
return
false
;
else
if
(
Enemy
.
HasAttackingMonster
()
||
Enemy
.
GetMonsterCount
()
<
1
)
AI
.
SelectCard
(
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
,
CardId
.
旗兽
,
CardId
.
突击坦克
,
CardId
.
工匠无人机
,
CardId
.
社员
,
CardId
.
双角兽
,
CardId
.
瞄准鹰
);
return
true
;
}
private
bool
钢机神
1
Effect
()
{
if
(!
Enemy
.
HasAttackingMonster
()
&&
Enemy
.
GetMonsterCount
()
>=
1
)
{
AI
.
SelectCard
((
Util
.
GetBestBotMonster
(
onlyATK
:
true
)
));
AI
.
SelectCard
(
Bot
.
Graveyard
.
GetHighestLevelMonster
(
));
return
true
;
}
return
false
;
}
private
bool
foolish_burial_target
()
private
bool
恶德
Effect
()
{
AI
.
SelectCard
(
CardId
.
MathmechNebla
);
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
AI
.
SelectNextCard
(
CardId
.
左迁
,
CardId
.
减俸
);
AI
.
SelectNextCard
(
CardId
.
左迁
,
CardId
.
减俸
);
return
true
;
}
private
bool
how_to_cynet_mine
()
private
bool
兽之拳
Effect
()
{
AI
.
SelectCard
(
Util
.
GetWorstBotMonster
());
if
(!
Bot
.
HasInHandOrInMonstersZoneOrInGraveyard
(
CardId
.
MathmechSigma
))
{
AI
.
SelectNextCard
(
CardId
.
MathmechSigma
);
if
(
Enemy
.
BattlingMonster
.
Race
==
(
int
)
CardRace
.
Dragon
)
return
true
;
}
return
true
;
if
(
Enemy
.
BattlingMonster
.
Race
==
(
int
)
CardRace
.
Fairy
)
return
true
;
if
(
Enemy
.
BattlingMonster
.
Race
==
(
int
)
CardRace
.
SpellCaster
)
return
true
;
return
false
;
}
private
bool
when_Mathmechalem
()
private
bool
死苏
effect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
MathmechNebla
)){
if
(
!
Util
.
IsAllEnemyBetter
(
true
))
return
false
;
}
else
if
(
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
Mathmechdouble
))
{
return
false
;
}
else
if
(
Bot
.
HasInMonstersZone
(
CardId
.
Mathmechalem
))
{
return
false
;
}
else
ClientCard
selected
=
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()).
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
if
(
selected
.
Attack
>=
2400
)
{
return
true
;
AI
.
SelectCard
(
selected
);
return
true
;
}
return
false
;
}
private
bool
FinalSigma
Summon
()
private
bool
成金恐龙王
Summon
()
{
if
(
Duel
.
Turn
<
1
)
{
return
false
;
}
if
((
Bot
.
HasInMonstersZone
(
CardId
.
Mathmechdouble
)
&&
((
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
))
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechNebla
))))
{
AI
.
SelectPosition
(
CardPosition
.
Attack
);
try
{
AI
.
SelectPlace
(
Zones
.
ExtraMonsterZones
);
}
catch
{
}
if
(
Enemy
.
GetHandCount
()
<
1
)
return
true
;
return
false
;
}
private
bool
死供
Effect
()
{
if
(
Util
.
IsOneEnemyBetterThanValue
(
1900
,
false
))
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
foreach
(
ClientCard
mon
in
Enemy
.
GetMonsters
())
if
(
mon
.
Level
>=
9
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
8
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
7
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
5
)
AI
.
SelectNextCard
(
mon
);
return
true
;
}
else
{
return
false
;
}
private
bool
死供
Eff
()
{
if
(
Util
.
IsOneEnemyBetterThanValue
(
2600
,
false
))
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
foreach
(
ClientCard
mon
in
Enemy
.
GetMonsters
())
if
(
mon
.
Level
>=
8
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
7
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
5
)
AI
.
SelectNextCard
(
mon
);
return
true
;
}
return
false
;
}
private
bool
NeblaEffect
()
private
bool
突击坦克
Effect
()
{
foreach
(
ClientCard
mon
in
Enemy
.
GetMonsters
())
if
(
mon
.
Level
>=
9
)
AI
.
SelectCard
(
mon
);
else
if
(
mon
.
Level
>=
8
)
AI
.
SelectCard
(
mon
);
else
if
(
mon
.
Level
>=
6
)
AI
.
SelectCard
(
mon
);
else
if
(
mon
.
Level
>=
4
)
AI
.
SelectCard
(
mon
);
else
if
(
mon
.
Level
>=
2
)
AI
.
SelectCard
(
mon
);
else
if
(
mon
.
Level
>=
1
)
AI
.
SelectCard
(
mon
);
return
true
;
}
private
bool
突击坦克
summon
()
{
bool
a
=
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSubtra
)
||
Bot
.
HasInMonstersZone
(
CardId
.
securitytoken
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechAddition
)
||
Bot
.
HasInMonstersZone
(
CardId
.
Mathmechalem
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechDivision
);
if
(
a
)
{
List
<
int
>
cards
=
new
List
<
int
>();
cards
.
Add
(
CardId
.
MathmechSigma
);
cards
.
Add
(
CardId
.
MathmechSubtra
);
cards
.
Add
(
CardId
.
MathmechAddition
);
cards
.
Add
(
item
:
CardId
.
MathmechDivision
);
cards
.
Add
(
item
:
CardId
.
Mathmechalem
);
cards
.
Add
(
CardId
.
securitytoken
);
int
u
=
0
;
List
<
ClientCard
>
monsters
=
Bot
.
GetMonstersInMainZone
();
for
(
int
i
=
0
;
i
<
monsters
.
Count
;
i
++)
{
if
(
cards
.
Contains
(
monsters
[
i
].
Id
))
{
u
=
monsters
[
i
].
Id
;
break
;
}
else
{
u
=
CardId
.
securitytoken
;
}
}
AI
.
SelectCard
(
CardId
.
securitytoken
);
AI
.
SelectNextCard
(
CardId
.
Mathmechdouble
);
return
true
;
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
(
card
.
Race
&
(
int
)
CardRace
.
Machine
)
>
0
)
==
2
)
return
true
;
return
false
;
}
}
if
(
Card
.
Location
==
CardLocation
.
Grave
)
{
private
bool
双角兽
summon
()
{
if
(
Bot
.
Graveyard
.
GetMatchingCardsCount
(
card
=>
(
card
.
Race
&
(
int
)
CardRace
.
Machine
)
>
0
)
>=
3
&&
Bot
.
HasInHand
(
new
[]
{
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
}))
return
true
;
}
else
{
return
false
;
}
return
false
;
}
private
bool
double
Effect
()
private
bool
双角兽
Effect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
MathmechNebla
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
))
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
}))
{
AI
.
SelectCard
(
CardId
.
瞄准鹰
,
CardId
.
双角兽
,
CardId
.
工匠无人机
,
CardId
.
突击坦克
,
CardId
.
社员
,
CardId
.
旗兽
,
CardId
.
恶德
,
CardId
.
钢机神
,
CardId
.
最强战旗
);
DoubleTribute
=
true
;
return
true
;
};
if
(
Card
.
Location
==
CardLocation
.
Grave
)
{
return
true
;
}
else
{
return
false
;
}
}
private
bool
mathchalenEffect
()
return
false
;
}
private
bool
瞄准鹰双角兽
summon
()
{
if
(
Duel
.
Turn
<
1
)
{
return
false
;
}
if
(
(
Bot
.
HasInHandOrInGraveyard
(
CardId
.
MathmechNebla
)
&&
!
Bot
.
HasInMonstersZone
(
CardId
.
MathmechNebla
))
&&
(
Card
.
Location
==
CardLocation
.
FieldZone
&&
Card
.
HasXyzMaterial
(
0
))
)
{
AI
.
SelectCard
(
CardId
.
Mathmechalem
);
AI
.
SelectNextCard
(
CardId
.
MathmechNebla
);
return
true
;
}
if
(
Bot
.
HasInHandOrInGraveyard
(
CardId
.
Mathmechdouble
)
&&
(
Bot
.
HasInMonstersZone
(
CardId
.
MathmechNebla
)
||
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
))
&&
Card
.
Location
==
CardLocation
.
FieldZone
&&
Card
.
HasXyzMaterial
(
0
))
{
AI
.
SelectCard
(
CardId
.
Mathmechalem
);
AI
.
SelectNextCard
(
CardId
.
Mathmechdouble
);
if
(
Bot
.
HasInMonstersZone
(
CardId
.
瞄准鹰
)
&&
Bot
.
HasInHand
(
new
[]
{
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
}))
return
true
;
}
if
(!
Bot
.
HasInHandOrInGraveyard
(
CardId
.
MathmechNebla
)
&&
Card
.
HasXyzMaterial
(
2
))
{
AI
.
SelectCard
(
CardId
.
MathmechNebla
);
AI
.
SelectThirdCard
(
CardId
.
MathmechNebla
);
return
false
;
}
private
bool
瞄准鹰坦克
summon
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
瞄准鹰
)
&&
Bot
.
HasInHand
(
new
[]
{
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
}))
return
true
;
}
if
(!
Bot
.
HasInHandOrInGraveyard
(
CardId
.
MathmechSigma
)
&&
Card
.
HasXyzMaterial
(
2
))
{
AI
.
SelectCard
(
CardId
.
MathmechSigma
);
AI
.
SelectThirdCard
(
CardId
.
MathmechSigma
);
return
false
;
}
private
bool
瞄准鹰成金恐龙王
summon
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
瞄准鹰
)
&&
Bot
.
HasInHand
(
new
[]
{
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
}))
return
true
;
}
else
{
return
false
;
};
return
false
;
}
private
bool
MagmaSummon
()
private
bool
瞄准鹰
summon
()
{
foreach
(
ClientCard
m
in
Bot
.
GetMonsters
())
if
(
m
.
HasAttribute
(
CardAttribute
.
Light
)
&&
m
.
Level
<=
4
&&
m
.
IsFaceup
())
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
}))
if
(
Enemy
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
7
)
>
0
)
return
true
;
return
false
;
}
private
bool
瞄准鹰
summon2
()
{
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
瞄准鹰
)
>=
2
)
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
}))
if
(
Enemy
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
7
)
>
0
)
return
true
;
return
false
;
}
private
bool
瞄准鹰
summon3
()
{
if
(
Bot
.
HasInHand
(
CardId
.
双角兽
)
||
Bot
.
HasInHand
(
CardId
.
突击坦克
)
||
Bot
.
HasInHand
(
CardId
.
成金恐龙王
))
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
}))
if
(
Enemy
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>=
7
)
>
0
)
return
true
;
return
false
;
}
private
bool
瞄准鹰
Effect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
MathmechNebla
))
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<=
4
&&
card
.
IsFaceup
())
>=
2
&&
Bot
.
HasInHand
(
new
[]
{
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
,
CardId
.
旗兽
,
CardId
.
社员
}))
{
return
false
;
AI
.
SelectCard
(
CardId
.
瞄准鹰
,
CardId
.
突击坦克
,
CardId
.
成金恐龙王
,
CardId
.
社员
,
CardId
.
旗兽
);
AI
.
SelectNextCard
(
CardId
.
瞄准鹰
,
CardId
.
突击坦克
,
CardId
.
成金恐龙王
,
CardId
.
社员
,
CardId
.
旗兽
);
AI
.
SelectThirdCard
(
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
,
CardId
.
旗兽
,
CardId
.
社员
);
return
true
;
}
return
false
;
}
private
bool
无人机
Effect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
MathmechSigma
)
&&
Bot
.
HasInMonstersZone
(
CardId
.
Mathmechdouble
)
)
if
(
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<
5
)+
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<
5
))
<=
2
)
{
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>
5
)
>
2
)
AI
.
SelectCard
(
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
);
else
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>
5
)
==
1
&&
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<
5
)
+
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<
5
))
==
1
)
{
AI
.
SelectCard
(
CardId
.
最强战旗
,
CardId
.
钢机神
,
CardId
.
恶德
);
return
true
;
}
return
false
;
}
else
{
AI
.
SelectCard
(
CardId
.
瞄准鹰
,
CardId
.
突击坦克
,
CardId
.
工匠无人机
,
CardId
.
社员
,
CardId
.
旗兽
);
return
true
;
}
}
public
override
int
OnSelectPlace
(
int
cardId
,
int
player
,
CardLocation
location
,
int
available
)
private
bool
最强战旗
Effect
()
{
if
(
Util
.
IsOneEnemyBetterThanValue
(
1900
,
false
))
{
if
(
cardId
==
CardId
.
MathmechFinalSigma
)
{
if
((
Zones
.
z5
&
available
)
>
0
)
return
Zones
.
z5
;
if
((
Zones
.
z6
&
available
)
>
0
)
return
Zones
.
z6
;
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
)
;
foreach
(
ClientCard
mon
in
Enemy
.
GetMonsters
())
if
(
mon
.
Level
>=
9
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
8
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
7
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
5
)
AI
.
SelectNextCard
(
mon
);
return
true
;
}
return
false
;
}
private
bool
最强战旗
Eff
()
{
if
(
Util
.
IsOneEnemyBetterThanValue
(
2500
,
false
))
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
foreach
(
ClientCard
mon
in
Enemy
.
GetMonsters
())
if
(
mon
.
Level
>=
9
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
8
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
7
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
5
)
AI
.
SelectNextCard
(
mon
);
return
true
;
}
return
base
.
OnSelectPlace
(
cardId
,
player
,
location
,
available
)
;
return
false
;
}
}
}
}
\ No newline at end of file
bots.json
View file @
03f3161a
...
...
@@ -18,13 +18,13 @@
},
{
"name"
:
"最强战旗"
,
"deck"
:
"
SaikyoBattleFlag
"
,
"deck"
:
"
MathMech
"
,
"dialog"
:
"rd-d"
,
"hidden"
:
true
},
{
"name"
:
"传说子"
,
"deck"
:
"
TheLegend
"
,
"deck"
:
"
Dragun
"
,
"dialog"
:
"rd"
,
"hidden"
:
true
}
...
...
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