Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
9e29dbcf
Commit
9e29dbcf
authored
Aug 11, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync
parent
4cf9d93e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
34 additions
and
31 deletions
+34
-31
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+0
-1
Classes/ocgcore/card.h
Classes/ocgcore/card.h
+0
-1
Classes/ocgcore/effect.cpp
Classes/ocgcore/effect.cpp
+0
-1
Classes/ocgcore/effect.h
Classes/ocgcore/effect.h
+0
-1
Classes/ocgcore/group.cpp
Classes/ocgcore/group.cpp
+0
-3
Classes/ocgcore/group.h
Classes/ocgcore/group.h
+0
-1
Classes/ocgcore/scriptlib.cpp
Classes/ocgcore/scriptlib.cpp
+32
-22
Classes/ocgcore/scriptlib.h
Classes/ocgcore/scriptlib.h
+1
-0
mobile/assets_en/data/conf/bot.conf
mobile/assets_en/data/conf/bot.conf
+1
-1
No files found.
Classes/ocgcore/card.cpp
View file @
9e29dbcf
...
@@ -64,7 +64,6 @@ void card_data::clear() {
...
@@ -64,7 +64,6 @@ void card_data::clear() {
std
::
memset
(
this
,
0
,
sizeof
(
card_data
));
std
::
memset
(
this
,
0
,
sizeof
(
card_data
));
}
}
card
::
card
(
duel
*
pd
)
{
card
::
card
(
duel
*
pd
)
{
scrtype
=
1
;
ref_handle
=
0
;
ref_handle
=
0
;
pduel
=
pd
;
pduel
=
pd
;
owner
=
PLAYER_NONE
;
owner
=
PLAYER_NONE
;
...
...
Classes/ocgcore/card.h
View file @
9e29dbcf
...
@@ -124,7 +124,6 @@ public:
...
@@ -124,7 +124,6 @@ public:
uint8
location
;
uint8
location
;
uint8
sequence
;
uint8
sequence
;
};
};
int32
scrtype
;
int32
ref_handle
;
int32
ref_handle
;
duel
*
pduel
;
duel
*
pduel
;
card_data
data
;
card_data
data
;
...
...
Classes/ocgcore/effect.cpp
View file @
9e29dbcf
...
@@ -15,7 +15,6 @@ bool effect_sort_id(const effect* e1, const effect* e2) {
...
@@ -15,7 +15,6 @@ bool effect_sort_id(const effect* e1, const effect* e2) {
return
e1
->
id
<
e2
->
id
;
return
e1
->
id
<
e2
->
id
;
};
};
effect
::
effect
(
duel
*
pd
)
{
effect
::
effect
(
duel
*
pd
)
{
scrtype
=
3
;
ref_handle
=
0
;
ref_handle
=
0
;
pduel
=
pd
;
pduel
=
pd
;
owner
=
0
;
owner
=
0
;
...
...
Classes/ocgcore/effect.h
View file @
9e29dbcf
...
@@ -27,7 +27,6 @@ enum effect_flag2 : uint32;
...
@@ -27,7 +27,6 @@ enum effect_flag2 : uint32;
class
effect
{
class
effect
{
public:
public:
int32
scrtype
;
int32
ref_handle
;
int32
ref_handle
;
duel
*
pduel
;
duel
*
pduel
;
card
*
owner
;
card
*
owner
;
...
...
Classes/ocgcore/group.cpp
View file @
9e29dbcf
...
@@ -10,20 +10,17 @@
...
@@ -10,20 +10,17 @@
#include "duel.h"
#include "duel.h"
group
::
group
(
duel
*
pd
)
{
group
::
group
(
duel
*
pd
)
{
scrtype
=
2
;
ref_handle
=
0
;
ref_handle
=
0
;
pduel
=
pd
;
pduel
=
pd
;
is_readonly
=
FALSE
;
is_readonly
=
FALSE
;
}
}
group
::
group
(
duel
*
pd
,
card
*
pcard
)
{
group
::
group
(
duel
*
pd
,
card
*
pcard
)
{
container
.
insert
(
pcard
);
container
.
insert
(
pcard
);
scrtype
=
2
;
ref_handle
=
0
;
ref_handle
=
0
;
pduel
=
pd
;
pduel
=
pd
;
is_readonly
=
FALSE
;
is_readonly
=
FALSE
;
}
}
group
::
group
(
duel
*
pd
,
const
card_set
&
cset
)
:
container
(
cset
)
{
group
::
group
(
duel
*
pd
,
const
card_set
&
cset
)
:
container
(
cset
)
{
scrtype
=
2
;
ref_handle
=
0
;
ref_handle
=
0
;
pduel
=
pd
;
pduel
=
pd
;
is_readonly
=
FALSE
;
is_readonly
=
FALSE
;
...
...
Classes/ocgcore/group.h
View file @
9e29dbcf
...
@@ -18,7 +18,6 @@ class duel;
...
@@ -18,7 +18,6 @@ class duel;
class
group
{
class
group
{
public:
public:
typedef
std
::
set
<
card
*
,
card_sort
>
card_set
;
typedef
std
::
set
<
card
*
,
card_sort
>
card_set
;
int32
scrtype
;
int32
ref_handle
;
int32
ref_handle
;
duel
*
pduel
;
duel
*
pduel
;
card_set
container
;
card_set
container
;
...
...
Classes/ocgcore/scriptlib.cpp
View file @
9e29dbcf
...
@@ -7,54 +7,64 @@
...
@@ -7,54 +7,64 @@
#include "scriptlib.h"
#include "scriptlib.h"
#include "duel.h"
#include "duel.h"
int32
scriptlib
::
check_data_type
(
lua_State
*
L
,
int32
index
,
const
char
*
tname
)
{
int32
result
=
FALSE
;
if
(
lua_getmetatable
(
L
,
index
))
{
lua_getglobal
(
L
,
tname
);
if
(
lua_rawequal
(
L
,
-
1
,
-
2
))
result
=
TRUE
;
lua_pop
(
L
,
2
);
}
return
result
;
}
int32
scriptlib
::
check_param
(
lua_State
*
L
,
int32
param_type
,
int32
index
,
int32
retfalse
)
{
int32
scriptlib
::
check_param
(
lua_State
*
L
,
int32
param_type
,
int32
index
,
int32
retfalse
)
{
int32
result
;
switch
(
param_type
)
{
switch
(
param_type
)
{
case
PARAM_TYPE_CARD
:
case
PARAM_TYPE_CARD
:
{
i
f
(
lua_isuserdata
(
L
,
index
))
{
i
nt32
result
=
FALSE
;
result
=
**
(
int32
**
)
lua_touserdata
(
L
,
index
);
if
(
lua_isuserdata
(
L
,
index
)
&&
lua_getmetatable
(
L
,
index
))
{
if
(
result
==
1
)
result
=
check_data_type
(
L
,
-
1
,
"Card"
);
return
TRUE
;
lua_pop
(
L
,
1
)
;
}
}
if
(
result
)
return
TRUE
;
if
(
retfalse
)
if
(
retfalse
)
return
FALSE
;
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
."
,
index
);
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
."
,
index
);
break
;
break
;
case
PARAM_TYPE_GROUP
:
}
if
(
lua_isuserdata
(
L
,
index
))
{
case
PARAM_TYPE_GROUP
:
{
result
=
**
(
int32
**
)
lua_touserdata
(
L
,
index
);
if
(
lua_isuserdata
(
L
,
index
)
&&
check_data_type
(
L
,
index
,
"Group"
))
if
(
result
==
2
)
return
TRUE
;
return
TRUE
;
}
if
(
retfalse
)
if
(
retfalse
)
return
FALSE
;
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
Group
\"
."
,
index
);
luaL_error
(
L
,
"Parameter %d should be
\"
Group
\"
."
,
index
);
break
;
break
;
case
PARAM_TYPE_EFFECT
:
}
if
(
lua_isuserdata
(
L
,
index
))
{
case
PARAM_TYPE_EFFECT
:
{
result
=
**
(
int32
**
)
lua_touserdata
(
L
,
index
);
if
(
lua_isuserdata
(
L
,
index
)
&&
check_data_type
(
L
,
index
,
"Effect"
))
if
(
result
==
3
)
return
TRUE
;
return
TRUE
;
}
if
(
retfalse
)
if
(
retfalse
)
return
FALSE
;
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
Effect
\"
."
,
index
);
luaL_error
(
L
,
"Parameter %d should be
\"
Effect
\"
."
,
index
);
break
;
break
;
case
PARAM_TYPE_FUNCTION
:
}
if
(
lua_isfunction
(
L
,
index
))
case
PARAM_TYPE_FUNCTION
:
{
if
(
lua_isfunction
(
L
,
index
))
return
TRUE
;
return
TRUE
;
if
(
retfalse
)
if
(
retfalse
)
return
FALSE
;
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
Function
\"
."
,
index
);
luaL_error
(
L
,
"Parameter %d should be
\"
Function
\"
."
,
index
);
break
;
break
;
case
PARAM_TYPE_STRING
:
}
if
(
lua_isstring
(
L
,
index
))
case
PARAM_TYPE_STRING
:
{
if
(
lua_isstring
(
L
,
index
))
return
TRUE
;
return
TRUE
;
if
(
retfalse
)
if
(
retfalse
)
return
FALSE
;
return
FALSE
;
luaL_error
(
L
,
"Parameter %d should be
\"
String
\"
."
,
index
);
luaL_error
(
L
,
"Parameter %d should be
\"
String
\"
."
,
index
);
break
;
break
;
}
}
}
return
FALSE
;
return
FALSE
;
}
}
...
...
Classes/ocgcore/scriptlib.h
View file @
9e29dbcf
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
class
scriptlib
{
class
scriptlib
{
public:
public:
static
int32
check_data_type
(
lua_State
*
L
,
int32
index
,
const
char
*
tname
);
static
int32
check_param
(
lua_State
*
L
,
int32
param_type
,
int32
index
,
BOOL
retfalse
=
FALSE
);
static
int32
check_param
(
lua_State
*
L
,
int32
param_type
,
int32
index
,
BOOL
retfalse
=
FALSE
);
static
int32
check_param_count
(
lua_State
*
L
,
int32
count
);
static
int32
check_param_count
(
lua_State
*
L
,
int32
count
);
static
int32
check_action_permission
(
lua_State
*
L
);
static
int32
check_action_permission
(
lua_State
*
L
);
...
...
mobile/assets_en/data/conf/bot.conf
View file @
9e29dbcf
...
@@ -100,6 +100,6 @@ TimeLord Chain Burn Deck
...
@@ -100,6 +100,6 @@ TimeLord Chain Burn Deck
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
!
CopyDiplodocus
-
SkyStrikerAce
!
CopyDiplodocus
-
SkyStrikerAce
Name
=
复制梁龙
Deck
=
SkyStriker
Dialog
=
default
Name
=
CopyDiplodocus
Deck
=
SkyStriker
Dialog
=
default
Basic
SkyStrikerAce
Deck
Basic
SkyStrikerAce
Deck
SUPPORT_NEW_MASTER_RULE
SUPPORT_NEW_MASTER_RULE
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