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
34dd165e
Commit
34dd165e
authored
Oct 10, 2023
by
wind2009
Committed by
GitHub
Oct 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AI_Dogmatika (#173)
parent
4c5989bc
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2919 additions
and
2 deletions
+2919
-2
Decks/AI_Dogmatika.ydk
Decks/AI_Dogmatika.ydk
+59
-0
Dialogs/ecclesia.zh-CN.json
Dialogs/ecclesia.zh-CN.json
+2
-1
Game/AI/Decks/DogmatikaExecutor.cs
Game/AI/Decks/DogmatikaExecutor.cs
+2823
-0
Game/AI/Executor.cs
Game/AI/Executor.cs
+5
-0
Game/GameAI.cs
Game/GameAI.cs
+5
-0
Game/GameBehavior.cs
Game/GameBehavior.cs
+24
-1
WindBot.csproj
WindBot.csproj
+1
-0
No files found.
Decks/AI_Dogmatika.ydk
0 → 100644
View file @
34dd165e
#created by ...
#main
51522296
51522296
62849088
69680031
69680031
95679145
72270339
60303688
60303688
60303688
14558127
14558127
14558127
23434538
23434538
23434538
10158145
10158145
10158145
1984618
1984618
1984618
31002402
60921537
16240772
24224830
24224830
65681983
80845034
80845034
80845034
35569555
35569555
35569555
10045474
10045474
10045474
82956214
82956214
82956214
#extra
24915933
41373230
11765832
11765832
80532587
80532587
80532587
53971455
53971455
74586817
79606837
93039339
2220237
24842059
60303245
!side
\ No newline at end of file
Dialogs/ecclesia.zh-CN.json
View file @
34dd165e
{
"welcome"
:
[
"这里就是大灵峰吗?"
"这里就是大灵峰吗?"
,
"这里是教导龙国。"
],
"deckerror"
:
[
"{0}被冰水咒缚了!"
...
...
Game/AI/Decks/DogmatikaExecutor.cs
0 → 100644
View file @
34dd165e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Game/AI/Executor.cs
View file @
34dd165e
...
...
@@ -113,6 +113,11 @@ namespace WindBot.Game.AI
// Some AI need do something on draw
}
public
virtual
void
OnMove
(
int
cardId
,
int
previousControler
,
int
previousLocation
,
int
currentControler
,
int
currentLocation
)
{
// Some AI need do something on card's moving
}
public
virtual
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
// For overriding
...
...
Game/GameAI.cs
View file @
34dd165e
...
...
@@ -119,6 +119,11 @@ namespace WindBot.Game
Executor
.
OnNewPhase
();
}
public
void
OnMove
(
int
cardId
,
int
previousControler
,
int
previousLocation
,
int
currentControler
,
int
currentLocation
)
{
Executor
.
OnMove
(
cardId
,
previousControler
,
previousLocation
,
currentControler
,
currentLocation
);
}
/// <summary>
/// Called when the AI got attack directly.
/// </summary>
...
...
Game/GameBehavior.cs
View file @
34dd165e
...
...
@@ -94,7 +94,7 @@ namespace WindBot.Game
_messages
.
Add
(
GameMessage
.
ShuffleHand
,
OnShuffleHand
);
_messages
.
Add
(
GameMessage
.
ShuffleExtra
,
OnShuffleExtra
);
_messages
.
Add
(
GameMessage
.
ShuffleSetCard
,
OnShuffleSetCard
);
_messages
.
Add
(
GameMessage
.
SwapGraveDeck
,
OnSwapGraveDeck
);
_messages
.
Add
(
GameMessage
.
SwapGraveDeck
,
OnSwapGraveDeck
);
_messages
.
Add
(
GameMessage
.
TagSwap
,
OnTagSwap
);
_messages
.
Add
(
GameMessage
.
NewTurn
,
OnNewTurn
);
_messages
.
Add
(
GameMessage
.
NewPhase
,
OnNewPhase
);
...
...
@@ -144,6 +144,7 @@ namespace WindBot.Game
_messages
.
Add
(
GameMessage
.
SpSummoned
,
OnSpSummoned
);
_messages
.
Add
(
GameMessage
.
FlipSummoning
,
OnSummoning
);
_messages
.
Add
(
GameMessage
.
FlipSummoned
,
OnSummoned
);
_messages
.
Add
(
GameMessage
.
ConfirmCards
,
OnConfirmCards
);
}
private
void
OnJoinGame
(
BinaryReader
packet
)
...
...
@@ -634,6 +635,8 @@ namespace WindBot.Game
(
CardLocation
)
previousLocation
+
" move to "
+
(
CardLocation
)
currentLocation
+
")"
);
}
}
_ai
.
OnMove
(
cardId
,
previousControler
,
previousLocation
,
currentControler
,
currentLocation
);
}
private
void
OnSwap
(
BinaryReader
packet
)
...
...
@@ -955,7 +958,10 @@ namespace WindBot.Game
if
(((
int
)
loc
&
(
int
)
CardLocation
.
Overlay
)
!=
0
)
card
=
new
ClientCard
(
id
,
CardLocation
.
Overlay
,
-
1
);
else
{
card
=
_duel
.
GetCard
(
player
,
loc
,
seq
);
card
.
Controller
=
player
;
}
if
(
card
==
null
)
continue
;
if
(
card
.
Id
==
0
)
card
.
SetId
(
id
);
...
...
@@ -1891,5 +1897,22 @@ namespace WindBot.Game
}
_duel
.
SummoningCards
.
Clear
();
}
private
void
OnConfirmCards
(
BinaryReader
packet
)
{
/*int playerid = */
packet
.
ReadByte
();
int
count
=
packet
.
ReadByte
();
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
cardId
=
packet
.
ReadInt32
();
int
player
=
GetLocalPlayer
(
packet
.
ReadByte
());
int
loc
=
packet
.
ReadByte
();
int
seq
=
packet
.
ReadByte
();
ClientCard
card
=
_duel
.
GetCard
(
player
,
(
CardLocation
)
loc
,
seq
);
if
(
cardId
>
0
)
card
.
SetId
(
cardId
);
if
(
_debug
)
Logger
.
WriteLine
(
"(Confirm "
+
player
.
ToString
()
+
"'s "
+
(
CardLocation
)
loc
+
" card: "
+
(
card
.
Name
??
"UnKnowCard"
)
+
")"
);
}
}
}
}
WindBot.csproj
View file @
34dd165e
...
...
@@ -83,6 +83,7 @@
<Compile
Include=
"Game\AI\Decks\SalamangreatExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\CyberDragonExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\DarkMagicianExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\DogmatikaExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\OrcustExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\SkyStrikerExecutor.cs"
/>
<Compile
Include=
"Game\AI\Decks\MokeyMokeyKingExecutor.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