Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
MobiusMei
ygopro
Commits
5298ad05
Commit
5298ad05
authored
Aug 11, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
fa74957a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
40 deletions
+118
-40
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+3
-0
ocgcore/operations.cpp
ocgcore/operations.cpp
+53
-30
ocgcore/processor.cpp
ocgcore/processor.cpp
+1
-0
script/utility.lua
script/utility.lua
+61
-10
No files found.
ocgcore/libduel.cpp
View file @
5298ad05
...
@@ -234,6 +234,7 @@ int32 scriptlib::duel_special_summon_rule(lua_State *L) {
...
@@ -234,6 +234,7 @@ 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
;
pduel
->
game_field
->
core
.
summon_cancelable
=
FALSE
;
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
0
);
pduel
->
game_field
->
special_summon_rule
(
playerid
,
pcard
,
0
);
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
...
@@ -260,6 +261,7 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
...
@@ -260,6 +261,7 @@ int32 scriptlib::duel_synchro_summon(lua_State *L) {
duel
*
pduel
=
pcard
->
pduel
;
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
.
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
);
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
...
@@ -278,6 +280,7 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
...
@@ -278,6 +280,7 @@ int32 scriptlib::duel_xyz_summon(lua_State *L) {
}
}
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
pduel
->
game_field
->
core
.
limit_xyz
=
materials
;
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
);
return
lua_yield
(
L
,
0
);
return
lua_yield
(
L
,
0
);
}
}
...
...
ocgcore/operations.cpp
View file @
5298ad05
...
@@ -2052,27 +2052,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
...
@@ -2052,27 +2052,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
core
.
limit_syn
=
syn
;
core
.
limit_syn
=
syn
;
if
(
!
eset
.
size
())
if
(
!
eset
.
size
())
return
TRUE
;
return
TRUE
;
eset
.
clear
();
target
->
filter_effect
(
EFFECT_SPSUMMON_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
sumplayer
,
0
);
}
}
return
FALSE
;
}
case
1
:
{
effect_set
eset
;
target
->
material_cards
.
clear
();
card
*
tuner
=
core
.
limit_tuner
;
group
*
materials
=
core
.
limit_xyz
;
group
*
syn
=
core
.
limit_syn
;
target
->
filter_spsummon_procedure
(
sumplayer
,
&
eset
,
summon_type
);
target
->
filter_spsummon_procedure_g
(
sumplayer
,
&
eset
);
core
.
limit_tuner
=
tuner
;
core
.
limit_xyz
=
materials
;
core
.
limit_syn
=
syn
;
core
.
select_effects
.
clear
();
core
.
select_effects
.
clear
();
core
.
select_options
.
clear
();
core
.
select_options
.
clear
();
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
...
@@ -2085,13 +2064,43 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
...
@@ -2085,13 +2064,43 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
add_process
(
PROCESSOR_SELECT_OPTION
,
0
,
0
,
0
,
sumplayer
,
0
);
add_process
(
PROCESSOR_SELECT_OPTION
,
0
,
0
,
0
,
sumplayer
,
0
);
return
FALSE
;
return
FALSE
;
}
}
case
2
:
{
case
1
:
{
effect
*
peffect
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
effect
*
peffect
=
core
.
select_effects
[
returns
.
ivalue
[
0
]];
core
.
units
.
begin
()
->
peffect
=
peffect
;
core
.
units
.
begin
()
->
peffect
=
peffect
;
if
(
peffect
->
code
==
EFFECT_SPSUMMON_PROC_G
)
{
if
(
peffect
->
code
==
EFFECT_SPSUMMON_PROC_G
)
{
core
.
units
.
begin
()
->
step
=
19
;
core
.
units
.
begin
()
->
step
=
19
;
return
FALSE
;
return
FALSE
;
}
}
returns
.
ivalue
[
0
]
=
TRUE
;
if
(
peffect
->
target
)
{
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
if
(
core
.
limit_tuner
||
core
.
limit_syn
)
{
pduel
->
lua
->
add_param
(
core
.
limit_tuner
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
core
.
limit_syn
,
PARAM_TYPE_GROUP
);
}
else
if
(
core
.
limit_xyz
)
{
pduel
->
lua
->
add_param
(
core
.
limit_xyz
,
PARAM_TYPE_GROUP
);
}
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_TARGET
,
0
,
peffect
,
0
,
sumplayer
,
0
);
}
return
FALSE
;
}
case
2
:
{
if
(
!
returns
.
ivalue
[
0
])
return
TRUE
;
effect_set
eset
;
target
->
filter_effect
(
EFFECT_SPSUMMON_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
size
();
++
i
)
{
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
sumplayer
,
0
);
}
}
return
FALSE
;
}
case
3
:
{
effect
*
peffect
=
core
.
units
.
begin
()
->
peffect
;
target
->
material_cards
.
clear
();
target
->
summon_info
=
(
peffect
->
get_value
(
target
)
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
);
target
->
summon_info
=
(
peffect
->
get_value
(
target
)
&
0xf00ffff
)
|
SUMMON_TYPE_SPECIAL
|
((
uint32
)
target
->
current
.
location
<<
16
);
if
(
peffect
->
operation
)
{
if
(
peffect
->
operation
)
{
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
...
@@ -2111,7 +2120,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
...
@@ -2111,7 +2120,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
peffect
->
dec_count
(
sumplayer
);
peffect
->
dec_count
(
sumplayer
);
return
FALSE
;
return
FALSE
;
}
}
case
3
:
{
case
4
:
{
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
;
...
@@ -2137,7 +2146,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
...
@@ -2137,7 +2146,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
break_effect
();
break_effect
();
return
FALSE
;
return
FALSE
;
}
}
case
4
:
{
case
5
:
{
uint8
targetplayer
=
target
->
current
.
controler
;
uint8
targetplayer
=
target
->
current
.
controler
;
if
(
target
->
owner
!=
targetplayer
)
if
(
target
->
owner
!=
targetplayer
)
set_control
(
target
,
targetplayer
,
0
,
0
);
set_control
(
target
,
targetplayer
,
0
,
0
);
...
@@ -2152,7 +2161,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
...
@@ -2152,7 +2161,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
pduel
->
write_buffer8
(
target
->
current
.
position
);
pduel
->
write_buffer8
(
target
->
current
.
position
);
return
FALSE
;
return
FALSE
;
}
}
case
5
:
{
case
6
:
{
effect
*
proc
=
core
.
units
.
begin
()
->
peffect
;
effect
*
proc
=
core
.
units
.
begin
()
->
peffect
;
int32
matreason
=
proc
->
value
==
SUMMON_TYPE_SYNCHRO
?
REASON_SYNCHRO
:
proc
->
value
==
SUMMON_TYPE_XYZ
?
REASON_XYZ
:
REASON_SPSUMMON
;
int32
matreason
=
proc
->
value
==
SUMMON_TYPE_SYNCHRO
?
REASON_SYNCHRO
:
proc
->
value
==
SUMMON_TYPE_XYZ
?
REASON_XYZ
:
REASON_SPSUMMON
;
if
(
target
->
material_cards
.
size
())
{
if
(
target
->
material_cards
.
size
())
{
...
@@ -2164,7 +2173,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
...
@@ -2164,7 +2173,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target, ui
process_instant_event
();
process_instant_event
();
return
FALSE
;
return
FALSE
;
}
}
case
6
:
{
case
7
:
{
if
(
core
.
current_chain
.
size
()
==
0
)
{
if
(
core
.
current_chain
.
size
()
==
0
)
{
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SPSUMMON
))
if
(
target
->
is_affected_by_effect
(
EFFECT_CANNOT_DISABLE_SPSUMMON
))
core
.
units
.
begin
()
->
step
=
14
;
core
.
units
.
begin
()
->
step
=
14
;
...
@@ -4105,7 +4114,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
...
@@ -4105,7 +4114,7 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
512
);
pduel
->
write_buffer32
(
512
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
0x10001
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
0x10001
);
return
FALSE
;
return
FALSE
;
}
}
}
}
...
@@ -4129,10 +4138,16 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
...
@@ -4129,10 +4138,16 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card* pcard, in
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
512
);
pduel
->
write_buffer32
(
512
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
0x10001
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
0x10001
);
return
FALSE
;
return
FALSE
;
}
}
case
1
:
{
case
1
:
{
if
(
returns
.
ivalue
[
0
]
==
-
1
)
{
lua_pop
(
pduel
->
lua
->
current_state
,
2
);
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_GROUP
);
core
.
limit_tuner
=
0
;
return
TRUE
;
}
card
*
tuner
=
core
.
select_cards
[
returns
.
bvalue
[
1
]];
card
*
tuner
=
core
.
select_cards
[
returns
.
bvalue
[
1
]];
effect
*
pcheck
=
tuner
->
is_affected_by_effect
(
EFFECT_SYNCHRO_CHECK
);
effect
*
pcheck
=
tuner
->
is_affected_by_effect
(
EFFECT_SYNCHRO_CHECK
);
if
(
pcheck
)
if
(
pcheck
)
...
@@ -4348,12 +4363,16 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -4348,12 +4363,16 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
513
);
pduel
->
write_buffer32
(
513
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
min
+
(
max
<<
16
));
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
min
+
(
max
<<
16
));
}
else
}
else
core
.
units
.
begin
()
->
step
=
1
;
core
.
units
.
begin
()
->
step
=
1
;
return
FALSE
;
return
FALSE
;
}
}
case
1
:
{
case
1
:
{
if
(
returns
.
ivalue
[
0
]
==
-
1
)
{
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_GROUP
);
return
TRUE
;
}
group
*
pgroup
=
pduel
->
new_group
();
group
*
pgroup
=
pduel
->
new_group
();
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
...
@@ -4371,10 +4390,14 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
...
@@ -4371,10 +4390,14 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, uint32 lv, card* sc
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
513
);
pduel
->
write_buffer32
(
513
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
min
+
(
min
<<
16
));
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
+
((
uint32
)
core
.
summon_cancelable
<<
16
)
,
min
+
(
min
<<
16
));
return
FALSE
;
return
FALSE
;
}
}
case
3
:
{
case
3
:
{
if
(
returns
.
ivalue
[
0
]
==
-
1
)
{
pduel
->
lua
->
add_param
((
void
*
)
0
,
PARAM_TYPE_GROUP
);
return
TRUE
;
}
int32
pv
=
0
;
int32
pv
=
0
;
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
...
...
ocgcore/processor.cpp
View file @
5298ad05
...
@@ -2752,6 +2752,7 @@ int32 field::process_idle_command(uint16 step) {
...
@@ -2752,6 +2752,7 @@ int32 field::process_idle_command(uint16 step) {
}
}
case
6
:
{
case
6
:
{
card
*
target
=
core
.
spsummonable_cards
[
returns
.
ivalue
[
0
]
>>
16
];
card
*
target
=
core
.
spsummonable_cards
[
returns
.
ivalue
[
0
]
>>
16
];
core
.
summon_cancelable
=
TRUE
;
special_summon_rule
(
infos
.
turn_player
,
target
,
0
);
special_summon_rule
(
infos
.
turn_player
,
target
,
0
);
core
.
units
.
begin
()
->
step
=
-
1
;
core
.
units
.
begin
()
->
step
=
-
1
;
return
FALSE
;
return
FALSE
;
...
...
script/utility.lua
View file @
5298ad05
...
@@ -120,6 +120,7 @@ function Auxiliary.AddSynchroProcedure(c,f1,f2,ct)
...
@@ -120,6 +120,7 @@ function Auxiliary.AddSynchroProcedure(c,f1,f2,ct)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
Auxiliary
.
SynCondition
(
f1
,
f2
,
ct
,
99
))
e1
:
SetCondition
(
Auxiliary
.
SynCondition
(
f1
,
f2
,
ct
,
99
))
e1
:
SetTarget
(
Auxiliary
.
SynTarget
(
f1
,
f2
,
ct
,
99
))
e1
:
SetOperation
(
Auxiliary
.
SynOperation
(
f1
,
f2
,
ct
,
99
))
e1
:
SetOperation
(
Auxiliary
.
SynOperation
(
f1
,
f2
,
ct
,
99
))
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
@@ -138,8 +139,8 @@ function Auxiliary.SynCondition(f1,f2,minct,maxc)
...
@@ -138,8 +139,8 @@ function Auxiliary.SynCondition(f1,f2,minct,maxc)
return
Duel
.
CheckSynchroMaterial
(
c
,
f1
,
f2
,
minc
,
maxc
,
smat
,
mg
)
return
Duel
.
CheckSynchroMaterial
(
c
,
f1
,
f2
,
minc
,
maxc
,
smat
,
mg
)
end
end
end
end
function
Auxiliary
.
Syn
Operation
(
f1
,
f2
,
minct
,
maxc
)
function
Auxiliary
.
Syn
Target
(
f1
,
f2
,
minct
,
maxc
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
smat
,
mg
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
hk
,
c
,
smat
,
mg
)
local
g
=
nil
local
g
=
nil
local
ft
=
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
local
ct
=-
ft
local
ct
=-
ft
...
@@ -150,8 +151,19 @@ function Auxiliary.SynOperation(f1,f2,minct,maxc)
...
@@ -150,8 +151,19 @@ function Auxiliary.SynOperation(f1,f2,minct,maxc)
else
else
g
=
Duel
.
SelectSynchroMaterial
(
c
:
GetControler
(),
c
,
f1
,
f2
,
minc
,
maxc
,
smat
,
mg
)
g
=
Duel
.
SelectSynchroMaterial
(
c
:
GetControler
(),
c
,
f1
,
f2
,
minc
,
maxc
,
smat
,
mg
)
end
end
if
g
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
return
true
else
return
false
end
end
end
function
Auxiliary
.
SynOperation
(
f1
,
f2
,
minct
,
maxc
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
smat
,
mg
)
local
g
=
e
:
GetLabelObject
()
c
:
SetMaterial
(
g
)
c
:
SetMaterial
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_SYNCHRO
)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_SYNCHRO
)
g
:
DeleteGroup
()
end
end
end
end
--Synchro monster, 1 tuner + 1 monster
--Synchro monster, 1 tuner + 1 monster
...
@@ -162,6 +174,7 @@ function Auxiliary.AddSynchroProcedure2(c,f1,f2)
...
@@ -162,6 +174,7 @@ function Auxiliary.AddSynchroProcedure2(c,f1,f2)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
Auxiliary
.
SynCondition
(
f1
,
f2
,
1
,
1
))
e1
:
SetCondition
(
Auxiliary
.
SynCondition
(
f1
,
f2
,
1
,
1
))
e1
:
SetTarget
(
Auxiliary
.
SynTarget
(
f1
,
f2
,
1
,
1
))
e1
:
SetOperation
(
Auxiliary
.
SynOperation
(
f1
,
f2
,
1
,
1
))
e1
:
SetOperation
(
Auxiliary
.
SynOperation
(
f1
,
f2
,
1
,
1
))
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
@@ -190,9 +203,11 @@ function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
...
@@ -190,9 +203,11 @@ function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
if
not
maxct
then
maxct
=
ct
end
if
not
maxct
then
maxct
=
ct
end
if
alterf
then
if
alterf
then
e1
:
SetCondition
(
Auxiliary
.
XyzCondition2
(
f
,
lv
,
ct
,
maxct
,
alterf
,
desc
,
op
))
e1
:
SetCondition
(
Auxiliary
.
XyzCondition2
(
f
,
lv
,
ct
,
maxct
,
alterf
,
desc
,
op
))
e1
:
SetTarget
(
Auxiliary
.
XyzTarget2
(
f
,
lv
,
ct
,
maxct
,
alterf
,
desc
,
op
))
e1
:
SetOperation
(
Auxiliary
.
XyzOperation2
(
f
,
lv
,
ct
,
maxct
,
alterf
,
desc
,
op
))
e1
:
SetOperation
(
Auxiliary
.
XyzOperation2
(
f
,
lv
,
ct
,
maxct
,
alterf
,
desc
,
op
))
else
else
e1
:
SetCondition
(
Auxiliary
.
XyzCondition
(
f
,
lv
,
ct
,
maxct
))
e1
:
SetCondition
(
Auxiliary
.
XyzCondition
(
f
,
lv
,
ct
,
maxct
))
e1
:
SetTarget
(
Auxiliary
.
XyzTarget
(
f
,
lv
,
ct
,
maxct
))
e1
:
SetOperation
(
Auxiliary
.
XyzOperation
(
f
,
lv
,
ct
,
maxct
))
e1
:
SetOperation
(
Auxiliary
.
XyzOperation
(
f
,
lv
,
ct
,
maxct
))
end
end
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
...
@@ -210,6 +225,20 @@ function Auxiliary.XyzCondition(f,lv,minc,maxc)
...
@@ -210,6 +225,20 @@ function Auxiliary.XyzCondition(f,lv,minc,maxc)
return
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
return
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
end
end
end
end
function
Auxiliary
.
XyzTarget
(
f
,
lv
,
minc
,
maxc
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
)
if
og
then
return
true
else
local
g
=
Duel
.
SelectXyzMaterial
(
tp
,
c
,
f
,
lv
,
minc
,
maxc
)
if
g
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
return
true
else
return
false
end
end
end
end
function
Auxiliary
.
XyzOperation
(
f
,
lv
,
minc
,
maxc
)
function
Auxiliary
.
XyzOperation
(
f
,
lv
,
minc
,
maxc
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
)
if
og
then
if
og
then
...
@@ -224,7 +253,7 @@ function Auxiliary.XyzOperation(f,lv,minc,maxc)
...
@@ -224,7 +253,7 @@ function Auxiliary.XyzOperation(f,lv,minc,maxc)
c
:
SetMaterial
(
og
)
c
:
SetMaterial
(
og
)
Duel
.
Overlay
(
c
,
og
)
Duel
.
Overlay
(
c
,
og
)
else
else
local
mg
=
Duel
.
SelectXyzMaterial
(
tp
,
c
,
f
,
lv
,
minc
,
maxc
)
local
mg
=
e
:
GetLabelObject
(
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
while
tc
do
...
@@ -235,6 +264,7 @@ function Auxiliary.XyzOperation(f,lv,minc,maxc)
...
@@ -235,6 +264,7 @@ function Auxiliary.XyzOperation(f,lv,minc,maxc)
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
mg
)
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
Duel
.
Overlay
(
c
,
mg
)
mg
:
DeleteGroup
()
end
end
end
end
end
end
...
@@ -254,6 +284,31 @@ function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op)
...
@@ -254,6 +284,31 @@ function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op)
return
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
return
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
end
end
end
end
function
Auxiliary
.
XyzTarget2
(
f
,
lv
,
minc
,
maxc
,
alterf
,
desc
,
op
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
og
)
if
og
then
return
true
else
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ct
=-
ft
local
b1
=
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
local
b2
=
ct
<
1
and
Duel
.
IsExistingMatchingCard
(
Auxiliary
.
XyzAlterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
alterf
,
c
)
and
(
not
op
or
op
(
e
,
tp
,
0
))
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
desc
))
then
e
:
SetLabel
(
1
)
return
true
else
e
:
SetLabel
(
0
)
local
g
=
Duel
.
SelectXyzMaterial
(
tp
,
c
,
f
,
lv
,
minc
,
maxc
)
if
g
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
return
true
else
return
false
end
end
end
end
end
function
Auxiliary
.
XyzOperation2
(
f
,
lv
,
minc
,
maxc
,
alterf
,
desc
,
op
)
function
Auxiliary
.
XyzOperation2
(
f
,
lv
,
minc
,
maxc
,
alterf
,
desc
,
op
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
)
if
og
then
if
og
then
...
@@ -268,12 +323,7 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
...
@@ -268,12 +323,7 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
c
:
SetMaterial
(
og
)
c
:
SetMaterial
(
og
)
Duel
.
Overlay
(
c
,
og
)
Duel
.
Overlay
(
c
,
og
)
else
else
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
e
:
GetLabel
()
==
1
then
local
ct
=-
ft
local
b1
=
Duel
.
CheckXyzMaterial
(
c
,
f
,
lv
,
minc
,
maxc
,
og
)
local
b2
=
ct
<
1
and
Duel
.
IsExistingMatchingCard
(
Auxiliary
.
XyzAlterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
alterf
,
c
)
and
(
not
op
or
op
(
e
,
tp
,
0
))
if
b2
and
(
not
b1
or
Duel
.
SelectYesNo
(
tp
,
desc
))
then
if
op
then
op
(
e
,
tp
,
1
)
end
if
op
then
op
(
e
,
tp
,
1
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
mg
=
Duel
.
SelectMatchingCard
(
tp
,
Auxiliary
.
XyzAlterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
alterf
,
c
)
local
mg
=
Duel
.
SelectMatchingCard
(
tp
,
Auxiliary
.
XyzAlterFilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
alterf
,
c
)
...
@@ -284,7 +334,7 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
...
@@ -284,7 +334,7 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
c
:
SetMaterial
(
mg
)
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
Duel
.
Overlay
(
c
,
mg
)
else
else
local
mg
=
Duel
.
SelectXyzMaterial
(
tp
,
c
,
f
,
lv
,
minc
,
maxc
)
local
mg
=
e
:
GetLabelObject
(
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
while
tc
do
...
@@ -295,6 +345,7 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
...
@@ -295,6 +345,7 @@ function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
mg
)
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
Duel
.
Overlay
(
c
,
mg
)
mg
:
DeleteGroup
()
end
end
end
end
end
end
...
...
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