Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
pre-release-database-cdb
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
yks
pre-release-database-cdb
Commits
151a06be
Commit
151a06be
authored
Nov 14, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
twak scripts
parent
2a3acee5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
313 additions
and
357 deletions
+313
-357
script/c100211122.lua
script/c100211122.lua
+59
-74
script/c101203064.lua
script/c101203064.lua
+11
-11
script/c101204001.lua
script/c101204001.lua
+47
-55
script/c101204002.lua
script/c101204002.lua
+20
-20
script/c101204004.lua
script/c101204004.lua
+38
-47
script/c101204005.lua
script/c101204005.lua
+50
-53
script/c101204051.lua
script/c101204051.lua
+68
-78
script/c101204052.lua
script/c101204052.lua
+1
-0
script/c101204053.lua
script/c101204053.lua
+19
-19
No files found.
script/c100211122.lua
View file @
151a06be
--精灵兽使 蕾拉
--精霊獣使い レラ
--code by lightup37
local
s
,
id
,
o
=
GetID
()
function
c100211122
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--add ns
c
:
SetSPSummonOnce
(
id
)
c
:
SetSPSummonOnce
(
100211122
)
--normal summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SUMMON
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCategory
(
CATEGORY_SUMMON
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCost
(
c100211122
.
sumcost
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetTarget
(
c100211122
.
sumtg
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetOperation
(
c100211122
.
sumop
)
e1
:
SetCost
(
s
.
sumcost
)
e1
:
SetCountLimit
(
1
,
100211122
)
e1
:
SetTarget
(
s
.
sumtg
)
e1
:
SetOperation
(
s
.
sumop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--destroy replace
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
+
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
100211122
+
100
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetTarget
(
c100211122
.
reptg
)
e2
:
SetTarget
(
s
.
reptg
)
e2
:
SetValue
(
c100211122
.
repval
)
e2
:
SetValue
(
s
.
repval
)
e2
:
SetOperation
(
c100211122
.
repop
)
e2
:
SetOperation
(
s
.
repop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCountLimit
(
1
,
id
+
o
*
2
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--when be remove
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
100211122
+
200
)
e3
:
SetTarget
(
c100211122
.
sstg
)
e3
:
SetOperation
(
c100211122
.
ssop
)
c
:
RegisterEffect
(
e3
)
end
end
function
s
.
sumcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c100211122
.
sumcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
s
.
filter
(
c
)
function
c100211122
.
sumfilter
(
c
)
return
c
:
IsSetCard
(
0xb5
)
and
c
:
IsSummonable
(
true
,
nil
)
return
c
:
IsSetCard
(
0xb5
)
and
c
:
IsSummonable
(
true
,
nil
)
end
end
function
s
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c100211122
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
local
c
=
e
:
GetHandler
()
return
Duel
.
IsExistingMatchingCard
(
c100211122
.
sumfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
c
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
end
function
s
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c100211122
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100211122
.
sumfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
g
:
GetCount
()
>
0
then
if
tc
then
Duel
.
Summon
(
tp
,
g
:
GetFirst
(),
true
,
nil
)
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
)
end
end
end
end
function
s
.
repfilter
(
c
,
tp
)
function
c100211122
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb5
)
and
c
:
IsSetCard
(
0xb5
)
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
and
c
:
IsOnField
()
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
end
function
s
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c100211122
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
c100211122
.
repfilter
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
eg
:
IsExists
(
s
.
repfilter
,
1
,
c
,
tp
)
and
c
:
IsAbleToRemove
()
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
)
end
end
return
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
function
c100211122
.
repval
(
e
,
c
)
return
c100211122
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
end
function
s
.
repval
(
e
,
c
)
function
c100211122
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
s
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
s
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c100211122
.
ssfilter
(
c
,
e
,
tp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
return
c
:
IsSetCard
(
0xb5
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c100211122
.
sstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
IsExistingMatchingCard
(
c100211122
.
ssfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c100211122
.
ssop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c100211122
.
ss
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
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
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
...
...
script/c101203064.lua
View file @
151a06be
--地縛融合
--地縛融合
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
s
.
condition
)
e1
:
SetCondition
(
s
.
condition
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--search
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
@@ -19,24 +19,24 @@ function s.initial_effect(c)
...
@@ -19,24 +19,24 @@ function s.initial_effect(c)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCondition
(
s
.
condition1
)
e2
:
SetCondition
(
s
.
condition1
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
s
.
spop
)
e2
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
--to spsummon 0x21
--to spsummon 0x21
function
s
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
Duel
.
GetTurnPlayer
()
==
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_FZONE
,
LOCATION_FZONE
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_FZONE
,
LOCATION_FZONE
,
1
,
nil
)
end
end
function
s
.
spfilter
(
c
,
e
,
tp
)
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x21
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x21
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
@@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
s
.
spfilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
s
.
spfilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
tc
then
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
@@ -61,9 +61,9 @@ function s.splimit(e,c)
...
@@ -61,9 +61,9 @@ function s.splimit(e,c)
end
end
--fusion
--fusion
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_FZONE
,
LOCATION_FZONE
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_FZONE
,
LOCATION_FZONE
,
1
,
nil
)
or
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
or
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
end
function
s
.
filter1
(
c
,
e
)
function
s
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
...
...
script/c101204001.lua
View file @
151a06be
--破坏龙 甘多拉G
--破壊竜ガンドラG
--破壊竜ガンドラG
--script by REIKAI
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
101204051
)
aux
.
AddCodeList
(
c
,
101204051
)
--
Special Summo
n
--
atk gai
n
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetValue
(
s
.
value
)
e1
:
SetCondition
(
s
.
sscon
)
e1
:
SetTarget
(
s
.
sstg
)
e1
:
SetOperation
(
s
.
ssop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
atk
--
spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetValue
(
s
.
value
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
s
.
condition
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
rm and
special summon
--
destroy +
special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_
REMOVE
+
CATEGORY_
SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
id
+
o
)
e3
:
SetCountLimit
(
1
,
id
+
o
)
...
@@ -35,62 +33,56 @@ function s.initial_effect(c)
...
@@ -35,62 +33,56 @@ function s.initial_effect(c)
e3
:
SetOperation
(
s
.
desop
)
e3
:
SetOperation
(
s
.
desop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
s
.
value
(
e
,
c
)
return
Duel
.
GetFieldGroupCount
(
c
:
GetControler
(),
LOCATION_REMOVED
,
LOCATION_REMOVED
)
*
300
end
function
s
.
cfilter
(
c
)
function
s
.
cfilter
(
c
)
return
c
:
Is
Faceup
()
and
c
:
IsCode
(
101204051
)
return
c
:
Is
Code
(
101204051
)
and
c
:
IsFaceup
(
)
end
end
function
s
.
ssc
on
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
conditi
on
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
function
s
.
s
s
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
s
p
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
s
.
s
s
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
s
p
op
(
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
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
s
.
value
(
e
,
c
)
function
s
.
spfilter
(
c
,
e
,
tp
)
return
Duel
.
GetFieldGroupCount
(
c
:
GetControler
(),
LOCATION_REMOVED
,
LOCATION_REMOVED
)
*
300
return
aux
.
IsCodeListed
(
c
,
101204051
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
s
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
Duel
.
PayLPCost
(
tp
,
math.floor
(
Duel
.
GetLP
(
tp
)
/
2
))
end
end
function
s
.
rmcheck
(
c
,
e
,
tp
)
return
c
:
IsAbleToRemove
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spcheck
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
function
s
.
spcheck
(
c
,
e
,
tp
)
return
aux
.
IsCodeListed
(
c
,
101204051
)
and
c
:
IsLevelBelow
(
7
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
rmcheck
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
())
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
c
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
local
sg
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
REMOVE
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_
DESTROY
,
sg
,
s
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_DECK
)
end
end
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
e
:
GetHandler
()
)
local
c
=
e
:
GetHandler
(
)
if
g
:
GetCount
()
==
0
then
return
end
local
sg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
aux
.
ExceptThisCard
(
e
))
local
num
=
Duel
.
Destroy
(
g
,
REASON_EFFECT
,
LOCATION_REMOVED
)
local
ct
=
Duel
.
Destroy
(
s
g
,
REASON_EFFECT
,
LOCATION_REMOVED
)
local
sg
=
Duel
.
GetMatchingGroup
(
s
.
spcheck
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
if
ct
==
0
then
return
end
if
num
>
0
and
sg
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
Duel
.
BreakEffect
()
if
tc
then
if
Duel
.
SpecialSummon
Step
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
1
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
()
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
num
)
e1
:
SetValue
(
ct
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
tc
:
CompleteProcedure
()
end
end
Duel
.
SpecialSummonComplete
()
end
end
end
end
\ No newline at end of file
script/c101204002.lua
View file @
151a06be
--沉默剑士·零
--サイレント・ソードマン・ゼロ
--サイレント・ソードマン・ゼロ
--script by REIKAI
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
101204051
)
aux
.
AddCodeList
(
c
,
101204051
)
--level up
--level up
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetOperation
(
s
.
lvop
)
e1
:
SetOperation
(
s
.
lvop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--atk
--atk
up
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
...
@@ -21,24 +20,20 @@ function s.initial_effect(c)
...
@@ -21,24 +20,20 @@ function s.initial_effect(c)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetValue
(
s
.
value
)
e2
:
SetValue
(
s
.
value
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--negate
--negate
& level up
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetCategory
(
CATEGORY_NEGATE
)
e3
:
SetCategory
(
CATEGORY_NEGATE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetCondition
(
s
.
discon
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTarget
(
s
.
distg
)
e3
:
SetCondition
(
s
.
negcon
)
e3
:
SetOperation
(
s
.
disop
)
e3
:
SetTarget
(
s
.
negtg
)
e3
:
SetOperation
(
s
.
negop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
s
.
value
(
e
,
c
)
local
val
=
c
:
GetLevel
()
-
c
:
GetOriginalLevel
()
return
val
>
0
and
val
*
500
or
0
end
function
s
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
lvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
...
@@ -49,27 +44,32 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -49,27 +44,32 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
value
(
e
,
c
)
return
math.max
(
0
,
c
:
GetLevel
()
-
c
:
GetOriginalLevel
())
*
500
end
function
s
.
tfilter
(
c
,
tp
)
function
s
.
tfilter
(
c
,
tp
)
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
(
c
:
IsCode
(
101204051
)
or
aux
.
IsCodeListed
(
c
,
101204051
))
return
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
(
aux
.
IsCodeListed
(
c
,
101204051
)
or
c
:
IsCode
(
101204051
))
and
c
:
IsControler
(
tp
)
and
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
and
c
:
IsFaceup
()
end
end
function
s
.
dis
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
neg
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
rp
==
tp
or
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
if
rp
==
tp
or
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
tg
and
tg
:
IsExists
(
s
.
tfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainNegatable
(
ev
)
return
tg
and
tg
:
IsExists
(
s
.
tfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainNegatable
(
ev
)
end
end
function
s
.
dis
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
neg
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsLevelAbove
(
1
)
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
end
end
function
s
.
dis
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
neg
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
Duel
.
NegateActivation
(
ev
)
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
Duel
.
NegateActivation
(
ev
)
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
1
)
e1
:
SetValue
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
...
...
script/c101204004.lua
View file @
151a06be
--
三色零件
--
トリコロール・ガジェット
--code by lightup37
local
s
,
id
,
o
=
GetID
()
function
c101204004
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
101204051
)
aux
.
AddCodeList
(
c
,
101204051
)
--search
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
101204004
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_
TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetCategory
(
CATEGORY_
SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
101204004
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
c101204004
.
th
tg
)
e1
:
SetTarget
(
s
.
sr
tg
)
e1
:
SetOperation
(
c101204004
.
th
op
)
e1
:
SetOperation
(
s
.
sr
op
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e3
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
--break
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
101204004
,
2
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetCondition
(
c101204004
.
stcon
)
e2
:
SetTarget
(
c101204004
.
sttg
)
e2
:
SetOperation
(
c101204004
.
stop
)
e2
:
SetCountLimit
(
1
,
101204004
+
100
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--set from deck
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetCountLimit
(
1
,
id
+
o
)
e1
:
SetCondition
(
s
.
setcon
)
e1
:
SetTarget
(
s
.
settg
)
e1
:
SetOperation
(
s
.
setop
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
srfilter
(
c
)
function
c101204004
.
thfilter
(
c
)
return
c
:
IsCode
(
101204051
)
or
(
aux
.
IsCodeListed
(
c
,
101204051
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
))
and
c
:
IsAbleToHand
()
return
(
(
aux
.
IsCodeListed
(
c
,
101204051
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
)
)
or
(
c
:
IsCode
(
101204051
))
)
and
c
:
IsAbleToHand
()
end
end
function
s
.
srtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c101204004
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
srfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101204004
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
s
.
srop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c101204004
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101204004
.
th
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
sr
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
s
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c101204004
.
stfilter
(
c
)
return
c
:
IsCode
(
101204071
)
and
c
:
IsSSetable
()
end
function
c101204004
.
stcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
end
end
function
s
.
setfilter
(
c
)
function
c101204004
.
sttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
return
c
:
IsCode
(
101204071
)
and
c
:
IsSSetable
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101204004
.
stfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
s
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
end
function
s
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c101204004
.
stop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101204004
.
s
tfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
se
tfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
()
)
Duel
.
SSet
(
tp
,
g
)
end
end
end
end
\ No newline at end of file
script/c101204005.lua
View file @
151a06be
--绵绵棉花糖
--マシマシュマロン
--マシマシュマロ
--script by REIKAI
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
101204051
)
aux
.
AddCodeList
(
c
,
101204051
)
--
Special Summon
--
battle indestructable
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCondition
(
s
.
indescon
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetValue
(
1
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCondition
(
s
.
sscon
)
e1
:
SetTarget
(
s
.
sstg
)
e1
:
SetOperation
(
s
.
ssop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
battle indestructable
--
atk limit
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
s
.
sscon2
)
e2
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e2
:
SetValue
(
1
)
e2
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e2
:
SetCondition
(
s
.
indescon
)
e2
:
SetValue
(
s
.
atlimit
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
atk limit
--
self spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e3
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCondition
(
s
.
sscon2
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetValue
(
s
.
tgtg
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e3
:
SetCondition
(
s
.
spcon
)
e3
:
SetTarget
(
s
.
sptg
)
e3
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--special summon
--special summon
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
...
@@ -42,51 +39,51 @@ function s.initial_effect(c)
...
@@ -42,51 +39,51 @@ function s.initial_effect(c)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCountLimit
(
1
,
id
+
o
)
e4
:
SetCountLimit
(
1
,
id
+
o
)
e4
:
SetCondition
(
s
.
spcon
)
e4
:
SetCondition
(
s
.
spcon
2
)
e4
:
SetTarget
(
s
.
sptg
)
e4
:
SetTarget
(
s
.
sptg
2
)
e4
:
SetOperation
(
s
.
spop
)
e4
:
SetOperation
(
s
.
spop
2
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
s
.
c
filter
(
c
)
function
s
.
indes
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
101204051
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
101204051
)
end
end
function
s
.
sscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
indescon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
IsExistingMatchingCard
(
s
.
indesfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
function
s
.
sscon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atlimit
(
e
,
c
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
return
c
~=
e
:
GetHandler
(
)
end
end
function
s
.
sstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
return
Duel
.
IsExistingMatchingCard
(
s
.
indesfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
GetTurnPlayer
()
~=
tp
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
s
.
s
s
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
s
p
op
(
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
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
s
.
tgtg
(
e
,
c
)
function
s
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
~=
e
:
GetHandler
()
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
end
function
s
.
spfilter
(
c
,
e
,
tp
)
function
s
.
spfilter
2
(
c
,
e
,
tp
)
return
c
:
IsCode
(
id
)
and
c
:
Is
FaceupEx
()
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsCode
(
id
)
and
c
:
Is
CanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
(
c
:
IsLocation
(
LOCATION_HAND
+
LOCATION_GRAVE
)
or
c
:
IsFaceup
()
)
end
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter2
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
1000
)
end
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spop
2
(
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
,
aux
.
NecroValleyFilter
(
s
.
spfilter
),
tp
,
LOCATION_DECK
+
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
s
.
spfilter
2
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
1000
,
REASON_EFFECT
)
end
end
end
end
...
...
script/c101204051.lua
View file @
151a06be
--光之黄金柜
--光の黄金櫃
--code by lightup37
local
s
,
id
,
o
=
GetID
()
function
c101204051
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--cannot be destroyed
aux
.
AddCodeList
(
c
,
101204051
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetValue
(
c101204051
.
efilter
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--search
--indes
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
Set
Category
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
Set
Type
(
EFFECT_TYPE_SINGLE
)
e2
:
Set
Type
(
EFFECT_TYPE_IGNITION
)
e2
:
Set
Property
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
101204051
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetTarget
(
c101204051
.
thtg
)
e2
:
SetValue
(
s
.
indesval
)
e2
:
SetOperation
(
c101204051
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--tograve
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOGRAVE
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
,
101204051
+
100
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetTarget
(
s
.
srtg
)
e3
:
SetCondition
(
c101204051
.
tgcon
)
e3
:
SetOperation
(
s
.
srop
)
e3
:
SetCost
(
c101204051
.
tgcost
)
c
:
RegisterEffect
(
e3
)
e3
:
SetTarget
(
c101204051
.
tgtg
)
--to grave
e3
:
SetOperation
(
c101204051
.
tgop
)
c
:
RegisterEffect
(
e3
)
--Activate
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e4
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCountLimit
(
1
,
id
+
o
)
e4
:
SetCondition
(
s
.
gycon
)
e4
:
SetCost
(
s
.
gycost
)
e4
:
SetTarget
(
s
.
gytg
)
e4
:
SetOperation
(
s
.
gyop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
s
.
indesval
(
e
,
re
)
function
c101204051
.
efilter
(
e
,
re
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
return
re
:
IsActiveType
(
TYPE_EFFECT
)
end
end
function
s
.
srfilter
(
c
)
function
c101204051
.
filter
(
c
)
return
aux
.
IsCodeListed
(
c
,
id
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
id
)
return
(
aux
.
IsCodeListed
(
c
,
101204051
))
and
(
c
:
IsAbleToHand
())
and
(
not
c
:
IsCode
(
101204051
))
end
end
function
c101204051
.
th
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sr
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101204051
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
sr
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c101204051
.
th
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
sr
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101204051
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
sr
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
s
.
gyfilter
(
c
,
tp
)
function
c101204051
.
tgfilter
(
c
)
return
c
:
IsSummonLocation
(
LOCATION_GRAVE
)
and
c
:
IsSummonPlayer
(
1
-
tp
)
and
c
:
IsAbleToGrave
()
return
c
:
IsPreviousLocation
(
LOCATION_GRAVE
)
and
c
:
IsAbleToGrave
()
and
c
:
IsOnField
()
end
function
c101204051
.
tgffilter
(
c
,
eg
)
return
c
:
IsPreviousLocation
(
LOCATION_GRAVE
)
and
eg
:
IsContains
(
c
)
and
c
:
IsAbleToGrave
()
and
c
:
IsOnField
()
end
end
function
s
.
gycon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c101204051
.
disfilter
(
c
)
return
eg
:
IsExists
(
s
.
gyfilter
,
1
,
nil
,
tp
)
return
c
:
IsDiscardable
()
and
c
:
IsType
(
TYPE_SPELL
)
end
end
function
s
.
disfilter
(
c
)
function
c101204051
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsDiscardable
()
return
(
rp
==
1
-
tp
)
and
eg
:
IsExists
(
c101204051
.
tgfilter
,
1
,
nil
)
end
end
function
s
.
gycost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c101204051
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
disfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101204051
.
disfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
s
.
disfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
DiscardHand
(
tp
,
c101204051
.
disfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
s
.
gytg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c101204051
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
g
=
eg
:
Filter
(
s
.
gyfilter
,
nil
,
tp
)
if
chkc
then
return
c101204051
.
tgffilter
(
chkc
,
eg
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
aux
.
IsInGroup
(
chkc
,
g
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c101204051
.
tgffilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
,
eg
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
IsInGroup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
g
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c101204051
.
tgffilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
eg
)
local
sg
Duel
.
SetTargetCard
(
g
)
if
g
:
GetCount
()
==
1
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
sg
=
g
:
Clone
()
Duel
.
SetTargetCard
(
sg
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
sg
=
Duel
.
SelectTarget
(
tp
,
aux
.
IsInGroup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
g
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
sg
,
1
,
0
,
0
)
end
end
function
s
.
gyop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c101204051
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
--光の黄金櫃
--永续魔法
--这个卡名的②③的效果1回合各能使用1次。
--①:这张卡只要在魔法与陷阱区域存在,不会被怪兽的效果破坏。
--②:自己主要阶段才能发动。从卡组把,除「光の黄金櫃」外的,1张有「光の黄金櫃」的卡名记述的卡加入手卡。
--③:对方从墓地把怪兽特殊召唤的场合,从手卡丢弃1张魔法卡,以那之内的1只为对象才能发动。那只怪兽送去墓地。
\ No newline at end of file
script/c101204052.lua
View file @
151a06be
...
@@ -37,6 +37,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -37,6 +37,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
3
)
e1
:
SetValue
(
3
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
local
ct
=
Duel
.
GetCurrentChain
()
local
ct
=
Duel
.
GetCurrentChain
()
if
ct
<
2
then
return
end
if
ct
<
2
then
return
end
...
...
script/c101204053.lua
View file @
151a06be
--同伴的牵绊
--仲間の絆
--仲間の絆
--script by REIKAI
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
101204051
)
aux
.
AddCodeList
(
c
,
101204051
)
--
A
ctivate
--
a
ctivate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
...
@@ -15,41 +13,43 @@ function s.initial_effect(c)
...
@@ -15,41 +13,43 @@ function s.initial_effect(c)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
cfilter
(
c
)
function
s
.
cfilter
1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
101204051
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
101204051
)
end
end
function
s
.
cfilter2
(
c
)
function
s
.
cfilter2
(
c
)
return
c
:
IsFaceup
()
and
aux
.
IsCodeListed
(
c
,
101204051
)
return
c
:
IsFaceup
()
and
aux
.
IsCodeListed
(
c
,
101204051
)
end
end
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
s
.
sp
check
(
c
,
e
,
tp
)
function
s
.
sp
filter
(
c
,
e
,
tp
)
return
aux
.
IsCodeListed
(
c
,
101204051
)
and
c
:
Is
LevelBelow
(
4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
aux
.
IsCodeListed
(
c
,
101204051
)
and
c
:
Is
CanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsLevelBelow
(
4
)
end
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spcheck
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
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
c
=
e
:
GetHandler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<
1
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
ft
=
math.min
(
2
,
ft
)
if
g
:
GetCount
()
>
0
and
ft
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
s
.
spcheck
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
local
ct
=
math.min
(
ft
,
2
)
ft
=
1
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
1
,
ct
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g1
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
1
,
ft
)
Duel
.
SpecialSummon
(
g1
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
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
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
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