Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
八宫一月
ygopro-scripts
Commits
8b7791e8
Commit
8b7791e8
authored
Jan 10, 2021
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format: crlf to lf
parent
42fcd894
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1307 additions
and
1307 deletions
+1307
-1307
c1050355.lua
c1050355.lua
+66
-66
c1872843.lua
c1872843.lua
+70
-70
c25964547.lua
c25964547.lua
+38
-38
c37444964.lua
c37444964.lua
+75
-75
c38267552.lua
c38267552.lua
+71
-71
c45420955.lua
c45420955.lua
+152
-152
c49389190.lua
c49389190.lua
+73
-73
c50032342.lua
c50032342.lua
+45
-45
c50321796.lua
c50321796.lua
+59
-59
c56704140.lua
c56704140.lua
+55
-55
c61459246.lua
c61459246.lua
+51
-51
c62171834.lua
c62171834.lua
+52
-52
c62393472.lua
c62393472.lua
+76
-76
c65749035.lua
c65749035.lua
+60
-60
c73061465.lua
c73061465.lua
+48
-48
c74665651.lua
c74665651.lua
+79
-79
c75888208.lua
c75888208.lua
+74
-74
c98570539.lua
c98570539.lua
+96
-96
c99792080.lua
c99792080.lua
+67
-67
No files found.
c1050355.lua
View file @
8b7791e8
--闇黒の夢魔鏡
function
c1050355
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1050355
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
,
1050355
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c1050355
.
acttg
)
e2
:
SetOperation
(
c1050355
.
actop
)
c
:
RegisterEffect
(
e2
)
--damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCondition
(
c1050355
.
damcon
)
e3
:
SetOperation
(
c1050355
.
damop
)
c
:
RegisterEffect
(
e3
)
end
function
c1050355
.
actfilter
(
c
,
tp
)
return
c
:
IsCode
(
74665651
)
and
c
:
GetActivateEffect
()
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
end
function
c1050355
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1050355
.
actfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
end
function
c1050355
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c1050355
.
actfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_FZONE
,
0
)
if
fc
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
end
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
end
end
function
c1050355
.
cfilter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
function
c1050355
.
cfilter2
(
c
,
tp
)
return
c
:
GetSummonPlayer
()
==
tp
end
function
c1050355
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c1050355
.
cfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
eg
:
IsExists
(
c1050355
.
cfilter2
,
1
,
nil
,
1
-
tp
)
end
function
c1050355
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1050355
)
Duel
.
Damage
(
1
-
tp
,
300
,
REASON_EFFECT
)
end
--闇黒の夢魔鏡
function
c1050355
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1050355
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
,
1050355
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c1050355
.
acttg
)
e2
:
SetOperation
(
c1050355
.
actop
)
c
:
RegisterEffect
(
e2
)
--damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCondition
(
c1050355
.
damcon
)
e3
:
SetOperation
(
c1050355
.
damop
)
c
:
RegisterEffect
(
e3
)
end
function
c1050355
.
actfilter
(
c
,
tp
)
return
c
:
IsCode
(
74665651
)
and
c
:
GetActivateEffect
()
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
end
function
c1050355
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1050355
.
actfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
end
function
c1050355
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c1050355
.
actfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_FZONE
,
0
)
if
fc
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
end
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
end
end
function
c1050355
.
cfilter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
function
c1050355
.
cfilter2
(
c
,
tp
)
return
c
:
GetSummonPlayer
()
==
tp
end
function
c1050355
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c1050355
.
cfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
eg
:
IsExists
(
c1050355
.
cfilter2
,
1
,
nil
,
1
-
tp
)
end
function
c1050355
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
1050355
)
Duel
.
Damage
(
1
-
tp
,
300
,
REASON_EFFECT
)
end
c1872843.lua
View file @
8b7791e8
--夢魔鏡の白騎士-ルペウス
function
c1872843
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
1050355
)
--indestructable
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1872843
,
0
))
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
1872843
)
e1
:
SetCondition
(
c1872843
.
indcon
)
e1
:
SetOperation
(
c1872843
.
indop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1872843
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
1872844
)
e2
:
SetCondition
(
c1872843
.
spcon
)
e2
:
SetCost
(
c1872843
.
spcost
)
e2
:
SetTarget
(
c1872843
.
sptg
)
e2
:
SetOperation
(
c1872843
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c1872843
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
c1872843
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e2
)
end
end
function
c1872843
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c1872843
.
spcost
(
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
c1872843
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
38267552
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1872843
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c1872843
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c1872843
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1872843
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
--夢魔鏡の白騎士-ルペウス
function
c1872843
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
1050355
)
--indestructable
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1872843
,
0
))
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
1872843
)
e1
:
SetCondition
(
c1872843
.
indcon
)
e1
:
SetOperation
(
c1872843
.
indop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1872843
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
1872844
)
e2
:
SetCondition
(
c1872843
.
spcon
)
e2
:
SetCost
(
c1872843
.
spcost
)
e2
:
SetTarget
(
c1872843
.
sptg
)
e2
:
SetOperation
(
c1872843
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c1872843
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
c1872843
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e2
)
end
end
function
c1872843
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c1872843
.
spcost
(
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
c1872843
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
38267552
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1872843
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c1872843
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c1872843
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1872843
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
c25964547.lua
View file @
8b7791e8
--夢現の夢魔鏡
function
c25964547
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
25964547
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c25964547
.
target
)
e1
:
SetOperation
(
c25964547
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c25964547
.
cfilter1
(
c
,
tp
)
return
c
:
IsCode
(
74665651
,
1050355
)
and
c
:
CheckUniqueOnField
(
tp
)
and
not
c
:
IsForbidden
()
and
Duel
.
IsExistingMatchingCard
(
c25964547
.
cfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
c
,
tp
,
c
:
GetCode
())
end
function
c25964547
.
cfilter2
(
c
,
tp
,
code
)
return
c
:
IsCode
(
74665651
,
1050355
)
and
not
c
:
IsCode
(
code
)
and
c
:
CheckUniqueOnField
(
1
-
tp
)
and
not
c
:
IsForbidden
()
end
function
c25964547
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c25964547
.
cfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
end
function
c25964547
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
25964547
,
0
))
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c25964547
.
cfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
local
tc1
=
g1
:
GetFirst
()
if
not
tc1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
25964547
,
1
))
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c25964547
.
cfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
,
tc1
:
GetCode
())
local
tc2
=
g2
:
GetFirst
()
if
Duel
.
MoveToField
(
tc1
,
tp
,
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
false
)
then
if
Duel
.
MoveToField
(
tc2
,
tp
,
1
-
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
false
)
then
tc2
:
SetStatus
(
STATUS_EFFECT_ENABLED
,
true
)
end
tc1
:
SetStatus
(
STATUS_EFFECT_ENABLED
,
true
)
end
end
--夢現の夢魔鏡
function
c25964547
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
25964547
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c25964547
.
target
)
e1
:
SetOperation
(
c25964547
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c25964547
.
cfilter1
(
c
,
tp
)
return
c
:
IsCode
(
74665651
,
1050355
)
and
c
:
CheckUniqueOnField
(
tp
)
and
not
c
:
IsForbidden
()
and
Duel
.
IsExistingMatchingCard
(
c25964547
.
cfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
c
,
tp
,
c
:
GetCode
())
end
function
c25964547
.
cfilter2
(
c
,
tp
,
code
)
return
c
:
IsCode
(
74665651
,
1050355
)
and
not
c
:
IsCode
(
code
)
and
c
:
CheckUniqueOnField
(
1
-
tp
)
and
not
c
:
IsForbidden
()
end
function
c25964547
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c25964547
.
cfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
end
function
c25964547
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
25964547
,
0
))
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c25964547
.
cfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
local
tc1
=
g1
:
GetFirst
()
if
not
tc1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
25964547
,
1
))
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c25964547
.
cfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
,
tc1
:
GetCode
())
local
tc2
=
g2
:
GetFirst
()
if
Duel
.
MoveToField
(
tc1
,
tp
,
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
false
)
then
if
Duel
.
MoveToField
(
tc2
,
tp
,
1
-
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
false
)
then
tc2
:
SetStatus
(
STATUS_EFFECT_ENABLED
,
true
)
end
tc1
:
SetStatus
(
STATUS_EFFECT_ENABLED
,
true
)
end
end
c37444964.lua
View file @
8b7791e8
--夢魔鏡の夢物語
function
c37444964
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
37444964
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c37444964
.
condition
)
e1
:
SetTarget
(
c37444964
.
target
)
e1
:
SetOperation
(
c37444964
.
activate
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTarget
(
c37444964
.
reptg
)
e2
:
SetValue
(
c37444964
.
repval
)
e2
:
SetOperation
(
c37444964
.
repop
)
c
:
RegisterEffect
(
e2
)
end
function
c37444964
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
end
function
c37444964
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c37444964
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c37444964
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
74665651
)
and
c
:
IsAbleToDeck
()
end
function
c37444964
.
filter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
1050355
)
and
c
:
IsAbleToDeck
()
end
function
c37444964
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c37444964
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
c37444964
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c37444964
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c37444964
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
local
g3
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g1
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g3
,
1
,
0
,
0
)
end
function
c37444964
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
aux
.
ExceptThisCard
(
e
))
if
sg
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
sg
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
end
function
c37444964
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
c
:
IsOnField
()
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
c37444964
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c37444964
.
repfilter
,
1
,
nil
,
tp
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
c37444964
.
repval
(
e
,
c
)
return
c37444964
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c37444964
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
--夢魔鏡の夢物語
function
c37444964
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
37444964
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c37444964
.
condition
)
e1
:
SetTarget
(
c37444964
.
target
)
e1
:
SetOperation
(
c37444964
.
activate
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTarget
(
c37444964
.
reptg
)
e2
:
SetValue
(
c37444964
.
repval
)
e2
:
SetOperation
(
c37444964
.
repop
)
c
:
RegisterEffect
(
e2
)
end
function
c37444964
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
end
function
c37444964
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c37444964
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c37444964
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
74665651
)
and
c
:
IsAbleToDeck
()
end
function
c37444964
.
filter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
1050355
)
and
c
:
IsAbleToDeck
()
end
function
c37444964
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c37444964
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
c37444964
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c37444964
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c37444964
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
local
g3
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g1
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g3
,
1
,
0
,
0
)
end
function
c37444964
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
aux
.
ExceptThisCard
(
e
))
if
sg
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
sg
)
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
end
function
c37444964
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
c
:
IsOnField
()
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
c37444964
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c37444964
.
repfilter
,
1
,
nil
,
tp
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
c37444964
.
repval
(
e
,
c
)
return
c37444964
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
function
c37444964
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
c38267552.lua
View file @
8b7791e8
--夢魔鏡の黒騎士-ルペウス
function
c38267552
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
)
--indestructable
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
38267552
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
38267552
)
e1
:
SetCondition
(
c38267552
.
descon
)
e1
:
SetTarget
(
c38267552
.
destg
)
e1
:
SetOperation
(
c38267552
.
desop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
38267552
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
38267553
)
e2
:
SetCondition
(
c38267552
.
spcon
)
e2
:
SetCost
(
c38267552
.
spcost
)
e2
:
SetTarget
(
c38267552
.
sptg
)
e2
:
SetOperation
(
c38267552
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c38267552
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
c38267552
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c38267552
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c38267552
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c38267552
.
spcost
(
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
c38267552
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
1872843
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c38267552
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c38267552
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c38267552
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c38267552
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
--夢魔鏡の黒騎士-ルペウス
function
c38267552
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
)
--indestructable
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
38267552
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
38267552
)
e1
:
SetCondition
(
c38267552
.
descon
)
e1
:
SetTarget
(
c38267552
.
destg
)
e1
:
SetOperation
(
c38267552
.
desop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
38267552
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
38267553
)
e2
:
SetCondition
(
c38267552
.
spcon
)
e2
:
SetCost
(
c38267552
.
spcost
)
e2
:
SetTarget
(
c38267552
.
sptg
)
e2
:
SetOperation
(
c38267552
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c38267552
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
c38267552
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c38267552
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c38267552
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c38267552
.
spcost
(
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
c38267552
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
1872843
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c38267552
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c38267552
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c38267552
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c38267552
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
c45420955.lua
View file @
8b7791e8
This diff is collapsed.
Click to expand it.
c49389190.lua
View file @
8b7791e8
--夢魔鏡の乙女-イケロス
function
c49389190
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
1050355
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
49389190
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
49389190
)
e1
:
SetCondition
(
c49389190
.
thcon
)
e1
:
SetTarget
(
c49389190
.
thtg
)
e1
:
SetOperation
(
c49389190
.
thop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
49389190
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
49389191
)
e2
:
SetCondition
(
c49389190
.
spcon
)
e2
:
SetCost
(
c49389190
.
spcost
)
e2
:
SetTarget
(
c49389190
.
sptg
)
e2
:
SetOperation
(
c49389190
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c49389190
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
c49389190
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x131
)
and
not
c
:
IsCode
(
49389190
)
and
c
:
IsAbleToHand
()
end
function
c49389190
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c49389190
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c49389190
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c49389190
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c49389190
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c49389190
.
spcost
(
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
c49389190
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
75888208
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c49389190
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c49389190
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c49389190
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c49389190
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
--夢魔鏡の乙女-イケロス
function
c49389190
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
1050355
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
49389190
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
49389190
)
e1
:
SetCondition
(
c49389190
.
thcon
)
e1
:
SetTarget
(
c49389190
.
thtg
)
e1
:
SetOperation
(
c49389190
.
thop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
49389190
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
49389191
)
e2
:
SetCondition
(
c49389190
.
spcon
)
e2
:
SetCost
(
c49389190
.
spcost
)
e2
:
SetTarget
(
c49389190
.
sptg
)
e2
:
SetOperation
(
c49389190
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c49389190
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
c49389190
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x131
)
and
not
c
:
IsCode
(
49389190
)
and
c
:
IsAbleToHand
()
end
function
c49389190
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c49389190
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c49389190
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c49389190
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c49389190
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c49389190
.
spcost
(
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
c49389190
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
75888208
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c49389190
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c49389190
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c49389190
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c49389190
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
c50032342.lua
View file @
8b7791e8
--氷結界の軍師
function
c50032342
.
initial_effect
(
c
)
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50032342
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c50032342
.
cost
)
e1
:
SetTarget
(
c50032342
.
target
)
e1
:
SetOperation
(
c50032342
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c50032342
.
cfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c50032342
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50032342
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50032342
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
if
te
then
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
end
function
c50032342
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c50032342
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
--氷結界の軍師
function
c50032342
.
initial_effect
(
c
)
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50032342
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c50032342
.
cost
)
e1
:
SetTarget
(
c50032342
.
target
)
e1
:
SetOperation
(
c50032342
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c50032342
.
cfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c50032342
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50032342
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50032342
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
if
te
then
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
end
function
c50032342
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
c50032342
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
c50321796.lua
View file @
8b7791e8
--氷結界の龍 ブリューナク
function
c50321796
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50321796
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
50321796
)
e1
:
SetCost
(
c50321796
.
cost
)
e1
:
SetTarget
(
c50321796
.
target
)
e1
:
SetOperation
(
c50321796
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c50321796
.
costfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsDiscardable
()
and
c
:
IsAbleToGraveAsCost
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c50321796
.
fselect
(
g
)
return
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
<=
1
end
function
c50321796
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50321796
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
rt
=
Duel
.
GetTargetCount
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c50321796
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
cg
=
g
:
SelectSubGroup
(
tp
,
c50321796
.
fselect
,
false
,
1
,
rt
)
e
:
SetLabel
(
cg
:
GetCount
())
local
tc
=
cg
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
):
GetFirst
()
if
tc
then
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
cg
:
RemoveCard
(
tc
)
end
Duel
.
SendtoGrave
(
cg
,
REASON_COST
+
REASON_DISCARD
)
end
function
c50321796
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
ct
=
e
:
GetLabel
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
tg
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
ct
,
ct
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
tg
,
ct
,
0
,
0
)
end
function
c50321796
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
rg
=
tg
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
rg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
rg
,
nil
,
REASON_EFFECT
)
end
end
--氷結界の龍 ブリューナク
function
c50321796
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
50321796
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
50321796
)
e1
:
SetCost
(
c50321796
.
cost
)
e1
:
SetTarget
(
c50321796
.
target
)
e1
:
SetOperation
(
c50321796
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c50321796
.
costfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsDiscardable
()
and
c
:
IsAbleToGraveAsCost
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c50321796
.
fselect
(
g
)
return
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
<=
1
end
function
c50321796
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50321796
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
rt
=
Duel
.
GetTargetCount
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c50321796
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
cg
=
g
:
SelectSubGroup
(
tp
,
c50321796
.
fselect
,
false
,
1
,
rt
)
e
:
SetLabel
(
cg
:
GetCount
())
local
tc
=
cg
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
):
GetFirst
()
if
tc
then
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
cg
:
RemoveCard
(
tc
)
end
Duel
.
SendtoGrave
(
cg
,
REASON_COST
+
REASON_DISCARD
)
end
function
c50321796
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
ct
=
e
:
GetLabel
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
tg
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
ct
,
ct
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
tg
,
ct
,
0
,
0
)
end
function
c50321796
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
rg
=
tg
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
rg
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
rg
,
nil
,
REASON_EFFECT
)
end
end
c56704140.lua
View file @
8b7791e8
--氷結界の風水師
function
c56704140
.
initial_effect
(
c
)
--untargetable
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
56704140
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c56704140
.
cost
)
e1
:
SetTarget
(
c56704140
.
target
)
e1
:
SetOperation
(
c56704140
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c56704140
.
costfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsDiscardable
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c56704140
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c56704140
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c56704140
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
if
te
then
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
c56704140
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATTRIBUTE
)
local
aat
=
Duel
.
AnnounceAttribute
(
tp
,
1
,
0x7f
)
e
:
SetLabel
(
aat
)
end
function
c56704140
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e1
:
SetLabel
(
e
:
GetLabel
())
e1
:
SetValue
(
c56704140
.
tgval
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
end
function
c56704140
.
tgval
(
e
,
c
)
return
c
:
IsAttribute
(
e
:
GetLabel
())
and
not
c
:
IsImmuneToEffect
(
e
)
end
--氷結界の風水師
function
c56704140
.
initial_effect
(
c
)
--untargetable
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
56704140
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c56704140
.
cost
)
e1
:
SetTarget
(
c56704140
.
target
)
e1
:
SetOperation
(
c56704140
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c56704140
.
costfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsDiscardable
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c56704140
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c56704140
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c56704140
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
if
te
then
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
c56704140
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATTRIBUTE
)
local
aat
=
Duel
.
AnnounceAttribute
(
tp
,
1
,
0x7f
)
e
:
SetLabel
(
aat
)
end
function
c56704140
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e1
:
SetLabel
(
e
:
GetLabel
())
e1
:
SetValue
(
c56704140
.
tgval
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
end
function
c56704140
.
tgval
(
e
,
c
)
return
c
:
IsAttribute
(
e
:
GetLabel
())
and
not
c
:
IsImmuneToEffect
(
e
)
end
c61459246.lua
View file @
8b7791e8
--夢魔鏡の夢占い
function
c61459246
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--activate(effect)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCountLimit
(
1
,
61459246
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c61459246
.
condition1
)
e1
:
SetTarget
(
c61459246
.
target1
)
e1
:
SetOperation
(
c61459246
.
activate1
)
c
:
RegisterEffect
(
e1
)
--activate(spsummon)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DISABLE_SUMMON
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_SPSUMMON
)
e2
:
SetCountLimit
(
1
,
61459246
+
EFFECT_COUNT_CODE_OATH
)
e2
:
SetCondition
(
c61459246
.
condition2
)
e2
:
SetTarget
(
c61459246
.
target2
)
e2
:
SetOperation
(
c61459246
.
activate2
)
c
:
RegisterEffect
(
e2
)
end
function
c61459246
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
and
rp
==
1
-
tp
and
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c61459246
.
target1
(
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
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c61459246
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c61459246
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
==
0
and
rp
==
1
-
tp
and
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c61459246
.
target2
(
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_DESTROY
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
function
c61459246
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
--夢魔鏡の夢占い
function
c61459246
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--activate(effect)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCountLimit
(
1
,
61459246
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c61459246
.
condition1
)
e1
:
SetTarget
(
c61459246
.
target1
)
e1
:
SetOperation
(
c61459246
.
activate1
)
c
:
RegisterEffect
(
e1
)
--activate(spsummon)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DISABLE_SUMMON
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_SPSUMMON
)
e2
:
SetCountLimit
(
1
,
61459246
+
EFFECT_COUNT_CODE_OATH
)
e2
:
SetCondition
(
c61459246
.
condition2
)
e2
:
SetTarget
(
c61459246
.
target2
)
e2
:
SetOperation
(
c61459246
.
activate2
)
c
:
RegisterEffect
(
e2
)
end
function
c61459246
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
and
rp
==
1
-
tp
and
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c61459246
.
target1
(
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
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c61459246
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
c61459246
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
==
0
and
rp
==
1
-
tp
and
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c61459246
.
target2
(
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_DESTROY
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
function
c61459246
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
c62171834.lua
View file @
8b7791e8
--夢幻の夢魔鏡
function
c62171834
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
62171834
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c62171834
.
activate
)
c
:
RegisterEffect
(
e1
)
--atk/def up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetValue
(
500
)
e2
:
SetCondition
(
c62171834
.
upcon
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e3
)
--atk/def down
local
e4
=
e2
:
Clone
()
e4
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e4
:
SetValue
(
-
500
)
e4
:
SetCondition
(
c62171834
.
downcon
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e5
)
end
function
c62171834
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x131
)
and
c
:
IsAbleToHand
()
end
function
c62171834
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c62171834
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
62171834
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
function
c62171834
.
upcon
(
e
)
return
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c62171834
.
downcon
(
e
)
return
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
--夢幻の夢魔鏡
function
c62171834
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
62171834
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c62171834
.
activate
)
c
:
RegisterEffect
(
e1
)
--atk/def up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetValue
(
500
)
e2
:
SetCondition
(
c62171834
.
upcon
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e3
)
--atk/def down
local
e4
=
e2
:
Clone
()
e4
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e4
:
SetValue
(
-
500
)
e4
:
SetCondition
(
c62171834
.
downcon
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e5
)
end
function
c62171834
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x131
)
and
c
:
IsAbleToHand
()
end
function
c62171834
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c62171834
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
62171834
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
function
c62171834
.
upcon
(
e
)
return
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c62171834
.
downcon
(
e
)
return
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
c62393472.lua
View file @
8b7791e8
--夢魔鏡の聖獣-パンタス
function
c62393472
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
1050355
)
--spsummon1
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
62393472
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
62393472
)
e1
:
SetCondition
(
c62393472
.
spcon1
)
e1
:
SetTarget
(
c62393472
.
sptg1
)
e1
:
SetOperation
(
c62393472
.
spop1
)
c
:
RegisterEffect
(
e1
)
--spsummon2
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
62393472
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
+
TIMING_BATTLE_END
)
e2
:
SetCountLimit
(
1
,
62393473
)
e2
:
SetCondition
(
c62393472
.
spcon2
)
e2
:
SetCost
(
c62393472
.
spcost2
)
e2
:
SetTarget
(
c62393472
.
sptg2
)
e2
:
SetOperation
(
c62393472
.
spop2
)
c
:
RegisterEffect
(
e2
)
end
function
c62393472
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
c62393472
.
spfilter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x131
)
and
c
:
IsLevelBelow
(
8
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
and
not
c
:
IsCode
(
62393472
)
end
function
c62393472
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c62393472
.
spfilter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c62393472
.
spfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c62393472
.
spfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c62393472
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c62393472
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c62393472
.
spcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsReleasable
()
end
Duel
.
Release
(
c
,
REASON_COST
)
end
function
c62393472
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsCode
(
99792080
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c62393472
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c62393472
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c62393472
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c62393472
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
--夢魔鏡の聖獣-パンタス
function
c62393472
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
1050355
)
--spsummon1
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
62393472
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
62393472
)
e1
:
SetCondition
(
c62393472
.
spcon1
)
e1
:
SetTarget
(
c62393472
.
sptg1
)
e1
:
SetOperation
(
c62393472
.
spop1
)
c
:
RegisterEffect
(
e1
)
--spsummon2
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
62393472
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
+
TIMING_BATTLE_END
)
e2
:
SetCountLimit
(
1
,
62393473
)
e2
:
SetCondition
(
c62393472
.
spcon2
)
e2
:
SetCost
(
c62393472
.
spcost2
)
e2
:
SetTarget
(
c62393472
.
sptg2
)
e2
:
SetOperation
(
c62393472
.
spop2
)
c
:
RegisterEffect
(
e2
)
end
function
c62393472
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
c62393472
.
spfilter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x131
)
and
c
:
IsLevelBelow
(
8
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
and
not
c
:
IsCode
(
62393472
)
end
function
c62393472
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c62393472
.
spfilter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c62393472
.
spfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c62393472
.
spfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c62393472
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c62393472
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c62393472
.
spcost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsReleasable
()
end
Duel
.
Release
(
c
,
REASON_COST
)
end
function
c62393472
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsCode
(
99792080
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c62393472
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c62393472
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c62393472
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c62393472
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
c65749035.lua
View file @
8b7791e8
--氷結界の龍 グングニール
function
c65749035
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsAttribute
,
ATTRIBUTE_WATER
),
1
)
c
:
EnableReviveLimit
()
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
65749035
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c65749035
.
cost
)
e1
:
SetTarget
(
c65749035
.
target
)
e1
:
SetOperation
(
c65749035
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c65749035
.
costfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsDiscardable
()
and
c
:
IsAbleToGraveAsCost
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c65749035
.
fselect
(
g
)
return
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
<=
1
end
function
c65749035
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65749035
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
rt
=
Duel
.
GetTargetCount
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
rt
>
2
then
rt
=
2
end
local
g
=
Duel
.
GetMatchingGroup
(
c65749035
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
cg
=
g
:
SelectSubGroup
(
tp
,
c65749035
.
fselect
,
false
,
1
,
rt
)
e
:
SetLabel
(
cg
:
GetCount
())
local
tc
=
cg
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
):
GetFirst
()
if
tc
then
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
cg
:
RemoveCard
(
tc
)
end
Duel
.
SendtoGrave
(
cg
,
REASON_COST
+
REASON_DISCARD
)
end
function
c65749035
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
ct
=
e
:
GetLabel
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
eg
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
ct
,
ct
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
ct
,
0
,
0
)
end
function
c65749035
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
rg
=
tg
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
rg
:
GetCount
()
>
0
then
Duel
.
Destroy
(
rg
,
REASON_EFFECT
)
end
end
--氷結界の龍 グングニール
function
c65749035
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsAttribute
,
ATTRIBUTE_WATER
),
1
)
c
:
EnableReviveLimit
()
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
65749035
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c65749035
.
cost
)
e1
:
SetTarget
(
c65749035
.
target
)
e1
:
SetOperation
(
c65749035
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c65749035
.
costfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsDiscardable
()
and
c
:
IsAbleToGraveAsCost
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c65749035
.
fselect
(
g
)
return
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
<=
1
end
function
c65749035
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65749035
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
rt
=
Duel
.
GetTargetCount
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
rt
>
2
then
rt
=
2
end
local
g
=
Duel
.
GetMatchingGroup
(
c65749035
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
cg
=
g
:
SelectSubGroup
(
tp
,
c65749035
.
fselect
,
false
,
1
,
rt
)
e
:
SetLabel
(
cg
:
GetCount
())
local
tc
=
cg
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
):
GetFirst
()
if
tc
then
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
cg
:
RemoveCard
(
tc
)
end
Duel
.
SendtoGrave
(
cg
,
REASON_COST
+
REASON_DISCARD
)
end
function
c65749035
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
ct
=
e
:
GetLabel
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
eg
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
ct
,
ct
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
ct
,
0
,
0
)
end
function
c65749035
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
rg
=
tg
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
rg
:
GetCount
()
>
0
then
Duel
.
Destroy
(
rg
,
REASON_EFFECT
)
end
end
c73061465.lua
View file @
8b7791e8
--氷結界の封魔団
function
c73061465
.
initial_effect
(
c
)
--act limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
73061465
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c73061465
.
cost
)
e1
:
SetOperation
(
c73061465
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c73061465
.
cfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c73061465
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c73061465
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c73061465
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
if
te
then
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
end
function
c73061465
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
1
,
1
)
e1
:
SetValue
(
c73061465
.
tgval
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
,
3
)
c
:
RegisterEffect
(
e1
)
end
function
c73061465
.
tgval
(
e
,
re
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
--氷結界の封魔団
function
c73061465
.
initial_effect
(
c
)
--act limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
73061465
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c73061465
.
cost
)
e1
:
SetOperation
(
c73061465
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c73061465
.
cfilter
(
c
,
e
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
else
return
e
:
GetHandler
():
IsSetCard
(
0x2f
)
and
c
:
IsAbleToRemove
()
and
c
:
IsHasEffect
(
18319762
,
tp
)
end
end
function
c73061465
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c73061465
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c73061465
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
local
te
=
tc
:
IsHasEffect
(
18319762
,
tp
)
if
te
then
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
end
function
c73061465
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
1
,
1
)
e1
:
SetValue
(
c73061465
.
tgval
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
,
3
)
c
:
RegisterEffect
(
e1
)
end
function
c73061465
.
tgval
(
e
,
re
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
c74665651.lua
View file @
8b7791e8
--聖光の夢魔鏡
function
c74665651
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
1050355
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
74665651
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
,
74665651
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c74665651
.
acttg
)
e2
:
SetOperation
(
c74665651
.
actop
)
c
:
RegisterEffect
(
e2
)
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e3
:
SetCondition
(
c74665651
.
limcon
)
e3
:
SetValue
(
c74665651
.
atlimit
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetCondition
(
c74665651
.
limcon
)
e4
:
SetTarget
(
c74665651
.
tglimit
)
e4
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e4
)
end
function
c74665651
.
actfilter
(
c
,
tp
)
return
c
:
IsCode
(
1050355
)
and
c
:
GetActivateEffect
()
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
end
function
c74665651
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c74665651
.
actfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
end
function
c74665651
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c74665651
.
actfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_FZONE
,
0
)
if
fc
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
end
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
end
end
function
c74665651
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
c74665651
.
limcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c74665651
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c74665651
.
limfilter
(
c
,
lv
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
c
:
GetLevel
()
>
lv
end
function
c74665651
.
atlimit
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
Duel
.
IsExistingMatchingCard
(
c74665651
.
limfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
c
:
GetLevel
())
end
function
c74665651
.
tglimit
(
e
,
c
)
return
c
:
IsSetCard
(
0x131
)
and
Duel
.
IsExistingMatchingCard
(
c74665651
.
limfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
c
:
GetLevel
())
end
--聖光の夢魔鏡
function
c74665651
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
1050355
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--activate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
74665651
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
,
74665651
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c74665651
.
acttg
)
e2
:
SetOperation
(
c74665651
.
actop
)
c
:
RegisterEffect
(
e2
)
--cannot be target
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e3
:
SetCondition
(
c74665651
.
limcon
)
e3
:
SetValue
(
c74665651
.
atlimit
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e4
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetCondition
(
c74665651
.
limcon
)
e4
:
SetTarget
(
c74665651
.
tglimit
)
e4
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e4
)
end
function
c74665651
.
actfilter
(
c
,
tp
)
return
c
:
IsCode
(
1050355
)
and
c
:
GetActivateEffect
()
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
end
function
c74665651
.
acttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c74665651
.
actfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
end
function
c74665651
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c74665651
.
actfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_FZONE
,
0
)
if
fc
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
end
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
true
)
local
te
=
tc
:
GetActivateEffect
()
te
:
UseCountLimit
(
tp
,
1
,
true
)
local
tep
=
tc
:
GetControler
()
local
cost
=
te
:
GetCost
()
if
cost
then
cost
(
te
,
tep
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RaiseEvent
(
tc
,
4179255
,
te
,
0
,
tp
,
tp
,
Duel
.
GetCurrentChain
())
end
end
function
c74665651
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
c74665651
.
limcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c74665651
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c74665651
.
limfilter
(
c
,
lv
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
c
:
GetLevel
()
>
lv
end
function
c74665651
.
atlimit
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x131
)
and
Duel
.
IsExistingMatchingCard
(
c74665651
.
limfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
c
:
GetLevel
())
end
function
c74665651
.
tglimit
(
e
,
c
)
return
c
:
IsSetCard
(
0x131
)
and
Duel
.
IsExistingMatchingCard
(
c74665651
.
limfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
c
:
GetLevel
())
end
c75888208.lua
View file @
8b7791e8
--夢魔鏡の夢魔-イケロス
function
c75888208
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
75888208
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
75888208
)
e1
:
SetCondition
(
c75888208
.
spcon1
)
e1
:
SetTarget
(
c75888208
.
sptg1
)
e1
:
SetOperation
(
c75888208
.
spop1
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
75888208
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
75888209
)
e2
:
SetCondition
(
c75888208
.
spcon2
)
e2
:
SetCost
(
c75888208
.
spcost2
)
e2
:
SetTarget
(
c75888208
.
sptg2
)
e2
:
SetOperation
(
c75888208
.
spop2
)
c
:
RegisterEffect
(
e2
)
end
function
c75888208
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
c75888208
.
spfilter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x131
)
and
not
c
:
IsCode
(
75888208
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c75888208
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c75888208
.
spfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c75888208
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c75888208
.
spfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c75888208
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c75888208
.
spcost2
(
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
c75888208
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsCode
(
49389190
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c75888208
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c75888208
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c75888208
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c75888208
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
--夢魔鏡の夢魔-イケロス
function
c75888208
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
75888208
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
+
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
75888208
)
e1
:
SetCondition
(
c75888208
.
spcon1
)
e1
:
SetTarget
(
c75888208
.
sptg1
)
e1
:
SetOperation
(
c75888208
.
spop1
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
75888208
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_MAIN_END
+
TIMING_BATTLE_START
+
TIMING_BATTLE_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
75888209
)
e2
:
SetCondition
(
c75888208
.
spcon2
)
e2
:
SetCost
(
c75888208
.
spcost2
)
e2
:
SetTarget
(
c75888208
.
sptg2
)
e2
:
SetOperation
(
c75888208
.
spop2
)
c
:
RegisterEffect
(
e2
)
end
function
c75888208
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
c75888208
.
spfilter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x131
)
and
not
c
:
IsCode
(
75888208
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c75888208
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c75888208
.
spfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c75888208
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c75888208
.
spfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c75888208
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c75888208
.
spcost2
(
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
c75888208
.
spfilter2
(
c
,
e
,
tp
)
return
c
:
IsCode
(
49389190
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c75888208
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c75888208
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c75888208
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c75888208
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
c98570539.lua
View file @
8b7791e8
--混沌の夢魔鏡
function
c98570539
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
98570539
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c98570539
.
target
)
e1
:
SetOperation
(
c98570539
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c98570539
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c98570539
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
end
function
c98570539
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x131
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c98570539
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsOnField
,
nil
)
local
mg2
=
nil
if
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
then
mg2
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
mg1
:
Merge
(
mg2
)
end
if
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
then
mg2
=
Duel
.
GetMatchingGroup
(
c98570539
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
end
local
res
=
Duel
.
IsExistingMatchingCard
(
c98570539
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c98570539
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
0
,
tp
,
LOCATION_GRAVE
)
end
function
c98570539
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsOnField
,
nil
):
Filter
(
c98570539
.
filter1
,
nil
,
e
)
local
mg2
=
nil
if
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
then
mg2
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
mg1
:
Merge
(
mg2
)
end
if
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
then
mg2
=
Duel
.
GetMatchingGroup
(
c98570539
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
end
local
sg1
=
Duel
.
GetMatchingGroup
(
c98570539
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c98570539
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
local
mat2
=
mat1
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
mat1
:
Sub
(
mat2
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
Remove
(
mat2
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
--混沌の夢魔鏡
function
c98570539
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
,
1050355
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
98570539
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c98570539
.
target
)
e1
:
SetOperation
(
c98570539
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c98570539
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c98570539
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
end
function
c98570539
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x131
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c98570539
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsOnField
,
nil
)
local
mg2
=
nil
if
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
then
mg2
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
mg1
:
Merge
(
mg2
)
end
if
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
then
mg2
=
Duel
.
GetMatchingGroup
(
c98570539
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
end
local
res
=
Duel
.
IsExistingMatchingCard
(
c98570539
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c98570539
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
0
,
tp
,
LOCATION_GRAVE
)
end
function
c98570539
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsOnField
,
nil
):
Filter
(
c98570539
.
filter1
,
nil
,
e
)
local
mg2
=
nil
if
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
then
mg2
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
mg1
:
Merge
(
mg2
)
end
if
Duel
.
IsEnvironment
(
1050355
,
PLAYER_ALL
,
LOCATION_FZONE
)
then
mg2
=
Duel
.
GetMatchingGroup
(
c98570539
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
end
local
sg1
=
Duel
.
GetMatchingGroup
(
c98570539
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c98570539
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
local
mat2
=
mat1
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
mat1
:
Sub
(
mat2
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
Remove
(
mat2
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
c99792080.lua
View file @
8b7791e8
--夢魔鏡の魔獣-パンタス
function
c99792080
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
)
--direct attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99792080
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
99792080
)
e1
:
SetCondition
(
c99792080
.
dircon
)
e1
:
SetOperation
(
c99792080
.
dirop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99792080
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
+
TIMING_BATTLE_END
)
e2
:
SetCountLimit
(
1
,
99792081
)
e2
:
SetCondition
(
c99792080
.
spcon
)
e2
:
SetCost
(
c99792080
.
spcost
)
e2
:
SetTarget
(
c99792080
.
sptg
)
e2
:
SetOperation
(
c99792080
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c99792080
.
dircon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
aux
.
bpcon
()
end
function
c99792080
.
dirop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
c99792080
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c99792080
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsReleasable
()
end
Duel
.
Release
(
c
,
REASON_COST
)
end
function
c99792080
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
62393472
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99792080
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c99792080
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c99792080
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99792080
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
--夢魔鏡の魔獣-パンタス
function
c99792080
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
74665651
)
--direct attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99792080
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
99792080
)
e1
:
SetCondition
(
c99792080
.
dircon
)
e1
:
SetOperation
(
c99792080
.
dirop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99792080
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
+
TIMING_BATTLE_END
)
e2
:
SetCountLimit
(
1
,
99792081
)
e2
:
SetCondition
(
c99792080
.
spcon
)
e2
:
SetCost
(
c99792080
.
spcost
)
e2
:
SetTarget
(
c99792080
.
sptg
)
e2
:
SetOperation
(
c99792080
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
c99792080
.
dircon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
GetHandler
():
IsSetCard
(
0x131
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
aux
.
bpcon
()
end
function
c99792080
.
dirop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
c99792080
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
)
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsEnvironment
(
74665651
,
PLAYER_ALL
,
LOCATION_FZONE
)
end
function
c99792080
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsReleasable
()
end
Duel
.
Release
(
c
,
REASON_COST
)
end
function
c99792080
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
62393472
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c99792080
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
c99792080
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c99792080
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99792080
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment