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
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-core
Commits
2c3800be
Commit
2c3800be
authored
Apr 16, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update IsControlerCanBeChanged
parent
da5dc2c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
card.cpp
card.cpp
+2
-2
card.h
card.h
+1
-1
libcard.cpp
libcard.cpp
+4
-1
No files found.
card.cpp
View file @
2c3800be
...
...
@@ -3256,12 +3256,12 @@ int32 card::is_capable_change_control() {
return
FALSE
;
return
TRUE
;
}
int32
card
::
is_control_can_be_changed
()
{
int32
card
::
is_control_can_be_changed
(
int32
ignore_mzone
)
{
if
(
current
.
controler
==
PLAYER_NONE
)
return
FALSE
;
if
(
current
.
location
!=
LOCATION_MZONE
)
return
FALSE
;
if
(
pduel
->
game_field
->
get_useable_count
(
1
-
current
.
controler
,
LOCATION_MZONE
,
current
.
controler
,
LOCATION_REASON_CONTROL
)
<=
0
)
if
(
!
ignore_mzone
&&
pduel
->
game_field
->
get_useable_count
(
1
-
current
.
controler
,
LOCATION_MZONE
,
current
.
controler
,
LOCATION_REASON_CONTROL
)
<=
0
)
return
FALSE
;
if
((
get_type
()
&
TYPE_TRAPMONSTER
)
&&
pduel
->
game_field
->
get_useable_count
(
1
-
current
.
controler
,
LOCATION_SZONE
,
current
.
controler
,
LOCATION_REASON_CONTROL
)
<=
0
)
return
FALSE
;
...
...
card.h
View file @
2c3800be
...
...
@@ -297,7 +297,7 @@ public:
int32
is_capable_change_position
(
uint8
playerid
);
int32
is_capable_turn_set
(
uint8
playerid
);
int32
is_capable_change_control
();
int32
is_control_can_be_changed
();
int32
is_control_can_be_changed
(
int32
ignore_mzone
);
int32
is_capable_be_battle_target
(
card
*
pcard
);
int32
is_capable_be_effect_target
(
effect
*
peffect
,
uint8
playerid
);
int32
is_can_be_fusion_material
(
card
*
fcard
);
...
...
libcard.cpp
View file @
2c3800be
...
...
@@ -1954,7 +1954,10 @@ int32 scriptlib::card_is_controler_can_be_changed(lua_State *L) {
check_param_count
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
if
(
pcard
->
is_control_can_be_changed
())
int32
ign
=
FALSE
;
if
(
lua_gettop
(
L
)
>=
2
)
ign
=
lua_toboolean
(
L
,
2
);
if
(
pcard
->
is_control_can_be_changed
(
ign
))
lua_pushboolean
(
L
,
1
);
else
lua_pushboolean
(
L
,
0
);
...
...
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