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
神之吹息
windbot
Commits
06e2a2ad
Commit
06e2a2ad
authored
Oct 09, 2021
by
苍蓝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update csz
parent
7cddc1c9
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
168 additions
and
61 deletions
+168
-61
Decks/AI_Dragun.ydk
Decks/AI_Dragun.ydk
+3
-4
Decks/AI_TheLegend.ydk
Decks/AI_TheLegend.ydk
+2
-2
Game/AI/Decks/DragunExecutor.cs
Game/AI/Decks/DragunExecutor.cs
+49
-19
Game/AI/Decks/MathMechExecutor.cs
Game/AI/Decks/MathMechExecutor.cs
+31
-7
Game/AI/Decks/SaikyoBattleFlagExecutor.cs
Game/AI/Decks/SaikyoBattleFlagExecutor.cs
+33
-9
Game/AI/Decks/TheLegendExecutor.cs
Game/AI/Decks/TheLegendExecutor.cs
+50
-20
No files found.
Decks/AI_Dragun.ydk
View file @
06e2a2ad
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
120110001
120110001
120110001
120110001
120155000
120155000
1201
55000
1201
94001
120194002
120194002
120194002
120194002
120194002
120194002
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
120194003
120194003
120151010
120151010
120151010
120151010
120151010
120110009
120110009
120110009
120110009
120110009
120110009
...
@@ -26,6 +25,7 @@
...
@@ -26,6 +25,7 @@
120120017
120120017
120120017
120120017
120120017
120120017
120194004
120151023
120151023
120151023
120151023
120151023
120151023
...
@@ -41,5 +41,4 @@
...
@@ -41,5 +41,4 @@
120150019
120150019
120150019
120150019
#extra
#extra
!side
!side
\ No newline at end of file
Decks/AI_TheLegend.ydk
View file @
06e2a2ad
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
120110001
120110001
120110001
120110001
120155000
120155000
1201
55000
1201
94001
120194002
120194002
120194002
120194002
120194002
120194002
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
120194003
120194003
120151010
120151010
120151010
120151010
120151010
120110009
120110009
120110009
120110009
120110009
120110009
...
@@ -26,6 +25,7 @@
...
@@ -26,6 +25,7 @@
120120017
120120017
120120017
120120017
120120017
120120017
120194004
120151023
120151023
120151023
120151023
120151023
120151023
...
...
Game/AI/Decks/DragunExecutor.cs
View file @
06e2a2ad
...
@@ -17,6 +17,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -17,6 +17,7 @@ namespace WindBot.Game.AI.Decks
public
const
int
破坏之剑士
=
120170000
;
public
const
int
破坏之剑士
=
120170000
;
public
const
int
连击龙
=
120110001
;
public
const
int
连击龙
=
120110001
;
public
const
int
人造人
=
120155000
;
public
const
int
人造人
=
120155000
;
public
const
int
千年盾
=
120194001
;
public
const
int
血腥魔兽人
=
120194002
;
public
const
int
血腥魔兽人
=
120194002
;
public
const
int
圣精灵
=
120194003
;
public
const
int
圣精灵
=
120194003
;
...
@@ -44,22 +45,27 @@ namespace WindBot.Game.AI.Decks
...
@@ -44,22 +45,27 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
机器栗子
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
机器栗子
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
连击龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
连击龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
斗牛士
,
斗牛士
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
斗牛士
,
斗牛士
Effect
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
斗牛士
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
连击龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
连击龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
千年盾
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
机器栗子
,
栗子
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
机器栗子
,
栗子
summon
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
机器栗子
,
栗子
summon2
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
机器栗子
,
栗子
summon2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect
);
//
AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect2
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
斗牛士
,
Monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
斗牛士
,
Monsterset
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
斗牛士
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
斗牛士
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
青眼白龙
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
破坏之剑士
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
连击龙
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
人造人
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
Summon
OrSet
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
血腥魔兽人
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
血腥魔兽人
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
,
凤凰龙
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
,
凤凰龙
summon
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
圣防
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
圣防
);
...
@@ -71,15 +77,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -71,15 +77,14 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
对死者的供奉
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
对死者的供奉
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
圣精灵
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
圣精灵
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
机器栗子
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
成金恐龙王
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
成金恐龙王
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
机器栗子
);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
青眼白龙
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
青眼白龙
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
破坏之剑士
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
破坏之剑士
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
SpellSet
);
AddExecutor
(
ExecutorType
.
SpellSet
);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
...
@@ -179,8 +184,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -179,8 +184,9 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
炸甲
Effect
()
private
bool
炸甲
Effect
()
{
{
if
(
Enemy
.
BattlingMonster
.
Attack
>
1500
)
if
(
Enemy
.
BattlingMonster
.
Attack
>
1500
)
return
true
;
return
true
;
if
(
Bot
.
LifePoints
<=
Enemy
.
BattlingMonster
.
Attack
)
return
true
;
if
(!
Util
.
IsOneEnemyBetterThanValue
(
1500
,
true
)
&&
Bot
.
GetSpellCountWithoutField
()
==
3
)
return
true
;
return
false
;
return
false
;
}
}
private
bool
死苏
effect
()
private
bool
死苏
effect
()
...
@@ -191,21 +197,45 @@ namespace WindBot.Game.AI.Decks
...
@@ -191,21 +197,45 @@ namespace WindBot.Game.AI.Decks
CardId
.
连击龙
,
CardId
.
连击龙
,
CardId
.
人造人
,
CardId
.
人造人
,
};
};
if
(!
Bot
.
HasInGraveyard
(
targets
)
||
!
Enemy
.
HasInGraveyard
(
targets
))
if
(!
Bot
.
HasInGraveyard
(
targets
)
&&
!
Enemy
.
HasInGraveyard
(
targets
))
{
{
return
false
;
}
AI
.
SelectCard
(
targets
);
AI
.
SelectCard
(
targets
);
return
true
;
return
true
;
}
}
return
false
;
}
private
bool
死苏
effect2
()
private
bool
死苏
effect2
()
{
{
if
(!
Util
.
IsAllEnemyBetter
(
true
))
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()));
return
false
;
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
ClientCard
selected
=
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()).
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
ClientCard
selectedCard
=
null
;
if
(
selected
.
Attack
>=
2400
)
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
ClientCard
card
=
cards
[
i
];
if
(
card
.
Attack
<
2000
)
break
;
if
(
card
.
IsMonster
())
{
selectedCard
=
card
;
break
;
}
}
cards
=
new
List
<
ClientCard
>(
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()));
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
ClientCard
card
=
cards
[
i
];
if
(
card
.
Attack
<
2000
)
break
;
if
(
card
.
IsMonster
()
&&
card
.
HasType
(
CardType
.
Normal
)
&&
(
selectedCard
==
null
||
card
.
Attack
>
selectedCard
.
Attack
))
{
selectedCard
=
card
;
break
;
}
}
if
(
selectedCard
!=
null
)
{
{
AI
.
SelectCard
(
selected
);
AI
.
SelectCard
(
selected
Card
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -222,13 +252,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -222,13 +252,13 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
栗子
summon
()
private
bool
栗子
summon
()
{
{
if
(
Bot
.
HasInGraveyard
(
CardId
.
机器栗子
)
&&
(
Bot
.
GetMonstersInMainZone
().
Count
==
0
)
)
if
(
Bot
.
HasInGraveyard
(
CardId
.
机器栗子
)
&&
Bot
.
GetMonstersInMainZone
().
Count
==
0
)
return
true
;
return
true
;
return
false
;
return
false
;
}
}
private
bool
栗子
summon2
()
private
bool
栗子
summon2
()
{
{
if
(
Bot
.
HasInGraveyard
(
CardId
.
机器栗子
)
&&
(
Bot
.
GetMonstersInMainZone
().
Count
==
1
)
)
if
(
Bot
.
HasInGraveyard
(
CardId
.
机器栗子
)
&&
Bot
.
GetMonstersInMainZone
().
Count
==
1
)
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
...
Game/AI/Decks/MathMechExecutor.cs
View file @
06e2a2ad
...
@@ -69,6 +69,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -69,6 +69,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
双角兽
,
瞄准鹰双角兽
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
双角兽
,
瞄准鹰双角兽
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
成金恐龙王
,
瞄准鹰成金恐龙王
summon
);
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
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
钢机神
,
钢机神
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
钢机神
,
钢机神
Effect
);
...
@@ -77,7 +78,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -77,7 +78,6 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
工匠无人机
,
无人机
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
工匠无人机
,
无人机
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
工匠无人机
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
工匠无人机
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
突击坦克
,
突击坦克
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
突击坦克
,
突击坦克
summon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
旗兽
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
旗兽
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
社员
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
社员
,
DefaultMonsterSummon
);
...
@@ -267,12 +267,36 @@ namespace WindBot.Game.AI.Decks
...
@@ -267,12 +267,36 @@ namespace WindBot.Game.AI.Decks
private
bool
死苏
effect
()
private
bool
死苏
effect
()
{
{
if
(!
Util
.
IsAllEnemyBetter
(
true
))
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()));
return
false
;
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
ClientCard
selected
=
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()).
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
ClientCard
selectedCard
=
null
;
if
(
selected
.
Attack
>=
2400
)
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
ClientCard
card
=
cards
[
i
];
if
(
card
.
Attack
<
2000
)
break
;
if
(
card
.
IsMonster
())
{
{
AI
.
SelectCard
(
selected
);
selectedCard
=
card
;
break
;
}
}
cards
=
new
List
<
ClientCard
>(
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()));
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
ClientCard
card
=
cards
[
i
];
if
(
card
.
Attack
<
2000
)
break
;
if
(
card
.
IsMonster
()
&&
card
.
HasType
(
CardType
.
Normal
)
&&
(
selectedCard
==
null
||
card
.
Attack
>
selectedCard
.
Attack
))
{
selectedCard
=
card
;
break
;
}
}
if
(
selectedCard
!=
null
)
{
AI
.
SelectCard
(
selectedCard
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
...
Game/AI/Decks/SaikyoBattleFlagExecutor.cs
View file @
06e2a2ad
...
@@ -69,6 +69,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -69,6 +69,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
双角兽
,
瞄准鹰双角兽
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
双角兽
,
瞄准鹰双角兽
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
成金恐龙王
,
瞄准鹰成金恐龙王
summon
);
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
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
钢机神
,
钢机神
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
钢机神
,
钢机神
Effect
);
...
@@ -77,7 +78,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -77,7 +78,6 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
工匠无人机
,
无人机
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
工匠无人机
,
无人机
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
工匠无人机
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
工匠无人机
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
突击坦克
,
突击坦克
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
突击坦克
,
突击坦克
summon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
旗兽
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
旗兽
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
社员
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
社员
,
DefaultMonsterSummon
);
...
@@ -267,12 +267,36 @@ namespace WindBot.Game.AI.Decks
...
@@ -267,12 +267,36 @@ namespace WindBot.Game.AI.Decks
private
bool
死苏
effect
()
private
bool
死苏
effect
()
{
{
if
(!
Util
.
IsAllEnemyBetter
(
true
))
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()));
return
false
;
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
ClientCard
selected
=
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()).
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
ClientCard
selectedCard
=
null
;
if
(
selected
.
Attack
>=
2400
)
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
ClientCard
card
=
cards
[
i
];
if
(
card
.
Attack
<
2000
)
break
;
if
(
card
.
IsMonster
())
{
{
AI
.
SelectCard
(
selected
);
selectedCard
=
card
;
break
;
}
}
cards
=
new
List
<
ClientCard
>(
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()));
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
ClientCard
card
=
cards
[
i
];
if
(
card
.
Attack
<
2000
)
break
;
if
(
card
.
IsMonster
()
&&
card
.
HasType
(
CardType
.
Normal
)
&&
(
selectedCard
==
null
||
card
.
Attack
>
selectedCard
.
Attack
))
{
selectedCard
=
card
;
break
;
}
}
if
(
selectedCard
!=
null
)
{
AI
.
SelectCard
(
selectedCard
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
...
Game/AI/Decks/TheLegendExecutor.cs
View file @
06e2a2ad
...
@@ -17,6 +17,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -17,6 +17,7 @@ namespace WindBot.Game.AI.Decks
public
const
int
破坏之剑士
=
120170000
;
public
const
int
破坏之剑士
=
120170000
;
public
const
int
连击龙
=
120110001
;
public
const
int
连击龙
=
120110001
;
public
const
int
人造人
=
120155000
;
public
const
int
人造人
=
120155000
;
public
const
int
千年盾
=
120194001
;
public
const
int
血腥魔兽人
=
120194002
;
public
const
int
血腥魔兽人
=
120194002
;
public
const
int
圣精灵
=
120194003
;
public
const
int
圣精灵
=
120194003
;
...
@@ -44,22 +45,27 @@ namespace WindBot.Game.AI.Decks
...
@@ -44,22 +45,27 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
机器栗子
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
机器栗子
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
连击龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
连击龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
斗牛士
,
斗牛士
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
斗牛士
,
斗牛士
Effect
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
斗牛士
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
连击龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
连击龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
机器栗子
,
栗子
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
机器栗子
,
栗子
summon
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
机器栗子
,
栗子
summon2
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
机器栗子
,
栗子
summon2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect
);
//
AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
死苏
,
死苏
effect2
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
斗牛士
,
Monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
斗牛士
,
Monsterset
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
斗牛士
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
斗牛士
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
青眼白龙
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
破坏之剑士
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
连击龙
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
人造人
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
千年盾
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
Summon
OrSet
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
血腥魔兽人
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
血腥魔兽人
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
,
凤凰龙
summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
,
凤凰龙
summon
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
圣防
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
圣防
);
...
@@ -79,7 +85,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -79,7 +85,6 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
青眼白龙
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
青眼白龙
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
破坏之剑士
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
破坏之剑士
,
圣防
Repos
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
SpellSet
);
AddExecutor
(
ExecutorType
.
SpellSet
);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
...
@@ -179,8 +184,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -179,8 +184,9 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
炸甲
Effect
()
private
bool
炸甲
Effect
()
{
{
if
(
Enemy
.
BattlingMonster
.
Attack
>
1500
)
if
(
Enemy
.
BattlingMonster
.
Attack
>
1500
)
return
true
;
return
true
;
if
(
Bot
.
LifePoints
<=
Enemy
.
BattlingMonster
.
Attack
)
return
true
;
if
(!
Util
.
IsOneEnemyBetterThanValue
(
1500
,
true
)
&&
Bot
.
GetSpellCountWithoutField
()
==
3
)
return
true
;
return
false
;
return
false
;
}
}
private
bool
死苏
effect
()
private
bool
死苏
effect
()
...
@@ -191,21 +197,45 @@ namespace WindBot.Game.AI.Decks
...
@@ -191,21 +197,45 @@ namespace WindBot.Game.AI.Decks
CardId
.
连击龙
,
CardId
.
连击龙
,
CardId
.
人造人
,
CardId
.
人造人
,
};
};
if
(!
Bot
.
HasInGraveyard
(
targets
)
||
!
Enemy
.
HasInGraveyard
(
targets
))
if
(!
Bot
.
HasInGraveyard
(
targets
)
&&
!
Enemy
.
HasInGraveyard
(
targets
))
{
{
return
false
;
}
AI
.
SelectCard
(
targets
);
AI
.
SelectCard
(
targets
);
return
true
;
return
true
;
}
}
return
false
;
}
private
bool
死苏
effect2
()
private
bool
死苏
effect2
()
{
{
if
(!
Util
.
IsAllEnemyBetter
(
true
))
List
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()));
return
false
;
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
ClientCard
selected
=
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()).
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
ClientCard
selectedCard
=
null
;
if
(
selected
.
Attack
>=
2400
)
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
ClientCard
card
=
cards
[
i
];
if
(
card
.
Attack
<
2000
)
break
;
if
(
card
.
IsMonster
())
{
selectedCard
=
card
;
break
;
}
}
cards
=
new
List
<
ClientCard
>(
Enemy
.
Graveyard
.
GetMatchingCards
(
card
=>
card
.
IsCanRevive
()));
cards
.
Sort
(
CardContainer
.
CompareCardAttack
);
for
(
int
i
=
cards
.
Count
-
1
;
i
>=
0
;
--
i
)
{
ClientCard
card
=
cards
[
i
];
if
(
card
.
Attack
<
2000
)
break
;
if
(
card
.
IsMonster
()
&&
card
.
HasType
(
CardType
.
Normal
)
&&
(
selectedCard
==
null
||
card
.
Attack
>
selectedCard
.
Attack
))
{
selectedCard
=
card
;
break
;
}
}
if
(
selectedCard
!=
null
)
{
{
AI
.
SelectCard
(
selected
);
AI
.
SelectCard
(
selected
Card
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -222,13 +252,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -222,13 +252,13 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
栗子
summon
()
private
bool
栗子
summon
()
{
{
if
(
Bot
.
HasInGraveyard
(
CardId
.
机器栗子
)
&&
(
Bot
.
GetMonstersInMainZone
().
Count
==
0
)
)
if
(
Bot
.
HasInGraveyard
(
CardId
.
机器栗子
)
&&
Bot
.
GetMonstersInMainZone
().
Count
==
0
)
return
true
;
return
true
;
return
false
;
return
false
;
}
}
private
bool
栗子
summon2
()
private
bool
栗子
summon2
()
{
{
if
(
Bot
.
HasInGraveyard
(
CardId
.
机器栗子
)
&&
(
Bot
.
GetMonstersInMainZone
().
Count
==
1
)
)
if
(
Bot
.
HasInGraveyard
(
CardId
.
机器栗子
)
&&
Bot
.
GetMonstersInMainZone
().
Count
==
1
)
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
...
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