Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
cfef0aad
Commit
cfef0aad
authored
Oct 19, 2023
by
songtongtong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
bb9b7776
Pipeline
#23784
passed with stages
in 25 minutes and 53 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
300 additions
and
301 deletions
+300
-301
expansions/script/c16172005.lua
expansions/script/c16172005.lua
+4
-5
expansions/script/c47350505.lua
expansions/script/c47350505.lua
+41
-41
expansions/script/c47350509.lua
expansions/script/c47350509.lua
+119
-119
expansions/script/c47350510.lua
expansions/script/c47350510.lua
+136
-136
No files found.
expansions/script/c16172005.lua
View file @
cfef0aad
...
@@ -78,11 +78,10 @@ function cm.thcheck(c)
...
@@ -78,11 +78,10 @@ function cm.thcheck(c)
end
end
function
cm
.
activate
(
e
,
tp
)
function
cm
.
activate
(
e
,
tp
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
thcheck
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
if
Duel
.
IsExistingMatchingCard
(
cm
.
thcheck
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thcheck
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thcheck
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tg
,
tp
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
tg
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
end
end
end
function
cm
.
check
(
c
)
function
cm
.
check
(
c
)
...
...
expansions/script/c47350505.lua
View file @
cfef0aad
--迷镜魇 征服
--迷镜魇 征服
Duel
.
LoadScript
(
"c47350500.lua"
)
Duel
.
LoadScript
(
"c47350500.lua"
)
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
function
s
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
,
tp
,
0
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
,
tp
,
0
)
end
if
chk
==
0
then
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
return
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
,
0
)
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
,
0
)
end
end
function
s
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
and
tc
:
IsCanTurnSet
()
if
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
and
Duel
.
MoveToField
(
tc
,
tp
,
tc
:
GetOwner
(),
LOCATION_SZONE
,
POS_FACEDOWN
,
true
)
then
and
Duel
.
MoveToField
(
tc
,
tp
,
tc
:
GetOwner
(),
LOCATION_SZONE
,
POS_FACEDOWN
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_TRAP
)
e1
:
SetValue
(
TYPE_TRAP
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
tc
,
EVENT_SSET
,
e
,
REASON_EFFECT
,
tc
:
GetOwner
(),
nil
,
0
)
Duel
.
RaiseEvent
(
tc
,
EVENT_SSET
,
e
,
REASON_EFFECT
,
tc
:
GetOwner
(),
nil
,
0
)
end
end
end
end
function
s
.
filter
(
c
,
tp
)
function
s
.
filter
(
c
,
tp
)
local
r
=
LOCATION_REASON_TOFIELD
local
r
=
LOCATION_REASON_TOFIELD
if
not
c
:
IsControler
(
c
:
GetOwner
())
then
r
=
LOCATION_REASON_CONTROL
end
if
not
c
:
IsControler
(
c
:
GetOwner
())
then
r
=
LOCATION_REASON_CONTROL
end
return
c
:
IsFaceup
()
and
Duel
.
GetLocationCount
(
c
:
GetOwner
(),
LOCATION_SZONE
,
tp
,
r
)
>
0
return
c
:
IsFaceup
()
and
Duel
.
GetLocationCount
(
c
:
GetOwner
(),
LOCATION_SZONE
,
tp
,
r
)
>
0
end
end
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
LIM
.
lim_eff
(
c
,
id
)
LIM
.
lim_eff
(
c
,
id
)
local
e1
=
LIM
.
eff2
(
c
,
id
)
local
e1
=
LIM
.
eff2
(
c
,
id
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
s
.
tg
)
e1
:
SetTarget
(
s
.
tg
)
e1
:
SetOperation
(
s
.
op
)
e1
:
SetOperation
(
s
.
op
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
expansions/script/c47350509.lua
View file @
cfef0aad
--夺魂迷镜魇
--夺魂迷镜魇
Duel
.
LoadScript
(
"c47350500.lua"
)
Duel
.
LoadScript
(
"c47350500.lua"
)
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
function
s
.
confirm
(
c
)
function
s
.
confirm
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47350500
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
47350500
,
1
))
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
s
.
cftg
)
e1
:
SetTarget
(
s
.
cftg
)
e1
:
SetOperation
(
s
.
cfop
)
e1
:
SetOperation
(
s
.
cfop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
end
end
function
s
.
cffilter
(
c
)
function
s
.
cffilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsLevel
(
3
)
and
c
:
IsAbleToGrave
()
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsLevel
(
3
)
and
c
:
IsAbleToGrave
()
end
end
function
s
.
limit
(
c
)
function
s
.
limit
(
c
)
return
function
(
e
,
lp
,
tp
)
return
function
(
e
,
lp
,
tp
)
return
e
:
GetHandler
()
~=
c
return
e
:
GetHandler
()
~=
c
end
end
end
end
function
s
.
cftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
cftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsFacedown
()
end
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsFacedown
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEDOWN
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEDOWN
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFacedown
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetChainLimit
(
s
.
limit
(
g
:
GetFirst
()))
Duel
.
SetChainLimit
(
s
.
limit
(
g
:
GetFirst
()))
end
end
function
s
.
cfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
cfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFacedown
()
and
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsFacedown
()
and
tc
:
IsRelateToEffect
(
e
)
then
LIM
.
confirm
(
tp
,
tc
)
LIM
.
confirm
(
tp
,
tc
)
local
ct
=
tc
:
GetOriginalType
()
local
ct
=
tc
:
GetOriginalType
()
if
ct
&
TYPE_MONSTER
~=
0
then
if
ct
&
TYPE_MONSTER
~=
0
then
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
elseif
ct
&
(
TYPE_SPELL
+
TYPE_TRAP
)
~=
0
and
tc
:
IsAbleToHand
()
then
elseif
ct
&
(
TYPE_SPELL
+
TYPE_TRAP
)
~=
0
and
tc
:
IsAbleToHand
()
then
if
Duel
.
SendtoHand
(
tc
,
tp
,
REASON_EFFECT
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
aux
.
Stringid
(
id
,
0
))
then
if
Duel
.
SendtoHand
(
tc
,
tp
,
REASON_EFFECT
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
aux
.
Stringid
(
id
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSSetable
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSSetable
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SSet
(
tp
,
g
,
tp
,
true
)
Duel
.
SSet
(
tp
,
g
,
tp
,
true
)
LIM
.
confirm
(
tp
,
tc
)
LIM
.
confirm
(
tp
,
tc
)
end
end
end
end
end
end
end
end
function
s
.
ind
(
c
)
function
s
.
ind
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetTarget
(
s
.
indtg
)
e1
:
SetTarget
(
s
.
indtg
)
e1
:
SetValue
(
aux
.
indoval
)
e1
:
SetValue
(
aux
.
indoval
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
indtg
(
e
,
c
)
function
s
.
indtg
(
e
,
c
)
return
c
:
IsFacedown
()
return
c
:
IsFacedown
()
end
end
function
s
.
set
(
c
)
function
s
.
set
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
setcon
)
e1
:
SetCondition
(
s
.
setcon
)
e1
:
SetTarget
(
s
.
settg
)
e1
:
SetTarget
(
s
.
settg
)
e1
:
SetOperation
(
s
.
setop
)
e1
:
SetOperation
(
s
.
setop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
~=
c
and
rc
:
IsSetCard
(
0x43c
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
~=
c
and
rc
:
IsSetCard
(
0x43c
)
end
end
function
s
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
end
end
function
s
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
then
return
end
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
#
g
>
0
then
if
#
g
>
0
then
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
:
IsType
(
TYPE_SPELL
)
or
tc
:
IsType
(
TYPE_TRAP
)
then
if
tc
:
IsType
(
TYPE_SPELL
)
or
tc
:
IsType
(
TYPE_TRAP
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
elseif
tc
:
IsType
(
TYPE_MONSTER
)
then
elseif
tc
:
IsType
(
TYPE_MONSTER
)
then
if
Duel
.
MoveToField
(
tc
,
tp
,
tc
:
GetOwner
(),
LOCATION_SZONE
,
POS_FACEDOWN
,
true
)
then
if
not
tc
:
IsImmuneToEffect
(
e
)
and
Duel
.
MoveToField
(
tc
,
tp
,
tc
:
GetOwner
(),
LOCATION_SZONE
,
POS_FACEDOWN
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_TRAP
)
e1
:
SetValue
(
TYPE_TRAP
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
Duel
.
RaiseEvent
(
tc
,
EVENT_SSET
,
e
,
REASON_EFFECT
,
tc
:
GetOwner
(),
nil
,
0
)
Duel
.
RaiseEvent
(
tc
,
EVENT_SSET
,
e
,
REASON_EFFECT
,
tc
:
GetOwner
(),
nil
,
0
)
end
end
end
end
end
end
end
end
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x43c
),
s
.
fmatfilter
,
true
)
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x43c
),
s
.
fmatfilter
,
true
)
s
.
confirm
(
c
)
s
.
confirm
(
c
)
s
.
ind
(
c
)
s
.
ind
(
c
)
s
.
set
(
c
)
s
.
set
(
c
)
end
end
function
s
.
fmatfilter
(
c
)
function
s
.
fmatfilter
(
c
)
return
c
:
IsLevel
(
3
)
and
c
:
IsFusionType
(
TYPE_MONSTER
)
return
c
:
IsLevel
(
3
)
and
c
:
IsFusionType
(
TYPE_MONSTER
)
end
end
\ No newline at end of file
expansions/script/c47350510.lua
View file @
cfef0aad
--夺躯迷镜魇
--夺躯迷镜魇
Duel
.
LoadScript
(
"c47350500.lua"
)
Duel
.
LoadScript
(
"c47350500.lua"
)
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
function
s
.
dis
(
c
)
function
s
.
dis
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
discon
)
e1
:
SetCondition
(
s
.
discon
)
e1
:
SetTarget
(
s
.
distg
)
e1
:
SetTarget
(
s
.
distg
)
e1
:
SetOperation
(
s
.
disop
)
e1
:
SetOperation
(
s
.
disop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
==
1
-
tp
return
rp
==
1
-
tp
end
end
function
s
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
confilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
confilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
end
end
function
s
.
confilter
(
c
)
function
s
.
confilter
(
c
)
return
(
c
:
IsFacedown
()
and
c
:
IsLocation
(
LOCATION_ONFIELD
))
or
(
not
c
:
IsPublic
()
and
c
:
IsLocation
(
LOCATION_HAND
))
return
(
c
:
IsFacedown
()
and
c
:
IsLocation
(
LOCATION_ONFIELD
))
or
(
not
c
:
IsPublic
()
and
c
:
IsLocation
(
LOCATION_HAND
))
end
end
function
s
.
setfilter
(
c
)
function
s
.
setfilter
(
c
)
return
c
:
IsSetCard
(
0x43c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSSetable
()
return
c
:
IsSetCard
(
0x43c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSSetable
()
end
end
function
s
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
IsExistingMatchingCard
(
s
.
confilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
LOCATION_ONFIELD
,
1
,
nil
)
then
return
end
if
not
Duel
.
IsExistingMatchingCard
(
s
.
confilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
LOCATION_ONFIELD
,
1
,
nil
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
confilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
confilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
#
g
>
0
then
if
#
g
>
0
then
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
local
ct
=
tc
:
GetOriginalType
()
local
ct
=
tc
:
GetOriginalType
()
if
tc
:
IsLocation
(
LOCATION_HAND
)
then
if
tc
:
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
elseif
tc
:
IsLocation
(
LOCATION_ONFIELD
)
then
elseif
tc
:
IsLocation
(
LOCATION_ONFIELD
)
then
LIM
.
confirm
(
tp
,
tc
)
LIM
.
confirm
(
tp
,
tc
)
end
end
local
ec
=
eg
:
GetFirst
()
local
ec
=
eg
:
GetFirst
()
if
ct
&
ec
:
GetType
()
&
0x7
~=
0
then
if
ct
&
ec
:
GetType
()
&
0x7
~=
0
then
Duel
.
NegateEffect
(
ev
)
Duel
.
NegateEffect
(
ev
)
elseif
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
setfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
elseif
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
setfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
setfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
setfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SSet
(
tp
,
sg
)
Duel
.
SSet
(
tp
,
sg
)
end
end
end
end
end
end
function
s
.
tograve
(
c
)
function
s
.
tograve
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_MSET
)
e1
:
SetCode
(
EVENT_MSET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
id
-
1000
)
e1
:
SetCountLimit
(
1
,
id
-
1000
)
e1
:
SetTarget
(
s
.
tgtg
)
e1
:
SetTarget
(
s
.
tgtg
)
e1
:
SetOperation
(
s
.
tgop
)
e1
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e4
=
e1
:
Clone
()
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EVENT_SSET
)
e4
:
SetCode
(
EVENT_SSET
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_CHANGE_POS
)
e2
:
SetCode
(
EVENT_CHANGE_POS
)
e2
:
SetCondition
(
s
.
tgcon
)
e2
:
SetCondition
(
s
.
tgcon
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCondition
(
s
.
tgcon
)
e3
:
SetCondition
(
s
.
tgcon
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsFacedown
,
1
,
nil
)
return
eg
:
IsExists
(
Card
.
IsFacedown
,
1
,
nil
)
end
end
function
s
.
tgfilter
(
c
)
function
s
.
tgfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsFacedown
()
and
c
:
IsAbleToGrave
()
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsFacedown
()
and
c
:
IsAbleToGrave
()
end
end
function
s
.
tgfilter2
(
c
)
function
s
.
tgfilter2
(
c
)
return
c
:
IsSetCard
(
0x43c
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToGrave
()
return
c
:
IsSetCard
(
0x43c
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToGrave
()
end
end
function
s
.
ckfilter
(
c
)
function
s
.
ckfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEDOWN
)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEDOWN
)
end
end
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
eg
:
IsExists
(
s
.
tgfilter
,
1
,
nil
)
end
if
chk
==
0
then
return
eg
:
IsExists
(
s
.
tgfilter
,
1
,
nil
)
end
end
end
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
eg
:
IsExists
(
s
.
tgfilter
,
1
,
nil
)
then
return
end
if
not
eg
:
IsExists
(
s
.
tgfilter
,
1
,
nil
)
then
return
end
local
tg
=
eg
:
Filter
(
s
.
tgfilter
,
nil
)
local
tg
=
eg
:
Filter
(
s
.
tgfilter
,
nil
)
if
#
tg
>
0
then
if
#
tg
>
0
then
if
Duel
.
SendtoGrave
(
tg
,
REASON_EFFECT
)
>
0
then
if
Duel
.
SendtoGrave
(
tg
,
REASON_EFFECT
)
>
0
then
local
rg
=
tg
:
Filter
(
s
.
ckfilter
,
nil
)
local
rg
=
tg
:
Filter
(
s
.
ckfilter
,
nil
)
if
#
rg
>
0
then
if
#
rg
>
0
then
if
rg
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_MONSTER
)
then
if
rg
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_MONSTER
)
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetCondition
(
s
.
atcon
)
e1
:
SetCondition
(
s
.
atcon
)
e1
:
SetOperation
(
s
.
atop
)
e1
:
SetOperation
(
s
.
atop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
if
rg
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
then
if
rg
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tgfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tgfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
if
#
g
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
end
end
end
end
end
end
end
end
end
end
function
s
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
aux
.
bdocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
e
:
GetHandler
():
IsChainAttackable
()
return
aux
.
bdocon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
e
:
GetHandler
():
IsChainAttackable
()
end
end
function
s
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChainAttack
(
e
:
GetHandler
())
Duel
.
ChainAttack
(
)
end
end
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x43c
),
s
.
fmatfilter
,
true
)
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x43c
),
s
.
fmatfilter
,
true
)
s
.
dis
(
c
)
s
.
dis
(
c
)
s
.
tograve
(
c
)
s
.
tograve
(
c
)
end
end
function
s
.
fmatfilter
(
c
)
function
s
.
fmatfilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
Is
Type
(
TYPE_MONSTER
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
Is
FusionType
(
TYPE_MONSTER
)
end
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment