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
6d90b448
Commit
6d90b448
authored
May 18, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Fluorohydride/ygopro-core
parents
5844a137
d9dc2f56
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
45 deletions
+80
-45
libduel.cpp
libduel.cpp
+60
-18
operations.cpp
operations.cpp
+14
-26
processor.cpp
processor.cpp
+4
-0
scriptlib.h
scriptlib.h
+2
-1
No files found.
libduel.cpp
View file @
6d90b448
...
@@ -477,25 +477,30 @@ int32 scriptlib::duel_summon(lua_State *L) {
...
@@ -477,25 +477,30 @@ int32 scriptlib::duel_summon(lua_State *L) {
check_action_permission
(
L
);
check_action_permission
(
L
);
check_param_count
(
L
,
4
);
check_param_count
(
L
,
4
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
effect
*
peffect
=
0
;
if
(
!
lua_isnil
(
L
,
4
))
{
check_param
(
L
,
PARAM_TYPE_EFFECT
,
4
);
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
4
);
}
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
1
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
uint32
ignore_count
=
lua_toboolean
(
L
,
3
);
uint32
ignore_count
=
lua_toboolean
(
L
,
3
);
effect
*
peffect
=
0
;
if
(
!
lua_isnil
(
L
,
4
))
{
check_param
(
L
,
PARAM_TYPE_EFFECT
,
4
);
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
4
);
}
uint32
min_tribute
=
0
;
uint32
min_tribute
=
0
;
if
(
lua_gettop
(
L
)
>=
5
)
if
(
lua_gettop
(
L
)
>=
5
)
min_tribute
=
(
uint32
)
lua_tointeger
(
L
,
5
);
min_tribute
=
(
uint32
)
lua_tointeger
(
L
,
5
);
uint32
zone
=
0x1f
;
uint32
zone
=
0x1f
;
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
pduel
->
game_field
->
summon
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_special_summon_rule
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_special_summon_rule
(
lua_State
*
L
)
{
...
@@ -507,11 +512,16 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
...
@@ -507,11 +512,16 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
return
0
;
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
uint32
sumtype
=
0
;
uint32
sumtype
=
0
;
if
(
lua_gettop
(
L
)
>=
3
)
if
(
lua_gettop
(
L
)
>=
3
)
sumtype
=
(
uint32
)
lua_tointeger
(
L
,
3
);
sumtype
=
(
uint32
)
lua_tointeger
(
L
,
3
);
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
sumtype
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
sumtype
);
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_synchro_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_synchro_summon
(
lua_State
*
L
)
{
...
@@ -522,6 +532,9 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
...
@@ -522,6 +532,9 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
card
*
tuner
=
0
;
card
*
tuner
=
0
;
if
(
!
lua_isnil
(
L
,
3
))
{
if
(
!
lua_isnil
(
L
,
3
))
{
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
...
@@ -531,7 +544,9 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
...
@@ -531,7 +544,9 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
4
)
{
if
(
lua_gettop
(
L
)
>=
4
)
{
if
(
!
lua_isnil
(
L
,
4
))
{
if
(
!
lua_isnil
(
L
,
4
))
{
check_param
(
L
,
PARAM_TYPE_GROUP
,
4
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
4
);
mg
=
*
(
group
**
)
lua_touserdata
(
L
,
4
);
group
*
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
4
);
mg
=
pduel
->
new_group
(
pgroup
->
container
);
mg
->
is_readonly
=
TRUE
;
}
}
}
}
int32
minc
=
0
;
int32
minc
=
0
;
...
@@ -540,13 +555,15 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
...
@@ -540,13 +555,15 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
int32
maxc
=
0
;
int32
maxc
=
0
;
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
maxc
=
(
int32
)
lua_tointeger
(
L
,
6
);
maxc
=
(
int32
)
lua_tointeger
(
L
,
6
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
limit_tuner
=
tuner
;
pduel
->
game_field
->
core
.
limit_tuner
=
tuner
;
pduel
->
game_field
->
core
.
limit_syn
=
mg
;
pduel
->
game_field
->
core
.
limit_syn
=
mg
;
pduel
->
game_field
->
core
.
limit_syn_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_syn_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_syn_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_syn_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_SYNCHRO
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_SYNCHRO
);
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_xyz_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_xyz_summon
(
lua_State
*
L
)
{
...
@@ -557,10 +574,15 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
...
@@ -557,10 +574,15 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
group
*
materials
=
0
;
group
*
materials
=
0
;
if
(
!
lua_isnil
(
L
,
3
))
{
if
(
!
lua_isnil
(
L
,
3
))
{
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
);
materials
=
*
(
group
**
)
lua_touserdata
(
L
,
3
);
group
*
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
3
);
materials
=
pduel
->
new_group
(
pgroup
->
container
);
materials
->
is_readonly
=
TRUE
;
}
}
int32
minc
=
0
;
int32
minc
=
0
;
if
(
lua_gettop
(
L
)
>=
4
)
if
(
lua_gettop
(
L
)
>=
4
)
...
@@ -568,12 +590,14 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
...
@@ -568,12 +590,14 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
int32
maxc
=
0
;
int32
maxc
=
0
;
if
(
lua_gettop
(
L
)
>=
5
)
if
(
lua_gettop
(
L
)
>=
5
)
maxc
=
(
int32
)
lua_tointeger
(
L
,
5
);
maxc
=
(
int32
)
lua_tointeger
(
L
,
5
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_xyz_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_XYZ
);
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_link_summon
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_link_summon
(
lua_State
*
L
)
{
...
@@ -584,11 +608,16 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
...
@@ -584,11 +608,16 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
group
*
materials
=
0
;
group
*
materials
=
0
;
card
*
lcard
=
0
;
card
*
lcard
=
0
;
if
(
!
lua_isnil
(
L
,
3
))
{
if
(
!
lua_isnil
(
L
,
3
))
{
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
);
check_param
(
L
,
PARAM_TYPE_GROUP
,
3
);
materials
=
*
(
group
**
)
lua_touserdata
(
L
,
3
);
group
*
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
3
);
materials
=
pduel
->
new_group
(
pgroup
->
container
);
materials
->
is_readonly
=
TRUE
;
}
}
if
(
lua_gettop
(
L
)
>=
4
)
{
if
(
lua_gettop
(
L
)
>=
4
)
{
if
(
!
lua_isnil
(
L
,
4
))
{
if
(
!
lua_isnil
(
L
,
4
))
{
...
@@ -602,38 +631,45 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
...
@@ -602,38 +631,45 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
int32
maxc
=
0
;
int32
maxc
=
0
;
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
maxc
=
(
int32
)
lua_tointeger
(
L
,
6
);
maxc
=
(
int32
)
lua_tointeger
(
L
,
6
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
limit_link
=
materials
;
pduel
->
game_field
->
core
.
limit_link
=
materials
;
pduel
->
game_field
->
core
.
limit_link_card
=
lcard
;
pduel
->
game_field
->
core
.
limit_link_card
=
lcard
;
pduel
->
game_field
->
core
.
limit_link_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_link_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_link_maxc
=
maxc
;
pduel
->
game_field
->
core
.
limit_link_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_LINK
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
SUMMON_TYPE_LINK
);
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_setm
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_setm
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_action_permission
(
L
);
check_param_count
(
L
,
4
);
check_param_count
(
L
,
4
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
check_param
(
L
,
PARAM_TYPE_CARD
,
2
);
effect
*
peffect
=
0
;
if
(
!
lua_isnil
(
L
,
4
))
{
check_param
(
L
,
PARAM_TYPE_EFFECT
,
4
);
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
4
);
}
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
1
);
uint32
playerid
=
(
uint32
)
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
uint32
ignore_count
=
lua_toboolean
(
L
,
3
);
uint32
ignore_count
=
lua_toboolean
(
L
,
3
);
effect
*
peffect
=
0
;
if
(
!
lua_isnil
(
L
,
4
))
{
check_param
(
L
,
PARAM_TYPE_EFFECT
,
4
);
peffect
=
*
(
effect
**
)
lua_touserdata
(
L
,
4
);
}
uint32
min_tribute
=
0
;
uint32
min_tribute
=
0
;
if
(
lua_gettop
(
L
)
>=
5
)
if
(
lua_gettop
(
L
)
>=
5
)
min_tribute
=
(
uint32
)
lua_tointeger
(
L
,
5
);
min_tribute
=
(
uint32
)
lua_tointeger
(
L
,
5
);
uint32
zone
=
0x1f
;
uint32
zone
=
0x1f
;
if
(
lua_gettop
(
L
)
>=
6
)
if
(
lua_gettop
(
L
)
>=
6
)
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
mset
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
pduel
->
game_field
->
mset
(
playerid
,
pcard
,
peffect
,
ignore_count
,
min_tribute
,
zone
);
pduel
->
game_field
->
core
.
reserved
=
pduel
->
game_field
->
core
.
subunits
.
back
();
pduel
->
game_field
->
core
.
subunits
.
pop_back
();
pduel
->
game_field
->
core
.
summoning_card
=
pcard
;
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
int32
scriptlib
::
duel_sets
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_sets
(
lua_State
*
L
)
{
...
@@ -3289,6 +3325,11 @@ int32 scriptlib::duel_get_fusion_material(lua_State *L) {
...
@@ -3289,6 +3325,11 @@ int32 scriptlib::duel_get_fusion_material(lua_State *L) {
interpreter
::
group2value
(
L
,
pgroup
);
interpreter
::
group2value
(
L
,
pgroup
);
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_summon_cancelable
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
lua_pushboolean
(
L
,
pduel
->
game_field
->
core
.
summon_cancelable
);
return
1
;
}
int32
scriptlib
::
duel_set_must_select_cards
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_set_must_select_cards
(
lua_State
*
L
)
{
check_param_count
(
L
,
1
);
check_param_count
(
L
,
1
);
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
))
{
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
))
{
...
@@ -4785,6 +4826,7 @@ static const struct luaL_Reg duellib[] = {
...
@@ -4785,6 +4826,7 @@ static const struct luaL_Reg duellib[] = {
{
"GetRitualMaterial"
,
scriptlib
::
duel_get_ritual_material
},
{
"GetRitualMaterial"
,
scriptlib
::
duel_get_ritual_material
},
{
"ReleaseRitualMaterial"
,
scriptlib
::
duel_release_ritual_material
},
{
"ReleaseRitualMaterial"
,
scriptlib
::
duel_release_ritual_material
},
{
"GetFusionMaterial"
,
scriptlib
::
duel_get_fusion_material
},
{
"GetFusionMaterial"
,
scriptlib
::
duel_get_fusion_material
},
{
"IsSummonCancelable"
,
scriptlib
::
duel_is_summon_cancelable
},
{
"SetSelectedCard"
,
scriptlib
::
duel_set_must_select_cards
},
{
"SetSelectedCard"
,
scriptlib
::
duel_set_must_select_cards
},
{
"GrabSelectedCard"
,
scriptlib
::
duel_grab_must_select_cards
},
{
"GrabSelectedCard"
,
scriptlib
::
duel_grab_must_select_cards
},
{
"SetTargetCard"
,
scriptlib
::
duel_set_target_card
},
{
"SetTargetCard"
,
scriptlib
::
duel_set_target_card
},
...
...
operations.cpp
View file @
6d90b448
...
@@ -1894,7 +1894,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1894,7 +1894,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
}
}
target
->
enable_field_effect
(
false
);
target
->
enable_field_effect
(
false
);
move_to_field
(
target
,
sumplayer
,
targetplayer
,
LOCATION_MZONE
,
positions
,
FALSE
,
0
,
FALSE
,
zone
);
move_to_field
(
target
,
sumplayer
,
targetplayer
,
LOCATION_MZONE
,
positions
,
FALSE
,
0
,
FALSE
,
zone
);
core
.
summoning_card
=
target
;
core
.
units
.
begin
()
->
step
=
10
;
core
.
units
.
begin
()
->
step
=
10
;
return
FALSE
;
return
FALSE
;
}
}
...
@@ -1914,7 +1913,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1914,7 +1913,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
deffect
->
description
=
64
;
deffect
->
description
=
64
;
deffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
deffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
target
->
add_effect
(
deffect
);
target
->
add_effect
(
deffect
);
core
.
summoning_card
=
target
;
return
FALSE
;
return
FALSE
;
}
}
case
10
:
{
case
10
:
{
...
@@ -1959,23 +1957,15 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -1959,23 +1957,15 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SUMMON
))
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SUMMON
))
core
.
units
.
begin
()
->
step
=
14
;
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
return
FALSE
;
}
else
if
(
core
.
current_chain
.
size
()
>
1
)
{
}
else
{
core
.
units
.
begin
()
->
step
=
14
;
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
return
FALSE
;
}
else
{
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SUMMON
))
core
.
units
.
begin
()
->
step
=
15
;
else
core
.
units
.
begin
()
->
step
=
13
;
core
.
reserved
=
core
.
units
.
front
();
return
TRUE
;
}
}
return
FALSE
;
return
FALSE
;
}
}
case
13
:
{
case
13
:
{
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
core
.
summoning_card
=
0
;
raise_event
(
target
,
EVENT_SUMMON
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_SUMMON
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
process_instant_event
();
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0x101
,
TRUE
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0x101
,
TRUE
);
...
@@ -2009,7 +1999,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
...
@@ -2009,7 +1999,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
target
->
enable_field_effect
(
true
);
target
->
enable_field_effect
(
true
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
if
(
target
->
is_status
(
STATUS_DISABLED
))
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
core
.
summoning_card
=
0
;
return
FALSE
;
return
FALSE
;
}
}
case
16
:
{
case
16
:
{
...
@@ -2730,7 +2719,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2730,7 +2719,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
pduel
->
lua
->
add_param
(
core
.
limit_tuner
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
core
.
limit_tuner
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
core
.
limit_syn
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
core
.
limit_syn
,
PARAM_TYPE_GROUP
);
core
.
limit_tuner
=
0
;
core
.
limit_tuner
=
0
;
core
.
limit_syn
=
0
;
if
(
core
.
limit_syn_minc
)
{
if
(
core
.
limit_syn_minc
)
{
pduel
->
lua
->
add_param
(
core
.
limit_syn_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_syn_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_syn_maxc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_syn_maxc
,
PARAM_TYPE_INT
);
...
@@ -2740,7 +2728,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2740,7 +2728,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
}
}
if
(
core
.
limit_xyz
)
{
if
(
core
.
limit_xyz
)
{
pduel
->
lua
->
add_param
(
core
.
limit_xyz
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
core
.
limit_xyz
,
PARAM_TYPE_GROUP
);
core
.
limit_xyz
=
0
;
if
(
core
.
limit_xyz_minc
)
{
if
(
core
.
limit_xyz_minc
)
{
pduel
->
lua
->
add_param
(
core
.
limit_xyz_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_xyz_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_xyz_maxc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_xyz_maxc
,
PARAM_TYPE_INT
);
...
@@ -2751,7 +2738,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2751,7 +2738,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
if
(
core
.
limit_link
||
core
.
limit_link_card
)
{
if
(
core
.
limit_link
||
core
.
limit_link_card
)
{
pduel
->
lua
->
add_param
(
core
.
limit_link
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
core
.
limit_link
,
PARAM_TYPE_GROUP
);
pduel
->
lua
->
add_param
(
core
.
limit_link_card
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
core
.
limit_link_card
,
PARAM_TYPE_CARD
);
core
.
limit_link
=
0
;
core
.
limit_link_card
=
0
;
core
.
limit_link_card
=
0
;
if
(
core
.
limit_link_minc
)
{
if
(
core
.
limit_link_minc
)
{
pduel
->
lua
->
add_param
(
core
.
limit_link_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_link_minc
,
PARAM_TYPE_INT
);
...
@@ -2767,6 +2753,18 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2767,6 +2753,18 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
return
FALSE
;
return
FALSE
;
}
}
case
4
:
{
case
4
:
{
if
(
core
.
limit_syn
)
{
pduel
->
delete_group
(
core
.
limit_syn
);
core
.
limit_syn
=
0
;
}
if
(
core
.
limit_xyz
)
{
pduel
->
delete_group
(
core
.
limit_xyz
);
core
.
limit_xyz
=
0
;
}
if
(
core
.
limit_link
)
{
pduel
->
delete_group
(
core
.
limit_link
);
core
.
limit_link
=
0
;
}
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
uint8
targetplayer
=
sumplayer
;
uint8
targetplayer
=
sumplayer
;
uint8
positions
=
POS_FACEUP
;
uint8
positions
=
POS_FACEUP
;
...
@@ -2797,7 +2795,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2797,7 +2795,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
set_control
(
target
,
target
->
current
.
controler
,
0
,
0
);
set_control
(
target
,
target
->
current
.
controler
,
0
,
0
);
core
.
phase_action
=
TRUE
;
core
.
phase_action
=
TRUE
;
target
->
current
.
reason_effect
=
core
.
units
.
begin
()
->
peffect
;
target
->
current
.
reason_effect
=
core
.
units
.
begin
()
->
peffect
;
core
.
summoning_card
=
target
;
pduel
->
write_buffer8
(
MSG_SPSUMMONING
);
pduel
->
write_buffer8
(
MSG_SPSUMMONING
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
pduel
->
write_buffer32
(
target
->
get_info_location
());
pduel
->
write_buffer32
(
target
->
get_info_location
());
...
@@ -2832,21 +2829,13 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2832,21 +2829,13 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
else
else
core
.
units
.
begin
()
->
step
=
9
;
core
.
units
.
begin
()
->
step
=
9
;
return
FALSE
;
return
FALSE
;
}
else
if
(
core
.
current_chain
.
size
()
>
1
)
{
}
else
{
core
.
units
.
begin
()
->
step
=
14
;
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
return
FALSE
;
}
else
{
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SPSUMMON
))
core
.
units
.
begin
()
->
step
=
15
;
else
core
.
units
.
begin
()
->
step
=
10
;
core
.
reserved
=
core
.
units
.
front
();
return
TRUE
;
}
}
return
FALSE
;
return
FALSE
;
}
}
case
10
:
{
case
10
:
{
core
.
summoning_card
=
0
;
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
raise_event
(
target
,
EVENT_SPSUMMON
,
core
.
units
.
begin
()
->
peffect
,
0
,
sumplayer
,
sumplayer
,
0
);
raise_event
(
target
,
EVENT_SPSUMMON
,
core
.
units
.
begin
()
->
peffect
,
0
,
sumplayer
,
sumplayer
,
0
);
...
@@ -2879,7 +2868,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
...
@@ -2879,7 +2868,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
target
->
enable_field_effect
(
true
);
target
->
enable_field_effect
(
true
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
if
(
target
->
is_status
(
STATUS_DISABLED
))
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
core
.
summoning_card
=
0
;
return
FALSE
;
return
FALSE
;
}
}
case
16
:
{
case
16
:
{
...
...
processor.cpp
View file @
6d90b448
...
@@ -4430,6 +4430,9 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
...
@@ -4430,6 +4430,9 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
core
.
chain_limit
.
clear
();
core
.
chain_limit
.
clear
();
return
FALSE
;
return
FALSE
;
}
}
if
(
core
.
summoning_card
)
core
.
subunits
.
push_back
(
core
.
reserved
);
core
.
summoning_card
=
0
;
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
return
FALSE
;
}
}
...
@@ -4452,6 +4455,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
...
@@ -4452,6 +4455,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
reset_chain
();
reset_chain
();
if
(
core
.
summoning_card
||
core
.
effect_damage_step
==
1
)
if
(
core
.
summoning_card
||
core
.
effect_damage_step
==
1
)
core
.
subunits
.
push_back
(
core
.
reserved
);
core
.
subunits
.
push_back
(
core
.
reserved
);
core
.
summoning_card
=
0
;
return
FALSE
;
return
FALSE
;
}
}
case
13
:
{
case
13
:
{
...
...
scriptlib.h
View file @
6d90b448
...
@@ -208,7 +208,7 @@ public:
...
@@ -208,7 +208,7 @@ public:
static
int32
card_is_disabled
(
lua_State
*
L
);
static
int32
card_is_disabled
(
lua_State
*
L
);
static
int32
card_is_destructable
(
lua_State
*
L
);
static
int32
card_is_destructable
(
lua_State
*
L
);
static
int32
card_is_summonable
(
lua_State
*
L
);
static
int32
card_is_summonable
(
lua_State
*
L
);
static
int32
card_is_fusion_summonable_card
(
lua_State
*
L
);
static
int32
card_is_fusion_summonable_card
(
lua_State
*
L
);
static
int32
card_is_msetable
(
lua_State
*
L
);
static
int32
card_is_msetable
(
lua_State
*
L
);
static
int32
card_is_ssetable
(
lua_State
*
L
);
static
int32
card_is_ssetable
(
lua_State
*
L
);
static
int32
card_is_special_summonable
(
lua_State
*
L
);
static
int32
card_is_special_summonable
(
lua_State
*
L
);
...
@@ -530,6 +530,7 @@ public:
...
@@ -530,6 +530,7 @@ public:
static
int32
duel_get_ritual_material
(
lua_State
*
L
);
static
int32
duel_get_ritual_material
(
lua_State
*
L
);
static
int32
duel_release_ritual_material
(
lua_State
*
L
);
static
int32
duel_release_ritual_material
(
lua_State
*
L
);
static
int32
duel_get_fusion_material
(
lua_State
*
L
);
static
int32
duel_get_fusion_material
(
lua_State
*
L
);
static
int32
duel_is_summon_cancelable
(
lua_State
*
L
);
static
int32
duel_set_must_select_cards
(
lua_State
*
L
);
static
int32
duel_set_must_select_cards
(
lua_State
*
L
);
static
int32
duel_grab_must_select_cards
(
lua_State
*
L
);
static
int32
duel_grab_must_select_cards
(
lua_State
*
L
);
static
int32
duel_set_target_card
(
lua_State
*
L
);
static
int32
duel_set_target_card
(
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