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
YGOPRO-520DIY
ygopro
Commits
03b11da4
Commit
03b11da4
authored
Mar 28, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8933d0b9
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
118 additions
and
88 deletions
+118
-88
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+12
-6
ocgcore/processor.cpp
ocgcore/processor.cpp
+29
-20
script/c11593137.lua
script/c11593137.lua
+13
-8
script/c30888983.lua
script/c30888983.lua
+12
-7
script/c32233746.lua
script/c32233746.lua
+3
-3
script/c37926346.lua
script/c37926346.lua
+10
-5
script/c44901281.lua
script/c44901281.lua
+3
-5
script/c56993276.lua
script/c56993276.lua
+7
-5
script/c57355219.lua
script/c57355219.lua
+3
-3
script/c59718521.lua
script/c59718521.lua
+3
-3
script/c74294676.lua
script/c74294676.lua
+1
-1
script/c7811875.lua
script/c7811875.lua
+7
-5
script/c93016201.lua
script/c93016201.lua
+9
-11
script/c97836203.lua
script/c97836203.lua
+4
-4
No files found.
gframe/single_duel.cpp
View file @
03b11da4
...
@@ -782,7 +782,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -782,7 +782,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer
::
SendBufferToPlayer
(
players
[
1
-
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
1
-
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
NetServer
::
ReSendToPlayer
(
*
oit
);
RefreshHand
(
player
,
0x
1
81fff
,
0
);
RefreshHand
(
player
,
0x
7
81fff
,
0
);
break
;
break
;
}
}
case
MSG_REFRESH_DECK
:
{
case
MSG_REFRESH_DECK
:
{
...
...
gframe/tag_duel.cpp
View file @
03b11da4
...
@@ -723,7 +723,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -723,7 +723,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer
::
SendBufferToPlayer
(
players
[
i
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
i
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
NetServer
::
ReSendToPlayer
(
*
oit
);
RefreshHand
(
player
,
0x
1
81fff
,
0
);
RefreshHand
(
player
,
0x
7
81fff
,
0
);
break
;
break
;
}
}
case
MSG_REFRESH_DECK
:
{
case
MSG_REFRESH_DECK
:
{
...
...
ocgcore/operations.cpp
View file @
03b11da4
...
@@ -2165,20 +2165,26 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
...
@@ -2165,20 +2165,26 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
}
}
case
26
:
{
case
26
:
{
group
*
pgroup
=
core
.
units
.
begin
()
->
ptarget
;
group
*
pgroup
=
core
.
units
.
begin
()
->
ptarget
;
if
((
*
pgroup
->
container
.
begin
())
->
is_status
(
STATUS_SUMMONING
))
return
FALSE
;
card_set
cset
;
card_set
cset
;
for
(
auto
cit
=
pgroup
->
container
.
begin
();
cit
!=
pgroup
->
container
.
end
();
++
cit
)
{
for
(
auto
cit
=
pgroup
->
container
.
begin
();
cit
!=
pgroup
->
container
.
end
();
)
{
if
((
*
cit
)
->
current
.
location
==
LOCATION_MZONE
)
card
*
pcard
=
*
cit
++
;
cset
.
insert
(
*
cit
);
if
(
!
pcard
->
is_status
(
STATUS_SUMMONING
))
{
pgroup
->
container
.
erase
(
pcard
);
if
(
pcard
->
current
.
location
==
LOCATION_MZONE
)
cset
.
insert
(
*
cit
);
}
}
}
if
(
cset
.
size
()
==
0
)
return
FALSE
;
send_to
(
&
cset
,
0
,
REASON_RULE
,
sumplayer
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
send_to
(
&
cset
,
0
,
REASON_RULE
,
sumplayer
,
sumplayer
,
LOCATION_GRAVE
,
0
,
0
);
adjust_instant
();
adjust_instant
();
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
add_process
(
PROCESSOR_POINT_EVENT
,
0
,
0
,
0
,
FALSE
,
0
);
return
TRU
E
;
return
FALS
E
;
}
}
case
27
:
{
case
27
:
{
group
*
pgroup
=
core
.
units
.
begin
()
->
ptarget
;
group
*
pgroup
=
core
.
units
.
begin
()
->
ptarget
;
if
(
pgroup
->
container
.
size
()
==
0
)
return
TRUE
;
for
(
auto
oeit
=
effects
.
oath
.
begin
();
oeit
!=
effects
.
oath
.
end
();
++
oeit
)
for
(
auto
oeit
=
effects
.
oath
.
begin
();
oeit
!=
effects
.
oath
.
end
();
++
oeit
)
if
(
oeit
->
second
==
core
.
units
.
begin
()
->
peffect
)
if
(
oeit
->
second
==
core
.
units
.
begin
()
->
peffect
)
oeit
->
second
=
0
;
oeit
->
second
=
0
;
...
...
ocgcore/processor.cpp
View file @
03b11da4
...
@@ -1413,13 +1413,13 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1413,13 +1413,13 @@ int32 field::process_phase_event(int16 step, int32 phase) {
newchain
.
flag
=
0
;
newchain
.
flag
=
0
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
evt
=
nil_event
;
newchain
.
evt
=
nil_event
;
newchain
.
triggering_effect
=
peffect
;
newchain
.
triggering_controler
=
peffect
->
handler
->
current
.
controler
;
newchain
.
triggering_controler
=
peffect
->
handler
->
current
.
controler
;
newchain
.
triggering_location
=
peffect
->
handler
->
current
.
location
;
newchain
.
triggering_location
=
peffect
->
handler
->
current
.
location
;
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_player
=
infos
.
turn_player
;
newchain
.
triggering_player
=
infos
.
turn_player
;
core
.
new_chains
.
push_back
(
newchain
);
core
.
new_chains
.
push_back
(
newchain
);
newchain
.
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
infos
.
turn_player
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
infos
.
turn_player
);
...
@@ -1551,13 +1551,13 @@ int32 field::process_phase_event(int16 step, int32 phase) {
...
@@ -1551,13 +1551,13 @@ int32 field::process_phase_event(int16 step, int32 phase) {
newchain
.
flag
=
0
;
newchain
.
flag
=
0
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
evt
=
nil_event
;
newchain
.
evt
=
nil_event
;
newchain
.
triggering_effect
=
peffect
;
newchain
.
triggering_controler
=
peffect
->
handler
->
current
.
controler
;
newchain
.
triggering_controler
=
peffect
->
handler
->
current
.
controler
;
newchain
.
triggering_location
=
peffect
->
handler
->
current
.
location
;
newchain
.
triggering_location
=
peffect
->
handler
->
current
.
location
;
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_player
=
1
-
infos
.
turn_player
;
newchain
.
triggering_player
=
1
-
infos
.
turn_player
;
core
.
new_chains
.
push_back
(
newchain
);
core
.
new_chains
.
push_back
(
newchain
);
newchain
.
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
infos
.
turn_player
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
infos
.
turn_player
);
...
@@ -1676,13 +1676,15 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1676,13 +1676,15 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
core
.
delayed_quick
.
clear
();
core
.
delayed_quick
.
clear
();
core
.
delayed_quick_break
.
swap
(
core
.
delayed_quick
);
core
.
delayed_quick_break
.
swap
(
core
.
delayed_quick
);
for
(
auto
clit
=
core
.
flip_chain
.
begin
();
clit
!=
core
.
flip_chain
.
end
();
++
clit
)
{
for
(
auto
clit
=
core
.
flip_chain
.
begin
();
clit
!=
core
.
flip_chain
.
end
();
++
clit
)
{
if
(
clit
->
triggering_effect
->
is_chainable
(
clit
->
triggering_player
)
effect
*
peffect
=
clit
->
triggering_effect
;
&&
clit
->
triggering_effect
->
is_activateable
(
clit
->
triggering_player
,
clit
->
evt
,
TRUE
))
{
if
(
peffect
->
is_chainable
(
clit
->
triggering_player
)
&&
peffect
->
is_activateable
(
clit
->
triggering_player
,
clit
->
evt
,
TRUE
))
{
if
(
clit
->
triggering_player
==
infos
.
turn_player
)
if
(
clit
->
triggering_player
==
infos
.
turn_player
)
core
.
tpchain
.
push_back
(
*
clit
);
core
.
tpchain
.
push_back
(
*
clit
);
else
else
core
.
ntpchain
.
push_back
(
*
clit
);
core
.
ntpchain
.
push_back
(
*
clit
);
clit
->
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
}
}
}
}
if
(
core
.
tpchain
.
size
()
>
1
)
if
(
core
.
tpchain
.
size
()
>
1
)
...
@@ -1738,6 +1740,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1738,6 +1740,7 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
else
else
core
.
ntpchain
.
push_back
(
*
clit
);
core
.
ntpchain
.
push_back
(
*
clit
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
}
}
}
}
if
(
core
.
tpchain
.
size
()
>
1
)
if
(
core
.
tpchain
.
size
()
>
1
)
...
@@ -1831,17 +1834,18 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
...
@@ -1831,17 +1834,18 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
return
FALSE
;
return
FALSE
;
}
}
case
6
:
{
case
6
:
{
auto
clit
=
core
.
new_ochain_s
.
begin
();
uint8
tp
=
clit
->
triggering_player
;
if
(
returns
.
ivalue
[
0
])
{
if
(
returns
.
ivalue
[
0
])
{
clit
->
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
auto
clit
=
core
.
new_ochain_s
.
begin
();
effect
*
peffect
=
clit
->
triggering_effect
;
uint8
tp
=
clit
->
triggering_player
;
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
if
(
tp
==
infos
.
turn_player
)
if
(
tp
==
infos
.
turn_player
)
core
.
tpchain
.
push_back
(
*
clit
);
core
.
tpchain
.
push_back
(
*
clit
);
else
else
core
.
ntpchain
.
push_back
(
*
clit
);
core
.
ntpchain
.
push_back
(
*
clit
);
if
(
clit
->
triggering_effect
->
flag
&
EFFECT_FLAG_CVAL_CHECK
)
{
if
(
peffect
->
flag
&
EFFECT_FLAG_CVAL_CHECK
)
clit
->
triggering_effect
->
get_value
();
peffect
->
get_value
();
}
}
}
core
.
new_ochain_s
.
pop_front
();
core
.
new_ochain_s
.
pop_front
();
core
.
units
.
begin
()
->
step
=
4
;
core
.
units
.
begin
()
->
step
=
4
;
...
@@ -1956,6 +1960,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -1956,6 +1960,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
if
(
act
){
if
(
act
){
core
.
tpchain
.
push_back
(
ifit
->
second
);
core
.
tpchain
.
push_back
(
ifit
->
second
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
}
}
}
else
{
}
else
{
act
=
true
;
act
=
true
;
...
@@ -1977,6 +1982,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -1977,6 +1982,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
if
(
act
){
if
(
act
){
core
.
ntpchain
.
push_back
(
ifit
->
second
);
core
.
ntpchain
.
push_back
(
ifit
->
second
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
}
}
}
}
}
}
...
@@ -2146,8 +2152,10 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -2146,8 +2152,10 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
if
(
core
.
select_chains
.
size
()
&&
returns
.
ivalue
[
0
]
!=
-
1
)
{
if
(
core
.
select_chains
.
size
()
&&
returns
.
ivalue
[
0
]
!=
-
1
)
{
chain
newchain
=
core
.
select_chains
[
returns
.
ivalue
[
0
]];
chain
newchain
=
core
.
select_chains
[
returns
.
ivalue
[
0
]];
core
.
new_chains
.
push_back
(
newchain
);
core
.
new_chains
.
push_back
(
newchain
);
core
.
delayed_quick
.
erase
(
make_pair
(
newchain
.
triggering_effect
,
newchain
.
evt
));
effect
*
peffect
=
newchain
.
triggering_effect
;
newchain
.
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
core
.
delayed_quick
.
erase
(
make_pair
(
peffect
,
newchain
.
evt
));
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
priority
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
priority
);
infos
.
priorities
[
0
]
=
0
;
infos
.
priorities
[
0
]
=
0
;
...
@@ -2535,6 +2543,7 @@ int32 field::process_idle_command(uint16 step) {
...
@@ -2535,6 +2543,7 @@ int32 field::process_idle_command(uint16 step) {
newchain
.
triggering_player
=
infos
.
turn_player
;
newchain
.
triggering_player
=
infos
.
turn_player
;
core
.
new_chains
.
push_back
(
newchain
);
core
.
new_chains
.
push_back
(
newchain
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
infos
.
turn_player
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
infos
.
turn_player
);
...
@@ -2760,6 +2769,7 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2760,6 +2769,7 @@ int32 field::process_battle_command(uint16 step) {
newchain
.
triggering_player
=
infos
.
turn_player
;
newchain
.
triggering_player
=
infos
.
turn_player
;
core
.
new_chains
.
push_back
(
newchain
);
core
.
new_chains
.
push_back
(
newchain
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
();
core
.
select_chains
.
clear
();
core
.
select_chains
.
clear
();
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
infos
.
turn_player
);
add_process
(
PROCESSOR_QUICK_EFFECT
,
0
,
0
,
0
,
FALSE
,
1
-
infos
.
turn_player
);
...
@@ -4199,12 +4209,12 @@ int32 field::add_chain(uint16 step) {
...
@@ -4199,12 +4209,12 @@ int32 field::add_chain(uint16 step) {
chain_array
::
iterator
clit
=
--
(
core
.
current_chain
.
end
());
chain_array
::
iterator
clit
=
--
(
core
.
current_chain
.
end
());
effect
*
peffect
=
clit
->
triggering_effect
;
effect
*
peffect
=
clit
->
triggering_effect
;
if
(
clit
->
target_cards
&&
clit
->
target_cards
->
container
.
size
())
{
if
(
clit
->
target_cards
&&
clit
->
target_cards
->
container
.
size
())
{
if
(
clit
->
triggering_
effect
->
flag
&
EFFECT_FLAG_CARD_TARGET
)
{
if
(
p
effect
->
flag
&
EFFECT_FLAG_CARD_TARGET
)
{
for
(
auto
cit
=
clit
->
target_cards
->
container
.
begin
();
cit
!=
clit
->
target_cards
->
container
.
end
();
++
cit
)
for
(
auto
cit
=
clit
->
target_cards
->
container
.
begin
();
cit
!=
clit
->
target_cards
->
container
.
end
();
++
cit
)
raise_single_event
(
*
cit
,
0
,
EVENT_BECOME_TARGET
,
clit
->
triggering_
effect
,
0
,
clit
->
triggering_player
,
0
,
clit
->
chain_count
);
raise_single_event
(
*
cit
,
0
,
EVENT_BECOME_TARGET
,
p
effect
,
0
,
clit
->
triggering_player
,
0
,
clit
->
chain_count
);
process_single_event
();
process_single_event
();
if
(
clit
->
target_cards
->
container
.
size
())
if
(
clit
->
target_cards
->
container
.
size
())
raise_event
(
&
clit
->
target_cards
->
container
,
EVENT_BECOME_TARGET
,
clit
->
triggering_
effect
,
0
,
clit
->
triggering_player
,
clit
->
triggering_player
,
clit
->
chain_count
);
raise_event
(
&
clit
->
target_cards
->
container
,
EVENT_BECOME_TARGET
,
p
effect
,
0
,
clit
->
triggering_player
,
clit
->
triggering_player
,
clit
->
chain_count
);
}
}
}
}
if
(
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
{
if
(
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
{
...
@@ -4213,11 +4223,10 @@ int32 field::add_chain(uint16 step) {
...
@@ -4213,11 +4223,10 @@ int32 field::add_chain(uint16 step) {
&&
!
peffect
->
handler
->
is_affected_by_effect
(
EFFECT_REMAIN_FIELD
))
&&
!
peffect
->
handler
->
is_affected_by_effect
(
EFFECT_REMAIN_FIELD
))
peffect
->
handler
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
TRUE
);
peffect
->
handler
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
TRUE
);
}
}
clit
->
triggering_effect
->
dec_count
();
core
.
phase_action
=
TRUE
;
core
.
phase_action
=
TRUE
;
pduel
->
write_buffer8
(
MSG_CHAINED
);
pduel
->
write_buffer8
(
MSG_CHAINED
);
pduel
->
write_buffer8
(
clit
->
chain_count
);
pduel
->
write_buffer8
(
clit
->
chain_count
);
raise_event
(
clit
->
triggering_effect
->
handler
,
EVENT_CHAINING
,
clit
->
triggering_
effect
,
0
,
clit
->
triggering_player
,
clit
->
triggering_player
,
clit
->
chain_count
);
raise_event
(
peffect
->
handler
,
EVENT_CHAINING
,
p
effect
,
0
,
clit
->
triggering_player
,
clit
->
triggering_player
,
clit
->
chain_count
);
process_instant_event
();
process_instant_event
();
if
(
core
.
new_chains
.
size
())
if
(
core
.
new_chains
.
size
())
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
add_process
(
PROCESSOR_ADD_CHAIN
,
0
,
0
,
0
,
0
,
0
);
...
...
script/c11593137.lua
View file @
03b11da4
...
@@ -17,19 +17,24 @@ function c11593137.initial_effect(c)
...
@@ -17,19 +17,24 @@ function c11593137.initial_effect(c)
e3
:
SetCode
(
EVENT_SPSUMMON
)
e3
:
SetCode
(
EVENT_SPSUMMON
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c11593137
.
filter
(
c
)
return
c
:
IsAttribute
(
0x30
)
and
c
:
IsAbleToRemove
()
end
function
c11593137
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c11593137
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
==
0
and
eg
:
GetFirst
():
IsAttribute
(
0x30
)
return
Duel
.
GetCurrentChain
()
==
0
and
eg
:
IsExists
(
c11593137
.
filter
,
1
,
nil
)
end
end
function
c11593137
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c11593137
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
2000
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
2000
)
end
else
Duel
.
PayLPCost
(
tp
,
2000
)
end
Duel
.
PayLPCost
(
tp
,
2000
)
end
end
function
c11593137
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c11593137
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
eg
:
GetFirst
():
IsAbleToRemove
()
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
local
g
=
eg
:
Filter
(
c11593137
.
filter
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
c11593137
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c11593137
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
:
GetFirst
())
local
g
=
eg
:
Filter
(
c11593137
.
filter
,
nil
)
Duel
.
Remove
(
eg
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
NegateSummon
(
g
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
script/c30888983.lua
View file @
03b11da4
...
@@ -20,19 +20,24 @@ end
...
@@ -20,19 +20,24 @@ end
function
c30888983
.
cfilter
(
c
,
rc
)
function
c30888983
.
cfilter
(
c
,
rc
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
rc
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
rc
)
end
end
function
c30888983
.
filter
(
c
)
return
Duel
.
IsExistingMatchingCard
(
c30888983
.
cfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
c
:
GetRace
())
end
function
c30888983
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c30888983
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
==
0
and
Duel
.
IsExistingMatchingCard
(
c30888983
.
cfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
eg
:
GetFirst
():
GetRace
()
)
return
Duel
.
GetCurrentChain
()
==
0
and
eg
:
IsExists
(
c30888983
.
filter
,
1
,
nil
)
end
end
function
c30888983
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c30888983
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
else
Duel
.
PayLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
end
end
function
c30888983
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c30888983
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
local
g
=
eg
:
Filter
(
c30888983
.
filter
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
c30888983
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c30888983
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
:
GetFirst
())
local
g
=
eg
:
Filter
(
c30888983
.
filter
,
nil
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
NegateSummon
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
script/c32233746.lua
View file @
03b11da4
...
@@ -27,10 +27,10 @@ function c32233746.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -27,10 +27,10 @@ function c32233746.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
c32233746
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c32233746
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
end
end
function
c32233746
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c32233746
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
:
GetFirst
()
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
script/c37926346.lua
View file @
03b11da4
...
@@ -16,8 +16,11 @@ function c37926346.initial_effect(c)
...
@@ -16,8 +16,11 @@ function c37926346.initial_effect(c)
e1
:
SetOperation
(
c37926346
.
operation
)
e1
:
SetOperation
(
c37926346
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c37926346
.
filter
(
c
)
return
c
:
IsLevelAbove
(
5
)
end
function
c37926346
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c37926346
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
():
GetLevel
()
>=
5
and
Duel
.
GetCurrentChain
()
==
0
return
Duel
.
GetCurrentChain
()
==
0
and
eg
:
IsExists
(
c37926346
.
filter
,
1
,
nil
)
end
end
function
c37926346
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c37926346
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
...
@@ -25,10 +28,12 @@ function c37926346.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -25,10 +28,12 @@ function c37926346.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
c37926346
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c37926346
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
local
g
=
eg
:
Filter
(
c37926346
.
filter
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
c37926346
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c37926346
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
NegateSummon
(
eg
:
GetFirst
())
local
g
=
eg
:
Filter
(
c37926346
.
filter
,
nil
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
NegateSummon
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
script/c44901281.lua
View file @
03b11da4
...
@@ -25,12 +25,10 @@ function c44901281.condition(e,tp,eg,ep,ev,re,r,rp)
...
@@ -25,12 +25,10 @@ function c44901281.condition(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c44901281
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c44901281
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
end
end
function
c44901281
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c44901281
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
NegateSummon
(
eg
)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
NegateSummon
(
eg
:
GetFirst
())
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
script/c56993276.lua
View file @
03b11da4
...
@@ -15,7 +15,7 @@ function c56993276.initial_effect(c)
...
@@ -15,7 +15,7 @@ function c56993276.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c56993276
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c56993276
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
():
IsControler
(
1
-
tp
)
and
Duel
.
GetCurrentChain
()
==
0
return
Duel
.
GetCurrentChain
()
==
0
and
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
end
end
function
c56993276
.
cfilter
(
c
)
function
c56993276
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xe
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDiscardable
()
return
c
:
IsSetCard
(
0xe
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsDiscardable
()
...
@@ -26,10 +26,12 @@ function c56993276.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -26,10 +26,12 @@ function c56993276.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
c56993276
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c56993276
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
local
g
=
eg
:
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
c56993276
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c56993276
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
:
GetFirst
())
local
g
=
eg
:
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
NegateSummon
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
script/c57355219.lua
View file @
03b11da4
...
@@ -36,11 +36,11 @@ function c57355219.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -36,11 +36,11 @@ function c57355219.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
c57355219
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c57355219
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
end
end
function
c57355219
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c57355219
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
:
GetFirst
()
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
script/c59718521.lua
View file @
03b11da4
...
@@ -34,11 +34,11 @@ function c59718521.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -34,11 +34,11 @@ function c59718521.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
c59718521
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c59718521
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
end
end
function
c59718521
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c59718521
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
:
GetFirst
()
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c59718521
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c59718521
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c74294676.lua
View file @
03b11da4
...
@@ -33,7 +33,7 @@ function c74294676.initial_effect(c)
...
@@ -33,7 +33,7 @@ function c74294676.initial_effect(c)
e3
:
SetCode
(
EVENT_SPSUMMON
)
e3
:
SetCode
(
EVENT_SPSUMMON
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c74294676
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c74294676
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
end
end
...
...
script/c7811875.lua
View file @
03b11da4
...
@@ -18,7 +18,7 @@ function c7811875.initial_effect(c)
...
@@ -18,7 +18,7 @@ function c7811875.initial_effect(c)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c7811875
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c7811875
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
==
0
return
Duel
.
GetCurrentChain
()
==
0
and
eg
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
end
end
function
c7811875
.
cfilter
(
c
)
function
c7811875
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsAbleToGraveAsCost
()
...
@@ -31,12 +31,14 @@ function c7811875.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -31,12 +31,14 @@ function c7811875.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
c7811875
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c7811875
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
local
g
=
eg
:
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
c7811875
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c7811875
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
:
GetFirst
())
local
g
=
eg
:
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
NegateSummon
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
...
...
script/c93016201.lua
View file @
03b11da4
...
@@ -46,7 +46,7 @@ end
...
@@ -46,7 +46,7 @@ end
function
c93016201
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c93016201
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
e
:
SetLabel
(
0
)
if
Duel
.
GetLP
(
tp
)
<=
800
then
return
end
if
not
Duel
.
PayLPCost
(
tp
,
800
)
then
return
end
local
ct
=
Duel
.
GetCurrentChain
()
local
ct
=
Duel
.
GetCurrentChain
()
if
ct
==
1
then
return
end
if
ct
==
1
then
return
end
local
pe
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
pe
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
...
@@ -72,7 +72,7 @@ function c93016201.activate1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -72,7 +72,7 @@ function c93016201.activate1(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
e
:
GetLabel
()
~=
1
then
return
end
if
e
:
GetLabel
()
~=
1
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
ct
,
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_COUNT
,
CHAININFO_TARGET_CARDS
)
local
ct
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_COUNT
)
local
te
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
te
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
local
tc
=
te
:
GetHandler
()
Duel
.
NegateEffect
(
ct
-
1
)
Duel
.
NegateEffect
(
ct
-
1
)
...
@@ -84,8 +84,8 @@ function c93016201.condition2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -84,8 +84,8 @@ function c93016201.condition2(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
GetCurrentChain
()
==
0
return
Duel
.
GetCurrentChain
()
==
0
end
end
function
c93016201
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c93016201
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
800
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
800
)
end
else
Duel
.
PayLPCost
(
tp
,
800
)
end
Duel
.
PayLPCost
(
tp
,
800
)
end
end
function
c93016201
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c93016201
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
...
@@ -93,17 +93,16 @@ function c93016201.target2(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -93,17 +93,16 @@ function c93016201.target2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
end
function
c93016201
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c93016201
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
NegateSummon
(
eg
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c93016201
.
condition3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c93016201
.
condition3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsHasCategory
(
CATEGORY_SPECIAL_SUMMON
)
and
Duel
.
IsChainDisablable
(
ev
)
return
re
:
IsHasCategory
(
CATEGORY_SPECIAL_SUMMON
)
and
Duel
.
IsChainDisablable
(
ev
)
end
end
function
c93016201
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c93016201
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
800
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
800
)
end
else
Duel
.
PayLPCost
(
tp
,
800
)
end
Duel
.
PayLPCost
(
tp
,
800
)
end
end
function
c93016201
.
target3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c93016201
.
target3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
...
@@ -113,8 +112,7 @@ function c93016201.target3(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -113,8 +112,7 @@ function c93016201.target3(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
end
end
function
c93016201
.
activate3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c93016201
.
activate3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
NegateEffect
(
ev
)
Duel
.
NegateEffect
(
ev
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
...
...
script/c97836203.lua
View file @
03b11da4
...
@@ -46,17 +46,17 @@ function c97836203.discon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -46,17 +46,17 @@ function c97836203.discon(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c97836203
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c97836203
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
97836203
)
==
0
end
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
97836203
)
==
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
()
,
0
,
0
)
e
:
GetHandler
():
RegisterFlagEffect
(
97836203
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
97836203
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c97836203
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c97836203
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
NegateSummon
(
eg
:
GetFirst
()
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c97836203
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c97836203
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c97836203
.
filter
(
c
,
e
,
tp
)
function
c97836203
.
filter
(
c
,
e
,
tp
)
...
...
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