Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
ygopro-core
Commits
e94eff20
Commit
e94eff20
authored
Aug 01, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Card.IsCanChangePosition
parent
35b5c980
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
0 deletions
+15
-0
card.cpp
card.cpp
+5
-0
card.h
card.h
+1
-0
interpreter.cpp
interpreter.cpp
+1
-0
libcard.cpp
libcard.cpp
+7
-0
scriptlib.h
scriptlib.h
+1
-0
No files found.
card.cpp
View file @
e94eff20
...
...
@@ -3400,6 +3400,11 @@ int32 card::is_capable_change_position(uint8 playerid) {
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_capable_change_position_by_effect
(
uint8
playerid
)
{
if
(
data
.
type
&
TYPE_LINK
)
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_capable_turn_set
(
uint8
playerid
)
{
if
(
data
.
type
&
(
TYPE_LINK
|
TYPE_TOKEN
))
return
FALSE
;
...
...
card.h
View file @
e94eff20
...
...
@@ -308,6 +308,7 @@ public:
int32
is_capable_attack
();
int32
is_capable_attack_announce
(
uint8
playerid
);
int32
is_capable_change_position
(
uint8
playerid
);
int32
is_capable_change_position_by_effect
(
uint8
playerid
);
int32
is_capable_turn_set
(
uint8
playerid
);
int32
is_capable_change_control
();
int32
is_control_can_be_changed
(
int32
ignore_mzone
,
uint32
zone
);
...
...
interpreter.cpp
View file @
e94eff20
...
...
@@ -221,6 +221,7 @@ static const struct luaL_Reg cardlib[] = {
{
"GetCounter"
,
scriptlib
::
card_get_counter
},
{
"EnableCounterPermit"
,
scriptlib
::
card_enable_counter_permit
},
{
"SetCounterLimit"
,
scriptlib
::
card_set_counter_limit
},
{
"IsCanChangePosition"
,
scriptlib
::
card_is_can_change_position
},
{
"IsCanTurnSet"
,
scriptlib
::
card_is_can_turn_set
},
{
"IsCanAddCounter"
,
scriptlib
::
card_is_can_add_counter
},
{
"IsCanRemoveCounter"
,
scriptlib
::
card_is_can_remove_counter
},
...
...
libcard.cpp
View file @
e94eff20
...
...
@@ -2195,6 +2195,13 @@ int32 scriptlib::card_set_counter_limit(lua_State *L) {
pcard
->
add_effect
(
peffect
);
return
0
;
}
int32
scriptlib
::
card_is_can_change_position
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
lua_pushboolean
(
L
,
pcard
->
is_capable_change_position_by_effect
(
pcard
->
pduel
->
game_field
->
core
.
reason_player
));
return
1
;
}
int32
scriptlib
::
card_is_can_turn_set
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
...
...
scriptlib.h
View file @
e94eff20
...
...
@@ -223,6 +223,7 @@ public:
static
int32
card_get_counter
(
lua_State
*
L
);
static
int32
card_enable_counter_permit
(
lua_State
*
L
);
static
int32
card_set_counter_limit
(
lua_State
*
L
);
static
int32
card_is_can_change_position
(
lua_State
*
L
);
static
int32
card_is_can_turn_set
(
lua_State
*
L
);
static
int32
card_is_can_add_counter
(
lua_State
*
L
);
static
int32
card_is_can_remove_counter
(
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