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
Ai
ygopro-222DIY-cards
Commits
2b706e65
Commit
2b706e65
authored
Jun 07, 2023
by
songtongtong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
373da155
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
777 additions
and
777 deletions
+777
-777
expansions/script/c12812006.lua
expansions/script/c12812006.lua
+73
-75
expansions/script/c16104240.lua
expansions/script/c16104240.lua
+2
-2
expansions/script/c16104412.lua
expansions/script/c16104412.lua
+2
-2
expansions/script/c16104425.lua
expansions/script/c16104425.lua
+0
-1
expansions/script/c33310200.lua
expansions/script/c33310200.lua
+2
-1
expansions/script/c33500551.lua
expansions/script/c33500551.lua
+157
-157
expansions/script/c66915007.lua
expansions/script/c66915007.lua
+76
-76
expansions/script/c66915038.lua
expansions/script/c66915038.lua
+82
-82
expansions/script/c66915073.lua
expansions/script/c66915073.lua
+110
-110
expansions/script/c71401002.lua
expansions/script/c71401002.lua
+56
-56
expansions/script/c71401007.lua
expansions/script/c71401007.lua
+79
-79
expansions/script/c9310034.lua
expansions/script/c9310034.lua
+138
-136
No files found.
expansions/script/c12812006.lua
View file @
2b706e65
--恋爱头脑战-藤原千花
--恋爱头脑战-藤原千花
local
m
=
12812006
local
m
=
12812006
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
c12812006
.
initial_effect
(
c
)
function
c12812006
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
c
:
SetSPSummonOnce
(
12812006
)
c
:
SetSPSummonOnce
(
12812006
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
cm
.
psplimit
)
e1
:
SetTarget
(
cm
.
psplimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DISABLE
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCountLimit
(
1
,
12812106
)
e2
:
SetCountLimit
(
1
,
12812106
)
e2
:
SetCondition
(
cm
.
discon
)
e2
:
SetCondition
(
cm
.
discon
)
e2
:
SetTarget
(
cm
.
distg
)
e2
:
SetTarget
(
cm
.
distg
)
e2
:
SetOperation
(
cm
.
disop
)
e2
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetOperation
(
cm
.
thop
)
e3
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
--
function
cm
.
psplimit
(
e
,
c
,
tp
,
sumtp
,
sumpos
)
cm
.
self_summon_effect
=
e3
return
not
c
:
IsSetCard
(
0xa73
)
and
bit
.
band
(
sumtp
,
SUMMON_TYPE_PENDULUM
)
==
SUMMON_TYPE_PENDULUM
end
end
function
cm
.
psplimit
(
e
,
c
,
tp
,
sumtp
,
sumpos
)
--效果1
return
not
c
:
IsSetCard
(
0xa73
)
and
bit
.
band
(
sumtp
,
SUMMON_TYPE_PENDULUM
)
==
SUMMON_TYPE_PENDULUM
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
rp
==
1
-
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
--效果1
and
Duel
.
IsChainDisablable
(
ev
)
and
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
and
Duel
.
GetTurnPlayer
()
==
tp
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
rp
==
1
-
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
Duel
.
IsChainDisablable
(
ev
)
and
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
and
Duel
.
GetTurnPlayer
()
==
tp
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
()
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDestructable
()
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
if
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
~=
0
then
end
Duel
.
NegateEffect
(
ev
)
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
~=
0
then
return
end
end
Duel
.
NegateEffect
(
ev
)
--效果2
end
function
cm
.
filter
(
c
)
--效果2
return
c
:
IsSetCard
(
0xa73
)
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
function
cm
.
filter
(
c
)
end
return
c
:
IsSetCard
(
0xa73
)
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
g
:
GetCount
()
>
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
filter
),
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
\ No newline at end of file
expansions/script/c16104240.lua
View file @
2b706e65
--
冲锋陷阵的教团骑士
--
天命真王 梦想王
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
if
not
pcall
(
function
()
require
(
"expansions/script/c16104200"
)
end
)
then
require
(
"script/c16104200"
)
end
local
m
,
cm
=
rk
.
set
(
16104240
)
local
m
,
cm
=
rk
.
set
(
16104240
)
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
...
@@ -132,7 +132,7 @@ function cm.is_include(value,tab)
...
@@ -132,7 +132,7 @@ function cm.is_include(value,tab)
return
false
return
false
end
end
function
cm
.
xyz
(
c
)
function
cm
.
xyz
(
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
return
c
:
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
and
c
:
IsSetCard
(
0xccd
)
end
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ex
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_ANNOUNCE
)
local
ex
=
Duel
.
GetOperationInfo
(
ev
,
CATEGORY_ANNOUNCE
)
...
...
expansions/script/c16104412.lua
View file @
2b706e65
...
@@ -90,8 +90,8 @@ function cm.splimit(e,c)
...
@@ -90,8 +90,8 @@ function cm.splimit(e,c)
end
end
--Effect 2
--Effect 2
function
cm
.
filter
(
c
,
e
,
tp
)
function
cm
.
filter
(
c
,
e
,
tp
)
return
(
c
:
IsSetCard
(
0xccb
)
return
c
:
IsSetCard
(
0xccb
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
())
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
end
...
...
expansions/script/c16104425.lua
View file @
2b706e65
...
@@ -3,7 +3,6 @@ local m=16104425
...
@@ -3,7 +3,6 @@ local m=16104425
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
Duel
.
LoadScript
(
"c16199990.lua"
)
Duel
.
LoadScript
(
"c16199990.lua"
)
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
EnablePendulumAttribute
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--splimit
--splimit
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c33310200.lua
View file @
2b706e65
...
@@ -16,7 +16,8 @@ end
...
@@ -16,7 +16,8 @@ end
function
c33310200
.
filter1
(
c
,
e
)
function
c33310200
.
filter1
(
c
,
e
)
return
c
:
IsPublic
()
and
c
:
IsCanBeFusionMaterial
()
and
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsAbleToDeck
()
return
c
:
IsPublic
()
and
c
:
IsCanBeFusionMaterial
()
and
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsAbleToDeck
()
end
end
function
c33310200
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
,
m2
)
function
c33310200
.
filter2
(
c
,
e
,
tp
,
sg
,
f
,
chkf
,
m2
)
local
m
=
sg
:
Clone
()
if
c
:
IsSetCard
(
0x551
)
then
m
:
Merge
(
m2
)
end
if
c
:
IsSetCard
(
0x551
)
then
m
:
Merge
(
m2
)
end
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
...
...
expansions/script/c33500551.lua
View file @
2b706e65
--GGO 星之骑士 莲
--GGO 星之骑士 莲
local
m
=
33500551
local
m
=
33500551
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
local
dam
=
500
dam
=
500
syu_Ggl
=
syu_Ggl
or
{}
syu_Ggl
=
syu_Ggl
or
{}
function
syu_Ggl
.
sespm
(
c
,
code
)
function
syu_Ggl
.
sespm
(
c
,
code
)
local
tc
=
c
local
tc
=
c
--spsummon from szone
--spsummon from szone
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DAMAGE
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DAMAGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
,
code
+
1
)
e2
:
SetCountLimit
(
1
,
code
+
1
)
e2
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
)
e2
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
)
e2
:
SetCondition
(
syu_Ggl
.
spcon1
)
e2
:
SetCondition
(
syu_Ggl
.
spcon1
)
e2
:
SetTarget
(
syu_Ggl
.
sptg1
)
e2
:
SetTarget
(
syu_Ggl
.
sptg1
)
e2
:
SetOperation
(
syu_Ggl
.
spop1
)
e2
:
SetOperation
(
syu_Ggl
.
spop1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
return
e2
return
e2
end
end
function
syu_Ggl
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
syu_Ggl
.
spcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
>=
PHASE_BATTLE_START
and
Duel
.
GetCurrentPhase
()
<=
PHASE_BATTLE
return
Duel
.
GetCurrentPhase
()
>=
PHASE_BATTLE_START
and
Duel
.
GetCurrentPhase
()
<=
PHASE_BATTLE
and
aux
.
dscon
()
and
aux
.
dscon
()
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
e
:
GetHandler
():
GetType
()
==
TYPE_TRAP
+
TYPE_CONTINUOUS
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
e
:
GetHandler
():
GetType
()
==
TYPE_TRAP
+
TYPE_CONTINUOUS
end
end
function
syu_Ggl
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
syu_Ggl
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
dam
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
syu_Ggl
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
syu_Ggl
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
Damage
(
1
-
tp
,
dam
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
dam
,
REASON_EFFECT
)
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetLabelObject
(
c
)
e2
:
SetLabelObject
(
c
)
e2
:
SetCondition
(
syu_Ggl
.
descon
)
e2
:
SetCondition
(
syu_Ggl
.
descon
)
e2
:
SetOperation
(
syu_Ggl
.
desop
)
e2
:
SetOperation
(
syu_Ggl
.
desop
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
end
end
end
end
function
syu_Ggl
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
syu_Ggl
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
if
tc
:
GetFlagEffect
(
tc
:
GetOriginalCode
())
~=
0
then
if
tc
:
GetFlagEffect
(
tc
:
GetOriginalCode
())
~=
0
then
return
true
return
true
else
else
e
:
Reset
()
e
:
Reset
()
return
false
return
false
end
end
end
end
function
syu_Ggl
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
syu_Ggl
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
syu_Ggl
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
syu_Ggl
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
>=
PHASE_BATTLE_START
and
Duel
.
GetCurrentPhase
()
<=
PHASE_BATTLE
return
Duel
.
GetCurrentPhase
()
>=
PHASE_BATTLE_START
and
Duel
.
GetCurrentPhase
()
<=
PHASE_BATTLE
and
aux
.
dscon
()
and
aux
.
dscon
()
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
end
end
function
syu_Ggl
.
costh
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
syu_Ggl
.
costh
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToHand
()
end
if
chk
==
0
then
return
c
:
IsAbleToHand
()
end
Duel
.
SendtoHand
(
c
,
tp
,
REASON_COST
)
Duel
.
SendtoHand
(
c
,
tp
,
REASON_COST
)
end
end
function
syu_Ggl
.
splimit
(
e
,
c
)
function
syu_Ggl
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0x5a2
)
return
not
c
:
IsSetCard
(
0x5a2
)
end
end
-------------------------------
-------------------------------
if
not
cm
then
return
end
if
not
cm
then
return
end
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
atktg1
)
e1
:
SetTarget
(
cm
.
atktg1
)
e1
:
SetOperation
(
cm
.
atkop1
)
e1
:
SetOperation
(
cm
.
atkop1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e2
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCondition
(
cm
.
atkcon
)
e2
:
SetCondition
(
cm
.
atkcon
)
e2
:
SetOperation
(
cm
.
atkop
)
e2
:
SetOperation
(
cm
.
atkop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
--e1
--e1
function
cm
.
spfilter1
(
c
,
e
,
tp
)
function
cm
.
spfilter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x5a2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x5a2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
cm
.
atktg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
atktg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
end
function
cm
.
atkop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
atkop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
if
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_TRAP
+
TYPE_CONTINUOUS
)
e1
:
SetValue
(
TYPE_TRAP
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
end
end
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
syu_Ggl
.
splimit
)
e2
:
SetTarget
(
syu_Ggl
.
splimit
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
-----------------
-----------------
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ac
=
Duel
.
GetAttacker
()
local
ac
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttackTarget
()
local
tc
=
Duel
.
GetAttackTarget
()
if
not
ac
:
IsControler
(
tp
)
then
ac
,
tc
=
tc
,
ac
end
if
not
ac
:
IsControler
(
tp
)
then
ac
,
tc
=
tc
,
ac
end
return
ac
and
ac
:
IsControler
(
tp
)
and
ac
:
IsFaceup
()
and
ac
:
IsSetCard
(
0x5a2
)
return
ac
and
ac
:
IsControler
(
tp
)
and
ac
:
IsFaceup
()
and
ac
:
IsSetCard
(
0x5a2
)
end
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
ac
=
Duel
.
GetAttacker
()
local
ac
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttackTarget
()
local
tc
=
Duel
.
GetAttackTarget
()
if
not
ac
:
IsControler
(
tp
)
then
ac
,
tc
=
tc
,
ac
end
if
not
ac
:
IsControler
(
tp
)
then
ac
,
tc
=
tc
,
ac
end
if
ac
:
IsRelateToBattle
()
and
ac
:
IsFaceup
()
and
tc
:
IsRelateToBattle
()
and
tc
:
IsFaceup
()
then
if
ac
:
IsRelateToBattle
()
and
ac
:
IsFaceup
()
and
tc
:
IsRelateToBattle
()
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
e1
:
SetValue
(
tc
:
GetAttack
())
e1
:
SetValue
(
tc
:
GetAttack
())
ac
:
RegisterEffect
(
e1
)
ac
:
RegisterEffect
(
e1
)
end
end
end
end
\ No newline at end of file
expansions/script/c66915007.lua
View file @
2b706e65
--星曜女神·乐音
--星曜女神·乐音
local
m
=
66915007
local
m
=
66915007
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--splimit
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
cm
.
splimit
)
e1
:
SetValue
(
cm
.
splimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetOperation
(
cm
.
spop
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--tograve
--tograve
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
m
)
e3
:
SetCountLimit
(
1
,
m
)
e3
:
SetTarget
(
cm
.
tgtg
)
e3
:
SetTarget
(
cm
.
tgtg
)
e3
:
SetOperation
(
cm
.
tgop
)
e3
:
SetOperation
(
cm
.
tgop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--cannot be link material
--cannot be link material
local
e33
=
Effect
.
CreateEffect
(
c
)
local
e33
=
Effect
.
CreateEffect
(
c
)
e33
:
SetType
(
EFFECT_TYPE_SINGLE
)
e33
:
SetType
(
EFFECT_TYPE_SINGLE
)
e33
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e33
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e33
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e33
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e33
:
SetValue
(
1
)
e33
:
SetValue
(
1
)
c
:
RegisterEffect
(
e33
)
c
:
RegisterEffect
(
e33
)
end
end
function
cm
.
spfilter
(
c
)
function
cm
.
spfilter
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsSetCard
(
0x374
)
and
((
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
))
or
c
:
IsType
(
TYPE_TRAP
))
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsSetCard
(
0x374
)
and
((
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
))
or
c
:
IsType
(
TYPE_TRAP
))
end
end
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
if
not
StarLight_from_K
then
return
false
end
if
not
StarLight_from_K
then
return
false
end
return
StarLight_from_K
.
Brightstarlight_Effect
[
se
]
return
StarLight_from_K
.
Brightstarlight_Effect
[
se
]
end
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandler
():
GetControler
()
local
tp
=
e
:
GetHandler
():
GetControler
()
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
nil
)
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
tp
=
e
:
GetHandler
():
GetControler
()
local
tp
=
e
:
GetHandler
():
GetControler
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
cm
.
filter
(
c
)
function
cm
.
filter
(
c
)
return
((
c
:
GetType
()
==
TYPE_SPELL
+
TYPE_CONTINUOUS
or
c
:
GetType
()
==
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x374
))
and
c
:
IsSSetable
()
or
c
:
IsCode
(
66915001
)
return
((
c
:
GetType
()
==
TYPE_SPELL
+
TYPE_CONTINUOUS
or
c
:
GetType
()
==
TYPE_TRAP
)
and
c
:
IsSetCard
(
0x374
))
and
c
:
IsSSetable
()
or
c
:
IsCode
(
66915001
)
end
end
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
end
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
)
Duel
.
SSet
(
tp
,
g
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
:
IsType
(
TYPE_TRAP
)
then
if
tc
:
IsType
(
TYPE_TRAP
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
end
end
expansions/script/c66915038.lua
View file @
2b706e65
--行星女神·希冀
--行星女神·希冀
function
c66915038
.
initial_effect
(
c
)
function
c66915038
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--splimit
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
c66915038
.
splimit
)
e1
:
SetValue
(
c66915038
.
splimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--base atk/def
--base atk/def
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
c66915038
.
atkval
)
e1
:
SetValue
(
c66915038
.
atkval
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
e2
:
SetCode
(
EFFECT_SET_BASE_DEFENSE
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_REMOVE
+
CATEGORY_LEAVE_GRAVE
)
e3
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_REMOVE
+
CATEGORY_LEAVE_GRAVE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
c66915038
.
rectg
)
e3
:
SetTarget
(
c66915038
.
rectg
)
e3
:
SetOperation
(
c66915038
.
recop
)
e3
:
SetOperation
(
c66915038
.
recop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c66915038
.
splimit
(
e
,
se
,
sp
,
st
)
function
c66915038
.
splimit
(
e
,
se
,
sp
,
st
)
if
not
StarLight_from_K
then
return
false
end
if
not
StarLight_from_K
then
return
false
end
return
StarLight_from_K
.
Brightstarlight_Effect
[
se
]
return
StarLight_from_K
.
Brightstarlight_Effect
[
se
]
end
end
function
c66915038
.
atkval
(
e
,
c
)
function
c66915038
.
atkval
(
e
,
c
)
return
c
:
GetOverlayCount
()
*
200
return
c
:
GetOverlayCount
()
*
200
end
end
function
c66915038
.
rectg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c66915038
.
rectg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
end
end
function
c66915038
.
matfilter
(
c
,
tp
)
function
c66915038
.
matfilter
(
c
,
tp
)
return
not
(
c
:
IsCode
(
66915037
)
and
c
:
IsControler
(
tp
))
return
not
(
c
:
IsCode
(
66915037
)
and
c
:
IsControler
(
tp
))
end
end
function
c66915038
.
matfilters
(
c
)
function
c66915038
.
matfilters
(
c
)
return
c
:
IsCode
(
66915037
)
and
c
:
IsAbleToRemove
()
return
c
:
IsCode
(
66915037
)
and
c
:
IsAbleToRemove
()
end
end
function
c66915038
.
filter
(
c
)
function
c66915038
.
filter
(
c
)
return
c
:
IsCode
(
66915037
)
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
66915037
)
and
c
:
IsAbleToHand
()
end
end
function
c66915038
.
recop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c66915038
.
recop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
count
=
c
:
GetOverlayCount
()
local
count
=
c
:
GetOverlayCount
()
if
count
<=
20
then
if
count
<=
20
then
if
not
c
:
IsType
(
TYPE_XYZ
)
then
return
end
if
not
c
:
IsType
(
TYPE_XYZ
)
then
return
end
local
ct
=
10
local
ct
=
10
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
Card
.
IsCanOverlay
),
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
Card
.
IsCanOverlay
),
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
nil
)
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
<
10
then
if
g
:
GetCount
()
<
10
then
ct
=
g
:
GetCount
()
ct
=
g
:
GetCount
()
end
end
local
sg
=
g
:
RandomSelect
(
tp
,
ct
)
local
sg
=
g
:
RandomSelect
(
tp
,
ct
)
Duel
.
Overlay
(
c
,
sg
)
Duel
.
Overlay
(
c
,
sg
)
else
else
local
g
=
Duel
.
GetMatchingGroup
(
c66915038
.
matfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
aux
.
ExceptThisCard
(
e
),
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
c66915038
.
matfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
aux
.
ExceptThisCard
(
e
),
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
end
if
count
>=
50
then
if
count
>=
50
then
local
g1
=
Duel
.
GetMatchingGroup
(
c66915038
.
matfilters
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
local
g1
=
Duel
.
GetMatchingGroup
(
c66915038
.
matfilters
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
g1
:
AddCard
(
c
)
g1
:
AddCard
(
c
)
if
Duel
.
Remove
(
g1
,
POS_FACEDOWN
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c66915038
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
if
Duel
.
Remove
(
g1
,
POS_FACEDOWN
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c66915038
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c66915038
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c66915038
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
end
end
end
end
\ No newline at end of file
expansions/script/c66915073.lua
View file @
2b706e65
--耀星女神·希冀
--耀星女神·希冀
local
m
=
66915073
local
m
=
66915073
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
66915070
)
aux
.
AddCodeList
(
c
,
66915070
)
--xyz summon
--xyz summon
aux
.
AddXyzProcedure
(
c
,
cm
.
mfilter
,
4
,
2
,
cm
.
ovfilter
,
aux
.
Stringid
(
m
,
0
),
2
,
cm
.
xyzop
)
aux
.
AddXyzProcedure
(
c
,
cm
.
mfilter
,
4
,
2
,
cm
.
ovfilter
,
aux
.
Stringid
(
m
,
0
),
2
,
cm
.
xyzop
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--code
--code
aux
.
EnableChangeCode
(
c
,
m
-
3
,
LOCATION_MZONE
+
LOCATION_GRAVE
)
aux
.
EnableChangeCode
(
c
,
m
-
3
,
LOCATION_MZONE
+
LOCATION_GRAVE
)
--splimit
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
cm
.
splimit
)
e1
:
SetValue
(
cm
.
splimit
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--X M
--X M
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_DICE
)
e1
:
SetCategory
(
CATEGORY_DICE
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--T F
--T F
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetCategory
(
CATEGORY_DICE
)
e2
:
SetCategory
(
CATEGORY_DICE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
cm
.
target1
)
e2
:
SetTarget
(
cm
.
target1
)
e2
:
SetOperation
(
cm
.
operation1
)
e2
:
SetOperation
(
cm
.
operation1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
if
not
StarLight_from_K
then
return
true
end
if
not
StarLight_from_K
then
return
true
end
return
not
StarLight_from_K
.
Brightstarlight_Effect
[
se
]
return
not
StarLight_from_K
.
Brightstarlight_Effect
[
se
]
end
end
function
cm
.
mfilter
(
c
)
function
cm
.
mfilter
(
c
)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
return
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
end
function
cm
.
ovfilter
(
c
)
function
cm
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
m
-
3
)
and
c
:
IsType
(
TYPE_XYZ
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
m
-
3
)
and
c
:
IsType
(
TYPE_XYZ
)
end
end
function
cm
.
xfilter
(
c
)
function
cm
.
xfilter
(
c
)
return
c
:
IsCanOverlay
()
return
c
:
IsCanOverlay
()
end
end
function
cm
.
xfilter2
(
c
)
function
cm
.
xfilter2
(
c
)
return
c
:
IsCanOverlay
()
and
c
:
IsSetCard
(
0x374
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsCanOverlay
()
and
c
:
IsSetCard
(
0x374
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
function
cm
.
tffilter
(
c
,
tp
)
function
cm
.
tffilter
(
c
,
tp
)
return
c
:
GetOriginalType
()
&
TYPE_CONTINUOUS
~=
0
and
c
:
GetOriginalType
()
&
TYPE_SPELL
~=
0
and
c
:
IsSetCard
(
0x374
)
and
c
:
CheckUniqueOnField
(
tp
)
and
not
c
:
IsForbidden
()
return
c
:
GetOriginalType
()
&
TYPE_CONTINUOUS
~=
0
and
c
:
GetOriginalType
()
&
TYPE_SPELL
~=
0
and
c
:
IsSetCard
(
0x374
)
and
c
:
CheckUniqueOnField
(
tp
)
and
not
c
:
IsForbidden
()
end
end
function
cm
.
xyzop
(
e
,
tp
,
chk
)
function
cm
.
xyzop
(
e
,
tp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
xfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
xfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
xfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
xfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Overlay
(
e
:
GetHandler
(),
tg
)
Duel
.
Overlay
(
e
:
GetHandler
(),
tg
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
end
end
function
cm
.
condition
(
e
,
tp
)
function
cm
.
condition
(
e
,
tp
)
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetTurnPlayer
()
==
tp
return
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
Duel
.
GetTurnPlayer
()
==
tp
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
xfilter2
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
xfilter2
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
PLAYER_ALL
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
PLAYER_ALL
,
1
)
end
end
cm
.
toss_dice
=
true
cm
.
toss_dice
=
true
function
cm
.
operation
(
e
,
tp
)
function
cm
.
operation
(
e
,
tp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
or
e
:
GetHandler
():
IsFacedown
()
then
return
false
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
or
e
:
GetHandler
():
IsFacedown
()
then
return
false
end
local
dice_for_it_half
=
math.ceil
(
Duel
.
TossDice
(
tp
,
1
)
/
2
)
local
dice_for_it_half
=
math.ceil
(
Duel
.
TossDice
(
tp
,
1
)
/
2
)
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
HINTMSG_XMATERIAL
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
xfilter2
),
tp
,
LOCATION_DECK
+
LOCATION_SZONE
,
0
,
dice_for_it_half
,
dice_for_it_half
,
nil
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
xfilter2
),
tp
,
LOCATION_DECK
+
LOCATION_SZONE
,
0
,
dice_for_it_half
,
dice_for_it_half
,
nil
)
if
not
tg
or
tg
:
GetCount
()
<
1
then
return
end
if
not
tg
or
tg
:
GetCount
()
<
1
then
return
end
Duel
.
Overlay
(
e
:
GetHandler
(),
tg
)
Duel
.
Overlay
(
e
:
GetHandler
(),
tg
)
end
end
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
xfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
xfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
PLAYER_ALL
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DICE
,
nil
,
0
,
PLAYER_ALL
,
1
)
end
end
function
cm
.
operation1
(
e
,
tp
)
function
cm
.
operation1
(
e
,
tp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
or
e
:
GetHandler
():
IsFacedown
()
then
return
false
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
or
e
:
GetHandler
():
IsFacedown
()
then
return
false
end
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
HINTMSG_XMATERIAL
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
xfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
xfilter
,
tp
,
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
if
not
tg
or
tg
:
GetCount
()
<
1
then
return
end
if
not
tg
or
tg
:
GetCount
()
<
1
then
return
end
Duel
.
Overlay
(
e
:
GetHandler
(),
tg
)
Duel
.
Overlay
(
e
:
GetHandler
(),
tg
)
local
dice_for_it_half
=
math.ceil
(
Duel
.
TossDice
(
tp
,
1
)
/
2
)
local
dice_for_it_half
=
math.ceil
(
Duel
.
TossDice
(
tp
,
1
)
/
2
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
local
ft
=
dice_for_it_half
local
ft
=
dice_for_it_half
if
ft
>
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
then
if
ft
>
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
then
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_FZONE
,
0
)
==
0
then
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_FZONE
,
0
)
==
0
then
ft
=
ft
-
1
ft
=
ft
-
1
end
end
end
end
if
ft
<=
0
then
return
end
if
ft
<=
0
then
return
end
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
HINTMSG_TOFIELD
)
Duel
.
Hint
(
HINT_MESSAGE
,
tp
,
HINTMSG_TOFIELD
)
local
sg
=
c
:
GetOverlayGroup
()
local
sg
=
c
:
GetOverlayGroup
()
local
tfg
=
sg
:
FilterSelect
(
tp
,
cm
.
tffilter
,
1
,
ft
,
nil
)
local
tfg
=
sg
:
FilterSelect
(
tp
,
cm
.
tffilter
,
1
,
ft
,
nil
)
for
tc
in
aux
.
Next
(
tfg
)
do
for
tc
in
aux
.
Next
(
tfg
)
do
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
end
end
\ No newline at end of file
expansions/script/c71401002.lua
View file @
2b706e65
--蝶梦-「绽」
--蝶梦-「绽」
xpcall
(
function
()
require
(
"expansions/script/c71401001"
)
end
,
function
()
require
(
"script/c71401001"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/c71401001"
)
end
,
function
()
require
(
"script/c71401001"
)
end
)
function
c71401002
.
initial_effect
(
c
)
function
c71401002
.
initial_effect
(
c
)
yume
.
AddButterflySpell
(
c
,
71401002
)
yume
.
AddButterflySpell
(
c
,
71401002
)
--search
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
71401002
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
71401002
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
71501002
)
e2
:
SetCountLimit
(
1
,
71501002
)
e2
:
SetCondition
(
c71401002
.
con2
)
e2
:
SetCondition
(
c71401002
.
con2
)
e2
:
SetCost
(
c71401002
.
cost2
)
e2
:
SetCost
(
c71401002
.
cost2
)
e2
:
SetTarget
(
c71401002
.
tg2
)
e2
:
SetTarget
(
c71401002
.
tg2
)
e2
:
SetOperation
(
c71401002
.
op2
)
e2
:
SetOperation
(
c71401002
.
op2
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
yume
.
ButterflyCounter
()
yume
.
ButterflyCounter
()
end
end
function
c71401002
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71401002
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
e
:
GetHandler
():
GetType
()
==
TYPE_SPELL
+
TYPE_CONTINUOUS
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
e
:
GetHandler
():
GetType
()
==
TYPE_SPELL
+
TYPE_CONTINUOUS
end
end
function
c71401002
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c71401002
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
71401001
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
71401001
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
yume
.
RegButterflyCostLimit
(
e
,
tp
)
yume
.
RegButterflyCostLimit
(
e
,
tp
)
end
end
function
c71401002
.
filter2
(
c
,
tp
)
function
c71401002
.
filter2
(
c
,
tp
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsLevel
(
4
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
(
c
:
IsAbleToHand
()
or
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
))
return
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsLevel
(
4
)
and
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
(
c
:
IsAbleToHand
()
or
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
))
end
end
function
c71401002
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c71401002
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c71401002
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c71401002
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c71401002
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71401002
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c71401002
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c71401002
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
then
local
b1
=
tc
:
IsAbleToHand
()
local
b1
=
tc
:
IsAbleToHand
()
local
b2
=
not
tc
:
IsForbidden
()
and
tc
:
CheckUniqueOnField
(
tp
)
local
b2
=
not
tc
:
IsForbidden
()
and
tc
:
CheckUniqueOnField
(
tp
)
if
b1
and
(
not
b2
or
Duel
.
SelectOption
(
tp
,
11
50
,
aux
.
Stringid
(
71401002
,
1
))
==
0
)
then
if
b1
and
(
not
b2
or
Duel
.
SelectOption
(
tp
,
11
90
,
aux
.
Stringid
(
71401002
,
1
))
==
0
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
else
else
if
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
if
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_TRAP
+
TYPE_CONTINUOUS
)
e1
:
SetValue
(
TYPE_TRAP
+
TYPE_CONTINUOUS
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
end
end
end
end
end
end
\ No newline at end of file
expansions/script/c71401007.lua
View file @
2b706e65
--蝶现-「宴」
--蝶现-「宴」
xpcall
(
function
()
require
(
"expansions/script/c71401001"
)
end
,
function
()
require
(
"script/c71401001"
)
end
)
xpcall
(
function
()
require
(
"expansions/script/c71401001"
)
end
,
function
()
require
(
"script/c71401001"
)
end
)
function
c71401007
.
initial_effect
(
c
)
function
c71401007
.
initial_effect
(
c
)
--spsummon
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
71401007
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
71401007
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
+
LOCATION_REMOVED
)
e1
:
SetCountLimit
(
1
,
71401007
)
e1
:
SetCountLimit
(
1
,
71401007
)
e1
:
SetCondition
(
c71401007
.
con1
)
e1
:
SetCondition
(
c71401007
.
con1
)
e1
:
SetCost
(
c71401007
.
cost1
)
e1
:
SetCost
(
c71401007
.
cost1
)
e1
:
SetTarget
(
c71401007
.
tg1
)
e1
:
SetTarget
(
c71401007
.
tg1
)
e1
:
SetOperation
(
c71401007
.
op1
)
e1
:
SetOperation
(
c71401007
.
op1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--draw
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
71401007
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
71401007
,
1
))
e2
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_DRAW
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_DRAW
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
71501007
)
e2
:
SetCountLimit
(
1
,
71501007
)
e2
:
SetCost
(
c71401007
.
cost2
)
e2
:
SetCost
(
c71401007
.
cost2
)
e2
:
SetTarget
(
c71401007
.
tg2
)
e2
:
SetTarget
(
c71401007
.
tg2
)
e2
:
SetOperation
(
c71401007
.
op2
)
e2
:
SetOperation
(
c71401007
.
op2
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
yume
.
ButterflyCounter
()
yume
.
ButterflyCounter
()
end
end
function
c71401007
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71401007
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
function
c71401007
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c71401007
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemoveAsCost
,
tp
,
LOCATION_
ONFIELD
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
GetCustomActivityCount
(
71401001
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemoveAsCost
,
tp
,
LOCATION_
HAND
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
GetCustomActivityCount
(
71401001
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemoveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemoveAsCost
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
yume
.
RegButterflyCostLimit
(
e
,
tp
)
yume
.
RegButterflyCostLimit
(
e
,
tp
)
end
end
function
c71401007
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c71401007
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c71401007
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71401007
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c71401007
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c71401007
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
71401001
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
71401001
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
yume
.
RegButterflyCostLimit
(
e
,
tp
)
yume
.
RegButterflyCostLimit
(
e
,
tp
)
end
end
function
c71401007
.
filter2ext
(
c
)
function
c71401007
.
filter2ext
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_CONTINUOUS
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_CONTINUOUS
)
end
end
function
c71401007
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c71401007
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c71401007
.
filter2ext
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c71401007
.
filter2ext
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
function
c71401007
.
filter2
(
c
,
e
,
tp
)
function
c71401007
.
filter2
(
c
,
e
,
tp
)
return
c
:
IsLevel
(
4
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsLevel
(
4
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c71401007
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c71401007
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
,
0
,
1
,
2
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
,
0
,
1
,
2
,
nil
)
if
g
:
GetCount
()
==
0
then
return
end
if
g
:
GetCount
()
==
0
then
return
end
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
local
sg
=
Duel
.
GetMatchingGroup
(
c71401007
.
filter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
local
sg
=
Duel
.
GetMatchingGroup
(
c71401007
.
filter2
,
tp
,
LOCATION_HAND
,
0
,
nil
,
e
,
tp
)
if
Duel
.
Draw
(
tp
,
g
:
GetCount
(),
REASON_EFFECT
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
71401007
,
2
))
then
if
Duel
.
Draw
(
tp
,
g
:
GetCount
(),
REASON_EFFECT
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
71401007
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
tg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
\ No newline at end of file
expansions/script/c9310034.lua
View file @
2b706e65
--剑之艺术家 单调锋
--剑之艺术家 单调锋
function
c9310034
.
initial_effect
(
c
)
function
c9310034
.
initial_effect
(
c
)
--synchro summon
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x480
,
0x3f91
),
aux
.
NonTuner
(
Card
.
IsSynchroType
,
TYPE_SYNCHRO
),
1
)
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x480
,
0x3f91
),
aux
.
NonTuner
(
Card
.
IsSynchroType
,
TYPE_SYNCHRO
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--act limit
--act limit
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetCode
(
EVENT_CHAINING
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e0
:
SetRange
(
LOCATION_ONFIELD
)
e0
:
SetRange
(
LOCATION_ONFIELD
)
e0
:
SetOperation
(
c9310034
.
chainop
)
e0
:
SetOperation
(
c9310034
.
chainop
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
9310034
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
9310034
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
c9310034
.
spcon
)
e1
:
SetCondition
(
c9310034
.
spcon
)
e1
:
SetTarget
(
c9310034
.
sptg
)
e1
:
SetTarget
(
c9310034
.
sptg
)
e1
:
SetOperation
(
c9310034
.
spop
)
e1
:
SetOperation
(
c9310034
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--nontuner
--nontuner
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetCode
(
EFFECT_NONTUNER
)
e3
:
SetCode
(
EFFECT_NONTUNER
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
1
)
e3
:
SetValue
(
1
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--negate
--negate
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
9310034
,
1
))
e4
:
SetDescription
(
aux
.
Stringid
(
9310034
,
1
))
e4
:
SetCategory
(
CATEGORY_DISABLE
)
e4
:
SetCategory
(
CATEGORY_DISABLE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCode
(
EVENT_REMOVE
)
e4
:
SetCode
(
EVENT_REMOVE
)
e4
:
SetCondition
(
c9310034
.
negcon
)
e4
:
SetCondition
(
c9310034
.
negcon
)
e4
:
SetTarget
(
c9310034
.
negtg
)
e4
:
SetTarget
(
c9310034
.
negtg
)
e4
:
SetOperation
(
c9310034
.
negop
)
e4
:
SetOperation
(
c9310034
.
negop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
c9310034
.
material_setcode
=
0x3f91
c9310034
.
material_setcode
=
0x3f91
function
c9310034
.
chainop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c9310034
.
material_setcode
=
0x480
if
re
:
GetHandler
()
==
e
:
GetHandler
()
and
ep
==
tp
then
c9310034
.
material_type
=
TYPE_SYNCHRO
Duel
.
SetChainLimit
(
c9310034
.
chainlm
)
function
c9310034
.
chainop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
if
re
:
GetHandler
()
==
e
:
GetHandler
()
and
ep
==
tp
then
end
Duel
.
SetChainLimit
(
c9310034
.
chainlm
)
function
c9310034
.
chainlm
(
e
,
rp
,
tp
)
end
return
tp
==
rp
end
end
function
c9310034
.
chainlm
(
e
,
rp
,
tp
)
function
c9310034
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
==
rp
local
c
=
e
:
GetHandler
()
end
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousPosition
(
POS_ATTACK
)
function
c9310034
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
function
c9310034
.
tgfilter
(
c
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousPosition
(
POS_ATTACK
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToRemove
()
end
and
(
c
:
IsSetCard
(
0x3f91
)
or
c
:
IsSetCard
(
0x480
))
function
c9310034
.
tgfilter
(
c
)
end
return
c
:
IsFaceup
()
and
c
:
IsAbleToRemove
()
function
c9310034
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
(
c
:
IsSetCard
(
0x3f91
)
or
c
:
IsSetCard
(
0x480
))
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
function
c9310034
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
Duel
.
IsExistingMatchingCard
(
c9310034
.
tgfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
aux
.
ExceptThisCard
(
e
))
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
and
Duel
.
IsExistingMatchingCard
(
c9310034
.
tgfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
aux
.
ExceptThisCard
(
e
))
end
Duel
.
SetChainLimit
(
c9310034
.
chainlm
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
0
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
Duel
.
SetChainLimit
(
c9310034
.
chainlm
)
function
c9310034
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
function
c9310034
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
~=
0
then
local
c
=
e
:
GetHandler
()
Duel
.
BreakEffect
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
~=
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9310034
.
tgfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
1
,
aux
.
ExceptThisCard
(
e
))
Duel
.
BreakEffect
()
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c9310034
.
tgfilter
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
,
0
,
1
,
1
,
aux
.
ExceptThisCard
(
e
))
end
if
g
:
GetCount
()
>
0
then
end
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c9310034
.
remfilter
(
c
)
end
return
not
c
:
IsType
(
TYPE_TOKEN
)
end
end
function
c9310034
.
remfilter
(
c
)
function
c9310034
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
c
:
IsType
(
TYPE_TOKEN
)
return
eg
:
IsExists
(
c9310034
.
remfilter
,
1
,
nil
)
end
end
function
c9310034
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c9310034
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
return
eg
:
IsExists
(
c9310034
.
remfilter
,
1
,
nil
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
aux
.
NegateAnyFilter
(
chkc
)
end
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsLevelAbove
(
5
)
function
c9310034
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
and
Duel
.
IsExistingTarget
(
aux
.
NegateAnyFilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
aux
.
NegateAnyFilter
(
chkc
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISABLE
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsLevelAbove
(
5
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
NegateAnyFilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
aux
.
NegateAnyFilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISABLE
)
Duel
.
SetChainLimit
(
c9310034
.
chainlm
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
NegateAnyFilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
function
c9310034
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetChainLimit
(
c9310034
.
chainlm
)
local
c
=
e
:
GetHandler
()
end
local
tc
=
Duel
.
GetFirstTarget
()
function
c9310034
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
tc
and
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
local
c
=
e
:
GetHandler
()
and
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsLevelAbove
(
5
)
then
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
if
tc
and
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
local
e0
=
Effect
.
CreateEffect
(
c
)
and
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsLevelAbove
(
5
)
then
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
e0
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetValue
(
-
4
)
e0
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
c
:
RegisterEffect
(
e0
)
e0
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e0
:
SetValue
(
-
4
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
c
:
RegisterEffect
(
e0
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
tc
:
RegisterEffect
(
e1
)
e1
:
SetCode
(
EFFECT_DISABLE
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
tc
:
RegisterEffect
(
e1
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
tc
:
RegisterEffect
(
e2
)
e2
:
SetValue
(
RESET_TURN_SET
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
local
e3
=
Effect
.
CreateEffect
(
c
)
tc
:
RegisterEffect
(
e2
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
tc
:
RegisterEffect
(
e3
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
end
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
tc
:
RegisterEffect
(
e3
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment