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
7f892fa6
Commit
7f892fa6
authored
Sep 08, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
naobaijin
parent
b823fe8e
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
309 additions
and
221 deletions
+309
-221
expansions/script/c10108001.lua
expansions/script/c10108001.lua
+1
-1
expansions/script/c12004023.lua
expansions/script/c12004023.lua
+1
-0
expansions/script/c12044001.lua
expansions/script/c12044001.lua
+1
-2
expansions/script/c12044017.lua
expansions/script/c12044017.lua
+3
-3
expansions/script/c12044085.lua
expansions/script/c12044085.lua
+1
-0
expansions/script/c12044086.lua
expansions/script/c12044086.lua
+1
-1
expansions/script/c12056008.lua
expansions/script/c12056008.lua
+1
-1
expansions/script/c33400801.lua
expansions/script/c33400801.lua
+4
-2
expansions/script/c33400803.lua
expansions/script/c33400803.lua
+9
-5
expansions/script/c33400804.lua
expansions/script/c33400804.lua
+3
-1
expansions/script/c33400805.lua
expansions/script/c33400805.lua
+3
-1
expansions/script/c33400807.lua
expansions/script/c33400807.lua
+10
-6
expansions/script/c33400808.lua
expansions/script/c33400808.lua
+3
-1
expansions/script/c33400810.lua
expansions/script/c33400810.lua
+7
-5
expansions/script/c33400811.lua
expansions/script/c33400811.lua
+4
-1
expansions/script/c33400812.lua
expansions/script/c33400812.lua
+5
-3
expansions/script/c33400813.lua
expansions/script/c33400813.lua
+7
-1
expansions/script/c33400814.lua
expansions/script/c33400814.lua
+3
-1
expansions/script/c33400815.lua
expansions/script/c33400815.lua
+6
-4
expansions/script/c33400818.lua
expansions/script/c33400818.lua
+13
-22
expansions/script/c33400850.lua
expansions/script/c33400850.lua
+13
-8
expansions/script/c33400851.lua
expansions/script/c33400851.lua
+77
-53
expansions/script/c33400852.lua
expansions/script/c33400852.lua
+87
-60
expansions/script/c33400853.lua
expansions/script/c33400853.lua
+39
-35
expansions/script/c33400855.lua
expansions/script/c33400855.lua
+3
-0
expansions/script/c33700921.lua
expansions/script/c33700921.lua
+2
-2
expansions/script/c33700933.lua
expansions/script/c33700933.lua
+2
-2
No files found.
expansions/script/c10108001.lua
View file @
7f892fa6
...
@@ -25,7 +25,7 @@ function cm.initial_effect(c)
...
@@ -25,7 +25,7 @@ function cm.initial_effect(c)
local
e3
=
e2
:
Clone
()
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
cm
.
rs_sweet_baby_summon_effect
=
e
1
cm
.
rs_sweet_baby_summon_effect
=
e
2
end
end
function
cm
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
>
0
...
...
expansions/script/c12004023.lua
View file @
7f892fa6
...
@@ -82,6 +82,7 @@ function c12004023.atkval(e,c)
...
@@ -82,6 +82,7 @@ function c12004023.atkval(e,c)
return
math.abs
(
lp1
-
lp2
)
return
math.abs
(
lp1
-
lp2
)
end
end
function
c12004023
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12004023
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandler
():
GetControler
()
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsType
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
c12004023
.
efilter
(
e
,
te
)
function
c12004023
.
efilter
(
e
,
te
)
...
...
expansions/script/c12044001.lua
View file @
7f892fa6
...
@@ -18,7 +18,6 @@ function cm.initial_effect(c)
...
@@ -18,7 +18,6 @@ function cm.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
@@ -38,7 +37,7 @@ function cm.filter(c)
...
@@ -38,7 +37,7 @@ function cm.filter(c)
return
c
:
IsSetCard
(
0x8fb5
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x8fb5
)
and
c
:
IsAbleToHand
()
end
end
function
cm
.
filter1
(
c
)
function
cm
.
filter1
(
c
)
return
c
:
IsSetCard
(
0x
8fb5
)
and
c
:
IsAbleToHand
()
and
c
:
IsFacedown
()
return
c
:
IsSetCard
(
0x
5fac
)
and
c
:
IsAbleToHand
()
and
c
:
IsFacedown
()
end
end
function
cm
.
filter2
(
c
)
function
cm
.
filter2
(
c
)
return
c
:
IsSetCard
(
0x8fb5
)
and
c
:
IsAbleToHand
()
and
c
:
IsFaceup
()
return
c
:
IsSetCard
(
0x8fb5
)
and
c
:
IsAbleToHand
()
and
c
:
IsFaceup
()
...
...
expansions/script/c12044017.lua
View file @
7f892fa6
...
@@ -55,7 +55,7 @@ function cm.filter(c)
...
@@ -55,7 +55,7 @@ function cm.filter(c)
return
c
:
IsAbleToDeck
()
and
c
:
IsSetCard
(
0x8fb5
)
return
c
:
IsAbleToDeck
()
and
c
:
IsSetCard
(
0x8fb5
)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
()
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
2
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
2
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
...
@@ -65,7 +65,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -65,7 +65,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SendtoDeck
(
c
,
tp
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
c
,
tp
,
2
,
REASON_EFFECT
)
c
:
ReverseInDeck
()
c
:
ReverseInDeck
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
()
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
if
g
then
if
g
then
g
:
GetFirst
():
ReverseInDeck
()
g
:
GetFirst
():
ReverseInDeck
()
...
@@ -83,7 +83,7 @@ function cm.spcon(e,c)
...
@@ -83,7 +83,7 @@ function cm.spcon(e,c)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsFaceup
()
and
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsFaceup
()
and
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
...
...
expansions/script/c12044085.lua
View file @
7f892fa6
...
@@ -52,6 +52,7 @@ function cm.initial_effect(c)
...
@@ -52,6 +52,7 @@ function cm.initial_effect(c)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetCountLimit
(
1
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetOperation
(
cm
.
thop
)
e3
:
SetOperation
(
cm
.
thop
)
...
...
expansions/script/c12044086.lua
View file @
7f892fa6
...
@@ -23,7 +23,7 @@ function cm.initial_effect(c)
...
@@ -23,7 +23,7 @@ function cm.initial_effect(c)
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tt
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tt
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
tt
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
REASON
_FUSION
)
then
if
tt
:
IsExists
(
Card
.
IsType
,
1
,
nil
,
TYPE
_FUSION
)
then
tt
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
tt
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToGrave
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
end
end
if
chk
==
0
then
return
tt
:
GetCount
()
>
0
end
if
chk
==
0
then
return
tt
:
GetCount
()
>
0
end
...
...
expansions/script/c12056008.lua
View file @
7f892fa6
...
@@ -25,7 +25,7 @@ function cm.initial_effect(c)
...
@@ -25,7 +25,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
cm
.
filter
(
c
)
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetCounter
(
0x1fb0
)
and
c
:
IsAbleToHand
()
return
c
:
IsFaceup
()
and
c
:
GetCounter
(
0x1fb0
)
>
0
and
c
:
IsAbleToHand
()
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
chkc
then
return
chkc
:
IsOnField
()
and
cm
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chkc
then
return
chkc
:
IsOnField
()
and
cm
.
filter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
...
...
expansions/script/c33400801.lua
View file @
7f892fa6
...
@@ -51,14 +51,16 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -51,14 +51,16 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
local
cg
=
c
:
GetColumnGroup
():
Filter
(
aux
.
disfilter1
,
nil
)
local
cg
=
c
:
GetColumnGroup
():
Filter
(
aux
.
disfilter1
,
nil
)
if
aux
.
disfilter1
(
c
)
then
cg
:
AddCard
(
c
)
end
if
aux
.
disfilter1
(
c
)
then
cg
:
AddCard
(
c
)
end
if
cg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
if
cg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
tg
=
cg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tg
=
cg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
and
tc
:
IsRelateToEffect
(
e
)
then
if
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
expansions/script/c33400803.lua
View file @
7f892fa6
...
@@ -26,16 +26,18 @@ function cm.initial_effect(c)
...
@@ -26,16 +26,18 @@ function cm.initial_effect(c)
e3
:
SetOperation
(
cm
.
stop
)
e3
:
SetOperation
(
cm
.
stop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
ckfilter
(
c
,
tp
)
function
cm
.
ckfilter1
(
c
,
tp
,
seq
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsControler
(
tp
)
local
seq1
=
4
-
aux
.
MZoneSequence
(
c
:
GetSequence
())
return
c
:
IsFaceup
()
and
math.abs
(
seq
-
seq1
)
<=
1
end
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c
=
e
:
GetHandler
()
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
cg
=
c
:
GetColumnGroup
(
1
,
1
):
Filter
(
cm
.
ckfilter
,
nil
,
1
-
tp
)
local
seq
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
cg
=
Duel
.
GetMatchingGroup
(
cm
.
ckfilter1
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
tp
,
seq
)
if
cg
:
GetCount
()
>
0
then
if
cg
:
GetCount
()
>
0
then
local
tc
=
cg
:
GetFirst
()
local
tc
=
cg
:
GetFirst
()
while
tc
do
while
tc
do
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_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
@@ -69,7 +71,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -69,7 +71,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
local
cg
=
c
:
GetColumnGroup
():
Filter
(
cm
.
ckfilter
,
nil
,
1
-
tp
)
local
cg
=
c
:
GetColumnGroup
():
Filter
(
cm
.
ckfilter
,
nil
,
1
-
tp
)
if
cg
:
GetCount
()
>
0
then
if
cg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
...
...
expansions/script/c33400804.lua
View file @
7f892fa6
...
@@ -57,7 +57,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -57,7 +57,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
local
chkf
=
tp
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
sg1
=
Duel
.
GetMatchingGroup
(
cm
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
sg1
=
Duel
.
GetMatchingGroup
(
cm
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
...
...
expansions/script/c33400805.lua
View file @
7f892fa6
...
@@ -55,7 +55,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -55,7 +55,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
local
cg
=
c
:
GetColumnGroup
():
Filter
(
Card
.
IsAbleToHand
,
nil
)
local
cg
=
c
:
GetColumnGroup
():
Filter
(
Card
.
IsAbleToHand
,
nil
)
local
cg2
=
c
:
GetColumnGroup
(
1
,
1
):
Filter
(
cm
.
ckfilter
,
nil
,
tp
)
local
cg2
=
c
:
GetColumnGroup
(
1
,
1
):
Filter
(
cm
.
ckfilter
,
nil
,
tp
)
cg
:
Merge
(
cg2
)
cg
:
Merge
(
cg2
)
...
...
expansions/script/c33400807.lua
View file @
7f892fa6
...
@@ -26,13 +26,15 @@ function cm.initial_effect(c)
...
@@ -26,13 +26,15 @@ function cm.initial_effect(c)
e3
:
SetOperation
(
cm
.
stop
)
e3
:
SetOperation
(
cm
.
stop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
cm
.
ckfilter
(
c
,
tp
)
function
cm
.
ckfilter1
(
c
,
tp
,
seq
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsControler
(
tp
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
return
c
:
IsFaceup
()
and
math.abs
(
seq
-
seq1
)
<=
1
end
end
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c
=
e
:
GetHandler
()
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
cg
=
c
:
GetColumnGroup
(
1
,
1
):
Filter
(
cm
.
ckfilter
,
nil
,
tp
)
local
seq
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
cg
=
Duel
.
GetMatchingGroup
(
cm
.
ckfilter1
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
tp
,
seq
)
if
cg
:
GetCount
()
>
0
then
if
cg
:
GetCount
()
>
0
then
local
tc
=
cg
:
GetFirst
()
local
tc
=
cg
:
GetFirst
()
while
tc
do
while
tc
do
...
@@ -69,15 +71,17 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -69,15 +71,17 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
local
cg
=
c
:
GetColumnGroup
(
1
,
1
):
Filter
(
cm
.
ckfilter
,
nil
,
1
-
tp
)
local
cg
=
c
:
GetColumnGroup
(
1
,
1
):
Filter
(
cm
.
ckfilter
,
nil
,
1
-
tp
)
if
cg
:
GetCount
()
>
0
then
if
cg
:
GetCount
()
>
0
then
local
tc
=
cg
:
GetFirst
()
local
tc
=
cg
:
GetFirst
()
while
tc
do
while
tc
do
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
)
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
)
tc
=
cg
:
GetNext
()
tc
=
cg
:
GetNext
()
end
end
end
end
else
else
if
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
if
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
...
...
expansions/script/c33400808.lua
View file @
7f892fa6
...
@@ -57,7 +57,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -57,7 +57,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
local
chkf
=
tp
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
sg1
=
Duel
.
GetMatchingGroup
(
cm
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
sg1
=
Duel
.
GetMatchingGroup
(
cm
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
...
...
expansions/script/c33400810.lua
View file @
7f892fa6
...
@@ -36,7 +36,7 @@ function cm.spfil(c,e,tp)
...
@@ -36,7 +36,7 @@ function cm.spfil(c,e,tp)
end
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
cm
.
spfil
(
chkc
,
e
,
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
end
if
chkc
then
return
cm
.
spfil
(
chkc
,
e
,
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
spfil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
spfil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
spfil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
spfil
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
...
@@ -44,7 +44,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -44,7 +44,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
_DEFENSE
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
...
@@ -68,7 +68,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -68,7 +68,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
local
cg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
):
Filter
(
cm
.
ckfilter1
,
nil
,
tp
)
local
cg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
):
Filter
(
cm
.
ckfilter1
,
nil
,
tp
)
if
cg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
if
cg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
...
@@ -77,9 +79,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -77,9 +79,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
end
end
else
else
if
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
if
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c
ard
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
C
ard
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
if
Duel
.
DiscardHand
(
tp
,
c
ard
.
IsDiscardable
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
,
nil
)
~=
0
then
if
Duel
.
DiscardHand
(
tp
,
C
ard
.
IsDiscardable
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
,
nil
)
~=
0
then
local
sg
=
Duel
.
GetOperatedGroup
()
local
sg
=
Duel
.
GetOperatedGroup
()
local
sc
=
sg
:
GetFirst
()
local
sc
=
sg
:
GetFirst
()
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
...
...
expansions/script/c33400811.lua
View file @
7f892fa6
...
@@ -18,6 +18,7 @@ function cm.initial_effect(c)
...
@@ -18,6 +18,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--set
--set
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
...
@@ -83,7 +84,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -83,7 +84,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
if
Duel
.
GetCurrentPhase
()
==
PHASE_DRAW
then
ph
=
PHASE_STANDBY
end
if
Duel
.
GetCurrentPhase
()
==
PHASE_DRAW
then
ph
=
PHASE_STANDBY
end
if
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
then
ph
=
PHASE_MAIN1
end
if
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
then
ph
=
PHASE_MAIN1
end
if
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
then
ph
=
PHASE_BATTLE
end
if
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
then
ph
=
PHASE_BATTLE
end
...
...
expansions/script/c33400812.lua
View file @
7f892fa6
...
@@ -5,9 +5,9 @@ function cm.initial_effect(c)
...
@@ -5,9 +5,9 @@ function cm.initial_effect(c)
--fusion material
--fusion material
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0xa341
),
2
,
true
)
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0xa341
),
2
,
true
)
--
spsummon
--
des
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
)
...
@@ -68,7 +68,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -68,7 +68,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
local
cg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
):
Filter
(
cm
.
ckfilter1
,
nil
,
tp
)
local
cg
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
):
Filter
(
cm
.
ckfilter1
,
nil
,
tp
)
if
cg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
if
cg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESREPLACE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESREPLACE
)
...
...
expansions/script/c33400813.lua
View file @
7f892fa6
...
@@ -18,6 +18,7 @@ function cm.initial_effect(c)
...
@@ -18,6 +18,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--set
--set
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCode
(
EVENT_CHAINING
)
...
@@ -79,12 +80,17 @@ end
...
@@ -79,12 +80,17 @@ end
function
cm
.
setfilter
(
c
)
function
cm
.
setfilter
(
c
)
return
c
:
IsSetCard
(
0xa341
)
and
c
:
IsType
(
TYPE_TRAP
+
TYPE_SPELL
)
and
c
:
IsSSetable
()
return
c
:
IsSetCard
(
0xa341
)
and
c
:
IsType
(
TYPE_TRAP
+
TYPE_SPELL
)
and
c
:
IsSSetable
()
end
end
function
cm
.
spfilter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xa341
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
stop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
stop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c
=
e
:
GetHandler
()
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
local
ph
=
PHASE_END
local
ph
=
PHASE_END
if
Duel
.
GetCurrentPhase
()
==
PHASE_DRAW
then
ph
=
PHASE_STANDBY
end
if
Duel
.
GetCurrentPhase
()
==
PHASE_DRAW
then
ph
=
PHASE_STANDBY
end
if
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
then
ph
=
PHASE_MAIN1
end
if
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
then
ph
=
PHASE_MAIN1
end
...
...
expansions/script/c33400814.lua
View file @
7f892fa6
...
@@ -100,7 +100,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -100,7 +100,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
if
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
==
0
then
if
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
==
0
then
--disable
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c33400815.lua
View file @
7f892fa6
...
@@ -96,7 +96,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -96,7 +96,9 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
if
seq1
==
4
-
seq
or
(
math.abs
(
e
:
GetHandler
():
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq
<
5
)
then
local
seq2
=
seq
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
((
seq1
==
4
-
seq
and
rp
==
1
-
tp
)
or
seq1
==
seq
)
or
(
rp
==
tp
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
and
loc
==
LOCATION_MZONE
and
seq2
<
5
)
then
if
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
==
0
then
if
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
))
==
0
then
--disable
--disable
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
...
@@ -123,13 +125,13 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -123,13 +125,13 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
end
end
else
else
if
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
end
end
end
end
function
cm
.
cfilter
(
c
,
seq2
)
function
cm
.
cfilter
(
c
,
seq2
)
...
...
expansions/script/c33400818.lua
View file @
7f892fa6
...
@@ -122,7 +122,7 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -122,7 +122,7 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e3
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e3
:
SetValue
(
cm
.
efilter
1
)
e3
:
SetValue
(
cm
.
efilter
2
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
end
...
@@ -132,7 +132,7 @@ end
...
@@ -132,7 +132,7 @@ end
function
cm
.
disable
(
e
,
c
)
function
cm
.
disable
(
e
,
c
)
return
c
:
GetFieldID
()
~=
e
:
GetLabel
()
and
(
not
c
:
IsType
(
TYPE_MONSTER
)
or
(
c
:
IsType
(
TYPE_EFFECT
)
or
bit
.
band
(
c
:
GetOriginalType
(),
TYPE_EFFECT
)
==
TYPE_EFFECT
))
return
c
:
GetFieldID
()
~=
e
:
GetLabel
()
and
(
not
c
:
IsType
(
TYPE_MONSTER
)
or
(
c
:
IsType
(
TYPE_EFFECT
)
or
bit
.
band
(
c
:
GetOriginalType
(),
TYPE_EFFECT
)
==
TYPE_EFFECT
))
end
end
function
cm
.
efilter
1
(
e
,
te
)
function
cm
.
efilter
2
(
e
,
te
)
return
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
return
te
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
end
...
@@ -151,6 +151,7 @@ function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -151,6 +151,7 @@ function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
if
chk
==
0
then
return
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
end
end
end
function
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
while
tc
do
while
tc
do
...
@@ -285,7 +286,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -285,7 +286,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
setfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
setfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
end
end
--activate from hand
--activate from hand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -358,8 +359,8 @@ function cm.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
...
@@ -358,8 +359,8 @@ function cm.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
cm
.
mvtg
)
e1
:
SetTarget
(
cm
.
mvtg
2
)
e1
:
SetOperation
(
cm
.
mvop
)
e1
:
SetOperation
(
cm
.
mvop
2
)
token
:
RegisterEffect
(
e1
)
token
:
RegisterEffect
(
e1
)
return
true
return
true
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
return
false
else
Duel
.
SendtoGrave
(
token
,
REASON_RULE
)
return
false
...
@@ -371,23 +372,13 @@ end
...
@@ -371,23 +372,13 @@ end
function
cm
.
valcon
(
e
,
re
,
r
,
rp
)
function
cm
.
valcon
(
e
,
re
,
r
,
rp
)
return
r
==
REASON_BATTLE
return
r
==
REASON_BATTLE
end
end
function
cm
.
mvfilter1
(
c
)
function
cm
.
mvtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
return
c
:
IsFaceup
()
end
function
cm
.
mvfilter2
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
GetSequence
()
<
5
and
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter3
,
tp
,
LOCATION_MZONE
,
0
,
1
,
c
)
end
function
cm
.
mvfilter3
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetSequence
()
<
5
end
function
cm
.
mvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
)
>
0
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
if
chk
==
0
then
return
b1
or
b2
end
if
chk
==
0
then
return
b1
or
b2
end
end
end
function
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
mvop
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
)
>
0
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
...
@@ -435,15 +426,15 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -435,15 +426,15 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_DECK
,
0
,
1
,
nil
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_DECK
,
0
,
1
,
nil
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
not
(
b1
or
b2
)
then
return
end
if
not
(
b1
or
b2
)
then
return
end
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
6
),
aux
.
Stringid
(
m
,
7
))
elseif
b1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
))
elseif
b1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
6
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
+
1
end
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
7
))
+
1
end
if
op
==
0
then
if
op
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_DECK
,
0
,
1
,
2
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
+
LOCATION_DECK
,
0
,
1
,
2
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
else
else
local
ct
=
1
local
ct
=
1
...
...
expansions/script/c33400850.lua
View file @
7f892fa6
...
@@ -12,6 +12,7 @@ cm.dfc_back_side=33400852
...
@@ -12,6 +12,7 @@ cm.dfc_back_side=33400852
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--move
--move
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
...
@@ -39,6 +40,7 @@ cm.dfc_back_side=33400852
...
@@ -39,6 +40,7 @@ cm.dfc_back_side=33400852
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--
--
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetRange
(
LOCATION_SZONE
)
...
@@ -103,32 +105,35 @@ function cm.actcon(e)
...
@@ -103,32 +105,35 @@ function cm.actcon(e)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
a
=
Duel
.
GetAttacker
()
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
local
d
=
Duel
.
GetAttackTarget
()
local
seq1
=
aux
.
MZoneSequence
(
a
:
GetSequence
())
if
a
and
d
then
local
seq2
=
aux
.
MZoneSequence
(
d
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
a
:
GetSequence
())
return
(
a
and
cm
.
cfilter
(
a
,
tp
))
or
(
d
and
cm
.
cfilter
(
d
,
tp
))
and
seq1
==
4
-
seq2
local
seq2
=
aux
.
MZoneSequence
(
d
:
GetSequence
())
return
((
a
and
cm
.
cfilter
(
a
,
tp
))
or
(
d
and
cm
.
cfilter
(
d
,
tp
)))
and
seq1
==
4
-
seq2
end
return
false
end
end
function
cm
.
cfilter2
(
c
)
function
cm
.
cfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
m
+
1
)
and
c
:
IsAbleToGrave
()
return
c
:
IsFaceup
()
and
c
:
IsCode
(
3340085
1
)
and
c
:
IsAbleToGrave
()
end
end
function
cm
.
ntdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
ntdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c
filter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c
m
.
cfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
function
cm
.
ntdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
ntdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
.
dfc_back_side
and
c
.
dfc_front_side
==
c
:
GetOriginalCode
()
end
if
chk
==
0
then
return
33400852
and
33400850
==
c
:
GetOriginalCode
()
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
end
end
function
cm
.
ntdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
ntdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
c
:
IsImmuneToEffect
(
e
)
or
not
Duel
.
IsExistingMatchingCard
(
cfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
c
:
IsImmuneToEffect
(
e
)
or
not
Duel
.
IsExistingMatchingCard
(
c
m
.
c
filter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
tcode
=
c
.
dfc_back_side
local
tcode
=
c
.
dfc_back_side
c
:
SetEntityCode
(
tcode
,
true
)
c
:
SetEntityCode
(
tcode
,
true
)
c
:
ReplaceEffect
(
tcode
,
0
,
0
)
c
:
ReplaceEffect
(
tcode
,
0
,
0
)
c
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
c
:
RegisterFlagEffect
(
33400850
,
0
,
0
,
0
)
end
end
end
end
...
...
expansions/script/c33400851.lua
View file @
7f892fa6
...
@@ -12,6 +12,7 @@ cm.dfc_back_side=33400852
...
@@ -12,6 +12,7 @@ cm.dfc_back_side=33400852
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--move
--move
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
...
@@ -22,12 +23,17 @@ cm.dfc_back_side=33400852
...
@@ -22,12 +23,17 @@ cm.dfc_back_side=33400852
--disable
--disable
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCondition
(
cm
.
actcon
)
e3
:
SetCondition
(
cm
.
actcon
)
e3
:
SetOperation
(
cm
.
disop
)
e3
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
local
e6
=
e3
:
Clone
()
e6
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
c
:
RegisterEffect
(
e6
)
--
--
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetRange
(
LOCATION_SZONE
)
...
@@ -88,65 +94,83 @@ end
...
@@ -88,65 +94,83 @@ end
function
cm
.
cfilter
(
c
,
tp
)
function
cm
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xa341
)
and
c
:
IsControler
(
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xa341
)
and
c
:
IsControler
(
tp
)
end
end
function
cm
.
ckfilter2
(
c
,
tp
)
function
cm
.
actcon
(
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
local
c
=
Duel
.
GetAttackTarget
()
if
not
c
then
return
false
end
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
tc
=
Duel
.
GetAttacker
()
if
not
tc
then
return
false
end
local
seq2
=
aux
.
MZoneSequence
(
tc
:
GetSequence
())
if
c
:
IsControler
(
1
-
tp
)
then
c
=
Duel
.
GetAttacker
()
end
return
c
and
cm
.
cfilter
(
c
,
tp
)
and
seq1
==
4
-
seq2
end
end
function
cm
.
actcon
(
e
)
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetAttackTarget
()
local
dc
=
4
-
tc
:
GetSequence
()
if
tc
:
IsControler
(
tp
)
then
tc
=
Duel
.
GetAttacker
()
dc
=
dc
end
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
RESETS_STANDARD
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetCondition
(
cm
.
discon2
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetCondition
(
cm
.
discon2
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e2
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_DISABLE
)
e4
:
SetTargetRange
(
0
,
LOCATION_ONFIELD
)
e4
:
SetTarget
(
cm
.
distg2
)
e4
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
e4
:
SetLabel
(
dc
)
Duel
.
RegisterEffect
(
e4
,
tp
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e5
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e5
:
SetOperation
(
cm
.
disop2
)
e5
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
e5
:
SetLabel
(
dc
)
Duel
.
RegisterEffect
(
e5
,
tp
)
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e6
:
SetTargetRange
(
0
,
LOCATION_ONFIELD
)
e6
:
SetTarget
(
cm
.
distg2
)
e6
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
e6
:
SetLabel
(
dc
)
Duel
.
RegisterEffect
(
e6
,
tp
)
end
function
cm
.
discon2
(
e
)
return
e
:
GetOwner
():
IsRelateToCard
(
e
:
GetHandler
())
end
function
cm
.
distg2
(
e
,
c
)
local
seq
=
e
:
GetLabel
()
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
a
=
Duel
.
GetAttacker
()
return
aux
.
GetColumn
(
c
,
tp
)
==
seq
local
d
=
Duel
.
GetAttackTarget
()
local
seq1
=
aux
.
MZoneSequence
(
a
:
GetSequence
())
local
seq2
=
aux
.
MZoneSequence
(
d
:
GetSequence
())
return
(
a
and
cm
.
cfilter
(
a
,
tp
))
or
(
d
and
cm
.
cfilter
(
d
,
tp
))
and
seq1
==
4
-
seq2
end
end
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tseq
=
e
:
GetLabel
()
local
a
=
Duel
.
GetAttacker
()
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
local
d
=
Duel
.
GetAttackTarget
()
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
local
t
if
rp
==
1
-
tp
and
seq
==
4
-
tseq
then
if
d
and
cm
.
cfilter
(
d
,
tp
)
then
Duel
.
NegateEffect
(
ev
)
t
=
d
end
d
=
a
a
=
t
end
local
cg
=
a
:
GetColumnGroup
():
Filter
(
cm
.
ckfilter2
,
nil
,
1
-
tp
)
if
cg
:
GetCount
()
>
0
then
local
tc
=
cg
:
GetFirst
()
while
tc
do
if
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e2
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e3
)
end
end
tc
=
cg
:
GetNext
()
end
end
end
end
function
cm
.
cfilter2
(
c
)
function
cm
.
cfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
m
-
1
)
and
c
:
IsAbleToGrave
()
return
c
:
IsFaceup
()
and
c
:
IsCode
(
33400850
)
and
c
:
IsAbleToGrave
()
end
end
function
cm
.
ntdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
ntdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
cfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c
m
.
c
filter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
end
function
cm
.
ntdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
ntdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -155,14 +179,14 @@ function cm.ntdtg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -155,14 +179,14 @@ function cm.ntdtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
cm
.
ntdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
ntdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
c
:
IsImmuneToEffect
(
e
)
or
not
Duel
.
IsExistingMatchingCard
(
cfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
c
:
IsImmuneToEffect
(
e
)
or
not
Duel
.
IsExistingMatchingCard
(
c
m
.
c
filter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
local
tcode
=
c
.
dfc_back_side
local
tcode
=
c
.
dfc_back_side
c
:
SetEntityCode
(
tcode
,
true
)
c
:
SetEntityCode
(
tcode
,
true
)
c
:
ReplaceEffect
(
tcode
,
0
,
0
)
c
:
ReplaceEffect
(
tcode
,
0
,
0
)
c
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
c
:
RegisterFlagEffect
(
33400851
,
0
,
0
,
0
)
end
end
end
end
...
...
expansions/script/c33400852.lua
View file @
7f892fa6
...
@@ -86,7 +86,7 @@ function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -86,7 +86,7 @@ function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
PLAYER_NONE
,
0
)
>
0
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
mvfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
)
if
chk
==
0
then
return
b1
or
b2
end
if
chk
==
0
then
return
b1
or
b2
end
end
end
function
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
...
@@ -129,54 +129,75 @@ function cm.ckfilter2(c,tp)
...
@@ -129,54 +129,75 @@ function cm.ckfilter2(c,tp)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
end
end
function
cm
.
actcon
(
e
)
function
cm
.
actcon
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
local
c
=
Duel
.
GetAttackTarget
()
local
a
=
Duel
.
GetAttacker
()
if
not
c
then
return
false
end
local
d
=
Duel
.
GetAttackTarget
()
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
a
:
GetSequence
())
local
tc
=
Duel
.
GetAttacker
()
local
seq2
=
aux
.
MZoneSequence
(
d
:
GetSequence
())
if
not
tc
then
return
false
end
return
(
a
and
cm
.
cfilter
(
a
,
tp
))
or
(
d
and
cm
.
cfilter
(
d
,
tp
))
and
seq1
==
4
-
seq2
local
seq2
=
aux
.
MZoneSequence
(
tc
:
GetSequence
())
if
c
:
IsControler
(
1
-
tp
)
then
c
=
Duel
.
GetAttacker
()
end
return
c
and
cm
.
cfilter
(
c
,
tp
)
and
seq1
==
4
-
seq2
end
end
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tp
=
e
:
GetHandlerPlayer
()
local
c
=
e
:
GetHandler
()
local
a
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttackTarget
()
local
d
=
Duel
.
GetAttackTarget
()
local
dc
=
4
-
tc
:
GetSequence
()
local
t
if
tc
:
IsControler
(
tp
)
then
if
d
and
cm
.
cfilter
(
d
,
tp
)
then
tc
=
Duel
.
GetAttacker
()
t
=
d
dc
=
dc
d
=
a
end
a
=
t
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
RESETS_STANDARD
)
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
cg
=
a
:
GetColumnGroup
():
Filter
(
cm
.
ckfilter2
,
nil
,
1
-
tp
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
if
cg
:
GetCount
()
>
0
then
e1
:
SetCode
(
EFFECT_DISABLE
)
local
tc
=
cg
:
GetFirst
()
e1
:
SetCondition
(
cm
.
discon2
)
while
tc
do
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
if
((
tc
:
IsFaceup
()
and
not
tc
:
IsDisabled
())
or
tc
:
IsType
(
TYPE_TRAPMONSTER
))
and
tc
:
IsRelateToEffect
(
e
)
then
tc
:
RegisterEffect
(
e1
)
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCondition
(
cm
.
discon2
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e1
)
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetTargetRange
(
0
,
LOCATION_ONFIELD
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e4
:
SetTarget
(
cm
.
distg2
)
e2
:
SetValue
(
RESET_TURN_SET
)
e4
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
e4
:
SetLabel
(
dc
)
tc
:
RegisterEffect
(
e2
)
Duel
.
RegisterEffect
(
e4
,
tp
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e5
:
SetOperation
(
cm
.
disop2
)
e3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e5
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
e5
:
SetLabel
(
dc
)
tc
:
RegisterEffect
(
e3
)
Duel
.
RegisterEffect
(
e5
,
tp
)
end
local
e6
=
Effect
.
CreateEffect
(
c
)
end
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
tc
=
cg
:
GetNext
()
e6
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
end
e6
:
SetTargetRange
(
0
,
LOCATION_ONFIELD
)
end
e6
:
SetTarget
(
cm
.
distg2
)
e6
:
SetReset
(
RESET_PHASE
+
PHASE_BATTLE
)
e6
:
SetLabel
(
dc
)
Duel
.
RegisterEffect
(
e6
,
tp
)
end
function
cm
.
discon2
(
e
)
return
e
:
GetOwner
():
IsRelateToCard
(
e
:
GetHandler
())
end
function
cm
.
distg2
(
e
,
c
)
local
seq
=
e
:
GetLabel
()
local
tp
=
e
:
GetHandlerPlayer
()
return
aux
.
GetColumn
(
c
,
tp
)
==
seq
end
function
cm
.
disop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tseq
=
e
:
GetLabel
()
local
loc
,
seq
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_SEQUENCE
)
if
re
:
IsActiveType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
seq
)
end
if
rp
==
1
-
tp
and
seq
==
4
-
tseq
then
Duel
.
NegateEffect
(
ev
)
end
end
end
function
cm
.
desfilter
(
c
)
function
cm
.
desfilter
(
c
)
...
@@ -189,9 +210,9 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -189,9 +210,9 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SelectTarget
(
tp
,
cm
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
2
,
nil
)
Duel
.
SelectTarget
(
tp
,
cm
.
desfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
2
,
nil
)
end
end
function
cm
.
seqfilter
(
c
,
seq1
,
seq2
)
function
cm
.
seqfilter
(
c
,
seq1
,
seq2
)
local
seq
=
4
-
c
:
GetSequence
()
local
seq
=
c
:
GetSequence
()
return
(
seq
>
seq1
and
seq
<
seq2
)
or
c
:
IsType
(
TYPE_FIELD
)
if
c
:
IsType
(
TYPE_MONSTER
)
then
seq
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
end
return
(
4
-
seq
>
seq1
and
4
-
seq
<
seq2
)
or
c
:
IsType
(
TYPE_FIELD
)
end
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
...
@@ -199,9 +220,13 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -199,9 +220,13 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if
sg
:
GetCount
()
==
0
then
return
end
if
sg
:
GetCount
()
==
0
then
return
end
local
cc
=
sg
:
GetCount
()
local
cc
=
sg
:
GetCount
()
local
tc1
=
sg
:
GetFirst
()
local
tc1
=
sg
:
GetFirst
()
local
tc2
=
sg
:
GetNext
()
local
tc2
local
tg2
if
cc
>
1
then
tc2
=
sg
:
GetNext
()
tg2
=
tc2
:
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
end
local
tg1
=
tc1
:
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
local
tg1
=
tc1
:
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
local
tg2
=
tc2
:
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
if
cc
==
1
then
if
cc
==
1
then
Duel
.
Destroy
(
tg1
,
REASON_EFFECT
)
Duel
.
Destroy
(
tg1
,
REASON_EFFECT
)
else
else
...
@@ -209,7 +234,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -209,7 +234,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local
seq1
=
tc1
:
GetSequence
()
local
seq1
=
tc1
:
GetSequence
()
local
seq2
=
tc2
:
GetSequence
()
local
seq2
=
tc2
:
GetSequence
()
if
seq1
>
seq2
then
seq1
,
seq2
=
seq2
,
seq1
end
if
seq1
>
seq2
then
seq1
,
seq2
=
seq2
,
seq1
end
local
tg3
=
Duel
.
GetMatchingGroup
(
cm
.
seqfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
seq1
,
seq2
)
local
tg3
=
Duel
.
GetMatchingGroup
(
cm
.
seqfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
,
seq1
,
seq2
)
tg1
:
Merge
(
tg3
)
tg1
:
Merge
(
tg3
)
Duel
.
Destroy
(
tg1
,
REASON_EFFECT
)
Duel
.
Destroy
(
tg1
,
REASON_EFFECT
)
end
end
...
@@ -239,20 +264,22 @@ end
...
@@ -239,20 +264,22 @@ end
function
cm
.
backon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
backon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
((
c
:
GetFlagEffect
(
tp
,
m
-
2
)
>
0
and
m
-
2
)
or
(
c
:
GetFlagEffect
(
tp
,
m
-
1
)
>
0
and
m
-
1
))
and
c
:
GetOriginalCode
()
==
m
return
((
c
:
GetFlagEffect
(
33400850
)
>
0
and
33400850
)
or
(
c
:
GetFlagEffect
(
33400851
)
>
0
and
33400851
))
and
c
:
GetOriginalCode
()
==
33400852
end
end
function
cm
.
backop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
backop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
tp
,
m
-
2
)
>
0
then
if
c
:
GetFlagEffect
(
33400850
)
>
0
then
c
:
SetEntityCode
(
m
-
2
)
c
:
SetEntityCode
(
33400850
)
Duel
.
ConfirmCards
(
tp
,
Group
.
FromCards
(
c
))
Duel
.
ConfirmCards
(
tp
,
Group
.
FromCards
(
c
))
Duel
.
ConfirmCards
(
1
-
tp
,
Group
.
FromCards
(
c
))
Duel
.
ConfirmCards
(
1
-
tp
,
Group
.
FromCards
(
c
))
c
:
ReplaceEffect
(
m
-
2
,
0
,
0
)
c
:
ReplaceEffect
(
33400850
,
0
,
0
)
c
:
ResetFlagEffect
(
33400850
)
end
end
if
c
:
GetFlagEffect
(
tp
,
m
-
1
)
>
0
then
if
c
:
GetFlagEffect
(
3340085
1
)
>
0
then
c
:
SetEntityCode
(
m
-
1
)
c
:
SetEntityCode
(
3340085
1
)
Duel
.
ConfirmCards
(
tp
,
Group
.
FromCards
(
c
))
Duel
.
ConfirmCards
(
tp
,
Group
.
FromCards
(
c
))
Duel
.
ConfirmCards
(
1
-
tp
,
Group
.
FromCards
(
c
))
Duel
.
ConfirmCards
(
1
-
tp
,
Group
.
FromCards
(
c
))
c
:
ReplaceEffect
(
m
-
1
,
0
,
0
)
c
:
ReplaceEffect
(
33400851
,
0
,
0
)
c
:
ResetFlagEffect
(
33400851
)
end
end
end
end
\ No newline at end of file
expansions/script/c33400853.lua
View file @
7f892fa6
...
@@ -36,13 +36,16 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -36,13 +36,16 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
cm
.
ckfilter1
(
c
,
mat
)
function
cm
.
ckfilter1
(
c
,
mat
,
tp
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
return
c
:
IsOnField
()
and
mat
:
IsExists
(
cm
.
ckfilter2
,
1
,
c
,
seq
)
return
c
:
IsOnField
()
and
mat
:
IsExists
(
cm
.
ckfilter2
,
1
,
c
,
tp
,
seq1
)
end
end
function
cm
.
ckfilter2
(
c
,
seq
)
function
cm
.
ckfilter2
(
c
,
tp
,
seq
)
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
local
seq1
=
aux
.
MZoneSequence
(
c
:
GetSequence
())
return
c
:
IsOnField
()
and
c
:
IsControler
(
tp
)
and
math.abs
(
seq1
-
seq
)
<=
1
if
seq
then
return
c
:
IsOnField
()
and
((
seq
<
5
and
math.abs
(
c
:
GetSequence
()
-
seq
)
<=
1
)
or
(
seq
==
seq1
or
seq
==
4
-
seq1
))
end
return
false
end
end
function
cm
.
desfilter
(
c
)
function
cm
.
desfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
...
@@ -54,6 +57,7 @@ function cm.efilter(e,re)
...
@@ -54,6 +57,7 @@ function cm.efilter(e,re)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
chkf
=
tp
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
cm
.
filter1
,
nil
,
e
)
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
cm
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
cm
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
sg1
=
Duel
.
GetMatchingGroup
(
cm
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
...
@@ -74,36 +78,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -74,36 +78,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
local
cg
=
mat1
:
IsExists
(
cm
.
ckfilter1
,
1
,
nil
,
mat1
)
local
cg
=
mat1
:
IsExists
(
cm
.
ckfilter1
,
1
,
nil
,
mat1
,
tp
)
tc
:
SetMaterial
(
mat1
)
if
cg
then
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
if
cg
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
elseif
b1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
+
1
end
if
op
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
if
cg
>
0
then
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
...
@@ -113,6 +89,34 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -113,6 +89,34 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_BATTLE
)
e3
:
SetOwnerPlayer
(
tp
)
e3
:
SetOwnerPlayer
(
tp
)
tc
:
RegisterEffect
(
e3
)
tc
:
RegisterEffect
(
e3
)
end
if
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
local
b1
=
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
elseif
b1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
2
))
+
1
end
if
op
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
desfilter2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
tc
:
CompleteProcedure
()
end
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
end
end
end
end
\ No newline at end of file
expansions/script/c33400855.lua
View file @
7f892fa6
...
@@ -12,6 +12,9 @@ function cm.initial_effect(c)
...
@@ -12,6 +12,9 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e4
=
e1
:
Clone
()
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
--move
--move
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
...
...
expansions/script/c33700921.lua
View file @
7f892fa6
...
@@ -86,9 +86,9 @@ function c33700921.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -86,9 +86,9 @@ function c33700921.operation(e,tp,eg,ep,ev,re,r,rp)
e
:
GetHandler
():
RegisterFlagEffect
(
33700921
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
0
)
e
:
GetHandler
():
RegisterFlagEffect
(
33700921
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
0
)
end
end
function
c33700921
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33700921
.
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
0
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33700921
,
0
))
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
33700921
,
0
))
then
Duel
.
Recover
(
tp
,
ev
,
REASON_EFFECT
)
Duel
.
Recover
(
tp
,
ev
,
REASON_EFFECT
)
end
end
Duel
.
ChangeBattleDamage
(
ep
,
0
)
end
end
expansions/script/c33700933.lua
View file @
7f892fa6
...
@@ -65,8 +65,8 @@ function c33700933.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -65,8 +65,8 @@ function c33700933.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
c33700933
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c33700933
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
lp
=
Duel
.
GetLP
(
tp
)
-
1
local
lp
=
Duel
.
GetLP
(
tp
)
-
1
if
lp
<=
0
then
return
end
if
Duel
.
GetLP
(
tp
)
<=
1
then
return
end
Duel
.
SetLP
(
tp
,
lp
)
Duel
.
SetLP
(
tp
,
1
)
local
b1
=
lp
<
9999
local
b1
=
lp
<
9999
local
b2
=
lp
>=
9999
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
local
b2
=
lp
>=
9999
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
local
b3
=
lp
>=
15000
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_HAND
,
LOCATION_HAND
,
1
,
nil
)
local
b3
=
lp
>=
15000
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
LOCATION_HAND
,
LOCATION_HAND
,
1
,
nil
)
...
...
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