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
Tang Xinwei
windbot
Commits
ca6c267e
Commit
ca6c267e
authored
Mar 13, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
side of fp
parent
80cbd224
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
324 additions
and
110 deletions
+324
-110
Decks/AI_FamiliarPossessed.ydk
Decks/AI_FamiliarPossessed.ydk
+15
-0
Decks/Lose/AI_FamiliarPossessed.ydk
Decks/Lose/AI_FamiliarPossessed.ydk
+78
-0
Decks/Win/AI_FamiliarPossessed.ydk
Decks/Win/AI_FamiliarPossessed.ydk
+78
-0
Game/AI/Decks/FamiliarPossessedExecutor.cs
Game/AI/Decks/FamiliarPossessedExecutor.cs
+122
-108
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+17
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+7
-1
WindBot.csproj
WindBot.csproj
+7
-1
No files found.
Decks/AI_FamiliarPossessed.ydk
View file @
ca6c267e
...
...
@@ -61,3 +61,18 @@
41999284
41999284
!side
14558127
23434538
12580477
14532163
14532163
14532163
8267140
8267140
24224830
24224830
65681983
65681983
10045474
10045474
10045474
Decks/Lose/AI_FamiliarPossessed.ydk
0 → 100644
View file @
ca6c267e
#created by ...
#main
71197066
15397015
15397015
15397015
4376659
4376659
31764354
31887906
40542826
40542826
68881650
68881650
14558127
14558127
36584821
36584821
18144506
35261759
35261759
49238328
49238328
24224830
24224830
73915051
73915051
62256492
62256492
25704359
25704359
30241314
30241314
36975314
36975314
59305593
59305593
61740673
82732705
82732705
40605147
40605147
41420027
41420027
84749824
84749824
#extra
12014404
31833038
85289965
65330383
38342335
2857636
9839945
30674956
48815792
73309655
97661969
75452921
98978921
41999284
41999284
!side
14558127
23434538
23434538
23434538
12580477
14532163
14532163
14532163
8267140
8267140
65681983
65681983
10045474
10045474
10045474
Decks/Win/AI_FamiliarPossessed.ydk
0 → 100644
View file @
ca6c267e
#created by ...
#main
71197066
15397015
15397015
4376659
4376659
31764354
31887906
40542826
40542826
68881650
68881650
14558127
14558127
14558127
36584821
36584821
23434538
23434538
23434538
14532163
14532163
14532163
18144506
35261759
35261759
49238328
49238328
73915051
73915051
62256492
62256492
10045474
10045474
10045474
25704359
25704359
36975314
36975314
61740673
82732705
82732705
40605147
41420027
41420027
#extra
12014404
31833038
85289965
65330383
38342335
2857636
9839945
30674956
48815792
73309655
97661969
75452921
98978921
41999284
41999284
!side
15397015
12580477
8267140
8267140
24224830
24224830
65681983
65681983
30241314
30241314
59305593
59305593
40605147
84749824
84749824
Game/AI/Decks/FamiliarPossessedExecutor.cs
View file @
ca6c267e
...
...
@@ -61,6 +61,13 @@ namespace WindBot.Game.AI.Decks
public
const
int
HiitaP
=
48815792
;
public
const
int
LynaP
=
9839945
;
// side
public
const
int
Raigeki
=
12580477
;
public
const
int
lightningStorm
=
14532163
;
public
const
int
CosmicCyclone
=
8267140
;
public
const
int
CalledByTheGrave
=
24224830
;
public
const
int
CrossoutDesignator
=
65681983
;
public
const
int
InfiniteImpermanence
=
10045474
;
}
public
FamiliarPossessedExecutor
(
GameAI
ai
,
Duel
duel
)
...
...
@@ -74,6 +81,9 @@ namespace WindBot.Game.AI.Decks
//Sticker
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MacroCosmos
,
MacroCosmoseff
);
//counter
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CalledByTheGrave
,
DefaultCalledByTheGrave
);
// AddExecutor(ExecutorType.Activate, CardId.CrossoutDesignator, DefaultCalledByTheGrave);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
InfiniteImpermanence
,
DefaultInfiniteImpermanence
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
AshBlossomAndJoyousSpring
,
DefaultAshBlossomAndJoyousSpring
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
MaxxC
,
DefaultMaxxC
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
SolemnWarning
,
DefaultSolemnWarning
);
...
...
@@ -86,7 +96,11 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Awakening
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Unpossessed
,
UnpossessedEffect
);
//first do
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
lightningStorm
,
DefaultLightingStorm
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
HarpieFeatherDuster
,
DefaultHarpiesFeatherDusterFirst
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CosmicCyclone
,
DefaultMysticalSpaceTyphoon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Raigeki
,
DefaultRaigeki
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PotOfDesires
,
PotOfDesireseff
);
//sp
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Linkuriboh
,
Linkuriboheff
);
...
...
Game/AI/DefaultExecutor.cs
View file @
ca6c267e
...
...
@@ -82,6 +82,8 @@ namespace WindBot.Game.AI
public
const
int
ImperialOrder
=
61740673
;
public
const
int
NaturiaBeast
=
33198837
;
public
const
int
AntiSpellFragrance
=
58921041
;
public
const
int
lightningStorm
=
14532163
;
}
int
HonestEffectCount
=
0
;
...
...
@@ -1097,5 +1099,20 @@ namespace WindBot.Game.AI
return
false
;
}
protected
bool
DefaultLightingStorm
()
{
if
((
Enemy
.
MonsterZone
.
ToList
().
Count
>
Enemy
.
SpellZone
.
ToList
().
Count
)
&&
Enemy
.
MonsterZone
.
ToList
().
Count
>
3
)
{
AI
.
SelectPlace
(
Zones
.
MonsterZones
);
return
true
;
}
else
{
AI
.
SelectPlace
(
Zones
.
SpellZones
);
return
true
;
}
}
}
}
Game/GameBehavior.cs
View file @
ca6c267e
...
...
@@ -152,7 +152,9 @@ namespace WindBot.Game
private
BinaryWriter
buildUpdateDeck
(
Deck
targetDeck
)
{
BinaryWriter
deck
=
GamePacketFactory
.
Create
(
CtosMessage
.
UpdateDeck
);
deck
.
Write
(
targetDeck
.
Cards
.
Count
+
targetDeck
.
ExtraCards
.
Count
);
//Logger.WriteLine("Main + Extra: " + targetDeck.Cards.Count + targetDeck.ExtraCards.Count);
deck
.
Write
(
targetDeck
.
SideCards
.
Count
);
//Logger.WriteLine("Side: " + targetDeck.SideCards.Count);
foreach
(
NamedCard
card
in
targetDeck
.
Cards
)
deck
.
Write
(
card
.
Id
);
foreach
(
NamedCard
card
in
targetDeck
.
ExtraCards
)
...
...
@@ -170,18 +172,21 @@ namespace WindBot.Game
int
duel_rule
=
packet
.
ReadByte
();
_ai
.
Duel
.
IsNewRule
=
(
duel_rule
>=
4
);
_ai
.
Duel
.
IsNewRule2020
=
(
duel_rule
>=
5
);
BinaryWriter
deck
=
buildUpdateDeck
(
Deck
);
BinaryWriter
deck
=
buildUpdateDeck
(
pickDeckOnResult
()
);
Connection
.
Send
(
deck
);
_ai
.
OnJoinGame
();
}
private
Deck
pickDeckOnResult
()
{
if
(
lastDuelResult
==
0
&&
DeckForWin
!=
null
)
{
//Logger.WriteLine("Using deck for win: " + DeckForWin.SideCards[2].Name);
return
DeckForWin
;
}
if
(
lastDuelResult
==
1
&&
DeckForLose
!=
null
)
{
//Logger.WriteLine("Using deck for lose: " + DeckForLose.SideCards[2].Name);
return
DeckForLose
;
}
//Logger.WriteLine("Using default deck.");
return
Deck
;
}
...
...
@@ -313,6 +318,7 @@ namespace WindBot.Game
private
void
OnErrorMsg
(
BinaryReader
packet
)
{
int
msg
=
packet
.
ReadByte
();
Logger
.
WriteLine
(
"Got error: "
+
msg
);
// align
packet
.
ReadByte
();
packet
.
ReadByte
();
...
...
WindBot.csproj
View file @
ca6c267e
...
...
@@ -158,6 +158,12 @@
<None
Include=
"Decks\*.ydk"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Decks\Win\*.ydk"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Decks\Lose\*.ydk"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\*.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
...
...
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