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
nanahira
windbot
Commits
b65ac137
Commit
b65ac137
authored
Mar 24, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialogs
parent
5a7b6557
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
176 additions
and
72 deletions
+176
-72
Game/AI/Dialogs.cs
Game/AI/Dialogs.cs
+41
-71
WindBot.csproj
WindBot.csproj
+11
-1
dialogs/default.json
dialogs/default.json
+62
-0
dialogs/zh-CN.json
dialogs/zh-CN.json
+62
-0
No files found.
Game/AI/Dialogs.cs
View file @
b65ac137
using
System.Collections.Generic
;
using
System.IO
;
using
System.Collections.Generic
;
using
System.Runtime.Serialization
;
using
System.Runtime.Serialization.Json
;
namespace
WindBot.Game.AI
{
[
DataContract
]
public
class
DialogsData
{
[
DataMember
]
public
string
duelstart
{
get
;
set
;
}
[
DataMember
]
public
string
newturn
{
get
;
set
;
}
[
DataMember
]
public
string
endturn
{
get
;
set
;
}
[
DataMember
]
public
string
directattack
{
get
;
set
;
}
[
DataMember
]
public
string
attack
{
get
;
set
;
}
[
DataMember
]
public
string
activate
{
get
;
set
;
}
[
DataMember
]
public
string
summon
{
get
;
set
;
}
[
DataMember
]
public
string
setmonster
{
get
;
set
;
}
[
DataMember
]
public
string
chaining
{
get
;
set
;
}
}
public
class
Dialogs
{
private
GameClient
_game
;
...
...
@@ -19,75 +44,20 @@ namespace WindBot.Game.AI
public
Dialogs
(
GameClient
game
)
{
_game
=
game
;
_duelstart
=
new
[]
{
"Good luck, have fun."
};
_newturn
=
new
[]
{
"It's my turn, draw."
,
"My turn, draw."
,
"I draw a card."
};
_endturn
=
new
[]
{
"I end my turn."
,
"My turn is over."
,
"Your turn."
};
_directattack
=
new
[]
{
"{0}, direct attack!"
,
"{0}, attack him directly!"
,
"{0}, he's defenseless, attack!"
,
"{0}, attack his life points!"
,
"{0}, attack his life points directly!"
,
"{0}, attack him through a direct attack!"
,
"{0}, attack him using a direct attack!"
,
"{0}, unleash your power through a direct attack!"
,
"My {0} is going to smash your life points!"
,
"Show your power to my opponent, {0}!"
,
"You can't stop me. {0}, attack!"
};
_attack
=
new
[]
{
"{0}, attack this {1}!"
,
"{0}, destroy this {1}!"
,
"{0}, charge the {1}!"
,
"{0}, strike that {1}!"
,
"{0}, unleash your power on this {1}!"
};
_activate
=
new
[]
{
"I'm activating {0}."
,
"I'm using the effect of {0}."
,
"I use the power of {0}."
};
_summon
=
new
[]
{
"I'm summoning {0}."
,
"Come on, {0}!"
,
"Appear, {0}!"
,
"I summon the powerful {0}."
,
"I call {0} to the battle!"
,
"I'm calling {0}."
,
"Let's summon {0}."
};
_setmonster
=
new
[]
{
"I'm setting a monster."
,
"I set a face-down monster."
,
"I place a hidden monster."
};
_chaining
=
new
[]
{
"Look at that! I'm activating {0}."
,
"I use the power of {0}."
,
"Get ready! I use {0}."
,
"I don't think so. {0}, activation!"
,
"Looks like you forgot my {0}."
,
"Did you consider the fact I have {0}?"
};
DataContractJsonSerializer
serializer
=
new
DataContractJsonSerializer
(
typeof
(
DialogsData
));
using
(
FileStream
fs
=
File
.
OpenRead
(
"Dialogs/"
+
Environment
.
GetEnvironmentVariable
(
"YGOPRO_DIALOG"
)
+
".json"
))
{
DialogsData
data
=
(
DialogsData
)
serializer
.
ReadObject
();
_duelstart
=
data
.
duelstart
;
_newturn
=
data
.
newturn
;
_endturn
=
data
.
endturn
;
_directattack
=
data
.
directattack
;
_attack
=
data
.
attack
;
_activate
=
data
.
activate
;
_summon
=
data
.
summon
;
_setmonster
=
data
.
setmonster
;
_chaining
=
data
.
chaining
;
}
}
public
void
SendDuelStart
()
...
...
@@ -141,4 +111,4 @@ namespace WindBot.Game.AI
_game
.
Chat
(
message
);
}
}
}
\ No newline at end of file
}
WindBot.csproj
View file @
b65ac137
...
...
@@ -41,6 +41,8 @@
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Runtime.Serialization"
/>
<Reference
Include=
"System.Xml"
/>
<Reference
Include=
"YGOSharp.Network"
>
<HintPath>
.\YGOSharp.Network.dll
</HintPath>
</Reference>
...
...
@@ -116,6 +118,14 @@
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None
Include=
"Dialogs\default.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"Dialogs\zh-CN.json"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
...
...
@@ -124,4 +134,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
</Project>
dialogs/default.json
0 → 100644
View file @
b65ac137
{
"duelstart"
:
[
"Good luck, have fun."
],
"newturn"
:
[
"It's my turn, draw."
,
"My turn, draw."
,
"I draw a card."
],
"endturn"
:
[
"I end my turn."
,
"My turn is over."
,
"Your turn."
],
"directattack"
:
[
"{0}, direct attack!"
,
"{0}, attack him directly!"
,
"{0}, he's defenseless, attack!"
,
"{0}, attack his life points!"
,
"{0}, attack his life points directly!"
,
"{0}, attack him through a direct attack!"
,
"{0}, attack him using a direct attack!"
,
"{0}, unleash your power through a direct attack!"
,
"My {0} is going to smash your life points!"
,
"Show your power to my opponent, {0}!"
,
"You can't stop me. {0}, attack!"
],
"attack"
:
[
"{0}, attack this {1}!"
,
"{0}, destroy this {1}!"
,
"{0}, charge the {1}!"
,
"{0}, strike that {1}!"
,
"{0}, unleash your power on this {1}!"
],
"activate"
:
[
"I'm activating {0}."
,
"I'm using the effect of {0}."
,
"I use the power of {0}."
],
"summon"
:
[
"I'm summoning {0}."
,
"Come on, {0}!"
,
"Appear, {0}!"
,
"I summon the powerful {0}."
,
"I call {0} to the battle!"
,
"I'm calling {0}."
,
"Let's summon {0}."
],
"setmonster"
:
[
"I'm setting a monster."
,
"I set a face-down monster."
,
"I place a hidden monster."
],
"chaining"
:
[
"Look at that! I'm activating {0}."
,
"I use the power of {0}."
,
"Get ready! I use {0}."
,
"I don't think so. {0}, activation!"
,
"Looks like you forgot my {0}."
,
"Did you consider the fact I have {0}?"
]
}
\ No newline at end of file
dialogs/zh-CN.json
0 → 100644
View file @
b65ac137
{
"duelstart"
:
[
"Good luck,have fun"
],
"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} 上吧!"
],
"activate"
:
[
"我发动 {0}"
,
"我使用 {0} 的效果"
,
"我使用 {0} 的力量"
],
"summon"
:
[
"我召唤 {0}"
,
"出来吧,{0}!"
,
"出现吧,{0}!"
,
"我召唤了强大的 {0}"
,
"我呼唤 {0} 参加战斗!"
,
"我呼唤出 {0}"
,
"让我召唤 {0}"
],
"setmonster"
:
[
"我放置了一只怪兽"
,
"我里侧表示放置了一只怪兽"
,
"我放置了一只迷之怪兽"
],
"chaining"
:
[
"看这里!我发动 {0}"
,
"我使用 {0} 的力量"
,
"准备!我使用 {0}"
,
"我不认同。{0},发动!"
,
"看样子你忘了我的 {0}"
,
"你考虑过我有 {0} 吗?"
]
}
\ No newline at end of file
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