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
361a65e9
Commit
361a65e9
authored
Apr 24, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/IceYGO/windbot
parents
18af9bdb
40a5021b
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
978 additions
and
22 deletions
+978
-22
BotWrapper/bot.conf
BotWrapper/bot.conf
+5
-0
Decks/AI_SkyStriker.ydk
Decks/AI_SkyStriker.ydk
+59
-0
Dialogs/anothercopy.zh-CN.json
Dialogs/anothercopy.zh-CN.json
+77
-0
Game/AI/AIFunctions.cs
Game/AI/AIFunctions.cs
+19
-0
Game/AI/Decks/ChainBurnExecutor.cs
Game/AI/Decks/ChainBurnExecutor.cs
+6
-1
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
+34
-21
Game/AI/Decks/SkyStrikerExecutor.cs
Game/AI/Decks/SkyStrikerExecutor.cs
+772
-0
Game/ClientCard.cs
Game/ClientCard.cs
+5
-0
WindBot.csproj
WindBot.csproj
+1
-0
No files found.
BotWrapper/bot.conf
View file @
361a65e9
...
@@ -93,3 +93,8 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
...
@@ -93,3 +93,8 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE
Name
=燃血鬥士
Deck
=
ChainBurn
Dialog
=
kiwi
.
zh
-
TW
Name
=燃血鬥士
Deck
=
ChainBurn
Dialog
=
kiwi
.
zh
-
TW
连锁烧卡组。
连锁烧卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
!复制梁龙-闪刀姬
Name
=复制梁龙
Deck
=
SkyStriker
Dialog
=
anothercopy
.
zh
-
CN
纯闪刀姬卡组。
SUPPORT_NEW_MASTER_RULE
Decks/AI_SkyStriker.ydk
0 → 100644
View file @
361a65e9
#created by ...
#main
26077387
26077387
26077387
14558127
14558127
59438930
23434538
23434538
23434538
9742784
97268402
97268402
25955749
32807846
35726888
35726888
35726888
63166095
63166095
63166095
70368879
70368879
70368879
73594093
99550630
43898403
43898403
43898403
52340444
52340444
52340444
98338152
98338152
98338152
24010609
97616504
50005218
41420027
84749824
84749824
#extra
42110604
5821478
61665245
38342335
2857636
50588353
8491308
8491308
63288573
63288573
63288573
90673288
90673288
90673288
41999284
!side
Dialogs/anothercopy.zh-CN.json
0 → 100644
View file @
361a65e9
{
"welcome"
:
[
"你好,我是一个机器人。"
,
"AI功能正在测试中,遇到问题请及时反馈。"
],
"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}吗?"
]
}
Game/AI/AIFunctions.cs
View file @
361a65e9
...
@@ -132,6 +132,25 @@ namespace WindBot.Game.AI
...
@@ -132,6 +132,25 @@ namespace WindBot.Game.AI
return
IsAllEnemyBetterThanValue
(
bestBotPower
,
onlyATK
);
return
IsAllEnemyBetterThanValue
(
bestBotPower
,
onlyATK
);
}
}
public
ClientCard
GetBestBotMonster
(
bool
onlyATK
=
false
)
{
int
bestPower
=
-
1
;
ClientCard
bestMonster
=
null
;
for
(
int
i
=
0
;
i
<
7
;
++
i
)
{
ClientCard
card
=
Bot
.
MonsterZone
[
i
];
if
(
card
==
null
||
card
.
Data
==
null
)
continue
;
if
(
onlyATK
&&
card
.
IsDefense
())
continue
;
int
newPower
=
card
.
GetDefensePower
();
if
(
newPower
>
bestPower
)
{
bestPower
=
newPower
;
bestMonster
=
card
;
}
}
return
bestMonster
;
}
public
ClientCard
GetOneEnemyBetterThanValue
(
int
value
,
bool
onlyATK
=
false
)
public
ClientCard
GetOneEnemyBetterThanValue
(
int
value
,
bool
onlyATK
=
false
)
{
{
ClientCard
bestCard
=
null
;
ClientCard
bestCard
=
null
;
...
...
Game/AI/Decks/ChainBurnExecutor.cs
View file @
361a65e9
...
@@ -590,7 +590,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -590,7 +590,12 @@ namespace WindBot.Game.AI.Decks
return
false
;
return
false
;
}
}
private
bool
CardOfDemiseeff
()
private
bool
CardOfDemiseeff
()
{
{
foreach
(
ClientCard
card
in
Bot
.
GetMonsters
())
{
if
(
card
.
Id
==
CardId
.
CardcarD
&&
card
.
IsFaceup
())
return
false
;
}
if
(
Bot
.
GetHandCount
()
==
1
&&
Bot
.
GetSpellCountWithoutField
()
<=
3
)
if
(
Bot
.
GetHandCount
()
==
1
&&
Bot
.
GetSpellCountWithoutField
()
<=
3
)
{
{
no_sp
=
true
;
no_sp
=
true
;
...
...
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
View file @
361a65e9
...
@@ -134,7 +134,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -134,7 +134,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MinervaTheExalte
,
MinervaTheExaltedEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MinervaTheExalte
,
MinervaTheExaltedEffect
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
CrystronNeedlefiber
,
CrystronNeedlefibersp
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
CrystronNeedlefiber
,
CrystronNeedlefibersp
);
//Kaiju
//Kaiju
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
GamecieltheSeaTurtleKaiju
,
DefaultKaijuSpsummon
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
GamecieltheSeaTurtleKaiju
,
GamecieltheSeaTurtleKaijusp
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
RadiantheMultidimensionalKaiju
,
RadiantheMultidimensionalKaijusp
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
RadiantheMultidimensionalKaiju
,
RadiantheMultidimensionalKaijusp
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
DogorantheMadFlameKaiju
,
DogorantheMadFlameKaijusp
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
DogorantheMadFlameKaiju
,
DogorantheMadFlameKaijusp
);
//Reborn
//Reborn
...
@@ -353,13 +353,19 @@ namespace WindBot.Game.AI.Decks
...
@@ -353,13 +353,19 @@ namespace WindBot.Game.AI.Decks
}
}
return
false
;
return
false
;
}
private
bool
GamecieltheSeaTurtleKaijusp
()
{
if
(!
Bot
.
HasInMonstersZone
(
CardId
.
UltimateConductorTytanno
))
return
DefaultKaijuSpsummon
();
return
false
;
}
}
private
bool
RadiantheMultidimensionalKaijusp
()
private
bool
RadiantheMultidimensionalKaijusp
()
{
{
if
(
Enemy
.
HasInMonstersZone
(
CardId
.
GamecieltheSeaTurtleKaiju
))
return
true
;
if
(
Enemy
.
HasInMonstersZone
(
CardId
.
GamecieltheSeaTurtleKaiju
))
return
true
;
if
(
Bot
.
HasInHand
(
CardId
.
DogorantheMadFlameKaiju
))
return
DefaultKaijuSpsummon
();
if
(
Bot
.
HasInHand
(
CardId
.
DogorantheMadFlameKaiju
)
&&
!
Bot
.
HasInMonstersZone
(
CardId
.
UltimateConductorTytanno
)
)
return
DefaultKaijuSpsummon
();
return
false
;
return
false
;
}
}
...
@@ -403,8 +409,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -403,8 +409,11 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
MonsterRepos
()
private
bool
MonsterRepos
()
{
{
if
(
Card
.
Id
==
CardId
.
UltimateConductorTytanno
&&
Card
.
IsFacedown
())
return
true
;
if
(
Card
.
Id
==
CardId
.
ElShaddollConstruct
&&
Card
.
IsFacedown
())
return
true
;
if
(
Card
.
Id
==
CardId
.
ElShaddollConstruct
&&
Card
.
IsAttack
())
return
false
;
if
(
Card
.
Id
==
CardId
.
ElShaddollConstruct
&&
Card
.
IsAttack
())
return
false
;
if
(
Card
.
Id
==
CardId
.
GlowUpBulb
&&
Card
.
IsDefense
())
return
false
;
if
(
Card
.
Id
==
CardId
.
ShaddollDragon
&&
Card
.
IsFacedown
()
&&
Enemy
.
GetMonsterCount
()
>=
0
)
return
true
;
if
(
Card
.
Id
==
CardId
.
ShaddollDragon
&&
Card
.
IsFacedown
()
&&
Enemy
.
GetMonsterCount
()
>=
0
)
return
true
;
if
(
Card
.
Id
==
CardId
.
ShaddollSquamata
&&
Card
.
IsFacedown
()
&&
Enemy
.
GetMonsterCount
()
>=
0
)
return
true
;
if
(
Card
.
Id
==
CardId
.
ShaddollSquamata
&&
Card
.
IsFacedown
()
&&
Enemy
.
GetMonsterCount
()
>=
0
)
return
true
;
return
base
.
DefaultMonsterRepos
();
return
base
.
DefaultMonsterRepos
();
...
@@ -540,7 +549,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -540,7 +549,14 @@ namespace WindBot.Game.AI.Decks
int
spell_count
=
0
;
int
spell_count
=
0
;
IList
<
ClientCard
>
grave
=
Bot
.
Graveyard
;
IList
<
ClientCard
>
grave
=
Bot
.
Graveyard
;
IList
<
ClientCard
>
all
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
all
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
check
in
grave
)
{
if
(
check
.
Id
==
CardId
.
GiantRex
)
{
all
.
Add
(
check
);
}
}
foreach
(
ClientCard
check
in
grave
)
foreach
(
ClientCard
check
in
grave
)
{
{
if
(
check
.
HasType
(
CardType
.
Spell
)||
check
.
HasType
(
CardType
.
Trap
))
if
(
check
.
HasType
(
CardType
.
Spell
)||
check
.
HasType
(
CardType
.
Trap
))
...
@@ -556,12 +572,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -556,12 +572,8 @@ namespace WindBot.Game.AI.Decks
all
.
Add
(
check
);
all
.
Add
(
check
);
}
}
}
}
if
(
AI
.
Utils
.
GetLastChainCard
()!=
null
)
if
(
AI
.
Utils
.
ChainContainsCard
(
CardId
.
FairyTailSnow
))
return
false
;
{
if
(
AI
.
Utils
.
GetLastChainCard
().
Id
==
CardId
.
FairyTailSnow
)
return
false
;
}
if
(
Duel
.
Player
==
1
&&
Duel
.
Phase
==
DuelPhase
.
BattleStart
&&
Bot
.
BattlingMonster
==
null
&&
Enemy_atk
>=
Bot
.
LifePoints
||
if
(
Duel
.
Player
==
1
&&
Duel
.
Phase
==
DuelPhase
.
BattleStart
&&
Bot
.
BattlingMonster
==
null
&&
Enemy_atk
>=
Bot
.
LifePoints
||
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
BattleStart
&&
Enemy
.
BattlingMonster
==
null
&&
Enemy
.
LifePoints
<=
1850
Duel
.
Player
==
0
&&
Duel
.
Phase
==
DuelPhase
.
BattleStart
&&
Enemy
.
BattlingMonster
==
null
&&
Enemy
.
LifePoints
<=
1850
)
)
...
@@ -577,10 +589,10 @@ namespace WindBot.Game.AI.Decks
...
@@ -577,10 +589,10 @@ namespace WindBot.Game.AI.Decks
private
bool
SouleatingOviraptoreff
()
private
bool
SouleatingOviraptoreff
()
{
{
if
(!
OvertexCoatlseff_used
)
if
(!
OvertexCoatlseff_used
&&
Bot
.
GetRemainingCount
(
CardId
.
OvertexCoatls
,
3
)
>
0
)
{
{
AI
.
SelectCard
(
CardId
.
OvertexCoatls
);
AI
.
SelectCard
(
CardId
.
OvertexCoatls
);
AI
.
SelectYesNo
(
false
);
AI
.
SelectYesNo
(
false
);
}
}
else
else
{
{
...
@@ -721,13 +733,13 @@ namespace WindBot.Game.AI.Decks
...
@@ -721,13 +733,13 @@ namespace WindBot.Game.AI.Decks
{
{
List
<
ClientCard
>
extra_zone_check
=
Bot
.
GetMonstersInExtraZone
();
List
<
ClientCard
>
extra_zone_check
=
Bot
.
GetMonstersInExtraZone
();
foreach
(
ClientCard
extra_monster
in
extra_zone_check
)
foreach
(
ClientCard
extra_monster
in
extra_zone_check
)
if
(
extra_monster
.
HasType
(
CardType
.
Xyz
)
||
extra_monster
.
HasType
(
CardType
.
Fusion
))
return
false
;
if
(
extra_monster
.
HasType
(
CardType
.
Xyz
)
||
extra_monster
.
HasType
(
CardType
.
Fusion
)
||
extra_monster
.
HasType
(
CardType
.
Synchro
)
)
return
false
;
bool
deck_check
=
false
;
bool
deck_check
=
false
;
List
<
ClientCard
>
monsters
=
Enemy
.
GetMonsters
();
List
<
ClientCard
>
monsters
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
monster
in
monsters
)
foreach
(
ClientCard
monster
in
monsters
)
{
{
if
(
monster
.
HasType
(
CardType
.
Synchro
)
||
monster
.
HasType
(
CardType
.
Fusion
)
||
monster
.
HasType
(
CardType
.
Xyz
))
if
(
monster
.
HasType
(
CardType
.
Synchro
)
||
monster
.
HasType
(
CardType
.
Fusion
)
||
monster
.
HasType
(
CardType
.
Xyz
)
||
monster
.
HasType
(
CardType
.
Link
)
)
deck_check
=
true
;
deck_check
=
true
;
}
}
...
@@ -748,7 +760,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -748,7 +760,7 @@ namespace WindBot.Game.AI.Decks
CardId
.
ShaddollHedgehog
,
CardId
.
ShaddollHedgehog
,
CardId
.
ShaddollDragon
,
CardId
.
ShaddollDragon
,
CardId
.
ShaddollFalco
,
CardId
.
ShaddollFalco
,
CardId
.
FairyTailSnow
,
});
});
AI
.
SelectPosition
(
CardPosition
.
FaceUpAttack
);
AI
.
SelectPosition
(
CardPosition
.
FaceUpAttack
);
return
true
;
return
true
;
...
@@ -891,11 +903,9 @@ namespace WindBot.Game.AI.Decks
...
@@ -891,11 +903,9 @@ namespace WindBot.Game.AI.Decks
}
}
else
else
{
{
if
(
Enemy
.
GetMonsterCount
()
==
0
)
return
false
;
ClientCard
target
=
AI
.
Utils
.
GetBestEnemyMonster
();
ClientCard
target
=
AI
.
Utils
.
GetBestEnemyMonster
();
AI
.
SelectCard
(
target
);
AI
.
SelectCard
(
target
);
if
(
Enemy
.
GetMonsterCount
()
==
0
)
return
false
;
}
}
return
true
;
return
true
;
}
}
...
@@ -972,6 +982,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -972,6 +982,7 @@ namespace WindBot.Game.AI.Decks
}
}
else
else
{
{
if
(
Enemy
.
GetSpellCount
()
==
0
)
return
false
;
ClientCard
target
=
AI
.
Utils
.
GetBestEnemySpell
();
ClientCard
target
=
AI
.
Utils
.
GetBestEnemySpell
();
AI
.
SelectCard
(
target
);
AI
.
SelectCard
(
target
);
return
true
;
return
true
;
...
@@ -981,6 +992,8 @@ namespace WindBot.Game.AI.Decks
...
@@ -981,6 +992,8 @@ namespace WindBot.Game.AI.Decks
private
bool
LostWindeff
()
private
bool
LostWindeff
()
{
{
if
(
Card
.
Location
==
CardLocation
.
Grave
)
return
true
;
List
<
ClientCard
>
check
=
Enemy
.
GetMonsters
();
List
<
ClientCard
>
check
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
m
in
check
)
foreach
(
ClientCard
m
in
check
)
{
{
...
...
Game/AI/Decks/SkyStrikerExecutor.cs
0 → 100644
View file @
361a65e9
This diff is collapsed.
Click to expand it.
Game/ClientCard.cs
View file @
361a65e9
...
@@ -154,6 +154,11 @@ namespace WindBot.Game
...
@@ -154,6 +154,11 @@ namespace WindBot.Game
return
HasType
(
CardType
.
Monster
);
return
HasType
(
CardType
.
Monster
);
}
}
public
bool
IsTuner
()
{
return
HasType
(
CardType
.
Tuner
);
}
public
bool
IsSpell
()
public
bool
IsSpell
()
{
{
return
HasType
(
CardType
.
Spell
);
return
HasType
(
CardType
.
Spell
);
...
...
WindBot.csproj
View file @
361a65e9
...
@@ -68,6 +68,7 @@
...
@@ -68,6 +68,7 @@
<Compile
Include=
"Game\AI\DecksManager.cs"
/>
<Compile
Include=
"Game\AI\DecksManager.cs"
/>
<Compile
Include=
"Game\AI\Decks\BlackwingExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\BlackwingExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\CyberDragonExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\CyberDragonExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\SkyStrikerExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\MokeyMokeyKingExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\MokeyMokeyKingExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\MokeyMokeyExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\MokeyMokeyExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ToadallyAwesomeExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\ToadallyAwesomeExecutor.cs"
/>
...
...
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