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
alstroemeria-silentlove
windbot
Commits
7ccfd6b4
Commit
7ccfd6b4
authored
Sep 01, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update rainbow deck
parent
3efd5c1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
120 additions
and
7 deletions
+120
-7
Game/AI/AIFunctions.cs
Game/AI/AIFunctions.cs
+20
-0
Game/AI/Decks/RainbowExecutor.cs
Game/AI/Decks/RainbowExecutor.cs
+100
-7
No files found.
Game/AI/AIFunctions.cs
View file @
7ccfd6b4
...
...
@@ -115,6 +115,26 @@ namespace WindBot.Game.AI
return
null
;
}
public
ClientCard
GetProblematicCard
(
int
attack
=
0
)
{
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetInvincibleMonster
();
if
(
card
!=
null
)
return
card
;
card
=
Duel
.
Fields
[
1
].
SpellZone
.
GetNegateAttackSpell
();
if
(
card
!=
null
)
return
card
;
if
(
attack
==
0
)
{
int
selfBestAttack
=
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
int
oppoBestAttack
=
GetBestAttack
(
Duel
.
Fields
[
1
],
false
);
if
(
selfBestAttack
<=
oppoBestAttack
)
attack
=
oppoBestAttack
;
return
GetOneEnnemyBetterThanValue
(
oppoBestAttack
,
false
);
}
return
GetOneEnnemyBetterThanValue
(
attack
,
false
);
}
public
int
GetStringId
(
int
id
,
int
option
)
{
return
id
*
16
+
option
;
...
...
Game/AI/Decks/RainbowExecutor.cs
View file @
7ccfd6b4
...
...
@@ -89,28 +89,37 @@ namespace MycardBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
我我我枪手
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
励辉士入魔蝇王
,
励辉士入魔蝇王特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
励辉士入魔蝇王
,
励辉士入魔蝇王效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
红莲魔龙右红痕
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
红莲魔龙右红痕
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
星尘龙
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
星尘龙
,
星尘龙效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
进化帝半鸟龙
,
进化帝半鸟龙特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
进化帝半鸟龙
,
进化帝半鸟龙效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
入魔梦魇骑士
,
入魔梦魇骑士特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
入魔梦魇骑士
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
电光千鸟
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
电光千鸟
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
电光千鸟
,
电光千鸟特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
电光千鸟
,
电光千鸟效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
No37
希望织龙蜘蛛鲨
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
No37
希望织龙蜘蛛鲨
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
芙莉西亚之虫惑魔
,
芙莉西亚之虫惑魔特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
芙莉西亚之虫惑魔
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
No59
背反之料理人
,
No59
背反之料理人特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
地碎
,
地碎效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
鸟铳士卡斯泰尔
,
鸟铳士卡斯泰尔特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
鸟铳士卡斯泰尔
,
鸟铳士卡斯泰尔效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
爆龙剑士点火星日珥
,
爆龙剑士点火星日珥特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
爆龙剑士点火星日珥
,
爆龙剑士点火星日珥效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
红莲魔龙右红痕
,
红莲魔龙右红痕特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
红莲魔龙右红痕
,
红莲魔龙右红痕效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
No39
希望皇霍普
,
电光皇特殊召唤
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
闪光
No39
希望皇霍普电光皇
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
闪光
No39
希望皇霍普电光皇
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
星尘龙
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
星尘龙
,
星尘龙效果
);
AddExecutor
(
ExecutorType
.
SpSummon
,
(
int
)
CardId
.
No59
背反之料理人
,
No59
背反之料理人特殊召唤
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
星光大道
,
DefaultTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
沙尘防护罩尘埃之力
,
DefaultUniqueTrap
);
AddExecutor
(
ExecutorType
.
Activate
,
(
int
)
CardId
.
波纹防护罩波浪之力
,
DefaultUniqueTrap
);
...
...
@@ -260,6 +269,90 @@ namespace MycardBot.Game.AI.Decks
return
selfCount
<
oppoCount
;
}
private
bool
红莲魔龙右红痕特殊召唤
()
{
int
selfBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Duel
.
Fields
[
1
],
false
);
return
(
selfBestAttack
<=
oppoBestAttack
&&
oppoBestAttack
<=
3000
)
||
红莲魔龙右红痕效果
();
}
private
bool
红莲魔龙右红痕效果
()
{
int
selfCount
=
0
;
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
0
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(!
monster
.
Equals
(
Card
)
&&
monster
.
HasType
(
CardType
.
Effect
)
&&
monster
.
Attack
<=
Card
.
Attack
)
selfCount
++;
}
int
oppoCount
=
0
;
monsters
=
Duel
.
Fields
[
1
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
// 没有办法获取特殊召唤的状态,只好默认全部是特招的
if
(
monster
.
HasType
(
CardType
.
Effect
)
&&
monster
.
Attack
<=
Card
.
Attack
)
oppoCount
++;
}
return
selfCount
<=
oppoCount
||
oppoCount
>
2
;
}
private
bool
鸟铳士卡斯泰尔特殊召唤
()
{
return
AI
.
Utils
.
GetProblematicCard
()
!=
null
;
}
private
bool
鸟铳士卡斯泰尔效果
()
{
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
鸟铳士卡斯泰尔
,
0
))
return
false
;
AI
.
SelectNextCard
(
AI
.
Utils
.
GetProblematicCard
());
return
true
;
}
private
bool
爆龙剑士点火星日珥特殊召唤
()
{
return
AI
.
Utils
.
GetProblematicCard
()
!=
null
;
}
private
bool
爆龙剑士点火星日珥效果
()
{
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
爆龙剑士点火星日珥
,
1
))
return
true
;
AI
.
SelectNextCard
(
AI
.
Utils
.
GetProblematicCard
());
return
true
;
}
private
bool
电光千鸟特殊召唤
()
{
List
<
ClientCard
>
monsters
=
Duel
.
Fields
[
1
].
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
{
if
(
monster
.
IsFacedown
())
{
return
true
;
}
}
List
<
ClientCard
>
spells
=
Duel
.
Fields
[
1
].
GetSpells
();
foreach
(
ClientCard
spell
in
spells
)
{
if
(
spell
.
IsFacedown
())
{
return
true
;
}
}
return
AI
.
Utils
.
GetProblematicCard
()
!=
null
;
}
private
bool
电光千鸟效果
()
{
ClientCard
problematicCard
=
AI
.
Utils
.
GetProblematicCard
();
AI
.
SelectCard
(
problematicCard
);
return
true
;
}
private
bool
星尘龙效果
()
{
return
(
Card
.
Location
==
CardLocation
.
Grave
)
||
DefaultTrap
();
...
...
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