Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-2pick
Commits
8f89e054
Commit
8f89e054
authored
Oct 07, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push by Appveyor
parent
ae0a427e
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1864 additions
and
23 deletions
+1864
-23
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c13257202.lua
expansions/script/c13257202.lua
+1
-1
expansions/script/c13257226.lua
expansions/script/c13257226.lua
+7
-14
expansions/script/c13257318.lua
expansions/script/c13257318.lua
+2
-2
expansions/script/c22240001.lua
expansions/script/c22240001.lua
+108
-0
expansions/script/c22240002.lua
expansions/script/c22240002.lua
+109
-0
expansions/script/c22240003.lua
expansions/script/c22240003.lua
+98
-0
expansions/script/c22240004.lua
expansions/script/c22240004.lua
+104
-0
expansions/script/c22240005.lua
expansions/script/c22240005.lua
+110
-0
expansions/script/c22240006.lua
expansions/script/c22240006.lua
+109
-0
expansions/script/c22240007.lua
expansions/script/c22240007.lua
+123
-0
expansions/script/c22240008.lua
expansions/script/c22240008.lua
+104
-0
expansions/script/c22240121.lua
expansions/script/c22240121.lua
+124
-0
expansions/script/c22240122.lua
expansions/script/c22240122.lua
+114
-0
expansions/script/c22240123.lua
expansions/script/c22240123.lua
+5
-5
expansions/script/c22240124.lua
expansions/script/c22240124.lua
+102
-0
expansions/script/c22241001.lua
expansions/script/c22241001.lua
+95
-0
expansions/script/c22241002.lua
expansions/script/c22241002.lua
+75
-0
expansions/script/c22241101.lua
expansions/script/c22241101.lua
+76
-0
expansions/script/c22241201.lua
expansions/script/c22241201.lua
+87
-0
expansions/script/c22241301.lua
expansions/script/c22241301.lua
+116
-0
expansions/script/c22241401.lua
expansions/script/c22241401.lua
+102
-0
expansions/script/c22241501.lua
expansions/script/c22241501.lua
+92
-0
expansions/script/c50008894.lua
expansions/script/c50008894.lua
+1
-1
No files found.
expansions/222DIY.cdb
View file @
8f89e054
No preview for this file type
expansions/script/c13257202.lua
View file @
8f89e054
...
...
@@ -63,7 +63,7 @@ end
function
c13257202
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAttackPos
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
if
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
)
==
0
then
return
end
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c13257202
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
...
...
expansions/script/c13257226.lua
View file @
8f89e054
...
...
@@ -10,13 +10,6 @@ function c13257226.initial_effect(c)
e11
:
SetOperation
(
c13257226
.
otop
)
e11
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e11
)
--cannot special summon
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
)
e12
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e12
:
SetValue
(
aux
.
FALSE
)
c
:
RegisterEffect
(
e12
)
--Destroy replace
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
...
...
@@ -47,14 +40,14 @@ function c13257226.initial_effect(c)
e4
:
SetCost
(
c13257226
.
descost
)
e4
:
SetOperation
(
c13257226
.
desop
)
c
:
RegisterEffect
(
e4
)
local
e13
=
Effect
.
CreateEffect
(
c
)
e13
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e13
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e13
:
SetOperation
(
c13257226
.
bgmop
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e12
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e12
:
SetOperation
(
c13257226
.
bgmop
)
c
:
RegisterEffect
(
e12
)
local
e13
=
e12
:
Clone
()
e13
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e13
)
local
e14
=
e13
:
Clone
()
e14
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e14
)
end
function
c13257226
.
otfilter
(
c
,
tp
)
...
...
expansions/script/c13257318.lua
View file @
8f89e054
...
...
@@ -116,14 +116,14 @@ function c13257318.eqfilter(c,ec)
end
function
c13257318
.
pctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
t1
=
Duel
.
IsExistingMatchingCard
(
c13257318
.
eqfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
local
t1
=
c
:
GetEquipCount
()
>
0
or
Duel
.
IsExistingMatchingCard
(
c13257318
.
eqfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
local
t2
=
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
if
chk
==
0
then
return
(
t1
or
t2
)
and
c
:
GetEquipCount
()
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
c
:
GetEquipGroup
(),
1
,
0
,
0
)
end
function
c13257318
.
pcop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
t1
=
Duel
.
IsExistingMatchingCard
(
c13257318
.
eqfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
local
t1
=
c
:
GetEquipCount
()
>
0
or
Duel
.
IsExistingMatchingCard
(
c13257318
.
eqfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
local
t2
=
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
if
not
(
t1
or
t2
)
or
c
:
GetEquipCount
()
==
0
then
return
end
local
tg
=
c
:
GetEquipGroup
():
Select
(
tp
,
1
,
1
,
nil
)
...
...
expansions/script/c22240001.lua
0 → 100644
View file @
8f89e054
--Solid 零五六
function
c22240001
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
--send replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240001
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
222400011
)
e3
:
SetCondition
(
c22240001
.
scon
)
e3
:
SetTarget
(
c22240001
.
stg
)
e3
:
SetOperation
(
c22240001
.
sop
)
c
:
RegisterEffect
(
e3
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222400012
)
e1
:
SetCondition
(
c22240001
.
hspcon
)
e1
:
SetOperation
(
c22240001
.
hspop
)
e1
:
SetValue
(
SUMMON_TYPE_RITUAL
)
c
:
RegisterEffect
(
e1
)
--Release
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240001
,
1
))
e1
:
SetCategory
(
CATEGORY_RELEASE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
222400013
)
e1
:
SetCondition
(
c22240001
.
relcon
)
e1
:
SetTarget
(
c22240001
.
reltg
)
e1
:
SetOperation
(
c22240001
.
relop
)
c
:
RegisterEffect
(
e1
)
end
c22240001
.
named_with_Solid
=
1
function
c22240001
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240001
.
scon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c22240001
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c22240001
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22240001
.
spfilter
(
c
)
return
c
:
GetOriginalLevel
()
>
3
and
c
:
IsReleasable
()
end
function
c22240001
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
IsExistingMatchingCard
(
c22240001
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
or
(
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c22240001
.
spfilter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
))
end
function
c22240001
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Group
.
CreateGroup
()
if
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
<
1
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240001
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
elseif
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240001
.
spfilter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
end
function
c22240001
.
relcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
function
c22240001
.
relfilter
(
c
,
tp
)
return
c
:
IsReleasableByEffect
()
end
function
c22240001
.
reltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c22240001
.
relfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22240001
.
relfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c22240001
.
relfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
g
,
1
,
0
,
0
)
end
function
c22240001
.
relop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Release
(
tc
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c22240002.lua
0 → 100644
View file @
8f89e054
--Solid 零六四
function
c22240002
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
--send replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240002
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
222400021
)
e3
:
SetCondition
(
c22240002
.
scon
)
e3
:
SetTarget
(
c22240002
.
stg
)
e3
:
SetOperation
(
c22240002
.
sop
)
c
:
RegisterEffect
(
e3
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222400022
)
e1
:
SetCondition
(
c22240002
.
hspcon
)
e1
:
SetOperation
(
c22240002
.
hspop
)
e1
:
SetValue
(
SUMMON_TYPE_RITUAL
)
c
:
RegisterEffect
(
e1
)
--SpecialSummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240002
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
222400023
)
e1
:
SetCondition
(
c22240002
.
spcon
)
e1
:
SetTarget
(
c22240002
.
sptg
)
e1
:
SetOperation
(
c22240002
.
spop
)
c
:
RegisterEffect
(
e1
)
end
c22240002
.
named_with_Solid
=
1
function
c22240002
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240002
.
scon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c22240002
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c22240002
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22240002
.
spfilter
(
c
)
return
c
:
GetOriginalLevel
()
>
3
and
c
:
IsReleasable
()
end
function
c22240002
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
IsExistingMatchingCard
(
c22240002
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
or
(
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c22240002
.
spfilter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
))
end
function
c22240002
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Group
.
CreateGroup
()
if
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
<
1
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240002
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
elseif
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240002
.
spfilter
,
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
end
function
c22240002
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
function
c22240002
.
filter
(
c
,
e
,
tp
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
end
function
c22240002
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c22240002
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c22240002
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c22240002
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c22240002
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c22240003.lua
0 → 100644
View file @
8f89e054
--Solid 零五零
function
c22240003
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
--send replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240003
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
222400031
)
e3
:
SetCondition
(
c22240003
.
scon
)
e3
:
SetTarget
(
c22240003
.
stg
)
e3
:
SetOperation
(
c22240003
.
sop
)
c
:
RegisterEffect
(
e3
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222400032
)
e1
:
SetCondition
(
c22240003
.
hspcon
)
e1
:
SetOperation
(
c22240003
.
hspop
)
e1
:
SetValue
(
SUMMON_TYPE_RITUAL
)
c
:
RegisterEffect
(
e1
)
--Draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240003
,
1
))
e1
:
SetCategory
(
CATEGORY_RELEASE
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
222400033
)
e1
:
SetTarget
(
c22240003
.
reltg
)
e1
:
SetOperation
(
c22240003
.
relop
)
c
:
RegisterEffect
(
e1
)
end
c22240003
.
named_with_Solid
=
1
function
c22240003
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240003
.
scon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c22240003
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c22240003
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22240003
.
spfilter
(
c
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsReleasable
()
end
function
c22240003
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
IsExistingMatchingCard
(
c22240003
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c22240003
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240003
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c22240003
.
reltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsLocation
(
LOCATION_SZONE
)
and
chkc
:
IsReleasableByEffect
()
and
chkc
:
IsControler
(
tp
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingTarget
(
Card
.
IsReleasableByEffect
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsReleasableByEffect
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c22240003
.
relop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Release
(
tc
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c22240004.lua
0 → 100644
View file @
8f89e054
--Solid 一零七八
function
c22240004
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
--send replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240004
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
222400041
)
e3
:
SetCondition
(
c22240004
.
scon
)
e3
:
SetTarget
(
c22240004
.
stg
)
e3
:
SetOperation
(
c22240004
.
sop
)
c
:
RegisterEffect
(
e3
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222400042
)
e1
:
SetCondition
(
c22240004
.
hspcon
)
e1
:
SetOperation
(
c22240004
.
hspop
)
e1
:
SetValue
(
SUMMON_TYPE_RITUAL
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240004
,
1
))
e1
:
SetCategory
(
CATEGORY_RELEASE
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
222400043
)
e1
:
SetTarget
(
c22240004
.
reltg
)
e1
:
SetOperation
(
c22240004
.
relop
)
c
:
RegisterEffect
(
e1
)
end
c22240004
.
named_with_Solid
=
1
function
c22240004
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240004
.
scon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c22240004
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c22240004
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22240004
.
spfilter
(
c
)
return
bit
.
band
(
c
:
GetOriginalType
(),
0x1
)
==
0x1
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsReleasable
()
end
function
c22240004
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
IsExistingMatchingCard
(
c22240004
.
spfilter
,
c
:
GetControler
(),
LOCATION_SZONE
,
0
,
1
,
nil
)
end
function
c22240004
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240004
.
spfilter
,
c
:
GetControler
(),
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c22240004
.
tgfilter
(
c
)
return
c
:
IsAbleToHand
()
and
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
end
function
c22240004
.
reltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
and
c22240004
.
tgfilter
(
chkc
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasableByEffect
()
and
Duel
.
IsExistingTarget
(
c22240004
.
tgfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c22240004
.
tgfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c22240004
.
relop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
>
0
then
Duel
.
BreakEffect
()
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c22240005.lua
0 → 100644
View file @
8f89e054
--Solid 零九九六
function
c22240005
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
--send replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240005
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
222400051
)
e3
:
SetCondition
(
c22240005
.
scon
)
e3
:
SetTarget
(
c22240005
.
stg
)
e3
:
SetOperation
(
c22240005
.
sop
)
c
:
RegisterEffect
(
e3
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222400052
)
e1
:
SetCondition
(
c22240005
.
hspcon
)
e1
:
SetOperation
(
c22240005
.
hspop
)
e1
:
SetValue
(
SUMMON_TYPE_RITUAL
)
c
:
RegisterEffect
(
e1
)
--Release
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240005
,
1
))
e1
:
SetCategory
(
CATEGORY_RELEASE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
222400053
)
e1
:
SetCost
(
c22240005
.
relcost
)
e1
:
SetTarget
(
c22240005
.
reltg
)
e1
:
SetOperation
(
c22240005
.
relop
)
c
:
RegisterEffect
(
e1
)
end
c22240005
.
named_with_Solid
=
1
function
c22240005
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240005
.
scon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c22240005
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c22240005
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22240005
.
spfilter
(
c
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
c22240005
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
IsExistingMatchingCard
(
c22240005
.
spfilter
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
c22240005
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240005
.
spfilter
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
c22240005
.
relcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsReleasable
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsReleasable
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
Duel
.
Release
(
tc
,
REASON_COST
)
if
bit
.
band
(
tc
:
GetType
(),
0x81
)
==
0x81
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
end
end
function
c22240005
.
reltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsLocation
(
LOCATION_SZONE
)
and
chkc
:
IsReleasableByEffect
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsReleasableByEffect
,
tp
,
0
,
LOCATION_SZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsReleasableByEffect
,
tp
,
0
,
LOCATION_SZONE
,
1
,
1
,
nil
)
if
e
:
GetLabel
()
==
1
then
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
g
,
1
,
0
,
0
)
end
function
c22240005
.
relop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Release
(
tc
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c22240006.lua
0 → 100644
View file @
8f89e054
--Solid 零九五五
function
c22240006
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
--send replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240006
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
222400061
)
e3
:
SetCondition
(
c22240006
.
scon
)
e3
:
SetTarget
(
c22240006
.
stg
)
e3
:
SetOperation
(
c22240006
.
sop
)
c
:
RegisterEffect
(
e3
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222400062
)
e1
:
SetCondition
(
c22240006
.
hspcon
)
e1
:
SetOperation
(
c22240006
.
hspop
)
e1
:
SetValue
(
SUMMON_TYPE_RITUAL
)
c
:
RegisterEffect
(
e1
)
--Change position
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240006
,
1
))
e3
:
SetCategory
(
CATEGORY_RELEASE
+
CATEGORY_POSITION
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
222400063
)
e3
:
SetCode
(
EVENT_CHANGE_POS
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCost
(
c22240006
.
cost
)
e3
:
SetCondition
(
c22240006
.
condition
)
e3
:
SetTarget
(
c22240006
.
target
)
e3
:
SetOperation
(
c22240006
.
operation
)
c
:
RegisterEffect
(
e3
)
end
c22240006
.
named_with_Solid
=
1
function
c22240006
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240006
.
scon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c22240006
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c22240006
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22240006
.
spfilter
(
c
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsFaceup
()
and
c
:
IsCanTurnSet
()
end
function
c22240006
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
IsExistingMatchingCard
(
c22240006
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c22240006
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
c22240006
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN_DEFENSE
)
end
function
c22240006
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c22240006
.
cfilter
(
c
)
local
np
=
c
:
GetPosition
()
local
pp
=
c
:
GetPreviousPosition
()
return
np
~=
pp
and
c
:
IsReleasableByEffect
()
end
function
c22240006
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c22240006
.
cfilter
,
1
,
nil
)
and
eg
:
GetCount
()
==
1
end
function
c22240006
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
eg
:
GetFirst
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsReleasableByEffect
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
2
,
tc
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
tc
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
0
,
1
,
0
,
0
)
end
function
c22240006
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
Duel
.
Release
(
tc
,
REASON_EFFECT
)
>
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsReleasableByEffect
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsReleasableByEffect
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g
then
Duel
.
Release
(
g
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c22240007.lua
0 → 100644
View file @
8f89e054
--Solid 零九一三
function
c22240007
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
--send replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240007
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
222400071
)
e3
:
SetCondition
(
c22240007
.
scon
)
e3
:
SetTarget
(
c22240007
.
stg
)
e3
:
SetOperation
(
c22240007
.
sop
)
c
:
RegisterEffect
(
e3
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222400072
)
e1
:
SetCondition
(
c22240007
.
hspcon
)
e1
:
SetOperation
(
c22240007
.
hspop
)
e1
:
SetValue
(
SUMMON_TYPE_RITUAL
)
c
:
RegisterEffect
(
e1
)
--Release
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240007
,
1
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
222400073
)
e1
:
SetCost
(
c22240007
.
relcost
)
e1
:
SetTarget
(
c22240007
.
reltg
)
e1
:
SetOperation
(
c22240007
.
relop
)
c
:
RegisterEffect
(
e1
)
end
c22240007
.
named_with_Solid
=
1
function
c22240007
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240007
.
scon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c22240007
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c22240007
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22240007
.
spfilter
(
c
)
return
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
c22240007
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
IsExistingMatchingCard
(
c22240007
.
spfilter
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
c22240007
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240007
.
spfilter
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
c22240007
.
cfilter
(
c
)
return
c22240007
.
IsSolid
(
c
)
and
c
:
IsReleasableByEffect
()
end
function
c22240007
.
relcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22240007
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240007
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c22240007
.
filter
(
c
)
return
not
c
:
IsDisabled
()
end
function
c22240007
.
reltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c22240007
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22240007
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
local
g
=
Duel
.
SelectTarget
(
tp
,
c22240007
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c22240007
.
relop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
c
=
e
:
GetHandler
()
local
tc
=
g
:
GetFirst
()
while
tc
do
--forbidden
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
ph
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
ph
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
\ No newline at end of file
expansions/script/c22240008.lua
0 → 100644
View file @
8f89e054
--Solid 零八五二
function
c22240008
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
aux
.
ritlimit
)
c
:
RegisterEffect
(
e1
)
--send replace
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240008
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
222400081
)
e3
:
SetCondition
(
c22240008
.
scon
)
e3
:
SetTarget
(
c22240008
.
stg
)
e3
:
SetOperation
(
c22240008
.
sop
)
c
:
RegisterEffect
(
e3
)
--spsummon proc
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222400082
)
e1
:
SetCondition
(
c22240008
.
hspcon
)
e1
:
SetValue
(
SUMMON_TYPE_RITUAL
)
c
:
RegisterEffect
(
e1
)
--change effect
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22240008
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
222400083
)
e2
:
SetCondition
(
c22240008
.
chcon
)
e2
:
SetCost
(
c22240008
.
chcost
)
e2
:
SetTarget
(
c22240008
.
chtg
)
e2
:
SetOperation
(
c22240008
.
chop
)
c
:
RegisterEffect
(
e2
)
end
c22240008
.
named_with_Solid
=
1
function
c22240008
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240008
.
scon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
function
c22240008
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c22240008
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22240008
.
spfilter
(
c
)
return
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
end
function
c22240008
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
IsExistingMatchingCard
(
c22240008
.
spfilter
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
function
c22240008
.
chcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
return
rp
==
1
-
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
c22240008
.
cfilter
(
c
)
return
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
function
c22240008
.
chcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c22240008
.
chtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
re
:
GetHandler
():
IsReleasableByEffect
()
end
end
function
c22240008
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
c22240008
.
repop
)
end
function
c22240008
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
c
:
GetControler
()
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsReleasable
,
p
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
then
local
g
=
Duel
.
SelectMatchingCard
(
p
,
Card
.
IsReleasable
,
p
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_EFFECT
)
end
end
expansions/script/c22240121.lua
0 → 100644
View file @
8f89e054
--Solid 一零零一
function
c22240121
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
0x81
),
4
,
2
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240121
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c22240121
.
xyzcon
)
e1
:
SetOperation
(
c22240121
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
--Negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22240121
,
1
))
e2
:
SetCategory
(
CATEGORY_NEGATE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c22240121
.
cost
)
e2
:
SetCondition
(
c22240121
.
condition
)
e2
:
SetTarget
(
c22240121
.
target
)
e2
:
SetOperation
(
c22240121
.
operation
)
c
:
RegisterEffect
(
e2
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22240121
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
22240121
)
e3
:
SetCost
(
c22240121
.
thcost
)
e3
:
SetTarget
(
c22240121
.
thtg
)
e3
:
SetOperation
(
c22240121
.
thop
)
c
:
RegisterEffect
(
e3
)
end
c22240121
.
named_with_Solid
=
1
function
c22240121
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240121
.
xyzfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
bit
.
band
(
c
:
GetOriginalType
(),
0x81
)
==
0x81
end
function
c22240121
.
xyzcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
olg
=
Duel
.
GetMatchingGroup
(
c22240121
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
return
true
end
end
function
c22240121
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
olg
=
Duel
.
GetMatchingGroup
(
c22240121
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
local
g
=
olg
:
Select
(
tp
,
2
,
2
,
nil
)
c
:
SetMaterial
(
g
)
Duel
.
Overlay
(
c
,
g
)
end
end
function
c22240121
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
Duel
.
IsChainNegatable
(
ev
)
and
not
bit
.
band
(
re
:
GetActivateLocation
(),
LOCATION_ONFIELD
)
~=
0
end
function
c22240121
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckRemoveOverlayCard
(
tp
,
1
,
0
,
1
,
REASON_COST
)
end
Duel
.
RemoveOverlayCard
(
tp
,
1
,
0
,
1
,
1
,
REASON_COST
)
end
function
c22240121
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
end
function
c22240121
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
Duel
.
GetTurnPlayer
()
==
tp
then
local
ph
=
Duel
.
GetCurrentPhase
()
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e3
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e3
:
SetTargetRange
(
0
,
1
)
e3
:
SetValue
(
c22240121
.
aclimit
)
e3
:
SetReset
(
RESET_PHASE
+
ph
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
end
function
c22240121
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c22240121
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsAbleToHand
()
end
function
c22240121
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_TEMPORARY
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c22240121
.
reop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c22240121
.
reop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReturnToField
(
e
:
GetLabelObject
())
end
function
c22240121
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c22240121
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22240121
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c22240121
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c22240121
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c22240122.lua
0 → 100644
View file @
8f89e054
--Solid 一零零二
function
c22240122
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
0x81
),
4
,
2
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240122
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c22240122
.
xyzcon
)
e1
:
SetOperation
(
c22240122
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
--To Hand
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
22240122
,
1
))
e4
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_RELEASE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetCode
(
EVENT_REMOVE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCondition
(
c22240122
.
thcon1
)
e4
:
SetCost
(
c22240122
.
thcost1
)
e4
:
SetTarget
(
c22240122
.
thtg
)
e4
:
SetOperation
(
c22240122
.
thop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_TO_GRAVE
)
c
:
RegisterEffect
(
e5
)
--disable special summon
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
22240122
,
2
))
e6
:
SetCategory
(
CATEGORY_DISABLE_SUMMON
+
CATEGORY_TODECK
)
e6
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e6
:
SetCode
(
EVENT_SPSUMMON
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCountLimit
(
1
,
22240122
)
e6
:
SetCondition
(
c22240122
.
discon
)
e6
:
SetCost
(
c22240122
.
discost
)
e6
:
SetTarget
(
c22240122
.
distg
)
e6
:
SetOperation
(
c22240122
.
disop
)
c
:
RegisterEffect
(
e6
)
end
c22240122
.
named_with_Solid
=
1
function
c22240122
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240122
.
xyzfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
bit
.
band
(
c
:
GetOriginalType
(),
0x81
)
==
0x81
end
function
c22240122
.
xyzcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
olg
=
Duel
.
GetMatchingGroup
(
c22240122
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
return
true
end
end
function
c22240122
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
olg
=
Duel
.
GetMatchingGroup
(
c22240122
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
local
g
=
olg
:
Select
(
tp
,
2
,
2
,
nil
)
c
:
SetMaterial
(
g
)
Duel
.
Overlay
(
c
,
g
)
end
end
function
c22240122
.
cfilter1
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
GetPreviousControler
()
==
tp
and
c22240122
.
IsSolid
(
c
)
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
end
function
c22240122
.
thcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c22240122
.
cfilter1
,
1
,
nil
,
tp
)
end
function
c22240122
.
thcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckRemoveOverlayCard
(
tp
,
1
,
0
,
1
,
REASON_COST
)
end
Duel
.
RemoveOverlayCard
(
tp
,
1
,
0
,
1
,
1
,
REASON_COST
)
end
function
c22240122
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c22240122
.
thfilter
(
c
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsReleasableByEffect
()
and
c22240122
.
IsSolid
(
c
)
end
function
c22240122
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
if
c22240122
.
thfilter
(
tc
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
22240122
,
3
))
then
Duel
.
BreakEffect
()
Duel
.
Release
(
tc
,
REASON_EFFECT
)
end
end
function
c22240122
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
ep
and
Duel
.
GetCurrentChain
()
==
0
end
function
c22240122
.
discfilter
(
c
)
return
c22240122
.
IsSolid
(
c
)
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsAbleToDeckAsCost
()
end
function
c22240122
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22240122
.
discfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
2
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22240122
.
discfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
2
,
2
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
c22240122
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
function
c22240122
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
Duel
.
SendtoDeck
(
eg
,
nil
,
2
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c22240123.lua
View file @
8f89e054
...
...
@@ -139,10 +139,10 @@ function c22240123.reop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ReturnToField
(
e
:
GetLabelObject
())
end
function
c22240123
.
sfilter
(
c
,
e
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsCanBeEffectTarget
(
e
)
and
c
:
GetLevel
()
==
4
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
c22240123
.
xfilter
(
c
,
e
,
tp
)
return
c22240123
.
IsSolid
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
function
c22240123
.
xfilter
(
c
,
mg
)
return
c22240123
.
IsSolid
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c22240123
.
mfilter1
(
c
,
mg
,
exg
)
return
mg
:
IsExists
(
c22240123
.
mfilter2
,
1
,
c
,
c
,
exg
)
...
...
@@ -153,7 +153,7 @@ end
function
c22240123
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
c22240123
.
sfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
local
exg
=
Duel
.
GetMatchingGroup
(
c22240123
.
xfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
local
exg
=
Duel
.
GetMatchingGroup
(
c22240123
.
xfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
mg
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
e
:
GetHandler
())
>
0
and
mg
:
GetCount
()
>
1
and
exg
:
GetCount
()
>
0
end
local
sg1
=
mg
:
FilterSelect
(
tp
,
c22240123
.
mfilter1
,
1
,
1
,
nil
,
mg
,
exg
)
...
...
@@ -170,7 +170,7 @@ function c22240123.thop(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
)
<
1
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
c22240123
.
filter2
,
nil
,
e
)
if
g
:
GetCount
()
<
2
then
return
end
local
xyzg
=
Duel
.
GetMatchingGroup
(
c22240123
.
xfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
local
xyzg
=
Duel
.
GetMatchingGroup
(
c22240123
.
xfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
g
)
if
xyzg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
xyz
=
xyzg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
...
...
expansions/script/c22240124.lua
0 → 100644
View file @
8f89e054
--Solid 一零零四
function
c22240124
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
0x81
),
4
,
2
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240124
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c22240124
.
xyzcon
)
e1
:
SetOperation
(
c22240124
.
xyzop
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
--Release
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240124
,
1
))
e1
:
SetCategory
(
CATEGORY_RELEASE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c22240124
.
relcost
)
e1
:
SetTarget
(
c22240124
.
reltg
)
e1
:
SetOperation
(
c22240124
.
relop
)
c
:
RegisterEffect
(
e1
)
--Overlay
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22240124
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
222401243
)
e1
:
SetCondition
(
c22240124
.
tdcon
)
e1
:
SetTarget
(
c22240124
.
tdtg
)
e1
:
SetOperation
(
c22240124
.
tdop
)
c
:
RegisterEffect
(
e1
)
end
c22240124
.
named_with_Solid
=
1
function
c22240124
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22240124
.
xyzfilter
(
c
,
xyzc
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
bit
.
band
(
c
:
GetOriginalType
(),
0x81
)
==
0x81
end
function
c22240124
.
xyzcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
olg
=
Duel
.
GetMatchingGroup
(
c22240124
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
return
true
end
end
function
c22240124
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
olg
=
Duel
.
GetMatchingGroup
(
c22240124
.
xyzfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
c
)
if
olg
:
GetCount
()
>=
2
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
olg
,
c
)
>
0
then
local
g
=
olg
:
Select
(
tp
,
2
,
2
,
nil
)
c
:
SetMaterial
(
g
)
Duel
.
Overlay
(
c
,
g
)
end
end
function
c22240124
.
relcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckRemoveOverlayCard
(
tp
,
1
,
0
,
2
,
REASON_COST
)
end
Duel
.
RemoveOverlayCard
(
tp
,
1
,
0
,
2
,
2
,
REASON_COST
)
end
function
c22240124
.
reltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsReleasableByEffect
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsReleasableByEffect
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsReleasableByEffect
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
g
,
1
,
0
,
0
)
end
function
c22240124
.
relop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Release
(
tc
,
REASON_EFFECT
)
end
end
function
c22240124
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c22240124
.
mafilter
(
c
,
tp
)
return
c22240124
.
IsSolid
(
c
)
and
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsCanBeXyzMaterial
(
nil
)
end
function
c22240124
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22240124
.
mafilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
c22240124
.
xyzfilter
(
c
,
tp
)
return
c22240124
.
IsSolid
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c22240124
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
xyzg
=
Duel
.
GetMatchingGroup
(
c22240124
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
m
=
xyzg
:
GetCount
()
local
mag
=
Duel
.
SelectMatchingCard
(
tp
,
c22240124
.
mafilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
m
,
nil
)
while
mag
:
GetCount
()
>
0
and
xyzg
:
GetCount
()
>
0
do
local
tg
=
xyzg
:
Select
(
tp
,
1
,
1
,
nil
)
local
mg
=
mag
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Overlay
(
tg
:
GetFirst
(),
mg
:
GetFirst
())
xyzg
:
RemoveCard
(
tg
:
GetFirst
())
mag
:
RemoveCard
(
mg
:
GetFirst
())
end
end
\ No newline at end of file
expansions/script/c22241001.lua
0 → 100644
View file @
8f89e054
--Solid 零一八
function
c22241001
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
222410011
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c22241001
.
target
)
e1
:
SetOperation
(
c22241001
.
operation
)
c
:
RegisterEffect
(
e1
)
--Release-
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22241001
,
2
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_RELEASE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
222410012
)
e2
:
SetCondition
(
c22241001
.
adcon
)
e2
:
SetTarget
(
c22241001
.
adtg
)
e2
:
SetOperation
(
c22241001
.
adop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e3
)
end
c22241001
.
named_with_Solid
=
1
function
c22241001
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22241001
.
desfilter
(
c
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
end
function
c22241001
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
c22241001
.
desfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22241001
.
desfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c22241001
.
desfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
3
,
nil
)
if
g
:
FilterCount
(
Card
.
IsAbleToDeck
,
nil
)
==
3
and
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
22241001
,
0
))
then
e
:
SetLabel
(
1
)
e
:
SetCategory
(
CATEGORY_DRAW
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
3
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
elseif
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
2
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
22241001
,
1
))
then
e
:
SetLabel
(
2
)
else
e
:
SetLabel
(
0
)
end
end
function
c22241001
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
~=
3
then
return
end
if
e
:
GetLabel
()
==
1
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
2
,
REASON_EFFECT
)
elseif
e
:
GetLabel
()
==
2
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
2
then
local
c
=
g
:
GetFirst
()
while
c
do
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
=
g
:
GetNext
()
end
end
end
function
c22241001
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
bit
.
band
(
e
:
GetHandler
():
GetReason
(),
REASON_RELEASE
)
~=
0
end
function
c22241001
.
adtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
2
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c22241001
.
filter
(
c
)
return
c
:
IsReleasableByEffect
()
and
c22241001
.
IsSolid
(
c
)
end
function
c22241001
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
3
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
3
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
3
)
local
eg
=
g
:
Filter
(
c22241001
.
filter
,
nil
)
if
eg
:
GetCount
()
>
0
then
local
sg
=
eg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
sg
,
REASON_RELEASE
+
REASON_EFFECT
)
end
Duel
.
ShuffleDeck
(
tp
)
end
expansions/script/c22241002.lua
0 → 100644
View file @
8f89e054
--Solid 零二三
function
c22241002
.
initial_effect
(
c
)
--Activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
,
222410021
+
EFFECT_COUNT_CODE_OATH
)
e2
:
SetCost
(
c22241002
.
cost
)
e2
:
SetTarget
(
c22241002
.
target
)
e2
:
SetOperation
(
c22241002
.
operation
)
c
:
RegisterEffect
(
e2
)
--Release-
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22241002
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
222410022
)
e2
:
SetCondition
(
c22241002
.
adcon
)
e2
:
SetTarget
(
c22241002
.
adtg
)
e2
:
SetOperation
(
c22241002
.
adop
)
c
:
RegisterEffect
(
e2
)
end
c22241002
.
named_with_Solid
=
1
function
c22241002
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22241002
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsReleasable
,
tp
,
LOCATION_SZONE
,
0
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsReleasable
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
local
tc
=
g
:
GetFirst
()
Duel
.
Release
(
tc
,
REASON_COST
)
if
c22241002
.
IsSolid
(
tc
)
then
e
:
SetLabel
(
1
)
else
e
:
SetLabel
(
0
)
end
end
function
c22241002
.
filter
(
c
)
return
c
:
IsAbleToHand
()
and
c22241002
.
IsSolid
(
c
)
and
c
:
IsType
(
TYPE_SPELL
)
end
function
c22241002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22241002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
)
end
if
e
:
GetLabel
()
==
1
then
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
0
,
2
,
tp
,
LOCATION_DECK
)
end
function
c22241002
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
not
Duel
.
IsExistingMatchingCard
(
c22241002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
)
then
return
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22241002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
2
,
2
,
nil
)
if
g
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c22241002
.
thfilter
(
c
)
return
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c22241002
.
IsSolid
(
c
)
and
c
:
IsAbleToHand
()
end
function
c22241002
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
bit
.
band
(
e
:
GetHandler
():
GetReason
(),
REASON_RELEASE
)
~=
0
end
function
c22241002
.
adtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22241002
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c22241002
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsExistingMatchingCard
(
c22241002
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
then
return
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22241002
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
\ No newline at end of file
expansions/script/c22241101.lua
0 → 100644
View file @
8f89e054
--Solid 零二七
function
c22241101
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
222411011
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c22241101
.
cost
)
e1
:
SetTarget
(
c22241101
.
target
)
e1
:
SetOperation
(
c22241101
.
operation
)
c
:
RegisterEffect
(
e1
)
--Release-
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22241101
,
0
))
e2
:
SetCategory
(
CATEGORY_RELEASE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
222411012
)
e2
:
SetCondition
(
c22241101
.
adcon
)
e2
:
SetTarget
(
c22241101
.
adtg
)
e2
:
SetOperation
(
c22241101
.
adop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e3
)
end
c22241101
.
named_with_Solid
=
1
function
c22241101
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22241101
.
cfilter
(
c
)
return
c
:
IsReleasableByEffect
()
and
c22241101
.
IsSolid
(
c
)
end
function
c22241101
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22241101
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22241101
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c22241101
.
filter1
(
c
)
return
c
:
IsReleasableByEffect
()
and
c
:
IsFaceup
()
end
function
c22241101
.
filter2
(
c
)
return
c
:
IsReleasableByEffect
()
and
c
:
IsFacedown
()
end
function
c22241101
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsReleasableByEffect
()
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22241101
.
filter1
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
e
:
GetHandler
())
and
Duel
.
IsExistingTarget
(
c22241101
.
filter2
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c22241101
.
filter1
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c22241101
.
filter2
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
1
,
e
:
GetHandler
())
g1
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
g1
,
g1
:
GetCount
(),
0
,
0
)
end
function
c22241101
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
Release
(
g
,
REASON_EFFECT
)
end
function
c22241101
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
bit
.
band
(
e
:
GetHandler
():
GetReason
(),
REASON_RELEASE
)
~=
0
end
function
c22241101
.
adtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsReleasableByEffect
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
nil
)
end
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsReleasableByEffect
,
tp
,
LOCATION_SZONE
,
LOCATION_SZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
g
,
1
,
0
,
LOCATION_SZONE
)
end
function
c22241101
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Release
(
tc
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c22241201.lua
0 → 100644
View file @
8f89e054
--Solid 零一四三
function
c22241201
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
22241201
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22241201
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
22241201
)
e2
:
SetCondition
(
c22241201
.
drcon
)
e2
:
SetTarget
(
c22241201
.
drtg
)
e2
:
SetOperation
(
c22241201
.
drop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e3
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22241201
,
1
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
22241201
)
e1
:
SetTarget
(
c22241201
.
target
)
e1
:
SetOperation
(
c22241201
.
activate
)
c
:
RegisterEffect
(
e1
)
end
c22241201
.
named_with_Solid
=
1
function
c22241201
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22241201
.
ccfilter
(
c
,
tp
)
return
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
GetPreviousControler
()
==
tp
and
bit
.
band
(
c
:
GetOriginalType
(),
0x81
)
==
0x81
end
function
c22241201
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c22241201
.
ccfilter
,
1
,
nil
,
tp
)
end
function
c22241201
.
spfilter
(
c
,
e
,
tp
,
olv
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c22241201
.
IsSolid
(
c
)
and
c
:
IsLevelBelow
(
olv
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
end
function
c22241201
.
trfilter
(
c
,
e
,
tp
)
local
olv
=
c
:
GetOriginalLevel
()
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c22241201
.
IsSolid
(
c
)
and
c
:
IsReleasableByEffect
()
and
Duel
.
IsExistingMatchingCard
(
c22241201
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
olv
)
end
function
c22241201
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c22241201
.
trfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
end
function
c22241201
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
then
return
end
local
rg
=
Duel
.
SelectMatchingCard
(
tp
,
c22241201
.
trfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
rc
=
rg
:
GetFirst
()
if
rc
then
Duel
.
SendtoGrave
(
rc
,
REASON_EFFECT
+
REASON_RELEASE
)
local
olv
=
rc
:
GetOriginalLevel
()
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c22241201
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
olv
)
local
sc
=
sg
:
GetFirst
()
if
sc
then
Duel
.
SpecialSummon
(
sc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
end
end
end
function
c22241201
.
tgfilter
(
c
)
return
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsAbleToHand
()
end
function
c22241201
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c22241201
.
tgfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22241201
.
tgfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c22241201
.
tgfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
function
c22241201
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c22241301.lua
0 → 100644
View file @
8f89e054
--Solid Conversion
function
c22241301
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
222413011
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c22241301
.
target
)
e1
:
SetOperation
(
c22241301
.
activate
)
c
:
RegisterEffect
(
e1
)
--Release-
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
222413012
)
e2
:
SetCondition
(
c22241301
.
adcon
)
e2
:
SetTarget
(
c22241301
.
adtg
)
e2
:
SetOperation
(
c22241301
.
adop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e3
)
end
c22241301
.
named_with_Solid
=
1
function
c22241301
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22241301
.
valcheck
(
c
,
rc
)
local
rlv
=
c
:
GetRitualLevel
(
rc
)
if
c
:
IsHasEffect
(
EFFECT_RITUAL_LEVEL
)
and
bit
.
band
(
rlv
,
0xf0000
)
~=
0
and
(
bit
.
band
(
rlv
,
0xf0000
)
==
rc
:
GetOriginalLevel
()
*
0x10000
or
bit
.
band
(
rlv
,
0xf
)
==
rc
:
GetOriginalLevel
())
then
return
bit
.
bor
(
rc
:
GetOriginalLevel
()
*
2
,
c
:
GetOriginalLevel
()
*
0x10000
)
else
return
rlv
end
end
function
c22241301
.
filter
(
c
,
e
,
tp
,
m1
,
m2
,
ft
)
if
not
c22241301
.
IsSolid
(
c
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
true
)
then
return
false
end
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
mg
:
Merge
(
m2
)
if
c
.
mat_filter
then
mg
=
mg
:
Filter
(
c
.
mat_filter
,
nil
)
end
if
ft
>
0
then
return
mg
:
CheckWithSumEqual
(
c22241301
.
valcheck
,
c
:
GetOriginalLevel
()
*
2
,
1
,
99
,
c
)
else
return
ft
>-
1
and
mg
:
IsExists
(
c22241301
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
c22241301
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumEqual
(
c22241301
.
valcheck
,
rc
:
GetOriginalLevel
()
*
2
,
0
,
99
,
rc
)
else
return
false
end
end
function
c22241301
.
mfilter
(
c
)
return
c22241301
.
IsSolid
(
c
)
and
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsAbleToDeck
()
end
function
c22241301
.
rfilter
(
c
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
c
:
IsReleasableByEffect
()
and
c
:
IsLocation
(
LOCATION_HAND
)
end
function
c22241301
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
):
Filter
(
c22241301
.
rfilter
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c22241301
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c22241301
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
,
ft
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c22241301
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
):
Filter
(
c22241301
.
rfilter
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c22241301
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22241301
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
,
ft
)
local
tc
=
g
:
GetFirst
()
if
tc
then
local
mg
=
mg1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
mg
:
Merge
(
mg2
)
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumEqual
(
tp
,
c22241301
.
valcheck
,
tc
:
GetOriginalLevel
()
*
2
,
1
,
99
,
tc
)
end
tc
:
SetMaterial
(
mat
)
g3
=
mat
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
g4
=
mat
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
Duel
.
Release
(
g3
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_RITUAL
)
Duel
.
SendtoDeck
(
g4
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
function
c22241301
.
spfilter
(
c
,
e
,
tp
)
return
bit
.
band
(
c
:
GetType
(),
0x81
)
==
0x81
and
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
end
function
c22241301
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
bit
.
band
(
e
:
GetHandler
():
GetReason
(),
REASON_RELEASE
)
~=
0
end
function
c22241301
.
adtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22241301
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
local
g
=
Duel
.
SelectTarget
(
tp
,
c22241301
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
LOCATION_GRAVE
)
end
function
c22241301
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c22241401.lua
0 → 100644
View file @
8f89e054
--Solid 零一五
function
c22241401
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
222414011
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c22241401
.
target
)
e1
:
SetOperation
(
c22241401
.
operation
)
c
:
RegisterEffect
(
e1
)
--Destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_RELEASE
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetOperation
(
c22241401
.
desop
)
c
:
RegisterEffect
(
e2
)
--Release-
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22241401
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
222414012
)
e2
:
SetCondition
(
c22241401
.
adcon
)
e2
:
SetCost
(
c22241401
.
adcost
)
e2
:
SetTarget
(
c22241401
.
adtg
)
e2
:
SetOperation
(
c22241401
.
adop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e3
)
end
c22241401
.
named_with_Solid
=
1
function
c22241401
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22241401
.
spfilter
(
c
,
e
,
tp
)
return
c22241401
.
IsSolid
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
end
function
c22241401
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c22241401
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c22241401
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22241401
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
==
0
then
return
end
Duel
.
Equip
(
tp
,
c
,
tc
)
--Add Equip limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
c22241401
.
eqlimit
)
e1
:
SetLabelObject
(
tc
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22241401
.
eqlimit
(
e
,
c
)
return
e
:
GetLabelObject
()
==
c
end
function
c22241401
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
if
tc
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Release
(
tc
,
REASON_EFFECT
)
end
end
function
c22241401
.
adcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
bit
.
band
(
e
:
GetHandler
():
GetReason
(),
REASON_RELEASE
)
~=
0
end
function
c22241401
.
adcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsReleasable
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsReleasable
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c22241401
.
adtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c22241401
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
end
end
expansions/script/c22241501.lua
0 → 100644
View file @
8f89e054
--Solid Space
function
c22241501
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c22241501
.
cost
)
e1
:
SetTarget
(
c22241501
.
target
)
e1
:
SetOperation
(
c22241501
.
operation
)
c
:
RegisterEffect
(
e1
)
--cannot be target
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e4
:
SetCondition
(
c22241501
.
immcon
)
e4
:
SetTarget
(
c22241501
.
tgtg
)
e4
:
SetValue
(
c22241501
.
tgvalue
)
c
:
RegisterEffect
(
e4
)
end
c22241501
.
named_with_Solid
=
1
function
c22241501
.
IsSolid
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Solid
end
function
c22241501
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsReleasable
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsReleasable
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c22241501
.
filter1
(
c
)
return
bit
.
band
(
c
:
GetReason
(),
REASON_RELEASE
)
~=
0
and
c
:
IsAbleToHand
()
end
function
c22241501
.
filter2
(
c
,
e
,
tp
)
return
bit
.
band
(
c
:
GetOriginalType
(),
0x81
)
==
0x81
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
end
function
c22241501
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
(
Duel
.
GetMatchingGroupCount
(
c22241501
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
)
>
0
or
Duel
.
GetMatchingGroupCount
(
c22241501
.
filter2
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
e
,
tp
)
>
0
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EFFECT
)
local
g1
=
Duel
.
GetMatchingGroup
(
c22241501
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
c22241501
.
filter2
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
e
,
tp
)
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
22241501
,
0
),
aux
.
Stringid
(
22241501
,
1
))
elseif
g1
:
GetCount
()
>
0
and
(
g2
:
GetCount
()
<
1
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
)
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
22241501
,
0
))
elseif
g1
:
GetCount
()
<
1
and
g2
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
22241501
,
1
))
+
1
end
e
:
SetLabel
(
op
)
if
op
==
0
then
e
:
SetCategory
(
CATEGORY_TOHAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
else
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_SZONE
)
end
end
function
c22241501
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
e
:
GetLabel
()
==
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22241501
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
else
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22241501
.
filter2
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
g
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
end
end
end
function
c22241501
.
tgtg
(
e
,
c
)
return
c22241501
.
IsSolid
(
c
)
and
c
:
IsFaceup
()
end
function
c22241501
.
immcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
<
2
and
e
:
GetHandler
():
IsFaceup
()
end
function
c22241501
.
tgvalue
(
e
,
re
,
rp
)
return
rp
~=
e
:
GetHandlerPlayer
()
end
\ No newline at end of file
expansions/script/c50008894.lua
View file @
8f89e054
...
...
@@ -52,7 +52,7 @@ function c50008894.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c50008894
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
return
c
:
IsSetCard
(
0x50b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
Is
Type
(
TYPE_RITUAL
)
and
c
:
Is
AbleToGrave
()
end
function
c50008894
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50008894
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment