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