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
e6585bbf
Commit
e6585bbf
authored
Mar 18, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:IceYGO/windbot
parents
bb7f6a1b
bbb765d1
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2267 additions
and
2252 deletions
+2267
-2252
Game/AI/Decks/FamiliarPossessedExecutor.cs
Game/AI/Decks/FamiliarPossessedExecutor.cs
+641
-643
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
+1273
-1273
Game/AI/Decks/TimeThiefExecutor.cs
Game/AI/Decks/TimeThiefExecutor.cs
+334
-334
Game/AI/Dialogs.cs
Game/AI/Dialogs.cs
+1
-1
Game/Deck.cs
Game/Deck.cs
+1
-1
Program.cs
Program.cs
+17
-0
No files found.
Game/AI/Decks/FamiliarPossessedExecutor.cs
View file @
e6585bbf
...
@@ -60,8 +60,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -60,8 +60,7 @@ namespace WindBot.Game.AI.Decks
public
const
int
WynnP
=
30674956
;
public
const
int
WynnP
=
30674956
;
public
const
int
HiitaP
=
48815792
;
public
const
int
HiitaP
=
48815792
;
public
const
int
LynaP
=
9839945
;
public
const
int
LynaP
=
9839945
;
// side
// side
public
const
int
Raigeki
=
12580477
;
public
const
int
Raigeki
=
12580477
;
public
const
int
lightningStorm
=
14532163
;
public
const
int
lightningStorm
=
14532163
;
public
const
int
CosmicCyclone
=
8267140
;
public
const
int
CosmicCyclone
=
8267140
;
...
@@ -100,7 +99,6 @@ namespace WindBot.Game.AI.Decks
...
@@ -100,7 +99,6 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
HarpieFeatherDuster
,
DefaultHarpiesFeatherDusterFirst
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
HarpieFeatherDuster
,
DefaultHarpiesFeatherDusterFirst
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CosmicCyclone
,
DefaultMysticalSpaceTyphoon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
CosmicCyclone
,
DefaultMysticalSpaceTyphoon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Raigeki
,
DefaultRaigeki
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Raigeki
,
DefaultRaigeki
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PotOfDesires
,
PotOfDesireseff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
PotOfDesires
,
PotOfDesireseff
);
//sp
//sp
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Linkuriboh
,
Linkuriboheff
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
Linkuriboh
,
Linkuriboheff
);
...
...
Game/AI/Decks/LightswornShaddoldinosourExecutor.cs
View file @
e6585bbf
Game/AI/Decks/TimeThiefExecutor.cs
View file @
e6585bbf
Game/AI/Dialogs.cs
View file @
e6585bbf
...
@@ -59,7 +59,7 @@ namespace WindBot.Game.AI
...
@@ -59,7 +59,7 @@ namespace WindBot.Game.AI
_game
=
game
;
_game
=
game
;
DataContractJsonSerializer
serializer
=
new
DataContractJsonSerializer
(
typeof
(
DialogsData
));
DataContractJsonSerializer
serializer
=
new
DataContractJsonSerializer
(
typeof
(
DialogsData
));
string
dialogfilename
=
game
.
Dialog
;
string
dialogfilename
=
game
.
Dialog
;
using
(
FileStream
fs
=
File
.
OpenRead
(
"Dialogs/"
+
dialogfilename
+
".
json"
))
using
(
FileStream
fs
=
Program
.
ReadFile
(
"Dialogs"
,
dialogfilename
,
"
json"
))
{
{
DialogsData
data
=
(
DialogsData
)
serializer
.
ReadObject
(
fs
);
DialogsData
data
=
(
DialogsData
)
serializer
.
ReadObject
(
fs
);
_welcome
=
data
.
welcome
;
_welcome
=
data
.
welcome
;
...
...
Game/Deck.cs
View file @
e6585bbf
...
@@ -43,7 +43,7 @@ namespace WindBot.Game
...
@@ -43,7 +43,7 @@ namespace WindBot.Game
StreamReader
reader
=
null
;
StreamReader
reader
=
null
;
try
try
{
{
reader
=
new
StreamReader
(
new
FileStream
(
"Decks/"
+
name
+
".ydk"
,
FileMode
.
Open
,
FileAccess
.
Read
));
reader
=
new
StreamReader
(
Program
.
ReadFile
(
"Decks"
,
name
,
"ydk"
));
Deck
deck
=
new
Deck
();
Deck
deck
=
new
Deck
();
bool
side
=
false
;
bool
side
=
false
;
...
...
Program.cs
View file @
e6585bbf
...
@@ -201,5 +201,22 @@ namespace WindBot
...
@@ -201,5 +201,22 @@ namespace WindBot
}
}
#endif
#endif
}
}
public
static
FileStream
ReadFile
(
string
directory
,
string
filename
,
string
extension
)
{
string
tryfilename
=
filename
+
"."
+
extension
;
string
fullpath
=
Path
.
Combine
(
directory
,
tryfilename
);
if
(!
File
.
Exists
(
fullpath
))
fullpath
=
filename
;
if
(!
File
.
Exists
(
fullpath
))
fullpath
=
Path
.
Combine
(
"../"
,
filename
);
if
(!
File
.
Exists
(
fullpath
))
fullpath
=
Path
.
Combine
(
"../deck/"
,
filename
);
if
(!
File
.
Exists
(
fullpath
))
fullpath
=
Path
.
Combine
(
"../"
,
tryfilename
);
if
(!
File
.
Exists
(
fullpath
))
fullpath
=
Path
.
Combine
(
"../deck/"
,
tryfilename
);
return
new
FileStream
(
fullpath
,
FileMode
.
Open
,
FileAccess
.
Read
);
}
}
}
}
}
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