Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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-2pick
Commits
3379c690
Commit
3379c690
authored
Oct 14, 2017
by
huangbiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IsRitualType
parent
e642bae7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
0 deletions
+24
-0
ocgcore/card.cpp
ocgcore/card.cpp
+6
-0
ocgcore/card.h
ocgcore/card.h
+2
-0
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+2
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+12
-0
ocgcore/scriptlib.h
ocgcore/scriptlib.h
+2
-0
No files found.
ocgcore/card.cpp
View file @
3379c690
...
@@ -16,6 +16,12 @@
...
@@ -16,6 +16,12 @@
#include <iostream>
#include <iostream>
#include <algorithm>
#include <algorithm>
//millux
uint32
card
::
get_ritual_type
()
{
if
(
current
.
location
==
LOCATION_SZONE
&&
(
data
.
type
&
TYPE_MONSTER
))
return
data
.
type
;
return
get_type
();
}
//222DIY
//222DIY
uint32
card
::
set_entity_code
(
uint32
entity_code
,
bool
remove_alias
)
{
uint32
card
::
set_entity_code
(
uint32
entity_code
,
bool
remove_alias
)
{
card_data
dat
;
card_data
dat
;
...
...
ocgcore/card.h
View file @
3379c690
...
@@ -104,6 +104,8 @@ public:
...
@@ -104,6 +104,8 @@ public:
public:
public:
void
addcard
(
card
*
pcard
);
void
addcard
(
card
*
pcard
);
};
};
//millux
uint32
get_ritual_type
();
//222DIY
//222DIY
uint32
set_entity_code
(
uint32
entity_code
,
bool
remove_alias
=
false
);
uint32
set_entity_code
(
uint32
entity_code
,
bool
remove_alias
=
false
);
...
...
ocgcore/interpreter.cpp
View file @
3379c690
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
#include "interpreter.h"
#include "interpreter.h"
static
const
struct
luaL_Reg
cardlib
[]
=
{
static
const
struct
luaL_Reg
cardlib
[]
=
{
//millux
{
"IsRitualType"
,
scriptlib
::
card_is_ritual_type
},
//222DIY
//222DIY
{
"GetAffectingEffect"
,
scriptlib
::
card_get_affecting_effect
},
{
"GetAffectingEffect"
,
scriptlib
::
card_get_affecting_effect
},
{
"FilterEffect"
,
scriptlib
::
card_filter_effect
},
{
"FilterEffect"
,
scriptlib
::
card_filter_effect
},
...
...
ocgcore/libcard.cpp
View file @
3379c690
...
@@ -13,6 +13,18 @@
...
@@ -13,6 +13,18 @@
#include "group.h"
#include "group.h"
#include <iostream>
#include <iostream>
//millux
int32
scriptlib
::
card_is_ritual_type
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
ttype
=
lua_tointeger
(
L
,
2
);
if
(
pcard
->
get_ritual_type
()
&
ttype
)
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
}
//222DIY functions
//222DIY functions
int32
scriptlib
::
card_get_affecting_effect
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_affecting_effect
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
...
...
ocgcore/scriptlib.h
View file @
3379c690
...
@@ -16,6 +16,8 @@ public:
...
@@ -16,6 +16,8 @@ public:
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
);
//millux
static
int32
card_is_ritual_type
(
lua_State
*
L
);
//222DIY
//222DIY
static
int32
card_get_affecting_effect
(
lua_State
*
L
);
static
int32
card_get_affecting_effect
(
lua_State
*
L
);
static
int32
card_set_entity_code
(
lua_State
*
L
);
static
int32
card_set_entity_code
(
lua_State
*
L
);
...
...
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