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
HiiragiGuardians
windbot
Commits
ed0dbcac
Commit
ed0dbcac
authored
Oct 02, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into tricky
parents
97608d27
66f2396a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
15 deletions
+76
-15
BotWrapper/bot.conf
BotWrapper/bot.conf
+3
-3
Dialogs/smart.zh-CN.json
Dialogs/smart.zh-CN.json
+1
-1
Dialogs/verre.zh-CN.json
Dialogs/verre.zh-CN.json
+1
-1
Game/AI/Decks/BraveExecutor.cs
Game/AI/Decks/BraveExecutor.cs
+63
-7
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+5
-3
Game/GameBehavior.cs
Game/GameBehavior.cs
+1
-0
README.md
README.md
+2
-0
No files found.
BotWrapper/bot.conf
View file @
ed0dbcac
...
...
@@ -26,7 +26,7 @@ SUPPORT_MASTER_RULE_2020
!
P2
-自选卡组
Name
=
P2
Deck
=
Lucky
Dialog
=
gugugu
.
zh
-
CN
人机卡组由你选择。随缘出牌。
可将你的卡组文件(.
ydk
)复制到
WindBot
的对应文件夹。
人机卡组由你选择。随缘出牌。
SELECT_DECKFILE
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!谜之剑士
LV4
-龙骑星爆
...
...
@@ -209,7 +209,7 @@ Name=朱露咲浅羽 Deck=Salamangreat Dialog=nlch.zh-CN
浅羽的香喷喷曲奇。
AI_LV3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!朱露咲浅羽-真红眼
!朱露咲浅羽-真红眼
龙骑士
Name
=朱露咲浅羽
Deck
=
Dragun
Dialog
=
nlch
.
zh
-
CN
超魔导真红眼龙骑士卡组。
AI_LV3
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
...
...
@@ -232,4 +232,4 @@ AI_LV2 SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
!濑名歌铃
Name
=濑名歌铃
Deck
=
Brave
Dialog
=
wof
-
Sena
-
Karin
????? 卡组。
AI_LV
2
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
AI_LV
3
SUPPORT_MASTER_RULE_2020
Dialogs/smart.zh-CN.json
View file @
ed0dbcac
...
...
@@ -12,7 +12,7 @@
"接下来就是我的舞台"
],
"endturn"
:
[
"
我的回合结束,试试来击溃我吧
"
"
每个人的目的不同,我更注重强度,我只想赢。
"
],
"directattack"
:
[
"老子上了,要你的命"
...
...
Dialogs/verre.zh-CN.json
View file @
ed0dbcac
...
...
@@ -22,7 +22,7 @@
"directattack"
:
[
"{0},直接攻击!"
,
"不过如此嘛,直接攻击!"
,
"快走开,我要回去睡觉了。"
,
"快走开,我要回去睡觉了。"
],
"attack"
:
[
"{0},攻击{1}!"
,
...
...
Game/AI/Decks/BraveExecutor.cs
View file @
ed0dbcac
...
...
@@ -53,6 +53,7 @@ namespace WindBot.Game.AI.Decks
public
const
int
BraveToken
=
3285552
;
public
const
int
MechaPhantomBeastToken
=
31533705
;
public
const
int
PrimalBeingToken
=
27204312
;
}
public
BraveExecutor
(
GameAI
ai
,
Duel
duel
)
...
...
@@ -146,7 +147,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
NemesesCorridor
,
SummonForMaterial
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
DestinyHeroCelestial
,
SummonForMaterial
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DestinyHeroDasher
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DestinyHeroDasher
,
DestinyHeroDasherEffect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
DestinyHeroCelestial
,
DestinyHeroCelestialEffect
);
AddExecutor
(
ExecutorType
.
Repos
,
MonsterRepos
);
...
...
@@ -163,6 +164,8 @@ namespace WindBot.Game.AI.Decks
private
bool
JetSynchronUsed
=
false
;
private
bool
FusionDestinyUsed
=
false
;
private
bool
BaronessDeFleurUsed
=
false
;
private
ClientCard
PhoenixTarget
=
null
;
private
int
PhoenixSelectingTarget
=
0
;
public
override
bool
OnSelectHand
()
{
...
...
@@ -175,6 +178,8 @@ namespace WindBot.Game.AI.Decks
BeastOLionUsed
=
false
;
JetSynchronUsed
=
false
;
FusionDestinyUsed
=
false
;
PhoenixTarget
=
null
;
PhoenixSelectingTarget
=
0
;
}
public
override
CardPosition
OnSelectPosition
(
int
cardId
,
IList
<
CardPosition
>
positions
)
...
...
@@ -184,6 +189,8 @@ namespace WindBot.Game.AI.Decks
{
if
(
cardData
.
Attack
<=
1000
)
return
CardPosition
.
FaceUpDefence
;
if
(
Util
.
IsTurn1OrMain2
()
&&
cardData
.
Attack
<=
2500
)
return
CardPosition
.
FaceUpDefence
;
}
return
0
;
}
...
...
@@ -207,6 +214,9 @@ namespace WindBot.Game.AI.Decks
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
if
(
hint
!=
HintMsg
.
Destroy
)
PhoenixSelectingTarget
=
0
;
if
(
hint
==
HintMsg
.
AddToHand
&&
max
==
1
)
{
foreach
(
ClientCard
card
in
cards
)
...
...
@@ -234,6 +244,23 @@ namespace WindBot.Game.AI.Decks
return
new
List
<
ClientCard
>(
new
[]
{
card
});
}
}
if
(
hint
==
HintMsg
.
Destroy
&&
max
==
1
)
{
PhoenixSelectingTarget
++;
if
(
PhoenixSelectingTarget
>=
2
&&
!
cards
.
Contains
(
PhoenixTarget
))
{
ClientCard
target
=
Util
.
GetProblematicEnemyCard
();
if
(
target
==
null
||
!
cards
.
Contains
(
target
))
target
=
Util
.
GetBestEnemyCard
();
if
(
target
!=
null
&&
cards
.
Contains
(
target
))
return
new
List
<
ClientCard
>(
new
[]
{
target
});
}
}
if
(
hint
==
HintMsg
.
LinkMaterial
&&
cancelable
&&
min
==
0
)
{
// TODO: not working
return
new
List
<
ClientCard
>();
}
return
base
.
OnSelectCard
(
cards
,
min
,
max
,
hint
,
cancelable
);
}
...
...
@@ -341,6 +368,7 @@ namespace WindBot.Game.AI.Decks
||
(
Duel
.
Player
==
0
&&
Util
.
IsTurn1OrMain2
())
||
(
Duel
.
Player
==
1
&&
Enemy
.
GetMonsterCount
()
>=
2
))
{
PhoenixTarget
=
target
;
AI
.
SelectCard
(
CardId
.
DestinyHeroDestroyPhoenixEnforcer
);
AI
.
SelectNextCard
(
target
);
return
true
;
...
...
@@ -432,10 +460,19 @@ namespace WindBot.Game.AI.Decks
else
{
// search rider or aquamancer
if
(
Bot
.
GetRemainingCount
(
CardId
.
WanderingGryphonRider
,
1
)
==
0
&&
Bot
.
HasInHandOrInMonstersZoneOrInGraveyard
(
CardId
.
AquamancerOfTheSanctuary
))
return
false
;
AI
.
SelectCard
(
CardId
.
WanderingGryphonRider
);
AI
.
SelectNextCard
(
GetHandCost
());
if
(
Bot
.
GetRemainingCount
(
CardId
.
WanderingGryphonRider
,
1
)
==
0
||
Bot
.
GetHandCount
()
==
0
||
!
Bot
.
HasInMonstersZone
(
CardId
.
BraveToken
))
{
AI
.
SelectCard
(
CardId
.
AquamancerOfTheSanctuary
);
if
(
Bot
.
HasInHandOrInMonstersZoneOrInGraveyard
(
CardId
.
AquamancerOfTheSanctuary
))
AI
.
SelectNextCard
(
CardId
.
AquamancerOfTheSanctuary
);
else
AI
.
SelectNextCard
(
GetHandCost
());
}
else
{
AI
.
SelectCard
(
CardId
.
WanderingGryphonRider
);
AI
.
SelectNextCard
(
GetHandCost
());
}
return
true
;
}
}
...
...
@@ -494,6 +531,7 @@ namespace WindBot.Game.AI.Decks
return
false
;
List
<
int
>
materials
=
new
List
<
int
>{
CardId
.
Sangan
,
_CardId
.
GamecieltheSeaTurtleKaiju
,
CardId
.
PredaplantVerteAnaconda
,
CardId
.
SalamangreatAlmiraj
,
CardId
.
LinkSpider
,
...
...
@@ -647,8 +685,9 @@ namespace WindBot.Game.AI.Decks
private
bool
SalamangreatAlmirajSummon
()
{
if
(
PhoenixNotAvail
())
return
false
;
int
[]
materials
=
new
[]
{
CardId
.
Sangan
,
CardId
.
MechaPhantomBeastOLion
,
CardId
.
JetSynchron
};
...
...
@@ -669,6 +708,10 @@ namespace WindBot.Game.AI.Decks
{
materials
.
Add
(
CardId
.
BraveToken
);
}
if
(
Bot
.
GetMonsters
().
Any
(
card
=>
card
.
IsCode
(
CardId
.
PrimalBeingToken
)
&&
card
.
Attack
<=
4000
))
{
materials
.
Add
(
CardId
.
PrimalBeingToken
);
}
if
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
IsCode
(
materials
))
==
0
)
return
false
;
AI
.
SelectMaterials
(
materials
);
...
...
@@ -700,7 +743,7 @@ namespace WindBot.Game.AI.Decks
private
bool
PhoenixNotAvail
()
{
return
Bot
.
GetRemainingCount
(
CardId
.
FusionDestiny
,
3
)
==
0
||
Bot
.
HasInHand
(
CardId
.
FusionDestiny
)
return
Bot
.
LifePoints
<=
2000
||
Bot
.
GetRemainingCount
(
CardId
.
FusionDestiny
,
3
)
==
0
||
Bot
.
HasInHand
(
CardId
.
FusionDestiny
)
||
!
Bot
.
HasInExtra
(
CardId
.
PredaplantVerteAnaconda
)
||
!
Bot
.
HasInExtra
(
CardId
.
DestinyHeroDestroyPhoenixEnforcer
)
||
(
Bot
.
GetRemainingCount
(
CardId
.
DestinyHeroCelestial
,
1
)
==
0
&&
!
Bot
.
HasInHand
(
CardId
.
DestinyHeroCelestial
))
||
(
Bot
.
GetRemainingCount
(
CardId
.
DestinyHeroDasher
,
1
)
==
0
&&
!
Bot
.
HasInHand
(
CardId
.
DestinyHeroDasher
));
...
...
@@ -712,6 +755,7 @@ namespace WindBot.Game.AI.Decks
return
false
;
List
<
int
>
materials
=
new
List
<
int
>{
_CardId
.
GamecieltheSeaTurtleKaiju
,
CardId
.
AquamancerOfTheSanctuary
,
CardId
.
Sangan
,
CardId
.
SalamangreatAlmiraj
,
...
...
@@ -807,6 +851,11 @@ namespace WindBot.Game.AI.Decks
}
}
private
bool
DestinyHeroDasherEffect
()
{
return
Bot
.
Hand
.
Count
(
card
=>
card
.
IsMonster
())
>
1
;
}
private
bool
DestinyHeroCelestialEffect
()
{
if
(!
Bot
.
HasInGraveyard
(
CardId
.
DestinyHeroDasher
))
...
...
@@ -860,6 +909,10 @@ namespace WindBot.Game.AI.Decks
private
bool
BaronessDeFleurEffect
()
{
if
(
Duel
.
LastChainPlayer
==
0
)
{
return
false
;
}
if
(
Duel
.
LastChainPlayer
==
1
)
{
BaronessDeFleurUsed
=
true
;
...
...
@@ -886,6 +939,9 @@ namespace WindBot.Game.AI.Decks
private
bool
VirtualWorldKyubiShenshenSummon
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
DestinyHeroDestroyPhoenixEnforcer
))
return
false
;
int
[]
materials
=
new
[]
{
CardId
.
CoralDragon
,
...
...
Game/AI/DefaultExecutor.cs
View file @
ed0dbcac
...
...
@@ -106,6 +106,7 @@ namespace WindBot.Game.AI
public
const
int
MacroCosmos
=
30241314
;
public
const
int
UpstartGoblin
=
70368879
;
public
const
int
CyberEmergency
=
60600126
;
public
const
int
TheAgentOfCreationVenus
=
64734921
;
public
const
int
EaterOfMillions
=
63845230
;
...
...
@@ -471,7 +472,8 @@ namespace WindBot.Game.AI
int
[]
ignoreList
=
{
_CardId
.
MacroCosmos
,
_CardId
.
UpstartGoblin
,
_CardId
.
CyberEmergency
_CardId
.
CyberEmergency
,
_CardId
.
TheAgentOfCreationVenus
};
if
(
Util
.
GetLastChainCard
().
IsCode
(
ignoreList
))
return
false
;
...
...
@@ -793,14 +795,14 @@ namespace WindBot.Game.AI
_CardId
.
JudgmentDragon
,
_CardId
.
TopologicTrisbaena
};
int
[]
destroyAllOpponentList
=
int
[]
destroyAllOpponent
Spell
List
=
{
_CardId
.
HarpiesFeatherDuster
,
_CardId
.
DarkMagicAttack
};
if
(
Util
.
ChainContainsCard
(
destroyAllList
))
return
true
;
if
(
Enemy
.
HasInSpellZone
(
destroyAllOpponent
List
,
true
)
)
return
true
;
if
(
Enemy
.
HasInSpellZone
(
destroyAllOpponent
SpellList
,
true
)
&&
Card
.
Location
==
CardLocation
.
SpellZone
)
return
true
;
// TODO: ChainContainsCard(id, player)
return
false
;
}
...
...
Game/GameBehavior.cs
View file @
ed0dbcac
...
...
@@ -1041,6 +1041,7 @@ namespace WindBot.Game
int
seq
=
packet
.
ReadByte
();
packet
.
ReadByte
();
// pos
}
if
(
count2
==
0
)
cancelable
=
false
;
IList
<
ClientCard
>
selected
=
func
(
cards
,
(
finishable
?
0
:
1
),
1
,
_select_hint
,
cancelable
);
...
...
README.md
View file @
ed0dbcac
...
...
@@ -79,6 +79,8 @@ WindBot can run as a "server", provide a http interface to create bot.
*
BlueEyesMaxDragon
*
Brave
*
ChainBurn
*
DarkMagician
...
...
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