Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
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
Soulgamer
ygopro-222DIY-cards
Commits
b88d87db
Commit
b88d87db
authored
Mar 03, 2020
by
大崎甜花
Committed by
GitHub
Mar 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jnmlp lua
parent
0fdfb80b
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1554 additions
and
1551 deletions
+1554
-1551
expansions/script/c14000371.lua
expansions/script/c14000371.lua
+137
-137
expansions/script/c14000657.lua
expansions/script/c14000657.lua
+85
-84
expansions/script/c17060915.lua
expansions/script/c17060915.lua
+6
-7
expansions/script/c26818001.lua
expansions/script/c26818001.lua
+118
-118
expansions/script/c30557012.lua
expansions/script/c30557012.lua
+73
-72
expansions/script/c33400208.lua
expansions/script/c33400208.lua
+123
-123
expansions/script/c33400220.lua
expansions/script/c33400220.lua
+266
-264
expansions/script/c47530026.lua
expansions/script/c47530026.lua
+192
-192
expansions/script/c47530140.lua
expansions/script/c47530140.lua
+92
-91
expansions/script/c60152611.lua
expansions/script/c60152611.lua
+69
-69
expansions/script/c65010556.lua
expansions/script/c65010556.lua
+123
-124
expansions/script/c65050202.lua
expansions/script/c65050202.lua
+97
-97
expansions/script/c65050204.lua
expansions/script/c65050204.lua
+77
-77
expansions/script/c66915014.lua
expansions/script/c66915014.lua
+96
-96
No files found.
expansions/script/c14000371.lua
View file @
b88d87db
--穹顶煌刃 寒风·雪天
--穹顶煌刃 寒风·雪天
local
m
=
14000371
local
m
=
14000371
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_Skayarder
=
1
cm
.
named_with_Skayarder
=
1
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--fusion
--fusion
c
:
SetSPSummonOnce
(
m
)
c
:
SetSPSummonOnce
(
m
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun
FunRep
(
c
,
cm
.
matfilter
,
1
,
1
,
true
)
aux
.
AddFusionProcFun
2
(
c
,
cm
.
matfilter
,
cm
.
matfilter1
,
true
)
--spsummon condition
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
cm
.
splimit
)
e1
:
SetValue
(
aux
.
fuslimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon rule
--special summon rule
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetOperation
(
cm
.
spop
)
e2
:
SetOperation
(
cm
.
spop
)
e2
:
SetValue
(
1
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--cannot be fusion material
--cannot be fusion material
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetValue
(
1
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--negate
--negate
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
cm
.
negcon
)
e4
:
SetCondition
(
cm
.
negcon
)
e4
:
SetOperation
(
cm
.
negop
)
e4
:
SetOperation
(
cm
.
negop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--SpecialSummon from Deck
--SpecialSummon from Deck
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e5
:
SetCode
(
EVENT_RELEASE
)
e5
:
SetCode
(
EVENT_RELEASE
)
e5
:
SetTarget
(
cm
.
tg
)
e5
:
SetTarget
(
cm
.
tg
)
e5
:
SetOperation
(
cm
.
op
)
e5
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
cm
.
Skay
(
c
)
function
cm
.
Skay
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Skayarder
return
m
and
m
.
named_with_Skayarder
end
end
cm
.
loaded_metatable_list
=
cm
.
loaded_metatable_list
or
{}
cm
.
loaded_metatable_list
=
cm
.
loaded_metatable_list
or
{}
function
cm
.
load_metatable
(
code
)
function
cm
.
load_metatable
(
code
)
local
m1
=
_G
[
"c"
..
code
]
local
m1
=
_G
[
"c"
..
code
]
if
m1
then
return
m1
end
if
m1
then
return
m1
end
local
m2
=
cm
.
loaded_metatable_list
[
code
]
local
m2
=
cm
.
loaded_metatable_list
[
code
]
if
m2
then
return
m2
end
if
m2
then
return
m2
end
_G
[
"c"
..
code
]
=
{}
_G
[
"c"
..
code
]
=
{}
if
pcall
(
function
()
dofile
(
"expansions/script/c"
..
code
..
".lua"
)
end
)
or
pcall
(
function
()
dofile
(
"script/c"
..
code
..
".lua"
)
end
)
then
if
pcall
(
function
()
dofile
(
"expansions/script/c"
..
code
..
".lua"
)
end
)
or
pcall
(
function
()
dofile
(
"script/c"
..
code
..
".lua"
)
end
)
then
local
mt
=
_G
[
"c"
..
code
]
local
mt
=
_G
[
"c"
..
code
]
_G
[
"c"
..
code
]
=
nil
_G
[
"c"
..
code
]
=
nil
if
mt
then
if
mt
then
cm
.
loaded_metatable_list
[
code
]
=
mt
cm
.
loaded_metatable_list
[
code
]
=
mt
return
mt
return
mt
end
end
else
else
_G
[
"c"
..
code
]
=
nil
_G
[
"c"
..
code
]
=
nil
end
end
end
end
function
cm
.
check_fusion_set_Skayarder
(
c
)
function
cm
.
check_fusion_set_Skayarder
(
c
)
if
c
:
IsHasEffect
(
6205579
)
then
return
false
end
if
c
:
IsHasEffect
(
6205579
)
then
return
false
end
local
codet
=
{
c
:
GetFusionCode
()}
local
codet
=
{
c
:
GetFusionCode
()}
for
j
,
code
in
pairs
(
codet
)
do
for
j
,
code
in
pairs
(
codet
)
do
local
mt
=
cm
.
load_metatable
(
code
)
local
mt
=
cm
.
load_metatable
(
code
)
if
mt
then
if
mt
then
for
str
,
v
in
pairs
(
mt
)
do
for
str
,
v
in
pairs
(
mt
)
do
if
type
(
str
)
==
"string"
and
str
:
find
(
"_Skayarder"
)
and
v
then
return
true
end
if
type
(
str
)
==
"string"
and
str
:
find
(
"_Skayarder"
)
and
v
then
return
true
end
end
end
end
end
end
end
return
false
return
false
end
end
function
cm
.
matfilter
(
c
)
function
cm
.
matfilter
(
c
)
return
cm
.
check_fusion_set_Skayarder
(
c
)
return
cm
.
check_fusion_set_Skayarder
(
c
)
end
end
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
function
cm
.
matfilter1
(
c
)
return
e
:
GetHandler
():
GetLocation
()
~=
LOCATION_EXTRA
return
c
:
IsFusionType
(
TYPE_EFFECT
)
end
end
function
cm
.
rsfilter
(
c
,
fc
,
tp
)
function
cm
.
rsfilter
(
c
,
fc
,
tp
)
return
cm
.
Skay
(
c
)
and
c
:
IsLevel
(
8
)
return
cm
.
Skay
(
c
)
and
c
:
IsLevel
(
8
)
and
c
:
IsReleasable
()
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
fc
)
>
0
and
c
:
IsCanBeFusionMaterial
(
fc
,
SUMMON_TYPE_SPECIAL
)
and
c
:
IsReleasable
()
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
fc
)
>
0
and
c
:
IsCanBeFusionMaterial
(
fc
,
SUMMON_TYPE_SPECIAL
)
end
end
function
cm
.
spcon
(
e
,
c
)
function
cm
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
rsfilter
,
1
,
nil
,
c
,
tp
)
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
rsfilter
,
1
,
nil
,
c
,
tp
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
rsfilter
,
1
,
1
,
nil
,
c
,
tp
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
rsfilter
,
1
,
1
,
nil
,
c
,
tp
)
c
:
SetMaterial
(
g
)
c
:
SetMaterial
(
g
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
Release
(
g
,
REASON_COST
)
c
:
RegisterFlagEffect
(
14000351
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
0
))
c
:
RegisterFlagEffect
(
14000351
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
0
))
end
end
function
cm
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
(
c
:
GetFlagEffect
(
14000351
)
~=
0
or
c
:
GetSummonType
()
&
(
SUMMON_TYPE_SPECIAL
+
1
)
==
SUMMON_TYPE_SPECIAL
+
1
)
return
(
c
:
GetFlagEffect
(
14000351
)
~=
0
or
c
:
GetSummonType
()
&
(
SUMMON_TYPE_SPECIAL
+
1
)
==
SUMMON_TYPE_SPECIAL
+
1
)
and
rp
==
1
-
tp
and
Duel
.
IsChainDisablable
(
ev
)
and
rp
==
1
-
tp
and
Duel
.
IsChainDisablable
(
ev
)
end
end
function
cm
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
Duel
.
NegateEffect
(
ev
)
and
rc
:
IsRelateToEffect
(
re
)
then
if
Duel
.
NegateEffect
(
ev
)
and
rc
:
IsRelateToEffect
(
re
)
then
Duel
.
Remove
(
rc
,
POS_FACEDOWN
,
REASON_EFFECT
)
Duel
.
Remove
(
rc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
cm
.
Skay
(
c
)
and
c
:
IsLevel
(
4
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
cm
.
Skay
(
c
)
and
c
:
IsLevel
(
4
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
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_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
local
code
=
tc
:
GetOriginalCodeRule
()
local
code
=
tc
:
GetOriginalCodeRule
()
tc
:
RegisterFlagEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
code
,
0
))
tc
:
RegisterFlagEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
code
,
0
))
end
end
end
end
\ No newline at end of file
expansions/script/c14000657.lua
View file @
b88d87db
--抹杀立方·零点
--抹杀立方·零点
local
m
=
14000657
local
m
=
14000657
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCondition
(
cm
.
sscon
)
e1
:
SetCondition
(
cm
.
sscon
)
e1
:
SetTarget
(
cm
.
sstg
)
e1
:
SetTarget
(
cm
.
sstg
)
e1
:
SetOperation
(
cm
.
ssop
)
e1
:
SetOperation
(
cm
.
ssop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--spsummon
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
spcfilter
(
c
,
tp
)
function
cm
.
spcfilter
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
GetReasonEffect
()
and
c
:
GetReasonEffect
():
GetOwner
()
==
c
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
GetReasonEffect
()
and
c
:
GetReasonEffect
():
GetOwner
()
==
c
end
end
function
cm
.
sscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
sscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
spcfilter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
cm
.
spcfilter
,
1
,
nil
,
tp
)
end
end
function
cm
.
sstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sstg
(
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
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
#
g
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
#
g
,
0
,
0
)
end
end
function
cm
.
ssop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
ssop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
local
c
=
e
:
GetHandler
()
if
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
c
)
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
#
g
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
c
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
if
#
g
>
0
then
end
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
end
end
end
function
cm
.
spcon
(
e
)
end
return
Duel
.
GetFieldGroupCount
(
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
)
==
1
function
cm
.
spcon
(
e
)
end
return
Duel
.
GetFieldGroupCount
(
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
)
==
1
function
cm
.
xyzfilter
(
c
,
e
,
tp
)
end
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCode
(
14000656
)
and
e
:
GetHandler
():
IsCanBeXyzMaterial
(
c
)
function
cm
.
xyzfilter
(
c
,
e
,
tp
,
mat
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCode
(
14000656
)
and
e
:
GetHandler
():
IsCanBeXyzMaterial
(
c
)
end
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mat
,
c
)
>
0
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
e
:
GetHandler
())
>
0
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
aux
.
MustMaterialCheck
(
e
:
GetHandler
(),
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
c
=
e
:
GetHandler
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
xyzfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
aux
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
xyzfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
)
<=
0
or
not
aux
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
if
not
aux
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
xyzfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
g
:
GetFirst
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
xyzfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
c
)
if
sc
then
local
sc
=
g
:
GetFirst
()
local
mg
=
c
:
GetOverlayGroup
()
if
sc
then
if
mg
:
GetCount
()
~=
0
then
local
mg
=
c
:
GetOverlayGroup
()
Duel
.
Overlay
(
sc
,
mg
)
if
mg
:
GetCount
()
~=
0
then
end
Duel
.
Overlay
(
sc
,
mg
)
sc
:
SetMaterial
(
Group
.
FromCards
(
c
))
end
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
c
))
sc
:
SetMaterial
(
Group
.
FromCards
(
c
))
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_XYZ
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
c
))
sc
:
CompleteProcedure
()
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_XYZ
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
sc
:
CompleteProcedure
()
end
end
end
\ No newline at end of file
expansions/script/c17060915.lua
View file @
b88d87db
...
@@ -6,7 +6,7 @@ function cm.initial_effect(c)
...
@@ -6,7 +6,7 @@ function cm.initial_effect(c)
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--search
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
17060915
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
...
@@ -16,7 +16,7 @@ function cm.initial_effect(c)
...
@@ -16,7 +16,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--spsummon proc
--spsummon proc
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
17060915
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
...
@@ -27,7 +27,7 @@ function cm.initial_effect(c)
...
@@ -27,7 +27,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--synchro level
--synchro level
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetDescription
(
aux
.
Stringid
(
17060915
,
2
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_SYNCHRO_LEVEL
)
e3
:
SetCode
(
EFFECT_SYNCHRO_LEVEL
)
...
@@ -78,13 +78,12 @@ end
...
@@ -78,13 +78,12 @@ end
function
cm
.
hspcon
(
e
,
c
)
function
cm
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_GRAVE
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
return
ft
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
ft
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
end
function
cm
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
cm
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_GRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
ft
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
cm
.
slevel
(
e
,
c
)
function
cm
.
slevel
(
e
,
c
)
...
...
expansions/script/c26818001.lua
View file @
b88d87db
--明智英树
--明智英树
local
m
=
26818001
local
m
=
26818001
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--indestructable
--indestructable
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e0
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetRange
(
LOCATION_MZONE
)
e0
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e0
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e0
:
SetCondition
(
cm
.
indcon
)
e0
:
SetCondition
(
cm
.
indcon
)
e0
:
SetValue
(
1
)
e0
:
SetValue
(
1
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetCost
(
cm
.
spcost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--multiatk
--multiatk
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
TIMING_MAIN_END
)
e2
:
SetHintTiming
(
TIMING_MAIN_END
)
e2
:
SetCountLimit
(
1
,
m
+
900
)
e2
:
SetCountLimit
(
1
,
m
+
900
)
e2
:
SetCondition
(
cm
.
askcon
)
e2
:
SetCondition
(
cm
.
askcon
)
e2
:
SetCost
(
cm
.
atkcost
)
e2
:
SetCost
(
cm
.
atkcost
)
e2
:
SetOperation
(
cm
.
askop
)
e2
:
SetOperation
(
cm
.
askop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--multiatk
--multiatk
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetHintTiming
(
TIMING_MAIN_END
)
e3
:
SetHintTiming
(
TIMING_MAIN_END
)
e3
:
SetCountLimit
(
1
,
m
+
900
)
e3
:
SetCountLimit
(
1
,
m
+
900
)
e3
:
SetCondition
(
cm
.
atkcon
)
e3
:
SetCondition
(
cm
.
atkcon
)
e3
:
SetCost
(
cm
.
atkcost
)
e3
:
SetCost
(
cm
.
atkcost
)
e3
:
SetTarget
(
cm
.
atktg
)
e3
:
SetTarget
(
cm
.
atktg
)
e3
:
SetOperation
(
cm
.
atkop
)
e3
:
SetOperation
(
cm
.
atkop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
cfilter
(
c
,
tp
)
function
cm
.
cfilter
(
c
,
tp
)
return
c
:
IsLevel
(
3
)
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
return
c
:
IsLevel
(
3
)
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
cfilter
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
cfilter
,
1
,
nil
,
tp
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
cfilter
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
cfilter
,
1
,
1
,
nil
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
Duel
.
Release
(
g
,
REASON_COST
)
end
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
cm
.
indfilter
(
c
)
function
cm
.
indfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevel
(
3
)
return
c
:
IsFaceup
()
and
c
:
IsLevel
(
3
)
end
end
function
cm
.
indcon
(
e
)
function
cm
.
indcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
indfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
indfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsAbleToEnterBP
()
and
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
return
Duel
.
IsAbleToEnterBP
()
and
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
end
function
cm
.
costfilter
(
c
)
function
cm
.
costfilter
(
c
)
return
aux
.
IsCodeListed
(
c
,
26818001
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
return
aux
.
IsCodeListed
(
c
,
26818001
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsControler
(
tp
)
or
c
:
IsFaceup
())
end
end
function
cm
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
costfilter
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
costfilter
,
1
,
nil
)
end
local
sg
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
costfilter
,
1
,
1
,
nil
)
local
sg
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
costfilter
,
1
,
1
,
nil
)
Duel
.
Release
(
sg
,
REASON_COST
)
Duel
.
Release
(
sg
,
REASON_COST
)
end
end
function
cm
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetEffectCount
(
EFFECT_EXTRA_ATTACK
)
==
0
end
if
chk
==
0
then
return
e
:
GetHandler
():
GetEffectCount
(
EFFECT_EXTRA_ATTACK
)
==
0
end
end
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetValue
(
2
)
e1
:
SetValue
(
2
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
end
end
function
cm
.
askcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
askcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetTurnPlayer
()
==
1
-
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
return
Duel
.
GetTurnPlayer
()
==
1
-
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
and
Duel
.
IsAbleToEnterBP
()
end
end
function
cm
.
askop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
askop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetValue
(
cm
.
indct
)
e1
:
SetValue
(
cm
.
indct
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
cm
.
indct
(
e
,
re
,
r
,
rp
)
function
cm
.
indct
(
e
,
re
,
r
,
rp
)
if
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
then
if
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
then
return
1
return
1
else
return
0
end
else
return
0
end
end
end
expansions/script/c30557012.lua
View file @
b88d87db
--永辉真理 类比推理
--永辉真理 类比推理
function
c30557012
.
initial_effect
(
c
)
function
c30557012
.
initial_effect
(
c
)
--draw
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
30557012
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
30557012
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
30557012
)
e1
:
SetCountLimit
(
1
,
30557012
)
e1
:
SetCost
(
c30557012
.
drcost
)
e1
:
SetCost
(
c30557012
.
drcost
)
e1
:
SetTarget
(
c30557012
.
drtg
)
e1
:
SetTarget
(
c30557012
.
drtg
)
e1
:
SetOperation
(
c30557012
.
drop
)
e1
:
SetOperation
(
c30557012
.
drop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--to grave
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
30557012
,
2
))
e2
:
SetDescription
(
aux
.
Stringid
(
30557012
,
2
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
30557011
)
e2
:
SetCountLimit
(
1
,
30557011
)
e2
:
SetCondition
(
c30557012
.
condition
)
e2
:
SetCondition
(
c30557012
.
condition
)
e2
:
SetOperation
(
c30557012
.
operation
)
e2
:
SetOperation
(
c30557012
.
operation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c30557012
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c30557012
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
end
end
function
c30557012
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c30557012
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetOperation
(
c30557012
.
op
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3
,
tp
)
e3
:
SetOperation
(
c30557012
.
op
)
end
Duel
.
RegisterEffect
(
e3
,
tp
)
function
c30557012
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
re
:
GetHandler
()
function
c30557012
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
GetHandlerPlayer
()
~=
tp
and
c
~=
e
:
GetHandler
()
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
30557012
,
0
))
then
local
c
=
re
:
GetHandler
()
Duel
.
ConfirmDecktop
(
tp
,
1
)
if
re
:
GetHandlerPlayer
()
~=
tp
and
c
~=
e
:
GetHandler
()
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
30557012
,
0
))
then
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
gc
=
g
:
GetFirst
()
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
if
gc
:
IsSetCard
(
0x306
)
then
local
gc
=
g
:
GetFirst
()
Duel
.
DisableShuffleCheck
()
if
gc
:
IsSetCard
(
0x306
)
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
Duel
.
DisableShuffleCheck
()
else
Duel
.
Destroy
(
g
,
REASON_EFFECT
+
REASON_REVEAL
)
Duel
.
MoveSequence
(
tc
,
1
)
else
end
Duel
.
MoveSequence
(
gc
,
1
)
end
end
end
end
function
c30557012
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsPublic
()
end
function
c30557012
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsPublic
()
end
function
c30557012
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
,
TYPE_MONSTER
)
end
function
c30557012
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
0
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
,
TYPE_MONSTER
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
0
)
function
c30557012
.
filter
(
c
)
end
return
c
:
IsSetCard
(
0x306
)
function
c30557012
.
filter
(
c
)
end
return
c
:
IsSetCard
(
0x306
)
function
c30557012
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsType
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
TYPE_MONSTER
)
function
c30557012
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c30557012
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
30557012
,
1
))
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsType
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
TYPE_MONSTER
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c30557012
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c30557012
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
30557012
,
1
))
then
local
tc
=
g
:
GetFirst
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c30557012
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
tc
then
local
tc
=
g
:
GetFirst
()
Duel
.
ShuffleDeck
(
tp
)
if
tc
then
Duel
.
MoveSequence
(
tc
,
0
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ConfirmDecktop
(
tp
,
1
)
Duel
.
MoveSequence
(
tc
,
0
)
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
end
end
end
end
end
\ No newline at end of file
expansions/script/c33400208.lua
View file @
b88d87db
--憧憬的战士 本条二亚
--憧憬的战士 本条二亚
function
c33400208
.
initial_effect
(
c
)
function
c33400208
.
initial_effect
(
c
)
--xyz summon
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x341
),
6
,
2
)
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x341
),
6
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--to grave
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
33400208
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
33400208
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
33400208
)
e2
:
SetCountLimit
(
1
,
33400208
)
e2
:
SetCondition
(
c33400208
.
tgcon
)
e2
:
SetCondition
(
c33400208
.
tgcon
)
e2
:
SetTarget
(
c33400208
.
tgtg
)
e2
:
SetTarget
(
c33400208
.
tgtg
)
e2
:
SetOperation
(
c33400208
.
tgop
)
e2
:
SetOperation
(
c33400208
.
tgop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--DISABLE
--DISABLE
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
33400208
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
33400208
,
1
))
e3
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_TOGRAVE
+
CATEGORY_DISABLE
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_TOGRAVE
+
CATEGORY_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
,
33400208
+
10000
)
e3
:
SetCountLimit
(
1
,
33400208
+
10000
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCost
(
c33400208
.
discost
)
e3
:
SetCost
(
c33400208
.
discost
)
e3
:
SetTarget
(
c33400208
.
distg
)
e3
:
SetTarget
(
c33400208
.
distg
)
e3
:
SetOperation
(
c33400208
.
disop
)
e3
:
SetOperation
(
c33400208
.
disop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c33400208
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400208
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
end
function
c33400208
.
tgft
(
c
)
function
c33400208
.
tgft
(
c
)
return
c
:
IsSetCard
(
0x341
)
return
c
:
IsSetCard
(
0x341
)
end
end
function
c33400208
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c33400208
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c33400208
.
tgft
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c33400208
.
tgft
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
0
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
0
,
0
,
0
)
end
end
function
c33400208
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400208
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
}
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
}
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
getmetatable
(
e
:
GetHandler
()).
announce_filter
))
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
getmetatable
(
e
:
GetHandler
()).
announce_filter
))
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
:
IsCode
(
ac
)
then
if
tc
:
IsCode
(
ac
)
then
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c33400208
.
tgft
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
2
,
nil
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c33400208
.
tgft
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
2
,
nil
)
if
sg
:
GetCount
()
>
0
then
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
+
REASON_RETURN
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
+
REASON_RETURN
)
end
end
end
end
end
end
function
c33400208
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33400208
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
0
local
ft
=
0
if
e
:
GetHandler
():
GetFlagEffect
(
33401301
)
>
0
then
ft
=
1
end
if
e
:
GetHandler
():
GetFlagEffect
(
33401301
)
>
0
then
ft
=
1
end
if
chk
==
0
then
return
((
ft
==
1
)
or
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
))
end
if
chk
==
0
then
return
((
ft
==
1
)
or
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
))
end
if
ft
==
0
then
if
ft
==
0
then
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
end
end
end
function
c33400208
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c33400208
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
500
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
500
)
end
end
function
c33400208
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400208
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc1
=
Duel
.
GetFirstTarget
()
local
tc1
=
Duel
.
GetFirstTarget
()
local
tc2
=
e
:
GetHandler
()
local
tc2
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
}
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
}
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
getmetatable
(
e
:
GetHandler
()).
announce_filter
))
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
getmetatable
(
e
:
GetHandler
()).
announce_filter
))
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
local
token
=
Duel
.
CreateToken
(
tp
,
ac
)
local
token
=
Duel
.
CreateToken
(
tp
,
ac
)
local
t1
=
bit
.
band
(
token
:
GetType
(),
0x7
)
local
t1
=
bit
.
band
(
token
:
GetType
(),
0x7
)
local
t2
=
bit
.
band
(
tc
:
GetType
(),
0x7
)
local
t2
=
bit
.
band
(
tc
:
GetType
(),
0x7
)
if
t1
==
t2
then
if
t1
==
t2
then
Duel
.
Damage
(
1
-
tp
,
500
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
500
,
REASON_EFFECT
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400208
,
3
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400208
,
3
))
then
local
e1
=
Effect
.
CreateEffect
(
tc2
)
local
e1
=
Effect
.
CreateEffect
(
tc2
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e1
:
SetTarget
(
c33400208
.
distg2
)
e1
:
SetTarget
(
c33400208
.
distg2
)
e1
:
SetLabelObject
(
tc1
)
e1
:
SetLabelObject
(
tc1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
tc2
)
local
e2
=
Effect
.
CreateEffect
(
tc2
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e2
:
SetCondition
(
c33400208
.
discon2
)
e2
:
SetCondition
(
c33400208
.
discon2
)
e2
:
SetOperation
(
c33400208
.
disop2
)
e2
:
SetOperation
(
c33400208
.
disop2
)
e2
:
SetLabelObject
(
tc1
)
e2
:
SetLabelObject
(
tc1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
end
end
if
tc
:
IsCode
(
ac
)
then
if
tc
:
IsCode
(
ac
)
then
Duel
.
Damage
(
1
-
tp
,
500
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
if
tc1
:
IsRelateToEffect
(
e
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400208
,
4
))
then
if
tc1
:
IsRelateToEffect
(
e
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400208
,
4
))
then
Duel
.
SendtoGrave
(
tc1
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
tc1
,
REASON_EFFECT
)
end
end
end
end
end
end
function
c33400208
.
distg2
(
e
,
c
)
function
c33400208
.
distg2
(
e
,
c
)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
return
c
:
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
return
c
:
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
end
end
function
c33400208
.
discon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400208
.
discon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
return
re
:
GetHandler
():
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
return
re
:
GetHandler
():
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
end
end
function
c33400208
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400208
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateEffect
(
ev
)
Duel
.
NegateEffect
(
ev
)
end
end
expansions/script/c33400220.lua
View file @
b88d87db
--D.A.L 本条二亚
--D.A.L 本条二亚
function
c33400220
.
initial_effect
(
c
)
function
c33400220
.
initial_effect
(
c
)
--xyz summon
--xyz summon
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedureLevelFree
(
c
,
c33400220
.
mfilter
,
c33400220
.
xyzcheck
,
2
,
99
,
c33400220
.
ovfilter
,
aux
.
Stringid
(
33400220
,
0
),
c33400220
.
xyzop
)
aux
.
AddXyzProcedureLevelFree
(
c
,
c33400220
.
mfilter
,
c33400220
.
xyzcheck
,
2
,
99
,
c33400220
.
ovfilter
,
aux
.
Stringid
(
33400220
,
0
),
c33400220
.
xyzop
)
--spsummon limit
--spsummon limit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
xyzlimit
)
e1
:
SetValue
(
aux
.
xyzlimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--material
--material
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
33400220
,
4
))
e2
:
SetDescription
(
aux
.
Stringid
(
33400220
,
4
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
c33400220
.
macon
)
e2
:
SetCondition
(
c33400220
.
macon
)
e2
:
SetTarget
(
c33400220
.
matg
)
e2
:
SetTarget
(
c33400220
.
matg
)
e2
:
SetOperation
(
c33400220
.
maop
)
e2
:
SetOperation
(
c33400220
.
maop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Damage
--Damage
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
33400220
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
33400220
,
1
))
e3
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e3
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_REMOVE
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_REMOVE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
33400220
)
e3
:
SetCountLimit
(
1
,
33400220
)
e3
:
SetCost
(
c33400220
.
dmcost
)
e3
:
SetCost
(
c33400220
.
dmcost
)
e3
:
SetOperation
(
c33400220
.
dmop
)
e3
:
SetOperation
(
c33400220
.
dmop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--confirm
--confirm
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
33400220
,
2
))
e4
:
SetDescription
(
aux
.
Stringid
(
33400220
,
2
))
e4
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e4
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e4
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e4
:
SetCountLimit
(
1
,
33400220
+
10000
)
e4
:
SetCountLimit
(
1
,
33400220
+
10000
)
e4
:
SetTarget
(
c33400220
.
target2
)
e4
:
SetTarget
(
c33400220
.
target2
)
e4
:
SetOperation
(
c33400220
.
operation2
)
e4
:
SetOperation
(
c33400220
.
operation2
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--Equip Okatana
--Equip Okatana
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
33400220
,
5
))
e5
:
SetDescription
(
aux
.
Stringid
(
33400220
,
5
))
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e5
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetOperation
(
c33400220
.
Eqop1
)
e5
:
SetOperation
(
c33400220
.
Eqop1
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c33400220
.
mfilter
(
c
,
xyzc
)
function
c33400220
.
mfilter
(
c
,
xyzc
)
return
c
:
IsXyzType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x341
)
and
c
:
IsRankAbove
(
6
)
return
c
:
IsXyzType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x341
)
and
c
:
IsRankAbove
(
6
)
end
end
function
c33400220
.
xyzcheck
(
g
)
function
c33400220
.
xyzcheck
(
g
)
return
g
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x6342
)
return
g
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x6342
)
end
end
function
c33400220
.
cfilter
(
c
)
function
c33400220
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x341
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsRankAbove
(
6
)
return
c
:
IsSetCard
(
0x341
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsRankAbove
(
6
)
end
end
function
c33400220
.
ovfilter
(
c
)
function
c33400220
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x341
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x341
)
end
end
function
c33400220
.
xyzop
(
e
,
tp
,
chk
)
function
c33400220
.
xyzop
(
e
,
tp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33400220
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33400220
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
)
end
local
g1
=
Duel
.
GetMatchingGroup
(
c33400220
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
g1
=
Duel
.
GetMatchingGroup
(
c33400220
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
g1
:
SelectSubGroup
(
tp
,
c33400220
.
xyzcheck
,
false
,
2
,
99
)
local
g
=
g1
:
SelectSubGroup
(
tp
,
c33400220
.
xyzcheck
,
false
,
2
,
99
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c33400220
.
macon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400220
.
macon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
end
function
c33400220
.
mafilter
(
c
)
function
c33400220
.
mafilter
(
c
)
return
c
:
IsSetCard
(
0x341
)
and
c
:
IsType
(
TYPE_XYZ
)
return
c
:
IsSetCard
(
0x341
)
and
c
:
IsType
(
TYPE_XYZ
)
end
end
function
c33400220
.
matg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33400220
.
matg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33400220
.
mafilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33400220
.
mafilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
e
:
GetHandler
())
end
end
end
function
c33400220
.
maop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400220
.
maop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c33400220
.
mafilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c33400220
.
mafilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
if
#
g
==
0
then
return
end
if
#
g
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
sg
=
g
:
Select
(
tp
,
1
,
99
,
nil
)
local
sg
=
g
:
Select
(
tp
,
1
,
99
,
nil
)
if
sg
and
sg
:
GetCount
()
>
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
if
sg
and
sg
:
GetCount
()
>
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Overlay
(
e
:
GetHandler
(),
sg
)
Duel
.
Overlay
(
e
:
GetHandler
(),
sg
)
end
end
end
end
function
c33400220
.
dmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33400220
.
dmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
0
local
ft
=
0
if
e
:
GetHandler
():
GetFlagEffect
(
33401301
)
>
0
then
ft
=
1
end
if
e
:
GetHandler
():
GetFlagEffect
(
33401301
)
>
0
then
ft
=
1
end
if
chk
==
0
then
return
((
ft
==
1
)
or
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
))
end
if
chk
==
0
then
return
((
ft
==
1
)
or
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
))
end
if
ft
==
0
then
if
ft
==
0
then
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
end
end
end
function
c33400220
.
dmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400220
.
dmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc2
=
e
:
GetHandler
()
local
tc2
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
}
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
}
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
getmetatable
(
e
:
GetHandler
()).
announce_filter
))
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
getmetatable
(
e
:
GetHandler
()).
announce_filter
))
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
local
token
=
Duel
.
CreateToken
(
tp
,
ac
)
local
token
=
Duel
.
CreateToken
(
tp
,
ac
)
local
t1
=
bit
.
band
(
token
:
GetType
(),
0x7
)
local
t1
=
bit
.
band
(
token
:
GetType
(),
0x7
)
local
t2
=
bit
.
band
(
tc
:
GetType
(),
0x7
)
local
t2
=
bit
.
band
(
tc
:
GetType
(),
0x7
)
if
t1
==
t2
then
if
t1
==
t2
then
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400220
,
3
))
then
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
+
LOCATION_ONFIELD
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33400220
,
3
))
then
local
g1
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
+
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Remove
(
g1
,
POS_FACEUP
,
REASON_EFFECT
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
+
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
tc1
=
g1
:
GetFirst
()
Duel
.
Remove
(
g1
,
POS_FACEUP
,
REASON_EFFECT
)
local
e1
=
Effect
.
CreateEffect
(
tc2
)
local
tc1
=
g1
:
GetFirst
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
local
e1
=
Effect
.
CreateEffect
(
tc2
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetTarget
(
c33400220
.
distg2
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
LOCATION_ONFIELD
)
e1
:
SetLabelObject
(
tc1
)
e1
:
SetTarget
(
c33400220
.
distg2
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetLabelObject
(
tc1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
local
e2
=
Effect
.
CreateEffect
(
tc2
)
Duel
.
RegisterEffect
(
e1
,
tp
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
local
e2
=
Effect
.
CreateEffect
(
tc2
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCondition
(
c33400220
.
discon2
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e2
:
SetOperation
(
c33400220
.
disop2
)
e2
:
SetCondition
(
c33400220
.
discon2
)
e2
:
SetLabelObject
(
tc1
)
e2
:
SetOperation
(
c33400220
.
disop2
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetLabelObject
(
tc1
)
Duel
.
RegisterEffect
(
e2
,
tp
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
end
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
if
tc
:
IsCode
(
ac
)
then
end
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
end
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
tc
:
IsCode
(
ac
)
then
local
tc
=
g2
:
GetFirst
()
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
while
tc
do
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
tc
=
g2
:
GetFirst
()
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
while
tc
do
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
local
e4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e4
:
SetValue
(
c33400220
.
efilter
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e4
:
SetOwnerPlayer
(
tp
)
e4
:
SetValue
(
c33400220
.
efilter
)
tc
:
RegisterEffect
(
e4
)
e4
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
=
g2
:
GetNext
()
e4
:
SetOwnerPlayer
(
tp
)
end
tc
:
RegisterEffect
(
e4
)
end
tc
=
g2
:
GetNext
()
end
end
function
c33400220
.
distg2
(
e
,
c
)
end
local
tc
=
e
:
GetLabelObject
()
end
return
c
:
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
function
c33400220
.
distg2
(
e
,
c
)
end
local
tc
=
e
:
GetLabelObject
()
function
c33400220
.
discon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
local
tc
=
e
:
GetLabelObject
()
end
return
re
:
GetHandler
():
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
function
c33400220
.
discon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
tc
=
e
:
GetLabelObject
()
function
c33400220
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsOriginalCodeRule
(
tc
:
GetOriginalCodeRule
())
Duel
.
NegateEffect
(
ev
)
end
end
function
c33400220
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400220
.
efilter
(
e
,
re
)
Duel
.
NegateEffect
(
ev
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
end
function
c33400220
.
efilter
(
e
,
re
)
--e4
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
function
c33400220
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
LOCATION_DECK
)
>
0
end
--e4
end
function
c33400220
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c33400220
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
LOCATION_DECK
)
>
0
end
local
cm1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
end
local
cm2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
function
c33400220
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
cm1
>
5
then
cm1
=
5
end
local
cm1
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
if
cm2
>
5
then
cm2
=
5
end
local
cm2
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
cm1
)
if
cm1
>
5
then
cm1
=
5
end
Duel
.
ConfirmCards
(
tp
,
g
)
if
cm2
>
5
then
cm2
=
5
end
Duel
.
SortDecktop
(
tp
,
tp
,
cm1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
cm1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
cm2
)
Duel
.
ConfirmCards
(
tp
,
g
)
Duel
.
ConfirmCards
(
tp
,
g
)
Duel
.
SortDecktop
(
tp
,
tp
,
cm1
)
Duel
.
SortDecktop
(
tp
,
1
-
tp
,
cm2
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
cm2
)
end
Duel
.
ConfirmCards
(
tp
,
g
)
--e5
Duel
.
SortDecktop
(
tp
,
1
-
tp
,
cm2
)
function
c33400220
.
Eqop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
--e5
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
function
c33400220
.
Eqop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c33400220
.
TojiEquip
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
end
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
end
c33400220
.
TojiEquip
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33400220
.
TojiEquip
(
ec
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
token
=
Duel
.
CreateToken
(
tp
,
33400221
)
end
Duel
.
MoveToField
(
token
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
function
c33400220
.
TojiEquip
(
ec
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
token
:
CancelToGrave
()
local
token
=
Duel
.
CreateToken
(
tp
,
33400221
)
local
e1_1
=
Effect
.
CreateEffect
(
token
)
Duel
.
MoveToField
(
token
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
token
:
CancelToGrave
()
e1_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
local
e1_1
=
Effect
.
CreateEffect
(
token
)
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetValue
(
TYPE_EQUIP
+
TYPE_SPELL
)
e1_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
token
:
RegisterEffect
(
e1_1
,
true
)
e1_1
:
SetValue
(
TYPE_EQUIP
+
TYPE_SPELL
)
local
e1_2
=
Effect
.
CreateEffect
(
token
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
token
:
RegisterEffect
(
e1_1
,
true
)
e1_2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
local
e1_2
=
Effect
.
CreateEffect
(
token
)
e1_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2
:
SetValue
(
1
)
e1_2
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
token
:
RegisterEffect
(
e1_2
,
true
)
e1_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
token
:
CancelToGrave
()
e1_2
:
SetValue
(
1
)
if
Duel
.
Equip
(
tp
,
token
,
ec
,
false
)
then
token
:
RegisterEffect
(
e1_2
,
true
)
--immune
token
:
CancelToGrave
()
local
e4
=
Effect
.
CreateEffect
(
ec
)
if
Duel
.
Equip
(
tp
,
token
,
ec
,
false
)
then
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
--immune
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
local
e4
=
Effect
.
CreateEffect
(
ec
)
e4
:
SetValue
(
c33400220
.
efilter1
)
e4
:
SetType
(
EFFECT_TYPE_EQUIP
)
token
:
RegisterEffect
(
e4
)
e4
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
--indes
e4
:
SetValue
(
c33400220
.
efilter1
)
local
e5
=
Effect
.
CreateEffect
(
ec
)
token
:
RegisterEffect
(
e4
)
e5
:
SetType
(
EFFECT_TYPE_EQUIP
)
--indes
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
local
e5
=
Effect
.
CreateEffect
(
ec
)
e5
:
SetValue
(
c33400220
.
valcon
)
e5
:
SetType
(
EFFECT_TYPE_EQUIP
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
token
:
RegisterEffect
(
e5
)
e5
:
SetValue
(
c33400220
.
valcon
)
--inm
e5
:
SetCountLimit
(
1
)
local
e6
=
Effect
.
CreateEffect
(
token
)
token
:
RegisterEffect
(
e5
)
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
--inm
e6
:
SetCategory
(
CATEGORY_ANNOUNCE
)
local
e6
=
Effect
.
CreateEffect
(
token
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetCategory
(
CATEGORY_ANNOUNCE
)
e6
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetCountLimit
(
1
)
e6
:
SetCode
(
EVENT_FREE_CHAIN
)
e6
:
SetOperation
(
c33400220
.
operation3
)
e6
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
)
token
:
RegisterEffect
(
e6
,
true
)
e6
:
SetCountLimit
(
1
)
return
true
e6
:
SetOperation
(
c33400220
.
operation3
)
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
return
false
token
:
RegisterEffect
(
e6
,
true
)
end
return
true
end
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
return
false
function
c33400220
.
efilter1
(
e
,
re
)
end
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
end
function
c33400220
.
efilter1
(
e
,
re
)
function
c33400220
.
valcon
(
e
,
re
,
r
,
rp
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
return
r
==
REASON_BATTLE
end
end
function
c33400220
.
valcon
(
e
,
re
,
r
,
rp
)
function
c33400220
.
operation3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_BATTLE
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
end
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
}
function
c33400220
.
operation3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
getmetatable
(
e
:
GetHandler
()).
announce_filter
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CODE
)
Duel
.
ConfirmDecktop
(
tp
,
1
)
getmetatable
(
e
:
GetHandler
()).
announce_filter
=
{
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
,
OPCODE_ISTYPE
,
OPCODE_NOT
}
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
ac
=
Duel
.
AnnounceCard
(
tp
,
table.unpack
(
getmetatable
(
e
:
GetHandler
()).
announce_filter
))
local
tc
=
g
:
GetFirst
()
Duel
.
ConfirmDecktop
(
tp
,
1
)
if
tc
:
IsCode
(
ac
)
then
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
tc
=
g
:
GetFirst
()
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
if
tc
:
IsCode
(
ac
)
then
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_COUNT
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsType
,
TYPE_SPELL
+
TYPE_TRAP
))
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetValue
(
c33400220
.
indct
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsType
,
TYPE_SPELL
+
TYPE_TRAP
))
Duel
.
RegisterEffect
(
e1
,
tp
)
e1
:
SetValue
(
c33400220
.
indct
)
end
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
end
Duel
.
RegisterEffect
(
e1
,
tp
)
function
c33400220
.
indct
(
e
,
re
,
r
,
rp
)
end
if
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
then
end
return
1
function
c33400220
.
indct
(
e
,
re
,
r
,
rp
)
else
return
0
end
if
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
then
return
1
else
return
0
end
end
end
\ No newline at end of file
expansions/script/c47530026.lua
View file @
b88d87db
--吉姆强袭型改
--吉姆强袭型改
function
c47530026
.
initial_effect
(
c
)
function
c47530026
.
initial_effect
(
c
)
--pendulum summon
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--splimit
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47530026
.
psplimit
)
e1
:
SetTarget
(
c47530026
.
psplimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--summon
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47530026
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
47530026
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetTarget
(
c47530026
.
sumtg
)
e2
:
SetTarget
(
c47530026
.
sumtg
)
e2
:
SetOperation
(
c47530026
.
sumop
)
e2
:
SetOperation
(
c47530026
.
sumop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--spsummon proc
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47530026
.
ttcon
)
e1
:
SetCondition
(
c47530026
.
ttcon
)
e1
:
SetOperation
(
c47530026
.
ttop
)
e1
:
SetOperation
(
c47530026
.
ttop
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_LIMIT_SET_PROC
)
e2
:
SetCode
(
EFFECT_LIMIT_SET_PROC
)
e2
:
SetCondition
(
c47530026
.
setcon
)
e2
:
SetCondition
(
c47530026
.
setcon
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--tribute check
--tribute check
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetValue
(
c47530026
.
valcheck
)
e5
:
SetValue
(
c47530026
.
valcheck
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
--buff
--buff
local
e6
=
Effect
.
CreateEffect
(
c
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c47530026
.
advcon
)
e6
:
SetCondition
(
c47530026
.
advcon
)
e6
:
SetValue
(
1
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCondition
(
c47530026
.
advcon
)
e7
:
SetCondition
(
c47530026
.
advcon
)
e7
:
SetValue
(
c47530026
.
efilter
)
e7
:
SetValue
(
c47530026
.
efilter
)
c
:
RegisterEffect
(
e7
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c47530026
.
advcon
)
e8
:
SetCondition
(
c47530026
.
advcon
)
e8
:
SetValue
(
1
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
c
:
RegisterEffect
(
e8
)
--actlimit
--actlimit
local
e9
=
Effect
.
CreateEffect
(
c
)
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetValue
(
c47530026
.
aclimit
)
e9
:
SetValue
(
c47530026
.
aclimit
)
e9
:
SetCondition
(
c47530026
.
actcon
)
e9
:
SetCondition
(
c47530026
.
actcon
)
c
:
RegisterEffect
(
e9
)
c
:
RegisterEffect
(
e9
)
--remove
--remove
local
e10
=
Effect
.
CreateEffect
(
c
)
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetDescription
(
aux
.
Stringid
(
47530026
,
0
))
e10
:
SetDescription
(
aux
.
Stringid
(
47530026
,
0
))
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e10
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e10
:
SetCondition
(
c47530026
.
rmcon
)
e10
:
SetCondition
(
c47530026
.
rmcon
)
e10
:
SetOperation
(
c47530026
.
rmop
)
e10
:
SetOperation
(
c47530026
.
rmop
)
c
:
RegisterEffect
(
e10
)
c
:
RegisterEffect
(
e10
)
end
end
function
c47530026
.
IsEFSF
(
c
)
function
c47530026
.
IsEFSF
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_EFSF
return
m
and
m
.
is_named_with_EFSF
end
end
function
c47530026
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c47530026
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
e
:
SetLabelObject
(
bc
)
e
:
SetLabelObject
(
bc
)
return
c
==
Duel
.
GetAttacker
()
and
bc
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
bc
:
IsOnField
()
and
bc
:
IsRelateToBattle
()
return
c
==
Duel
.
GetAttacker
()
and
bc
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
bc
:
IsOnField
()
and
bc
:
IsRelateToBattle
()
end
end
function
c47530026
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c47530026
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
e
:
GetLabelObject
()
local
bc
=
e
:
GetLabelObject
()
local
atk1
=
bc
:
GetAttack
()
local
atk1
=
bc
:
GetAttack
()
local
atk2
=
c
:
GetAttack
()
local
atk2
=
c
:
GetAttack
()
local
atk
=
atk1
+
atk2
local
atk
=
atk1
+
atk2
if
bc
:
IsRelateToBattle
()
then
if
bc
:
IsRelateToBattle
()
then
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
end
end
end
end
function
c47530026
.
aclimit
(
e
,
re
,
tp
)
function
c47530026
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
end
function
c47530026
.
actcon
(
e
)
function
c47530026
.
actcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
end
function
c47530026
.
efilter
(
e
,
te
)
function
c47530026
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
end
function
c47530026
.
advcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c47530026
.
advcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
end
function
c47530026
.
psplimit
(
e
,
c
)
function
c47530026
.
psplimit
(
e
,
c
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
end
end
function
c47530026
.
setfilter
(
c
)
function
c47530026
.
setfilter
(
c
)
return
c47530026
.
IsEFSF
(
c
)
and
(
c
:
IsType
(
TYPE_TRAP
)
or
c
:
IsType
(
TYPE_SPELL
))
return
c47530026
.
IsEFSF
(
c
)
and
(
c
:
IsType
(
TYPE_TRAP
)
or
c
:
IsType
(
TYPE_SPELL
))
end
end
function
c47530026
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c47530026
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
c47530026
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c47530026
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
~=
0
then
if
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
false
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
end
end
function
c47530026
.
otfilter
(
c
)
function
c47530026
.
otfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
end
end
function
c47530026
.
ttcon
(
e
,
c
,
minc
)
function
c47530026
.
ttcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
2
and
Duel
.
CheckTribute
(
c
,
2
,
2
,
mg
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
2
and
Duel
.
CheckTribute
(
c
,
2
,
2
,
mg
)
end
end
function
c47530026
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c47530026
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
0
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
0
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
2
,
2
,
mg
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
2
,
2
,
mg
)
c
:
SetMaterial
(
sg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
end
function
c47530026
.
setcon
(
e
,
c
,
minc
)
function
c47530026
.
setcon
(
e
,
c
,
minc
)
if
not
c
then
return
true
end
if
not
c
then
return
true
end
return
false
return
false
end
end
function
c47530026
.
valcheck
(
e
,
c
)
function
c47530026
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
local
g
=
c
:
GetMaterial
()
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
local
atk
=
0
local
atk
=
0
local
def
=
0
local
def
=
0
while
tc
do
while
tc
do
local
catk
=
tc
:
GetTextAttack
()
local
catk
=
tc
:
GetTextAttack
()
local
cdef
=
tc
:
GetTextDefense
()
local
cdef
=
tc
:
GetTextDefense
()
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
tc
=
g
:
GetNext
()
tc
=
g
:
GetNext
()
end
end
if
e
:
GetLabel
()
==
1
then
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
e
:
SetLabel
(
0
)
--atk continuous effect
--atk continuous effect
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
atk
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--def continuous effect
--def continuous effect
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
def
)
e2
:
SetValue
(
def
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
end
end
\ No newline at end of file
expansions/script/c47530140.lua
View file @
b88d87db
--吉姆III
--吉姆III
function
c47530140
.
initial_effect
(
c
)
function
c47530140
.
initial_effect
(
c
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47530140
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
47530140
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
47530140
)
e1
:
SetCountLimit
(
1
,
47530140
)
e1
:
SetCondition
(
c47530140
.
spcon
)
e1
:
SetCondition
(
c47530140
.
spcon
)
e1
:
SetTarget
(
c47530140
.
sptg
)
e1
:
SetTarget
(
c47530140
.
sptg
)
e1
:
SetOperation
(
c47530140
.
spop
)
e1
:
SetOperation
(
c47530140
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DISABLE
)
e2
:
SetCategory
(
CATEGORY_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c47530140
.
distg
)
e2
:
SetCountLimit
(
1
,
47530141
)
e2
:
SetOperation
(
c47530140
.
disop
)
e2
:
SetTarget
(
c47530140
.
distg
)
c
:
RegisterEffect
(
e2
)
e2
:
SetOperation
(
c47530140
.
disop
)
end
c
:
RegisterEffect
(
e2
)
function
c47530140
.
filter
(
c
)
end
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsLevelAbove
(
4
)
function
c47530140
.
filter
(
c
)
end
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsLevelAbove
(
4
)
function
c47530140
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
Duel
.
IsExistingMatchingCard
(
c47530140
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
function
c47530140
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
Duel
.
IsExistingMatchingCard
(
c47530140
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
function
c47530140
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
function
c47530140
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
function
c47530140
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
c47530140
.
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_FACEUP
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
end
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
end
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTarget
(
c47530140
.
splimit
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
c47530140
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
end
Duel
.
RegisterEffect
(
e1
,
tp
)
function
c47530140
.
splimit
(
e
,
c
)
end
return
not
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsSummonType
(
TYPE_LINK
)
function
c47530140
.
splimit
(
e
,
c
)
end
return
not
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsSummonType
(
TYPE_LINK
)
function
c47530140
.
disfilter
(
c
)
end
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
function
c47530140
.
disfilter
(
c
)
end
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
function
c47530140
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
end
if
chkc
then
return
chkc
:
IsOnField
()
and
c47530140
.
disfilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
function
c47530140
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c47530140
.
disfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
if
chkc
then
return
chkc
:
IsOnField
()
and
c47530140
.
disfilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c47530140
.
disfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectTarget
(
tp
,
c47530140
.
disfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
3
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
g
:
GetCount
(),
0
,
0
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c47530140
.
disfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
3
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
g
:
GetCount
(),
0
,
0
)
function
c47530140
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
c47530140
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
c
=
e
:
GetHandler
()
local
tc
=
g
:
GetFirst
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
while
tc
do
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
c
)
while
tc
do
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EFFECT_DISABLE
)
tc
:
RegisterEffect
(
e1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
local
e2
=
Effect
.
CreateEffect
(
c
)
tc
:
RegisterEffect
(
e1
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
tc
:
RegisterEffect
(
e2
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
tc
:
RegisterEffect
(
e3
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
tc
:
RegisterEffect
(
e3
)
local
e3
=
e1
:
Clone
()
end
e3
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
local
e3
=
e1
:
Clone
()
tc
:
RegisterEffect
(
e3
)
e3
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
tc
=
g
:
GetNext
()
tc
:
RegisterEffect
(
e3
)
end
tc
=
g
:
GetNext
()
end
end
end
\ No newline at end of file
expansions/script/c60152611.lua
View file @
b88d87db
--皇家骑士战场
--皇家骑士战场
function
c60152611
.
initial_effect
(
c
)
function
c60152611
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--spsummon
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60152611
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
60152611
,
0
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCondition
(
c60152611
.
e2con
)
e2
:
SetCondition
(
c60152611
.
e2con
)
e2
:
SetTarget
(
c60152611
.
e2tg
)
e2
:
SetTarget
(
c60152611
.
e2tg
)
e2
:
SetOperation
(
c60152611
.
e2op
)
e2
:
SetOperation
(
c60152611
.
e2op
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--level change
--level change
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
60152611
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
60152611
,
1
))
e3
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e3
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
c60152611
.
e3tg
)
e3
:
SetTarget
(
c60152611
.
e3tg
)
e3
:
SetOperation
(
c60152611
.
e3op
)
e3
:
SetOperation
(
c60152611
.
e3op
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c60152611
.
e2con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60152611
.
e2con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
end
end
function
c60152611
.
e2tgfilter
(
c
)
function
c60152611
.
e2tgfilter
(
c
)
return
return
c
:
IsSetCard
(
0x6b27
)
and
c
:
IsSummonable
(
true
,
nil
)
return
c
:
IsSetCard
(
0x6b27
)
and
c
:
IsSummonable
(
true
,
nil
)
end
end
function
c60152611
.
e2tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60152611
.
e2tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60152611
.
e2tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60152611
.
e2tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
end
function
c60152611
.
e2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60152611
.
e2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60152611
.
e2tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60152611
.
e2tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Summon
(
tp
,
g
:
GetFirst
(),
true
,
nil
)
Duel
.
Summon
(
tp
,
g
:
GetFirst
(),
true
,
nil
)
end
end
end
end
function
c60152611
.
e3tgfilter
(
c
)
function
c60152611
.
e3tgfilter
(
c
)
return
not
c
:
IsPublic
()
return
not
c
:
IsPublic
()
end
end
function
c60152611
.
e3tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60152611
.
e3tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60152611
.
e3tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60152611
.
e3tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
c60152611
.
e3op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60152611
.
e3op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsPlayerCanDraw
(
tp
)
then
return
end
if
not
Duel
.
IsPlayerCanDraw
(
tp
)
then
return
end
local
ks
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
local
ks
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
local
ks2
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
local
ks2
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
if
ks
>
ks2
then
ks
=
ks2
end
if
ks
>
ks2
then
ks
=
ks2
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60152611
.
e3tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
ks
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60152611
.
e3tgfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
ks
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
Draw
(
tp
,
g
:
GetCount
(),
REASON_EFFECT
)
>
0
then
if
Duel
.
Draw
(
tp
,
g
:
GetCount
(),
REASON_EFFECT
)
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
end
end
end
end
expansions/script/c65010556.lua
View file @
b88d87db
--天知之翼的骑行
--天知之翼的骑行
function
c65010556
.
initial_effect
(
c
)
function
c65010556
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
65010556
)
e1
:
SetCountLimit
(
1
,
65010556
)
e1
:
SetTarget
(
c65010556
.
target
)
e1
:
SetTarget
(
c65010556
.
target
)
e1
:
SetOperation
(
c65010556
.
activate
)
e1
:
SetOperation
(
c65010556
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--spsummon
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
65010556
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
65010556
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCountLimit
(
1
,
65010557
)
e2
:
SetCountLimit
(
1
,
65010557
)
e2
:
SetTarget
(
c65010556
.
sptg
)
e2
:
SetTarget
(
c65010556
.
sptg
)
e2
:
SetOperation
(
c65010556
.
spop
)
e2
:
SetOperation
(
c65010556
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c65010556
.
filter
(
c
,
e
,
tp
)
function
c65010556
.
filter
(
c
,
e
,
tp
)
return
(
c
:
IsCode
(
65010558
)
or
c
:
IsCode
(
65010552
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
(
c
:
IsCode
(
65010558
)
or
c
:
IsCode
(
65010552
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c65010556
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65010556
.
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
and
Duel
.
IsExistingMatchingCard
(
c65010556
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c65010556
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
end
end
function
c65010556
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65010556
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65010556
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65010556
.
filter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
tc
and
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
Duel
.
SpecialSummonStep
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e2
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e2
:
SetValue
(
LOCATION_DECKBOT
)
e2
:
SetValue
(
LOCATION_DECKBOT
)
tc
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
Duel
.
SpecialSummonComplete
()
Duel
.
SpecialSummonComplete
()
end
end
function
c65010556
.
filter0
(
c
)
function
c65010556
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
end
function
c65010556
.
filter1
(
c
,
e
)
function
c65010556
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
end
end
function
c65010556
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
function
c65010556
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
if
c
:
IsCode
(
65010554
)
then
if
c
:
IsCode
(
65010554
)
then
local
mg
=
Duel
.
GetMatchingGroup
(
c65010556
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
c65010556
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
m
:
Merge
(
mg
)
m
:
Merge
(
mg
)
end
end
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
end
function
c65010556
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65010556
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
chkf
=
tp
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsAbleToRemove
,
nil
)
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsAbleToRemove
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c65010556
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c65010556
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
fgroup
=
ce
:
GetTarget
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c65010556
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
res
=
Duel
.
IsExistingMatchingCard
(
c65010556
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
end
end
return
res
return
res
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
0
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
0
,
tp
,
LOCATION_GRAVE
)
end
end
function
c65010556
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65010556
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsAbleToRemove
,
nil
):
Filter
(
c65010556
.
filter1
,
nil
,
e
)
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsAbleToRemove
,
nil
):
Filter
(
c65010556
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c65010556
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c65010556
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg3
=
nil
local
mg3
=
nil
local
sg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c65010556
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
sg2
=
Duel
.
GetMatchingGroup
(
c65010556
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
if
tc
:
IsCode
(
65010554
)
then
if
tc
:
IsCode
(
65010554
)
then
local
mg
=
Duel
.
GetMatchingGroup
(
c65010556
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
c65010556
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg
)
mg1
:
Merge
(
mg
)
end
end
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Remove
(
mat1
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
Remove
(
mat1
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
end
tc
:
CompleteProcedure
()
tc
:
CompleteProcedure
()
end
end
end
end
expansions/script/c65050202.lua
View file @
b88d87db
--奇妙仙灵 彩片翼
--奇妙仙灵 彩片翼
function
c65050202
.
initial_effect
(
c
)
function
c65050202
.
initial_effect
(
c
)
--synchro summon
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9da8
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9da8
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--spsummon
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
65050202
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
65050202
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
65050202
)
e1
:
SetCountLimit
(
1
,
65050202
)
e1
:
SetCondition
(
c65050202
.
con1
)
e1
:
SetCondition
(
c65050202
.
con1
)
e1
:
SetTarget
(
c65050202
.
tg
)
e1
:
SetTarget
(
c65050202
.
tg
)
e1
:
SetOperation
(
c65050202
.
op
)
e1
:
SetOperation
(
c65050202
.
op
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e0
=
e1
:
Clone
()
local
e0
=
e1
:
Clone
()
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e0
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e0
:
SetCondition
(
c65050202
.
con2
)
e0
:
SetCondition
(
c65050202
.
con2
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--Activate
--Activate
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
65050202
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
65050202
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
65050202
)
e2
:
SetCountLimit
(
1
,
65050202
)
e2
:
SetCondition
(
c65050202
.
condition1
)
e2
:
SetCondition
(
c65050202
.
condition1
)
e2
:
SetTarget
(
c65050202
.
target
)
e2
:
SetTarget
(
c65050202
.
target
)
e2
:
SetOperation
(
c65050202
.
activate
)
e2
:
SetOperation
(
c65050202
.
activate
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCondition
(
c65050202
.
condition2
)
e3
:
SetCondition
(
c65050202
.
condition2
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c65050202
.
condfil
(
c
)
function
c65050202
.
condfil
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_TUNER
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_TUNER
)
end
end
function
c65050202
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050202
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
and
Duel
.
IsExistingMatchingCard
(
c65050202
.
condfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
and
Duel
.
IsExistingMatchingCard
(
c65050202
.
condfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c65050202
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050202
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
and
Duel
.
IsExistingMatchingCard
(
c65050202
.
condfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
and
Duel
.
IsExistingMatchingCard
(
c65050202
.
condfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c65050202
.
filter
(
c
,
e
,
tp
)
function
c65050202
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x9da8
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
and
c
:
IsLevel
(
3
)
return
c
:
IsSetCard
(
0x9da8
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
and
c
:
IsLevel
(
3
)
end
end
function
c65050202
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c65050202
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c65050202
.
filter
(
chkc
,
e
,
tp
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c65050202
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65050202
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65050202
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c65050202
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c65050202
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
c65050202
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050202
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
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_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c65050202
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050202
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
end
end
function
c65050202
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050202
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
end
end
function
c65050202
.
tgfil
(
c
,
tp
)
function
c65050202
.
tgfil
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
6
)
and
c
:
IsType
(
TYPE_TUNER
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
6
)
and
c
:
IsType
(
TYPE_TUNER
)
end
end
function
c65050202
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c65050202
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
c65050202
.
tgfil
(
chkc
,
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
end
if
chkc
then
return
c65050202
.
tgfil
(
chkc
,
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65050202
.
tgfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65050202
.
tgfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectTarget
(
tp
,
c65050202
.
tgfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
local
g
=
Duel
.
SelectTarget
(
tp
,
c65050202
.
tgfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
end
end
function
c65050202
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050202
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
--nontuner
--nontuner
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_NONTUNER
)
e1
:
SetCode
(
EFFECT_NONTUNER
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
c65050202
.
tnval
)
e1
:
SetValue
(
c65050202
.
tnval
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
function
c65050202
.
tnval
(
e
,
c
)
function
c65050202
.
tnval
(
e
,
c
)
return
e
:
GetHandler
():
IsControler
(
c
:
GetControler
())
return
e
:
GetHandler
():
IsControler
(
c
:
GetControler
())
end
end
expansions/script/c65050204.lua
View file @
b88d87db
--奇妙仙灵 华净翼
--奇妙仙灵 华净翼
function
c65050204
.
initial_effect
(
c
)
function
c65050204
.
initial_effect
(
c
)
--synchro summon
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9da8
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x9da8
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--spsummon
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
65050204
)
e1
:
SetCountLimit
(
1
,
65050204
)
e1
:
SetCondition
(
c65050204
.
con1
)
e1
:
SetCondition
(
c65050204
.
con1
)
e1
:
SetTarget
(
c65050204
.
tg
)
e1
:
SetTarget
(
c65050204
.
tg
)
e1
:
SetOperation
(
c65050204
.
op
)
e1
:
SetOperation
(
c65050204
.
op
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e0
=
e1
:
Clone
()
local
e0
=
e1
:
Clone
()
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e0
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e0
:
SetCondition
(
c65050204
.
con2
)
e0
:
SetCondition
(
c65050204
.
con2
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--tograve
--tograve
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
65050204
)
e2
:
SetCountLimit
(
1
,
65050204
)
e2
:
SetCondition
(
c65050204
.
condition
)
e2
:
SetCondition
(
c65050204
.
condition
)
e2
:
SetTarget
(
c65050204
.
target
)
e2
:
SetTarget
(
c65050204
.
target
)
e2
:
SetOperation
(
c65050204
.
activate
)
e2
:
SetOperation
(
c65050204
.
activate
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c65050204
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050204
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
end
end
function
c65050204
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050204
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
65050211
)
end
end
function
c65050204
.
tgfil
(
c
,
tp
)
function
c65050204
.
tgfil
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
6
)
and
c
:
IsAbleToGrave
()
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
6
)
and
c
:
IsAbleToGrave
()
end
end
function
c65050204
.
spfil
(
c
,
e
,
tp
)
function
c65050204
.
spfil
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x9da8
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x9da8
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c65050204
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c65050204
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
c65050204
.
tgfil
(
chkc
,
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chkc
then
return
c65050204
.
tgfil
(
chkc
,
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65050204
.
tgfil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
c65050204
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65050204
.
tgfil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
c65050204
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
end
local
g
=
Duel
.
SelectTarget
(
tp
,
c65050204
.
tgfil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c65050204
.
tgfil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
function
c65050204
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050204
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
if
Duel
.
GetMZoneCount
(
tp
)
<=
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050204
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050204
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
tc
:
IsRelateToEffect
(
e
)
then
if
g
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
end
end
function
c65050204
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050204
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
end
function
c65050204
.
filter
(
c
)
function
c65050204
.
filter
(
c
)
return
c
:
IsSetCard
(
0x9da8
)
and
c
:
IsAbleToGrave
()
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsSetCard
(
0x9da8
)
and
c
:
IsAbleToGrave
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
end
function
c65050204
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050204
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050204
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050204
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c65050204
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050204
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050204
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050204
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c66915014.lua
View file @
b88d87db
--掠夺星曜·贪狼
--掠夺星曜·贪狼
local
m
=
66915014
local
m
=
66915014
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
m
)
c
:
SetUniqueOnField
(
1
,
0
,
m
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--draw
--draw
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
97616504
,
0
))
e4
:
SetDescription
(
aux
.
Stringid
(
97616504
,
0
))
e4
:
SetCategory
(
CATEGORY_DRAW
)
e4
:
SetCategory
(
CATEGORY_DRAW
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e4
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCondition
(
cm
.
drcon
)
e4
:
SetCondition
(
cm
.
drcon
)
e4
:
SetTarget
(
cm
.
drtg
)
e4
:
SetTarget
(
cm
.
drtg
)
e4
:
SetOperation
(
cm
.
drop
)
e4
:
SetOperation
(
cm
.
drop
)
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e5
:
SetRange
(
LOCATION_
MZONE
)
e5
:
SetRange
(
LOCATION_
SZONE
)
e5
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e5
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e5
:
SetTarget
(
cm
.
eftg
)
e5
:
SetTarget
(
cm
.
eftg
)
e5
:
SetLabelObject
(
e4
)
e5
:
SetLabelObject
(
e4
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
--recover
--recover
local
e11
=
Effect
.
CreateEffect
(
c
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetCategory
(
CATEGORY_RECOVER
)
e11
:
SetCategory
(
CATEGORY_RECOVER
)
e11
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e11
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e11
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e11
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e11
:
SetCondition
(
cm
.
reccon
)
e11
:
SetCondition
(
cm
.
reccon
)
e11
:
SetTarget
(
cm
.
rectg
)
e11
:
SetTarget
(
cm
.
rectg
)
e11
:
SetOperation
(
cm
.
recop
)
e11
:
SetOperation
(
cm
.
recop
)
local
e55
=
Effect
.
CreateEffect
(
c
)
local
e55
=
Effect
.
CreateEffect
(
c
)
e55
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e55
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e55
:
SetRange
(
LOCATION_
MZONE
)
e55
:
SetRange
(
LOCATION_
SZONE
)
e55
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e55
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e55
:
SetTarget
(
cm
.
eftg
)
e55
:
SetTarget
(
cm
.
eftg
)
e55
:
SetLabelObject
(
e11
)
e55
:
SetLabelObject
(
e11
)
c
:
RegisterEffect
(
e55
)
c
:
RegisterEffect
(
e55
)
--spsummon limit
--spsummon limit
local
e22
=
Effect
.
CreateEffect
(
c
)
local
e22
=
Effect
.
CreateEffect
(
c
)
e22
:
SetType
(
EFFECT_TYPE_FIELD
)
e22
:
SetType
(
EFFECT_TYPE_FIELD
)
e22
:
SetRange
(
LOCATION_SZONE
)
e22
:
SetRange
(
LOCATION_SZONE
)
e22
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e22
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e22
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e22
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e22
:
SetTargetRange
(
1
,
0
)
e22
:
SetTargetRange
(
1
,
0
)
e22
:
SetTarget
(
cm
.
sumlimit
)
e22
:
SetTarget
(
cm
.
sumlimit
)
c
:
RegisterEffect
(
e22
)
c
:
RegisterEffect
(
e22
)
end
end
function
cm
.
cfilter
(
c
)
function
cm
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
66915001
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
66915001
)
end
end
function
cm
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
and
eg
:
GetFirst
()
==
ec
and
Duel
.
GetAttacker
()
==
ec
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
and
eg
:
GetFirst
()
==
ec
and
Duel
.
GetAttacker
()
==
ec
end
end
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
cm
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
end
function
cm
.
eftg
(
e
,
c
)
function
cm
.
eftg
(
e
,
c
)
local
seq
=
c
:
GetSequence
()
local
seq
=
c
:
GetSequence
()
return
c
:
IsSetCard
(
0x1374
)
return
c
:
IsSetCard
(
0x1374
)
and
seq
<
5
and
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
seq
<
5
and
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
end
end
function
cm
.
reccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
reccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
t
=
Duel
.
GetAttackTarget
()
local
t
=
Duel
.
GetAttackTarget
()
if
ev
==
1
then
t
=
Duel
.
GetAttacker
()
end
if
ev
==
1
then
t
=
Duel
.
GetAttacker
()
end
if
not
c
:
IsRelateToBattle
()
or
c
:
IsFacedown
()
then
return
false
end
if
not
c
:
IsRelateToBattle
()
or
c
:
IsFacedown
()
then
return
false
end
e
:
SetLabel
(
t
:
GetAttack
())
e
:
SetLabel
(
t
:
GetAttack
())
return
t
:
GetLocation
()
==
LOCATION_GRAVE
and
t
:
IsType
(
TYPE_MONSTER
)
return
t
:
GetLocation
()
==
LOCATION_GRAVE
and
t
:
IsType
(
TYPE_MONSTER
)
end
end
function
cm
.
rectg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
rectg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
e
:
GetLabel
())
Duel
.
SetTargetParam
(
e
:
GetLabel
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
e
:
GetLabel
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
tp
,
e
:
GetLabel
())
end
end
function
cm
.
recop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
recop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
end
end
function
cm
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
function
cm
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
not
c
:
IsSetCard
(
0x1374
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
not
c
:
IsSetCard
(
0x1374
)
end
end
\ No newline at end of file
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