Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
0c879245
Commit
0c879245
authored
Sep 20, 2023
by
Huangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pre card 0920
parent
add63643
Pipeline
#23517
passed with stages
in 28 minutes and 44 seconds
Changes
36
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
2507 additions
and
7 deletions
+2507
-7
expansions/pre-release.cdb
expansions/pre-release.cdb
+0
-0
expansions/script/c100200243.lua
expansions/script/c100200243.lua
+83
-0
expansions/script/c100209281.lua
expansions/script/c100209281.lua
+113
-0
expansions/script/c100209282.lua
expansions/script/c100209282.lua
+70
-0
expansions/script/c100209283.lua
expansions/script/c100209283.lua
+84
-0
expansions/script/c100211001.lua
expansions/script/c100211001.lua
+87
-0
expansions/script/c100211002.lua
expansions/script/c100211002.lua
+77
-0
expansions/script/c100211003.lua
expansions/script/c100211003.lua
+102
-0
expansions/script/c100211004.lua
expansions/script/c100211004.lua
+111
-0
expansions/script/c100211097.lua
expansions/script/c100211097.lua
+83
-0
expansions/script/c100211098.lua
expansions/script/c100211098.lua
+106
-0
expansions/script/c100211099.lua
expansions/script/c100211099.lua
+78
-0
expansions/script/c100211100.lua
expansions/script/c100211100.lua
+89
-0
expansions/script/c100314001.lua
expansions/script/c100314001.lua
+1
-1
expansions/script/c100314033.lua
expansions/script/c100314033.lua
+34
-3
expansions/script/c100314052.lua
expansions/script/c100314052.lua
+108
-0
expansions/script/c101202017.lua
expansions/script/c101202017.lua
+3
-2
expansions/script/c101203002.lua
expansions/script/c101203002.lua
+1
-1
expansions/script/c101203006.lua
expansions/script/c101203006.lua
+66
-0
expansions/script/c101203007.lua
expansions/script/c101203007.lua
+72
-0
expansions/script/c101203018.lua
expansions/script/c101203018.lua
+73
-0
expansions/script/c101203019.lua
expansions/script/c101203019.lua
+77
-0
expansions/script/c101203020.lua
expansions/script/c101203020.lua
+54
-0
expansions/script/c101203021.lua
expansions/script/c101203021.lua
+93
-0
expansions/script/c101203023.lua
expansions/script/c101203023.lua
+76
-0
expansions/script/c101203037.lua
expansions/script/c101203037.lua
+80
-0
expansions/script/c101203041.lua
expansions/script/c101203041.lua
+93
-0
expansions/script/c101203049.lua
expansions/script/c101203049.lua
+119
-0
expansions/script/c101203051.lua
expansions/script/c101203051.lua
+66
-0
expansions/script/c101203058.lua
expansions/script/c101203058.lua
+76
-0
expansions/script/c101203065.lua
expansions/script/c101203065.lua
+70
-0
expansions/script/c101203066.lua
expansions/script/c101203066.lua
+51
-0
expansions/script/c101203067.lua
expansions/script/c101203067.lua
+68
-0
expansions/script/c101203069.lua
expansions/script/c101203069.lua
+51
-0
expansions/script/c101203076.lua
expansions/script/c101203076.lua
+90
-0
expansions/strings.conf
expansions/strings.conf
+2
-0
No files found.
expansions/pre-release.cdb
View file @
0c879245
No preview for this file type
expansions/script/c100200243.lua
0 → 100644
View file @
0c879245
--征覇竜-ブレイズ
--Script by Ruby
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
7
,
2
)
c
:
EnableReviveLimit
()
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
operation
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCost
(
s
.
spcost
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
hg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
if
hg
:
GetCount
()
==
0
then
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
2
,
0
,
0
)
else
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
end
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
)
>
0
and
Duel
.
GetFieldGroupCount
(
1
-
tp
,
LOCATION_ONFIELD
,
0
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
HintSelection
(
g1
)
Duel
.
Destroy
(
g1
,
REASON_EFFECT
)
end
end
function
s
.
rfilter
(
c
)
return
(
c
:
IsRace
(
RACE_DRAGON
)
or
c
:
IsAttribute
(
ATTRIBUTE_FIRE
))
and
c
:
IsAbleToRemoveAsCost
()
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
rfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
2
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
rfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
2
,
2
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_REDIRECT
)
e1
:
SetValue
(
LOCATION_DECK
)
c
:
RegisterEffect
(
e1
,
true
)
end
end
expansions/script/c100209281.lua
0 → 100644
View file @
0c879245
--聖騎士と聖剣の巨城
--Camelot, Realm of Noble Knights and Noble Arms
--coded by Lyris
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--destroy equip
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
s
.
reptg
)
e2
:
SetOperation
(
s
.
repop
)
e2
:
SetValue
(
s
.
repval
)
c
:
RegisterEffect
(
e2
)
--remove & place
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e3
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_GRAVE_ACTION
+
CATEGORY_GRAVE_SPSUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetTarget
(
s
.
rptg
)
e3
:
SetOperation
(
s
.
rpop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
filter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x107a
)
and
c
:
IsControler
(
tp
)
and
c
:
IsOnField
()
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
not
c
:
IsReason
(
REASON_REPLACE
)
end
function
s
.
dfilter
(
c
,
e
)
return
c
:
GetEquipTarget
()
and
c
:
IsDestructable
(
e
)
and
not
c
:
IsStatus
(
STATUS_DESTROY_CONFIRMED
)
end
function
s
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
dfilter
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
e
)
if
chk
==
0
then
return
eg
:
IsExists
(
s
.
filter
,
1
,
nil
,
tp
)
and
#
g
>
0
end
local
c
=
e
:
GetHandler
()
if
Duel
.
SelectEffectYesNo
(
tp
,
c
,
96
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESREPLACE
)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
SetTargetCard
(
tc
)
tc
:
SetStatus
(
STATUS_DESTROY_CONFIRMED
,
true
)
return
true
else
return
false
end
end
function
s
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
tc
:
SetStatus
(
STATUS_DESTROY_CONFIRMED
,
false
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
+
REASON_REPLACE
)
end
function
s
.
repval
(
e
,
c
)
return
s
.
filter
(
c
,
e
:
GetHandlerPlayer
())
end
function
s
.
pfilter
(
c
,
tp
)
return
c
:
IsCode
(
55742055
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
)
end
function
s
.
rptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToRemove
()
and
Duel
.
IsExistingMatchingCard
(
s
.
pfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
c
,
1
,
0
,
0
)
end
function
s
.
sfilter
(
c
,
e
,
tp
)
if
c
:
IsSetCard
(
0xa7
)
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
elseif
c
:
IsSetCard
(
0x207a
)
then
return
c
:
IsAbleToHand
()
end
return
false
end
function
s
.
rpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_TEMPORARY
)
==
0
or
not
c
:
IsLocation
(
LOCATION_REMOVED
)
then
return
end
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_STANDBY
,
0
,
2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_STANDBY
,
2
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
retcon
)
e1
:
SetOperation
(
s
.
retop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
s
.
pfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
not
(
tc
and
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
true
))
then
return
end
local
tg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
s
.
sfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
#
tg
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
sc
=
tg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
op
=
aux
.
SelectFromOptions
(
tp
,{
sc
:
IsSetCard
(
0xa7
),
1152
},{
sc
:
IsSetCard
(
0x207a
),
1190
})
Duel
.
BreakEffect
()
if
op
==
2
then
Duel
.
SendtoHand
(
sc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sc
)
else
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
s
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetOwner
():
GetFlagEffect
(
id
)
>
0
end
function
s
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_FZONE
,
0
)
if
fc
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
end
Duel
.
MoveToField
(
e
:
GetOwner
(),
tp
,
tp
,
LOCATION_FZONE
,
POS_FACEUP
,
true
)
e
:
Reset
()
end
expansions/script/c100209282.lua
0 → 100644
View file @
0c879245
--クロノダイバー・パワーリザーブ
--Time Thief Power Reserve
--coded by Lyris
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DECKDES
+
CATEGORY_GRAVE_SPSUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCondition
(
s
.
rmcon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
s
.
rmtg
)
e2
:
SetOperation
(
s
.
rmop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
id
,
0x126
,
TYPES_NORMAL_TRAP_MONSTER
,
1900
,
2500
,
4
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
filter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsSetCard
(
0x126
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
or
not
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
id
,
0x126
,
TYPES_NORMAL_TRAP_MONSTER
,
1900
,
2500
,
4
,
RACE_PSYCHO
,
ATTRIBUTE_DARK
)
then
return
end
local
c
=
e
:
GetHandler
()
c
:
AddMonsterAttribute
(
TYPE_NORMAL
+
TYPE_TRAP
)
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
==
0
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
s
.
filter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
#
g
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
s
.
tchk
(
c
)
return
c
:
GetType
()
&
0x6
end
function
s
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetOverlayGroup
():
GetClassCount
(
s
.
tchk
)
>
1
end
function
s
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
s
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
if
chk
==
0
then
return
#
g
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
s
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
expansions/script/c100209283.lua
0 → 100644
View file @
0c879245
--SPYRAL-ダブルフェイク
--SPYRAL Double Agent
--coded by Lyris
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--direct attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsCode
,
41091257
))
c
:
RegisterEffect
(
e2
)
--atk up
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0xee
))
e3
:
SetValue
(
500
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
filter
(
c
)
return
c
:
IsFaceupEx
()
and
c
:
IsSetCard
(
0xee
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
1
-
tp
)
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
0
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
chk
=
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
if
chk
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UNRELEASABLE_SUM
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UNRELEASABLE_NONSUM
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e3
:
SetValue
(
s
.
lim
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e1
:
Clone
()
e5
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e1
:
Clone
()
e6
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
c
:
RegisterEffect
(
e6
)
end
Duel
.
SpecialSummonComplete
()
if
chk
then
Duel
.
BreakEffect
()
Duel
.
ConfirmDecktop
(
tp
,
1
)
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
end
end
function
s
.
lim
(
e
,
c
,
st
)
return
st
==
SUMMON_TYPE_FUSION
end
expansions/script/c100211001.lua
0 → 100644
View file @
0c879245
--氷霊山の龍祖 ランセア
--Script by 蓝蓝
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_WATER
),
aux
.
NonTuner
(
nil
),
1
)
--special summon from deck
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_POSITION
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
2
,
id
)
e1
:
SetCondition
(
s
.
spcon1
)
e1
:
SetTarget
(
s
.
sptg1
)
e1
:
SetOperation
(
s
.
spop1
)
c
:
RegisterEffect
(
e1
)
--special summon from extra
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
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
s
.
spcon2
)
e2
:
SetTarget
(
s
.
sptg2
)
e2
:
SetOperation
(
s
.
spop2
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsSummonPlayer
(
1
-
tp
)
end
function
s
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
end
function
s
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
GetFlagEffect
(
id
)
==
0
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_EXTRA
)
e
:
GetHandler
():
RegisterFlagEffect
(
id
,
RESET_CHAIN
,
0
,
1
)
end
function
s
.
posfilter
(
c
)
return
c
:
IsAttackPos
()
and
c
:
IsCanChangePosition
()
end
function
s
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
#
sg
>
0
and
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
posfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
posfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
ChangePosition
(
tg
:
GetFirst
(),
POS_FACEUP_DEFENSE
)
end
end
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_SYNCHRO
,
tp
,
false
,
false
)
end
function
s
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
GetReasonPlayer
()
==
1
-
tp
end
function
s
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
s
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
tc
:
SetMaterial
(
nil
)
if
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_SYNCHRO
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
tc
:
CompleteProcedure
()
end
end
end
expansions/script/c100211002.lua
0 → 100644
View file @
0c879245
--氷結界の剣士 ゲオルギアス
--Script by beyond
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--self special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--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
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetTarget
(
s
.
sptg1
)
e2
:
SetOperation
(
s
.
spop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
--activate limit
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e4
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
0
,
1
)
e4
:
SetCondition
(
s
.
actcon
)
e4
:
SetValue
(
s
.
aclimit
)
c
:
RegisterEffect
(
e4
)
end
function
s
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsFaceup
()
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsLevelBelow
(
5
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
s
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
s
.
spfilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
s
.
actcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
function
s
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetActivateLocation
()
==
LOCATION_GRAVE
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
\ No newline at end of file
expansions/script/c100211003.lua
0 → 100644
View file @
0c879245
--氷結界の鏡魔師
--Script by beyond
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--token
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
rfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_EFFECT
)
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
s
.
rfilter
,
1
,
c
,
1
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
s
.
rfilter
,
1
,
1
,
c
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
100211203
,
0
,
TYPES_TOKEN_MONSTER
,
0
,
0
,
1
,
RACE_AQUA
,
ATTRIBUTE_WATER
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
ct
=
3
if
ft
>
0
and
ct
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
100211203
,
0
,
TYPES_TOKEN_MONSTER
,
0
,
0
,
1
,
RACE_AQUA
,
ATTRIBUTE_WATER
)
then
local
count
=
math.min
(
ft
,
ct
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
count
=
1
end
if
count
>
1
then
local
num
=
{}
local
i
=
1
while
i
<=
count
do
num
[
i
]
=
i
i
=
i
+
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
id
,
1
))
count
=
Duel
.
AnnounceNumber
(
tp
,
table.unpack
(
num
))
end
local
lv
=
count
repeat
local
token
=
Duel
.
CreateToken
(
tp
,
100211203
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
count
=
count
-
1
until
count
==
0
Duel
.
SpecialSummonComplete
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetValue
(
lv
)
c
:
RegisterEffect
(
e1
)
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
splimit
(
e
,
c
)
return
not
(
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsType
(
TYPE_SYNCHRO
))
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
function
s
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
id
)
and
c
:
IsFaceupEx
()
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
#
tg
>
0
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
\ No newline at end of file
expansions/script/c100211004.lua
0 → 100644
View file @
0c879245
--氷結界に至る晶域
--Script by beyond
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--chain limit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetOperation
(
s
.
chainop
)
c
:
RegisterEffect
(
e1
)
--to deck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
s
.
tdcon
)
e2
:
SetTarget
(
s
.
tdtg
)
e2
:
SetOperation
(
s
.
tdop
)
c
:
RegisterEffect
(
e2
)
--self destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_TRIGGER_F
+
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
s
.
descon
)
e3
:
SetTarget
(
s
.
destg
)
e3
:
SetOperation
(
s
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
chainop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
if
re
:
IsActiveType
(
TYPE_MONSTER
)
and
loc
==
LOCATION_MZONE
and
rc
:
IsSetCard
(
0x2f
)
then
Duel
.
SetChainLimit
(
s
.
chainlm
)
end
end
function
s
.
chainlm
(
e
,
rp
,
tp
)
return
tp
==
rp
end
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsSummonLocation
(
LOCATION_EXTRA
)
end
function
s
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
end
function
s
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x2f
)
and
(
c
:
IsAbleToHand
()
or
c
:
IsAbleToDeck
())
end
function
s
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
s
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
res
=
false
if
tc
:
IsType
(
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
+
TYPE_LINK
)
and
tc
:
IsAbleToDeck
()
then
if
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_EXTRA
)
then
res
=
true
end
elseif
tc
:
IsType
(
TYPE_TOKEN
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
elseif
tc
:
IsAbleToHand
()
and
(
not
tc
:
IsAbleToDeck
()
or
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
id
,
2
),
aux
.
Stringid
(
id
,
3
))
==
0
)
then
if
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_HAND
)
then
res
=
true
end
else
if
Duel
.
SendtoDeck
(
tc
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
~=
0
and
tc
:
IsLocation
(
LOCATION_DECK
)
then
res
=
true
end
end
if
res
and
Duel
.
IsExistingMatchingCard
(
s
.
tdfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
4
))
then
Duel
.
BreakEffect
()
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tdfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g2
,
nil
,
SEQ_DECKBOTTOM
,
REASON_EFFECT
)
end
end
function
s
.
sfilter
(
c
)
return
c
:
IsSetCard
(
0x2f
)
and
c
:
IsFacedown
()
end
function
s
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
s
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
if
g
:
GetClassCount
(
Card
.
GetCode
)
<
3
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
s
.
sfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
if
g
:
GetClassCount
(
Card
.
GetCode
)
>=
3
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
5
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
3
,
3
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
else
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c100211097.lua
0 → 100644
View file @
0c879245
--インフェルノイド・イヴィル
--Script by lightup37 & mercury233
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0xbb
),
2
,
true
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
tgcon
)
e1
:
SetCost
(
s
.
tgcost
)
e1
:
SetTarget
(
s
.
tgtg
)
e1
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e1
)
--tograve
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
end
function
s
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0xbb
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
s
.
rmfilter
(
c
,
ct
)
return
c
:
IsSetCard
(
0xbb
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsLevelBelow
(
ct
)
end
function
s
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
ct
=
g
:
GetClassCount
(
Card
.
GetCode
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
rmfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
ct
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
rg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
rmfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
ct
)
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_COST
)
e
:
SetLabel
(
rg
:
GetFirst
():
GetLevel
())
end
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
IsCostChecked
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
e
:
GetLabel
(),
tp
,
LOCATION_DECK
)
end
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
l
=
e
:
GetLabel
()
local
g
=
Duel
.
GetMatchingGroup
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
c
=
g
:
GetClassCount
(
Card
.
GetCode
)
if
c
>=
l
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
aux
.
GCheckAdditional
=
aux
.
dncheck
local
sg
=
g
:
SelectSubGroup
(
tp
,
aux
.
TRUE
,
false
,
l
,
l
)
aux
.
GCheckAdditional
=
nil
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
function
s
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xc5
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
expansions/script/c100211098.lua
0 → 100644
View file @
0c879245
--インフェルノイド・フラッド
--Script by lightup37
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
nil
,
2
,
4
,
s
.
lcheck
)
--disable special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_DISABLE_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_SPSUMMON
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
discon
)
e1
:
SetCost
(
s
.
discost
)
e1
:
SetTarget
(
s
.
distg
)
e1
:
SetOperation
(
s
.
disop
)
c
:
RegisterEffect
(
e1
)
--remove card
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCondition
(
s
.
rmcon
)
e2
:
SetTarget
(
s
.
rmtg
)
e2
:
SetOperation
(
s
.
rmop
)
c
:
RegisterEffect
(
e2
)
--when break
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetCountLimit
(
1
,
id
+
o
*
2
)
e3
:
SetCondition
(
s
.
spcon
)
e3
:
SetTarget
(
s
.
sptg
)
e3
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
lcheck
(
g
,
lc
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0xbb
)
end
function
s
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
ep
and
Duel
.
GetCurrentChain
()
==
0
end
function
s
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
s
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
s
.
costfilter
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
s
.
costfilter
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
s
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
function
s
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Remove
(
eg
,
POS_FACEUP
,
REASON_EFFECT
)
end
function
s
.
rmfilter
(
c
,
tp
)
return
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_GRAVE
)
end
function
s
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
rmfilter
,
1
,
nil
,
tp
)
end
function
s
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
function
s
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
tp
)
if
#
sg
>
0
then
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousControler
(
tp
)
and
c
:
IsSummonType
(
SUMMON_TYPE_LINK
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
rp
==
1
-
tp
end
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0xbb
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
expansions/script/c100211099.lua
0 → 100644
View file @
0c879245
--熾動する煉獄
--Script by lee
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_HANDES
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_DUEL
)
e2
:
SetCondition
(
s
.
tgcon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
s
.
tgtg
)
e2
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
costfilter
(
c
)
return
(
c
:
IsSetCard
(
0xbb
)
and
c
:
IsType
(
TYPE_MONSTER
))
or
(
c
:
IsSetCard
(
0xc5
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
))
and
not
c
:
IsPublic
()
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
h
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
h
=
h
-
1
end
return
h
>
0
and
Duel
.
IsPlayerCanDraw
(
tp
,
h
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_HANDES
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
ct
=
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_DISCARD
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
ct
,
REASON_EFFECT
)
end
function
s
.
cfilter
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsRace
(
RACE_FIEND
)
end
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
or
not
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
))
and
(
Duel
.
GetTurnCount
()
~=
e
:
GetHandler
():
GetTurnID
()
or
e
:
GetHandler
():
IsReason
(
REASON_RETURN
))
end
function
s
.
tgfilter
(
c
,
e
)
return
c
:
IsSetCard
(
0xbb
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
and
c
:
IsCanBeEffectTarget
(
e
)
end
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
local
tg
=
Duel
.
GetMatchingGroup
(
s
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
e
)
if
chk
==
0
then
return
#
tg
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
aux
.
GCheckAdditional
=
aux
.
dncheck
local
g
=
tg
:
SelectSubGroup
(
tp
,
aux
.
TRUE
,
false
,
1
,
11
)
aux
.
GCheckAdditional
=
nil
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
tg
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c100211100.lua
0 → 100644
View file @
0c879245
--煉獄の決界
--coded by 星影
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--atkup
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
s
.
atktg
)
e1
:
SetValue
(
s
.
atkval
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
s
.
con
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetCondition
(
s
.
con
)
e3
:
SetTarget
(
s
.
sptg
)
e3
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
atktg
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xbb
)
end
function
s
.
ckfilter
(
c
)
return
c
:
IsSetCard
(
0xbb
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
s
.
atkval
(
e
,
c
)
local
ct
=
Duel
.
GetMatchingGroupCount
(
s
.
ckfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_REMOVED
,
0
,
nil
)
return
ct
*
100
end
function
s
.
cfilter
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsRace
(
RACE_FIEND
)
end
function
s
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
or
not
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
s
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xbb
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
end
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0xbb
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
#
g
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c100314001.lua
View file @
0c879245
...
...
@@ -33,7 +33,7 @@ function s.initial_effect(c)
c
:
RegisterEffect
(
e3
)
end
function
s
.
cfilter
(
c
,
tp
,
se
)
return
c
:
IsPreviousControler
(
tp
)
and
c
:
GetOriginalAttribute
()
==
ATTRIBUTE_FIRE
return
c
:
IsPreviousControler
(
tp
)
and
c
:
Get
PreviousTypeOnField
()
&
TYPE_MONSTER
>
0
and
c
:
Get
OriginalAttribute
()
==
ATTRIBUTE_FIRE
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
(
se
==
nil
or
c
:
GetReasonEffect
()
~=
se
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c100314033.lua
View file @
0c879245
...
...
@@ -110,13 +110,44 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_CHAIN_END
)
e3
:
SetOperation
(
s
.
limop2
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xb3
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x81
)
end
function
s
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetCurrentChain
()
==
0
then
Duel
.
SetChainLimitTillChainEnd
(
s
.
efun
)
elseif
Duel
.
GetCurrentChain
()
==
1
then
Duel
.
RegisterFlagEffect
(
tp
,
id
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetOperation
(
s
.
resetop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_BREAK_EFFECT
)
e2
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
s
.
sumcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
filter
,
1
,
nil
)
end
function
s
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetChainLimitTillChainEnd
(
s
.
efun
)
function
s
.
efun
(
e
,
ep
,
tp
)
return
ep
==
tp
end
function
s
.
limop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
id
)
>
0
then
Duel
.
SetChainLimitTillChainEnd
(
s
.
efun
)
end
Duel
.
ResetFlagEffect
(
tp
,
id
)
end
function
s
.
resetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ResetFlagEffect
(
tp
,
id
)
e
:
Reset
()
end
\ No newline at end of file
expansions/script/c100314052.lua
0 → 100644
View file @
0c879245
--真炎王 ボニクス
--coded by beyond
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_DESTROYED
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
--to grave
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetOperation
(
s
.
threg
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e5
:
SetCategory
(
CATEGORY_TOHAND
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetRange
(
LOCATION_GRAVE
)
e5
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e5
:
SetCountLimit
(
1
,
id
+
o
*
2
)
e5
:
SetCondition
(
s
.
thcon1
)
e5
:
SetTarget
(
s
.
thtg1
)
e5
:
SetOperation
(
s
.
thop1
)
e5
:
SetLabelObject
(
e4
)
c
:
RegisterEffect
(
e5
)
end
function
s
.
cfilter
(
c
,
tp
)
return
c
:
GetPreviousTypeOnField
()
&
TYPE_MONSTER
>
0
and
c
:
GetOriginalAttribute
()
==
ATTRIBUTE_FIRE
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsPreviousControler
(
tp
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
s
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x81
)
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
#
g
~=
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
s
.
threg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsReason
(
REASON_DESTROY
)
then
if
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
then
e
:
SetLabel
(
Duel
.
GetTurnCount
())
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_STANDBY
,
0
,
2
)
else
e
:
SetLabel
(
0
)
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_STANDBY
,
0
,
1
)
end
end
end
function
s
.
thcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
~=
Duel
.
GetTurnCount
()
and
e
:
GetHandler
():
GetFlagEffect
(
id
)
>
0
end
function
s
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
expansions/script/c101202017.lua
View file @
0c879245
...
...
@@ -43,8 +43,9 @@ function s.spfilter(c,e,tp)
return
c
:
IsSetCard
(
0x17e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
tftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
c
=
e
:
GetHandler
()
local
b1
=
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
,
e
,
tp
)
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
local
b2
=
Duel
.
IsExistingMatchingCard
(
s
.
setfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
if
chk
==
0
then
return
b1
or
b2
end
end
...
...
expansions/script/c101203002.lua
View file @
0c879245
...
...
@@ -95,6 +95,6 @@ end
function
s
.
spfgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c101203006.lua
0 → 100644
View file @
0c879245
--白曼波
--White Sunfish
--coded by Lyris
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--Tuner
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
s
.
tncon
)
e2
:
SetOperation
(
s
.
tnop
)
c
:
RegisterEffect
(
e2
)
end
s
.
treat_itself_tuner
=
true
function
s
.
tncon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_GRAVE
)
end
function
s
.
tnop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_ADD_TYPE
)
e1
:
SetValue
(
TYPE_TUNER
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
filter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsRace
(
RACE_FISH
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
c
:
GetCode
())
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
s
.
filter
(
chkc
,
e
,
tp
)
end
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
+
c
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
2
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
tc
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
Duel
.
SpecialSummonComplete
()
end
expansions/script/c101203007.lua
0 → 100644
View file @
0c879245
--白鰯
--White Sardine
--coded by Lyris
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--Tuner
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
s
.
tncon
)
e2
:
SetOperation
(
s
.
tnop
)
c
:
RegisterEffect
(
e2
)
end
s
.
treat_itself_tuner
=
true
function
s
.
tncon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_GRAVE
)
end
function
s
.
tnop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_ADD_TYPE
)
e1
:
SetValue
(
TYPE_TUNER
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
filter
(
c
)
return
c
:
IsCode
(
id
)
and
c
:
IsAbleToGraveAsCost
()
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
+
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
s
.
limit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
limit
(
e
,
c
,
sp
,
st
,
spos
,
tp
,
se
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
not
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
end
expansions/script/c101203018.lua
0 → 100644
View file @
0c879245
--ホルスの黒炎神
--script by Ruby
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--SendtoGrave
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
s
.
tgcon
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
s
.
tgcost
)
e1
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e1
)
--Leave Field
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCondition
(
s
.
sscon
)
e2
:
SetOperation
(
s
.
ssop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
tgcfilter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x29c
)
end
function
s
.
tgcfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
101202058
)
end
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
tgcfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
s
.
tgcfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
s
.
costfilter
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGrave
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
c
)
end
function
s
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsPublic
()
and
Duel
.
IsExistingMatchingCard
(
s
.
costfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
costfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGrave
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousControler
(
tp
)
and
c
:
GetReasonPlayer
()
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
((
c
:
IsPreviousSetCard
(
0x29c
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
GetPreviousCodeOnField
()
~=
id
)
or
c
:
GetPreviousCodeOnField
()
==
101202058
)
end
function
s
.
sscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
end
function
s
.
ssop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
c
)
if
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
end
expansions/script/c101203019.lua
0 → 100644
View file @
0c879245
--粛声の祈り手ロー
--Script by 卡手
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--set
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--ritual level
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_RITUAL_LEVEL
)
e3
:
SetValue
(
s
.
rlevel
)
c
:
RegisterEffect
(
e3
)
--spsummon
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e0
=
aux
.
AddThisCardInGraveAlreadyCheck
(
c
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetCountLimit
(
1
,
id
+
o
)
e4
:
SetLabelObject
(
e0
)
e4
:
SetCondition
(
s
.
spcon
)
e4
:
SetTarget
(
s
.
sptg
)
e4
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e4
)
end
function
s
.
pfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsSetCard
(
0x2a6
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
)
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
pfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
end
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
pfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
function
s
.
rlevel
(
e
,
c
)
local
lv
=
aux
.
GetCappedLevel
(
e
:
GetHandler
())
if
c
:
IsRace
(
RACE_WARRIOR
+
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
then
local
clv
=
c
:
GetLevel
()
return
(
lv
<<
16
)
+
clv
else
return
lv
end
end
function
s
.
cfilter
(
c
,
tp
,
se
)
return
c
:
IsRace
(
RACE_WARRIOR
+
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
(
se
==
nil
or
c
:
GetReasonEffect
()
~=
se
)
and
c
:
IsControler
(
tp
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
se
=
e
:
GetLabelObject
():
GetLabelObject
()
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
,
se
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c101203020.lua
0 → 100644
View file @
0c879245
--粛声の竜賢姫サフィラ
--scripted by REIKAI
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--to grave search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TOGRAVE
+
CATEGORY_GRAVE_ACTION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
s
.
tscost
)
e1
:
SetTarget
(
s
.
tstg
)
e1
:
SetOperation
(
s
.
tsop
)
c
:
RegisterEffect
(
e1
)
--Ritual Summon
local
e2
=
aux
.
AddRitualProcGreater2
(
c
,
s
.
filter
,
LOCATION_HAND
,
nil
,
nil
,
true
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCost
(
aux
.
bfgcost
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
tscost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
s
.
tsfilter
(
c
)
return
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToGrave
()
end
function
s
.
tstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
tsfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
thfilter
(
c
)
return
c
:
IsRace
(
RACE_DRAGON
+
RACE_WARRIOR
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsAbleToHand
()
end
function
s
.
tsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tsfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
>
0
and
g
:
GetFirst
():
IsLocation
(
LOCATION_GRAVE
)
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
s
.
thfilter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
s
.
thfilter
),
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
function
s
.
filter
(
c
,
e
,
tp
,
chk
)
return
c
:
IsRace
(
RACE_DRAGON
+
RACE_WARRIOR
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
(
not
chk
or
c
~=
e
:
GetHandler
())
end
\ No newline at end of file
expansions/script/c101203021.lua
0 → 100644
View file @
0c879245
--粛声の竜賢聖サウラヴィス
--scripted by REIKAI
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
s
.
sprcon
)
e1
:
SetOperation
(
s
.
sprop
)
c
:
RegisterEffect
(
e1
)
--SpecialSummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCondition
(
s
.
con
)
e2
:
SetCost
(
s
.
cost
)
e2
:
SetTarget
(
s
.
target
)
e2
:
SetOperation
(
s
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
sprfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToDeckAsCost
()
end
function
s
.
gcheck
(
g
)
return
g
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE_RITUAL
)
end
function
s
.
sprcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
s
.
sprfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
nil
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
g
:
CheckSubGroup
(
s
.
gcheck
,
2
,
2
)
end
function
s
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
sprfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
s
.
gcheck
,
false
,
2
,
2
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_COST
)
end
function
s
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
==
1
-
tp
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToHandAsCost
()
end
Duel
.
SendtoHand
(
c
,
tp
,
REASON_COST
)
end
function
s
.
filter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_DRAGON
+
RACE_WARRIOR
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
true
)
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
local
sc
=
g
:
GetFirst
()
if
Duel
.
SpecialSummonStep
(
sc
,
0
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
then
sc
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetLabelObject
(
sc
)
e1
:
SetCondition
(
s
.
tdcon
)
e1
:
SetOperation
(
s
.
tdop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
Duel
.
SpecialSummonComplete
()
end
end
function
s
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
and
tc
:
GetFlagEffect
(
id
)
~=
0
end
function
s
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
Duel
.
SendtoDeck
(
tc
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c101203023.lua
0 → 100644
View file @
0c879245
--マジェスペクター・ポーキュパイン
--Majespecter Porcupine - Yamaarashi
--coded by Lyris
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--cannot target
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e1
)
--indes
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetValue
(
aux
.
indoval
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetCondition
(
s
.
spcon
)
e3
:
SetTarget
(
s
.
sptg
)
e3
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e3
)
--sset
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetCountLimit
(
1
,
id
+
o
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e4
:
SetTarget
(
s
.
sstg
)
e4
:
SetOperation
(
s
.
ssop
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e5
)
end
function
s
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xd0
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
s
.
filter
(
c
)
return
c
:
IsSetCard
(
0xd0
)
and
c
:
IsSSetable
()
end
function
s
.
sstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
s
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
g
,
1
,
0
,
0
)
end
function
s
.
ssop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToChain
()
then
Duel
.
SSet
(
tp
,
tc
)
end
end
expansions/script/c101203037.lua
0 → 100644
View file @
0c879245
--粛声なる守護者ローガーディアン
--scripted by REIKAI
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
thcon
)
e1
:
SetTarget
(
s
.
thtg
)
e1
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
s
.
discon
)
e2
:
SetTarget
(
s
.
distg
)
e2
:
SetOperation
(
s
.
disop
)
c
:
RegisterEffect
(
e2
)
--atk
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
s
.
atkcon
)
e3
:
SetValue
(
2050
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
function
s
.
thfilter
(
c
)
return
(
c
:
IsSetCard
(
0x2a6
)
or
(
c
:
IsRace
(
RACE_DRAGON
+
RACE_WARRIOR
)
and
c
:
IsType
(
TYPE_RITUAL
)))
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
s
.
cfilter
(
c
)
return
c
:
IsFaceupEx
()
and
c
:
IsCode
(
101203019
)
end
function
s
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
==
1
-
tp
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
s
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
s
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
function
s
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_GRAVE
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
\ No newline at end of file
expansions/script/c101203041.lua
0 → 100644
View file @
0c879245
--白闘気砂滑
--Script by 增熵星
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_WATER
),
aux
.
NonTuner
(
nil
),
1
)
--spsummon①
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--spsummon②
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_TO_GRAVE
)
e2
:
SetCondition
(
s
.
condition
)
e2
:
SetCost
(
s
.
cost
)
e2
:
SetTarget
(
s
.
target
)
e2
:
SetOperation
(
s
.
operation
)
c
:
RegisterEffect
(
e2
)
end
s
.
treat_itself_tuner
=
true
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsRace
(
RACE_FISH
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
s
.
spfilter2
(
c
,
code
,
e
,
tp
)
return
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
s
.
spfilter
),
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
s
.
spfilter2
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
g
:
GetFirst
():
GetCode
(),
e
,
tp
)
if
g2
:
GetCount
()
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g2
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
end
function
s
.
cfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummonStep
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_ADD_TYPE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
TYPE_TUNER
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e1
)
end
Duel
.
SpecialSummonComplete
()
end
\ No newline at end of file
expansions/script/c101203049.lua
0 → 100644
View file @
0c879245
--マジェスペクター・ドラコ
--lua by Gim J.Blocks
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
4
,
2
)
c
:
EnableReviveLimit
()
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
,
false
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
srcon
)
e1
:
SetTarget
(
s
.
srtg
)
e1
:
SetOperation
(
s
.
srop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_RELEASE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
2
,
id
+
o
)
e2
:
SetCondition
(
s
.
spcon
)
e2
:
SetCost
(
s
.
spcost
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e2
)
--pendulum
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
s
.
pencon
)
e3
:
SetTarget
(
s
.
pentg
)
e3
:
SetOperation
(
s
.
penop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EVENT_RELEASE
)
c
:
RegisterEffect
(
e4
)
end
s
.
pendulum_level
=
4
function
s
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0xc7
,
0xd0
)
end
function
s
.
srcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
e
:
GetHandler
())
end
function
s
.
srfilter
(
c
,
oc
)
return
c
:
IsSetCard
(
0xd0
)
and
c
:
IsAbleToHand
()
end
function
s
.
srtg
(
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
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
srop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
srfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
tc
and
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
>
0
and
tc
:
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
ShuffleHand
(
tp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_PZONE
,
0
)
if
#
g
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
BreakEffect
()
Duel
.
HintSelection
(
sg
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
end
end
function
s
.
cfilter2
(
c
)
return
(
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
))
or
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cfilter2
,
1
,
nil
)
and
not
eg
:
IsContains
(
e
:
GetHandler
())
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVEXYZ
)
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
6
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_DECK
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
s
.
pencon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
end
function
s
.
pentg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
end
end
function
s
.
penop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
end
end
\ No newline at end of file
expansions/script/c101203051.lua
0 → 100644
View file @
0c879245
--マジェスペクター・オルト
--lua by Gim J.Blocks
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_PENDULUM
),
2
,
2
,
s
.
lcheck
)
c
:
EnableReviveLimit
()
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
thcon
)
e1
:
SetTarget
(
s
.
thtg
)
e1
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e1
)
end
function
s
.
lcheck
(
g
,
lc
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0xd0
)
end
function
s
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
s
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xd0
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToHand
()
end
function
s
.
tefilter
(
c
)
return
c
:
IsSetCard
(
0xd0
)
and
c
:
IsType
(
TYPE_PENDULUM
)
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
local
cg
=
Duel
.
GetMatchingGroup
(
s
.
tefilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
#
cg
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
id
,
2
))
local
hg
=
cg
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
1
,
2
)
if
hg
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoExtraP
(
hg
,
nil
,
REASON_EFFECT
)
end
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
c
:
IsSetCard
(
0xd0
,
0xc7
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
\ No newline at end of file
expansions/script/c101203058.lua
0 → 100644
View file @
0c879245
--白の輪廻
--Script by Lee
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
--chain attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
s
.
atkcon
)
e2
:
SetOperation
(
s
.
atkop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCondition
(
s
.
descon
)
e3
:
SetTarget
(
s
.
destg
)
e3
:
SetOperation
(
s
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
filter
(
c
)
return
c
:
IsRace
(
RACE_FISH
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
.
treat_itself_tuner
and
c
:
IsAbleToHand
()
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
function
s
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
return
tc
:
IsControler
(
tp
)
and
tc
:
IsSetCard
(
0x2a7
)
and
tc
:
IsRelateToBattle
()
and
tc
:
IsChainAttackable
()
end
function
s
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChainAttack
()
end
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_GRAVE
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsRace
(
RACE_FISH
)
and
c
:
IsLevelAbove
(
8
)
end
function
s
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
end
function
s
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
expansions/script/c101203065.lua
0 → 100644
View file @
0c879245
--王墓の石壁
--script by Ruby
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--change code
aux
.
EnableChangeCode
(
c
,
101202058
,
LOCATION_FZONE
)
--search and send to deck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetTarget
(
s
.
schtg
)
e2
:
SetOperation
(
s
.
schop
)
c
:
RegisterEffect
(
e2
)
--draw
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCondition
(
s
.
drcon
)
e3
:
SetTarget
(
s
.
drtg
)
e3
:
SetOperation
(
s
.
drop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
schfilter
(
c
)
return
c
:
IsSetCard
(
0x29c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
s
.
schtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
schfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
schfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
0
,
LOCATION_HAND
)
end
function
s
.
schop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
schfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
if
#
g2
>
0
then
Duel
.
BreakEffect
()
Duel
.
SendtoDeck
(
g2
,
nil
,
SEQ_DECKBOTTOM
,
REASON_EFFECT
)
end
end
end
function
s
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
==
tp
and
re
:
GetHandler
():
IsCode
(
101203018
)
end
function
s
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
function
s
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
expansions/script/c101203066.lua
0 → 100644
View file @
0c879245
--粛声なる祈り
--Script by kiritosoft
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
4810828
,
56350972
,
101203037
)
--Activate
aux
.
AddRitualProcGreater2
(
c
,
s
.
spfilter
,
nil
,
nil
,
s
.
mfilter
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
s
.
spcon
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
spfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
s
.
mfilter
(
c
)
return
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
s
.
plcfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
GetReasonPlayer
()
==
1
-
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
plcfilter
,
1
,
nil
,
tp
)
end
function
s
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
4810828
,
56350972
,
101203037
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c101203067.lua
0 → 100644
View file @
0c879245
--粛声なる結界
--Silenforcing Barrier
--coded by Lyris
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--limit attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetTargetRange
(
0
,
LOCATION_MZONE
)
e1
:
SetCondition
(
s
.
condition
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCode
(
EFFECT_CANNOT_SELECT_BATTLE_TARGET
)
e2
:
SetValue
(
s
.
alimit
)
c
:
RegisterEffect
(
e2
)
--cannot target
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
))
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
--to hand
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e4
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetCountLimit
(
1
,
id
)
e4
:
SetTarget
(
s
.
thtg
)
e4
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
s
.
cfilter1
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
101203019
)
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
)
end
function
s
.
cfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsType
(
TYPE_RITUAL
)
end
function
s
.
condition
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
end
function
s
.
alimit
(
e
,
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_RITUAL
)
end
function
s
.
filter
(
c
)
return
(
c
:
IsSetCard
(
0x2a6
)
or
c
:
IsSetCard
(
0x2052
)
and
c
:
GetType
()
&
0x81
==
0x81
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
id
)
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
expansions/script/c101203069.lua
0 → 100644
View file @
0c879245
--マジェスペクター・ウィンド
--Majespecter Wind
--coded by Lyris
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetLabel
(
0
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
end
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xd0
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
local
res
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
if
Duel
.
CheckReleaseGroup
(
tp
,
s
.
cfilter
,
1
,
nil
,
tp
)
and
(
not
res
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
1
)))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
s
.
cfilter
,
1
,
1
,
nil
,
tp
)
Duel
.
Release
(
g
,
REASON_COST
)
e
:
SetLabel
(
LOCATION_DECK
)
end
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
or
e
:
IsCostChecked
()
and
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
CheckReleaseGroup
(
tp
,
s
.
cfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
))
end
if
not
e
:
IsCostChecked
()
then
e
:
SetLabel
(
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
+
e
:
GetLabel
())
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
+
e
:
GetLabel
(),
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
expansions/script/c101203076.lua
0 → 100644
View file @
0c879245
--粛声なる威光
--Script by kiritosoft
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--add or special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
s
.
condition
)
e2
:
SetTarget
(
s
.
sptg2
)
e2
:
SetOperation
(
s
.
spop2
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
,
id
)
e3
:
SetCondition
(
s
.
condition
)
e3
:
SetTarget
(
s
.
destg
)
e3
:
SetOperation
(
s
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
function
s
.
dfilter
(
c
,
e
,
tp
,
ft
)
return
c
:
IsSetCard
(
0x2a6
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsAbleToHand
()
or
(
ft
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)))
end
function
s
.
tdfilter
(
c
)
return
c
:
IsAbleToDeck
()
and
c
:
IsType
(
TYPE_RITUAL
)
and
((
c
:
IsRace
(
RACE_WARRIOR
+
RACE_DRAGON
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
))
or
c
:
IsType
(
TYPE_SPELL
))
end
function
s
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
ft
)
and
Duel
.
IsExistingMatchingCard
(
s
.
tdfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
)
end
end
function
s
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tdfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc1
=
g1
:
GetFirst
()
if
tc1
and
Duel
.
SendtoDeck
(
tc1
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
>
0
then
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
dfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
ft
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
ft
>
0
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
(
not
tc
:
IsAbleToHand
()
or
Duel
.
SelectOption
(
tp
,
1190
,
1152
)
==
1
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
end
function
s
.
desfilters
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsRace
(
RACE_WARRIOR
+
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
s
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
desfilters
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
ct
=
Duel
.
GetMatchingGroupCount
(
s
.
desfilters
,
tp
,
LOCATION_MZONE
,
0
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
ct
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
g
=
tg
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/strings.conf
View file @
0c879245
...
...
@@ -22,6 +22,8 @@
!
setname
0
x2a3
异响鸣 ヴァルモニカ
!
setname
0
x2a4
于贝尔 ユベル
!
setname
0
x2a5
百夫长骑士 センチュリオン
!
setname
0
x2a6
肃声 粛声
!
setname
0
x2a7
白斗气 ホワイト・オーラ
#1263790966
#【2022年12月31日前禁止投稿】
...
...
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