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
f7df0b9b
Commit
f7df0b9b
authored
May 07, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
0d77c959
93bb39b4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
135 additions
and
46 deletions
+135
-46
card.cpp
card.cpp
+2
-2
field.cpp
field.cpp
+2
-2
field.h
field.h
+1
-1
libcard.cpp
libcard.cpp
+60
-10
libduel.cpp
libduel.cpp
+66
-31
operations.cpp
operations.cpp
+4
-0
No files found.
card.cpp
View file @
f7df0b9b
...
@@ -1676,7 +1676,7 @@ int32 card::add_effect(effect* peffect) {
...
@@ -1676,7 +1676,7 @@ int32 card::add_effect(effect* peffect) {
if
((
peffect
->
code
==
EFFECT_SET_ATTACK
||
peffect
->
code
==
EFFECT_SET_BASE_ATTACK
)
&&
!
peffect
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
{
if
((
peffect
->
code
==
EFFECT_SET_ATTACK
||
peffect
->
code
==
EFFECT_SET_BASE_ATTACK
)
&&
!
peffect
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
{
for
(
auto
it
=
single_effect
.
begin
();
it
!=
single_effect
.
end
();)
{
for
(
auto
it
=
single_effect
.
begin
();
it
!=
single_effect
.
end
();)
{
auto
rm
=
it
++
;
auto
rm
=
it
++
;
if
((
rm
->
second
->
code
==
EFFECT_SET_ATTACK
||
rm
->
second
->
code
==
EFFECT_SET_ATTACK_FINAL
)
if
((
rm
->
second
->
code
==
EFFECT_SET_ATTACK
||
rm
->
second
->
code
==
EFFECT_SET_ATTACK_FINAL
||
rm
->
second
->
code
==
EFFECT_SET_BASE_ATTACK
)
&&
!
rm
->
second
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
&&
!
rm
->
second
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
remove_effect
(
rm
->
second
);
remove_effect
(
rm
->
second
);
}
}
...
@@ -1692,7 +1692,7 @@ int32 card::add_effect(effect* peffect) {
...
@@ -1692,7 +1692,7 @@ int32 card::add_effect(effect* peffect) {
if
((
peffect
->
code
==
EFFECT_SET_DEFENSE
||
peffect
->
code
==
EFFECT_SET_BASE_DEFENSE
)
&&
!
peffect
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
{
if
((
peffect
->
code
==
EFFECT_SET_DEFENSE
||
peffect
->
code
==
EFFECT_SET_BASE_DEFENSE
)
&&
!
peffect
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
{
for
(
auto
it
=
single_effect
.
begin
();
it
!=
single_effect
.
end
();)
{
for
(
auto
it
=
single_effect
.
begin
();
it
!=
single_effect
.
end
();)
{
auto
rm
=
it
++
;
auto
rm
=
it
++
;
if
((
rm
->
second
->
code
==
EFFECT_SET_DEFENSE
||
rm
->
second
->
code
==
EFFECT_SET_DEFENSE_FINAL
)
if
((
rm
->
second
->
code
==
EFFECT_SET_DEFENSE
||
rm
->
second
->
code
==
EFFECT_SET_DEFENSE_FINAL
||
rm
->
second
->
code
==
EFFECT_SET_BASE_DEFENSE
)
&&
!
rm
->
second
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
&&
!
rm
->
second
->
is_flag
(
EFFECT_FLAG_SINGLE_RANGE
))
remove_effect
(
rm
->
second
);
remove_effect
(
rm
->
second
);
}
}
...
...
field.cpp
View file @
f7df0b9b
...
@@ -2864,9 +2864,9 @@ int32 field::is_player_can_discard_hand(uint8 playerid, card * pcard, effect * p
...
@@ -2864,9 +2864,9 @@ int32 field::is_player_can_discard_hand(uint8 playerid, card * pcard, effect * p
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
is_player_can_
summon
(
uint8
playerid
)
{
int32
field
::
is_player_can_
action
(
uint8
playerid
,
uint32
actionlimit
)
{
effect_set
eset
;
effect_set
eset
;
filter_player_effect
(
playerid
,
EFFECT_CANNOT_SUMMON
,
&
eset
);
filter_player_effect
(
playerid
,
actionlimit
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
target
)
if
(
!
eset
[
i
]
->
target
)
return
FALSE
;
return
FALSE
;
...
...
field.h
View file @
f7df0b9b
...
@@ -447,7 +447,7 @@ public:
...
@@ -447,7 +447,7 @@ public:
int32
is_player_can_discard_deck
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_deck
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_deck_as_cost
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_deck_as_cost
(
uint8
playerid
,
int32
count
);
int32
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
peffect
,
uint32
reason
);
int32
is_player_can_discard_hand
(
uint8
playerid
,
card
*
pcard
,
effect
*
peffect
,
uint32
reason
);
int32
is_player_can_
summon
(
uint8
playerid
);
int32
is_player_can_
action
(
uint8
playerid
,
uint32
actionlimit
);
int32
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
);
int32
is_player_can_summon
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
);
int32
is_player_can_mset
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
);
int32
is_player_can_mset
(
uint32
sumtype
,
uint8
playerid
,
card
*
pcard
,
uint8
toplayer
);
int32
is_player_can_sset
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_sset
(
uint8
playerid
,
card
*
pcard
);
...
...
libcard.cpp
View file @
f7df0b9b
...
@@ -158,40 +158,90 @@ int32 scriptlib::card_is_set_card(lua_State *L) {
...
@@ -158,40 +158,90 @@ int32 scriptlib::card_is_set_card(lua_State *L) {
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
set_code
=
lua_tointeger
(
L
,
2
);
uint32
count
=
lua_gettop
(
L
)
-
1
;
lua_pushboolean
(
L
,
pcard
->
is_set_card
(
set_code
));
uint32
result
=
FALSE
;
for
(
uint32
i
=
0
;
i
<
count
;
++
i
)
{
if
(
lua_isnil
(
L
,
i
+
2
))
continue
;
uint32
set_code
=
lua_tointeger
(
L
,
i
+
2
);
if
(
pcard
->
is_set_card
(
set_code
))
{
result
=
TRUE
;
break
;
}
}
lua_pushboolean
(
L
,
result
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_origin_set_card
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_origin_set_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
set_code
=
lua_tointeger
(
L
,
2
);
uint32
count
=
lua_gettop
(
L
)
-
1
;
lua_pushboolean
(
L
,
pcard
->
is_origin_set_card
(
set_code
));
uint32
result
=
FALSE
;
for
(
uint32
i
=
0
;
i
<
count
;
++
i
)
{
if
(
lua_isnil
(
L
,
i
+
2
))
continue
;
uint32
set_code
=
lua_tointeger
(
L
,
i
+
2
);
if
(
pcard
->
is_origin_set_card
(
set_code
))
{
result
=
TRUE
;
break
;
}
}
lua_pushboolean
(
L
,
result
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_pre_set_card
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_pre_set_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
set_code
=
lua_tointeger
(
L
,
2
);
uint32
count
=
lua_gettop
(
L
)
-
1
;
lua_pushboolean
(
L
,
pcard
->
is_pre_set_card
(
set_code
));
uint32
result
=
FALSE
;
for
(
uint32
i
=
0
;
i
<
count
;
++
i
)
{
if
(
lua_isnil
(
L
,
i
+
2
))
continue
;
uint32
set_code
=
lua_tointeger
(
L
,
i
+
2
);
if
(
pcard
->
is_pre_set_card
(
set_code
))
{
result
=
TRUE
;
break
;
}
}
lua_pushboolean
(
L
,
result
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_fusion_set_card
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_fusion_set_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
set_code
=
lua_tointeger
(
L
,
2
);
uint32
count
=
lua_gettop
(
L
)
-
1
;
lua_pushboolean
(
L
,
pcard
->
is_fusion_set_card
(
set_code
));
uint32
result
=
FALSE
;
for
(
uint32
i
=
0
;
i
<
count
;
++
i
)
{
if
(
lua_isnil
(
L
,
i
+
2
))
continue
;
uint32
set_code
=
lua_tointeger
(
L
,
i
+
2
);
if
(
pcard
->
is_fusion_set_card
(
set_code
))
{
result
=
TRUE
;
break
;
}
}
lua_pushboolean
(
L
,
result
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_is_link_set_card
(
lua_State
*
L
)
{
int32
scriptlib
::
card_is_link_set_card
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
set_code
=
lua_tointeger
(
L
,
2
);
uint32
count
=
lua_gettop
(
L
)
-
1
;
lua_pushboolean
(
L
,
pcard
->
is_link_set_card
(
set_code
));
uint32
result
=
FALSE
;
for
(
uint32
i
=
0
;
i
<
count
;
++
i
)
{
if
(
lua_isnil
(
L
,
i
+
2
))
continue
;
uint32
set_code
=
lua_tointeger
(
L
,
i
+
2
);
if
(
pcard
->
is_link_set_card
(
set_code
))
{
result
=
TRUE
;
break
;
}
}
lua_pushboolean
(
L
,
result
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
card_get_type
(
lua_State
*
L
)
{
int32
scriptlib
::
card_get_type
(
lua_State
*
L
)
{
...
...
libduel.cpp
View file @
f7df0b9b
...
@@ -561,18 +561,23 @@ int32 scriptlib::duel_get_operated_group(lua_State *L) {
...
@@ -561,18 +561,23 @@ int32 scriptlib::duel_get_operated_group(lua_State *L) {
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_can_add_counter
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_can_add_counter
(
lua_State
*
L
)
{
check_param_count
(
L
,
4
);
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
countertype
=
lua_tointeger
(
L
,
2
);
int32
count
=
lua_tointeger
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
4
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
4
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_place_counter
(
playerid
,
pcard
,
countertype
,
count
));
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_action
(
playerid
,
EFFECT_CANNOT_PLACE_COUNTER
));
else
{
check_param_count
(
L
,
4
);
int32
countertype
=
lua_tointeger
(
L
,
2
);
int32
count
=
lua_tointeger
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
4
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
4
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_place_counter
(
playerid
,
pcard
,
countertype
,
count
));
}
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_remove_counter
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_remove_counter
(
lua_State
*
L
)
{
...
@@ -3497,7 +3502,7 @@ int32 scriptlib::duel_is_player_can_summon(lua_State * L) {
...
@@ -3497,7 +3502,7 @@ int32 scriptlib::duel_is_player_can_summon(lua_State * L) {
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
if
(
lua_gettop
(
L
)
==
1
)
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_
summon
(
playerid
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_
action
(
playerid
,
EFFECT_CANNOT_SUMMON
));
else
{
else
{
check_param_count
(
L
,
3
);
check_param_count
(
L
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
...
@@ -3529,16 +3534,21 @@ int32 scriptlib::duel_is_player_can_spsummon(lua_State * L) {
...
@@ -3529,16 +3534,21 @@ int32 scriptlib::duel_is_player_can_spsummon(lua_State * L) {
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_flipsummon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_flipsummon
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_flipsummon
(
playerid
,
pcard
));
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_action
(
playerid
,
EFFECT_CANNOT_FLIP_SUMMON
));
else
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_flipsummon
(
playerid
,
pcard
));
}
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_spsummon_monster
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_spsummon_monster
(
lua_State
*
L
)
{
...
@@ -3593,68 +3603,93 @@ int32 scriptlib::duel_is_player_can_spsummon_count(lua_State * L) {
...
@@ -3593,68 +3603,93 @@ int32 scriptlib::duel_is_player_can_spsummon_count(lua_State * L) {
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_release
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_release
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_release
(
playerid
,
pcard
));
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_action
(
playerid
,
EFFECT_CANNOT_RELEASE
));
else
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_release
(
playerid
,
pcard
));
}
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_remove
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_remove
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_remove
(
playerid
,
pcard
));
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_action
(
playerid
,
EFFECT_CANNOT_REMOVE
));
else
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_remove
(
playerid
,
pcard
));
}
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_send_to_hand
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_send_to_hand
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_send_to_hand
(
playerid
,
pcard
));
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_action
(
playerid
,
EFFECT_CANNOT_TO_HAND
));
else
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_send_to_hand
(
playerid
,
pcard
));
}
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_send_to_grave
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_send_to_grave
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_send_to_grave
(
playerid
,
pcard
));
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_action
(
playerid
,
EFFECT_CANNOT_TO_GRAVE
));
else
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_send_to_grave
(
playerid
,
pcard
));
}
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_send_to_deck
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_send_to_deck
(
lua_State
*
L
)
{
check_param_count
(
L
,
2
);
check_param_count
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
int32
playerid
=
lua_tointeger
(
L
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
}
}
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_send_to_deck
(
playerid
,
pcard
));
if
(
lua_gettop
(
L
)
==
1
)
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_action
(
playerid
,
EFFECT_CANNOT_TO_DECK
));
else
{
check_param_count
(
L
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_send_to_deck
(
playerid
,
pcard
));
}
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_additional_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_additional_summon
(
lua_State
*
L
)
{
...
...
operations.cpp
View file @
f7df0b9b
...
@@ -4257,6 +4257,10 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
...
@@ -4257,6 +4257,10 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
}
}
}
}
}
}
if
(
ret
==
2
)
{
returns
.
bvalue
[
2
]
=
target
->
previous
.
sequence
;
return
FALSE
;
}
if
(
move_player
==
playerid
)
{
if
(
move_player
==
playerid
)
{
if
(
location
==
LOCATION_SZONE
)
if
(
location
==
LOCATION_SZONE
)
flag
=
((
flag
&
0xff
)
<<
8
)
|
0xffff00ff
;
flag
=
((
flag
&
0xff
)
<<
8
)
|
0xffff00ff
;
...
...
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