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
4942bdcf
Commit
4942bdcf
authored
Feb 23, 2025
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
46a89ec3
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
486 additions
and
617 deletions
+486
-617
expansions/no81.cdb
expansions/no81.cdb
+0
-0
expansions/pics/9910239.jpg
expansions/pics/9910239.jpg
+0
-0
expansions/pics/9910244.jpg
expansions/pics/9910244.jpg
+0
-0
expansions/pics/9910245.jpg
expansions/pics/9910245.jpg
+0
-0
expansions/script/c129223325.lua
expansions/script/c129223325.lua
+91
-86
expansions/script/c4058.lua
expansions/script/c4058.lua
+390
-389
expansions/script/c60001170.lua
expansions/script/c60001170.lua
+1
-1
expansions/script/c60001171.lua
expansions/script/c60001171.lua
+1
-1
expansions/script/c64800221.lua
expansions/script/c64800221.lua
+1
-1
expansions/script/c65870060.lua
expansions/script/c65870060.lua
+1
-1
expansions/script/c65870065.lua
expansions/script/c65870065.lua
+1
-1
expansions/script/c9910239.lua
expansions/script/c9910239.lua
+0
-56
expansions/script/c9910244.lua
expansions/script/c9910244.lua
+0
-81
No files found.
expansions/no81.cdb
View file @
4942bdcf
No preview for this file type
expansions/pics/9910239.jpg
deleted
100644 → 0
View file @
46a89ec3
10.8 KB
expansions/pics/9910244.jpg
deleted
100644 → 0
View file @
46a89ec3
9.2 KB
expansions/pics/9910245.jpg
deleted
100644 → 0
View file @
46a89ec3
12.7 KB
expansions/script/c129223325.lua
View file @
4942bdcf
function
c129223325
.
initial_effect
(
c
)
function
c129223325
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EFFECT_QP_ACT_IN_SET_TURN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetCost
(
c129223325
.
cost
)
c
:
RegisterEffect
(
e0
)
e1
:
SetOperation
(
c129223325
.
activate
)
local
e1
=
Effect
.
CreateEffect
(
c
)
c
:
RegisterEffect
(
e1
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e1
:
SetCost
(
c129223325
.
cost
)
e2
:
SetCondition
(
c129223325
.
handcon
)
e1
:
SetOperation
(
c129223325
.
activate
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
129223325
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCondition
(
c129223325
.
handcon
)
e3
:
SetRange
(
LOCATION_FZONE
)
c
:
RegisterEffect
(
e2
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetDescription
(
aux
.
Stringid
(
129223325
,
1
))
e3
:
SetCountLimit
(
1
)
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetTarget
(
c129223325
.
destg
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetOperation
(
c129223325
.
desop
)
e3
:
SetRange
(
LOCATION_FZONE
)
c
:
RegisterEffect
(
e3
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetDescription
(
aux
.
Stringid
(
129223325
,
2
))
e3
:
SetCountLimit
(
1
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetTarget
(
c129223325
.
destg
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetOperation
(
c129223325
.
desop
)
e4
:
SetRange
(
LOCATION_FZONE
)
c
:
RegisterEffect
(
e3
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCountLimit
(
1
)
e4
:
SetDescription
(
aux
.
Stringid
(
129223325
,
2
))
e4
:
SetTarget
(
c129223325
.
sptg
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetOperation
(
c129223325
.
spop
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
c
:
RegisterEffect
(
e4
)
e4
:
SetRange
(
LOCATION_FZONE
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCountLimit
(
1
)
e5
:
SetCode
(
EVENT_CHAINING
)
e4
:
SetTarget
(
c129223325
.
sptg
)
e5
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetOperation
(
c129223325
.
spop
)
e5
:
SetOperation
(
c129223325
.
chainop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e5
)
local
e5
=
Effect
.
CreateEffect
(
c
)
Duel
.
AddCustomActivityCounter
(
129223325
,
ACTIVITY_SUMMON
,
c129223325
.
filter
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
Duel
.
AddCustomActivityCounter
(
129223325
,
ACTIVITY_SPSUMMON
,
c129223325
.
filter
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetRange
(
LOCATION_FZONE
)
e5
:
SetOperation
(
c129223325
.
chainop
)
c
:
RegisterEffect
(
e5
)
Duel
.
AddCustomActivityCounter
(
129223325
,
ACTIVITY_SUMMON
,
c129223325
.
filter
)
Duel
.
AddCustomActivityCounter
(
129223325
,
ACTIVITY_SPSUMMON
,
c129223325
.
filter
)
end
end
function
c129223325
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c129223325
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
129223325
,
tp
,
ACTIVITY_SUMMON
)
==
0
and
Duel
.
GetCustomActivityCount
(
129223325
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
129223325
,
tp
,
ACTIVITY_SUMMON
)
==
0
and
Duel
.
GetCustomActivityCount
(
129223325
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c129223325
.
sumlimit
)
e1
:
SetTarget
(
c129223325
.
sumlimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e2
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
SetChainLimit
(
c129223325
.
chainlm
)
Duel
.
SetChainLimit
(
c129223325
.
chainlm
)
end
end
function
c129223325
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
c129223325
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
c
:
IsSetCard
(
0x97
)
return
not
c
:
IsSetCard
(
0x97
)
end
end
function
c129223325
.
filter
(
c
)
function
c129223325
.
filter
(
c
)
return
c
:
IsSetCard
(
0x97
)
return
c
:
IsSetCard
(
0x97
)
end
end
function
c129223325
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c129223325
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c129223325
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c129223325
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
129223325
,
0
))
then
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
129223325
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
end
end
function
c129223325
.
chainlm
(
e
,
rp
,
tp
)
function
c129223325
.
chainlm
(
e
,
rp
,
tp
)
return
tp
==
rp
return
tp
==
rp
end
end
function
c129223325
.
handcon
(
e
)
function
c129223325
.
handcon
(
e
)
return
Duel
.
GetFieldGroupCount
(
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
)
==
0
return
Duel
.
GetFieldGroupCount
(
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
)
==
0
end
end
function
c129223325
.
desfilter
(
c
)
function
c129223325
.
desfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
function
c129223325
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c129223325
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c129223325
.
desfilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chkc
then
return
chkc
:
IsOnField
()
and
c129223325
.
desfilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c129223325
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c129223325
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c129223325
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c129223325
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
end
function
c129223325
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c129223325
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
function
c129223325
.
spfilter
(
c
,
e
,
tp
)
function
c129223325
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x97
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
return
c
:
IsSetCard
(
0x97
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
end
function
c129223325
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c129223325
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c129223325
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c129223325
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
function
c129223325
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c129223325
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c129223325
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c129223325
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
end
end
end
function
c129223325
.
chainop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c129223325
.
chainop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
GetHandler
():
IsSetCard
(
0x97
)
then
if
re
:
GetHandler
():
IsSetCard
(
0x97
)
then
Duel
.
SetChainLimit
(
c129223325
.
chainlm
)
Duel
.
SetChainLimit
(
c129223325
.
chainlm
)
end
end
end
end
expansions/script/c4058.lua
View file @
4942bdcf
--ナーガの存在
--ナーガの存在
function
c4058
.
initial_effect
(
c
)
function
c4058
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
4058
)
c
:
SetUniqueOnField
(
1
,
0
,
4058
)
Duel
.
EnableGlobalFlag
(
GLOBALFLAG_SELF_TOGRAVE
)
Duel
.
EnableGlobalFlag
(
GLOBALFLAG_SELF_TOGRAVE
)
--special summon rule
--special summon rule
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c4058
.
sprcon
)
e1
:
SetCondition
(
c4058
.
sprcon
)
e1
:
SetOperation
(
c4058
.
sprop
)
e1
:
SetOperation
(
c4058
.
sprop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--to s/t zone
--to s/t zone
local
e9
=
Effect
.
CreateEffect
(
c
)
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e9
:
SetCode
(
EVENT_ADJUST
)
e9
:
SetCode
(
EVENT_ADJUST
)
e9
:
SetRange
(
LOCATION_SZONE
)
e9
:
SetRange
(
LOCATION_SZONE
)
e9
:
SetCondition
(
c4058
.
damcon2
)
e9
:
SetCondition
(
c4058
.
damcon2
)
e9
:
SetOperation
(
c4058
.
disop
)
e9
:
SetOperation
(
c4058
.
disop
)
c
:
RegisterEffect
(
e9
)
c
:
RegisterEffect
(
e9
)
--to monster zone
--to monster zone
local
e8
=
Effect
.
CreateEffect
(
c
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_ADJUST
)
e8
:
SetCode
(
EVENT_ADJUST
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c4058
.
damcon
)
e8
:
SetCondition
(
c4058
.
damcon
)
e8
:
SetOperation
(
c4058
.
disop2
)
e8
:
SetOperation
(
c4058
.
disop2
)
c
:
RegisterEffect
(
e8
)
c
:
RegisterEffect
(
e8
)
--immune
--immune
local
e10
=
Effect
.
CreateEffect
(
c
)
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetType
(
EFFECT_TYPE_SINGLE
)
e10
:
SetType
(
EFFECT_TYPE_SINGLE
)
e10
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e10
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e10
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e10
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e10
:
SetRange
(
LOCATION_ONFIELD
)
e10
:
SetRange
(
LOCATION_ONFIELD
)
e10
:
SetValue
(
c4058
.
efilter
)
e10
:
SetValue
(
c4058
.
efilter
)
c
:
RegisterEffect
(
e10
)
c
:
RegisterEffect
(
e10
)
--battle target
--battle target
local
e11
=
Effect
.
CreateEffect
(
c
)
local
e11
=
Effect
.
CreateEffect
(
c
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetType
(
EFFECT_TYPE_SINGLE
)
e11
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e11
:
SetCode
(
EFFECT_CANNOT_BE_BATTLE_TARGET
)
e11
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e11
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e11
:
SetRange
(
LOCATION_MZONE
)
e11
:
SetRange
(
LOCATION_MZONE
)
e11
:
SetValue
(
aux
.
imval1
)
e11
:
SetValue
(
aux
.
imval1
)
c
:
RegisterEffect
(
e11
)
c
:
RegisterEffect
(
e11
)
--triple summon
--triple summon
local
e12
=
Effect
.
CreateEffect
(
c
)
local
e12
=
Effect
.
CreateEffect
(
c
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetType
(
EFFECT_TYPE_FIELD
)
e12
:
SetCode
(
EFFECT_SET_SUMMON_COUNT_LIMIT
)
e12
:
SetCode
(
EFFECT_SET_SUMMON_COUNT_LIMIT
)
e12
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e12
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e12
:
SetRange
(
LOCATION_ONFIELD
)
e12
:
SetRange
(
LOCATION_ONFIELD
)
e12
:
SetTargetRange
(
1
,
0
)
e12
:
SetTargetRange
(
1
,
0
)
e12
:
SetValue
(
3
)
e12
:
SetValue
(
3
)
e12
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
0x8000
))
e12
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
0x8000
))
c
:
RegisterEffect
(
e12
)
c
:
RegisterEffect
(
e12
)
--oath effects
--oath effects
local
e13
=
Effect
.
CreateEffect
(
c
)
local
e13
=
Effect
.
CreateEffect
(
c
)
e13
:
SetType
(
EFFECT_TYPE_FIELD
)
e13
:
SetType
(
EFFECT_TYPE_FIELD
)
e13
:
SetRange
(
LOCATION_ONFIELD
)
e13
:
SetRange
(
LOCATION_ONFIELD
)
e13
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e13
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e13
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e13
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e13
:
SetTarget
(
c4058
.
splimit
)
e13
:
SetTarget
(
c4058
.
splimit
)
e13
:
SetTargetRange
(
1
,
0
)
e13
:
SetTargetRange
(
1
,
0
)
c
:
RegisterEffect
(
e13
)
c
:
RegisterEffect
(
e13
)
local
e14
=
e13
:
Clone
()
local
e14
=
e13
:
Clone
()
e14
:
SetCode
(
EFFECT_CANNOT_MSET
)
e14
:
SetCode
(
EFFECT_CANNOT_MSET
)
c
:
RegisterEffect
(
e14
)
c
:
RegisterEffect
(
e14
)
--replace
--replace
local
e15
=
Effect
.
CreateEffect
(
c
)
local
e15
=
Effect
.
CreateEffect
(
c
)
e15
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e15
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e15
:
SetCode
(
EFFECT_SEND_REPLACE
)
e15
:
SetCode
(
EFFECT_SEND_REPLACE
)
e15
:
SetRange
(
LOCATION_ONFIELD
)
e15
:
SetRange
(
LOCATION_ONFIELD
)
e15
:
SetTarget
(
c4058
.
destg
)
e15
:
SetTarget
(
c4058
.
destg
)
e15
:
SetValue
(
c4058
.
repval
)
e15
:
SetValue
(
c4058
.
repval
)
c
:
RegisterEffect
(
e15
)
c
:
RegisterEffect
(
e15
)
--
--
local
e17
=
Effect
.
CreateEffect
(
c
)
local
e17
=
Effect
.
CreateEffect
(
c
)
e17
:
SetType
(
EFFECT_TYPE_FIELD
)
e17
:
SetType
(
EFFECT_TYPE_FIELD
)
e17
:
SetCode
(
4058
)
e17
:
SetCode
(
4058
)
e17
:
SetRange
(
LOCATION_ONFIELD
)
e17
:
SetRange
(
LOCATION_ONFIELD
)
e17
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e17
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e17
:
SetTargetRange
(
1
,
0
)
e17
:
SetTargetRange
(
1
,
0
)
c
:
RegisterEffect
(
e17
)
c
:
RegisterEffect
(
e17
)
--extra summon
--extra summon
local
e18
=
Effect
.
CreateEffect
(
c
)
local
e18
=
Effect
.
CreateEffect
(
c
)
e18
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e18
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e18
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e18
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e18
:
SetRange
(
LOCATION_MZONE
)
e18
:
SetRange
(
LOCATION_ONFIELD
)
e18
:
SetOperation
(
c4058
.
drop
)
e18
:
SetOperation
(
c4058
.
drop
)
c
:
RegisterEffect
(
e18
)
c
:
RegisterEffect
(
e18
)
--counter
--counter
local
e19
=
Effect
.
CreateEffect
(
c
)
local
e19
=
Effect
.
CreateEffect
(
c
)
e19
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e19
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e19
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e19
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e19
:
SetRange
(
LOCATION_MZONE
)
e19
:
SetRange
(
LOCATION_MZONE
)
e19
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e19
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e19
:
SetCountLimit
(
1
)
e19
:
SetCountLimit
(
1
)
e19
:
SetOperation
(
c4058
.
counter
)
e19
:
SetOperation
(
c4058
.
counter
)
c
:
RegisterEffect
(
e19
)
c
:
RegisterEffect
(
e19
)
--advance summon
--advance summon
local
e20
=
Effect
.
CreateEffect
(
c
)
local
e20
=
Effect
.
CreateEffect
(
c
)
e20
:
SetDescription
(
aux
.
Stringid
(
4058
,
1
))
e20
:
SetDescription
(
aux
.
Stringid
(
4058
,
1
))
e20
:
SetType
(
EFFECT_TYPE_FIELD
)
e20
:
SetType
(
EFFECT_TYPE_FIELD
)
e20
:
SetCode
(
EFFECT_SUMMON_PROC
)
e20
:
SetCode
(
EFFECT_SUMMON_PROC
)
e20
:
SetRange
(
LOCATION_MZONE
)
e20
:
SetRange
(
LOCATION_MZONE
)
e20
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e20
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e20
:
SetCondition
(
c4058
.
otcon
)
e20
:
SetCondition
(
c4058
.
otcon
)
e20
:
SetTarget
(
c4058
.
ottg
)
e20
:
SetTarget
(
c4058
.
ottg
)
e20
:
SetOperation
(
c4058
.
otop
)
e20
:
SetOperation
(
c4058
.
otop
)
e20
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e20
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e20
)
c
:
RegisterEffect
(
e20
)
local
e21
=
e20
:
Clone
()
local
e21
=
e20
:
Clone
()
e21
:
SetCode
(
EFFECT_SET_PROC
)
e21
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e21
)
c
:
RegisterEffect
(
e21
)
--act qp/trap in hand
--act qp/trap in hand
local
e22
=
Effect
.
CreateEffect
(
c
)
local
e22
=
Effect
.
CreateEffect
(
c
)
e22
:
SetType
(
EFFECT_TYPE_FIELD
)
e22
:
SetType
(
EFFECT_TYPE_FIELD
)
e22
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e22
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e22
:
SetRange
(
LOCATION_ONFIELD
)
e22
:
SetRange
(
LOCATION_ONFIELD
)
e22
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e22
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e22
:
SetTarget
(
aux
.
TargetBoolFunction
(
c4058
.
dafilter
))
e22
:
SetTarget
(
aux
.
TargetBoolFunction
(
c4058
.
dafilter
))
c
:
RegisterEffect
(
e22
)
c
:
RegisterEffect
(
e22
)
--
--
local
e25
=
Effect
.
CreateEffect
(
c
)
local
e25
=
Effect
.
CreateEffect
(
c
)
e25
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e25
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e25
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e25
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e25
:
SetCode
(
EVENT_CHAINING
)
e25
:
SetCode
(
EVENT_CHAINING
)
e25
:
SetRange
(
LOCATION_ONFIELD
)
e25
:
SetRange
(
LOCATION_ONFIELD
)
e25
:
SetOperation
(
c4058
.
actop
)
e25
:
SetOperation
(
c4058
.
actop
)
c
:
RegisterEffect
(
e25
)
c
:
RegisterEffect
(
e25
)
--public
--public
local
e26
=
Effect
.
CreateEffect
(
c
)
local
e26
=
Effect
.
CreateEffect
(
c
)
e26
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e26
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e26
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CAN_FORBIDDEN
)
e26
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CAN_FORBIDDEN
)
e26
:
SetCode
(
EVENT_TO_GRAVE
)
e26
:
SetCode
(
EVENT_TO_GRAVE
)
e26
:
SetRange
(
LOCATION_ONFIELD
)
e26
:
SetRange
(
LOCATION_ONFIELD
)
e26
:
SetCondition
(
c4058
.
con
)
e26
:
SetCondition
(
c4058
.
con
)
e26
:
SetOperation
(
c4058
.
op
)
e26
:
SetOperation
(
c4058
.
op
)
c
:
RegisterEffect
(
e26
)
c
:
RegisterEffect
(
e26
)
local
e27
=
e26
:
Clone
()
local
e27
=
e26
:
Clone
()
e27
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e27
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e27
)
c
:
RegisterEffect
(
e27
)
local
e28
=
e26
:
Clone
()
local
e28
=
e26
:
Clone
()
e28
:
SetCode
(
EVENT_TO_HAND
)
e28
:
SetCode
(
EVENT_TO_HAND
)
c
:
RegisterEffect
(
e28
)
c
:
RegisterEffect
(
e28
)
local
e29
=
e26
:
Clone
()
local
e29
=
e26
:
Clone
()
e29
:
SetCode
(
EVENT_TO_DECK
)
e29
:
SetCode
(
EVENT_TO_DECK
)
c
:
RegisterEffect
(
e29
)
c
:
RegisterEffect
(
e29
)
local
e30
=
e26
:
Clone
()
local
e30
=
e26
:
Clone
()
e30
:
SetCode
(
EVENT_REMOVE
)
e30
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e30
)
c
:
RegisterEffect
(
e30
)
local
e31
=
Effect
.
CreateEffect
(
c
)
local
e31
=
Effect
.
CreateEffect
(
c
)
e31
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e31
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e31
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CAN_FORBIDDEN
)
e31
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CAN_FORBIDDEN
)
e31
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e31
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e31
:
SetRange
(
LOCATION_ONFIELD
)
e31
:
SetRange
(
LOCATION_ONFIELD
)
e31
:
SetOperation
(
c4058
.
pubop
)
e31
:
SetOperation
(
c4058
.
pubop
)
c
:
RegisterEffect
(
e31
)
c
:
RegisterEffect
(
e31
)
local
e32
=
e31
:
Clone
()
local
e32
=
e31
:
Clone
()
e32
:
SetCode
(
EVENT_SUMMON
)
e32
:
SetCode
(
EVENT_SUMMON
)
c
:
RegisterEffect
(
e32
)
c
:
RegisterEffect
(
e32
)
local
e33
=
Effect
.
CreateEffect
(
c
)
local
e33
=
Effect
.
CreateEffect
(
c
)
e33
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CAN_FORBIDDEN
)
e33
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CAN_FORBIDDEN
)
e33
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e33
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e33
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e33
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e33
:
SetOperation
(
c4058
.
sumsuc
)
e33
:
SetOperation
(
c4058
.
sumsuc
)
c
:
RegisterEffect
(
e33
)
c
:
RegisterEffect
(
e33
)
--plus effect
--plus effect
if
not
c4058
.
global_check
then
if
not
c4058
.
global_check
then
c4058
.
global_check
=
true
c4058
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
ge1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
ge1
:
SetCode
(
EVENT_ADJUST
)
ge1
:
SetCode
(
EVENT_ADJUST
)
ge1
:
SetOperation
(
c4058
.
adop
)
ge1
:
SetOperation
(
c4058
.
adop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_SUMMON
)
ge2
:
SetCode
(
EVENT_SUMMON
)
ge2
:
SetOperation
(
c4058
.
regop
)
ge2
:
SetOperation
(
c4058
.
regop
)
Duel
.
RegisterEffect
(
ge2
,
0
)
Duel
.
RegisterEffect
(
ge2
,
0
)
local
ge3
=
ge2
:
Clone
()
local
ge3
=
ge2
:
Clone
()
ge3
:
SetCode
(
EVENT_MSET
)
ge3
:
SetCode
(
EVENT_MSET
)
Duel
.
RegisterEffect
(
ge3
,
0
)
Duel
.
RegisterEffect
(
ge3
,
0
)
end
end
end
end
--special summon rule
--special summon rule
function
c4058
.
sprfilter
(
c
)
function
c4058
.
sprfilter
(
c
)
return
c
:
IsSetCard
(
0x50
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsSetCard
(
0x50
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
end
end
function
c4058
.
sprcon
(
e
,
c
)
function
c4058
.
sprcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
g
=
Duel
.
GetMatchingGroup
(
c4058
.
sprfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c4058
.
sprfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
nil
)
return
ft
>
0
and
g
:
GetClassCount
(
Card
.
GetCode
)
>
3
return
ft
>
0
and
g
:
GetClassCount
(
Card
.
GetCode
)
>
3
end
end
function
c4058
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c4058
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c4058
.
sprfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c4058
.
sprfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetClassCount
(
Card
.
GetCode
)
>
3
end
if
chk
==
0
then
return
g
:
GetClassCount
(
Card
.
GetCode
)
>
3
end
local
tg
=
Group
.
CreateGroup
()
local
tg
=
Group
.
CreateGroup
()
for
i
=
1
,
4
do
for
i
=
1
,
4
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
g
:
Remove
(
Card
.
IsCode
,
nil
,
sg
:
GetFirst
():
GetCode
())
g
:
Remove
(
Card
.
IsCode
,
nil
,
sg
:
GetFirst
():
GetCode
())
tg
:
Merge
(
sg
)
tg
:
Merge
(
sg
)
end
end
Duel
.
SendtoGrave
(
tg
,
REASON_COST
)
Duel
.
SendtoGrave
(
tg
,
REASON_COST
)
end
end
--to s/t zone
--to s/t zone
function
c4058
.
venomfilter
(
c
)
function
c4058
.
venomfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x50
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x50
)
end
end
function
c4058
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c4058
.
venomfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
return
not
Duel
.
IsExistingMatchingCard
(
c4058
.
venomfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
function
c4058
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
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
+
0x1fc0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterFlagEffect
(
4058
,
RESET_EVENT
+
0x1fc0000
,
0
,
1
)
c
:
RegisterFlagEffect
(
4058
,
RESET_EVENT
+
0x1fc0000
,
0
,
1
)
end
end
--to monster zone
--to monster zone
function
c4058
.
damcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
damcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c4058
.
venomfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c4058
.
venomfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
function
c4058
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_MZONE
,
POS_FACEUP_ATTACK
,
true
)
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_MZONE
,
POS_FACEUP_ATTACK
,
true
)
end
end
--immune
--immune
function
c4058
.
efilter
(
e
,
te
)
function
c4058
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
end
--summon limit
--summon limit
function
c4058
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
c4058
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
c
:
IsRace
(
RACE_REPTILE
)
return
not
c
:
IsRace
(
RACE_REPTILE
)
end
end
--send leplace
--send leplace
function
c4058
.
vmfilter
(
c
,
tp
)
function
c4058
.
vmfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
8062132
)
and
c
:
IsControler
(
tp
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
8062132
)
and
c
:
IsControler
(
tp
)
end
end
function
c4058
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c4058
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
eg
:
IsExists
(
c4058
.
vmfilter
,
1
,
nil
,
tp
)
if
chk
==
0
then
return
eg
:
IsExists
(
c4058
.
vmfilter
,
1
,
nil
,
tp
)
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
)
end
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
)
end
if
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
then
if
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
then
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_EFFECT
+
REASON_REPLACE
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_EFFECT
+
REASON_REPLACE
)
return
true
return
true
else
return
false
end
else
return
false
end
end
end
function
c4058
.
repval
(
e
,
c
)
function
c4058
.
repval
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
8062132
)
and
c
~=
e
:
GetHandler
()
return
c
:
IsFaceup
()
and
c
:
IsCode
(
8062132
)
and
c
~=
e
:
GetHandler
()
end
end
--extra summon
--extra summon
function
c4058
.
sufilter
(
c
,
e
,
tp
)
function
c4058
.
sufilter
(
c
,
e
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsRace
(
RACE_REPTILE
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsControler
(
tp
)
and
c
:
IsRace
(
RACE_REPTILE
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
Duel
.
IsExistingMatchingCard
(
c4058
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetLevel
())
and
Duel
.
IsExistingMatchingCard
(
c4058
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetLevel
())
end
end
function
c4058
.
exfilter
(
c
,
e
,
tp
,
lv
)
function
c4058
.
exfilter
(
c
,
e
,
tp
,
lv
)
return
(
c
:
GetRank
()
==
lv
or
c
:
GetLevel
()
==
lv
)
and
c
:
IsRace
(
RACE_REPTILE
)
return
(
c
:
GetRank
()
==
lv
or
c
:
GetLevel
()
==
lv
)
and
c
:
IsRace
(
RACE_REPTILE
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
end
function
c4058
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
eg
:
IsExists
(
c4058
.
sufilter
,
1
,
nil
,
e
,
tp
)
then
if
eg
:
IsExists
(
c4058
.
sufilter
,
1
,
nil
,
e
,
tp
)
then
local
g
=
eg
:
Filter
(
c4058
.
sufilter
,
nil
,
e
,
tp
)
if
not
c
:
IsLocation
(
LOCATION_MZONE
)
and
not
eg
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x50
)
then
return
end
local
tc
=
g
:
GetFirst
()
local
g
=
eg
:
Filter
(
c4058
.
sufilter
,
nil
,
e
,
tp
)
local
lv
=
tc
:
GetLevel
()
local
tc
=
g
:
GetFirst
()
if
Duel
.
IsExistingMatchingCard
(
c4058
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
lv
)
local
lv
=
tc
:
GetLevel
()
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
4058
,
0
))
then
if
Duel
.
IsExistingMatchingCard
(
c4058
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
lv
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
4058
,
0
))
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c4058
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
lv
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
g
:
GetCount
()
>
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c4058
.
exfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
lv
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
g
:
GetCount
()
>
0
then
end
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
end
end
end
--counter
--counter
function
c4058
.
counter
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
counter
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c4058
.
vmfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
c4058
.
vmfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
tp
)
local
sg
=
Group
.
CreateGroup
()
local
sg
=
Group
.
CreateGroup
()
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
==
1
then
if
g
:
GetCount
()
==
1
then
sg
:
AddCard
(
g
:
GetFirst
())
sg
:
AddCard
(
g
:
GetFirst
())
else
else
sg
:
AddCard
(
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
())
sg
:
AddCard
(
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
())
end
end
local
tc
=
sg
:
GetFirst
()
local
tc
=
sg
:
GetFirst
()
Duel
.
HintSelection
(
Group
.
FromCards
(
tc
))
Duel
.
HintSelection
(
Group
.
FromCards
(
tc
))
tc
:
AddCounter
(
0x11
,
1
)
tc
:
AddCounter
(
0x11
,
1
)
local
WIN_REASON_VENNOMINAGA
=
0x12
local
WIN_REASON_VENNOMINAGA
=
0x12
if
tc
:
GetCounter
(
0x11
)
==
3
then
if
tc
:
GetCounter
(
0x11
)
==
3
then
Duel
.
Win
(
tp
,
WIN_REASON_VENNOMINAGA
)
Duel
.
Win
(
tp
,
WIN_REASON_VENNOMINAGA
)
end
end
end
end
--advance
--advance
function
c4058
.
otcon
(
e
,
c
,
minc
)
function
c4058
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
end
function
c4058
.
ottg
(
e
,
c
)
function
c4058
.
ottg
(
e
,
c
)
local
mi
,
ma
=
c
:
GetTributeRequirement
()
local
mi
,
ma
=
c
:
GetTributeRequirement
()
return
((
mi
<=
2
and
ma
>=
2
and
Duel
.
IsExistingMatchingCard
(
c4058
.
sprfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_DECK
,
0
,
2
,
nil
))
return
((
mi
<=
2
and
ma
>=
2
and
Duel
.
IsExistingMatchingCard
(
c4058
.
sprfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_DECK
,
0
,
2
,
nil
))
or
(
mi
<=
1
and
ma
>=
1
)
and
Duel
.
IsExistingMatchingCard
(
c4058
.
sprfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_DECK
,
0
,
1
,
nil
))
or
(
mi
<=
1
and
ma
>=
1
)
and
Duel
.
IsExistingMatchingCard
(
c4058
.
sprfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_DECK
,
0
,
1
,
nil
))
and
c
:
IsRace
(
RACE_REPTILE
)
and
c
:
IsRace
(
RACE_REPTILE
)
end
end
function
c4058
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
c4058
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mi
,
ma
=
c
:
GetTributeRequirement
()
local
mi
,
ma
=
c
:
GetTributeRequirement
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c4058
.
sprfilter
,
tp
,
LOCATION_DECK
,
0
,
mi
,
ma
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c4058
.
sprfilter
,
tp
,
LOCATION_DECK
,
0
,
mi
,
ma
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
--act in hand
--act in hand
function
c4058
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
actop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
re
:
GetActivateLocation
()
~=
LOCATION_HAND
then
return
end
if
re
:
GetActivateLocation
()
~=
LOCATION_HAND
then
return
end
if
not
rc
:
IsCode
(
16067089
,
93217231
,
80678380
,
1683982
)
then
return
end
if
not
rc
:
IsCode
(
16067089
,
93217231
,
80678380
,
1683982
)
then
return
end
Duel
.
RegisterFlagEffect
(
rc
:
GetControler
(),
rc
:
GetOriginalCode
(),
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
rc
:
GetControler
(),
rc
:
GetOriginalCode
(),
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
--public
--public
function
c4058
.
cfilter
(
c
,
tp
)
function
c4058
.
cfilter
(
c
,
tp
)
return
c
:
GetPreviousControler
()
==
tp
return
c
:
GetPreviousControler
()
==
tp
and
(
c
:
IsPreviousLocation
(
LOCATION_DECK
)
or
c
:
GetSummonLocation
()
==
LOCATION_DECK
and
(
c
:
IsPreviousLocation
(
LOCATION_DECK
)
or
c
:
GetSummonLocation
()
==
LOCATION_DECK
or
(
c
:
IsControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_DECK
))
or
(
c
:
IsControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_DECK
))
or
c
:
IsLocation
(
LOCATION_DECK
))
and
not
c
:
IsReason
(
REASON_DRAW
)
or
c
:
IsLocation
(
LOCATION_DECK
))
and
not
c
:
IsReason
(
REASON_DRAW
)
end
end
function
c4058
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c4058
.
cfilter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
c4058
.
cfilter
,
1
,
nil
,
tp
)
end
end
function
c4058
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_DECK
,
0
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_DECK
,
0
)
if
g
:
GetCount
()
<=
1
then
return
end
if
g
:
GetCount
()
<=
1
then
return
end
c
:
RegisterFlagEffect
(
4058
,
RESET_EVENT
+
0x1fc0000
+
RESET_CHAIN
,
0
,
1
)
c
:
RegisterFlagEffect
(
4058
,
RESET_EVENT
+
0x1fc0000
+
RESET_CHAIN
,
0
,
1
)
end
end
function
c4058
.
pubop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
pubop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
4058
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c4058
.
dafilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
)
then
if
c
:
GetFlagEffect
(
4058
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c4058
.
dafilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c4058
.
dafilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
sg
=
Duel
.
GetMatchingGroup
(
c4058
.
dafilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
ConfirmCards
(
tp
,
sg
)
Duel
.
ConfirmCards
(
tp
,
sg
)
end
end
end
end
function
c4058
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
c4058
.
dafilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
)
then
if
Duel
.
IsExistingMatchingCard
(
c4058
.
dafilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c4058
.
dafilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
sg
=
Duel
.
GetMatchingGroup
(
c4058
.
dafilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
ConfirmCards
(
tp
,
sg
)
Duel
.
ConfirmCards
(
tp
,
sg
)
end
end
end
end
--plus effect
--plus effect
function
c4058
.
dafilter
(
c
)
function
c4058
.
dafilter
(
c
)
return
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsCode
(
16067089
,
93217231
,
80678380
,
1683982
)
and
Duel
.
GetFlagEffect
(
c
:
GetControler
(),
c
:
GetOriginalCode
())
==
0
return
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsCode
(
16067089
,
93217231
,
80678380
,
1683982
)
and
Duel
.
GetFlagEffect
(
c
:
GetControler
(),
c
:
GetOriginalCode
())
==
0
end
end
function
c4058
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
adop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c4058
.
dafilter
,
c
:
GetControler
(),
LOCATION_DECK
,
LOCATION_DECK
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c4058
.
dafilter
,
c
:
GetControler
(),
LOCATION_DECK
,
LOCATION_DECK
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
while
tc
do
while
tc
do
if
tc
:
GetFlagEffect
(
4058
)
==
0
then
if
tc
:
GetFlagEffect
(
4058
)
==
0
then
local
code
=
tc
:
GetOriginalCode
()
local
code
=
tc
:
GetOriginalCode
()
local
ae
=
tc
:
GetActivateEffect
()
local
ae
=
tc
:
GetActivateEffect
()
--deck activate
--deck activate
local
e1
=
Effect
.
CreateEffect
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
tc
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
ae
:
GetCode
())
e1
:
SetCode
(
ae
:
GetCode
())
e1
:
SetCategory
(
ae
:
GetCategory
())
e1
:
SetCategory
(
ae
:
GetCategory
())
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
ae
:
GetProperty
())
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
ae
:
GetProperty
())
e1
:
SetRange
(
LOCATION_DECK
)
e1
:
SetRange
(
LOCATION_DECK
)
e1
:
SetCountLimit
(
1
,
code
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
code
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c4058
.
sfcon
)
e1
:
SetCondition
(
c4058
.
sfcon
)
e1
:
SetTarget
(
c4058
.
sftg
)
e1
:
SetTarget
(
c4058
.
sftg
)
e1
:
SetOperation
(
c4058
.
sfop
)
e1
:
SetOperation
(
c4058
.
sfop
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
--activate cost
--activate cost
local
e2
=
Effect
.
CreateEffect
(
tc
)
local
e2
=
Effect
.
CreateEffect
(
tc
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_ACTIVATE_COST
)
e2
:
SetCode
(
EFFECT_ACTIVATE_COST
)
e2
:
SetRange
(
LOCATION_DECK
)
e2
:
SetRange
(
LOCATION_DECK
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
LOCATION_DECK
,
0
)
e2
:
SetTargetRange
(
LOCATION_DECK
,
0
)
e2
:
SetCost
(
c4058
.
costchk
)
e2
:
SetCost
(
c4058
.
costchk
)
e2
:
SetTarget
(
c4058
.
actarget
)
e2
:
SetTarget
(
c4058
.
actarget
)
e2
:
SetOperation
(
c4058
.
costop
)
e2
:
SetOperation
(
c4058
.
costop
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetLabel
(
4058
)
e2
:
SetLabel
(
4058
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterFlagEffect
(
4058
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
tc
:
RegisterFlagEffect
(
4058
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
end
end
tc
=
g
:
GetNext
()
tc
=
g
:
GetNext
()
end
end
end
end
--deck activate
--deck activate
function
c4058
.
sfcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
sfcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
4058
)
and
Duel
.
GetFlagEffect
(
tp
,
e
:
GetHandler
():
GetOriginalCode
())
==
0
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
4058
)
and
Duel
.
GetFlagEffect
(
tp
,
e
:
GetHandler
():
GetOriginalCode
())
==
0
end
end
function
c4058
.
sftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c4058
.
sftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
ae
=
e
:
GetHandler
():
GetActivateEffect
()
local
ae
=
e
:
GetHandler
():
GetActivateEffect
()
local
fcon
=
ae
:
GetCondition
()
local
fcon
=
ae
:
GetCondition
()
local
fcos
=
ae
:
GetCost
()
local
fcos
=
ae
:
GetCost
()
local
ftg
=
ae
:
GetTarget
()
local
ftg
=
ae
:
GetTarget
()
if
chk
==
0
then
if
chk
==
0
then
return
(
not
fcon
or
fcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
))
return
(
not
fcon
or
fcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
))
and
(
not
fcos
or
fcos
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
))
and
(
not
fcos
or
fcos
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
))
and
(
not
ftg
or
ftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
))
and
(
not
ftg
or
ftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
))
and
e
:
GetHandler
():
IsCode
(
16067089
,
93217231
,
80678380
,
1683982
)
and
e
:
GetHandler
():
IsCode
(
16067089
,
93217231
,
80678380
,
1683982
)
end
end
if
fcos
then
fcos
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
fcos
then
fcos
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
ftg
then
ftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
ftg
then
ftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
Duel
.
RegisterFlagEffect
(
tp
,
e
:
GetHandler
():
GetOriginalCode
(),
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
e
:
GetHandler
():
GetOriginalCode
(),
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c4058
.
sfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
sfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ae
=
e
:
GetHandler
():
GetActivateEffect
()
local
ae
=
e
:
GetHandler
():
GetActivateEffect
()
local
fop
=
ae
:
GetOperation
()
local
fop
=
ae
:
GetOperation
()
if
fop
then
fop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
fop
then
fop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
--activate field
--activate field
function
c4058
.
actarget
(
e
,
te
,
tp
)
function
c4058
.
actarget
(
e
,
te
,
tp
)
e
:
SetLabelObject
(
te
)
e
:
SetLabelObject
(
te
)
return
te
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
and
te
:
GetHandler
()
==
e
:
GetHandler
()
return
te
:
GetHandler
():
IsLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
and
te
:
GetHandler
()
==
e
:
GetHandler
()
end
end
function
c4058
.
costchk
(
e
,
te_or_c
,
tp
)
function
c4058
.
costchk
(
e
,
te_or_c
,
tp
)
local
tp
=
e
:
GetHandler
():
GetControler
()
local
tp
=
e
:
GetHandler
():
GetControler
()
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
c4058
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
e
:
GetLabelObject
()
local
te
=
e
:
GetLabelObject
()
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
false
)
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
false
)
c
:
CreateEffectRelation
(
te
)
c
:
CreateEffectRelation
(
te
)
local
ev0
=
Duel
.
GetCurrentChain
()
+
1
local
ev0
=
Duel
.
GetCurrentChain
()
+
1
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ev
==
ev0
end
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ev
==
ev0
end
)
e1
:
SetOperation
(
c4058
.
rsop
)
e1
:
SetOperation
(
c4058
.
rsop
)
e1
:
SetReset
(
RESET_CHAIN
)
e1
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
e2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c4058
.
rsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
rsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
if
e
:
GetCode
()
==
EVENT_CHAIN_SOLVED
and
rc
:
IsRelateToEffect
(
re
)
then
if
e
:
GetCode
()
==
EVENT_CHAIN_SOLVED
and
rc
:
IsRelateToEffect
(
re
)
then
rc
:
SetStatus
(
STATUS_EFFECT_ENABLED
,
true
)
rc
:
SetStatus
(
STATUS_EFFECT_ENABLED
,
true
)
end
end
if
e
:
GetCode
()
==
EVENT_CHAIN_NEGATED
and
rc
:
IsRelateToEffect
(
re
)
and
not
(
rc
:
IsOnField
()
and
rc
:
IsFacedown
())
then
if
e
:
GetCode
()
==
EVENT_CHAIN_NEGATED
and
rc
:
IsRelateToEffect
(
re
)
and
not
(
rc
:
IsOnField
()
and
rc
:
IsFacedown
())
then
rc
:
SetStatus
(
STATUS_ACTIVATE_DISABLED
,
true
)
rc
:
SetStatus
(
STATUS_ACTIVATE_DISABLED
,
true
)
end
end
end
end
--summon check
--summon check
function
c4058
.
sumcon
(
e
)
function
c4058
.
sumcon
(
e
)
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
4058
)
==
0
return
Duel
.
GetFlagEffect
(
e
:
GetHandlerPlayer
(),
4058
)
==
0
end
end
function
c4058
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c4058
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
tc
in
aux
.
Next
(
eg
)
do
for
tc
in
aux
.
Next
(
eg
)
do
if
not
tc
:
IsRace
(
RACE_REPTILE
)
or
(
tc
:
IsFacedown
()
and
not
Duel
.
IsPlayerAffectedByEffect
(
tc
:
GetSummonPlayer
(),
4058
))
then
if
not
tc
:
IsRace
(
RACE_REPTILE
)
or
(
tc
:
IsFacedown
()
and
not
Duel
.
IsPlayerAffectedByEffect
(
tc
:
GetSummonPlayer
(),
4058
))
then
Duel
.
RegisterFlagEffect
(
tc
:
GetSummonPlayer
(),
4058
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tc
:
GetSummonPlayer
(),
4058
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
end
end
end
local
re
=
Card
.
RegisterEffect
local
re
=
Card
.
RegisterEffect
Card
.
RegisterEffect
=
function
(
c
,
e
)
Card
.
RegisterEffect
=
function
(
c
,
e
)
if
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsCode
(
16067089
,
93217231
,
80678380
,
1683982
)
and
c
:
IsType
(
TYPE_CONTINUOUS
+
TYPE_EQUIP
+
TYPE_FIELD
)
and
not
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
e
:
GetLabel
()
~=
4058
then
if
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsCode
(
16067089
,
93217231
,
80678380
,
1683982
)
and
c
:
IsType
(
TYPE_CONTINUOUS
+
TYPE_EQUIP
+
TYPE_FIELD
)
and
not
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
e
:
GetLabel
()
~=
4058
then
local
tg
=
e
:
GetTarget
()
local
tg
=
e
:
GetTarget
()
if
not
tg
then
tg
=
aux
.
TRUE
end
if
not
tg
then
tg
=
aux
.
TRUE
end
e
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
not
c
:
IsStatus
(
STATUS_CHAINING
)
end
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
)
e
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
not
c
:
IsStatus
(
STATUS_CHAINING
)
end
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
)
end
end
re
(
c
,
e
)
re
(
c
,
e
)
end
end
expansions/script/c60001170.lua
View file @
4942bdcf
...
@@ -52,7 +52,7 @@ function c60001170.cdter(c)
...
@@ -52,7 +52,7 @@ function c60001170.cdter(c)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
60001179
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
60001179
)
end
end
function
c60001170
.
wxcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60001170
.
wxcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
==
1
-
tp
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
and
Duel
.
IsChainNegatable
(
ev
)
and
Duel
.
IsExistingMatchingCard
(
c60001170
.
cdter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
return
rp
==
1
-
tp
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
and
Duel
.
IsChainNegatable
(
ev
)
--
and Duel.IsExistingMatchingCard(c60001170.cdter,tp,LOCATION_ONFIELD,0,1,nil)
end
end
function
c60001170
.
wxtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c60001170
.
wxtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
...
...
expansions/script/c60001171.lua
View file @
4942bdcf
...
@@ -12,7 +12,7 @@ function c60001171.initial_effect(c)
...
@@ -12,7 +12,7 @@ function c60001171.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_DRAW
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c60001171
.
thcon
)
--
e1:SetCondition(c60001171.thcon)
e1
:
SetTarget
(
c60001171
.
thtg
)
e1
:
SetTarget
(
c60001171
.
thtg
)
e1
:
SetOperation
(
c60001171
.
thop
)
e1
:
SetOperation
(
c60001171
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
...
expansions/script/c64800221.lua
View file @
4942bdcf
...
@@ -18,7 +18,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -18,7 +18,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
ct
=
6
-
Duel
.
GetFieldGroupCount
(
p
,
0
,
LOCATION_HAND
)
local
ct
=
6
-
Duel
.
GetFieldGroupCount
(
p
,
LOCATION_HAND
,
0
)
if
ct
>
0
then
if
ct
>
0
then
Duel
.
Draw
(
p
,
ct
,
REASON_EFFECT
)
Duel
.
Draw
(
p
,
ct
,
REASON_EFFECT
)
end
end
...
...
expansions/script/c65870060.lua
View file @
4942bdcf
...
@@ -58,7 +58,7 @@ end
...
@@ -58,7 +58,7 @@ end
function
c65870060
.
desop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65870060
.
desop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
e
:
GetLabelObject
():
IsType
(
TYPE_TOKEN
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
65870060
,
2
))
then
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
e
:
GetLabelObject
():
IsType
(
TYPE_TOKEN
)
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
65870060
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
...
...
expansions/script/c65870065.lua
View file @
4942bdcf
...
@@ -40,7 +40,7 @@ function c65870065.spfilter(c,e,tp)
...
@@ -40,7 +40,7 @@ function c65870065.spfilter(c,e,tp)
return
c
:
IsSetCard
(
0x3a37
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
aux
.
NecroValleyFilter
()
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x3a37
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
aux
.
NecroValleyFilter
()
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c65870065
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65870065
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65870065
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65870065
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
end
function
c65870065
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65870065
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c9910239.lua
deleted
100644 → 0
View file @
46a89ec3
--天空漫步者-起降台
function
c9910239
.
initial_effect
(
c
)
c
:
SetUniqueOnField
(
1
,
0
,
9910239
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--extra summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
9910239
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e2
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x955
))
c
:
RegisterEffect
(
e2
)
--to deck
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOEXTRA
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c9910239
.
tdcon
)
e3
:
SetTarget
(
c9910239
.
tdtg
)
e3
:
SetOperation
(
c9910239
.
tdop
)
c
:
RegisterEffect
(
e3
)
end
function
c9910239
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c9910239
.
filter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_LINK
)
and
Duel
.
IsExistingMatchingCard
(
c9910239
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
,
c
:
GetLink
())
end
function
c9910239
.
tdfilter
(
c
,
ct
)
return
c
:
IsLinkBelow
(
ct
-
1
)
and
c
:
IsAbleToDeck
()
end
function
c9910239
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c9910239
.
filter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9910239
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c9910239
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g1
:
GetFirst
()
local
g2
=
Duel
.
GetMatchingGroup
(
c9910239
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
nil
,
tc
:
GetLink
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g2
,
g2
:
GetCount
(),
0
,
0
)
end
function
c9910239
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
g
=
Duel
.
GetMatchingGroup
(
c9910239
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
nil
,
tc
:
GetLink
())
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
expansions/script/c9910244.lua
deleted
100644 → 0
View file @
46a89ec3
--天空漫步者-冲刺
function
c9910244
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c9910244
.
condition
)
e1
:
SetTarget
(
c9910244
.
target
)
e1
:
SetOperation
(
c9910244
.
activate
)
c
:
RegisterEffect
(
e1
)
--atk down
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
2
,
9910244
)
e2
:
SetCost
(
c9910244
.
atkcost
)
e2
:
SetTarget
(
c9910244
.
atktg
)
e2
:
SetOperation
(
c9910244
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c9910244
.
cfilter
(
c
)
return
c
:
GetSequence
()
<
5
and
(
c
:
IsFacedown
()
or
not
c
:
IsRace
(
RACE_PSYCHO
))
end
function
c9910244
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c9910244
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c9910244
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x955
)
and
c
:
IsType
(
TYPE_LINK
)
end
function
c9910244
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c9910244
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9910244
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c9910244
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c9910244
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
1
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EFFECT_CHANGE_BATTLE_DAMAGE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetValue
(
HALF_DAMAGE
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c9910244
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsLocation
(
LOCATION_REMOVED
)
and
c
:
IsAbleToGrave
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_RETURN
)
end
function
c9910244
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
c9910244
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
local
sc
=
g
:
GetFirst
()
while
sc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
-
1000
)
sc
:
RegisterEffect
(
e1
)
sc
=
g
:
GetNext
()
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment