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
44ff25aa
Commit
44ff25aa
authored
May 23, 2025
by
Satty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
562fbd01
Pipeline
#36712
failed with stages
in 21 minutes and 6 seconds
Changes
21
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
275 additions
and
272 deletions
+275
-272
expansions/lflist.conf
expansions/lflist.conf
+0
-1
expansions/script/c33200734.lua
expansions/script/c33200734.lua
+1
-1
expansions/script/c33200740.lua
expansions/script/c33200740.lua
+3
-2
expansions/script/c47310206.lua
expansions/script/c47310206.lua
+6
-6
expansions/script/c47310211.lua
expansions/script/c47310211.lua
+1
-1
expansions/script/c47320208.lua
expansions/script/c47320208.lua
+1
-1
expansions/script/c47370610.lua
expansions/script/c47370610.lua
+2
-2
expansions/script/c5012607.lua
expansions/script/c5012607.lua
+23
-9
expansions/script/c60151125.lua
expansions/script/c60151125.lua
+5
-4
expansions/script/c64800228.lua
expansions/script/c64800228.lua
+1
-0
expansions/script/c66660004.lua
expansions/script/c66660004.lua
+1
-0
expansions/script/c67200960.lua
expansions/script/c67200960.lua
+2
-1
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/lflist.conf
View file @
44ff25aa
...
...
@@ -1668,7 +1668,6 @@
36700322
0
---黑刃猎刀·狄克推多
#370
37000005
0
--现界的魂灵 耀
37000022
0
--往世的教皇 赫
37000100
0
--两世之黎明 曦
37000005
1
--现界的魂灵 耀
...
...
expansions/script/c33200734.lua
View file @
44ff25aa
...
...
@@ -46,7 +46,7 @@ function c33200734.condition(e,tp,eg,ep,ev,re,r,rp)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c33200734
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xc32a
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
:
Is
Faceup
()
and
c
:
Is
SetCard
(
0xc32a
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c33200734
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c33200734
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
...
...
expansions/script/c33200740.lua
View file @
44ff25aa
...
...
@@ -62,7 +62,8 @@ function c33200740.spop(e,tp,eg,ep,ev,re,r,rp)
local
count
=
tc
:
GetLink
()
if
tc
:
IsLocation
(
LOCATION_EXTRA
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
tc
)
>
0
and
Duel
.
IsCanRemoveCounter
(
tp
,
LOCATION_ONFIELD
,
0
,
0x32a
,
count
,
REASON_EFFECT
)
then
if
Duel
.
RemoveCounter
(
tp
,
LOCATION_ONFIELD
,
0
,
0x32a
,
count
,
REASON_EFFECT
)
then
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_LINK
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
:
SetMaterial
(
nil
)
if
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_LINK
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
tc
:
CompleteProcedure
()
end
end
end
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -89,7 +90,7 @@ function c33200740.counttg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
33200740
,
1
))
end
function
c33200740
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xc32a
)
and
c
:
IsAbleToDeck
()
return
c
:
Is
Faceup
()
and
c
:
Is
SetCard
(
0xc32a
)
and
c
:
IsAbleToDeck
()
end
function
c33200740
.
counter
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
...
...
expansions/script/c47310206.lua
View file @
44ff25aa
...
...
@@ -2,17 +2,17 @@
local
s
,
id
=
GetID
()
function
s
.
todeck
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_GRAVE_ACTION
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_GRAVE_ACTION
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
s
.
sp
tg
)
e1
:
SetOperation
(
s
.
sp
op
)
e1
:
SetTarget
(
s
.
td
tg
)
e1
:
SetOperation
(
s
.
td
op
)
c
:
RegisterEffect
(
e1
)
end
function
s
.
tdfilter
(
c
,
e
)
return
(
c
:
IsRace
(
RACE_WYRM
)
or
(
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x5ca0
)))
and
c
:
IsCanBeEffectTarget
(
e
)
and
c
:
IsAbleToDeck
()
return
(
c
:
IsRace
(
RACE_WYRM
)
or
(
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x5ca0
)))
and
c
:
Is
FaceupEx
()
and
c
:
Is
CanBeEffectTarget
(
e
)
and
c
:
IsAbleToDeck
()
end
function
s
.
thfilter
(
c
,
g
)
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
c
:
GetCode
())
and
c
:
IsAbleToHand
()
...
...
@@ -20,7 +20,7 @@ end
function
s
.
slcheck
(
sg
,
tp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
sg
)
end
function
s
.
sp
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
td
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
tdfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
)
if
chk
==
0
then
return
#
g
>
3
and
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
g
)
end
...
...
@@ -30,7 +30,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
tg
,
#
tg
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
sp
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
td
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
#
tg
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
...
...
expansions/script/c47310211.lua
View file @
44ff25aa
...
...
@@ -48,7 +48,7 @@ function s.spsummon(c)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
s
.
sptg
)
...
...
expansions/script/c47320208.lua
View file @
44ff25aa
...
...
@@ -42,7 +42,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
47320210
)
then
return
false
end
return
eg
:
IsExists
(
Card
.
IsSummonPlayer
,
1
,
e
:
GetHandler
(),
1
-
tp
)
end
function
s
.
desfilter
(
c
)
function
s
.
desfilter
(
c
,
atk
)
return
c
:
IsFaceup
()
and
c
:
IsAttackBelow
(
atk
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
s
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
expansions/script/c47370610.lua
View file @
44ff25aa
...
...
@@ -74,9 +74,9 @@ function s.tdfilter(c)
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
s
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
and
Duel
.
IsExistingTarget
(
s
.
tdfilter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
and
Duel
.
IsExistingTarget
(
s
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
tg
=
Duel
.
SelectTarget
(
tp
,
s
.
tdfilter
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
local
tg
=
Duel
.
SelectTarget
(
tp
,
s
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
atk
=
tg
:
GetFirst
():
GetAttack
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
tg
,
#
tg
,
0
,
0
)
Duel
.
SetTargetPlayer
(
tp
)
...
...
expansions/script/c5012607.lua
View file @
44ff25aa
...
...
@@ -71,17 +71,31 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
s
.
retop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetValue
(
0
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_NO_EFFECT_DAMAGE
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3
,
tp
)
local
ct1
=
Duel
.
GetMatchingGroupCount
(
aux
.
TRUE
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
ct2
=
Duel
.
GetMatchingGroupCount
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_REMOVED
,
nil
)
if
ct1
<
ct2
then
local
e
2
=
Effect
.
CreateEffect
(
c
)
e
2
:
SetType
(
EFFECT_TYPE_FIELD
)
e
2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e
2
:
SetTargetRange
(
1
,
0
)
e
2
:
SetValue
(
s
.
aclimit
)
e
2
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterEffect
(
e
2
,
tp
)
local
e
4
=
Effect
.
CreateEffect
(
c
)
e
4
:
SetType
(
EFFECT_TYPE_FIELD
)
e
4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
4
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e
4
:
SetTargetRange
(
1
,
0
)
e
4
:
SetValue
(
s
.
aclimit
)
e
4
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterEffect
(
e
4
,
tp
)
elseif
ct1
>
ct2
then
local
tg
=
Duel
.
GetMatchingGroup
(
s
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
tohand
=
tg
:
Filter
(
Card
.
IsAbleToHand
,
nil
)
...
...
@@ -103,7 +117,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
function
s
.
aclimit
(
e
,
re
,
tp
)
local
rc
=
re
:
GetHandler
()
return
not
s
.
MoJin
return
not
rc
.
MoJin
end
function
s
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
...
...
expansions/script/c60151125.lua
View file @
44ff25aa
...
...
@@ -111,17 +111,18 @@ function c60151125.disop(e,tp,eg,ep,ev,re,r,rp)
if
res
==
1
then
local
rc
=
re
:
GetHandler
()
Duel
.
NegateEffect
(
ev
)
if
rc
:
IsRelateToEffect
(
re
)
and
not
rc
:
IsImmuneToEffect
(
e
)
then
if
rc
:
IsType
(
TYPE_
MONSTER
)
then
if
not
rc
:
IsImmuneToEffect
(
e
)
then
if
rc
:
IsType
(
TYPE_
XYZ
)
then
local
og
=
rc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
end
if
rc
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
elseif
rc
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
then
rc
:
CancelToGrave
()
Duel
.
Overlay
(
e
:
GetHandler
(),
Group
.
FromCards
(
rc
))
else
return
false
end
end
end
...
...
expansions/script/c64800228.lua
View file @
44ff25aa
...
...
@@ -27,6 +27,7 @@ function cm.initial_effect(c)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCountLimit
(
1
,
m
+
10000000
)
e3
:
SetTarget
(
cm
.
target
)
e3
:
SetOperation
(
cm
.
operation
)
...
...
expansions/script/c66660004.lua
View file @
44ff25aa
...
...
@@ -21,6 +21,7 @@ function cm.initial_effect(c)
e4
:
SetCategory
(
CATEGORY_CONTROL
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetRange
(
LOCATION_PZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetCountLimit
(
1
)
e4
:
SetCost
(
xiaoye
.
PendulumEffectCost
)
...
...
expansions/script/c67200960.lua
View file @
44ff25aa
...
...
@@ -46,7 +46,8 @@ end
function
c67200960
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
chkc
:
IsFaceup
()
and
chkc
:
IsSetCard
(
0x67a
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c67200960
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c67200960
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c67200960
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
...
...
expansions/script/c93050100.lua
View file @
44ff25aa
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
(
0xaf1
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
id
)
end
expansions/script/c93050101.lua
View file @
44ff25aa
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
(
0xaf1
)
and
c
:
IsAbleToHand
()
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
)
return
c
:
Is
Type
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSetCard
(
0xaf1
)
and
c
:
IsAbleToHand
(
)
end
expansions/script/c93050102.lua
View file @
44ff25aa
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
(
0xaf1
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
id
)
end
expansions/script/c93050103.lua
View file @
44ff25aa
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
(
0xaf1
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
expansions/script/c93050104.lua
View file @
44ff25aa
--
「寄生兽」超量怪兽
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
(
0xaf1
)
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 @
44ff25aa
--
寄生兽的场地魔法卡
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 @
44ff25aa
--寄生兽的蛰伏
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
(
0xaf1
)
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
(
0xaf1
)
and
c
:
IsAbleToDeck
()
...
...
expansions/script/c93050107.lua
View file @
44ff25aa
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
(
0xaf1
)
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
(
0xaf1
)
...
...
expansions/script/c93050108.lua
View file @
44ff25aa
--寄生兽捕获装置
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
(
0xaf1
)
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