Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
Windbot-408
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
神之吹息
Windbot-408
Commits
85ba128e
Commit
85ba128e
authored
Dec 14, 2023
by
wind2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加事件2、事件5对话
parent
47c53be8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletion
+44
-1
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+43
-0
Game/AI/Dialogs.cs
Game/AI/Dialogs.cs
+1
-1
No files found.
Game/AI/DefaultExecutor.cs
View file @
85ba128e
...
...
@@ -1291,5 +1291,48 @@ namespace WindBot.Game.AI
return
false
;
}
private
enum
CustomMessage
{
InDanger
,
MSG_FOR_EVENT_2
,
MSG_FOR_EVENT_5
};
bool
sendEventMsg2
=
false
;
bool
sendEventMsg5
=
false
;
List
<
int
>
event2TriggerIdList
=
new
List
<
int
>
{
90673288
,
37818794
,
60461804
,
29432356
,
48626373
,
32909498
,
41685633
,
84330567
,
21522601
};
List
<
int
>
event5TriggerIdList
=
new
List
<
int
>
{
27279764
,
40061558
,
99267150
,
62873545
,
72989439
,
98630720
,
31833038
,
98127546
,
86221741
,
80611581
,
52085072
,
63468625
,
69120785
,
31764700
,
82103466
,
84433295
,
04167084
,
13331639
,
08505920
,
21123811
,
37442336
,
97836203
,
97489701
,
15982593
,
95095116
,
18666161
,
40939228
,
41517789
,
62180201
,
47084486
,
33746252
,
21208154
,
57793869
,
14799437
,
23440231
,
10669138
,
21637210
,
03134857
,
29479265
,
08763963
,
27572350
,
72402069
,
30604579
,
96633955
,
84815190
,
67508932
,
87460579
,
60465049
,
23288411
,
91588074
,
25451652
,
22073844
,
47556396
,
51522296
,
68199168
,
06150044
,
37663536
,
75286621
,
58481572
};
public
override
void
OnNewTurn
()
{
sendEventMsg2
=
false
;
sendEventMsg5
=
false
;
base
.
OnNewTurn
();
}
public
override
void
OnMove
(
int
cardId
,
int
previousControler
,
int
previousLocation
,
int
currentControler
,
int
currentLocation
)
{
if
(
previousLocation
==
0
&&
currentLocation
==
(
int
)
CardLocation
.
MonsterZone
)
{
if
(!
sendEventMsg2
&&
event2TriggerIdList
.
Contains
(
cardId
)
&&
currentControler
==
1
)
{
AI
.
SendCustomChat
((
int
)
CustomMessage
.
MSG_FOR_EVENT_2
);
sendEventMsg2
=
true
;
}
if
(!
sendEventMsg5
&&
event2TriggerIdList
.
Contains
(
cardId
)
&&
currentControler
==
0
&&
Duel
.
Phase
==
DuelPhase
.
Standby
)
{
AI
.
SendCustomChat
((
int
)
CustomMessage
.
MSG_FOR_EVENT_5
);
sendEventMsg5
=
true
;
}
}
base
.
OnMove
(
cardId
,
previousControler
,
previousLocation
,
currentControler
,
currentLocation
);
}
}
}
Game/AI/Dialogs.cs
View file @
85ba128e
...
...
@@ -180,7 +180,7 @@ namespace WindBot.Game.AI
public
void
SendCustomChat
(
int
index
,
params
object
[]
opts
)
{
if
(!
_game
.
_chat
||
_custom
==
null
)
if
(!
_game
.
_chat
||
_custom
==
null
||
_custom
.
Length
<=
index
)
return
;
string
message
=
string
.
Format
(
_custom
[
index
],
opts
);
if
(
message
!=
""
)
...
...
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