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
ce0e0358
Commit
ce0e0358
authored
Jul 27, 2022
by
Tachibana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1145141919810
parent
e55a7690
Pipeline
#14973
passed with stages
in 41 minutes and 22 seconds
Changes
66
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
66 changed files
with
930 additions
and
706 deletions
+930
-706
expansions/script/c37900999.lua
expansions/script/c37900999.lua
+2
-1
expansions/script/c40006881.lua
expansions/script/c40006881.lua
+18
-13
expansions/script/c40008180.lua
expansions/script/c40008180.lua
+6
-11
expansions/script/c40008450.lua
expansions/script/c40008450.lua
+5
-1
expansions/script/c40008455.lua
expansions/script/c40008455.lua
+5
-1
expansions/script/c40008463.lua
expansions/script/c40008463.lua
+5
-1
expansions/script/c40008465.lua
expansions/script/c40008465.lua
+5
-1
expansions/script/c40008469.lua
expansions/script/c40008469.lua
+5
-1
expansions/script/c40008471.lua
expansions/script/c40008471.lua
+5
-1
expansions/script/c40008473.lua
expansions/script/c40008473.lua
+5
-1
expansions/script/c40008475.lua
expansions/script/c40008475.lua
+5
-1
expansions/script/c40008674.lua
expansions/script/c40008674.lua
+2
-2
expansions/script/c40008677.lua
expansions/script/c40008677.lua
+5
-5
expansions/script/c40008678.lua
expansions/script/c40008678.lua
+2
-2
expansions/script/c40008680.lua
expansions/script/c40008680.lua
+1
-1
expansions/script/c40008683.lua
expansions/script/c40008683.lua
+2
-2
expansions/script/c40008686.lua
expansions/script/c40008686.lua
+2
-2
expansions/script/c40008688.lua
expansions/script/c40008688.lua
+3
-3
expansions/script/c40008691.lua
expansions/script/c40008691.lua
+2
-2
expansions/script/c40008693.lua
expansions/script/c40008693.lua
+1
-1
expansions/script/c40008694.lua
expansions/script/c40008694.lua
+2
-2
expansions/script/c40008697.lua
expansions/script/c40008697.lua
+3
-3
expansions/script/c40008706.lua
expansions/script/c40008706.lua
+1
-1
expansions/script/c40009014.lua
expansions/script/c40009014.lua
+3
-3
expansions/script/c40009015.lua
expansions/script/c40009015.lua
+3
-3
expansions/script/c40009016.lua
expansions/script/c40009016.lua
+11
-12
expansions/script/c40009152.lua
expansions/script/c40009152.lua
+30
-15
expansions/script/c40009154.lua
expansions/script/c40009154.lua
+14
-16
expansions/script/c40009156.lua
expansions/script/c40009156.lua
+13
-16
expansions/script/c40009158.lua
expansions/script/c40009158.lua
+13
-16
expansions/script/c40009160.lua
expansions/script/c40009160.lua
+12
-4
expansions/script/c40009162.lua
expansions/script/c40009162.lua
+12
-15
expansions/script/c40009164.lua
expansions/script/c40009164.lua
+47
-33
expansions/script/c40009166.lua
expansions/script/c40009166.lua
+10
-17
expansions/script/c40009168.lua
expansions/script/c40009168.lua
+5
-1
expansions/script/c40009173.lua
expansions/script/c40009173.lua
+5
-9
expansions/script/c40009205.lua
expansions/script/c40009205.lua
+1
-0
expansions/script/c40009209.lua
expansions/script/c40009209.lua
+15
-13
expansions/script/c40009236.lua
expansions/script/c40009236.lua
+33
-26
expansions/script/c40009237.lua
expansions/script/c40009237.lua
+26
-19
expansions/script/c40009238.lua
expansions/script/c40009238.lua
+33
-26
expansions/script/c40009240.lua
expansions/script/c40009240.lua
+27
-19
expansions/script/c40009241.lua
expansions/script/c40009241.lua
+23
-16
expansions/script/c40009242.lua
expansions/script/c40009242.lua
+33
-26
expansions/script/c40009244.lua
expansions/script/c40009244.lua
+33
-24
expansions/script/c40009245.lua
expansions/script/c40009245.lua
+47
-40
expansions/script/c40009386.lua
expansions/script/c40009386.lua
+30
-23
expansions/script/c40009401.lua
expansions/script/c40009401.lua
+28
-21
expansions/script/c40009414.lua
expansions/script/c40009414.lua
+1
-1
expansions/script/c40009491.lua
expansions/script/c40009491.lua
+1
-1
expansions/script/c40009560.lua
expansions/script/c40009560.lua
+41
-29
expansions/script/c40009625.lua
expansions/script/c40009625.lua
+35
-28
expansions/script/c40009627.lua
expansions/script/c40009627.lua
+32
-22
expansions/script/c40009629.lua
expansions/script/c40009629.lua
+34
-23
expansions/script/c40009631.lua
expansions/script/c40009631.lua
+31
-20
expansions/script/c40009633.lua
expansions/script/c40009633.lua
+31
-20
expansions/script/c40009635.lua
expansions/script/c40009635.lua
+39
-29
expansions/script/c40009637.lua
expansions/script/c40009637.lua
+30
-22
expansions/script/c40009754.lua
expansions/script/c40009754.lua
+1
-1
expansions/script/c40009926.lua
expansions/script/c40009926.lua
+1
-2
expansions/script/c40009938.lua
expansions/script/c40009938.lua
+4
-4
expansions/script/c40010010.lua
expansions/script/c40010010.lua
+1
-1
expansions/script/c40010022.lua
expansions/script/c40010022.lua
+31
-2
expansions/script/c40010048.lua
expansions/script/c40010048.lua
+13
-10
expansions/script/c40010052.lua
expansions/script/c40010052.lua
+4
-18
expansions/script/c40010056.lua
expansions/script/c40010056.lua
+1
-1
No files found.
expansions/script/c37900999.lua
View file @
ce0e0358
...
...
@@ -67,12 +67,13 @@ function c37900999.remop(e,tp,eg,ep,ev,re,r,rp)
if
sg
:
GetCount
()
>
0
and
Duel
.
Remove
(
sg
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
local
tc
=
sg
:
GetFirst
()
for
tc
in
aux
.
Next
(
sg
)
do
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
()
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_REMOVED
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e3
)
end
end
end
...
...
expansions/script/c40006881.lua
View file @
ce0e0358
...
...
@@ -2,6 +2,10 @@
local
m
=
40006881
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_AShapeShifter
=
1
function
cm
.
AShapeShifter
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_AShapeShifter
end
function
cm
.
initial_effect
(
c
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -9,6 +13,7 @@ function cm.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
sscost
)
e1
:
SetTarget
(
cm
.
sstg
)
e1
:
SetOperation
(
cm
.
ssop
)
...
...
@@ -20,23 +25,23 @@ function cm.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCondition
(
cm
.
spcon2
)
e2
:
SetTarget
(
cm
.
eqtg
)
e2
:
SetOperation
(
cm
.
eqop
)
c
:
RegisterEffect
(
e2
)
--search
--
local e3=Effect.CreateEffect(c)
--
e3:SetDescription(aux.Stringid(m,2))
--
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
--
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
--
e3:SetProperty(EFFECT_FLAG_DELAY)
--
e3:SetCode(EVENT_TO_GRAVE)
--e3:SetCountLimit(1,m
)
--
e3:SetCondition(cm.thcon)
--
e3:SetTarget(cm.thtg)
--
e3:SetOperation(cm.thop)
--
c:RegisterEffect(e3)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
40007999
)
e3
:
SetCondition
(
cm
.
thcon
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
sscost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeckAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
...
...
@@ -59,7 +64,7 @@ function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
cm
.
AShapeShifter
(
c
)
return
re
and
cm
.
AShapeShifter
(
re
)
end
function
cm
.
eqfilter
(
c
)
return
c
:
IsRace
(
RACE_PSYCHO
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
not
c
:
IsForbidden
()
...
...
expansions/script/c40008180.lua
View file @
ce0e0358
...
...
@@ -5,13 +5,13 @@ cm.named_with_ZerothDragon=1
function
cm
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionType
,
TYPE_MONSTER
),
2
,
true
)
--
material limit
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionType
,
TYPE_MONSTER
),
5
,
true
)
--
spsummon condition
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_
MATERIAL_LIMIT
)
e0
:
SetValue
(
cm
.
mat
limit
)
e0
:
SetCode
(
EFFECT_
SPSUMMON_CONDITION
)
e0
:
SetValue
(
cm
.
sp
limit
)
c
:
RegisterEffect
(
e0
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -81,13 +81,8 @@ function cm.initial_effect(c)
e8
:
SetLabelObject
(
e4
)
c
:
RegisterEffect
(
e8
)
end
function
cm
.
matlimit
(
e
,
c
,
fc
,
st
)
if
st
~=
SUMMON_TYPE_FUSION
then
return
true
end
return
c
:
IsControler
(
fc
:
GetControler
())
and
c
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_HAND
)
end
function
cm
.
matlimit
(
e
,
c
,
st
)
if
st
~=
SUMMON_TYPE_FUSION
then
return
true
end
return
c
:
IsControler
()
==
e
:
GetHandlerPlayer
()
and
c
:
IsLocation
(
LOCATION_ALL
)
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
return
se
:
GetHandler
():
IsCode
(
24094653
)
end
function
cm
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
return
bit
.
band
(
sumpos
,
POS_FACEDOWN
)
>
0
...
...
expansions/script/c40008450.lua
View file @
ce0e0358
...
...
@@ -117,11 +117,15 @@ end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
cm
.
Chrono
(
c
)
or
c
:
IsSetCard
(
0x126
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
ogfilter
(
c
)
return
c
:
IsOriginalCodeRule
(
40009582
)
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
c
=
e
:
GetHandler
()
local
mg
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterialCount
()
if
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
and
mg
>=
3
then
local
og
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterial
():
IsExists
(
cm
.
ogfilter
,
1
,
nil
)
if
Duel
.
Recover
(
p
,
d
,
REASON_EFFECT
)
and
(
mg
>=
3
or
og
>
0
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g2
:
GetCount
()
>
0
then
...
...
expansions/script/c40008455.lua
View file @
ce0e0358
...
...
@@ -117,11 +117,15 @@ end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
cm
.
Chrono
(
c
)
or
c
:
IsSetCard
(
0x126
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
ogfilter
(
c
)
return
c
:
IsOriginalCodeRule
(
40009582
)
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
c
=
e
:
GetHandler
()
local
mg
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterialCount
()
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
and
mg
>=
3
then
local
og
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterial
():
IsExists
(
cm
.
ogfilter
,
1
,
nil
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
and
(
mg
>=
3
or
og
>
0
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g2
:
GetCount
()
>
0
then
...
...
expansions/script/c40008463.lua
View file @
ce0e0358
...
...
@@ -118,14 +118,18 @@ end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
cm
.
Chrono
(
c
)
or
c
:
IsSetCard
(
0x126
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
ogfilter
(
c
)
return
c
:
IsOriginalCodeRule
(
40009582
)
end
function
cm
.
fdop
(
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
,
cm
.
tffilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
local
c
=
e
:
GetHandler
()
local
mg
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterialCount
()
local
og
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterial
():
IsExists
(
cm
.
ogfilter
,
1
,
nil
)
if
tc
then
if
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
and
mg
>=
3
then
if
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
and
(
mg
>=
3
or
og
>
0
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g2
:
GetCount
()
>
0
then
...
...
expansions/script/c40008465.lua
View file @
ce0e0358
...
...
@@ -118,13 +118,17 @@ end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
cm
.
Chrono
(
c
)
or
c
:
IsSetCard
(
0x126
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
ogfilter
(
c
)
return
c
:
IsOriginalCodeRule
(
40009582
)
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
mg
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterialCount
()
local
og
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterial
():
IsExists
(
cm
.
ogfilter
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tffilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
and
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
and
mg
>=
3
then
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
and
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
and
(
mg
>=
3
or
og
>
0
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g2
:
GetCount
()
>
0
then
...
...
expansions/script/c40008469.lua
View file @
ce0e0358
...
...
@@ -115,10 +115,14 @@ end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
cm
.
Chrono
(
c
)
or
c
:
IsSetCard
(
0x126
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
ogfilter
(
c
)
return
c
:
IsOriginalCodeRule
(
40009582
)
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
mg
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterialCount
()
if
Duel
.
DiscardDeck
(
tp
,
3
,
REASON_EFFECT
)
~=
0
and
mg
>=
3
then
local
og
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterial
():
IsExists
(
cm
.
ogfilter
,
1
,
nil
)
if
Duel
.
DiscardDeck
(
tp
,
3
,
REASON_EFFECT
)
~=
0
and
(
mg
>=
3
or
og
>
0
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g2
:
GetCount
()
>
0
then
...
...
expansions/script/c40008471.lua
View file @
ce0e0358
...
...
@@ -115,9 +115,13 @@ end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
cm
.
Chrono
(
c
)
or
c
:
IsSetCard
(
0x126
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
ogfilter
(
c
)
return
c
:
IsOriginalCodeRule
(
40009582
)
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
mg
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterialCount
()
local
og
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterial
():
IsExists
(
cm
.
ogfilter
,
1
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
...
...
@@ -134,7 +138,7 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
if
mg
>=
3
then
if
(
mg
>=
3
or
og
>
0
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g2
:
GetCount
()
>
0
then
...
...
expansions/script/c40008473.lua
View file @
ce0e0358
...
...
@@ -118,14 +118,18 @@ end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
cm
.
Chrono
(
c
)
or
c
:
IsSetCard
(
0x126
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
ogfilter
(
c
)
return
c
:
IsOriginalCodeRule
(
40009582
)
end
function
cm
.
fdop
(
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
,
cm
.
tffilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
):
GetFirst
()
local
c
=
e
:
GetHandler
()
local
mg
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterialCount
()
local
og
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterial
():
IsExists
(
cm
.
ogfilter
,
1
,
nil
)
if
tc
then
if
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
and
mg
>=
3
then
if
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
and
(
mg
>=
3
or
og
>
0
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g2
:
GetCount
()
>
0
then
...
...
expansions/script/c40008475.lua
View file @
ce0e0358
...
...
@@ -116,14 +116,18 @@ function cm.fdtg(e,tp,eg,ep,ev,re,r,rp,chk)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
ogfilter
(
c
)
return
c
:
IsOriginalCodeRule
(
40009582
)
end
function
cm
.
fdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
mg
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterialCount
()
local
og
=
e
:
GetHandler
():
GetReasonCard
():
GetMaterial
():
IsExists
(
cm
.
ogfilter
,
1
,
nil
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
mg
>=
3
then
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
(
mg
>=
3
or
og
>
0
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
g2
:
GetCount
()
>
0
then
...
...
expansions/script/c40008674.lua
View file @
ce0e0358
...
...
@@ -124,7 +124,7 @@ function c40008674.scop(e,tp,eg,ep,ev,re,r,rp)
end
function
c40008674
.
cfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c40008674
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
@@ -144,7 +144,7 @@ function c40008674.dbop(e,tp,eg,ep,ev,re,r,rp)
if
ct
==
0
then
return
end
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
if
tc
:
IsSetCard
(
0x
f14
)
then
if
tc
:
IsSetCard
(
0x
10c5
)
then
if
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
40008674
,
2
))
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
BreakEffect
()
...
...
expansions/script/c40008677.lua
View file @
ce0e0358
...
...
@@ -8,7 +8,7 @@ if not rsv.InfernalKnight then
rsik
=
rsv
.
InfernalKnight
function
rsik
.
costfilter
(
c
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsDiscardable
()
end
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
m
)
and
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToGraveAsCost
()
return
Duel
.
IsPlayerAffectedByEffect
(
tp
,
m
)
and
c
:
IsLocation
(
LOCATION_DECK
)
and
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToGraveAsCost
()
end
function
rsik
.
cost
(
extrafun
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -44,7 +44,7 @@ function cm.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x
f14
))
e2
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x
10c5
))
e2
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e2
:
SetCondition
(
cm
.
actcon
)
c
:
RegisterEffect
(
e2
)
...
...
@@ -78,7 +78,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x
f14
)
and
(
c
:
IsAbleToHand
()
or
c
:
IsAbleToGrave
())
return
c
:
IsSetCard
(
0x
10c5
)
and
(
c
:
IsAbleToHand
()
or
c
:
IsAbleToGrave
())
end
function
cm
.
activate
(
e
,
tp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
...
...
@@ -119,10 +119,10 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
eftg
(
e
,
c
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsType
(
TYPE_QUICKPLAY
)
end
function
cm
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
atkcon
(
e
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c40008678.lua
View file @
ce0e0358
...
...
@@ -46,7 +46,7 @@ function c40008678.thcon(e,tp,eg,ep,ev,re,r,rp)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c40008678
.
thfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
and
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
c
:
GetCode
())
end
function
c40008678
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -66,7 +66,7 @@ function c40008678.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
e
:
GetHandler
():
GetEffectCount
(
EFFECT_EXTRA_ATTACK
)
==
0
end
end
function
c40008678
.
afilter
(
c
)
return
c
:
IsSetCard
(
0x
f14
)
return
c
:
IsSetCard
(
0x
10c5
)
end
function
c40008678
.
thaop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c40008680.lua
View file @
ce0e0358
...
...
@@ -117,7 +117,7 @@ function c40008680.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c40008680
.
cfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c40008680
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c40008683.lua
View file @
ce0e0358
...
...
@@ -125,7 +125,7 @@ function c40008683.scop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c40008683
.
cfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c40008683
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
@@ -167,7 +167,7 @@ function c40008683.dbop(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
end
if
tc
:
IsSetCard
(
0x
f14
)
then
if
tc
:
IsSetCard
(
0x
10c5
)
then
if
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
40008683
,
3
))
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
BreakEffect
()
...
...
expansions/script/c40008686.lua
View file @
ce0e0358
...
...
@@ -46,7 +46,7 @@ function c40008686.thcon(e,tp,eg,ep,ev,re,r,rp)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c40008686
.
spfilter
(
c
,
e
,
tp
,
ft
)
return
c
:
IsSetCard
(
0x
f14
)
and
(
c
:
IsAbleToHand
()
or
(
ft
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)))
return
c
:
IsSetCard
(
0x
10c5
)
and
(
c
:
IsAbleToHand
()
or
(
ft
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)))
end
function
c40008686
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
...
...
@@ -68,7 +68,7 @@ function c40008686.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c40008686
.
lvfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x
f14
)
and
not
c
:
IsLevel
(
2
)
and
c
:
IsLevelAbove
(
1
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x
10c5
)
and
not
c
:
IsLevel
(
2
)
and
c
:
IsLevelAbove
(
1
)
end
function
c40008686
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
expansions/script/c40008688.lua
View file @
ce0e0358
...
...
@@ -99,7 +99,7 @@ function c40008688.eftg(e,c)
return
e
:
GetHandler
():
GetEquipTarget
()
==
c
end
function
c40008688
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x
f14
)
and
not
c
:
IsCode
(
40008688
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x
10c5
)
and
not
c
:
IsCode
(
40008688
)
and
c
:
IsAbleToHand
()
end
function
c40008688
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
...
...
@@ -114,7 +114,7 @@ function c40008688.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c40008688
.
cfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c40008688
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
@@ -148,7 +148,7 @@ function c40008688.desop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetOwnerPlayer
(
tp
)
tc
:
RegisterEffect
(
e1
)
end
if
tc
:
IsSetCard
(
0x
f14
)
then
if
tc
:
IsSetCard
(
0x
10c5
)
then
if
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
40008688
,
3
))
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
BreakEffect
()
...
...
expansions/script/c40008691.lua
View file @
ce0e0358
...
...
@@ -60,7 +60,7 @@ function c40008691.thcon(e,tp,eg,ep,ev,re,r,rp)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c40008691
.
tdfilter
(
c
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToDeck
()
and
c
:
IsFaceup
()
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToDeck
()
and
c
:
IsFaceup
()
end
function
c40008691
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
)
...
...
@@ -102,7 +102,7 @@ function c40008691.thcon2(e,tp,eg,ep,ev,re,r,rp)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c40008691
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToHand
()
and
c
:
IsCode
(
40008691
)
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToHand
()
and
c
:
IsCode
(
40008691
)
end
function
c40008691
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c40008691
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
...
...
expansions/script/c40008693.lua
View file @
ce0e0358
...
...
@@ -79,7 +79,7 @@ function cm.spcon(e,tp)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
function
cm
.
spop
(
e
,
tp
)
rsof
.
SelectHint
(
tp
,
"sp"
)
...
...
expansions/script/c40008694.lua
View file @
ce0e0358
...
...
@@ -124,7 +124,7 @@ function c40008694.scop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c40008694
.
cfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c40008694
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
@@ -157,7 +157,7 @@ function c40008694.thop(e,tp,eg,ep,ev,re,r,rp)
local
e5
=
e1
:
Clone
()
e5
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
c
:
RegisterEffect
(
e5
)
if
tc
:
IsSetCard
(
0x
f14
)
then
if
tc
:
IsSetCard
(
0x
10c5
)
then
if
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
40008694
,
3
))
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
BreakEffect
()
...
...
expansions/script/c40008697.lua
View file @
ce0e0358
...
...
@@ -100,7 +100,7 @@ function c40008697.eftg(e,c)
return
e
:
GetHandler
():
GetEquipTarget
()
==
c
end
function
c40008697
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x
f14
)
and
not
c
:
IsCode
(
40008697
)
and
c
:
IsAbleToGrave
()
return
c
:
IsSetCard
(
0x
10c5
)
and
not
c
:
IsCode
(
40008697
)
and
c
:
IsAbleToGrave
()
end
function
c40008697
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c40008697
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
...
...
@@ -114,7 +114,7 @@ function c40008697.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c40008697
.
cfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
c40008697
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
@@ -148,7 +148,7 @@ function c40008697.dbop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
c40008697
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
if
tc
:
IsSetCard
(
0x
f14
)
then
if
tc
:
IsSetCard
(
0x
10c5
)
then
if
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
40008697
,
3
))
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
BreakEffect
()
...
...
expansions/script/c40008706.lua
View file @
ce0e0358
...
...
@@ -65,7 +65,7 @@ function c40008706.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c40008706
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x
f14
)
return
c
:
IsSetCard
(
0x
10c5
)
end
function
c40008706
.
thfilter
(
c
,
lv
)
return
c
:
IsLevelBelow
(
lv
)
and
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
expansions/script/c40009014.lua
View file @
ce0e0358
...
...
@@ -4,7 +4,7 @@ function c40009014.initial_effect(c)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
40009014
,
0
))
e6
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
QUICK
_O
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
TRIGGER
_O
)
e6
:
SetCode
(
EVENT_TO_GRAVE
)
e6
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e6
:
SetCountLimit
(
1
,
40009017
)
...
...
@@ -51,8 +51,8 @@ function c40009014.scop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c40009014
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_COST
)
and
re
:
Is
HasType
(
0x7e0
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
IsRace
(
RACE_FAIRY
)
return
e
:
GetHandler
():
IsReason
(
REASON_COST
)
and
re
:
Is
Activated
(
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_RACE
)
&
RACE_FAIRY
>
0
end
function
c40009014
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
...
expansions/script/c40009015.lua
View file @
ce0e0358
...
...
@@ -4,7 +4,7 @@ function c40009015.initial_effect(c)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetDescription
(
aux
.
Stringid
(
40009015
,
0
))
e6
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
QUICK
_O
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_
TRIGGER
_O
)
e6
:
SetCode
(
EVENT_TO_GRAVE
)
e6
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e6
:
SetCountLimit
(
1
,
40009018
)
...
...
@@ -51,8 +51,8 @@ function c40009015.scop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c40009015
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_COST
)
and
re
:
Is
HasType
(
0x7e0
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
IsRace
(
RACE_FAIRY
)
return
e
:
GetHandler
():
IsReason
(
REASON_COST
)
and
re
:
Is
Activated
(
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_RACE
)
&
RACE_FAIRY
>
0
end
function
c40009015
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
...
expansions/script/c40009016.lua
View file @
ce0e0358
...
...
@@ -43,7 +43,7 @@ function c40009016.initial_effect(c)
--return
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
40009016
,
2
))
e5
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_
DESTROY
)
e5
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_
SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e5
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e5
:
SetRange
(
LOCATION_MZONE
)
...
...
@@ -92,22 +92,21 @@ function c40009016.spfilter2(c,e,tp)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c40009016
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c40009016
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c40009016
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c40009016
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
if
c
:
IsLocation
(
LOCATION_EXTRA
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c40009016
.
spfilter2
,
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
Duel
.
SendtoDeck
(
c
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
if
c
:
IsLocation
(
LOCATION_EXTRA
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c40009016
.
spfilter2
,
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
end
expansions/script/c40009152.lua
View file @
ce0e0358
...
...
@@ -3,6 +3,14 @@ local m=40009152
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_BLASTER
=
1
cm
.
named_with_ALFRED
=
1
function
cm
.
BLASTER
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTER
end
function
cm
.
BLASTERBlade
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTERBlade
end
function
cm
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkAttribute
,
ATTRIBUTE_LIGHT
),
2
)
...
...
@@ -75,34 +83,41 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
filter
(
c
,
e
,
tp
,
zone
)
return
c
:
IsCode
(
40009154
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
end
function
cm
.
filter
(
c
)
return
cm
.
BLASTERBlade
(
c
)
and
c
:
IsFaceup
()
end
function
cm
.
spfilter
(
c
,
e
,
tp
,
check
,
zone
)
return
cm
.
BLASTER
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
and
(
check
or
cm
.
BLASTERBlade
(
c
))
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
return
zone
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
local
chk1
=
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
zone
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
chk1
,
zone
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
if
zone
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
local
tc
=
sg
:
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
if
zone
==
0
then
return
end
local
chk1
=
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
chk1
,
zone
)
local
tc
=
sg
:
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
1000
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
end
end
Duel
.
SpecialSummonComplete
()
end
function
cm
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40009154
)
return
c
:
IsFaceup
()
and
c
m
.
BLASTERBlade
(
c
)
end
function
cm
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
atkfilter
,
e
:
GetHandler
():
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
...
...
expansions/script/c40009154.lua
View file @
ce0e0358
...
...
@@ -4,20 +4,21 @@ local cm=_G["c"..m]
cm
.
named_with_BLASTER
=
1
cm
.
named_with_BLASTERBlade
=
1
function
cm
.
initial_effect
(
c
)
--s
psummon
--s
earch
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCountLimit
(
1
,
m
)
e3
:
SetCost
(
cm
.
spcost
)
c
:
RegisterEffect
(
e3
)
--to grave
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
...
...
@@ -45,6 +46,11 @@ function cm.BLASTER(c)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTER
end
function
cm
.
spcost
(
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
cm
.
filter1
(
c
,
e
,
tp
)
return
cm
.
BLASTER
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
...
...
@@ -60,14 +66,6 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
splimit
(
e
,
c
)
return
not
cm
.
BLASTER
(
c
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
...
...
expansions/script/c40009156.lua
View file @
ce0e0358
...
...
@@ -2,9 +2,17 @@
local
m
=
40009156
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_BLASTER
=
1
function
cm
.
BLASTER
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTER
end
function
cm
.
BLASTERBlade
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTERBlade
end
function
cm
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkCode
,
40009154
)
,
1
,
1
)
aux
.
AddLinkProcedure
(
c
,
cm
.
matfilter
,
1
,
1
)
c
:
EnableReviveLimit
()
--effect
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -29,12 +37,12 @@ function cm.initial_effect(c)
e3
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
BLASTER
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTER
function
cm
.
matfilter
(
c
)
return
cm
.
BLASTERBlade
(
c
)
end
function
cm
.
cfilter1
(
c
)
return
c
:
IsCode
(
40009154
)
and
((
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
))
or
c
:
IsLocation
(
LOCATION_HAND
))
and
c
:
IsAbleToGraveAsCost
()
return
c
m
.
BLASTERBlade
(
c
)
and
((
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_MZONE
))
or
c
:
IsLocation
(
LOCATION_HAND
))
and
c
:
IsAbleToGraveAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter1
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
end
...
...
@@ -83,15 +91,4 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
splimit
(
e
,
c
)
return
not
cm
.
BLASTER
(
c
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
expansions/script/c40009158.lua
View file @
ce0e0358
...
...
@@ -2,6 +2,10 @@
local
m
=
40009158
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_BLASTER
=
1
function
cm
.
BLASTERBlade
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTERBlade
end
function
cm
.
initial_effect
(
c
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -22,7 +26,7 @@ function cm.initial_effect(c)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
m
+
1
)
e3
:
SetCost
(
cm
.
spcost
)
e3
:
SetTarget
(
cm
.
sptg
)
...
...
@@ -49,13 +53,17 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
cfilter
(
c
)
return
c
:
IsCode
(
40009154
)
and
c
:
IsAbleToDeckAsCost
()
return
c
m
.
BLASTERBlade
(
c
)
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
(
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
(
e
:
GetHandler
():
IsReleasable
()
and
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
))
or
(
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
else
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
...
...
@@ -74,15 +82,4 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
splimit
(
e
,
c
)
return
not
cm
.
BLASTER
(
c
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
end
\ No newline at end of file
expansions/script/c40009160.lua
View file @
ce0e0358
...
...
@@ -2,6 +2,10 @@
local
m
=
40009160
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_BLASTER
=
1
function
cm
.
BLASTERBlade
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTERBlade
end
function
cm
.
initial_effect
(
c
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -21,7 +25,7 @@ function cm.initial_effect(c)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
m
+
1
)
e3
:
SetCost
(
cm
.
spcost
)
e3
:
SetTarget
(
cm
.
settg
)
...
...
@@ -47,13 +51,17 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
cfilter
(
c
)
return
c
:
IsCode
(
40009154
)
and
c
:
IsAbleToDeckAsCost
()
return
c
m
.
BLASTERBlade
(
c
)
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
(
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
(
e
:
GetHandler
():
IsReleasable
()
and
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
))
or
(
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
else
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
cm
.
setfilter
(
c
)
...
...
expansions/script/c40009162.lua
View file @
ce0e0358
...
...
@@ -2,6 +2,10 @@
local
m
=
40009162
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_BLASTER
=
1
function
cm
.
BLASTERBlade
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTERBlade
end
function
cm
.
initial_effect
(
c
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -22,7 +26,7 @@ function cm.initial_effect(c)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
m
+
1
)
e3
:
SetCost
(
cm
.
spcost
)
e3
:
SetTarget
(
cm
.
thtg
)
...
...
@@ -49,26 +53,19 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
cm
.
splimit
(
e
,
c
)
return
not
cm
.
BLASTER
(
c
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
function
cm
.
cfilter
(
c
)
return
c
:
IsCode
(
40009154
)
and
c
:
IsAbleToDeckAsCost
()
return
c
m
.
BLASTERBlade
(
c
)
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
(
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
(
e
:
GetHandler
():
IsReleasable
()
and
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
))
or
(
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
else
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
cm
.
thfilter
(
c
)
...
...
expansions/script/c40009164.lua
View file @
ce0e0358
...
...
@@ -2,6 +2,10 @@
local
m
=
40009164
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_BLASTER
=
1
function
cm
.
BLASTERBlade
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTERBlade
end
function
cm
.
initial_effect
(
c
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -17,63 +21,73 @@ function cm.initial_effect(c)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--
special summon
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
m
+
1
)
e3
:
SetCost
(
cm
.
spcost
)
e3
:
SetTarget
(
cm
.
td
tg
)
e3
:
SetOperation
(
cm
.
td
op
)
c
:
RegisterEffect
(
e3
)
e3
:
SetTarget
(
cm
.
set
tg
)
e3
:
SetOperation
(
cm
.
set
op
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
filter
(
c
)
return
c
:
IsCode
(
40009154
)
and
c
:
IsAbleToGrave
()
return
c
m
.
BLASTERBlade
(
c
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanSummon
(
tp
)
and
Duel
.
IsPlayerCanAdditionalSummon
(
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
if
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
HintSelection
(
sg
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsType
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
TYPE_SPELL
+
TYPE_TRAP
)
Duel
.
HintSelection
(
sg
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e1
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_WARRIOR
))
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
function
cm
.
cfilter
(
c
)
return
c
:
IsCode
(
40009154
)
and
c
:
IsAbleToDeckAsCost
()
return
c
m
.
BLASTERBlade
(
c
)
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
(
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
(
e
:
GetHandler
():
IsReleasable
()
and
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
))
or
(
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
else
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
cm
.
td
filter
(
c
)
return
c
:
Is
Race
(
RACE_WARRIOR
)
and
c
:
IsAbleToDeck
()
function
cm
.
set
filter
(
c
)
return
c
:
Is
Code
(
40009261
)
and
c
:
IsSSetable
()
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
tdfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
3
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
function
cm
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
cm
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
~=
0
then
Duel
.
ShuffleDeck
(
tp
)
Duel
.
BreakEffect
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
function
cm
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SSet
(
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c40009166.lua
View file @
ce0e0358
...
...
@@ -2,6 +2,10 @@
local
m
=
40009166
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_BLASTER
=
1
function
cm
.
BLASTERBlade
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTERBlade
end
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -39,7 +43,7 @@ function cm.BLASTER(c)
return
m
and
m
.
named_with_BLASTER
end
function
cm
.
tgfilter
(
c
)
return
c
:
IsCode
(
40009154
)
and
c
:
IsAbleToGrave
()
return
c
m
.
BLASTERBlade
(
c
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
@@ -64,23 +68,12 @@ end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
e
:
GetLabel
()
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
cm
.
splimit
(
e
,
c
)
return
not
cm
.
BLASTER
(
c
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
function
cm
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
tp
,
SUMMON_TYPE_LINK
,
40009156
)
...
...
expansions/script/c40009168.lua
View file @
ce0e0358
...
...
@@ -2,6 +2,10 @@
local
m
=
40009168
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_ALFRED
=
1
function
cm
.
BLASTERBlade
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTERBlade
end
function
cm
.
initial_effect
(
c
)
--effect
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -32,7 +36,7 @@ function cm.battlecheck(tp)
return
res
,
a
end
function
cm
.
gvfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40009154
)
and
c
:
IsAbleToGrave
()
return
c
:
IsFaceup
()
and
c
m
.
BLASTERBlade
(
c
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
(
cm
.
SAVER
(
c
)
or
c
:
IsCode
(
82593786
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
false
)
...
...
expansions/script/c40009173.lua
View file @
ce0e0358
...
...
@@ -3,18 +3,14 @@ local m=40009173
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_BLASTER
=
1
cm
.
named_with_BLASTERBlade
=
1
function
cm
.
BLASTERBlade
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_BLASTERBlade
end
function
cm
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
cm
.
mfilter
,
7
,
2
,
cm
.
ovfilter
,
aux
.
Stringid
(
m
,
0
),
2
,
cm
.
xyzop
)
c
:
EnableReviveLimit
()
--code
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetRange
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
e1
:
SetValue
(
40009154
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
...
...
@@ -45,7 +41,7 @@ function cm.mfilter(c)
return
c
:
IsRace
(
RACE_WARRIOR
)
end
function
cm
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40009154
)
return
c
:
IsFaceup
()
and
c
m
.
BLASTERBlade
(
c
)
and
not
c
:
IsType
(
TYPE_XYZ
)
end
function
cm
.
xyzop
(
e
,
tp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
end
...
...
expansions/script/c40009205.lua
View file @
ce0e0358
...
...
@@ -55,6 +55,7 @@ function cm.xyzop(e,tp)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetCondition
(
cm
.
negcon
)
e1
:
SetOperation
(
cm
.
negop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
...
...
expansions/script/c40009209.lua
View file @
ce0e0358
--时机降神 神工巨匠
function
c40009209
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
11
,
3
)
aux
.
AddXyzProcedure
(
c
,
nil
,
11
,
3
,
c40009209
.
ovfilter
,
aux
.
Stringid
(
40009209
,
3
),
3
,
c40009209
.
xyzop
)
c
:
EnableReviveLimit
()
--spsummon limit
local
e0
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -58,6 +58,13 @@ function c40009209.initial_effect(c)
e1
:
SetOperation
(
c40009209
.
retop
)
c
:
RegisterEffect
(
e1
)
end
function
c40009209
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf1c
)
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c40009209
.
xyzop
(
e
,
tp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
40009209
)
==
0
end
Duel
.
RegisterFlagEffect
(
tp
,
40009209
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
end
function
c40009209
.
nnegcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0xf2c
,
3
,
REASON_COST
)
end
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0xf2c
,
3
,
REASON_COST
)
...
...
@@ -81,24 +88,22 @@ function c40009209.tdfilter(c)
return
c
:
IsAbleToDeck
()
end
function
c40009209
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Is
ExistingMatchingCard
(
c40009209
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
6
,
nil
)
and
Duel
.
Is
PlayerCanDraw
(
tp
,
3
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
6
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
)
end
function
c40009209
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
--
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c40009209
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
6
,
6
,
nil
)
if
#
g
>
0
and
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
~=
0
then
Duel
.
ShuffleDeck
(
p
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
Duel
.
ShuffleDeck
(
tp
)
Duel
.
Draw
(
tp
,
3
,
REASON_EFFECT
)
end
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
c
:
RegisterFlagEffect
(
40009209
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
function
c40009209
.
tdcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
40009208
)
or
(
Duel
.
GetCurrentChain
()
<
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
40009208
)))
and
e
:
GetHandler
():
GetFlagEffect
(
40009209
)
~=
0
...
...
@@ -106,11 +111,8 @@ end
function
c40009209
.
tdcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
>
0
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
40009208
)
and
e
:
GetHandler
():
GetFlagEffect
(
40009209
)
~=
0
end
function
c40009209
.
tdfilter
(
c
)
return
c
:
IsAbleToDeck
()
end
function
c40009209
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c40009209
.
tdfilter
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
+
LOCATION_GRAVE
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
+
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
0
,
0
)
Duel
.
SetChainLimit
(
c40009209
.
chlimit
)
end
...
...
@@ -118,7 +120,7 @@ function c40009209.chlimit(e,ep,tp)
return
tp
==
ep
end
function
c40009209
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c40009209
.
tdfilter
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
+
LOCATION_GRAVE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
+
LOCATION_GRAVE
,
nil
)
if
g
:
GetCount
()
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g
:
Select
(
tp
,
1
,
3
,
nil
)
...
...
expansions/script/c40009236.lua
View file @
ce0e0358
--宇宙勇机 雄伟救援
function
c40009236
.
initial_effect
(
c
)
local
m
=
40009236
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009236
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
40009236
)
e1
:
SetTarget
(
c
40009236
.
sptg
)
e1
:
SetOperation
(
c
40009236
.
spop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
c
m
.
sptg
)
e1
:
SetOperation
(
c
m
.
spop
)
c
:
RegisterEffect
(
e1
)
--material
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40009236
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_XMATERIAL
+
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c
40009236
.
spcon
)
e2
:
SetCost
(
c
40009236
.
spcost
)
e2
:
SetTarget
(
c
40009236
.
target
)
e2
:
SetOperation
(
c
40009236
.
operation
)
e2
:
SetCondition
(
c
m
.
spcon
)
e2
:
SetCost
(
c
m
.
spcost
)
e2
:
SetTarget
(
c
m
.
target
)
e2
:
SetOperation
(
c
m
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
c
40009236
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x1f1b
)
and
not
c
:
IsCode
(
40009236
)
and
(
c
:
IsLevel
(
4
)
or
c
:
IsLevel
(
8
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
function
c
m
.
spfilter
(
c
,
e
,
tp
)
return
c
m
.
CosmosHero
(
c
)
and
not
c
:
IsCode
(
m
)
and
(
c
:
IsLevel
(
4
)
or
c
:
IsLevel
(
8
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c
40009236
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c
40009236
.
spfilter
(
chkc
,
e
,
tp
)
end
function
c
m
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c
m
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c
40009236
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingTarget
(
c
m
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c
40009236
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c
m
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c
40009236
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
then
...
...
@@ -52,24 +59,24 @@ function c40009236.spop(e,tp,eg,ep,ev,re,r,rp)
end
Duel
.
SpecialSummonComplete
()
end
function
c
40009236
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetRace
()
==
RACE_MACHINE
end
function
c
40009236
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
spcost
(
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
c
40009236
.
filter
(
c
)
return
c
:
IsSetCard
(
0x1f1b
)
and
c
:
IsCanOverlay
()
function
c
m
.
filter
(
c
)
return
c
m
.
CosmosHero
(
c
)
and
c
:
IsCanOverlay
()
end
function
c
40009236
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c
40009236
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c
m
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
and
Duel
.
IsExistingTarget
(
c
40009236
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
and
Duel
.
IsExistingTarget
(
c
m
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
SelectTarget
(
tp
,
c
40009236
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SelectTarget
(
tp
,
c
m
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
end
function
c
40009236
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
...
...
expansions/script/c40009237.lua
View file @
ce0e0358
--宇宙勇机 雄伟警察
function
c40009237
.
initial_effect
(
c
)
local
m
=
40009237
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
40009237
)
e1
:
SetTarget
(
c
40009237
.
thtg
)
e1
:
SetOperation
(
c
40009237
.
thop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
c
m
.
thtg
)
e1
:
SetOperation
(
c
m
.
thop
)
c
:
RegisterEffect
(
e1
)
--effect gain
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_BE_MATERIAL
)
e2
:
SetProperty
(
EFFECT_FLAG_EVENT_PLAYER
)
e2
:
SetCondition
(
c
40009237
.
efcon
)
e2
:
SetOperation
(
c
40009237
.
efop
)
e2
:
SetCondition
(
c
m
.
efcon
)
e2
:
SetOperation
(
c
m
.
efop
)
c
:
RegisterEffect
(
e2
)
end
function
c
40009237
.
filter
(
c
)
return
c
:
IsSetCard
(
0x1f1b
)
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
function
c
m
.
filter
(
c
)
return
c
m
.
CosmosHero
(
c
)
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c
40009237
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
40009237
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
c
m
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c
40009237
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009237
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
filter
,
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
function
c
40009237
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_XYZ
end
function
c
40009237
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
local
e1
=
Effect
.
CreateEffect
(
rc
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009237
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c
40009237
.
atkcon
)
e1
:
SetOperation
(
c
40009237
.
atkop
)
e1
:
SetCondition
(
c
m
.
atkcon
)
e1
:
SetOperation
(
c
m
.
atkop
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e1
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
...
...
@@ -57,10 +64,10 @@ function c40009237.efop(e,tp,eg,ep,ev,re,r,rp)
rc
:
RegisterEffect
(
e2
,
true
)
end
end
function
c
40009237
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c
40009237
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c40009238.lua
View file @
ce0e0358
--宇宙勇机 雄伟别动队
function
c40009238
.
initial_effect
(
c
)
local
m
=
40009238
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009238
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
40009238
)
e1
:
SetCost
(
c
40009238
.
spcost
)
e1
:
SetTarget
(
c
40009238
.
sptg
)
e1
:
SetOperation
(
c
40009238
.
spop
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
c
m
.
spcost
)
e1
:
SetTarget
(
c
m
.
sptg
)
e1
:
SetOperation
(
c
m
.
spop
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40009238
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
40009239
)
e2
:
SetCondition
(
c
40009238
.
spcon
)
e2
:
SetTarget
(
c
40009238
.
sptg1
)
e2
:
SetOperation
(
c
40009238
.
spop1
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCondition
(
c
m
.
spcon
)
e2
:
SetTarget
(
c
m
.
sptg1
)
e2
:
SetOperation
(
c
m
.
spop1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
function
c
40009238
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c
40009238
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x1f1b
)
and
not
c
:
IsCode
(
40009238
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
c
m
.
spfilter
(
c
,
e
,
tp
)
return
c
m
.
CosmosHero
(
c
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c
40009238
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c
40009238
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c
m
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
end
function
c
40009238
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
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
,
c
40009238
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
...
...
@@ -52,24 +59,24 @@ function c40009238.spop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c
40009238
.
splimit
)
e1
:
SetTarget
(
c
m
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c
40009238
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
c
m
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
function
c
40009238
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1f1b
)
and
not
c
:
IsCode
(
40009238
)
function
c
m
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
m
.
CosmosHero
(
c
)
and
not
c
:
IsCode
(
m
)
end
function
c
40009238
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
eg
:
IsContains
(
e
:
GetHandler
())
and
eg
:
IsExists
(
c
40009238
.
cfilter
,
1
,
nil
)
function
c
m
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
eg
:
IsContains
(
e
:
GetHandler
())
and
eg
:
IsExists
(
c
m
.
cfilter
,
1
,
nil
)
end
function
c
40009238
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
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
c
40009238
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
spop1
(
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_DEFENSE
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c40009240.lua
View file @
ce0e0358
--宇宙勇机 雄伟粉碎者
function
c40009240
.
initial_effect
(
c
)
local
m
=
40009240
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
--extra summon
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e6
:
SetOperation
(
c
40009240
.
sumop
)
e6
:
SetOperation
(
c
m
.
sumop
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e6
:
Clone
()
e7
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
...
...
@@ -15,49 +22,50 @@ function c40009240.initial_effect(c)
e2
:
SetCode
(
EFFECT_XYZ_LEVEL
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c
40009240
.
xyzlv
)
e2
:
SetValue
(
c
m
.
xyzlv
)
e2
:
SetLabel
(
4
)
c
:
RegisterEffect
(
e2
)
--effect gain
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_BE_MATERIAL
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetProperty
(
EFFECT_FLAG_EVENT_PLAYER
)
e1
:
SetCondition
(
c
40009240
.
efcon
)
e1
:
SetOperation
(
c
40009240
.
efop
)
e1
:
SetCondition
(
c
m
.
efcon
)
e1
:
SetOperation
(
c
m
.
efop
)
c
:
RegisterEffect
(
e1
)
end
function
c
40009240
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
40009240
)
~=
0
then
return
end
function
c
m
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
m
)
~=
0
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
40009240
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_MACHINE
))
e1
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterFlagEffect
(
tp
,
40009240
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c
40009240
.
xyzlv
(
e
,
c
,
rc
)
function
c
m
.
xyzlv
(
e
,
c
,
rc
)
if
rc
:
IsRace
(
RACE_MACHINE
)
then
return
c
:
GetLevel
()
+
0x10000
*
e
:
GetLabel
()
else
return
c
:
GetLevel
()
end
end
function
c
40009240
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_XYZ
end
function
c
40009240
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
local
e1
=
Effect
.
CreateEffect
(
rc
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009240
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c
40009240
.
defcon
)
e1
:
SetOperation
(
c
40009240
.
setop
)
e1
:
SetCondition
(
c
m
.
defcon
)
e1
:
SetOperation
(
c
m
.
setop
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e1
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
...
...
@@ -69,15 +77,15 @@ function c40009240.efop(e,tp,eg,ep,ev,re,r,rp)
rc
:
RegisterEffect
(
e2
,
true
)
end
end
function
c
40009240
.
defcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
defcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c
40009240
.
setfilter
(
c
)
function
c
m
.
setfilter
(
c
)
return
c
:
IsSetCard
(
0x95
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsSSetable
()
end
function
c
40009240
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009240
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
and
Duel
.
SSet
(
tp
,
tc
)
~=
0
then
if
tc
:
IsType
(
TYPE_QUICKPLAY
)
then
...
...
expansions/script/c40009241.lua
View file @
ce0e0358
--新宇宙勇机 雄伟疾驰
function
c40009241
.
initial_effect
(
c
)
local
m
=
40009241
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009241
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
40009241
)
e1
:
SetTarget
(
c
40009241
.
target
)
e1
:
SetOperation
(
c
40009241
.
operation
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
c
m
.
target
)
e1
:
SetOperation
(
c
m
.
operation
)
c
:
RegisterEffect
(
e1
)
--xyzlv
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -17,39 +24,39 @@ function c40009241.initial_effect(c)
e2
:
SetCode
(
EFFECT_XYZ_LEVEL
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c
40009241
.
xyzlv
)
e2
:
SetValue
(
c
m
.
xyzlv
)
e2
:
SetLabel
(
4
)
c
:
RegisterEffect
(
e2
)
--get effect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_XMATERIAL
)
e3
:
SetCode
(
EFFECT_PIERCE
)
e3
:
SetCondition
(
c
40009241
.
condition
)
e3
:
SetCondition
(
c
m
.
condition
)
c
:
RegisterEffect
(
e3
)
end
function
c
40009241
.
condition
(
e
)
function
c
m
.
condition
(
e
)
return
e
:
GetHandler
():
GetRace
()
==
RACE_MACHINE
end
function
c
40009241
.
xyzlv
(
e
,
c
,
rc
)
function
c
m
.
xyzlv
(
e
,
c
,
rc
)
if
rc
:
IsRace
(
RACE_MACHINE
)
then
return
c
:
GetLevel
()
+
0x10000
*
e
:
GetLabel
()
else
return
c
:
GetLevel
()
end
end
function
c
40009241
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetCounter
(
0x1f1b
)
==
0
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x1f1b
)
and
c
:
IsCanAddCounter
(
0x1f1b
,
1
)
function
c
m
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetCounter
(
0x1f1b
)
==
0
and
c
:
IsType
(
TYPE_XYZ
)
and
c
m
.
CosmosHero
(
c
)
and
c
:
IsCanAddCounter
(
0x1f1b
,
1
)
end
function
c
40009241
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
40009241
.
filter
(
chkc
)
and
chkc
:
IsCanAddCounter
(
0x1f1b
,
1
)
end
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
m
.
filter
(
chkc
)
and
chkc
:
IsCanAddCounter
(
0x1f1b
,
1
)
end
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
40009241
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c
40009241
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c
m
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c
40009241
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsImmuneToEffect
(
e
)
or
tc
:
GetCounter
(
0x1f1b
)
>
0
then
return
end
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c40009242.lua
View file @
ce0e0358
--大宇宙勇机 雄伟疾驰
function
c40009242
.
initial_effect
(
c
)
local
m
=
40009242
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1f1b
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
nil
,
4
,
2
)
...
...
@@ -7,17 +14,17 @@ function c40009242.initial_effect(c)
--attack up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_COUNTER
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009242
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c
40009242
.
ctcon
)
e1
:
SetCost
(
c
40009242
.
ctcost
)
e1
:
SetTarget
(
c
40009242
.
cttg
)
e1
:
SetOperation
(
c
40009242
.
ctop
)
e1
:
SetCondition
(
c
m
.
ctcon
)
e1
:
SetCost
(
c
m
.
ctcost
)
e1
:
SetTarget
(
c
m
.
cttg
)
e1
:
SetOperation
(
c
m
.
ctop
)
c
:
RegisterEffect
(
e1
)
--get effect
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -28,42 +35,42 @@ function c40009242.initial_effect(c)
e2
:
SetValue
(
2000
)
c
:
RegisterEffect
(
e2
)
end
function
c
40009242
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
ctcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_DAMAGE
and
Duel
.
GetBattleMonster
(
tp
)
==
c
and
not
Duel
.
IsDamageCalculated
()
and
c
:
IsAttackAbove
(
c
:
GetBaseAttack
()
+
2000
)
end
function
c
40009242
.
ctcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
ctcost
(
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
c
40009242
.
cttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
cttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x1f1b
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
0x1f1b
)
end
function
c
40009242
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
c
:
AddCounter
(
0x1f1b
,
1
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c
40009242
.
ctfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c
m
.
ctfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
for
tc
in
aux
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009242
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetCondition
(
c
40009242
.
damcon
)
e1
:
SetOperation
(
c
40009242
.
damop
)
e1
:
SetCondition
(
c
m
.
damcon
)
e1
:
SetOperation
(
c
m
.
damop
)
tc
:
RegisterEffect
(
e1
)
end
end
function
c
40009242
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
e
:
GetHandler
():
GetCounter
(
0x1f1b
)
>
0
end
function
c
40009242
.
damop
(
e
,
tp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
40009242
)
function
c
m
.
damop
(
e
,
tp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
local
c
=
e
:
GetHandler
()
local
ct
=
c
:
GetCounter
(
0x1f1b
)
local
atk
=
c
:
GetAttack
()
...
...
@@ -73,22 +80,22 @@ function c40009242.damop(e,tp)
if
Duel
.
GetLP
(
1
-
tp
)
<=
0
then
return
end
end
end
function
c
40009242
.
ctfilter
(
c
)
function
c
m
.
ctfilter
(
c
)
return
c
:
GetCounter
(
0x1f1b
)
>
0
end
function
c
40009242
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
==
REASON_XYZ
end
function
c
40009242
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
local
e1
=
Effect
.
CreateEffect
(
rc
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009242
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c
40009242
.
atkcon
)
e1
:
SetOperation
(
c
40009242
.
atkop
)
e1
:
SetCondition
(
c
m
.
atkcon
)
e1
:
SetOperation
(
c
m
.
atkop
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
rc
:
RegisterEffect
(
e1
,
true
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
...
...
@@ -100,10 +107,10 @@ function c40009242.efop(e,tp,eg,ep,ev,re,r,rp)
rc
:
RegisterEffect
(
e2
,
true
)
end
end
function
c
40009242
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c
40009242
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -114,6 +121,6 @@ function c40009242.atkop(e,tp,eg,ep,ev,re,r,rp)
c
:
RegisterEffect
(
e1
)
end
end
function
c
40009242
.
xmatcon
(
e
)
function
c
m
.
xmatcon
(
e
)
return
e
:
GetHandler
():
GetOriginalType
()
==
TYPE_XYZ
end
\ No newline at end of file
expansions/script/c40009244.lua
View file @
ce0e0358
--超宇宙勇机 雄伟疾驰EX
function
c40009244
.
initial_effect
(
c
)
local
m
=
40009244
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x1f1b
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_MACHINE
),
8
,
2
)
c
:
EnableReviveLimit
()
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009244
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c
40009244
.
spcost
)
e1
:
SetTarget
(
c
40009244
.
cttg
)
e1
:
SetOperation
(
c
40009244
.
ctop
)
e1
:
SetCost
(
c
m
.
spcost
)
e1
:
SetTarget
(
c
m
.
cttg
)
e1
:
SetOperation
(
c
m
.
ctop
)
c
:
RegisterEffect
(
e1
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -21,33 +28,35 @@ function c40009244.initial_effect(c)
e2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCondition
(
c
40009244
.
atkcon
)
e2
:
SetValue
(
c
40009244
.
efilter
)
e2
:
SetCondition
(
c
m
.
atkcon
)
e2
:
SetValue
(
c
m
.
efilter
)
c
:
RegisterEffect
(
e2
)
end
function
c40009244
.
efilter
(
e
,
te
)
return
not
te
:
GetOwner
():
IsSetCard
(
0x1f1b
)
function
cm
.
efilter
(
e
,
te
)
--local ct=te:GetOwner()
return
not
cm
.
CosmosHero
(
te
:
GetOwner
())
--return not te:GetOwner():IsSetCard(0x1f1b)
end
function
c
40009244
.
filter
(
c
)
return
c
:
IsSetCard
(
0x1f1b
)
and
c
:
IsType
(
TYPE_XYZ
)
function
c
m
.
filter
(
c
)
return
c
m
.
CosmosHero
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c
40009244
.
atkcon
(
e
)
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
c
40009244
.
filter
,
1
,
nil
)
function
c
m
.
atkcon
(
e
)
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
c
m
.
filter
,
1
,
nil
)
end
function
c
40009244
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
spcost
(
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
)
local
ct
=
Duel
.
GetOperatedGroup
():
GetFirst
()
e
:
SetLabelObject
(
ct
)
end
function
c
40009244
.
cttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
cttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanAddCounter
(
0x1f1b
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
0x1f1b
)
end
function
c
40009244
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
c
:
AddCounter
(
0x1f1b
,
1
)
and
(
e
:
GetLabelObject
():
IsType
(
TYPE_MONSTER
)
and
e
:
GetLabelObject
():
IsSetCard
(
0x1f1b
)
)
then
if
c
:
AddCounter
(
0x1f1b
,
1
)
and
(
e
:
GetLabelObject
():
IsType
(
TYPE_MONSTER
)
and
cm
.
CosmosHero
(
e
:
GetLabelObject
())
)
then
local
atk
=
e
:
GetLabelObject
():
GetAttack
()
local
def
=
e
:
GetLabelObject
():
GetDefense
()
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -63,25 +72,25 @@ function c40009244.ctop(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
c
:
RegisterEffect
(
e2
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c
40009244
.
ctfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c
m
.
ctfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
for
tc
in
aux
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009244
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetCondition
(
c
40009244
.
damcon
)
e1
:
SetOperation
(
c
40009244
.
damop
)
e1
:
SetCondition
(
c
m
.
damcon
)
e1
:
SetOperation
(
c
m
.
damop
)
tc
:
RegisterEffect
(
e1
)
end
end
end
function
c
40009244
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
e
:
GetHandler
():
GetCounter
(
0x1f1b
)
>
0
end
function
c
40009244
.
damop
(
e
,
tp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
40009244
)
function
c
m
.
damop
(
e
,
tp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
local
c
=
e
:
GetHandler
()
local
ct
=
c
:
GetCounter
(
0x1f1b
)
local
atk
=
c
:
GetAttack
()
...
...
expansions/script/c40009245.lua
View file @
ce0e0358
--升阶魔法-宇宙勇机升华
function
c40009245
.
initial_effect
(
c
)
local
m
=
40009245
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
--equip
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40009245
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetTarget
(
c
40009245
.
sptg1
)
e2
:
SetOperation
(
c
40009245
.
spop1
)
e2
:
SetTarget
(
c
m
.
sptg1
)
e2
:
SetOperation
(
c
m
.
spop1
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
e2
:
Clone
()
e3
:
SetDescription
(
aux
.
Stringid
(
40009245
,
1
))
e3
:
SetTarget
(
c
40009245
.
target
)
e3
:
SetOperation
(
c
40009245
.
activate
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetTarget
(
c
m
.
target
)
e3
:
SetOperation
(
c
m
.
activate
)
c
:
RegisterEffect
(
e3
)
--atkup
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009245
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
...
...
@@ -26,36 +33,36 @@ function c40009245.initial_effect(c)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c
40009245
.
atktg
)
e1
:
SetOperation
(
c
40009245
.
atkop
)
e1
:
SetTarget
(
c
m
.
atktg
)
e1
:
SetOperation
(
c
m
.
atkop
)
c
:
RegisterEffect
(
e1
)
end
function
c
40009245
.
tgfilter
(
c
)
function
c
m
.
tgfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_MACHINE
)
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c
40009245
.
spfilter1
(
c
,
e
,
tp
)
return
c
40009245
.
tgfilter
(
c
)
and
Duel
.
IsExistingMatchingCard
(
c
40009245
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
)
function
c
m
.
spfilter1
(
c
,
e
,
tp
)
return
c
m
.
tgfilter
(
c
)
and
Duel
.
IsExistingMatchingCard
(
c
m
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
)
and
aux
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
end
function
c
40009245
.
spfilter2
(
c
,
e
,
tp
,
mc
)
return
c
:
IsSetCard
(
0x1f1b
)
and
c
:
IsType
(
TYPE_XYZ
)
and
not
c
:
IsCode
(
mc
:
GetCode
())
and
c
:
IsRank
(
mc
:
GetRank
())
and
mc
:
IsCanBeXyzMaterial
(
c
)
function
c
m
.
spfilter2
(
c
,
e
,
tp
,
mc
)
return
c
m
.
CosmosHero
(
c
)
and
c
:
IsType
(
TYPE_XYZ
)
and
not
c
:
IsCode
(
mc
:
GetCode
())
and
c
:
IsRank
(
mc
:
GetRank
())
and
mc
:
IsCanBeXyzMaterial
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mc
,
c
)
>
0
end
function
c
40009245
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c
40009245
.
spfilter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
40009245
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
function
c
m
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c
m
.
spfilter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c
40009245
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SelectTarget
(
tp
,
c
m
.
spfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c
40009245
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
aux
.
MustMaterialCheck
(
tc
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
end
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009245
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
)
local
sc
=
g
:
GetFirst
()
if
sc
then
local
mg
=
tc
:
GetOverlayGroup
()
...
...
@@ -68,29 +75,29 @@ function c40009245.spop1(e,tp,eg,ep,ev,re,r,rp)
sc
:
CompleteProcedure
()
end
end
function
c
40009245
.
filter1
(
c
,
e
,
tp
)
function
c
m
.
filter1
(
c
,
e
,
tp
)
local
rk
=
c
:
GetRank
()
return
c
40009245
.
tgfilter
(
c
)
and
Duel
.
IsExistingMatchingCard
(
c
40009245
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
,
rk
+
4
)
return
c
m
.
tgfilter
(
c
)
and
Duel
.
IsExistingMatchingCard
(
c
m
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
,
rk
+
4
)
and
aux
.
MustMaterialCheck
(
c
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
end
function
c
40009245
.
filter2
(
c
,
e
,
tp
,
mc
,
rk
)
return
c
:
IsRank
(
rk
)
and
c
:
IsSetCard
(
0x1f1b
)
and
mc
:
IsCanBeXyzMaterial
(
c
)
function
c
m
.
filter2
(
c
,
e
,
tp
,
mc
,
rk
)
return
c
:
IsRank
(
rk
)
and
c
m
.
CosmosHero
(
c
)
and
mc
:
IsCanBeXyzMaterial
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mc
,
c
)
>
0
end
function
c
40009245
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c
40009245
.
filter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
40009245
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c
m
.
filter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c
40009245
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SelectTarget
(
tp
,
c
m
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c
40009245
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
not
aux
.
MustMaterialCheck
(
tc
,
tp
,
EFFECT_MUST_BE_XMATERIAL
)
then
return
end
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsControler
(
1
-
tp
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009245
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
,
tc
:
GetRank
()
+
4
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
,
tc
:
GetRank
()
+
4
)
local
sc
=
g
:
GetFirst
()
if
sc
then
local
mg
=
tc
:
GetOverlayGroup
()
...
...
@@ -103,16 +110,16 @@ function c40009245.activate(e,tp,eg,ep,ev,re,r,rp)
sc
:
CompleteProcedure
()
end
end
function
c
40009245
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1f1b
)
function
c
m
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
m
.
CosmosHero
(
c
)
end
function
c
40009245
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
40009245
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
40009245
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c
m
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
m
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c
40009245
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c
m
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c
40009245
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
expansions/script/c40009386.lua
View file @
ce0e0358
--宇宙勇机 敌阵突破
function
c40009386
.
initial_effect
(
c
)
local
m
=
40009386
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009386
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_TOHAND
+
TIMINGS_CHECK_MONSTER
)
--e1:SetCost(c
40009386
.cost)
e1
:
SetTarget
(
c
40009386
.
target
)
e1
:
SetOperation
(
c
40009386
.
activate
)
--e1:SetCost(c
m
.cost)
e1
:
SetTarget
(
c
m
.
target
)
e1
:
SetOperation
(
c
m
.
activate
)
c
:
RegisterEffect
(
e1
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40009386
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
...
...
@@ -21,34 +28,34 @@ function c40009386.initial_effect(c)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c
40009386
.
atktg
)
e2
:
SetOperation
(
c
40009386
.
atkop
)
e2
:
SetTarget
(
c
m
.
atktg
)
e2
:
SetOperation
(
c
m
.
atkop
)
c
:
RegisterEffect
(
e2
)
end
function
c
40009386
.
costfilter
(
c
,
matk
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsAttackAbove
(
matk
)
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1f1b
)
function
c
m
.
costfilter
(
c
,
matk
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsAttackAbove
(
matk
)
and
c
:
IsFaceup
()
and
c
m
.
CosmosHero
(
c
)
end
--function c
40009386
.cost(e,tp,eg,ep,ev,re,r,rp,chk)
--function c
m
.cost(e,tp,eg,ep,ev,re,r,rp,chk)
--e:SetLabel(100)
--return true
--end
function
c
40009386
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
dc
=
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
+
LOCATION_ONFIELD
)
local
matk
=
math.min
(
2000
,
dc
*
2000
)
if
chk
==
0
then
--if e:GetLabel()~=100 then return false end
-- e:SetLabel(0)
return
matk
>
0
and
Duel
.
IsExistingTarget
(
c
40009386
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
matk
)
--Duel.CheckReleaseGroup(tp,c40009386
.costfilter,1,nil,matk)
return
matk
>
0
and
Duel
.
IsExistingTarget
(
c
m
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
matk
)
--Duel.CheckReleaseGroup(tp,cm
.costfilter,1,nil,matk)
end
-- local g=Duel.SelectReleaseGroup(tp,c
40009386
.costfilter,1,1,nil,matk)
local
g
=
Duel
.
SelectTarget
(
tp
,
c
40009386
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
matk
)
-- local g=Duel.SelectReleaseGroup(tp,c
m
.costfilter,1,1,nil,matk)
local
g
=
Duel
.
SelectTarget
(
tp
,
c
m
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
matk
)
local
atk
=
g
:
GetFirst
():
GetAttack
()
--e:SetLabel(atk)
--Duel.Release(g,REASON_COST)
local
ct
=
math.floor
(
atk
/
2000
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
ct
,
1
-
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
)
end
function
c
40009386
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
atk
=
tc
:
GetAttack
()
...
...
@@ -61,16 +68,16 @@ function c40009386.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function
c
40009386
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1f1b
)
function
c
m
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
m
.
CosmosHero
(
c
)
end
function
c
40009386
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
40009386
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
40009386
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c
m
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
m
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c
40009386
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c
m
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c
40009386
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
expansions/script/c40009401.lua
View file @
ce0e0358
--宇宙勇机 崇高敬意
function
c40009401
.
initial_effect
(
c
)
local
m
=
40009401
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_CosmosHero
=
1
function
cm
.
CosmosHero
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_CosmosHero
end
function
cm
.
initial_effect
(
c
)
--equip
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40009401
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
,
40009401
)
e2
:
SetTarget
(
c
40009401
.
thtg
)
e2
:
SetOperation
(
c
40009401
.
thop
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetTarget
(
c
m
.
thtg
)
e2
:
SetOperation
(
c
m
.
thop
)
c
:
RegisterEffect
(
e2
)
--atkup
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009401
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetRange
(
LOCATION_GRAVE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCost
(
aux
.
bfgcost
)
e1
:
SetTarget
(
c
40009401
.
atktg
)
e1
:
SetOperation
(
c
40009401
.
atkop
)
e1
:
SetTarget
(
c
m
.
atktg
)
e1
:
SetOperation
(
c
m
.
atkop
)
c
:
RegisterEffect
(
e1
)
end
function
c
40009401
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x1f1b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
function
c
m
.
thfilter
(
c
)
return
c
m
.
CosmosHero
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c
40009401
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
g
=
Duel
.
GetMatchingGroup
(
c
40009401
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c
m
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
2
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
function
c
40009401
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c
40009401
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
function
c
m
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c
m
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetClassCount
(
Card
.
GetCode
)
<
2
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg1
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
2
,
2
)
Duel
.
SendtoHand
(
tg1
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg1
)
end
function
c
40009401
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x1f1b
)
function
c
m
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
m
.
CosmosHero
(
c
)
end
function
c
40009401
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
40009401
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
40009401
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c
m
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c
m
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c
m
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c
40009401
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c
m
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c
40009401
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
expansions/script/c40009414.lua
View file @
ce0e0358
...
...
@@ -105,7 +105,7 @@ function c40009414.thcon(e,tp,eg,ep,ev,re,r,rp)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c40009414
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x
f14
)
and
c
:
IsAbleToHand
()
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_GRAVE
))
return
c
:
IsSetCard
(
0x
10c5
)
and
c
:
IsAbleToHand
()
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_GRAVE
))
end
function
c40009414
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c40009414
.
thfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
...
...
expansions/script/c40009491.lua
View file @
ce0e0358
...
...
@@ -56,7 +56,7 @@ function c40009491.operation(e,tp,eg,ep,ev,re,r,rp)
end
function
c40009491
.
spxcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
Duel
.
GetAttacker
()
==
c
return
Duel
.
GetAttacker
()
==
c
and
c
:
IsChainAttackable
(
0
,
true
)
end
function
c40009491
.
spxfilter
(
c
,
e
,
tp
,
mc
)
return
c
:
IsRankBelow
(
10
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
mc
:
IsCanBeXyzMaterial
(
c
)
...
...
expansions/script/c40009560.lua
View file @
ce0e0358
--魔惧会 暴虐之布鲁斯
function
c40009560
.
initial_effect
(
c
)
local
m
=
40009560
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_Diablotherhood
=
1
function
cm
.
Diablotherhood
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Diablotherhood
end
function
cm
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009560
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetOperation
(
c
40009560
.
op
)
e1
:
SetOperation
(
c
m
.
op
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_STANDBY
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c40009560
.
con
)
e3
:
SetCondition
(
cm
.
con
)
e3
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e3
)
--spsummon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
40009560
,
1
))
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
-- e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCountLimit
(
1
,
40009560
)
e4
:
SetCost
(
c
40009560
.
spcost
)
e4
:
SetTarget
(
c
40009560
.
sptg
)
e4
:
SetOperation
(
c
40009560
.
spop
)
e4
:
SetCountLimit
(
1
,
m
)
e4
:
SetCost
(
c
m
.
spcost
)
e4
:
SetTarget
(
c
m
.
sptg
)
e4
:
SetOperation
(
c
m
.
spop
)
c
:
RegisterEffect
(
e4
)
--immune
local
e5
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -35,28 +44,28 @@ function c40009560.initial_effect(c)
e5
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e5
:
SetCondition
(
c
40009560
.
immcon
)
e5
:
SetValue
(
c
40009560
.
efilter
)
e5
:
SetCondition
(
c
m
.
immcon
)
e5
:
SetValue
(
c
m
.
efilter
)
c
:
RegisterEffect
(
e5
)
end
function
c
40009560
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
end
function
c
40009560
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_MESSAGE
,
1
-
tp
,
aux
.
Stringid
(
40009560
,
0
))
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
aux
.
Stringid
(
40009560
,
0
))
Duel
.
RegisterFlagEffect
(
tp
,
40009560
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
c
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
40009560
,
0
))
Duel
.
Hint
(
HINT_MESSAGE
,
1
-
tp
,
aux
.
Stringid
(
m
,
0
))
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
aux
.
Stringid
(
m
,
0
))
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
c
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
0
))
end
function
c
40009560
.
rfilter
(
c
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
c
:
IsSetCard
(
0xcf1b
)
function
c
m
.
rfilter
(
c
,
tp
)
return
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
c
m
.
Diablotherhood
(
c
)
end
function
c
40009560
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c
40009560
.
rfilter
,
1
,
nil
,
tp
)
end
function
c
m
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
c
m
.
rfilter
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c
40009560
.
rfilter
,
1
,
1
,
nil
,
tp
)
local
ct
=
g
:
FilterCount
(
Card
.
IsCode
,
nil
,
40009560
)
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
c
m
.
rfilter
,
1
,
1
,
nil
,
tp
)
local
ct
=
g
:
FilterCount
(
Card
.
IsCode
,
nil
,
m
)
e
:
SetValue
(
ct
)
if
ct
>
0
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_ATKCHANGE
)
...
...
@@ -65,11 +74,11 @@ function c40009560.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c
40009560
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c
40009560
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
e
:
GetValue
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
...
...
@@ -85,10 +94,13 @@ function c40009560.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c40009560
.
immcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
function
cm
.
dfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40010230
)
end
function
cm
.
immcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
or
Duel
.
IsExistingMatchingCard
(
cm
.
dfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c
40009560
.
efilter
(
e
,
re
,
rp
)
function
c
m
.
efilter
(
e
,
re
,
rp
)
if
e
:
GetHandlerPlayer
()
==
re
:
GetHandlerPlayer
()
then
return
false
end
local
c
=
e
:
GetHandler
()
local
ec
=
re
:
GetHandler
()
...
...
expansions/script/c40009625.lua
View file @
ce0e0358
--魔惧会 愤怒之理查德
function
c40009625
.
initial_effect
(
c
)
local
m
=
40009625
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_Diablotherhood
=
1
function
cm
.
Diablotherhood
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Diablotherhood
end
function
cm
.
initial_effect
(
c
)
--Special Summon from Grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40009625
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
40009625
)
e2
:
SetTarget
(
c
40009625
.
sptg
)
e2
:
SetOperation
(
c
40009625
.
spop
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetTarget
(
c
m
.
sptg
)
e2
:
SetOperation
(
c
m
.
spop
)
c
:
RegisterEffect
(
e2
)
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
40009625
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_DESTROY
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c
40009625
.
descon
)
e3
:
SetTarget
(
c
40009625
.
destg
)
e3
:
SetOperation
(
c
40009625
.
desop
)
e3
:
SetCondition
(
c
m
.
descon
)
e3
:
SetTarget
(
c
m
.
destg
)
e3
:
SetOperation
(
c
m
.
desop
)
c
:
RegisterEffect
(
e3
)
end
function
c
40009625
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xcf1b
)
and
not
c
:
IsCode
(
40009625
)
function
c
m
.
spfilter
(
c
,
e
,
tp
)
return
c
m
.
Diablotherhood
(
c
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c
40009625
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c
40009625
.
spfilter
(
chkc
,
e
,
tp
)
end
function
c
m
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c
m
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c
40009625
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
and
Duel
.
IsExistingTarget
(
c
m
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c
40009625
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c
m
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
(),
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c
40009625
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
end
function
c40009625
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
function
cm
.
dfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40010230
)
end
function
cm
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
or
Duel
.
IsExistingMatchingCard
(
cm
.
dfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c
40009625
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
Is
OnField
()
and
chkc
:
IsControler
(
1
-
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
function
c
m
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
Is
Controler
(
1
-
tp
)
and
chkc
:
IsOnField
(
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c
40009625
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
,
c
=
Duel
.
GetFirstTarget
(),
e
:
GetHandler
()
function
c
m
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c40009625
.
immcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
end
\ No newline at end of file
expansions/script/c40009627.lua
View file @
ce0e0358
--魔惧会 恶童之史蒂夫
function
c40009627
.
initial_effect
(
c
)
local
m
=
40009627
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_Diablotherhood
=
1
function
cm
.
Diablotherhood
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Diablotherhood
end
function
cm
.
initial_effect
(
c
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40009627
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
40009627
)
e2
:
SetCost
(
c40009627
.
descost
)
e2
:
SetTarget
(
c40009627
.
target
)
e2
:
SetOperation
(
c40009627
.
operation
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCost
(
cm
.
descost
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
--actlimit
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -22,26 +29,26 @@ function c40009627.initial_effect(c)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTargetRange
(
0
,
1
)
e3
:
SetValue
(
1
)
e3
:
SetCondition
(
c
40009627
.
actcon
)
e3
:
SetCondition
(
c
m
.
actcon
)
c
:
RegisterEffect
(
e3
)
end
function
c
40009627
.
cfilter
(
c
)
function
c
m
.
cfilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c
40009627
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
40009627
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c
m
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009627
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c
40009627
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
aux
.
disfilter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
disfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
disfilter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
aux
.
NegateAnyFilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
DISABLE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
NegateAnyFilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
c
40009627
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
and
tc
:
IsRelateToEffect
(
e
)
then
...
...
@@ -69,10 +76,13 @@ function c40009627.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function
c40009627
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
())
and
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
function
cm
.
dfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40010230
)
end
function
cm
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
())
and
(
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
or
Duel
.
IsExistingMatchingCard
(
cm
.
dfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
))
end
function
c
40009627
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
c
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
40009560
,
0
))
end
...
...
expansions/script/c40009629.lua
View file @
ce0e0358
--魔惧会 无垢之玛特
function
c40009629
.
initial_effect
(
c
)
local
m
=
40009629
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_Diablotherhood
=
1
function
cm
.
Diablotherhood
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Diablotherhood
end
function
cm
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
c
40009629
.
matfilter
,
1
,
1
)
aux
.
AddLinkProcedure
(
c
,
c
m
.
matfilter
,
1
,
1
)
c
:
EnableReviveLimit
()
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
40009629
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
40009629
)
e3
:
SetCost
(
c
40009629
.
cost
)
e3
:
SetCondition
(
c
40009629
.
spcon
)
e3
:
SetTarget
(
c
40009629
.
sptg
)
e3
:
SetOperation
(
c
40009629
.
spop
)
e3
:
SetCountLimit
(
1
,
m
)
e3
:
SetCost
(
c
m
.
cost
)
e3
:
SetCondition
(
c
m
.
spcon
)
e3
:
SetTarget
(
c
m
.
sptg
)
e3
:
SetOperation
(
c
m
.
spop
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetCondition
(
c
40009629
.
actcon
)
e4
:
SetCondition
(
c
m
.
actcon
)
e4
:
SetValue
(
2000
)
e4
:
SetRange
(
LOCATION_MZONE
)
c
:
RegisterEffect
(
e4
)
...
...
@@ -31,47 +38,51 @@ function c40009629.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetCondition
(
c
40009629
.
actcon
)
e1
:
SetCondition
(
c
m
.
actcon
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e2
)
end
function
c
40009629
.
matfilter
(
c
)
function
c
m
.
matfilter
(
c
)
return
c
:
IsLinkRace
(
RACE_FIEND
)
and
not
c
:
IsLinkType
(
TYPE_LINK
)
end
function
c
40009629
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c
40009629
.
cfilter
(
c
)
function
c
m
.
cfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsAbleToRemoveAsCost
(
POS_FACEDOWN
)
end
function
c
40009629
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
40009629
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
3
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c
40009629
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
function
c
m
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
3
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c
m
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
local
rg
=
g
:
RandomSelect
(
tp
,
3
)
Duel
.
Remove
(
rg
,
POS_FACEDOWN
,
REASON_COST
)
end
function
c
40009629
.
spfilter
(
c
,
e
,
tp
)
function
c
m
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
40009560
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
end
function
c
40009629
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c
40009629
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c
m
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
)
end
function
c
40009629
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
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
,
c
40009629
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
spfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
function
c40009629
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
function
cm
.
dfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40010230
)
end
function
cm
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
or
Duel
.
IsExistingMatchingCard
(
cm
.
dfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
expansions/script/c40009631.lua
View file @
ce0e0358
--魔惧会女孩 麦麦
function
c40009631
.
initial_effect
(
c
)
local
m
=
40009631
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_Diablotherhood
=
1
function
cm
.
Diablotherhood
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Diablotherhood
end
function
cm
.
initial_effect
(
c
)
--Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009631
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
40009632
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c
40009631
.
actcon
)
e1
:
SetCondition
(
c
m
.
actcon
)
c
:
RegisterEffect
(
e1
)
local
e4
=
e1
:
Clone
()
e4
:
SetRange
(
LOCATION_GRAVE
)
c
:
RegisterEffect
(
e4
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40009631
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
40009631
)
e2
:
SetCost
(
c
40009631
.
descost
)
e2
:
SetTarget
(
c
40009631
.
thtg
)
e2
:
SetOperation
(
c
40009631
.
thop
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCost
(
c
m
.
descost
)
e2
:
SetTarget
(
c
m
.
thtg
)
e2
:
SetOperation
(
c
m
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
function
c40009631
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
function
cm
.
dfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40010230
)
end
function
cm
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
or
Duel
.
IsExistingMatchingCard
(
cm
.
dfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c
40009631
.
cfilter
(
c
)
function
c
m
.
cfilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c
40009631
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
40009631
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c
m
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009631
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c
40009631
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xcf1b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
40009631
)
function
c
m
.
thfilter
(
c
)
return
c
m
.
Diablotherhood
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
c
:
IsCode
(
m
)
end
function
c
40009631
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
40009631
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
c
m
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c
40009631
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009631
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
...
...
expansions/script/c40009633.lua
View file @
ce0e0358
--魔惧会女孩 雅莉安娜
function
c40009633
.
initial_effect
(
c
)
local
m
=
40009633
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_Diablotherhood
=
1
function
cm
.
Diablotherhood
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Diablotherhood
end
function
cm
.
initial_effect
(
c
)
--Special Summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009633
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
40009634
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c
40009633
.
actcon
)
e1
:
SetCondition
(
c
m
.
actcon
)
c
:
RegisterEffect
(
e1
)
local
e4
=
e1
:
Clone
()
e4
:
SetRange
(
LOCATION_GRAVE
)
c
:
RegisterEffect
(
e4
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40009633
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
40009633
)
e2
:
SetCost
(
c
40009633
.
descost
)
e2
:
SetTarget
(
c
40009633
.
settg
)
e2
:
SetOperation
(
c
40009633
.
setop
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCost
(
c
m
.
descost
)
e2
:
SetTarget
(
c
m
.
settg
)
e2
:
SetOperation
(
c
m
.
setop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
function
c40009633
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
function
cm
.
dfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
40010230
)
end
function
cm
.
actcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
or
Duel
.
IsExistingMatchingCard
(
cm
.
dfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c
40009633
.
cfilter
(
c
)
function
c
m
.
cfilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c
40009633
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
40009633
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c
m
.
descost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009633
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c
40009633
.
filter
(
c
)
return
c
:
IsSetCard
(
0xcf1b
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
()
function
c
m
.
filter
(
c
)
return
c
m
.
Diablotherhood
(
c
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
()
end
function
c
40009633
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
40009633
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
c
m
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
function
c
40009633
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009633
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
end
...
...
expansions/script/c40009635.lua
View file @
ce0e0358
--兄弟会之魂
function
c40009635
.
initial_effect
(
c
)
local
m
=
40009635
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_Diablotherhood
=
1
function
cm
.
Diablotherhood
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Diablotherhood
end
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c
40009635
.
cost
)
e1
:
SetTarget
(
c
40009635
.
target
)
e1
:
SetOperation
(
c
40009635
.
activate
)
e1
:
SetCost
(
c
m
.
cost
)
e1
:
SetTarget
(
c
m
.
target
)
e1
:
SetOperation
(
c
m
.
activate
)
c
:
RegisterEffect
(
e1
)
--set
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c
40009635
.
setcost
)
e2
:
SetTarget
(
c
40009635
.
settg
)
e2
:
SetOperation
(
c
40009635
.
setop
)
e2
:
SetCost
(
c
m
.
setcost
)
e2
:
SetTarget
(
c
m
.
settg
)
e2
:
SetOperation
(
c
m
.
setop
)
c
:
RegisterEffect
(
e2
)
end
function
c
40009635
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c40009635
.
filter1
(
c
)
return
c
:
IsSetCard
(
0xcf1b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
function
cm
.
filter1
(
c
)
return
cm
.
Diablotherhood
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
filter2
(
c
,
e
,
tp
)
return
cm
.
Diablotherhood
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c
40009635
.
filter2
(
c
,
e
,
tp
)
return
c
:
Is
SetCard
(
0xcf1b
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
function
c
m
.
dfilter
(
c
)
return
c
:
Is
Faceup
()
and
c
:
IsCode
(
40010230
)
end
function
c
40009635
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
c
40009635
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
b2
=
Duel
.
IsExisting
Target
(
c40009635
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
function
c
m
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
c
m
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
b2
=
Duel
.
IsExisting
MatchingCard
(
cm
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
if
chk
==
0
then
return
b1
or
b2
end
local
op
=
0
if
b1
and
b2
then
if
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
40009635
,
0
),
aux
.
Stringid
(
40009635
,
1
),
aux
.
Stringid
(
40009635
,
2
))
if
(
Duel
.
GetFlagEffect
(
tp
,
40009560
)
>
0
or
Duel
.
IsExistingMatchingCard
(
cm
.
dfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
))
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
40009635
,
0
),
aux
.
Stringid
(
40009635
,
1
))
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
end
elseif
b1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
40009635
,
0
))
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
40009635
,
1
))
+
1
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
))
+
1
end
e
:
SetLabel
(
op
)
end
function
c
40009635
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
op
=
e
:
GetLabel
()
if
op
~=
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009635
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
if
op
~=
0
then
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c
40009635
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c
m
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g1
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g1
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
c
40009635
.
cfilter
(
c
)
function
c
m
.
cfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsAbleToRemoveAsCost
(
POS_FACEDOWN
)
end
function
c
40009635
.
setcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
40009635
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
3
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c
40009635
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
function
c
m
.
setcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
3
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c
m
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
local
rg
=
g
:
RandomSelect
(
tp
,
3
)
Duel
.
Remove
(
rg
,
POS_FACEDOWN
,
REASON_COST
)
end
function
c
40009635
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsSSetable
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c
40009635
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SSet
(
tp
,
c
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c40009637.lua
View file @
ce0e0358
--兄弟会之毅
function
c40009637
.
initial_effect
(
c
)
local
m
=
40009637
local
cm
=
_G
[
"c"
..
m
]
cm
.
named_with_Diablotherhood
=
1
function
cm
.
Diablotherhood
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Diablotherhood
end
function
cm
.
initial_effect
(
c
)
--Negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40009637
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c
40009637
.
discon
)
e1
:
SetTarget
(
c
40009637
.
distg
)
e1
:
SetOperation
(
c
40009637
.
disop
)
e1
:
SetCondition
(
c
m
.
discon
)
e1
:
SetTarget
(
c
m
.
distg
)
e1
:
SetOperation
(
c
m
.
disop
)
c
:
RegisterEffect
(
e1
)
--set
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCost
(
c
40009637
.
setcost
)
e2
:
SetTarget
(
c
40009637
.
settg
)
e2
:
SetOperation
(
c
40009637
.
setop
)
e2
:
SetCost
(
c
m
.
setcost
)
e2
:
SetTarget
(
c
m
.
settg
)
e2
:
SetOperation
(
c
m
.
setop
)
c
:
RegisterEffect
(
e2
)
end
function
c
40009637
.
disfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xcf1b
)
and
c
:
IsLevelAbove
(
5
)
function
c
m
.
disfilter
(
c
)
return
c
:
IsFaceup
()
and
c
m
.
Diablotherhood
(
c
)
and
c
:
IsLevelAbove
(
5
)
end
function
c
40009637
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
return
false
end
return
Duel
.
IsChainNegatable
(
ev
)
and
Duel
.
IsExistingMatchingCard
(
c
40009637
.
disfilter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
e
:
GetHandler
())
return
Duel
.
IsChainNegatable
(
ev
)
and
Duel
.
IsExistingMatchingCard
(
c
m
.
disfilter
,
tp
,
LOCATION_MZONE
,
0
,
2
,
e
:
GetHandler
())
end
function
c
40009637
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
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
Duel
.
Hint
(
HINT_MESSAGE
,
1
-
tp
,
aux
.
Stringid
(
40009637
,
1
))
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
aux
.
Stringid
(
40009637
,
1
))
Duel
.
Hint
(
HINT_MESSAGE
,
1
-
tp
,
aux
.
Stringid
(
m
,
1
))
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
aux
.
Stringid
(
m
,
1
))
Duel
.
RegisterFlagEffect
(
tp
,
40009560
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
end
function
c
40009637
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
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
c
40009637
.
cfilter
(
c
)
function
c
m
.
cfilter
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsAbleToRemoveAsCost
(
POS_FACEDOWN
)
end
function
c
40009637
.
setcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
40009637
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
3
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c
40009637
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
function
c
m
.
setcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c
m
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
3
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c
m
.
cfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
local
rg
=
g
:
RandomSelect
(
tp
,
3
)
Duel
.
Remove
(
rg
,
POS_FACEDOWN
,
REASON_COST
)
end
function
c
40009637
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c
m
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsSSetable
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c
40009637
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c
m
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SSet
(
tp
,
c
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c40009754.lua
View file @
ce0e0358
...
...
@@ -59,7 +59,7 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetCode
(
EFFECT_EXTRA_PENDULUM_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetCountLimit
(
1
,
29432356
)
e2
:
SetCountLimit
(
1
,
40009754
)
e2
:
SetValue
(
cm
.
pendvalue
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
...
...
expansions/script/c40009926.lua
View file @
ce0e0358
...
...
@@ -21,7 +21,6 @@ function cm.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetCondition
(
cm
.
atkcon
)
e2
:
SetCost
(
cm
.
atkcost
)
...
...
@@ -101,7 +100,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
1
5
00
)
e1
:
SetValue
(
1
0
00
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
local
ct
=
e
:
GetLabel
()
...
...
expansions/script/c40009938.lua
View file @
ce0e0358
...
...
@@ -31,10 +31,10 @@ function cm.Foreigner(c)
end
function
cm
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
re
:
GetHandler
()
if
e
:
GetHandler
():
IsReason
(
REASON_COST
)
and
re
:
IsActivated
()
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
cm
.
Foreigner
(
tc
)
then
if
e
:
GetHandler
():
IsReason
(
REASON_COST
)
and
re
:
IsActivated
()
and
re
:
IsActiveType
(
TYPE_MONSTER
+
TYPE_TRAP
+
TYPE_SPELL
)
and
cm
.
Foreigner
(
tc
)
then
e
:
SetLabel
(
1
)
end
return
e
:
GetHandler
():
IsReason
(
REASON_COST
)
and
re
:
IsActivated
()
and
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
return
e
:
GetHandler
():
IsReason
(
REASON_COST
)
and
re
:
IsActivated
()
and
(
re
:
IsActiveType
(
TYPE_MONSTER
+
TYPE_TRAP
+
TYPE_SPELL
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
cm
.
Foreigner
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
@@ -52,13 +52,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
DiscardHand
(
tp
,
nil
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
,
nil
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
e
:
GetLabel
()
==
1
and
(
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
or
Duel
.
GetFlagEffect
(
tp
,
m
+
1
)
==
0
or
Duel
.
GetFlagEffect
(
tp
,
m
+
2
)
==
0
or
Duel
.
GetFlagEffect
(
tp
,
m
+
3
)
==
0
)
then
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
e
:
GetLabel
()
==
1
and
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
end
end
end
...
...
expansions/script/c40010010.lua
View file @
ce0e0358
...
...
@@ -27,7 +27,7 @@ function cm.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
m
)
e
1
:
SetCost
(
cm
.
cost
)
e
2
:
SetCost
(
cm
.
cost
)
e2
:
SetTarget
(
cm
.
target
)
e2
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e2
)
...
...
expansions/script/c40010022.lua
View file @
ce0e0358
...
...
@@ -60,13 +60,42 @@ function cm.atop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
g
:
GetFirst
()
if
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
then
Duel
.
DisableShuffleCheck
()
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_
DEFENSE
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_
ATTACK
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
tc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
,
0
,
1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_PHASE
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetCondition
(
cm
.
flipcon
)
e1
:
SetOperation
(
cm
.
flipop
)
e1
:
SetLabelObject
(
tc
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_FLIP_SUMMON
)
--e2:SetCondition(cm.rcon)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
ChainAttack
()
else
Duel
.
MoveSequence
(
tc
,
1
)
end
end
function
cm
.
flipcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
return
tc
:
IsFacedown
()
and
Duel
.
GetTurnPlayer
()
==
tc
:
GetControler
()
and
tc
:
GetFlagEffect
(
m
)
~=
0
and
Duel
.
GetFlagEffect
(
tp
,
40010160
)
==
0
end
function
cm
.
flipop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_ATTACK
)
end
function
cm
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
m
-
2
)
then
...
...
@@ -87,7 +116,7 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
GetTurnPlayer
()
~=
tp
and
e
:
GetHandler
():
GetFlagEffect
(
m
)
>
0
end
function
cm
.
desfilter
(
c
)
return
c
:
IsPosition
(
POS_FACEDOWN_
DEFENSE
)
return
c
:
IsPosition
(
POS_FACEDOWN_
ATTACK
)
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
...
...
expansions/script/c40010048.lua
View file @
ce0e0358
...
...
@@ -13,17 +13,25 @@ function cm.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_RELEASE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_D
AMAGE_STEP
+
EFFECT_FLAG_D
ELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
--e1:SetCountLimit(1,m)
e1
:
SetCondition
(
cm
.
spcon1
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_RELEASE
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_RELEASE
)
--e2:SetCountLimit(1,m)
e2
:
SetCondition
(
cm
.
spcon2
)
c
:
RegisterEffect
(
e2
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
--Destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
...
...
@@ -50,20 +58,15 @@ function cm.spfilter(c,e,tp)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
--local loc=LOCATION_MZONE
-- if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then loc=LOCATION_MZONE end
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RELEASE
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
-- local loc=LOCATION_MZONE
--if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then loc=LOCATION_MZONE end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_
HAND
+
LOCATION_
MZONE
,
0
,
1
,
1
,
e
:
GetHandler
())
if
g
:
GetCount
()
>
0
and
Duel
.
Release
(
g
,
REASON_EFFECT
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
...
...
expansions/script/c40010052.lua
View file @
ce0e0358
...
...
@@ -20,14 +20,6 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--fusion check
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCondition
(
cm
.
matcon
)
e2
:
SetOperation
(
cm
.
matop
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
...
...
@@ -42,14 +34,8 @@ function cm.initial_effect(c)
e3
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
matcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
end
function
cm
.
matop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0xd6c0000
,
0
,
1
)
end
function
cm
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
m
)
>
0
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
cm
.
cfilter2
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsReleasableByEffect
()
...
...
@@ -60,7 +46,7 @@ end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
chk
==
0
then
local
loc
=
LOCATION_MZONE
local
loc
=
LOCATION_MZONE
+
LOCATION_HAND
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter2
,
tp
,
loc
,
0
,
4
,
nil
)
and
g
:
GetCount
()
>
0
end
...
...
@@ -73,13 +59,13 @@ function cm.chlimit(e,ep,tp)
return
tp
==
ep
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
=
LOCATION_MZONE
local
loc
=
LOCATION_MZONE
+
LOCATION_HAND
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter2
,
tp
,
loc
,
0
,
4
,
4
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g1
:
GetCount
()
>
0
and
Duel
.
Release
(
g1
,
REASON_EFFECT
)
>
0
and
g2
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g2
,
REASON_EFFECT
)
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
s
s
pfilter2
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
local
sg
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
expansions/script/c40010056.lua
View file @
ce0e0358
...
...
@@ -14,7 +14,7 @@ function cm.initial_effect(c)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
cm
.
discon
)
--
e2:SetCondition(cm.discon)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
...
...
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