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
Soulgamer
ygopro-222DIY-cards
Commits
e0d1a0f4
Commit
e0d1a0f4
authored
Oct 30, 2023
by
songtongtong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
10ee2249
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1320 additions
and
1309 deletions
+1320
-1309
expansions/script/c24400005.lua
expansions/script/c24400005.lua
+92
-92
expansions/script/c31300020.lua
expansions/script/c31300020.lua
+167
-166
expansions/script/c31300023.lua
expansions/script/c31300023.lua
+147
-146
expansions/script/c31300024.lua
expansions/script/c31300024.lua
+122
-121
expansions/script/c31300025.lua
expansions/script/c31300025.lua
+138
-137
expansions/script/c31300026.lua
expansions/script/c31300026.lua
+130
-129
expansions/script/c31300030.lua
expansions/script/c31300030.lua
+82
-82
expansions/script/c31300031.lua
expansions/script/c31300031.lua
+222
-222
expansions/script/c31300033.lua
expansions/script/c31300033.lua
+79
-80
expansions/script/c31300034.lua
expansions/script/c31300034.lua
+66
-60
expansions/script/c47344578.lua
expansions/script/c47344578.lua
+2
-1
expansions/script/c47344580.lua
expansions/script/c47344580.lua
+73
-73
No files found.
expansions/script/c24400005.lua
View file @
e0d1a0f4
--兵蚁
--兵蚁
function
c24400005
.
initial_effect
(
c
)
function
c24400005
.
initial_effect
(
c
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
24400005
)
e1
:
SetCountLimit
(
1
,
24400005
)
e1
:
SetCondition
(
c24400005
.
spcon
)
e1
:
SetCondition
(
c24400005
.
spcon
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--nontuner
--nontuner
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_NONTUNER
)
e2
:
SetCode
(
EFFECT_NONTUNER
)
e2
:
SetCondition
(
c24400005
.
tncon
)
e2
:
SetCondition
(
c24400005
.
tncon
)
e2
:
SetValue
(
c24400005
.
tnval
)
e2
:
SetValue
(
c24400005
.
tnval
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--tohand
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCondition
(
c24400005
.
thcon
)
e3
:
SetCondition
(
c24400005
.
thcon
)
e3
:
SetTarget
(
c24400005
.
thtg
)
e3
:
SetTarget
(
c24400005
.
thtg
)
e3
:
SetOperation
(
c24400005
.
thop
)
e3
:
SetOperation
(
c24400005
.
thop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--search
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
24400005
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
24400005
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetTarget
(
c24400005
.
thtg1
)
e2
:
SetTarget
(
c24400005
.
thtg1
)
e2
:
SetOperation
(
c24400005
.
thop1
)
e2
:
SetOperation
(
c24400005
.
thop1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
c24400005
.
named_with_ZhanShuRenXing
=
true
c24400005
.
named_with_ZhanShuRenXing
=
true
function
c24400005
.
filter
(
c
)
function
c24400005
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
.
named_with_ZhanShuRenXing
return
c
:
IsFaceup
()
and
c
.
named_with_ZhanShuRenXing
end
end
function
c24400005
.
spcon
(
e
,
c
)
function
c24400005
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c24400005
.
filter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
Duel
.
IsExistingMatchingCard
(
c24400005
.
filter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c24400005
.
tnckfil
(
c
)
function
c24400005
.
tnckfil
(
c
)
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsFaceup
()
return
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsFaceup
()
end
end
function
c24400005
.
tncon
(
e
,
c
)
function
c24400005
.
tncon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetMatchingGroup
(
c24400005
.
tnckfil
,
tp
,
LOCATION_MZONE
,
0
,
e
:
GetHandler
()):
GetCount
()
==
0
return
Duel
.
GetMatchingGroup
(
c24400005
.
tnckfil
,
tp
,
LOCATION_MZONE
,
0
,
e
:
GetHandler
()):
GetCount
()
==
0
end
end
function
c24400005
.
tnval
(
e
,
c
)
function
c24400005
.
tnval
(
e
,
c
)
return
e
:
GetHandler
():
IsControler
(
c
:
GetControler
())
return
e
:
GetHandler
():
IsControler
(
c
:
GetControler
())
end
end
function
c24400005
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c24400005
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
and
r
==
REASON_SYNCHRO
return
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
and
r
==
REASON_SYNCHRO
end
end
function
c24400005
.
thfilter
(
c
)
function
c24400005
.
thfilter
(
c
)
return
c
.
named_with_ZhanShuRenXing
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
.
named_with_ZhanShuRenXing
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
end
function
c24400005
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c24400005
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c24400005
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c24400005
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c24400005
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c24400005
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c24400005
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c24400005
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
c24400005
.
xthfilter
(
c
)
function
c24400005
.
xthfilter
(
c
)
return
c
:
IsCode
(
2
3100005
)
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
2
4400005
)
and
c
:
IsAbleToHand
()
end
end
function
c24400005
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c24400005
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c24400005
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c24400005
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tc
=
Duel
.
GetFirstMatchingCard
(
c24400005
.
xthfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
tc
=
Duel
.
GetFirstMatchingCard
(
c24400005
.
xthfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
tc
then
if
tc
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
end
expansions/script/c31300020.lua
View file @
e0d1a0f4
This diff is collapsed.
Click to expand it.
expansions/script/c31300023.lua
View file @
e0d1a0f4
This diff is collapsed.
Click to expand it.
expansions/script/c31300024.lua
View file @
e0d1a0f4
--菁樱巫女 miko
--菁樱巫女 miko
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--fusion material
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
s
.
ffilter
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionType
,
TYPE_EFFECT
),
1
,
true
,
true
)
aux
.
AddFusionProcCodeFun
(
c
,
s
.
ffilter
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionType
,
TYPE_EFFECT
),
1
,
true
,
true
)
--Special Summon
--Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
s
.
tgcon
)
e1
:
SetCondition
(
s
.
tgcon
)
e1
:
SetTarget
(
s
.
tgtg
)
e1
:
SetTarget
(
s
.
tgtg
)
e1
:
SetOperation
(
s
.
tgop
)
e1
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
2
)
e2
:
SetDescription
(
2
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
+
TIMINGS_CHECK_MONSTER
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
+
TIMINGS_CHECK_MONSTER
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCost
(
s
.
bfgcost
)
e2
:
SetCost
(
s
.
bfgcost
)
e2
:
SetTarget
(
s
.
target
)
e2
:
SetTarget
(
s
.
target
)
e2
:
SetOperation
(
s
.
operation
)
e2
:
SetOperation
(
s
.
operation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
s
.
ffilter
(
c
)
function
s
.
ffilter
(
c
)
return
c
:
IsRace
(
RACE_CYBERSE
)
or
c
:
IsFusionAttribute
(
ATTRIBUTE_FIRE
)
return
c
:
IsRace
(
RACE_CYBERSE
)
or
c
:
IsFusionAttribute
(
ATTRIBUTE_FIRE
)
end
end
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
re
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
c
:
IsSummonType
(
SUMMON_TYPE_FUSION
)
return
re
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
c
:
IsSummonType
(
SUMMON_TYPE_FUSION
)
end
end
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
tgtg
(
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
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFacedown
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFacedown
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
5
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
5
,
0
,
0
)
end
end
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFacedown
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFacedown
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
if
g
:
GetCount
()
>=
5
then
if
g
:
GetCount
()
>=
5
then
local
sg
=
g
:
RandomSelect
(
tp
,
5
)
local
sg
=
g
:
RandomSelect
(
tp
,
5
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
+
REASON_RETURN
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
+
REASON_RETURN
)
end
end
end
end
function
s
.
bfgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
bfgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEDOWN
,
REASON_COST
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEDOWN
,
REASON_COST
)
end
end
function
s
.
filter0
(
c
)
function
s
.
filter0
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
end
end
function
s
.
filter1
(
c
,
e
)
function
s
.
filter1
(
c
,
e
)
return
c
:
IsFaceupEx
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
and
not
c
:
IsImmuneToEffect
(
e
)
return
c
:
IsFaceupEx
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
end
function
s
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
,
check
)
function
s
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
,
check
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
check
or
c
:
IsAttack
(
35
))
and
(
not
f
or
f
(
c
))
return
c
:
IsType
(
TYPE_FUSION
)
and
(
check
or
c
:
GetBaseAttack
(
35
))
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
end
function
s
.
checkfilter
(
c
)
function
s
.
checkfilter
(
c
)
return
c
:
IsAttack
(
35
)
and
c
:
IsFaceup
()
return
c
:
GetBaseAttack
(
35
)
and
c
:
IsFaceup
()
end
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
if
chk
==
0
then
local
chkf
=
tp
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
end
local
check
=
Duel
.
IsExistingMatchingCard
(
s
.
checkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter0
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
c
)
local
check
=
Duel
.
IsExistingMatchingCard
(
s
.
checkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
,
check
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter0
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
c
)
if
not
res
then
local
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
,
check
)
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
not
res
then
if
ce
~=
nil
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
local
fgroup
=
ce
:
GetTarget
()
if
ce
~=
nil
then
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
fgroup
=
ce
:
GetTarget
()
local
mf
=
ce
:
GetValue
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
,
check
)
local
mf
=
ce
:
GetValue
()
end
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
,
check
)
end
end
return
res
end
end
return
res
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
c
=
e
:
GetHandler
()
local
check
=
Duel
.
IsExistingMatchingCard
(
s
.
checkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
c
,
e
)
local
check
=
Duel
.
IsExistingMatchingCard
(
s
.
checkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
sg1
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
,
check
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
c
,
e
)
local
mg3
=
nil
local
sg1
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
,
check
)
local
sg2
=
nil
local
mg3
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
local
sg2
=
nil
if
ce
~=
nil
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
local
fgroup
=
ce
:
GetTarget
()
if
ce
~=
nil
then
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
fgroup
=
ce
:
GetTarget
()
local
mf
=
ce
:
GetValue
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
sg2
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
,
check
)
local
mf
=
ce
:
GetValue
()
end
sg2
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
,
check
)
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
end
local
sg
=
sg1
:
Clone
()
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
if
sg2
then
sg
:
Merge
(
sg2
)
end
local
sg
=
sg1
:
Clone
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
sg2
then
sg
:
Merge
(
sg2
)
end
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
tg
:
GetFirst
()
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
tc
=
tg
:
GetFirst
()
local
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
,
nil
,
chkf
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
tc
:
SetMaterial
(
mat
)
local
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
,
nil
,
chkf
)
Duel
.
SendtoDeck
(
mat
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
tc
:
SetMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SendtoDeck
(
mat
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
BreakEffect
()
else
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
else
local
fop
=
ce
:
GetOperation
()
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
local
fop
=
ce
:
GetOperation
()
end
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
tc
:
CompleteProcedure
()
end
end
tc
:
CompleteProcedure
()
end
end
end
expansions/script/c31300025.lua
View file @
e0d1a0f4
This diff is collapsed.
Click to expand it.
expansions/script/c31300026.lua
View file @
e0d1a0f4
--樱火龙 miko
--樱火龙 miko
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--fusion material
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
s
.
ffilter
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionType
,
TYPE_EFFECT
),
1
,
true
,
true
)
aux
.
AddFusionProcCodeFun
(
c
,
s
.
ffilter
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionType
,
TYPE_EFFECT
),
1
,
true
,
true
)
--Special Summon
--Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
s
.
damcon
)
e1
:
SetCondition
(
s
.
damcon
)
e1
:
SetTarget
(
s
.
damtg
)
e1
:
SetTarget
(
s
.
damtg
)
e1
:
SetOperation
(
s
.
damop
)
e1
:
SetOperation
(
s
.
damop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
2
)
e2
:
SetDescription
(
2
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
+
TIMINGS_CHECK_MONSTER
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
+
TIMINGS_CHECK_MONSTER
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCost
(
s
.
bfgcost
)
e2
:
SetCost
(
s
.
bfgcost
)
e2
:
SetTarget
(
s
.
target
)
e2
:
SetTarget
(
s
.
target
)
e2
:
SetOperation
(
s
.
operation
)
e2
:
SetOperation
(
s
.
operation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
s
.
ffilter
(
c
)
function
s
.
ffilter
(
c
)
return
c
:
IsRace
(
RACE_CYBERSE
)
or
c
:
IsFusionAttribute
(
ATTRIBUTE_FIRE
)
return
c
:
IsRace
(
RACE_CYBERSE
)
or
c
:
IsFusionAttribute
(
ATTRIBUTE_FIRE
)
end
end
function
s
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
re
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
c
:
IsSummonType
(
SUMMON_TYPE_FUSION
)
return
re
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
c
:
IsSummonType
(
SUMMON_TYPE_FUSION
)
end
end
function
s
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
0
)
end
end
function
s
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
d
=
Duel
.
TossDice
(
tp
,
1
)
*
350
local
d
=
Duel
.
TossDice
(
tp
,
1
)
*
350
Duel
.
Damage
(
tp
,
d
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
d
,
REASON_EFFECT
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
)
e1
:
SetProperty
(
EFFECT_FLAG_COPY_INHERIT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e1
:
SetValue
(
d
)
e1
:
SetValue
(
d
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
s
.
bfgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
bfgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEDOWN
,
REASON_COST
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEDOWN
,
REASON_COST
)
end
end
function
s
.
filter0
(
c
)
function
s
.
filter0
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
end
end
function
s
.
filter1
(
c
,
e
)
function
s
.
filter1
(
c
,
e
)
return
c
:
IsFaceupEx
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
and
not
c
:
IsImmuneToEffect
(
e
)
return
c
:
IsFaceupEx
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
end
function
s
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
,
check
)
function
s
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
,
check
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
check
or
c
:
IsAttack
(
35
))
and
(
not
f
or
f
(
c
))
return
c
:
IsType
(
TYPE_FUSION
)
and
(
check
or
c
:
GetBaseAttack
(
35
))
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
end
function
s
.
checkfilter
(
c
)
function
s
.
checkfilter
(
c
)
return
c
:
IsAttack
(
35
)
and
c
:
IsFaceup
()
return
c
:
GetBaseAttack
(
35
)
and
c
:
IsFaceup
()
end
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
if
chk
==
0
then
local
chkf
=
tp
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
end
local
check
=
Duel
.
IsExistingMatchingCard
(
s
.
checkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter0
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
c
)
local
check
=
Duel
.
IsExistingMatchingCard
(
s
.
checkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
,
check
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter0
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
c
)
if
not
res
then
local
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
,
check
)
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
not
res
then
if
ce
~=
nil
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
local
fgroup
=
ce
:
GetTarget
()
if
ce
~=
nil
then
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
fgroup
=
ce
:
GetTarget
()
local
mf
=
ce
:
GetValue
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
,
check
)
local
mf
=
ce
:
GetValue
()
end
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
,
check
)
end
end
return
res
end
end
return
res
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
s
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
c
=
e
:
GetHandler
()
local
check
=
Duel
.
IsExistingMatchingCard
(
s
.
checkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
c
,
e
)
local
check
=
Duel
.
IsExistingMatchingCard
(
s
.
checkfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
sg1
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
,
check
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
c
,
e
)
local
mg3
=
nil
local
sg1
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
,
check
)
local
sg2
=
nil
local
mg3
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
local
sg2
=
nil
if
ce
~=
nil
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
local
fgroup
=
ce
:
GetTarget
()
if
ce
~=
nil
then
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
fgroup
=
ce
:
GetTarget
()
local
mf
=
ce
:
GetValue
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
sg2
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
,
check
)
local
mf
=
ce
:
GetValue
()
end
sg2
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
,
check
)
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
end
local
sg
=
sg1
:
Clone
()
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
if
sg2
then
sg
:
Merge
(
sg2
)
end
local
sg
=
sg1
:
Clone
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
if
sg2
then
sg
:
Merge
(
sg2
)
end
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
tg
:
GetFirst
()
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
tc
=
tg
:
GetFirst
()
local
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
,
nil
,
chkf
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
tc
:
SetMaterial
(
mat
)
local
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
,
nil
,
chkf
)
Duel
.
SendtoDeck
(
mat
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
tc
:
SetMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SendtoDeck
(
mat
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
BreakEffect
()
else
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
else
local
fop
=
ce
:
GetOperation
()
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
local
fop
=
ce
:
GetOperation
()
end
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
tc
:
CompleteProcedure
()
end
end
tc
:
CompleteProcedure
()
end
end
end
expansions/script/c31300030.lua
View file @
e0d1a0f4
--Miko的残机-1
--Miko的残机-1
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--lock zones
--lock zones
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
s
.
lzcon
)
e2
:
SetCondition
(
s
.
lzcon
)
e2
:
SetTarget
(
s
.
lztg
)
e2
:
SetTarget
(
s
.
lztg
)
e2
:
SetOperation
(
s
.
lzop
)
e2
:
SetOperation
(
s
.
lzop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
s
.
tgfilter
(
c
)
function
s
.
egfilter
(
c
)
return
c
:
IsAbleToGrave
()
and
c
:
IsAttack
(
35
)
and
c
:
IsType
(
TYPE_FUSION
)
return
c
:
IsAbleToGrave
()
and
c
:
IsAttack
(
35
)
and
c
:
IsType
(
TYPE_FUSION
)
end
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
egfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tgfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
egfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
end
end
function
s
.
cfilter
(
c
,
tp
)
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsFacedown
()
return
c
:
IsFacedown
()
end
end
function
s
.
lzcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
lzcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
end
end
function
s
.
tgfilter
(
c
)
function
s
.
tgfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsAbleToGrave
()
return
c
:
IsFacedown
()
and
c
:
IsAbleToGrave
()
end
end
function
s
.
lztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
lztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
b1
=
c
:
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
local
b1
=
c
:
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
local
b2
=
c
:
IsAbleToHand
()
local
b2
=
c
:
IsAbleToHand
()
if
chk
==
0
then
return
b1
or
b2
end
if
chk
==
0
then
return
b1
or
b2
end
end
end
function
s
.
lzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
lzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
s
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
b1
=
c
:
IsAbleToDeck
()
and
#
g
>
0
local
b1
=
c
:
IsAbleToDeck
()
and
#
g
>
0
local
b2
=
c
:
IsAbleToHand
()
local
b2
=
c
:
IsAbleToHand
()
local
off
=
1
local
off
=
1
local
ops
=
{}
local
ops
=
{}
local
opval
=
{}
local
opval
=
{}
if
b1
then
if
b1
then
ops
[
off
]
=
1105
ops
[
off
]
=
1105
opval
[
off
-
1
]
=
1
opval
[
off
-
1
]
=
1
off
=
off
+
1
off
=
off
+
1
end
end
if
b2
then
if
b2
then
ops
[
off
]
=
1190
ops
[
off
]
=
1190
opval
[
off
-
1
]
=
2
opval
[
off
-
1
]
=
2
off
=
off
+
1
off
=
off
+
1
end
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
local
sel
=
opval
[
op
]
if
sel
==
1
then
if
sel
==
1
then
Duel
.
SendtoDeck
(
c
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
c
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
+
REASON_RETURN
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
+
REASON_RETURN
)
else
else
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
expansions/script/c31300031.lua
View file @
e0d1a0f4
This diff is collapsed.
Click to expand it.
expansions/script/c31300033.lua
View file @
e0d1a0f4
--Miko的岩浆桶
--Miko的岩浆桶
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetCategory
(
CATEGORY_DAMAGE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--lock zones
--lock zones
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCountLimit
(
1
,
id
+
1
)
e2
:
SetCondition
(
s
.
lzcon
)
e2
:
SetCondition
(
s
.
lzcon
)
e2
:
SetTarget
(
s
.
lztg
)
e2
:
SetTarget
(
s
.
lztg
)
e2
:
SetOperation
(
s
.
lzop
)
e2
:
SetOperation
(
s
.
lzop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
end
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
Duel
.
TossCoin
(
tp
,
1
)
local
c
=
Duel
.
TossCoin
(
tp
,
1
)
local
p
=
tp
local
p
=
tp
if
c
>
0
then
p
=
1
-
tp
end
if
c
>
0
then
p
=
1
-
tp
end
local
d
=
Duel
.
TossDice
(
tp
,
1
)
local
d
=
Duel
.
TossDice
(
tp
,
1
)
for
i
=
1
,
d
do
for
i
=
1
,
d
do
Duel
.
Damage
(
p
,
350
,
REASON_EFFECT
)
Duel
.
Damage
(
p
,
350
,
REASON_EFFECT
)
end
end
end
end
function
s
.
cfilter
(
c
,
tp
)
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsFacedown
()
return
c
:
IsFacedown
()
end
end
function
s
.
lzcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
lzcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
end
end
function
s
.
tgfilter
(
c
)
function
s
.
tgfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsAbleToGrave
()
return
c
:
IsFacedown
()
and
c
:
IsAbleToGrave
()
end
end
function
s
.
lztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
lztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
b1
=
c
:
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
local
b1
=
c
:
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
local
b2
=
c
:
IsAbleToHand
()
local
b2
=
c
:
IsAbleToHand
()
if
chk
==
0
then
return
b1
or
b2
end
if
chk
==
0
then
return
b1
or
b2
end
end
end
function
s
.
lzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
lzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
s
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
tgfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
b1
=
c
:
IsAbleToDeck
()
and
#
g
>
0
local
b1
=
c
:
IsAbleToDeck
()
and
#
g
>
0
local
b2
=
c
:
IsAbleToHand
()
local
b2
=
c
:
IsAbleToHand
()
local
off
=
1
local
off
=
1
local
ops
=
{}
local
ops
=
{}
local
opval
=
{}
local
opval
=
{}
if
b1
then
if
b1
then
ops
[
off
]
=
1105
ops
[
off
]
=
1105
opval
[
off
-
1
]
=
1
opval
[
off
-
1
]
=
1
off
=
off
+
1
off
=
off
+
1
end
end
if
b2
then
if
b2
then
ops
[
off
]
=
1190
ops
[
off
]
=
1190
opval
[
off
-
1
]
=
2
opval
[
off
-
1
]
=
2
off
=
off
+
1
off
=
off
+
1
end
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
local
sel
=
opval
[
op
]
local
sel
=
opval
[
op
]
if
sel
==
1
then
if
sel
==
1
then
Duel
.
SendtoDeck
(
c
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
c
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
+
REASON_RETURN
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
+
REASON_RETURN
)
else
else
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
expansions/script/c31300034.lua
View file @
e0d1a0f4
--Miko的呆火鳄
--Miko的呆火鳄
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--splimit
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
s
.
splimit
)
e1
:
SetValue
(
s
.
splimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
14509651
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
14509651
,
0
))
e2
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_TOGRAVE
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetTarget
(
s
.
rmtg
)
e2
:
SetCost
(
s
.
rmcost
)
e2
:
SetOperation
(
s
.
rmop
)
e2
:
SetTarget
(
s
.
rmtg
)
c
:
RegisterEffect
(
e2
)
e2
:
SetOperation
(
s
.
rmop
)
end
c
:
RegisterEffect
(
e2
)
function
s
.
splimit
(
e
,
se
,
sp
,
st
)
end
return
se
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
function
s
.
splimit
(
e
,
se
,
sp
,
st
)
end
return
se
:
IsHasType
(
EFFECT_TYPE_ACTIONS
)
function
s
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
s
.
rmcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
local
c
=
e
:
GetHandler
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
function
s
.
filter
(
c
,
e
,
tp
)
end
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsAttack
(
35
)
and
c
:
CheckFusionMaterial
()
function
s
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
function
s
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
function
s
.
filter
(
c
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsAttack
(
35
)
and
c
:
CheckFusionMaterial
()
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
Duel
.
Remove
(
sg
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
local
sel
=
0
function
s
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
exg
=
Duel
.
GetMatchingGroup
(
s
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
local
sel
=
0
for
i
=
0
,
5
do
for
i
=
0
,
5
do
if
sel
==
5
then
return
end
if
sel
==
5
then
return
end
local
dg
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
Duel
.
ConfirmDecktop
(
tp
,
1
)
if
g
:
GetCount
()
>
0
then
Duel
.
DisableShuffleCheck
()
local
sg
=
g
:
RandomSelect
(
tp
,
1
)
local
tc
=
dg
:
GetFirst
()
if
Duel
.
Remove
(
sg
,
POS_FACEDOWN
,
REASON_EFFECT
)
~=
0
then
if
tc
:
IsCode
(
id
)
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
#
exg
>
0
then
local
dg
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
sel
=
5
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
ec
=
exg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
DisableShuffleCheck
()
if
Duel
.
SpecialSummon
(
ec
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
tc
=
dg
:
GetFirst
()
Duel
.
BreakEffect
()
local
exg
=
Duel
.
GetMatchingGroup
(
s
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
tc
:
IsCode
(
id
)
and
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
#
exg
>
0
then
end
sel
=
5
else
local
ec
=
exg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
+
REASON_REVEAL
)
if
Duel
.
SpecialSummon
(
ec
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
sel
=
sel
+
1
Duel
.
BreakEffect
()
end
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
else
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
+
REASON_REVEAL
)
sel
=
sel
+
1
end
end
end
end
end
end
\ No newline at end of file
expansions/script/c47344578.lua
View file @
e0d1a0f4
...
@@ -8,8 +8,9 @@ function s.initial_effect(c)
...
@@ -8,8 +8,9 @@ function s.initial_effect(c)
--counter
--counter
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN
_SOLVED
)
e1
:
SetCode
(
EVENT_CHAIN
ING
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCondition
(
s
.
cocon
)
e1
:
SetCondition
(
s
.
cocon
)
e1
:
SetOperation
(
s
.
counter
)
e1
:
SetOperation
(
s
.
counter
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
...
expansions/script/c47344580.lua
View file @
e0d1a0f4
--妖精乡的创成
--妖精乡的创成
local
s
,
id
=
GetID
()
local
s
,
id
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
id
,
ACTIVITY_SPSUMMON
,
s
.
counterfilter
)
Duel
.
AddCustomActivityCounter
(
id
,
ACTIVITY_SPSUMMON
,
s
.
counterfilter
)
end
end
function
s
.
counterfilter
(
c
)
function
s
.
counterfilter
(
c
)
return
not
(
c
:
IsSummonLocation
(
LOCATION_HAND
)
or
c
:
IsSummonLocation
(
LOCATION_GRAVE
))
or
(
c
:
IsSetCard
(
0x43e
)
or
c
:
IsSetCard
(
0x43f
))
return
not
(
c
:
IsSummonLocation
(
LOCATION_HAND
)
or
c
:
IsSummonLocation
(
LOCATION_GRAVE
))
or
(
c
:
IsSetCard
(
0x43e
)
or
c
:
IsSetCard
(
0x43f
))
end
end
function
s
.
cfilter
(
c
,
tp
)
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsLevel
(
9
,
10
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsLevel
(
9
,
10
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
end
end
function
s
.
plfilter
(
c
)
function
s
.
plfilter
(
c
)
return
c
:
IsCode
(
47344564
)
return
c
:
IsCode
(
47344564
)
end
end
function
s
.
splimitoath
(
e
,
c
)
function
s
.
splimitoath
(
e
,
c
)
return
c
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_HAND
)
and
not
(
c
:
IsSetCard
(
0x43e
)
or
c
:
IsSetCard
(
0x43f
))
return
c
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_HAND
)
and
not
(
c
:
IsSetCard
(
0x43e
)
or
c
:
IsSetCard
(
0x43f
))
end
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
id
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
id
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
s
.
plfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
s
.
plfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
s
.
splimitoath
)
e1
:
SetTarget
(
s
.
splimitoath
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
end
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
plfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
plfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
+
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
+
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0
)
end
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
plfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
plfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
):
GetFirst
()
if
tc
then
if
tc
then
Duel
.
SSet
(
tp
,
tc
)
Duel
.
SSet
(
tp
,
tc
)
end
end
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47344599
,
0x43e
,
TYPES_TOKEN_MONSTER
,
0
,
0
,
5
,
RACE_FAIRY
,
ATTRIBUTE_LIGHT
)
then
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47344599
,
0x43e
,
TYPES_TOKEN_MONSTER
,
0
,
0
,
5
,
RACE_FAIRY
,
ATTRIBUTE_LIGHT
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
47344599
)
local
token
=
Duel
.
CreateToken
(
tp
,
47344599
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetAbsoluteRange
(
tp
,
1
,
0
)
e1
:
SetAbsoluteRange
(
tp
,
1
,
0
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
token
:
RegisterEffect
(
e1
,
true
)
token
:
RegisterEffect
(
e1
,
true
)
Duel
.
SpecialSummonComplete
()
Duel
.
SpecialSummonComplete
()
end
end
end
end
function
s
.
splimit
(
e
,
c
)
function
s
.
splimit
(
e
,
c
)
return
not
c
:
IsType
(
TYPE_SYNCHRO
+
TYPE_XYZ
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
return
not
c
:
IsType
(
TYPE_SYNCHRO
+
TYPE_XYZ
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
end
\ No newline at end of file
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