Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Nemo Ma
no81cards
Commits
6e232437
Commit
6e232437
authored
May 22, 2025
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d8257545
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
243 additions
and
267 deletions
+243
-267
expansions/script/c28381214.lua
expansions/script/c28381214.lua
+14
-23
expansions/script/c93050100.lua
expansions/script/c93050100.lua
+30
-31
expansions/script/c93050101.lua
expansions/script/c93050101.lua
+31
-32
expansions/script/c93050102.lua
expansions/script/c93050102.lua
+30
-30
expansions/script/c93050103.lua
expansions/script/c93050103.lua
+29
-30
expansions/script/c93050104.lua
expansions/script/c93050104.lua
+44
-52
expansions/script/c93050105.lua
expansions/script/c93050105.lua
+2
-2
expansions/script/c93050106.lua
expansions/script/c93050106.lua
+23
-24
expansions/script/c93050107.lua
expansions/script/c93050107.lua
+24
-24
expansions/script/c93050108.lua
expansions/script/c93050108.lua
+16
-19
No files found.
expansions/script/c28381214.lua
View file @
6e232437
...
...
@@ -48,7 +48,7 @@ function c28381214.thop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c28381214
.
thfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
)
if
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
==
0
then
return
end
if
#
tg
~=
2
or
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
==
0
then
return
end
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
end
local
b1
=
Duel
.
IsExistingMatchingCard
(
c28381214
.
chkfilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
nil
,
0x284
)
...
...
@@ -57,49 +57,40 @@ function c28381214.thop(e,tp,eg,ep,ev,re,r,rp)
local
b3
=
Duel
.
IsExistingMatchingCard
(
c28381214
.
chkfilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
nil
,
0x286
)
and
Duel
.
IsExistingMatchingCard
(
c28381214
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
local
b4
=
Duel
.
IsExistingMatchingCard
(
c28381214
.
chkfilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
nil
,
0x287
)
local
b5
=
true
if
not
(
b1
or
b2
or
b3
or
b4
)
then
return
end
local
op
=
aux
.
SelectFromOptions
(
tp
,
{
b1
,
aux
.
Stringid
(
28381214
,
0
)},
{
b2
,
aux
.
Stringid
(
28381214
,
1
)},
{
b3
,
aux
.
Stringid
(
28381214
,
2
)},
{
b4
,
aux
.
Stringid
(
28381214
,
3
)},
{
b5
,
aux
.
Stringid
(
28381214
,
4
)})
if
op
~=
5
then
Duel
.
BreakEffect
()
Duel
.
ShuffleHand
(
tp
)
end
{
true
,
aux
.
Stringid
(
28381214
,
4
)})
if
op
~=
5
then
c28381214
.
confirm
(
tp
,
op
)
end
if
op
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c28381214
.
chkfilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
,
0x284
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c28381214
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
tg
>
0
then
Duel
.
SendtoGrave
(
tg
,
REASON_EFFECT
)
end
elseif
op
==
2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c28381214
.
chkfilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
,
0x285
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
BreakEffect
()
Duel
.
Damage
(
tp
,
1000
,
REASON_EFFECT
,
true
)
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
,
true
)
Duel
.
RDComplete
()
elseif
op
==
3
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c28381214
.
chkfilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
,
0x286
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
BreakEffect
()
Duel
.
ShuffleHand
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c28381214
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
#
sg
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
elseif
op
==
4
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c28381214
.
chkfilter
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,
nil
,
0x287
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
BreakEffect
()
Duel
.
Recover
(
tp
,
1000
,
REASON_EFFECT
)
end
Duel
.
ShuffleHand
(
tp
)
end
function
c28381214
.
confirm
(
tp
,
op
)
Duel
.
ShuffleHand
(
tp
)
local
code
=
op
==
1
and
0x284
or
op
==
2
and
0x285
or
op
==
3
and
0x286
or
op
==
4
and
0x287
local
g
=
Duel
.
GetMatchingGroup
(
c28381214
.
chkfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
code
)
if
#
g
>
2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
g
=
g
:
Select
(
tp
,
2
,
2
,
nil
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
expansions/script/c93050100.lua
View file @
6e232437
local
s
,
id
=
GetID
()
--寄生兽 Ⅰ型
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
...
...
@@ -23,60 +24,58 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
if
c
:
IsLocation
(
LOCATION_HAND
)
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
else
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
local
b1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
local
b2
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
if
chk
==
0
then
return
b1
or
b2
end
if
c
:
IsLocation
(
LOCATION_HAND
)
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
else
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
elseif
c
:
IsLocation
(
LOCATION_SZONE
)
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsLocation
(
LOCATION_HAND
)
then
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
Duel
.
Equip
(
tp
,
c
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
function
(
e
,
c
)
return
c
==
tc
end
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetValue
(
s
.
eqlimit
)
c
:
RegisterEffect
(
e1
)
elseif
c
:
IsLocation
(
LOCATION_SZONE
)
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
s
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0xcf1
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
id
)
end
expansions/script/c93050101.lua
View file @
6e232437
local
s
,
id
=
GetID
()
--寄生兽 Ⅱ型
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
...
...
@@ -19,60 +20,58 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
if
c
:
IsLocation
(
LOCATION_HAND
)
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
else
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
local
b1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
local
b2
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
if
chk
==
0
then
return
b1
or
b2
end
if
c
:
IsLocation
(
LOCATION_HAND
)
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
else
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
elseif
c
:
IsLocation
(
LOCATION_SZONE
)
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsLocation
(
LOCATION_HAND
)
then
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
Duel
.
Equip
(
tp
,
c
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
function
(
e
,
c
)
return
c
==
tc
end
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetValue
(
s
.
eqlimit
)
c
:
RegisterEffect
(
e1
)
elseif
c
:
IsLocation
(
LOCATION_SZONE
)
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
s
.
thfilter
(
c
)
return
c
:
Is
SetCard
(
0xcf1
)
and
c
:
IsAbleToHand
()
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
)
return
c
:
Is
Type
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0xcf1
)
and
c
:
IsAbleToHand
(
)
end
expansions/script/c93050102.lua
View file @
6e232437
local
s
,
id
=
GetID
()
--寄生兽 Ⅲ型
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
...
...
@@ -19,59 +20,58 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
if
c
:
IsLocation
(
LOCATION_HAND
)
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
else
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
local
b1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
local
b2
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
if
chk
==
0
then
return
b1
or
b2
end
if
c
:
IsLocation
(
LOCATION_HAND
)
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
else
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
elseif
c
:
IsLocation
(
LOCATION_SZONE
)
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
end
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsLocation
(
LOCATION_HAND
)
then
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
Duel
.
Equip
(
tp
,
c
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
function
(
e
,
c
)
return
c
==
tc
end
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetValue
(
s
.
eqlimit
)
c
:
RegisterEffect
(
e1
)
elseif
c
:
IsLocation
(
LOCATION_SZONE
)
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
end
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
s
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0xcf1
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
id
)
end
expansions/script/c93050103.lua
View file @
6e232437
local
s
,
id
=
GetID
()
--寄生兽 Ⅳ型
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
...
...
@@ -30,59 +31,57 @@ function s.epcon(e,tp,eg,ep,ev,re,r,rp)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
if
c
:
IsLocation
(
LOCATION_HAND
)
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
else
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
local
b1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
local
b2
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
if
chk
==
0
then
return
b1
or
b2
end
if
c
:
IsLocation
(
LOCATION_HAND
)
then
e
:
SetCategory
(
CATEGORY_EQUIP
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
else
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
elseif
c
:
IsLocation
(
LOCATION_SZONE
)
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
0
,
0
,
0
)
end
end
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsLocation
(
LOCATION_HAND
)
then
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
return
end
Duel
.
Equip
(
tp
,
c
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
function
(
e
,
c
)
return
c
==
tc
end
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetValue
(
s
.
eqlimit
)
c
:
RegisterEffect
(
e1
)
elseif
c
:
IsLocation
(
LOCATION_SZONE
)
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
sfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
e
,
tp
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
sfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
#
g
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
s
.
sfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
sfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
s
.
sfilter
(
c
,
e
,
tp
)
return
c
:
GetOriginalType
()
&
TYPE_MONSTER
>
0
and
c
:
GetType
()
&
TYPE_EQUIP
+
TYPE_SPELL
==
TYPE_EQUIP
+
TYPE_SPELL
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xcf1
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
expansions/script/c93050104.lua
View file @
6e232437
--
「寄生兽」超量怪兽
local
s
,
id
=
GetID
()
--
寄生兽 ⅴ型
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedure
(
c
,
nil
,
1
,
2
,
nil
,
nil
,
99
)
...
...
@@ -17,7 +17,7 @@ function s.initial_effect(c)
e1
:
SetTarget
(
s
.
eqtg
)
e1
:
SetOperation
(
s
.
eqop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_EQUIP
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
...
...
@@ -25,9 +25,9 @@ function s.initial_effect(c)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
id
+
1000
)
e2
:
SetCost
(
s
.
cost2
)
e2
:
SetTarget
(
s
.
target
2
)
e2
:
SetOperation
(
s
.
operation
2
)
e2
:
SetCost
(
s
.
ep
cost2
)
e2
:
SetTarget
(
s
.
eqtg
2
)
e2
:
SetOperation
(
s
.
eqop
2
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -40,68 +40,60 @@ function s.epcost(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
s
.
eqfilter
(
c
,
tp
)
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
s
.
eqmonsterfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
s
.
eq
monsterfilter
(
c
,
tp
)
function
s
.
eq
filter
(
c
)
return
c
:
IsSetCard
(
0xcf1
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsForbidden
()
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
eqfilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
eqfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
EQUI
P
)
Duel
.
SelectTarget
(
tp
,
s
.
eqfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
FACEU
P
)
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
ec
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
eqmonsterfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
ec
then
if
not
Duel
.
Equip
(
tp
,
ec
,
tc
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
function
(
e
,
c
)
return
c
==
tc
end
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
ec
:
RegisterEffect
(
e1
)
end
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
s
.
eqfilter
),
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
nil
)
if
g
:
GetCount
()
<=
0
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
ec
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Equip
(
tp
,
ec
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetValue
(
s
.
eqlimit
)
ec
:
RegisterEffect
(
e1
)
end
function
s
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
ep
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
2
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
2
,
2
,
REASON_COST
)
end
function
s
.
filter2
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
1
-
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
s
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
s
.
filter2
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
filter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
filter2
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
e
:
GetHandler
(),
1
,
0
,
0
)
function
s
.
eqtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
s
.
operation2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
eqop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
Equip
(
tp
,
c
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
function
(
e
,
c
)
return
c
==
tc
end
)
c
:
RegisterEffect
(
e1
)
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Equip
(
tp
,
c
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetValue
(
s
.
eqlimit
)
c
:
RegisterEffect
(
e1
)
end
function
s
.
eqlimit
(
e
,
c
)
return
e
:
GetOwner
()
==
c
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
s
.
cval
(
e
,
c
)
return
e
:
GetHandlerPlayer
()
...
...
expansions/script/c93050105.lua
View file @
6e232437
--
寄生兽的场地魔法卡
local
s
,
id
=
GetID
()
--
寄生兽的栖息地
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c93050106.lua
View file @
6e232437
--寄生兽的蛰伏
local
s
,
id
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--equip
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -24,37 +24,36 @@ function s.initial_effect(c)
e2
:
SetOperation
(
s
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
eqfilter
(
c
,
tp
)
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
s
.
eqmonsterfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
s
.
eq
monsterfilter
(
c
,
tp
)
function
s
.
eq
filter
(
c
)
return
c
:
IsSetCard
(
0xcf1
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsForbidden
()
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
eqfilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
eqfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
EQUI
P
)
Duel
.
SelectTarget
(
tp
,
s
.
eqfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
FACEU
P
)
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
ec
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
eqmonsterfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
ec
then
if
not
Duel
.
Equip
(
tp
,
ec
,
tc
)
then
return
end
-- Equip Limit
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
function
(
e
,
c
)
return
c
==
tc
end
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
ec
:
RegisterEffect
(
e1
)
end
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
eqfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
<=
0
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
ec
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Equip
(
tp
,
ec
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetValue
(
s
.
eqlimit
)
ec
:
RegisterEffect
(
e1
)
end
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
s
.
tdfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0xcf1
)
and
c
:
IsAbleToDeck
()
...
...
expansions/script/c93050107.lua
View file @
6e232437
local
s
,
id
=
GetID
()
--寄生兽的诞生
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_EQUIP
)
...
...
@@ -23,37 +24,36 @@ function s.initial_effect(c)
e2
:
SetOperation
(
s
.
mtop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
eqfilter
(
c
,
tp
)
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
and
Duel
.
IsExistingMatchingCard
(
s
.
eqmonsterfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
function
s
.
eq
monsterfilter
(
c
,
tp
)
function
s
.
eq
filter
(
c
)
return
c
:
IsSetCard
(
0xcf1
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsForbidden
()
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
eqfilter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
eqfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
EQUI
P
)
Duel
.
SelectTarget
(
tp
,
s
.
eqfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
FACEU
P
)
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
ec
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
eqmonsterfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
ec
then
if
not
Duel
.
Equip
(
tp
,
ec
,
tc
)
then
return
end
-- Equip Limit
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
function
(
e
,
c
)
return
c
==
tc
end
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
ec
:
RegisterEffect
(
e1
)
end
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
s
.
eqfilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
)
if
g
:
GetCount
()
<=
0
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
ec
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Equip
(
tp
,
ec
,
tc
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetValue
(
s
.
eqlimit
)
ec
:
RegisterEffect
(
e1
)
end
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
end
function
s
.
filter1
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0xcf1
)
...
...
expansions/script/c93050108.lua
View file @
6e232437
--寄生兽捕获装置
local
s
,
id
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -30,32 +30,29 @@ function s.spcon(e,c)
return
Duel
.
GetFieldGroupCount
(
c
:
GetControler
(),
LOCATION_MZONE
,
0
)
==
0
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
end
function
s
.
eqfilter
(
c
,
tp
)
function
s
.
eqfilter
(
c
)
return
c
:
IsSetCard
(
0xcf1
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsForbidden
()
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
eqcfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
eqfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
s
.
eqfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
<=
0
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
or
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
eqfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
not
Duel
.
Equip
(
tp
,
tc
,
c
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetLabelObject
(
c
)
e1
:
SetValue
(
s
.
eqlimit
)
tc
:
RegisterEffect
(
e1
)
end
local
ec
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Equip
(
tp
,
ec
,
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
s
.
eqlimit
)
ec
:
RegisterEffect
(
e1
)
end
function
s
.
eqlimit
(
e
,
c
)
return
c
==
e
:
GetLabelObject
()
return
e
:
GetOwner
()
==
c
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