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
93bb39b4
Commit
93bb39b4
authored
May 07, 2019
by
nekrozar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
095d7ca6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
34 deletions
+69
-34
field.cpp
field.cpp
+2
-2
field.h
field.h
+1
-1
libduel.cpp
libduel.cpp
+66
-31
No files found.
field.cpp
View file @
93bb39b4
...
@@ -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 @
93bb39b4
...
@@ -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
);
...
...
libduel.cpp
View file @
93bb39b4
...
@@ -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
)
{
...
...
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