Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-arena-api
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
MyCard
ygopro-arena-api
Commits
9dca4fc2
Commit
9dca4fc2
authored
Jul 18, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入电子界
parent
57c520a7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
6 deletions
+47
-6
.gitignore
.gitignore
+2
-0
cardinfo.json
cardinfo.json
+2
-0
routes/api.js
routes/api.js
+43
-6
No files found.
.gitignore
View file @
9dca4fc2
...
@@ -9,3 +9,5 @@ db.config.js
...
@@ -9,3 +9,5 @@ db.config.js
test.js
test.js
db.sql
db.sql
upload/
upload/
plan.md
query.sql
cardinfo.json
View file @
9dca4fc2
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
"1041"
:
"幻神兽"
,
"1041"
:
"幻神兽"
,
"1042"
:
"创造神"
,
"1042"
:
"创造神"
,
"1043"
:
"幻龙"
,
"1043"
:
"幻龙"
,
"1044"
:
"电子界"
,
"1050"
:
"怪兽"
,
"1050"
:
"怪兽"
,
"1051"
:
"魔法"
,
"1051"
:
"魔法"
,
"1052"
:
"陷阱"
,
"1052"
:
"陷阱"
,
...
@@ -89,6 +90,7 @@
...
@@ -89,6 +90,7 @@
"1041"
:
"Divine-Beast"
,
"1041"
:
"Divine-Beast"
,
"1042"
:
"Creator God"
,
"1042"
:
"Creator God"
,
"1043"
:
"Wyrm"
,
"1043"
:
"Wyrm"
,
"1044"
:
"Cyberse"
,
"1050"
:
"Monster"
,
"1050"
:
"Monster"
,
"1051"
:
"Spell"
,
"1051"
:
"Spell"
,
"1052"
:
"Trap"
,
"1052"
:
"Trap"
,
...
...
routes/api.js
View file @
9dca4fc2
...
@@ -17,6 +17,19 @@ var attrOffset = 1010
...
@@ -17,6 +17,19 @@ var attrOffset = 1010
var
raceOffset
=
1020
var
raceOffset
=
1020
var
typeOffset
=
1050
var
typeOffset
=
1050
var
constants
=
{
"
LINK_MARKERS
"
:
{
"
LINK_MARKER_BOTTOM_LEFT
"
:
1
,
"
LINK_MARKER_BOTTOM
"
:
2
,
"
LINK_MARKER_BOTTOM_RIGHT
"
:
4
,
"
LINK_MARKER_LEFT
"
:
8
,
"
LINK_MARKER_RIGHT
"
:
32
,
"
LINK_MARKER_TOP_LEFT
"
:
64
,
"
LINK_MARKER_TOP
"
:
128
,
"
LINK_MARKER_TOP_RIGHT
"
:
256
}
}
//this initializes a connection pool
//this initializes a connection pool
//it will keep idle connections open for a 30 seconds
//it will keep idle connections open for a 30 seconds
//and set a limit of maximum 10 idle clients
//and set a limit of maximum 10 idle clients
...
@@ -417,8 +430,32 @@ router.get('/cardinfo', function (req, res) {
...
@@ -417,8 +430,32 @@ router.get('/cardinfo', function (req, res) {
result
.
alias
=
row
.
alias
result
.
alias
=
row
.
alias
result
.
setcode
=
row
.
setcode
result
.
setcode
=
row
.
setcode
result
.
atk
=
row
.
atk
result
.
atk
=
row
.
atk
result
.
def
=
row
.
def
result
.
def
=
row
.
def
// 电子界 特殊处理防御
if
(
row
.
race
==
16777216
)
{
if
(
result
.
def
&
constants
.
LINK_MARKERS
.
LINK_MARKER_TOP_LEFT
)
result
.
name
+=
"
[↖]
"
;
if
(
result
.
def
&
constants
.
LINK_MARKERS
.
LINK_MARKER_TOP
)
result
.
name
+=
"
[↑]
"
;
if
(
result
.
def
&
constants
.
LINK_MARKERS
.
LINK_MARKER_TOP_RIGHT
)
result
.
name
+=
"
[↗]
"
;
if
(
result
.
def
&
constants
.
LINK_MARKERS
.
LINK_MARKER_LEFT
)
result
.
name
+=
"
[←]
"
;
if
(
result
.
def
&
constants
.
LINK_MARKERS
.
LINK_MARKER_RIGHT
)
result
.
name
+=
"
[→]
"
;
if
(
result
.
def
&
constants
.
LINK_MARKERS
.
LINK_MARKER_BOTTOM_LEFT
)
result
.
name
+=
"
[↙]
"
;
if
(
result
.
def
&
constants
.
LINK_MARKERS
.
LINK_MARKER_BOTTOM
)
result
.
name
+=
"
[↓]
"
;
if
(
result
.
def
&
constants
.
LINK_MARKERS
.
LINK_MARKER_BOTTOM_RIGHT
)
result
.
name
+=
"
[↘]
"
;
result
.
def
=
'
-
'
}
if
(
row
.
level
<=
12
)
{
if
(
row
.
level
<=
12
)
{
result
.
level
=
row
.
level
result
.
level
=
row
.
level
}
else
{
}
else
{
...
...
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