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
a1a9faef
Commit
a1a9faef
authored
May 16, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro-core
parents
80f1ced5
d9dc2f56
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
50 deletions
+101
-50
CMakeLists.txt
CMakeLists.txt
+6
-0
field.cpp
field.cpp
+0
-2
libduel.cpp
libduel.cpp
+60
-18
operations.cpp
operations.cpp
+29
-29
processor.cpp
processor.cpp
+4
-0
scriptlib.h
scriptlib.h
+2
-1
No files found.
CMakeLists.txt
View file @
a1a9faef
...
...
@@ -10,3 +10,9 @@ else ()
endif
()
add_library
(
ocgcore STATIC
${
AUTO_FILES_RESULT
}
)
if
(
MSVC
)
target_link_libraries
(
ocgcore lua
)
else
()
target_link_libraries
(
ocgcore
${
LUA_LIBRARIES
}
)
endif
()
field.cpp
View file @
a1a9faef
...
...
@@ -3224,8 +3224,6 @@ int32 field::check_chain_target(uint8 chaincount, card * pcard) {
uint8
tp
=
pchain
->
triggering_player
;
if
(
!
peffect
->
is_flag
(
EFFECT_FLAG_CARD_TARGET
)
||
!
peffect
->
target
)
return
FALSE
;
if
(
!
pcard
->
is_capable_be_effect_target
(
peffect
,
tp
))
return
false
;
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
tp
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
pchain
->
evt
.
event_cards
,
PARAM_TYPE_GROUP
);
...
...
libduel.cpp
View file @
a1a9faef
...
...
@@ -260,25 +260,30 @@ int32 scriptlib::duel_summon(lua_State *L) {
check_action_permission
(
L
);
check_param_count
(
L
,
4
);
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
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
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
);
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
;
if
(
lua_gettop
(
L
)
>=
5
)
min_tribute
=
(
uint32
)
lua_tointeger
(
L
,
5
);
uint32
zone
=
0x1f
;
if
(
lua_gettop
(
L
)
>=
6
)
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
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
);
}
int32
scriptlib
::
duel_special_summon_rule
(
lua_State
*
L
)
{
...
...
@@ -290,11 +295,16 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
uint32
sumtype
=
0
;
if
(
lua_gettop
(
L
)
>=
3
)
sumtype
=
(
uint32
)
lua_tointeger
(
L
,
3
);
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
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
);
}
int32
scriptlib
::
duel_synchro_summon
(
lua_State
*
L
)
{
...
...
@@ -305,6 +315,9 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
card
*
tuner
=
0
;
if
(
!
lua_isnil
(
L
,
3
))
{
check_param
(
L
,
PARAM_TYPE_CARD
,
3
);
...
...
@@ -314,7 +327,9 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
if
(
lua_gettop
(
L
)
>=
4
)
{
if
(
!
lua_isnil
(
L
,
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
;
...
...
@@ -323,13 +338,15 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
int32
maxc
=
0
;
if
(
lua_gettop
(
L
)
>=
6
)
maxc
=
(
int32
)
lua_tointeger
(
L
,
6
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
limit_tuner
=
tuner
;
pduel
->
game_field
->
core
.
limit_syn
=
mg
;
pduel
->
game_field
->
core
.
limit_syn_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_syn_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
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
);
}
int32
scriptlib
::
duel_xyz_summon
(
lua_State
*
L
)
{
...
...
@@ -340,10 +357,15 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
group
*
materials
=
0
;
if
(
!
lua_isnil
(
L
,
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
;
if
(
lua_gettop
(
L
)
>=
4
)
...
...
@@ -351,12 +373,14 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
int32
maxc
=
0
;
if
(
lua_gettop
(
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_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_xyz_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
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
);
}
int32
scriptlib
::
duel_link_summon
(
lua_State
*
L
)
{
...
...
@@ -367,11 +391,16 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
effect_damage_step
)
return
0
;
group
*
materials
=
0
;
card
*
lcard
=
0
;
if
(
!
lua_isnil
(
L
,
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_isnil
(
L
,
4
))
{
...
...
@@ -385,38 +414,45 @@ int32 scriptlib::duel_link_summon(lua_State *L) {
int32
maxc
=
0
;
if
(
lua_gettop
(
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_card
=
lcard
;
pduel
->
game_field
->
core
.
limit_link_minc
=
minc
;
pduel
->
game_field
->
core
.
limit_link_maxc
=
maxc
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
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
);
}
int32
scriptlib
::
duel_setm
(
lua_State
*
L
)
{
check_action_permission
(
L
);
check_param_count
(
L
,
4
);
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
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
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
);
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
;
if
(
lua_gettop
(
L
)
>=
5
)
min_tribute
=
(
uint32
)
lua_tointeger
(
L
,
5
);
uint32
zone
=
0x1f
;
if
(
lua_gettop
(
L
)
>=
6
)
zone
=
(
uint32
)
lua_tointeger
(
L
,
6
);
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
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
);
}
int32
scriptlib
::
duel_sets
(
lua_State
*
L
)
{
...
...
@@ -3049,6 +3085,11 @@ int32 scriptlib::duel_get_fusion_material(lua_State *L) {
interpreter
::
group2value
(
L
,
pgroup
);
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
)
{
check_param_count
(
L
,
1
);
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
))
{
...
...
@@ -4525,6 +4566,7 @@ static const struct luaL_Reg duellib[] = {
{
"GetRitualMaterial"
,
scriptlib
::
duel_get_ritual_material
},
{
"ReleaseRitualMaterial"
,
scriptlib
::
duel_release_ritual_material
},
{
"GetFusionMaterial"
,
scriptlib
::
duel_get_fusion_material
},
{
"IsSummonCancelable"
,
scriptlib
::
duel_is_summon_cancelable
},
{
"SetSelectedCard"
,
scriptlib
::
duel_set_must_select_cards
},
{
"GrabSelectedCard"
,
scriptlib
::
duel_grab_must_select_cards
},
{
"SetTargetCard"
,
scriptlib
::
duel_set_target_card
},
...
...
operations.cpp
View file @
a1a9faef
...
...
@@ -1869,7 +1869,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
}
target
->
enable_field_effect
(
false
);
move_to_field
(
target
,
sumplayer
,
targetplayer
,
LOCATION_MZONE
,
positions
,
FALSE
,
0
,
FALSE
,
zone
);
core
.
summoning_card
=
target
;
core
.
units
.
begin
()
->
step
=
10
;
return
FALSE
;
}
...
...
@@ -1889,7 +1888,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
deffect
->
description
=
64
;
deffect
->
reset_flag
=
RESET_EVENT
+
0x1fe0000
;
target
->
add_effect
(
deffect
);
core
.
summoning_card
=
target
;
return
FALSE
;
}
case
10
:
{
...
...
@@ -1934,23 +1932,15 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SUMMON
))
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
}
else
if
(
core
.
current_chain
.
size
()
>
1
)
{
}
else
{
core
.
units
.
begin
()
->
step
=
14
;
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
;
}
case
13
:
{
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
core
.
summoning_card
=
0
;
raise_event
(
target
,
EVENT_SUMMON
,
proc
,
0
,
sumplayer
,
sumplayer
,
0
);
process_instant_event
();
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
0x101
,
TRUE
);
...
...
@@ -1961,8 +1951,12 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
}
if
(
proc
)
if
(
proc
)
{
remove_oath_effect
(
proc
);
if
(
proc
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
)
&&
(
proc
->
count_code
&
EFFECT_COUNT_CODE_OATH
))
{
dec_effect_code
(
proc
->
count_code
,
sumplayer
);
}
}
if
(
target
->
current
.
location
==
LOCATION_MZONE
)
send_to
(
target
,
0
,
REASON_RULE
,
sumplayer
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
adjust_instant
();
...
...
@@ -1980,7 +1974,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
target
->
enable_field_effect
(
true
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
core
.
summoning_card
=
0
;
return
FALSE
;
}
case
16
:
{
...
...
@@ -2701,7 +2694,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_syn
,
PARAM_TYPE_GROUP
);
core
.
limit_tuner
=
0
;
core
.
limit_syn
=
0
;
if
(
core
.
limit_syn_minc
)
{
pduel
->
lua
->
add_param
(
core
.
limit_syn_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_syn_maxc
,
PARAM_TYPE_INT
);
...
...
@@ -2711,7 +2703,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
}
if
(
core
.
limit_xyz
)
{
pduel
->
lua
->
add_param
(
core
.
limit_xyz
,
PARAM_TYPE_GROUP
);
core
.
limit_xyz
=
0
;
if
(
core
.
limit_xyz_minc
)
{
pduel
->
lua
->
add_param
(
core
.
limit_xyz_minc
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
core
.
limit_xyz_maxc
,
PARAM_TYPE_INT
);
...
...
@@ -2722,7 +2713,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
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_card
,
PARAM_TYPE_CARD
);
core
.
limit_link
=
0
;
core
.
limit_link_card
=
0
;
if
(
core
.
limit_link_minc
)
{
pduel
->
lua
->
add_param
(
core
.
limit_link_minc
,
PARAM_TYPE_INT
);
...
...
@@ -2738,6 +2728,18 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
return
FALSE
;
}
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
;
uint8
targetplayer
=
sumplayer
;
uint8
positions
=
POS_FACEUP
;
...
...
@@ -2768,7 +2770,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
set_control
(
target
,
target
->
current
.
controler
,
0
,
0
);
core
.
phase_action
=
TRUE
;
target
->
current
.
reason_effect
=
core
.
units
.
begin
()
->
peffect
;
core
.
summoning_card
=
target
;
pduel
->
write_buffer8
(
MSG_SPSUMMONING
);
pduel
->
write_buffer32
(
target
->
data
.
code
);
pduel
->
write_buffer32
(
target
->
get_info_location
());
...
...
@@ -2799,21 +2800,13 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
else
core
.
units
.
begin
()
->
step
=
9
;
return
FALSE
;
}
else
if
(
core
.
current_chain
.
size
()
>
1
)
{
}
else
{
core
.
units
.
begin
()
->
step
=
14
;
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
;
}
case
10
:
{
core
.
summoning_card
=
0
;
target
->
set_status
(
STATUS_SUMMONING
,
TRUE
);
target
->
set_status
(
STATUS_SUMMON_DISABLED
,
FALSE
);
raise_event
(
target
,
EVENT_SPSUMMON
,
core
.
units
.
begin
()
->
peffect
,
0
,
sumplayer
,
sumplayer
,
0
);
...
...
@@ -2826,7 +2819,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
core
.
units
.
begin
()
->
step
=
14
;
return
FALSE
;
}
remove_oath_effect
(
core
.
units
.
begin
()
->
peffect
);
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
remove_oath_effect
(
peffect
);
if
(
peffect
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
)
&&
(
peffect
->
count_code
&
EFFECT_COUNT_CODE_OATH
))
{
dec_effect_code
(
peffect
->
count_code
,
sumplayer
);
}
if
(
target
->
current
.
location
==
LOCATION_MZONE
)
send_to
(
target
,
0
,
REASON_RULE
,
sumplayer
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
adjust_instant
();
...
...
@@ -2842,7 +2839,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
target
->
enable_field_effect
(
true
);
if
(
target
->
is_status
(
STATUS_DISABLED
))
target
->
reset
(
RESET_DISABLE
,
RESET_EVENT
);
core
.
summoning_card
=
0
;
return
FALSE
;
}
case
16
:
{
...
...
@@ -2999,7 +2995,11 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card* target, uin
adjust_instant
();
}
if
(
pgroup
->
container
.
size
()
==
0
)
{
remove_oath_effect
(
core
.
units
.
begin
()
->
peffect
);
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
remove_oath_effect
(
peffect
);
if
(
peffect
->
is_flag
(
EFFECT_FLAG_COUNT_LIMIT
)
&&
(
peffect
->
count_code
&
EFFECT_COUNT_CODE_OATH
))
{
dec_effect_code
(
peffect
->
count_code
,
sumplayer
);
}
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
return
TRUE
;
}
...
...
processor.cpp
View file @
a1a9faef
...
...
@@ -4413,6 +4413,9 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
core
.
chain_limit
.
clear
();
return
FALSE
;
}
if
(
core
.
summoning_card
)
core
.
subunits
.
push_back
(
core
.
reserved
);
core
.
summoning_card
=
0
;
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
}
...
...
@@ -4435,6 +4438,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
reset_chain
();
if
(
core
.
summoning_card
||
core
.
effect_damage_step
==
1
)
core
.
subunits
.
push_back
(
core
.
reserved
);
core
.
summoning_card
=
0
;
return
FALSE
;
}
case
13
:
{
...
...
scriptlib.h
View file @
a1a9faef
...
...
@@ -188,7 +188,7 @@ public:
static
int32
card_is_disabled
(
lua_State
*
L
);
static
int32
card_is_destructable
(
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_ssetable
(
lua_State
*
L
);
static
int32
card_is_special_summonable
(
lua_State
*
L
);
...
...
@@ -508,6 +508,7 @@ public:
static
int32
duel_get_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_is_summon_cancelable
(
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_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