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
83d1ccf9
Commit
83d1ccf9
authored
Jun 30, 2016
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f0836802
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
field.cpp
field.cpp
+17
-3
field.h
field.h
+1
-1
libduel.cpp
libduel.cpp
+4
-1
No files found.
field.cpp
View file @
83d1ccf9
...
...
@@ -2302,14 +2302,28 @@ int32 field::is_player_can_spsummon(uint8 playerid) {
return
is_player_can_spsummon_count
(
playerid
,
1
);
}
int32
field
::
is_player_can_spsummon
(
effect
*
peffect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
)
{
effect_set
eset
;
if
(
pcard
->
is_affected_by_effect
(
EFFECT_CANNOT_SPECIAL_SUMMON
))
return
FALSE
;
if
(
pcard
->
is_status
(
STATUS_FORBIDDEN
))
return
FALSE
;
sumtype
|=
SUMMON_TYPE_SPECIAL
;
save_lp_cost
();
effect_set
eset
;
pcard
->
filter_effect
(
EFFECT_SPSUMMON_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
pcard
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
sumtype
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
4
))
{
restore_lp_cost
();
return
FALSE
;
}
}
restore_lp_cost
();
if
(
sumpos
&
POS_FACEDOWN
&&
is_player_affected_by_effect
(
playerid
,
EFFECT_DEVINE_LIGHT
))
sumpos
=
(
sumpos
&
POS_FACEUP
)
|
(
sumpos
>>
1
);
eset
.
clear
();
filter_player_effect
(
playerid
,
EFFECT_CANNOT_SPECIAL_SUMMON
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
!
eset
[
i
]
->
target
)
...
...
@@ -2344,9 +2358,9 @@ int32 field::is_player_can_flipsummon(uint8 playerid, card * pcard) {
}
return
TRUE
;
}
int32
field
::
is_player_can_spsummon_monster
(
uint8
playerid
,
uint8
toplayer
,
uint8
sumpos
,
card_data
*
pdata
)
{
int32
field
::
is_player_can_spsummon_monster
(
uint8
playerid
,
uint8
toplayer
,
uint8
sumpos
,
uint32
sumtype
,
card_data
*
pdata
)
{
temp_card
->
data
=
*
pdata
;
return
is_player_can_spsummon
(
core
.
reason_effect
,
SUMMON_TYPE_SPECIAL
,
sumpos
,
playerid
,
toplayer
,
temp_card
);
return
is_player_can_spsummon
(
core
.
reason_effect
,
sumtype
,
sumpos
,
playerid
,
toplayer
,
temp_card
);
}
int32
field
::
is_player_can_release
(
uint8
playerid
,
card
*
pcard
)
{
effect_set
eset
;
...
...
field.h
View file @
83d1ccf9
...
...
@@ -407,7 +407,7 @@ public:
int32
is_player_can_spsummon
(
uint8
playerid
);
int32
is_player_can_spsummon
(
effect
*
peffect
,
uint32
sumtype
,
uint8
sumpos
,
uint8
playerid
,
uint8
toplayer
,
card
*
pcard
);
int32
is_player_can_flipsummon
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_spsummon_monster
(
uint8
playerid
,
uint8
toplayer
,
uint8
sumpos
,
card_data
*
pdata
);
int32
is_player_can_spsummon_monster
(
uint8
playerid
,
uint8
toplayer
,
uint8
sumpos
,
uint32
sumtype
,
card_data
*
pdata
);
int32
is_player_can_spsummon_count
(
uint8
playerid
,
uint32
count
);
int32
is_player_can_release
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_place_counter
(
uint8
playerid
,
card
*
pcard
,
uint16
countertype
,
uint16
count
);
...
...
libduel.cpp
View file @
83d1ccf9
...
...
@@ -3021,12 +3021,15 @@ int32 scriptlib::duel_is_player_can_spsummon_monster(lua_State * L) {
dat
.
attribute
=
lua_tointeger
(
L
,
9
);
int32
pos
=
POS_FACEUP
;
int32
toplayer
=
playerid
;
uint32
sumtype
=
0
;
if
(
lua_gettop
(
L
)
>=
10
)
pos
=
lua_tointeger
(
L
,
10
);
if
(
lua_gettop
(
L
)
>=
11
)
toplayer
=
lua_tointeger
(
L
,
11
);
if
(
lua_gettop
(
L
)
>=
12
)
sumtype
=
lua_tointeger
(
L
,
12
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_spsummon_monster
(
playerid
,
toplayer
,
pos
,
&
dat
));
lua_pushboolean
(
L
,
pduel
->
game_field
->
is_player_can_spsummon_monster
(
playerid
,
toplayer
,
pos
,
sumtype
,
&
dat
));
return
1
;
}
int32
scriptlib
::
duel_is_player_can_spsummon_count
(
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