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
5c4da376
Commit
5c4da376
authored
Jul 11, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
y1s1
parent
bd561429
Pipeline
#314
passed with stages
in 45 minutes and 19 seconds
Changes
20
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
781 additions
and
773 deletions
+781
-773
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c10221022.lua
expansions/script/c10221022.lua
+5
-2
expansions/script/c14000022.lua
expansions/script/c14000022.lua
+1
-1
expansions/script/c16001012.lua
expansions/script/c16001012.lua
+1
-1
expansions/script/c18006010.lua
expansions/script/c18006010.lua
+1
-1
expansions/script/c21520186.lua
expansions/script/c21520186.lua
+1
-1
expansions/script/c22600107.lua
expansions/script/c22600107.lua
+85
-85
expansions/script/c33310152.lua
expansions/script/c33310152.lua
+1
-1
expansions/script/c33400101.lua
expansions/script/c33400101.lua
+1
-1
expansions/script/c33400311.lua
expansions/script/c33400311.lua
+2
-2
expansions/script/c33700723.lua
expansions/script/c33700723.lua
+1
-1
expansions/script/c47500104.lua
expansions/script/c47500104.lua
+91
-87
expansions/script/c47510028.lua
expansions/script/c47510028.lua
+140
-140
expansions/script/c47510203.lua
expansions/script/c47510203.lua
+108
-108
expansions/script/c47510209.lua
expansions/script/c47510209.lua
+121
-121
expansions/script/c47510225.lua
expansions/script/c47510225.lua
+151
-151
expansions/script/c60150642.lua
expansions/script/c60150642.lua
+1
-1
expansions/script/c60152304.lua
expansions/script/c60152304.lua
+68
-68
expansions/script/c65020024.lua
expansions/script/c65020024.lua
+1
-1
expansions/script/c81041028.lua
expansions/script/c81041028.lua
+1
-0
No files found.
expansions/222DIY.cdb
View file @
5c4da376
No preview for this file type
expansions/script/c10221022.lua
View file @
5c4da376
...
...
@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
cm
.
con
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e2
)
...
...
@@ -31,7 +32,7 @@ function cm.filter(c)
return
c
:
IsAbleToDeck
()
and
not
c
:
IsPublic
()
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
...
...
@@ -50,7 +51,9 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ConfirmCards
(
1
-
tp
,
g1
)
end
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
end
function
cm
.
dfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x5a1
)
end
...
...
expansions/script/c14000022.lua
View file @
5c4da376
...
...
@@ -74,7 +74,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
and
Duel
.
IsAbleToEnterBP
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
expansions/script/c16001012.lua
View file @
5c4da376
...
...
@@ -77,7 +77,7 @@ function c16001012.con(e,tp,eg,ep,ev,re,r,rp)
if
not
re
then
return
end
local
c
,
rc
=
e
:
GetHandler
(),
re
:
GetHandler
()
return
c
:
IsReason
(
REASON_COST
)
and
re
:
IsHasType
(
0x7e0
)
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
:
IsSetCard
(
0x5c1
)
and
rc
:
IsType
(
TYPE_XYZ
)
and
c
:
IsPreviousLocation
(
LOCATION_OVERLAY
)
and
rc
:
IsSetCard
(
0x5c1
)
and
rc
:
IsType
(
TYPE_XYZ
)
and
c
:
IsPreviousLocation
(
LOCATION_OVERLAY
)
and
Duel
.
IsAbleToEnterBP
()
end
function
c16001012
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
expansions/script/c18006010.lua
View file @
5c4da376
...
...
@@ -41,7 +41,7 @@ function cm.thop(e,tp)
end
end
function
cm
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
GetFirst
():
GetColumnGroup
():
IsContains
(
e
:
GetHandler
())
return
eg
:
GetFirst
():
GetColumnGroup
():
IsContains
(
e
:
GetHandler
())
and
Duel
.
IsAbleToEnterBP
()
end
function
cm
.
drop
(
e
,
tp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
...
...
expansions/script/c21520186.lua
View file @
5c4da376
...
...
@@ -48,7 +48,7 @@ function c21520186.dafilter1(c)
return
c
:
IsSetCard
(
0x490
)
and
c
:
IsFaceup
()
end
function
c21520186
.
dacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetType
()
&
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
==
TYPE_SPELL
+
TYPE_CONTINUOUS
return
e
:
GetHandler
():
GetType
()
&
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
==
TYPE_SPELL
+
TYPE_CONTINUOUS
and
Duel
.
IsAbleToEnterBP
()
end
function
c21520186
.
datg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c21520186
.
dafilter1
(
chkc
)
end
...
...
expansions/script/c22600107.lua
View file @
5c4da376
...
...
@@ -2,109 +2,109 @@
local
m
=
22600107
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_SPIRIT
),
1
,
1
)
c
:
EnableReviveLimit
()
c
:
SetSPSummonOnce
(
m
)
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
cm
.
val
)
c
:
RegisterEffect
(
e1
)
--direct attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
cm
.
cost
)
e2
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e2
)
--return
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
cm
.
retcon
)
e3
:
SetOperation
(
cm
.
retreg
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetValue
(
cm
.
linklimit
)
c
:
RegisterEffect
(
e4
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_SPIRIT
),
1
,
1
)
c
:
EnableReviveLimit
()
c
:
SetSPSummonOnce
(
m
)
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
cm
.
val
)
c
:
RegisterEffect
(
e1
)
--direct attack
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
cm
.
cost
)
e2
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e2
)
--return
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCondition
(
cm
.
retcon
)
e3
:
SetOperation
(
cm
.
retreg
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetValue
(
cm
.
linklimit
)
c
:
RegisterEffect
(
e4
)
end
function
cm
.
linklimit
(
e
,
c
)
if
not
c
then
return
false
end
return
not
c
:
IsSetCard
(
0x261
)
if
not
c
then
return
false
end
return
not
c
:
IsSetCard
(
0x261
)
end
function
cm
.
val
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsType
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
nil
,
TYPE_SPIRIT
)
*
200
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsType
,
c
:
GetControler
(),
LOCATION_GRAVE
,
0
,
nil
,
TYPE_SPIRIT
)
*
200
end
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPIRIT
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
return
c
:
IsType
(
TYPE_SPIRIT
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
3
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
3
,
REASON_COST
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
and
Duel
.
IsAbleToEnterBP
(
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
3
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
3
,
REASON_COST
)
end
function
cm
.
op
(
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
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
cm
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
cm
.
retreg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetDescription
(
1104
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOHAND
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ee0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetCondition
(
aux
.
SpiritReturnCondition
)
e1
:
SetTarget
(
cm
.
rettg
)
e1
:
SetOperation
(
cm
.
retop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e2
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetDescription
(
1104
)
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_TOHAND
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ee0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetCondition
(
aux
.
SpiritReturnCondition
)
e1
:
SetTarget
(
cm
.
rettg
)
e1
:
SetOperation
(
cm
.
retop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
retfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x261
)
and
c
:
IsAbleToHand
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x261
)
and
c
:
IsAbleToHand
()
end
function
cm
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_TRIGGER_F
)
then
return
true
else
return
Duel
.
GetMatchingGroupCount
(
cm
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
>
0
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
if
chk
==
0
then
if
e
:
IsHasType
(
EFFECT_TYPE_TRIGGER_F
)
then
return
true
else
return
Duel
.
GetMatchingGroupCount
(
cm
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
>
0
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetMatchingGroupCount
(
cm
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetMatchingGroupCount
(
cm
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
>
0
then
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c33310152.lua
View file @
5c4da376
...
...
@@ -51,7 +51,7 @@ function c33310152.tgfil(c)
end
function
c33310152
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
c33310152
.
tgfil
(
chkc
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c33310152
.
tgfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c33310152
.
tgfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsAbleToEnterBP
()
end
Duel
.
SelectTarget
(
tp
,
c33310152
.
tgfil
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c33310152
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c33400101.lua
View file @
5c4da376
...
...
@@ -14,7 +14,7 @@ function c33400101.initial_effect(c)
end
function
c33400101
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
e
:
GetLabel
()
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x34f
,
ct
,
REASON_COST
)
end
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x34f
,
ct
,
REASON_COST
)
and
Duel
.
IsAbleToEnterBP
()
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x34f
,
ct
,
REASON_COST
)
end
...
...
expansions/script/c33400311.lua
View file @
5c4da376
...
...
@@ -62,14 +62,14 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
33400311
,
4
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33400311
.
thfilter3
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
then
local
b1
=
tc
:
IsSSetable
()
local
b2
=
tc
:
IsForbidden
()
if
b1
and
(
b2
or
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
33400311
,
2
),
aux
.
Stringid
(
33400311
,
3
))
==
0
)
then
Duel
.
SSet
(
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
else
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
end
...
...
expansions/script/c33700723.lua
View file @
5c4da376
...
...
@@ -8,7 +8,7 @@ function cm.initial_effect(c)
rsneov
.
LPChangeFun
(
c
)
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
end
if
chk
==
0
then
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
and
Duel
.
IsAbleToEnterBP
()
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c47500104.lua
View file @
5c4da376
--大魔导师 姬塔
function
c47500104
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
47500000
)
--material
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
TYPE_PENDULUM
),
8
,
2
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
,
false
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47500104
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--cheisa
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCountLimit
(
1
,
47500104
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetOperation
(
c47500104
.
csop
)
c
:
RegisterEffect
(
e2
)
--damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_BATTLED
)
e3
:
SetCondition
(
c47500104
.
damcon
)
e3
:
SetOperation
(
c47500104
.
damop
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
--element blast
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
47500104
,
0
))
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
c47500104
.
chcon
)
e5
:
SetCost
(
c47500104
.
cost
)
e5
:
SetOperation
(
c47500104
.
chop
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e6
:
SetCondition
(
c47500104
.
sumcon
)
e6
:
SetOperation
(
c47500104
.
sumsuc
)
c
:
RegisterEffect
(
e6
)
aux
.
AddCodeList
(
c
,
47500000
)
--material
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsType
,
TYPE_PENDULUM
),
8
,
2
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
,
false
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47500104
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--cheisa
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCountLimit
(
1
,
47500104
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetCondition
(
c47500104
.
dacon
)
e2
:
SetOperation
(
c47500104
.
csop
)
c
:
RegisterEffect
(
e2
)
--damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_BATTLED
)
e3
:
SetCondition
(
c47500104
.
damcon
)
e3
:
SetOperation
(
c47500104
.
damop
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_GRANT
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetLabelObject
(
e3
)
c
:
RegisterEffect
(
e4
)
--element blast
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
47500104
,
0
))
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_CHAINING
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCondition
(
c47500104
.
chcon
)
e5
:
SetCost
(
c47500104
.
cost
)
e5
:
SetOperation
(
c47500104
.
chop
)
c
:
RegisterEffect
(
e5
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e6
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e6
:
SetCondition
(
c47500104
.
sumcon
)
e6
:
SetOperation
(
c47500104
.
sumsuc
)
c
:
RegisterEffect
(
e6
)
end
c47500104
.
pendulum_level
=
8
function
c47500104
.
mfilter
(
c
,
xyzc
)
return
c
:
IsLevel
(
8
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
return
c
:
IsLevel
(
8
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
end
function
c47500104
.
pefilter
(
c
)
return
c
:
IsRace
(
RACE_WARRIOR
)
or
c
:
IsRace
(
RACE_SPELLCASTER
)
return
c
:
IsRace
(
RACE_WARRIOR
)
or
c
:
IsRace
(
RACE_SPELLCASTER
)
end
function
c47500104
.
psplimit
(
e
,
c
,
tp
,
sumtp
,
sumpos
)
return
not
c47500104
.
pefilter
(
c
)
and
bit
.
band
(
sumtp
,
SUMMON_TYPE_PENDULUM
)
==
SUMMON_TYPE_PENDULUM
return
not
c47500104
.
pefilter
(
c
)
and
bit
.
band
(
sumtp
,
SUMMON_TYPE_PENDULUM
)
==
SUMMON_TYPE_PENDULUM
end
function
c47500104
.
dacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
end
function
c47500104
.
csop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_ATTACK_ALL
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_ATTACK_ALL
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c47500104
.
damcon
(
e
)
return
e
:
GetHandler
():
GetBattleTarget
()
~=
nil
return
e
:
GetHandler
():
GetBattleTarget
()
~=
nil
end
function
c47500104
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Damage
(
1
-
tp
,
1100
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
1100
,
REASON_EFFECT
)
end
function
c47500104
.
chcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
re
:
IsActiveType
(
TYPE_MONSTER
))
and
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
47500000
)
return
(
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
re
:
IsActiveType
(
TYPE_MONSTER
))
and
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
47500000
)
end
function
c47500104
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c47500104
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
c47500104
.
repop
)
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
c47500104
.
repop
)
end
function
c47500104
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
GetType
()
==
TYPE_SPELL
or
c
:
GetType
()
==
TYPE_TRAP
then
c
:
CancelToGrave
(
false
)
end
Duel
.
Damage
(
tp
,
1000
,
REASON_EFFECT
)
local
c
=
e
:
GetHandler
()
if
c
:
GetType
()
==
TYPE_SPELL
or
c
:
GetType
()
==
TYPE_TRAP
then
c
:
CancelToGrave
(
false
)
end
Duel
.
Damage
(
tp
,
1000
,
REASON_EFFECT
)
end
function
c47500104
.
sumcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c47500104
.
sumsuc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetValue
(
c47500104
.
efilter
)
e1
:
SetOwnerPlayer
(
tp
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetValue
(
c47500104
.
efilter
)
e1
:
SetOwnerPlayer
(
tp
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
function
c47500104
.
efilter
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
\ No newline at end of file
expansions/script/c47510028.lua
View file @
5c4da376
This diff is collapsed.
Click to expand it.
expansions/script/c47510203.lua
View file @
5c4da376
...
...
@@ -2,136 +2,136 @@
local
m
=
47510203
local
cm
=
_G
[
"c"
..
m
]
function
c47510203
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--pendulum effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47510203
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
47510203
)
e1
:
SetCost
(
c47510203
.
mcost
)
e1
:
SetTarget
(
c47510203
.
mtg
)
e1
:
SetOperation
(
c47510203
.
mop
)
c
:
RegisterEffect
(
e1
)
--splimit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
c47510203
.
splimit
)
c
:
RegisterEffect
(
e2
)
--Summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SUMMON
)
e3
:
SetDescription
(
aux
.
Stringid
(
47510203
,
1
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCountLimit
(
1
,
47510200
)
e3
:
SetCost
(
c47510203
.
scost
)
e3
:
SetTarget
(
c47510203
.
stg
)
e3
:
SetOperation
(
c47510203
.
sop
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
47510203
,
1
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetOperation
(
c47510203
.
sumop
)
c
:
RegisterEffect
(
e4
)
--indes
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e5
:
SetRange
(
LOCATION_EXTRA
)
e5
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e5
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_FIRE
))
e5
:
SetValue
(
500
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e6
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--pendulum effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47510203
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
47510203
)
e1
:
SetCost
(
c47510203
.
mcost
)
e1
:
SetTarget
(
c47510203
.
mtg
)
e1
:
SetOperation
(
c47510203
.
mop
)
c
:
RegisterEffect
(
e1
)
--splimit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
c47510203
.
splimit
)
c
:
RegisterEffect
(
e2
)
--Summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SUMMON
)
e3
:
SetDescription
(
aux
.
Stringid
(
47510203
,
1
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCountLimit
(
1
,
47510200
)
e3
:
SetCost
(
c47510203
.
scost
)
e3
:
SetTarget
(
c47510203
.
stg
)
e3
:
SetOperation
(
c47510203
.
sop
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
47510203
,
1
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetOperation
(
c47510203
.
sumop
)
c
:
RegisterEffect
(
e4
)
--indes
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e5
:
SetRange
(
LOCATION_EXTRA
)
e5
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e5
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_FIRE
))
e5
:
SetValue
(
500
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e6
)
end
function
c47510203
.
splimit
(
e
,
c
)
return
not
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
return
not
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
end
function
c47510203
.
mcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
()
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
nil
,
0
,
REASON_COST
)
if
chk
==
0
then
return
e
:
GetHandler
()
and
Duel
.
IsAbleToEnterBP
()
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
nil
,
0
,
REASON_COST
)
end
function
c47510203
.
mtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
c47510203
.
mfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
end
function
c47510203
.
mop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c47510203
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
local
c
=
e
:
GetHandler
()
while
tc
do
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetValue
(
1
)
tc
:
RegisterEffect
(
e3
)
tc
=
g
:
GetNext
()
end
local
g
=
Duel
.
GetMatchingGroup
(
c47510203
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
local
c
=
e
:
GetHandler
()
while
tc
do
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetValue
(
1
)
tc
:
RegisterEffect
(
e3
)
tc
=
g
:
GetNext
()
end
end
function
c47510203
.
scost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
IsAttribute
,
1
,
nil
,
ATTRIBUTE_FIRE
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsAttribute
,
1
,
1
,
nil
,
ATTRIBUTE_FIRE
)
Duel
.
Release
(
g
,
REASON_COST
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
IsAttribute
,
1
,
nil
,
ATTRIBUTE_FIRE
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsAttribute
,
1
,
1
,
nil
,
ATTRIBUTE_FIRE
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c47510203
.
ttcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
return
minc
==
0
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
if
c
==
nil
then
return
true
end
return
minc
==
0
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
end
function
c47510203
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510203
.
ttcon
)
c
:
RegisterEffect
(
e1
)
local
res
=
c
:
IsSummonable
(
true
,
nil
)
or
c
:
IsAbleToGrave
()
e1
:
Reset
()
return
res
end
if
chk
==
0
then
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510203
.
ttcon
)
c
:
RegisterEffect
(
e1
)
local
res
=
c
:
IsSummonable
(
true
,
nil
)
or
c
:
IsAbleToGrave
()
e1
:
Reset
()
return
res
end
end
function
c47510203
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510203
.
ttcon
)
c
:
RegisterEffect
(
e1
)
if
c
:
IsSummonable
(
true
,
nil
)
then
Duel
.
Summon
(
tp
,
c
,
true
,
nil
)
end
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510203
.
ttcon
)
c
:
RegisterEffect
(
e1
)
if
c
:
IsSummonable
(
true
,
nil
)
then
Duel
.
Summon
(
tp
,
c
,
true
,
nil
)
end
end
function
c47510203
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_FIRE
))
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
c47510203
.
indval
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_FIRE
))
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
c47510203
.
indval
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetValue
(
1
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c47510203
.
atktg
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
end
function
c47510203
.
indval
(
e
,
c
)
return
not
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
return
not
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
end
\ No newline at end of file
expansions/script/c47510209.lua
View file @
5c4da376
...
...
@@ -2,155 +2,155 @@
local
m
=
47510209
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--pendulum effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47510209
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
47510209
)
e1
:
SetCost
(
c47510209
.
mcost
)
e1
:
SetOperation
(
c47510209
.
mop
)
c
:
RegisterEffect
(
e1
)
--splimit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
c47510209
.
splimit
)
c
:
RegisterEffect
(
e2
)
--Summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SUMMON
)
e3
:
SetDescription
(
aux
.
Stringid
(
47510209
,
1
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCountLimit
(
1
,
47510200
)
e3
:
SetCost
(
c47510209
.
scost
)
e3
:
SetTarget
(
c47510209
.
stg
)
e3
:
SetOperation
(
c47510209
.
sop
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
47510209
,
1
))
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetOperation
(
c47510209
.
sumop
)
c
:
RegisterEffect
(
e4
)
--indes
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e5
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e5
:
SetRange
(
LOCATION_EXTRA
)
e5
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e5
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
))
e5
:
SetValue
(
300
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e5
:
Clone
()
e7
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e7
:
SetValue
(
c47510209
.
efilter1
)
c
:
RegisterEffect
(
e7
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--pendulum effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47510209
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
47510209
)
e1
:
SetCost
(
c47510209
.
mcost
)
e1
:
SetOperation
(
c47510209
.
mop
)
c
:
RegisterEffect
(
e1
)
--splimit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
c47510209
.
splimit
)
c
:
RegisterEffect
(
e2
)
--Summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_SUMMON
)
e3
:
SetDescription
(
aux
.
Stringid
(
47510209
,
1
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCountLimit
(
1
,
47510200
)
e3
:
SetCost
(
c47510209
.
scost
)
e3
:
SetTarget
(
c47510209
.
stg
)
e3
:
SetOperation
(
c47510209
.
sop
)
c
:
RegisterEffect
(
e3
)
--destroy
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
47510209
,
1
))
e4
:
SetCategory
(
CATEGORY_DESTROY
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e4
:
SetOperation
(
c47510209
.
sumop
)
c
:
RegisterEffect
(
e4
)
--indes
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e5
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e5
:
SetRange
(
LOCATION_EXTRA
)
e5
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e5
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsAttribute
,
ATTRIBUTE_LIGHT
))
e5
:
SetValue
(
300
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e5
:
Clone
()
e6
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e6
)
local
e7
=
e5
:
Clone
()
e7
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e7
:
SetValue
(
c47510209
.
efilter1
)
c
:
RegisterEffect
(
e7
)
end
function
c47510209
.
splimit
(
e
,
c
)
return
not
(
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
or
c
:
IsAttribute
(
ATTRIBUTE_DARK
))
return
not
(
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
or
c
:
IsAttribute
(
ATTRIBUTE_DARK
))
end
function
c47510209
.
mcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
()
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
nil
,
0
,
REASON_COST
)
if
chk
==
0
then
return
e
:
GetHandler
()
and
Duel
.
IsAbleToEnterBP
()
end
Duel
.
SendtoExtraP
(
e
:
GetHandler
(),
nil
,
0
,
REASON_COST
)
end
function
c47510209
.
mfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
c47510209
.
mop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c47510209
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
local
c
=
e
:
GetHandler
()
while
tc
do
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetValue
(
2
)
tc
:
RegisterEffect
(
e3
)
tc
=
g
:
GetNext
()
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c47510209
.
rdcon1
)
e1
:
SetOperation
(
c47510209
.
rdop1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c47510209
.
rdcon2
)
e2
:
SetOperation
(
c47510209
.
rdop2
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterEffect
(
e2
,
1
-
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
c47510209
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
local
c
=
e
:
GetHandler
()
while
tc
do
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetValue
(
2
)
tc
:
RegisterEffect
(
e3
)
tc
=
g
:
GetNext
()
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c47510209
.
rdcon1
)
e1
:
SetOperation
(
c47510209
.
rdop1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c47510209
.
rdcon2
)
e2
:
SetOperation
(
c47510209
.
rdop2
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterEffect
(
e2
,
1
-
tp
)
end
function
c47510209
.
rdcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
==
tp
return
ep
==
tp
end
function
c47510209
.
rdop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
tp
,
ev
*
2
)
Duel
.
ChangeBattleDamage
(
tp
,
ev
*
2
)
end
function
c47510209
.
rdcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
==
tp
return
ep
==
tp
end
function
c47510209
.
rdop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
tp
,
ev
/
2
)
Duel
.
ChangeBattleDamage
(
tp
,
ev
/
2
)
end
function
c47510209
.
scost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
IsAttribute
,
1
,
nil
,
ATTRIBUTE_LIGHT
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsAttribute
,
1
,
1
,
nil
,
ATTRIBUTE_LIGHT
)
Duel
.
Release
(
g
,
REASON_COST
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
Card
.
IsAttribute
,
1
,
nil
,
ATTRIBUTE_LIGHT
)
end
local
g
=
Duel
.
SelectReleaseGroup
(
tp
,
Card
.
IsAttribute
,
1
,
1
,
nil
,
ATTRIBUTE_LIGHT
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c47510209
.
ttcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
return
minc
==
0
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
if
c
==
nil
then
return
true
end
return
minc
==
0
and
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
end
function
c47510209
.
stg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510209
.
ttcon
)
c
:
RegisterEffect
(
e1
)
local
res
=
c
:
IsSummonable
(
true
,
nil
)
or
c
:
IsAbleToGrave
()
e1
:
Reset
()
return
res
end
if
chk
==
0
then
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510209
.
ttcon
)
c
:
RegisterEffect
(
e1
)
local
res
=
c
:
IsSummonable
(
true
,
nil
)
or
c
:
IsAbleToGrave
()
e1
:
Reset
()
return
res
end
end
function
c47510209
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510209
.
ttcon
)
c
:
RegisterEffect
(
e1
)
if
c
:
IsSummonable
(
true
,
nil
)
then
Duel
.
Summon
(
tp
,
c
,
true
,
nil
)
end
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LIMIT_SUMMON_PROC
)
e1
:
SetCondition
(
c47510209
.
ttcon
)
c
:
RegisterEffect
(
e1
)
if
c
:
IsSummonable
(
true
,
nil
)
then
Duel
.
Summon
(
tp
,
c
,
true
,
nil
)
end
end
function
c47510209
.
thfilter
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
return
c
:
IsFaceup
()
and
not
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
c47510209
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47510209
.
thfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
1
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47510209
.
thfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
1
,
REASON_EFFECT
)
end
function
c47510209
.
efilter1
(
e
,
re
,
rp
)
return
re
:
IsActiveType
(
TYPE_EFFECT
)
return
re
:
IsActiveType
(
TYPE_EFFECT
)
end
\ No newline at end of file
expansions/script/c47510225.lua
View file @
5c4da376
This diff is collapsed.
Click to expand it.
expansions/script/c60150642.lua
View file @
5c4da376
...
...
@@ -26,7 +26,7 @@ function c60150642.filter(c)
end
function
c60150642
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c60150642
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c60150642
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c60150642
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsAbleToEnterBP
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c60150642
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
...
...
expansions/script/c60152304.lua
View file @
5c4da376
...
...
@@ -2,88 +2,88 @@
local
m
=
60152304
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
60152304
,
0
))
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetRange
(
LOCATION_HAND
)
e0
:
SetCondition
(
c60152304
.
spcon
)
c
:
RegisterEffect
(
e0
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60152304
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
60152304
)
e1
:
SetTarget
(
c60152304
.
e1tg
)
e1
:
SetOperation
(
c60152304
.
e1op
)
c
:
RegisterEffect
(
e1
)
local
e11
=
e1
:
Clone
()
e11
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e11
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60152304
,
2
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
6012304
)
e2
:
SetCondition
(
c60152304
.
e2con
)
e2
:
SetTarget
(
c60152304
.
e2tg
)
e2
:
SetOperation
(
c60152304
.
e2op
)
c
:
RegisterEffect
(
e2
)
--special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetDescription
(
aux
.
Stringid
(
60152304
,
0
))
e0
:
SetType
(
EFFECT_TYPE_FIELD
)
e0
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e0
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetRange
(
LOCATION_HAND
)
e0
:
SetCondition
(
c60152304
.
spcon
)
c
:
RegisterEffect
(
e0
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
60152304
,
1
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
60152304
)
e1
:
SetTarget
(
c60152304
.
e1tg
)
e1
:
SetOperation
(
c60152304
.
e1op
)
c
:
RegisterEffect
(
e1
)
local
e11
=
e1
:
Clone
()
e11
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e11
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
60152304
,
2
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
6012304
)
e2
:
SetCondition
(
c60152304
.
e2con
)
e2
:
SetTarget
(
c60152304
.
e2tg
)
e2
:
SetOperation
(
c60152304
.
e2op
)
c
:
RegisterEffect
(
e2
)
end
function
c60152304
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
function
c60152304
.
e1tgfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xcb26
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xcb26
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c60152304
.
e1tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c60152304
.
e1tgfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c60152304
.
e1tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c60152304
.
e1tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c60152304
.
e1tgfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c60152304
.
e1tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsAbleToEnterBP
(
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c60152304
.
e1tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c60152304
.
e1op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc0
=
Duel
.
GetFirstTarget
()
if
tc0
:
IsRelateToEffect
(
e
)
and
tc0
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc0
:
RegisterEffect
(
e1
)
if
tc0
:
IsType
(
TYPE_XYZ
)
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
not
e
:
GetHandler
():
IsImmuneToEffect
(
e
)
and
tc0
:
IsLocation
(
LOCATION_MZONE
)
and
tc0
:
IsFaceup
()
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60152301
,
4
))
then
Duel
.
Overlay
(
tc0
,
Group
.
FromCards
(
e
:
GetHandler
()))
end
end
local
tc0
=
Duel
.
GetFirstTarget
()
if
tc0
:
IsRelateToEffect
(
e
)
and
tc0
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc0
:
RegisterEffect
(
e1
)
if
tc0
:
IsType
(
TYPE_XYZ
)
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
not
e
:
GetHandler
():
IsImmuneToEffect
(
e
)
and
tc0
:
IsLocation
(
LOCATION_MZONE
)
and
tc0
:
IsFaceup
()
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
60152301
,
4
))
then
Duel
.
Overlay
(
tc0
,
Group
.
FromCards
(
e
:
GetHandler
()))
end
end
end
function
c60152304
.
e2con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
return
not
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c60152304
.
e2tgfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDestructable
()
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsDestructable
()
end
function
c60152304
.
e2tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60152304
.
e2tgfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60152304
.
e2tgfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c60152304
.
e2tgfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c60152304
.
e2tgfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
function
c60152304
.
e2op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60152304
.
e2tgfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c60152304
.
e2tgfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c65020024.lua
View file @
5c4da376
...
...
@@ -43,7 +43,7 @@ function c65020024.filter(c)
end
function
c65020024
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c65020024
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65020024
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c65020024
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsAbleToEnterBP
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c65020024
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
...
...
expansions/script/c81041028.lua
View file @
5c4da376
...
...
@@ -21,6 +21,7 @@ function c81041028.initial_effect(c)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
,
81041928
)
e2
:
SetCondition
(
aux
.
bpcon
)
e2
:
SetTarget
(
c81041028
.
atktg
)
e2
:
SetOperation
(
c81041028
.
atkop
)
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