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
nanahira
ygopro
Commits
8551cc72
Commit
8551cc72
authored
Aug 06, 2013
by
Fluorohydride
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #591 from VanillaSalt/patch76
fix
parents
567077e2
590e90a6
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
210 additions
and
185 deletions
+210
-185
ocgcore/field.cpp
ocgcore/field.cpp
+3
-0
ocgcore/field.h
ocgcore/field.h
+6
-3
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+2
-19
ocgcore/processor.cpp
ocgcore/processor.cpp
+37
-8
script/c10110717.lua
script/c10110717.lua
+1
-0
script/c12423762.lua
script/c12423762.lua
+0
-2
script/c13455953.lua
script/c13455953.lua
+1
-1
script/c15335853.lua
script/c15335853.lua
+1
-1
script/c17490535.lua
script/c17490535.lua
+4
-4
script/c19310321.lua
script/c19310321.lua
+0
-1
script/c21785144.lua
script/c21785144.lua
+0
-1
script/c22624373.lua
script/c22624373.lua
+0
-1
script/c23323812.lua
script/c23323812.lua
+11
-5
script/c2420921.lua
script/c2420921.lua
+0
-1
script/c27189308.lua
script/c27189308.lua
+0
-1
script/c3070049.lua
script/c3070049.lua
+1
-1
script/c35307484.lua
script/c35307484.lua
+4
-4
script/c44178886.lua
script/c44178886.lua
+0
-1
script/c46044841.lua
script/c46044841.lua
+1
-0
script/c47111934.lua
script/c47111934.lua
+1
-0
script/c52709508.lua
script/c52709508.lua
+1
-0
script/c54455435.lua
script/c54455435.lua
+1
-1
script/c55204071.lua
script/c55204071.lua
+1
-1
script/c56052205.lua
script/c56052205.lua
+5
-6
script/c56321639.lua
script/c56321639.lua
+0
-1
script/c56981417.lua
script/c56981417.lua
+15
-11
script/c6104968.lua
script/c6104968.lua
+1
-0
script/c61166988.lua
script/c61166988.lua
+3
-1
script/c61587183.lua
script/c61587183.lua
+5
-7
script/c63422098.lua
script/c63422098.lua
+14
-8
script/c64815084.lua
script/c64815084.lua
+1
-0
script/c6967870.lua
script/c6967870.lua
+8
-10
script/c7183277.lua
script/c7183277.lua
+0
-1
script/c74506079.lua
script/c74506079.lua
+1
-0
script/c74852810.lua
script/c74852810.lua
+7
-5
script/c76573247.lua
script/c76573247.lua
+3
-3
script/c83725008.lua
script/c83725008.lua
+0
-1
script/c87483942.lua
script/c87483942.lua
+1
-0
script/c90616316.lua
script/c90616316.lua
+5
-3
script/c92394653.lua
script/c92394653.lua
+2
-2
script/c95503687.lua
script/c95503687.lua
+0
-1
script/c97904474.lua
script/c97904474.lua
+1
-1
script/c98850929.lua
script/c98850929.lua
+61
-67
script/c9888196.lua
script/c9888196.lua
+1
-1
No files found.
ocgcore/field.cpp
View file @
8551cc72
...
@@ -18,6 +18,9 @@ int32 field::field_used_count[32] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3
...
@@ -18,6 +18,9 @@ int32 field::field_used_count[32] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3
bool
chain
::
chain_operation_sort
(
chain
c1
,
chain
c2
)
{
bool
chain
::
chain_operation_sort
(
chain
c1
,
chain
c2
)
{
return
c1
.
triggering_effect
->
id
<
c2
.
triggering_effect
->
id
;
return
c1
.
triggering_effect
->
id
<
c2
.
triggering_effect
->
id
;
}
}
bool
tevent
::
operator
<
(
const
tevent
&
v
)
const
{
return
std
::
memcmp
(
this
,
&
v
,
sizeof
(
tevent
))
<
0
;
}
field
::
field
(
duel
*
pduel
)
{
field
::
field
(
duel
*
pduel
)
{
this
->
pduel
=
pduel
;
this
->
pduel
=
pduel
;
infos
.
copy_id
=
1
;
infos
.
copy_id
=
1
;
...
...
ocgcore/field.h
View file @
8551cc72
...
@@ -33,6 +33,7 @@ struct tevent {
...
@@ -33,6 +33,7 @@ struct tevent {
uint32
reason
;
uint32
reason
;
uint8
event_player
;
uint8
event_player
;
uint8
reason_player
;
uint8
reason_player
;
bool
operator
<
(
const
tevent
&
v
)
const
;
};
};
struct
optarget
{
struct
optarget
{
group
*
op_cards
;
group
*
op_cards
;
...
@@ -142,6 +143,7 @@ struct processor {
...
@@ -142,6 +143,7 @@ struct processor {
typedef
std
::
list
<
processor_unit
>
processor_list
;
typedef
std
::
list
<
processor_unit
>
processor_list
;
typedef
std
::
set
<
card
*
,
card_sort
>
card_set
;
typedef
std
::
set
<
card
*
,
card_sort
>
card_set
;
typedef
std
::
set
<
effect
*>
effect_collection
;
typedef
std
::
set
<
effect
*>
effect_collection
;
typedef
std
::
set
<
std
::
pair
<
effect
*
,
tevent
>
>
delayed_effect_collection
;
processor_list
units
;
processor_list
units
;
processor_list
subunits
;
processor_list
subunits
;
...
@@ -178,9 +180,9 @@ struct processor {
...
@@ -178,9 +180,9 @@ struct processor {
chain_list
flip_chain_b
;
chain_list
flip_chain_b
;
chain_list
new_ochain_h
;
chain_list
new_ochain_h
;
chain_list
new_chains
;
chain_list
new_chains
;
effect_collection
delayed_quick_tmp
;
delayed_
effect_collection
delayed_quick_tmp
;
effect_collection
delayed_quick_break
;
delayed_
effect_collection
delayed_quick_break
;
effect_collection
delayed_quick
;
delayed_
effect_collection
delayed_quick
;
instant_f_list
quick_f_chain
;
instant_f_list
quick_f_chain
;
card_set
leave_confirmed
;
card_set
leave_confirmed
;
card_set
special_summoning
;
card_set
special_summoning
;
...
@@ -607,6 +609,7 @@ public:
...
@@ -607,6 +609,7 @@ public:
#define PROCESSOR_CONTROL_ADJUST 76
#define PROCESSOR_CONTROL_ADJUST 76
#define PROCESSOR_PAY_LPCOST 80
#define PROCESSOR_PAY_LPCOST 80
#define PROCESSOR_REMOVE_COUNTER 81
#define PROCESSOR_REMOVE_COUNTER 81
#define PROCESSOR_ATTACK_DISABLE 82
#define PROCESSOR_DESTROY_S 100
#define PROCESSOR_DESTROY_S 100
#define PROCESSOR_RELEASE_S 101
#define PROCESSOR_RELEASE_S 101
...
...
ocgcore/libduel.cpp
View file @
8551cc72
...
@@ -1454,25 +1454,8 @@ int32 scriptlib::duel_get_attack_target(lua_State *L) {
...
@@ -1454,25 +1454,8 @@ int32 scriptlib::duel_get_attack_target(lua_State *L) {
}
}
int32
scriptlib
::
duel_disable_attack
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_disable_attack
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
card
*
attacker
=
pduel
->
game_field
->
core
.
attacker
;
pduel
->
game_field
->
add_process
(
PROCESSOR_ATTACK_DISABLE
,
0
,
0
,
0
,
0
,
0
);
if
(
!
attacker
return
lua_yield
(
L
,
0
);
||
(
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE
&&
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
0
]
&&
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
1
])
||
(
attacker
->
current
.
position
&
POS_FACEDOWN
)
||
attacker
->
is_affected_by_effect
(
EFFECT_ATTACK_DISABLED
)
||
!
attacker
->
is_affect_by_effect
(
pduel
->
game_field
->
core
.
reason_effect
))
lua_pushboolean
(
L
,
0
);
else
{
effect
*
peffect
=
pduel
->
new_effect
();
peffect
->
code
=
EFFECT_ATTACK_DISABLED
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
attacker
->
add_effect
(
peffect
);
attacker
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
pduel
->
game_field
->
raise_event
(
attacker
,
EVENT_ATTACK_DISABLED
,
pduel
->
game_field
->
core
.
reason_effect
,
0
,
pduel
->
game_field
->
core
.
reason_player
,
PLAYER_NONE
,
0
);
pduel
->
game_field
->
process_instant_event
();
lua_pushboolean
(
L
,
1
);
}
return
1
;
}
}
int32
scriptlib
::
duel_chain_attack
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_chain_attack
(
lua_State
*
L
)
{
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
...
...
ocgcore/processor.cpp
View file @
8551cc72
...
@@ -474,6 +474,34 @@ int32 field::process() {
...
@@ -474,6 +474,34 @@ int32 field::process() {
core
.
units
.
begin
()
->
step
++
;
core
.
units
.
begin
()
->
step
++
;
return
pduel
->
bufferlen
;
return
pduel
->
bufferlen
;
}
}
case
PROCESSOR_ATTACK_DISABLE
:
{
if
(
it
->
step
==
0
)
{
card
*
attacker
=
core
.
attacker
;
if
(
!
attacker
||
(
infos
.
phase
==
PHASE_DAMAGE
&&
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
]
&&
attacker
->
fieldid_r
!=
core
.
pre_field
[
1
])
||
(
attacker
->
current
.
position
&
POS_FACEDOWN
)
||
attacker
->
is_affected_by_effect
(
EFFECT_ATTACK_DISABLED
)
||
!
attacker
->
is_affect_by_effect
(
core
.
reason_effect
))
{
returns
.
ivalue
[
0
]
=
0
;
pduel
->
lua
->
add_param
(
returns
.
ivalue
[
0
],
PARAM_TYPE_BOOLEAN
);
core
.
units
.
pop_front
();
}
else
{
effect
*
peffect
=
pduel
->
new_effect
();
peffect
->
code
=
EFFECT_ATTACK_DISABLED
;
peffect
->
type
=
EFFECT_TYPE_SINGLE
;
attacker
->
add_effect
(
peffect
);
attacker
->
set_status
(
STATUS_ATTACK_CANCELED
,
TRUE
);
raise_event
(
attacker
,
EVENT_ATTACK_DISABLED
,
core
.
reason_effect
,
0
,
core
.
reason_player
,
PLAYER_NONE
,
0
);
process_instant_event
();
core
.
units
.
begin
()
->
step
++
;
}
}
else
{
returns
.
ivalue
[
0
]
=
1
;
pduel
->
lua
->
add_param
(
returns
.
ivalue
[
0
],
PARAM_TYPE_BOOLEAN
);
core
.
units
.
pop_front
();
}
return
pduel
->
bufferlen
;
}
case
PROCESSOR_DESTROY_S
:
{
case
PROCESSOR_DESTROY_S
:
{
if
(
it
->
step
==
0
)
{
if
(
it
->
step
==
0
)
{
add_process
(
PROCESSOR_DESTROY
,
0
,
it
->
peffect
,
it
->
ptarget
,
it
->
arg1
,
it
->
arg2
);
add_process
(
PROCESSOR_DESTROY
,
0
,
it
->
peffect
,
it
->
ptarget
,
it
->
arg1
,
it
->
arg2
);
...
@@ -1947,7 +1975,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -1947,7 +1975,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_player
=
priority
;
newchain
.
triggering_player
=
priority
;
core
.
select_chains
.
push_back
(
newchain
);
core
.
select_chains
.
push_back
(
newchain
);
core
.
delayed_quick_tmp
.
erase
(
peffect
);
core
.
delayed_quick_tmp
.
erase
(
make_pair
(
peffect
,
*
evit
)
);
}
}
}
}
pr
=
effects
.
quick_o_effect
.
equal_range
(
evit
->
event_code
);
pr
=
effects
.
quick_o_effect
.
equal_range
(
evit
->
event_code
);
...
@@ -1963,7 +1991,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -1963,7 +1991,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_sequence
=
peffect
->
handler
->
current
.
sequence
;
newchain
.
triggering_player
=
priority
;
newchain
.
triggering_player
=
priority
;
core
.
select_chains
.
push_back
(
newchain
);
core
.
select_chains
.
push_back
(
newchain
);
core
.
delayed_quick_tmp
.
erase
(
peffect
);
core
.
delayed_quick_tmp
.
erase
(
make_pair
(
peffect
,
*
evit
)
);
}
}
}
}
evit
++
;
evit
++
;
...
@@ -1998,11 +2026,12 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -1998,11 +2026,12 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
}
}
if
(
core
.
global_flag
&
GLOBALFLAG_DELAYED_QUICKEFFECT
)
{
if
(
core
.
global_flag
&
GLOBALFLAG_DELAYED_QUICKEFFECT
)
{
for
(
auto
eit
=
core
.
delayed_quick
.
begin
();
eit
!=
core
.
delayed_quick
.
end
();
++
eit
)
{
for
(
auto
eit
=
core
.
delayed_quick
.
begin
();
eit
!=
core
.
delayed_quick
.
end
();
++
eit
)
{
peffect
=
*
eit
;
peffect
=
eit
->
first
;
if
(
peffect
->
is_chainable
(
priority
)
&&
peffect
->
is_activateable
(
priority
,
nil_event
,
TRUE
,
FALSE
,
FALSE
))
{
tevent
evt
=
eit
->
second
;
if
(
peffect
->
is_chainable
(
priority
)
&&
peffect
->
is_activateable
(
priority
,
evt
,
TRUE
,
FALSE
,
FALSE
))
{
newchain
.
flag
=
0
;
newchain
.
flag
=
0
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
chain_id
=
infos
.
field_id
++
;
newchain
.
evt
=
nil_even
t
;
newchain
.
evt
=
ev
t
;
newchain
.
triggering_controler
=
peffect
->
handler
->
current
.
controler
;
newchain
.
triggering_controler
=
peffect
->
handler
->
current
.
controler
;
newchain
.
triggering_effect
=
peffect
;
newchain
.
triggering_effect
=
peffect
;
newchain
.
triggering_location
=
peffect
->
handler
->
current
.
location
;
newchain
.
triggering_location
=
peffect
->
handler
->
current
.
location
;
...
@@ -2069,7 +2098,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
...
@@ -2069,7 +2098,7 @@ 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
(
newchain
.
triggering_effect
);
core
.
delayed_quick
.
erase
(
make_pair
(
newchain
.
triggering_effect
,
newchain
.
evt
)
);
newchain
.
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
newchain
.
triggering_effect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
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
);
...
@@ -2200,13 +2229,13 @@ int32 field::process_instant_event() {
...
@@ -2200,13 +2229,13 @@ int32 field::process_instant_event() {
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
peffect
=
pr
.
first
->
second
;
if
((
peffect
->
flag
&
EFFECT_FLAG_DELAY
)
&&
peffect
->
is_condition_check
(
peffect
->
handler
->
current
.
controler
,
*
elit
))
if
((
peffect
->
flag
&
EFFECT_FLAG_DELAY
)
&&
peffect
->
is_condition_check
(
peffect
->
handler
->
current
.
controler
,
*
elit
))
core
.
delayed_quick_tmp
.
insert
(
peffect
);
core
.
delayed_quick_tmp
.
insert
(
make_pair
(
peffect
,
*
elit
)
);
}
}
pr
=
effects
.
quick_o_effect
.
equal_range
(
elit
->
event_code
);
pr
=
effects
.
quick_o_effect
.
equal_range
(
elit
->
event_code
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
peffect
=
pr
.
first
->
second
;
if
((
peffect
->
flag
&
EFFECT_FLAG_DELAY
)
&&
peffect
->
is_condition_check
(
peffect
->
handler
->
current
.
controler
,
*
elit
))
if
((
peffect
->
flag
&
EFFECT_FLAG_DELAY
)
&&
peffect
->
is_condition_check
(
peffect
->
handler
->
current
.
controler
,
*
elit
))
core
.
delayed_quick_tmp
.
insert
(
peffect
);
core
.
delayed_quick_tmp
.
insert
(
make_pair
(
peffect
,
*
elit
)
);
}
}
}
}
for
(
eit
=
tp
.
begin
(),
evit
=
tev
.
begin
();
eit
!=
tp
.
end
();
++
eit
,
++
evit
)
{
for
(
eit
=
tp
.
begin
(),
evit
=
tev
.
begin
();
eit
!=
tp
.
end
();
++
eit
,
++
evit
)
{
...
...
script/c10110717.lua
View file @
8551cc72
...
@@ -38,6 +38,7 @@ function c10110717.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -38,6 +38,7 @@ function c10110717.operation(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10110717
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c10110717
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
c10110717
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c10110717
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
...
...
script/c12423762.lua
View file @
8551cc72
...
@@ -28,8 +28,6 @@ function c12423762.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -28,8 +28,6 @@ function c12423762.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
c12423762
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12423762
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c13455953.lua
View file @
8551cc72
...
@@ -42,7 +42,7 @@ function c13455953.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -42,7 +42,7 @@ function c13455953.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c13455953
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c13455953
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
()
,
0
,
0
)
end
end
function
c13455953
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c13455953
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
...
...
script/c15335853.lua
View file @
8551cc72
...
@@ -77,7 +77,7 @@ function c15335853.rmop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -77,7 +77,7 @@ function c15335853.rmop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function
c15335853
.
atfilter
(
c
)
function
c15335853
.
atfilter
(
c
)
return
not
c
:
IsSetCard
(
0x101b
)
return
not
c
:
IsSetCard
(
0x101b
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
end
function
c15335853
.
atcon
(
e
)
function
c15335853
.
atcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c15335853
.
atfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c15335853
.
atfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
,
0
,
1
,
nil
)
...
...
script/c17490535.lua
View file @
8551cc72
...
@@ -13,17 +13,17 @@ end
...
@@ -13,17 +13,17 @@ end
function
c17490535
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c17490535
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
eg
:
GetFirst
()
local
ec
=
eg
:
GetFirst
()
return
eg
:
GetCount
()
==
1
and
ec
:
GetPreviousControler
()
==
tp
and
ec
:
IsRace
(
RACE_REPTILE
)
return
eg
:
GetCount
()
==
1
and
ec
:
GetPreviousControler
()
==
tp
and
ec
:
IsRace
(
RACE_REPTILE
)
and
bit
.
band
(
ec
:
GetPreviousRaceOnField
(),
RACE_REPTILE
)
~=
0
and
ec
==
Duel
.
GetAttackTarget
()
and
ec
:
IsLocation
(
LOCATION_GRAVE
)
and
ec
:
IsReason
(
REASON_BATTLE
)
and
ec
==
Duel
.
GetAttackTarget
()
and
ec
:
IsLocation
(
LOCATION_GRAVE
)
and
ec
:
IsReason
(
REASON_BATTLE
)
end
end
function
c17490535
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c17490535
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
eg
:
GetFirst
():
GetReasonCard
()
local
tc
=
eg
:
GetFirst
():
GetReasonCard
()
if
chk
==
0
then
return
tc
:
IsRelateToBattle
()
and
tc
:
IsControlerCanBeChanged
()
end
if
chk
==
0
then
return
tc
:
IsControler
(
1
-
tp
)
and
tc
:
IsRelateToBattle
()
and
tc
:
IsControlerCanBeChanged
()
end
tc
:
CreateEffectRelation
(
e
)
Duel
.
SetTargetCard
(
tc
)
e
:
SetLabelObject
(
tc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_CONTROL
,
tc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_CONTROL
,
tc
,
1
,
0
,
0
)
end
end
function
c17490535
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c17490535
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObjec
t
()
local
tc
=
Duel
.
GetFirstTarge
t
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
GetControl
(
tc
,
tp
)
then
if
Duel
.
GetControl
(
tc
,
tp
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
script/c19310321.lua
View file @
8551cc72
...
@@ -37,7 +37,6 @@ function c19310321.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -37,7 +37,6 @@ function c19310321.activate(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
tc
,
e
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
tc
,
e
)
local
oc
=
g
:
GetFirst
()
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Overlay
(
tc
,
g
)
Duel
.
Overlay
(
tc
,
g
)
end
end
...
...
script/c21785144.lua
View file @
8551cc72
...
@@ -27,7 +27,6 @@ function c21785144.initial_effect(c)
...
@@ -27,7 +27,6 @@ function c21785144.initial_effect(c)
e4
:
SetCategory
(
CATEGORY_DECKDES
)
e4
:
SetCategory
(
CATEGORY_DECKDES
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
c21785144
.
discon
)
e4
:
SetCondition
(
c21785144
.
discon
)
e4
:
SetTarget
(
c21785144
.
distg
)
e4
:
SetTarget
(
c21785144
.
distg
)
...
...
script/c22624373.lua
View file @
8551cc72
...
@@ -18,7 +18,6 @@ function c22624373.initial_effect(c)
...
@@ -18,7 +18,6 @@ function c22624373.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
22624373
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
22624373
,
1
))
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c22624373
.
discon
)
e2
:
SetCondition
(
c22624373
.
discon
)
e2
:
SetTarget
(
c22624373
.
distg
)
e2
:
SetTarget
(
c22624373
.
distg
)
...
...
script/c23323812.lua
View file @
8551cc72
...
@@ -4,6 +4,7 @@ function c23323812.initial_effect(c)
...
@@ -4,6 +4,7 @@ function c23323812.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_RECOVER
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_RECOVER
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYED
)
e1
:
SetCondition
(
c23323812
.
condition
)
e1
:
SetCondition
(
c23323812
.
condition
)
e1
:
SetTarget
(
c23323812
.
target
)
e1
:
SetTarget
(
c23323812
.
target
)
...
@@ -17,13 +18,18 @@ end
...
@@ -17,13 +18,18 @@ end
function
c23323812
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23323812
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c23323812
.
filter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
c23323812
.
filter
,
1
,
nil
,
tp
)
end
end
function
c23323812
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c23323812
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetAttacker
():
IsRelateToBattle
()
end
local
at
=
Duel
.
GetAttacker
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
Duel
.
GetAttacker
(),
1
,
0
,
0
)
if
chkc
then
return
chkc
==
at
end
if
chk
==
0
then
return
at
:
IsControler
(
1
-
tp
)
and
at
:
IsRelateToBattle
()
and
at
:
IsCanBeEffectTarget
(
e
)
and
at
:
IsDestructable
()
end
Duel
.
SetTargetCard
(
at
)
local
atk
=
at
:
GetAttack
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
at
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
atk
)
end
end
function
c23323812
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23323812
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
Get
Attacker
()
local
a
=
Duel
.
Get
FirstTarget
()
if
a
:
IsRelateTo
Battle
(
)
then
if
a
:
IsRelateTo
Effect
(
e
)
then
local
atk
=
a
:
GetAttack
()
local
atk
=
a
:
GetAttack
()
if
Duel
.
Destroy
(
a
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
Destroy
(
a
,
REASON_EFFECT
)
~=
0
then
Duel
.
Recover
(
tp
,
atk
,
REASON_EFFECT
)
Duel
.
Recover
(
tp
,
atk
,
REASON_EFFECT
)
...
...
script/c2420921.lua
View file @
8551cc72
...
@@ -15,7 +15,6 @@ function c2420921.initial_effect(c)
...
@@ -15,7 +15,6 @@ function c2420921.initial_effect(c)
e2
:
SetCategory
(
CATEGORY_DECKDES
)
e2
:
SetCategory
(
CATEGORY_DECKDES
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c2420921
.
discon
)
e2
:
SetCondition
(
c2420921
.
discon
)
e2
:
SetTarget
(
c2420921
.
distg
)
e2
:
SetTarget
(
c2420921
.
distg
)
...
...
script/c27189308.lua
View file @
8551cc72
...
@@ -22,6 +22,5 @@ function c27189308.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -22,6 +22,5 @@ function c27189308.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
end
end
script/c3070049.lua
View file @
8551cc72
--
素早いマンタ
--
スノー・ドラゴン
function
c3070049
.
initial_effect
(
c
)
function
c3070049
.
initial_effect
(
c
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
script/c35307484.lua
View file @
8551cc72
...
@@ -4,7 +4,7 @@ function c35307484.initial_effect(c)
...
@@ -4,7 +4,7 @@ function c35307484.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
35307484
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
35307484
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_CHAIN_UNIQUE
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_CHAIN_UNIQUE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
...
@@ -17,11 +17,11 @@ function c35307484.initial_effect(c)
...
@@ -17,11 +17,11 @@ function c35307484.initial_effect(c)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c35307484
.
cfilter
(
c
)
function
c35307484
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x8b
)
and
c
:
GetCode
()
~=
35307484
return
c
:
IsFaceup
()
and
c
:
Is
Controler
(
tp
)
and
c
:
Is
SetCard
(
0x8b
)
and
c
:
GetCode
()
~=
35307484
end
end
function
c35307484
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c35307484
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
eg
:
IsContains
(
e
:
GetHandler
())
and
eg
:
IsExists
(
c35307484
.
cfilter
,
1
,
nil
)
return
not
eg
:
IsContains
(
e
:
GetHandler
())
and
eg
:
IsExists
(
c35307484
.
cfilter
,
1
,
nil
,
tp
)
end
end
function
c35307484
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c35307484
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
35307484
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
35307484
)
==
0
end
...
...
script/c44178886.lua
View file @
8551cc72
...
@@ -16,7 +16,6 @@ function c44178886.initial_effect(c)
...
@@ -16,7 +16,6 @@ function c44178886.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
44178886
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
44178886
,
1
))
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c44178886
.
discon
)
e2
:
SetCondition
(
c44178886
.
discon
)
e2
:
SetTarget
(
c44178886
.
distg
)
e2
:
SetTarget
(
c44178886
.
distg
)
...
...
script/c46044841.lua
View file @
8551cc72
...
@@ -30,5 +30,6 @@ function c46044841.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -30,5 +30,6 @@ function c46044841.operation(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c46044841
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c46044841
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
script/c47111934.lua
View file @
8551cc72
...
@@ -44,6 +44,7 @@ function c47111934.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -44,6 +44,7 @@ function c47111934.spop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
c47111934
.
check
(
tp
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
c47111934
.
check
(
tp
)
then
return
end
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
>
0
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
...
...
script/c52709508.lua
View file @
8551cc72
...
@@ -118,5 +118,6 @@ function c52709508.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -118,5 +118,6 @@ function c52709508.spop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
end
script/c54455435.lua
View file @
8551cc72
...
@@ -14,7 +14,7 @@ end
...
@@ -14,7 +14,7 @@ end
function
c54455435
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c54455435
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsReason
(
REASON_BATTLE
)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsReason
(
REASON_BATTLE
)
and
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
and
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
and
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
end
end
function
c54455435
.
filter
(
c
,
e
,
tp
)
function
c54455435
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x10
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x10
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
script/c55204071.lua
View file @
8551cc72
...
@@ -47,7 +47,7 @@ function c55204071.spcon2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -47,7 +47,7 @@ function c55204071.spcon2(e,tp,eg,ep,ev,re,r,rp)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SPECIAL
+
1
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_SPECIAL
+
1
end
end
function
c55204071
.
spfilter
(
c
,
e
,
tp
)
function
c55204071
.
spfilter
(
c
,
e
,
tp
)
return
c
:
Is
SetCard
(
0x83
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
return
c
:
Is
Code
(
55204071
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
end
end
function
c55204071
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c55204071
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
...
script/c56052205.lua
View file @
8551cc72
...
@@ -9,10 +9,9 @@ function c56052205.initial_effect(c)
...
@@ -9,10 +9,9 @@ function c56052205.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
56052205
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
56052205
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetCode
(
EVENT_DAMAGE
)
e2
:
SetCondition
(
c56052205
.
condition
)
e2
:
SetCondition
(
c56052205
.
condition
)
e2
:
SetTarget
(
c56052205
.
target
)
e2
:
SetTarget
(
c56052205
.
target
)
e2
:
SetOperation
(
c56052205
.
operation
)
e2
:
SetOperation
(
c56052205
.
operation
)
...
@@ -22,14 +21,14 @@ function c56052205.cfilter(c)
...
@@ -22,14 +21,14 @@ function c56052205.cfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x12
)
and
c
:
GetCode
()
~=
56052205
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x12
)
and
c
:
GetCode
()
~=
56052205
end
end
function
c56052205
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c56052205
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
and
Duel
.
GetAttackTarget
()
==
nil
return
ep
~=
tp
and
Duel
.
GetAttackTarget
()
==
nil
and
Duel
.
IsExistingMatchingCard
(
c56052205
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c56052205
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c56052205
.
filter
(
c
)
function
c56052205
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDestructable
()
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDestructable
()
end
end
function
c56052205
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c56052205
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetControler
()
~=
tp
and
chkc
:
IsOnField
()
and
c56052205
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
c56052205
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c56052205
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c56052205
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c56052205
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c56052205
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
...
...
script/c56321639.lua
View file @
8551cc72
...
@@ -65,6 +65,5 @@ function c56321639.thop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -65,6 +65,5 @@ function c56321639.thop(e,tp,eg,ep,ev,re,r,rp)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
end
end
end
script/c56981417.lua
View file @
8551cc72
...
@@ -32,24 +32,28 @@ function c56981417.filter(c)
...
@@ -32,24 +32,28 @@ function c56981417.filter(c)
return
c
:
IsSetCard
(
0x106e
)
and
c
:
GetCode
()
~=
56981417
and
c
:
GetType
()
==
TYPE_SPELL
and
c
:
CheckActivateEffect
(
true
,
true
,
false
)
~=
nil
return
c
:
IsSetCard
(
0x106e
)
and
c
:
GetCode
()
~=
56981417
and
c
:
GetType
()
==
TYPE_SPELL
and
c
:
CheckActivateEffect
(
true
,
true
,
false
)
~=
nil
end
end
function
c56981417
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c56981417
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c56981417
.
filter
(
chkc
)
end
if
chkc
then
local
te
=
e
:
GetLabelObject
()
local
tg
=
te
:
GetTarget
()
return
tg
and
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
,
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c56981417
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c56981417
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
:
SetCategory
(
0
)
e
:
SetCategory
(
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c56981417
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c56981417
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
end
local
te
=
g
:
GetFirst
():
CheckActivateEffect
(
true
,
true
,
false
)
function
c56981417
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
SetLabelObject
(
te
)
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
ClearTargetCard
()
if
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
CheckActivateEffect
(
true
,
true
,
false
)
==
nil
then
return
end
g
:
GetFirst
():
CreateEffectRelation
(
e
)
local
tpe
=
tc
:
GetType
()
local
te
=
tc
:
GetActivateEffect
()
local
tg
=
te
:
GetTarget
()
local
tg
=
te
:
GetTarget
()
local
op
=
te
:
GetOperation
()
e
:
SetCategory
(
te
:
GetCategory
())
e
:
SetCategory
(
te
:
GetCategory
())
e
:
SetProperty
(
te
:
GetProperty
())
e
:
SetProperty
(
te
:
GetProperty
())
Duel
.
ClearTargetCard
()
if
tg
then
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
tg
then
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
BreakEffect
()
end
function
c56981417
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
e
:
GetLabelObject
()
if
not
te
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
op
=
te
:
GetOperation
()
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
script/c6104968.lua
View file @
8551cc72
...
@@ -21,5 +21,6 @@ function c6104968.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -21,5 +21,6 @@ function c6104968.operation(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstMatchingCard
(
c6104968
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
local
tc
=
Duel
.
GetFirstMatchingCard
(
c6104968
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
if
tc
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
6104968
,
1
))
then
if
tc
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
6104968
,
1
))
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
end
script/c61166988.lua
View file @
8551cc72
...
@@ -3,6 +3,7 @@ function c61166988.initial_effect(c)
...
@@ -3,6 +3,7 @@ function c61166988.initial_effect(c)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c61166988
.
target
)
e1
:
SetTarget
(
c61166988
.
target
)
...
@@ -12,7 +13,8 @@ end
...
@@ -12,7 +13,8 @@ end
function
c61166988
.
filter
(
c
)
function
c61166988
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_BEAST
+
RACE_BEASTWARRIOR
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_BEAST
+
RACE_BEASTWARRIOR
)
end
end
function
c61166988
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c61166988
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c61166988
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c61166988
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c61166988
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c61166988
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c61166988
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
...
...
script/c61587183.lua
View file @
8551cc72
...
@@ -2,18 +2,16 @@
...
@@ -2,18 +2,16 @@
function
c61587183
.
initial_effect
(
c
)
function
c61587183
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
61587183
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
61587183
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_DAMAGE
)
e1
:
SetCondition
(
c61587183
.
condition
)
e1
:
SetCondition
(
c61587183
.
condition
)
e1
:
SetTarget
(
c61587183
.
target
)
e1
:
SetTarget
(
c61587183
.
target
)
e1
:
SetOperation
(
c61587183
.
operation
)
e1
:
SetOperation
(
c61587183
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c61587183
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c61587183
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
eg
:
GetFirst
()
==
e
:
GetHandler
()
return
ep
~=
tp
end
end
function
c61587183
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c61587183
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsAbleToHand
()
end
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsAbleToHand
()
end
...
@@ -36,8 +34,8 @@ function c61587183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -36,8 +34,8 @@ function c61587183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
e
:
SetProperty
(
EFFECT_FLAG_
DAMAGE_STEP
+
EFFECT_FLAG_
CARD_TARGET
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
else
e
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
end
else
e
:
SetProperty
(
0
)
end
end
end
function
c61587183
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c61587183
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
0
then
if
e
:
GetLabel
()
==
0
then
...
...
script/c63422098.lua
View file @
8551cc72
...
@@ -11,21 +11,27 @@ function c63422098.initial_effect(c)
...
@@ -11,21 +11,27 @@ function c63422098.initial_effect(c)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
0
)
e1
:
SetValue
(
0
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
e1
:
Clone
()
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENCE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetOperation
(
c63422098
.
regop
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetOperation
(
c63422098
.
regop
)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
end
end
function
c63422098
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c63422098
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
then
if
c
:
GetSummonType
()
==
SUMMON_TYPE_SYNCHRO
then
local
ct
=
c
:
GetMaterialCount
()
local
ct
=
c
:
GetMaterialCount
()
-
1
e
:
GetLabelObject
():
SetValue
(
ct
*
200
-
200
)
e
:
GetLabelObject
():
SetValue
(
ct
*
200
)
e
:
GetLabelObject
():
GetLabelObject
():
SetValue
(
ct
*
200
)
else
else
e
:
GetLabelObject
():
SetValue
(
0
)
e
:
GetLabelObject
():
SetValue
(
0
)
e
:
GetLabelObject
():
GetLabelObject
():
SetValue
(
0
)
end
end
end
end
script/c64815084.lua
View file @
8551cc72
...
@@ -32,5 +32,6 @@ function c64815084.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -32,5 +32,6 @@ function c64815084.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c64815084
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c64815084
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
script/c6967870.lua
View file @
8551cc72
...
@@ -2,18 +2,16 @@
...
@@ -2,18 +2,16 @@
function
c6967870
.
initial_effect
(
c
)
function
c6967870
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
6967870
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
6967870
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DECKDES
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetCode
(
EVENT_DAMAGE
)
e1
:
SetCondition
(
c6967870
.
condition
)
e1
:
SetCondition
(
c6967870
.
condition
)
e1
:
SetTarget
(
c6967870
.
target
)
e1
:
SetTarget
(
c6967870
.
target
)
e1
:
SetOperation
(
c6967870
.
operation
)
e1
:
SetOperation
(
c6967870
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c6967870
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c6967870
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
r
==
REASON_BATTLE
and
eg
:
GetFirst
()
==
e
:
GetHandler
()
return
ep
~=
tp
end
end
function
c6967870
.
filter
(
c
)
function
c6967870
.
filter
(
c
)
return
c
:
IsType
(
TYPE_TRAP
+
TYPE_SPELL
)
and
c
:
IsDestructable
()
return
c
:
IsType
(
TYPE_TRAP
+
TYPE_SPELL
)
and
c
:
IsDestructable
()
...
@@ -21,14 +19,14 @@ end
...
@@ -21,14 +19,14 @@ end
function
c6967870
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c6967870
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
if
chk
==
0
then
if
chkc
then
return
chkc
:
IsOnField
()
and
c6967870
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsOnField
()
and
c6967870
.
filter
(
chkc
)
end
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
1
return
Duel
.
IsPlayerCanDiscardDeck
(
1
-
tp
,
2
)
or
Duel
.
IsExistingTarget
(
c6967870
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
or
Duel
.
IsExistingTarget
(
c6967870
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
end
local
op
=
0
local
op
=
0
if
Duel
.
IsExistingTarget
(
c6967870
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
if
Duel
.
IsExistingTarget
(
c6967870
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
1
then
and
Duel
.
IsPlayerCanDiscardDeck
(
1
-
tp
,
2
)
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
6967870
,
1
),
aux
.
Stringid
(
6967870
,
2
))
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
6967870
,
1
),
aux
.
Stringid
(
6967870
,
2
))
elseif
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
1
then
elseif
Duel
.
IsPlayerCanDiscardDeck
(
1
-
tp
,
2
)
then
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
6967870
,
2
))
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
6967870
,
2
))
op
=
1
op
=
1
else
else
...
@@ -40,10 +38,10 @@ function c6967870.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -40,10 +38,10 @@ function c6967870.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c6967870
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c6967870
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
e
:
SetProperty
(
EFFECT_FLAG_
DAMAGE_STEP
+
EFFECT_FLAG_
CARD_TARGET
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
else
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
0
,
0
,
1
-
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
0
,
0
,
1
-
tp
,
1
)
e
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e
:
SetProperty
(
0
)
end
end
end
end
function
c6967870
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c6967870
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c7183277.lua
View file @
8551cc72
...
@@ -16,7 +16,6 @@ function c7183277.initial_effect(c)
...
@@ -16,7 +16,6 @@ function c7183277.initial_effect(c)
e2
:
SetCategory
(
CATEGORY_DECKDES
)
e2
:
SetCategory
(
CATEGORY_DECKDES
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c7183277
.
discon
)
e2
:
SetCondition
(
c7183277
.
discon
)
e2
:
SetTarget
(
c7183277
.
distg
)
e2
:
SetTarget
(
c7183277
.
distg
)
...
...
script/c74506079.lua
View file @
8551cc72
...
@@ -106,6 +106,7 @@ function c74506079.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -106,6 +106,7 @@ function c74506079.spop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
end
function
c74506079
.
costfilter
(
c
)
function
c74506079
.
costfilter
(
c
)
...
...
script/c74852810.lua
View file @
8551cc72
...
@@ -26,14 +26,16 @@ function c74852810.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -26,14 +26,16 @@ function c74852810.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SelectTarget
(
tp
,
c74852810
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c74852810
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
end
function
c74852810
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c74852810
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc1
=
e
:
GetLabelObject
()
local
tc1
=
e
:
GetLabelObject
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc2
=
g
:
GetFirst
()
local
tc2
=
g
:
GetFirst
()
if
tc1
==
tc2
then
tc2
=
g
:
GetNext
()
end
if
tc1
==
tc2
then
tc2
=
g
:
GetNext
()
end
if
tc1
:
IsFaceup
()
and
tc1
:
IsRelateToEffect
(
e
)
and
tc2
:
IsFaceup
()
and
tc2
:
IsRelateToEffect
(
e
)
then
if
tc1
:
IsFacedown
()
or
not
tc1
:
IsRelateToEffect
(
e
)
then
return
end
local
mg
=
tc1
:
GetOverlayGroup
()
local
og
=
tc1
:
GetOverlayGroup
()
if
mg
:
GetCount
()
>
0
then
if
og
:
GetCount
()
==
0
then
return
end
Duel
.
Overlay
(
tc2
,
mg
)
if
Duel
.
SendtoGrave
(
og
,
REASON_EFFECT
)
~=
0
and
tc2
:
IsFaceup
()
and
tc2
:
IsRelateToEffect
(
e
)
and
c
:
IsRelateToEffect
(
e
)
then
end
c
:
CancelToGrave
()
Duel
.
Overlay
(
tc2
,
Group
.
FromCards
(
c
))
end
end
end
end
script/c76573247.lua
View file @
8551cc72
...
@@ -39,8 +39,8 @@ function c76573247.seqop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -39,8 +39,8 @@ function c76573247.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
MoveSequence
(
e
:
GetHandler
(),
nseq
)
Duel
.
MoveSequence
(
e
:
GetHandler
(),
nseq
)
end
end
end
end
function
c76573247
.
dircon
(
e
,
tp
)
function
c76573247
.
dircon
(
e
)
local
p
=
1
-
e
:
GetHandlerPlayer
()
local
seq
=
4
-
e
:
GetHandler
():
GetSequence
()
local
seq
=
4
-
e
:
GetHandler
():
GetSequence
()
return
Duel
.
GetFieldCard
(
e
:
GetOwnerPlayer
(),
LOCATION_MZONE
,
seq
)
==
nil
return
Duel
.
GetFieldCard
(
p
,
LOCATION_MZONE
,
seq
)
==
nil
and
Duel
.
GetFieldCard
(
p
,
LOCATION_SZONE
,
seq
)
==
nil
and
Duel
.
GetFieldCard
(
e
:
GetOwnerPlayer
(),
LOCATION_SZONE
,
seq
)
==
nil
end
end
script/c83725008.lua
View file @
8551cc72
...
@@ -6,7 +6,6 @@ function c83725008.initial_effect(c)
...
@@ -6,7 +6,6 @@ function c83725008.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
83725008
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
83725008
,
0
))
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c83725008
.
lpcon
)
e1
:
SetCondition
(
c83725008
.
lpcon
)
e1
:
SetTarget
(
c83725008
.
lptg
)
e1
:
SetTarget
(
c83725008
.
lptg
)
...
...
script/c87483942.lua
View file @
8551cc72
...
@@ -28,5 +28,6 @@ function c87483942.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -28,5 +28,6 @@ function c87483942.spop(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c87483942
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
ft
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c87483942
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
ft
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
script/c90616316.lua
View file @
8551cc72
...
@@ -23,7 +23,7 @@ function c90616316.initial_effect(c)
...
@@ -23,7 +23,7 @@ function c90616316.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c90616316
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c90616316
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetPreviousLocation
()
==
LOCATION_HAND
and
bit
.
band
(
r
,
REASON_DISCARD
)
~=
0
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_HAND
)
and
bit
.
band
(
r
,
REASON_DISCARD
)
~=
0
end
end
function
c90616316
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c90616316
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
@@ -31,8 +31,10 @@ function c90616316.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -31,8 +31,10 @@ function c90616316.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c90616316
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c90616316
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
local
c
=
e
:
GetHandler
()
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENCE
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
end
end
function
c90616316
.
cfilter
(
c
)
function
c90616316
.
cfilter
(
c
)
...
...
script/c92394653.lua
View file @
8551cc72
...
@@ -36,8 +36,8 @@ end
...
@@ -36,8 +36,8 @@ end
function
c92394653
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c92394653
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsAbleToHand
()
end
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
1
-
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
c92394653
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c92394653
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c95503687.lua
View file @
8551cc72
...
@@ -19,7 +19,6 @@ function c95503687.initial_effect(c)
...
@@ -19,7 +19,6 @@ function c95503687.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
95503687
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
95503687
,
1
))
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_REPEAT
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c95503687
.
discon
)
e2
:
SetCondition
(
c95503687
.
discon
)
e2
:
SetTarget
(
c95503687
.
distg
)
e2
:
SetTarget
(
c95503687
.
distg
)
...
...
script/c97904474.lua
View file @
8551cc72
...
@@ -26,7 +26,7 @@ function c97904474.eqcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -26,7 +26,7 @@ function c97904474.eqcon(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsReason
(
REASON_BATTLE
)
and
c
:
GetPreviousControler
()
==
tp
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsReason
(
REASON_BATTLE
)
and
c
:
GetPreviousControler
()
==
tp
and
c
==
Duel
.
GetAttackTarget
()
and
bc
:
IsFaceup
()
and
bc
:
IsRelateToBattle
()
and
c
==
Duel
.
GetAttackTarget
()
and
bc
:
IsFaceup
()
and
bc
:
Is
Controler
(
1
-
tp
)
and
bc
:
Is
RelateToBattle
()
end
end
function
c97904474
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c97904474
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
...
...
script/c98850929.lua
View file @
8551cc72
--聖蛇の息吹
--聖蛇の息吹
function
c98850929
.
initial_effect
(
c
)
function
c98850929
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
98850929
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
98850929
,
4
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c98850929
.
condition1
)
e1
:
SetCost
(
c98850929
.
cost
)
e1
:
SetCost
(
c98850929
.
cost
)
e1
:
SetTarget
(
c98850929
.
target
1
)
e1
:
SetTarget
(
c98850929
.
target
)
e1
:
SetOperation
(
c98850929
.
operation
)
e1
:
SetOperation
(
c98850929
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
98850929
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c98850929
.
condition2
)
e2
:
SetCost
(
c98850929
.
cost
)
e2
:
SetTarget
(
c98850929
.
target2
)
e2
:
SetOperation
(
c98850929
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
98850929
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCondition
(
c98850929
.
condition3
)
e3
:
SetCost
(
c98850929
.
cost
)
e3
:
SetTarget
(
c98850929
.
target3
)
e3
:
SetOperation
(
c98850929
.
operation
)
c
:
RegisterEffect
(
e3
)
end
end
function
c98850929
.
cfilter
(
c
)
function
c98850929
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_FUSION
+
TYPE_RITUAL
+
TYPE_SYNCHRO
+
TYPE_XYZ
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_FUSION
+
TYPE_RITUAL
+
TYPE_SYNCHRO
+
TYPE_XYZ
)
...
@@ -40,57 +17,74 @@ end
...
@@ -40,57 +17,74 @@ end
function
c98850929
.
typecast
(
c
)
function
c98850929
.
typecast
(
c
)
return
bit
.
band
(
c
:
GetType
(),
TYPE_FUSION
+
TYPE_RITUAL
+
TYPE_SYNCHRO
+
TYPE_XYZ
)
return
bit
.
band
(
c
:
GetType
(),
TYPE_FUSION
+
TYPE_RITUAL
+
TYPE_SYNCHRO
+
TYPE_XYZ
)
end
end
function
c98850929
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c98850929
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
GetClassCount
(
c98850929
.
typecast
)
>=
2
end
function
c98850929
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c98850929
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
98850929
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
98850929
)
==
0
end
Duel
.
RegisterFlagEffect
(
tp
,
98850929
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
98850929
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
end
function
c98850929
.
filter1
(
c
)
function
c98850929
.
filter1
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
end
function
c98850929
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c98850929
.
filter2
(
c
,
e
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c98850929
.
filter1
(
chkc
)
end
return
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
and
c
:
IsCanBeEffectTarget
(
e
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c98850929
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c98850929
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c98850929
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c98850929
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
GetClassCount
(
c98850929
.
typecast
)
>=
3
end
end
function
c98850929
.
filter
2
(
c
)
function
c98850929
.
filter
3
(
c
,
e
)
return
c
:
IsType
(
TYPE_
TRAP
)
and
c
:
IsAbleToHand
(
)
return
c
:
IsType
(
TYPE_
SPELL
)
and
c
:
GetCode
()
~=
98850929
and
c
:
IsAbleToHand
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
end
function
c98850929
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c98850929
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c98850929
.
filter2
(
chkc
)
end
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c98850929
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c98850929
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c98850929
.
condition3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c98850929
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c98850929
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
GetClassCount
(
c98850929
.
typecast
)
>=
4
local
ct
=
g
:
GetClassCount
(
c98850929
.
typecast
)
end
local
g1
=
Duel
.
GetMatchingGroup
(
c98850929
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
)
function
c98850929
.
filter3
(
c
)
local
g2
=
Duel
.
GetMatchingGroup
(
c98850929
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
GetCode
()
~=
98850929
and
c
:
IsAbleToHand
()
local
g3
=
Duel
.
GetMatchingGroup
(
c98850929
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
end
if
chk
==
0
then
return
(
ct
>
1
and
g1
:
GetCount
()
>
0
)
or
(
ct
>
2
and
g2
:
GetCount
()
>
0
)
or
(
ct
>
3
and
g3
:
GetCount
()
>
0
)
end
function
c98850929
.
target3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tg
=
Group
.
CreateGroup
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c98850929
.
filter3
(
chkc
)
end
local
off
=
0
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c98850929
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
repeat
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
ops
=
{}
local
g
=
Duel
.
SelectTarget
(
tp
,
c98850929
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
opval
=
{}
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
off
=
1
if
ct
>
1
and
g1
:
GetCount
()
>
0
then
ops
[
off
]
=
aux
.
Stringid
(
98850929
,
0
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
if
ct
>
2
and
g2
:
GetCount
()
>
0
then
ops
[
off
]
=
aux
.
Stringid
(
98850929
,
1
)
opval
[
off
-
1
]
=
2
off
=
off
+
1
end
if
ct
>
3
and
g3
:
GetCount
()
>
0
then
ops
[
off
]
=
aux
.
Stringid
(
98850929
,
2
)
opval
[
off
-
1
]
=
3
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
if
opval
[
op
]
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
tg
:
Merge
(
sg
)
g1
:
Clear
()
elseif
opval
[
op
]
==
2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
tg
:
Merge
(
sg
)
g2
:
Clear
()
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g3
:
Select
(
tp
,
1
,
1
,
nil
)
tg
:
Merge
(
sg
)
g3
:
Clear
()
end
until
off
<
3
or
not
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
98850929
,
3
))
Duel
.
SetTargetCard
(
tg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
tg
,
tg
:
GetCount
(),
0
,
0
)
end
end
function
c98850929
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c98850929
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
if
sg
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
end
end
script/c9888196.lua
View file @
8551cc72
...
@@ -58,7 +58,7 @@ function c9888196.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -58,7 +58,7 @@ function c9888196.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function
c9888196
.
desop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c9888196
.
desop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFacedown
()
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
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