Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
windbot
Commits
917e0372
Commit
917e0372
authored
Sep 27, 2021
by
苍蓝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
4f4e4008
Pipeline
#5889
passed with stage
in 36 seconds
Changes
12
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
632 additions
and
18 deletions
+632
-18
BotWrapper/bot.conf
BotWrapper/bot.conf
+6
-1
Decks/AI_SaikyoBattleFlag.ydk
Decks/AI_SaikyoBattleFlag.ydk
+49
-0
Decks/AI_TheLegend.ydk
Decks/AI_TheLegend.ydk
+1
-1
Dialogs/rd1.json
Dialogs/rd1.json
+75
-0
Game/AI/AIUtil.cs
Game/AI/AIUtil.cs
+2
-1
Game/AI/CardContainer.cs
Game/AI/CardContainer.cs
+5
-0
Game/AI/Decks/MokeyMokeyExecutor.cs
Game/AI/Decks/MokeyMokeyExecutor.cs
+31
-5
Game/AI/Decks/MokeyMokeyKingExecutor.cs
Game/AI/Decks/MokeyMokeyKingExecutor.cs
+31
-6
Game/AI/Decks/SaikyoBattleFlagExecutor.cs
Game/AI/Decks/SaikyoBattleFlagExecutor.cs
+420
-0
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+2
-1
WindBot.csproj
WindBot.csproj
+2
-0
bots.json
bots.json
+8
-3
No files found.
BotWrapper/bot.conf
View file @
917e0372
...
...
@@ -5,7 +5,7 @@
# flags (avail flags: SUPPORT_MASTER_RULE_3, SUPPORT_NEW_MASTER_RULE, SUPPORT_MASTER_RULE_2020)
!齿车戒龙
Name
=齿车戒龙
Deck
=
MokeyMokey
Dialog
=
zh
-
CN
Name
=齿车戒龙
Deck
=
MokeyMokey
Dialog
=
rd1
龙法卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
...
...
@@ -19,6 +19,11 @@ Name=大恐龙驾 Deck=DinocarriageDynarmix Dialog=zh-CN
恐龙卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!最强战旗
Name
=最强战旗
Deck
=
SaikyoBattleFlag
Dialog
=
zh
-
CN
机械卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!传说子
Name
=传说子
Deck
=
TheLegend
Dialog
=
rd
大量传说卡堆成的卡组。
...
...
Decks/AI_SaikyoBattleFlag.ydk
0 → 100644
View file @
917e0372
#created by ...
#main
120183024
120183024
120183031
120183031
120183054
120183054
120181001
120181001
120181001
120155015
120155015
120155015
120193002
120193002
120193002
120183002
120183002
120183031
120183030
120183030
120183030
120151010
120181011
120181011
120181011
120193003
120193003
120193003
120130039
120130039
120183054
120151023
120155060
120155060
120183062
120183062
120183063
120183063
120183063
120183064
#extra
!side
Decks/AI_TheLegend.ydk
View file @
917e0372
...
...
@@ -2,11 +2,11 @@
#main
120120000
120120000
120120000
120170000
120170000
120110001
120110001
120110001
120183000
120194002
120194002
...
...
Dialogs/rd1.json
0 → 100644
View file @
917e0372
{
"welcome"
:
[
"你要注意,你的对手是史上最强的决斗者。"
,
"我已经预料到你下一步的行动了"
],
"deckerror"
:
[
"抱歉,我的卡组里的{0}的数量似乎出了问题。"
],
"duelstart"
:
[
"演出时间到!"
,
"我要用决斗带来笑容!"
],
"newturn"
:
[
"看好了,我华丽的抽卡!"
,
"看我的魔术抽卡!"
,
"我将手牌补满五张"
],
"endturn"
:
[
"哼,慢慢挣扎吧"
,
"完美的谢幕。"
,
"看来,演出轮到你的环节。"
],
"directattack"
:
[
"{0},让对手看看你完美的直接攻击!"
,
"{0},让对手生命的微弱烛光熄灭吧"
,
"看来你即将失去一切。{0},攻击!"
,
"熄灭吧!熄灭吧!人生不过是行走的影子。{0},直接攻击!"
,
"{0},让谢幕变得更完美些吧"
,
"{0},用你的魔术偷走对手的生命"
,
"{0},嚯嚯嚯,华丽的直接攻击"
,
"{0},让对手感受绝望!"
,
"我的搭档{0}的直接攻击表演!"
,
"来让大家看看你的绝活吧,{0}!"
,
"啊,我们破坏了对手的防御。{0},攻击!"
],
"attack"
:
[
"{0},和{1}对手戏!"
,
"{0}和{1}将要来一场骑士决斗!"
,
"{0},观众们在期待你和{1}的厮杀!"
,
"{0},用戏法把{1}变没吧"
,
"{0},让{1}看看真正强者的演出手段!"
],
"ondirectattack"
:
[
"不,我的道具!我的戏法!……"
,
"{0}这种二流竟然……啊!"
,
"我完美的把戏竟然被拆穿了?!"
],
"facedownmonstername"
:
"怪兽"
,
"activate"
:
[
"这是{0}最擅长的把戏。"
,
"去吧{0},让对手看看你的魔法。"
,
"哈哈,{0}是完美的魔术师。"
],
"summon"
:
[
"{0}的出场"
,
"来吧!来吧,{0}!"
,
"看看{0}卖力的演出!"
,
"你看到了{0}的出场吗?"
,
"我呼唤{0}参加演出!"
,
"让大家看看你的出场秀,{0}。"
,
"我给大家介绍——{0}。"
],
"setmonster"
:
[
"这只怪兽会在幕后工作。"
,
"感谢这只怪兽在台后的支持。"
],
"chaining"
:
[
"看这里!帽子戏法{0}!"
,
"嘿嘿,这可不是纸牌魔术。是{0}!"
,
"准备!大魔术{0}!"
,
"在舞台上要多多思考。{0},发动!"
,
"看样子你忘了魔术师的机关{0}!"
,
"你能看出{0}的奥秘吗?"
]
}
Game/AI/AIUtil.cs
View file @
917e0372
...
...
@@ -44,7 +44,8 @@ namespace WindBot.Game.AI
public
bool
IsOneEnemyBetterThanValue
(
int
value
,
bool
onlyATK
)
{
return
Enemy
.
MonsterZone
.
GetMonsters
()
.
Any
(
card
=>
card
.
GetDefensePower
()
>
value
&&
(!
onlyATK
||
card
.
IsAttack
()));
// .Any(card => card.GetDefensePower() > value && (!onlyATK || card.IsAttack()));
.
Any
(
card
=>
card
.
GetDefensePower
()
>
value
&&
(!
onlyATK
));
}
public
bool
IsAllEnemyBetterThanValue
(
int
value
,
bool
onlyATK
)
...
...
Game/AI/CardContainer.cs
View file @
917e0372
...
...
@@ -48,7 +48,12 @@ namespace WindBot.Game.AI
.
Where
(
card
=>
card
?.
Data
!=
null
&&
card
.
HasType
(
CardType
.
Monster
)
&&
card
.
IsFaceup
()
&&
!(
canBeTarget
&&
card
.
IsShouldNotBeTarget
()))
.
OrderBy
(
card
=>
card
.
Attack
).
FirstOrDefault
();
}
public
static
ClientCard
GetHighestLevelMonster
(
this
IEnumerable
<
ClientCard
>
cards
,
bool
canBeTarget
=
false
)
{
return
cards
.
OrderBy
(
card
=>
card
.
Level
).
FirstOrDefault
();
}
public
static
ClientCard
GetHighestDefenseMonster
(
this
IEnumerable
<
ClientCard
>
cards
,
bool
canBeTarget
=
false
)
{
return
cards
...
...
Game/AI/Decks/MokeyMokeyExecutor.cs
View file @
917e0372
...
...
@@ -39,6 +39,7 @@ namespace WindBot.Game.AI.Decks
{
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道法师
,
七星道法师
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Eff
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
恶魔召唤
,
DefaultMonsterSummon
);
...
...
@@ -50,7 +51,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
暗黑释放
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
暗黑释放
,
圣防
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
落穴
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
...
...
@@ -58,9 +59,9 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
,
凤凰龙
summon
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
火星心少女
,
m
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
七星道法师
,
m
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
耳语妖精
,
m
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
火星心少女
,
M
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
七星道法师
,
M
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
耳语妖精
,
M
onsterset
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道法师
);
...
...
@@ -134,7 +135,7 @@ namespace WindBot.Game.AI.Decks
// go first
return
true
;
}
public
bool
m
onsterset
()
public
bool
M
onsterset
()
{
if
(
Duel
.
Turn
==
1
)
{
...
...
@@ -166,6 +167,12 @@ namespace WindBot.Game.AI.Decks
return
true
;
}
private
bool
圣防
Effect
()
{
if
(
Util
.
GetTotalAttackingMonsterAttack
(
1
)
>
1900
)
return
true
;
return
false
;
}
private
bool
落穴
Effect
()
{
foreach
(
ClientCard
n
in
Duel
.
LastSummonedCards
)
...
...
@@ -197,6 +204,25 @@ namespace WindBot.Game.AI.Decks
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
>=
8
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
7
)
AI
.
SelectNextCard
(
mon
);
else
if
(
mon
.
Level
>=
5
)
AI
.
SelectNextCard
(
mon
);
return
true
;
}
return
false
;
...
...
Game/AI/Decks/MokeyMokeyKingExecutor.cs
View file @
917e0372
...
...
@@ -45,6 +45,7 @@ namespace WindBot.Game.AI.Decks
{
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道法师
,
七星道法师
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Eff
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
恶魔召唤
,
DefaultMonsterSummon
);
...
...
@@ -56,7 +57,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
暗黑释放
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
暗黑释放
,
圣防
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
落穴
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
...
...
@@ -65,9 +66,9 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
,
凤凰龙
summon
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
火星心少女
,
m
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
七星道法师
,
m
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
耳语妖精
,
m
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
火星心少女
,
M
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
七星道法师
,
M
onsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
耳语妖精
,
M
onsterset
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道法师
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
...
...
@@ -139,7 +140,7 @@ namespace WindBot.Game.AI.Decks
// go first
return
true
;
}
public
bool
m
onsterset
()
public
bool
M
onsterset
()
{
if
(
Duel
.
Turn
==
1
)
{
...
...
@@ -186,6 +187,12 @@ namespace WindBot.Game.AI.Decks
}
return
false
;
}
private
bool
圣防
Effect
()
{
if
(
Util
.
GetTotalAttackingMonsterAttack
(
1
)
>
1900
)
return
true
;
return
false
;
}
private
bool
死供
Effect
()
{
if
(
Util
.
IsOneEnemyBetterThanValue
(
1900
,
false
))
...
...
@@ -199,11 +206,29 @@ namespace WindBot.Game.AI.Decks
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
>=
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
火星心少女
Effect
()
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
...
...
Game/AI/Decks/SaikyoBattleFlagExecutor.cs
0 → 100644
View file @
917e0372
This diff is collapsed.
Click to expand it.
Game/AI/DefaultExecutor.cs
View file @
917e0372
...
...
@@ -704,7 +704,8 @@ namespace WindBot.Game.AI
{
ClientCard
tributeCard
=
Bot
.
MonsterZone
[
j
];
if
(
tributeCard
==
null
)
continue
;
if
(
tributeCard
.
GetDefensePower
()
<
Card
.
Attack
-
400
)
// if (tributeCard.GetDefensePower() +400 < Card.Attack)
if
(
tributeCard
.
Level
+
1
<
Card
.
Level
)
tributecount
--;
}
return
tributecount
<=
0
;
...
...
WindBot.csproj
View file @
917e0372
...
...
@@ -78,6 +78,7 @@
<Compile
Include=
"Game\AI\Decks\PureWindsExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\DragunExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\Level8Executor.cs"
/>
<Compile
Include=
"Game\AI\Decks\SaikyoBattleFlagExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\SalamangreatExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\CyberDragonExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\DarkMagicianExecutor.cs"
/>
...
...
@@ -151,6 +152,7 @@
</ItemGroup>
<ItemGroup>
<None
Include=
"App.config"
/>
<None
Include=
"Dialogs\rd1.json"
/>
<None
Include=
"sqlite3.dll"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
...
...
bots.json
View file @
917e0372
{
{
"windbots"
:
[
{
"name"
:
"齿车戒龙"
,
"deck"
:
"MokeyMokey"
,
"dialog"
:
"
zh-CN
"
"dialog"
:
"
rd1
"
},
{
"name"
:
"破坏剑士"
,
...
...
@@ -12,10 +12,15 @@
"dialog"
:
"zh-CN"
},
{
"name"
:
"大恐龙
架
"
,
"name"
:
"大恐龙
驾
"
,
"deck"
:
"DinocarriageDynarmix"
,
"dialog"
:
"zh-CN"
},
{
"name"
:
"最强战旗"
,
"deck"
:
"SaikyoBattleFlag"
,
"dialog"
:
"zh-CN"
},
{
"name"
:
"传说子"
,
"deck"
:
"TheLegend"
,
...
...
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