Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
1c7adf8b
Commit
1c7adf8b
authored
Nov 11, 2017
by
Momobako
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push by Appveyor
parent
7d74d3f1
Changes
95
Show whitespace changes
Inline
Side-by-side
Showing
95 changed files
with
7774 additions
and
269 deletions
+7774
-269
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c1110002.lua
expansions/script/c1110002.lua
+1
-1
expansions/script/c1110003.lua
expansions/script/c1110003.lua
+1
-1
expansions/script/c1110005.lua
expansions/script/c1110005.lua
+1
-1
expansions/script/c1110006.lua
expansions/script/c1110006.lua
+5
-4
expansions/script/c1110010.lua
expansions/script/c1110010.lua
+106
-0
expansions/script/c1110011.lua
expansions/script/c1110011.lua
+86
-0
expansions/script/c1110012.lua
expansions/script/c1110012.lua
+100
-0
expansions/script/c1110013.lua
expansions/script/c1110013.lua
+96
-0
expansions/script/c1110111.lua
expansions/script/c1110111.lua
+8
-1
expansions/script/c1110112.lua
expansions/script/c1110112.lua
+3
-3
expansions/script/c1110121.lua
expansions/script/c1110121.lua
+1
-0
expansions/script/c1110123.lua
expansions/script/c1110123.lua
+243
-0
expansions/script/c1110151.lua
expansions/script/c1110151.lua
+1
-1
expansions/script/c1111008.lua
expansions/script/c1111008.lua
+3
-3
expansions/script/c1111011.lua
expansions/script/c1111011.lua
+55
-0
expansions/script/c1111012.lua
expansions/script/c1111012.lua
+65
-0
expansions/script/c1111221.lua
expansions/script/c1111221.lua
+119
-0
expansions/script/c1111222.lua
expansions/script/c1111222.lua
+91
-0
expansions/script/c1111223.lua
expansions/script/c1111223.lua
+104
-0
expansions/script/c1111224.lua
expansions/script/c1111224.lua
+158
-0
expansions/script/c1111301.lua
expansions/script/c1111301.lua
+2
-2
expansions/script/c1111501.lua
expansions/script/c1111501.lua
+3
-3
expansions/script/c1111502.lua
expansions/script/c1111502.lua
+2
-2
expansions/script/c1111511.lua
expansions/script/c1111511.lua
+109
-0
expansions/script/c1152001.lua
expansions/script/c1152001.lua
+149
-0
expansions/script/c1152002.lua
expansions/script/c1152002.lua
+109
-0
expansions/script/c1152003.lua
expansions/script/c1152003.lua
+111
-0
expansions/script/c1152004.lua
expansions/script/c1152004.lua
+80
-0
expansions/script/c1152005.lua
expansions/script/c1152005.lua
+98
-0
expansions/script/c1152007.lua
expansions/script/c1152007.lua
+91
-0
expansions/script/c1152101.lua
expansions/script/c1152101.lua
+86
-0
expansions/script/c1152201.lua
expansions/script/c1152201.lua
+215
-0
expansions/script/c1152203.lua
expansions/script/c1152203.lua
+145
-0
expansions/script/c1152205.lua
expansions/script/c1152205.lua
+136
-0
expansions/script/c1152207.lua
expansions/script/c1152207.lua
+118
-0
expansions/script/c1152208.lua
expansions/script/c1152208.lua
+133
-0
expansions/script/c1152209.lua
expansions/script/c1152209.lua
+139
-0
expansions/script/c1152210.lua
expansions/script/c1152210.lua
+122
-0
expansions/script/c1152212.lua
expansions/script/c1152212.lua
+139
-0
expansions/script/c1152301.lua
expansions/script/c1152301.lua
+159
-0
expansions/script/c1152303.lua
expansions/script/c1152303.lua
+199
-0
expansions/script/c1152304.lua
expansions/script/c1152304.lua
+127
-0
expansions/script/c1152306.lua
expansions/script/c1152306.lua
+131
-0
expansions/script/c1152999.lua
expansions/script/c1152999.lua
+136
-0
expansions/script/c1200016.lua
expansions/script/c1200016.lua
+1
-1
expansions/script/c12003000.lua
expansions/script/c12003000.lua
+64
-0
expansions/script/c12003001.lua
expansions/script/c12003001.lua
+80
-0
expansions/script/c12003002.lua
expansions/script/c12003002.lua
+59
-0
expansions/script/c12003003.lua
expansions/script/c12003003.lua
+58
-0
expansions/script/c12003004.lua
expansions/script/c12003004.lua
+79
-0
expansions/script/c12003005.lua
expansions/script/c12003005.lua
+79
-0
expansions/script/c22250001.lua
expansions/script/c22250001.lua
+97
-0
expansions/script/c22250002.lua
expansions/script/c22250002.lua
+110
-0
expansions/script/c22250003.lua
expansions/script/c22250003.lua
+106
-0
expansions/script/c22250004.lua
expansions/script/c22250004.lua
+92
-0
expansions/script/c22250005.lua
expansions/script/c22250005.lua
+135
-0
expansions/script/c22250006.lua
expansions/script/c22250006.lua
+103
-0
expansions/script/c22250101.lua
expansions/script/c22250101.lua
+132
-0
expansions/script/c22250102.lua
expansions/script/c22250102.lua
+113
-0
expansions/script/c22251001.lua
expansions/script/c22251001.lua
+182
-0
expansions/script/c22251002.lua
expansions/script/c22251002.lua
+107
-0
expansions/script/c22251101.lua
expansions/script/c22251101.lua
+88
-0
expansions/script/c22252001.lua
expansions/script/c22252001.lua
+92
-0
expansions/script/c22252101.lua
expansions/script/c22252101.lua
+111
-0
expansions/script/c37564520.lua
expansions/script/c37564520.lua
+1
-1
expansions/script/c37564765.lua
expansions/script/c37564765.lua
+25
-4
expansions/script/c50000063.lua
expansions/script/c50000063.lua
+8
-8
expansions/script/c50000066.lua
expansions/script/c50000066.lua
+76
-76
expansions/script/c50000068.lua
expansions/script/c50000068.lua
+1
-1
expansions/script/c50000070.lua
expansions/script/c50000070.lua
+5
-1
expansions/script/c50000073.lua
expansions/script/c50000073.lua
+103
-90
expansions/script/c50000074.lua
expansions/script/c50000074.lua
+64
-65
expansions/script/c50000075.lua
expansions/script/c50000075.lua
+102
-0
expansions/script/c50000076.lua
expansions/script/c50000076.lua
+113
-0
expansions/script/c50000077.lua
expansions/script/c50000077.lua
+89
-0
expansions/script/c50008200.lua
expansions/script/c50008200.lua
+73
-0
expansions/script/c50008201.lua
expansions/script/c50008201.lua
+59
-0
expansions/script/c50008202.lua
expansions/script/c50008202.lua
+45
-0
expansions/script/c50008203.lua
expansions/script/c50008203.lua
+64
-0
expansions/script/c50008204.lua
expansions/script/c50008204.lua
+64
-0
expansions/script/c50008205.lua
expansions/script/c50008205.lua
+86
-0
expansions/script/c50008206.lua
expansions/script/c50008206.lua
+84
-0
expansions/script/c50008207.lua
expansions/script/c50008207.lua
+52
-0
expansions/script/c50008208.lua
expansions/script/c50008208.lua
+72
-0
expansions/script/c50008209.lua
expansions/script/c50008209.lua
+75
-0
expansions/script/c50008210.lua
expansions/script/c50008210.lua
+89
-0
expansions/script/c50008211.lua
expansions/script/c50008211.lua
+97
-0
expansions/script/c50008212.lua
expansions/script/c50008212.lua
+72
-0
expansions/script/c50008213.lua
expansions/script/c50008213.lua
+61
-0
expansions/script/c50008214.lua
expansions/script/c50008214.lua
+138
-0
expansions/script/c50008215.lua
expansions/script/c50008215.lua
+107
-0
expansions/script/c98721010.lua
expansions/script/c98721010.lua
+46
-0
expansions/script/c98721015.lua
expansions/script/c98721015.lua
+24
-0
expansions/strings.conf
expansions/strings.conf
+5
-0
No files found.
expansions/222DIY.cdb
View file @
1c7adf8b
No preview for this file type
expansions/script/c1110002.lua
View file @
1c7adf8b
...
...
@@ -64,7 +64,7 @@ function c1110002.tfilter2(c)
return
c
:
IsCode
(
1110001
)
and
c
:
IsFaceup
()
end
function
c1110002
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110002
.
tfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
Get
MZoneCount
(
tp
)
>
0
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110002
.
tfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
LOCATION_HAND
)
if
e
:
GetLabel
()
and
e
:
GetLabel
()
==
1
then
Duel
.
SetChainLimit
(
c1110002
.
limit2
)
...
...
expansions/script/c1110003.lua
View file @
1c7adf8b
...
...
@@ -43,7 +43,7 @@ function c1110003.filter1(c,e,tp)
return
c1110003
.
IsLd
(
c
)
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1110003
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1110003
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
Get
MZoneCount
(
tp
)
>
0
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1110003
.
filter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
LOCATION_HAND
)
end
--
...
...
expansions/script/c1110005.lua
View file @
1c7adf8b
...
...
@@ -38,7 +38,7 @@ function c1110005.con1(e,tp,eg,ep,ev,re,r,rp)
end
--
function
c1110005
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110005
.
cfilter
,
tp
,
LOCATION_FZONE
,
0
,
1
,
nil
)
and
Duel
.
Get
MZoneCount
(
tp
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110005
.
cfilter
,
tp
,
LOCATION_FZONE
,
0
,
1
,
nil
)
and
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
--
...
...
expansions/script/c1110006.lua
View file @
1c7adf8b
...
...
@@ -44,7 +44,7 @@ function c1110006.tfilter1(c,e,tp)
return
c
:
IsCode
(
1110002
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1110006
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Get
MZoneCount
(
tp
)
>
0
if
chk
==
0
then
return
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1110006
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
LOCATION_DECK
)
end
...
...
@@ -53,7 +53,7 @@ function c1110006.ofilter1(c)
return
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c1110006
.
IsLd
(
c
)
end
function
c1110006
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Get
MZoneCount
(
tp
)
<=
0
then
return
end
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110006
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
...
...
@@ -91,7 +91,8 @@ function c1110006.op2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
1110006
,
0
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110006
.
tfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
MoveToField
(
g
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
tc
=
g
:
GetFirst
()
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
end
end
\ No newline at end of file
expansions/script/c1110010.lua
0 → 100644
View file @
1c7adf8b
--蛰居·风雪旖旎
function
c1110010
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
--
aux
.
EnableSpiritReturn
(
c
,
EVENT_SPSUMMON_SUCCESS
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCondition
(
c1110010
.
con2
)
e2
:
SetOperation
(
c1110010
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1110010
,
0
))
e3
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_COUNTER
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
1110010
)
e3
:
SetTarget
(
c1110010
.
tg3
)
e3
:
SetOperation
(
c1110010
.
op3
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_TODECK
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetCondition
(
c1110010
.
con4
)
e4
:
SetTarget
(
c1110010
.
tg4
)
e4
:
SetOperation
(
c1110010
.
op4
)
c
:
RegisterEffect
(
e4
)
end
--
function
c1110010
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
--
function
c1110010
.
cfilter2
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c1110011
.
IsLq
(
c
)
and
c
:
IsAbleToDeckAsCost
()
end
function
c1110010
.
con2
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1110010
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
--
function
c1110010
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110010
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
--
function
c1110010
.
tfilter3
(
c
)
return
c1110010
.
IsLq
(
c
)
and
c
:
IsAbleToGrave
()
and
c
:
IsType
(
TYPE_SPELL
)
end
function
c1110010
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110010
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
--
function
c1110010
.
ofilter3
(
c
)
return
c
:
IsCanAddCounter
(
0x1111
,
1
)
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
end
function
c1110010
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110010
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c1110010
.
ofilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1110010
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1110010
.
ofilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g2
:
GetCount
()
>
0
then
local
tc2
=
g2
:
GetFirst
()
tc2
:
AddCounter
(
0x1111
,
1
)
end
end
end
end
--
function
c1110010
.
con4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
::
GetPreviousControler
()
==
tp
end
--
function
c1110010
.
tg4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
--
function
c1110010
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_EFFECT
)
end
end
--
\ No newline at end of file
expansions/script/c1110011.lua
0 → 100644
View file @
1c7adf8b
--莉莉卡·普莉兹姆利巴
function
c1110011
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
--
aux
.
EnableSpiritReturn
(
c
,
EVENT_SPSUMMON_SUCCESS
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCondition
(
c1110011
.
con2
)
e2
:
SetOperation
(
c1110011
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1110011
,
0
))
e3
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_COUNTER
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
1110011
)
e3
:
SetTarget
(
c1110011
.
tg3
)
e3
:
SetOperation
(
c1110011
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
c1110011
.
named_with_Prismriver
=
1
--
function
c1110011
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
function
c1110011
.
IsPrismriver
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Prismriver
end
--
function
c1110011
.
cfilter2
(
c
)
return
((
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c1110011
.
IsLq
(
c
))
or
(
c
:
IsType
(
TYPE_SPIRIT
)
and
c
:
IsType
(
TYPE_MONSTER
)))
and
c
:
IsAbleToRemoveAsCost
()
end
function
c1110011
.
con2
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1110011
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
--
function
c1110011
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110011
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
--
function
c1110011
.
tfilter3
(
c
)
return
c1110011
.
IsIsPrismriver
(
c
)
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_SPELL
)
end
function
c1110011
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110011
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
--
function
c1110011
.
ofilter3
(
c
)
return
c
:
IsCanAddCounter
(
0x1111
,
1
)
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
end
function
c1110011
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110011
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c1110011
.
ofilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1110011
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1110011
.
ofilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g2
:
GetCount
()
>
0
then
local
tc2
=
g2
:
GetFirst
()
tc2
:
AddCounter
(
0x1111
,
1
)
end
end
end
end
--
\ No newline at end of file
expansions/script/c1110012.lua
0 → 100644
View file @
1c7adf8b
--梅露兰·普莉兹姆利巴
function
c1110012
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
--
aux
.
EnableSpiritReturn
(
c
,
EVENT_SPSUMMON_SUCCESS
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCondition
(
c1110012
.
con2
)
e2
:
SetOperation
(
c1110012
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1110012
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_COUNTER
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
1110012
)
e3
:
SetTarget
(
c1110012
.
tg3
)
e3
:
SetOperation
(
c1110012
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
c1110012
.
named_with_Prismriver
=
1
--
function
c1110012
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
function
c1110012
.
IsPrismriver
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Prismriver
end
--
function
c1110012
.
cfilter2
(
c
)
return
((
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c1110012
.
IsLq
(
c
))
or
(
c
:
IsType
(
TYPE_SPIRIT
)
and
c
:
IsType
(
TYPE_MONSTER
)))
and
c
:
IsAbleToRemoveAsCost
()
end
function
c1110012
.
con2
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1110012
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
--
function
c1110012
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110012
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
--
function
c1110012
.
tfilter3
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_SPIRIT
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
end
function
c1110012
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110012
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
--
function
c1110012
.
ofilter3
(
c
)
return
c
:
IsCanAddCounter
(
0x1111
,
1
)
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
end
function
c1110012
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110012
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
local
e3_1
=
Effect
.
CreateEffect
(
c
)
e3_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3_1
:
SetCode
(
EFFECT_DISABLE
)
e3_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e3_1
,
true
)
local
e3_2
=
Effect
.
CreateEffect
(
c
)
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3_2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e3_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e3_2
,
true
)
Duel
.
SpecialSummonComplete
()
if
Duel
.
IsExistingMatchingCard
(
c1110012
.
ofilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1110012
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1110012
.
ofilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g2
:
GetCount
()
>
0
then
local
tc2
=
g2
:
GetFirst
()
tc2
:
AddCounter
(
0x1111
,
1
)
end
end
end
end
end
--
expansions/script/c1110013.lua
0 → 100644
View file @
1c7adf8b
--露娜萨·普莉兹姆利巴
function
c1110013
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
--
aux
.
EnableSpiritReturn
(
c
,
EVENT_SPSUMMON_SUCCESS
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCondition
(
c1110013
.
con2
)
e2
:
SetOperation
(
c1110013
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1110013
,
0
))
e3
:
SetCategory
(
CATEGORY_FLIP
+
CATEGORY_COUNTER
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCountLimit
(
1
,
1110013
)
e3
:
SetTarget
(
c1110013
.
tg3
)
e3
:
SetOperation
(
c1110013
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
c1110013
.
named_with_Prismriver
=
1
--
function
c1110013
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
function
c1110013
.
IsPrismriver
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Prismriver
end
--
function
c1110013
.
cfilter2
(
c
)
return
((
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c1110013
.
IsLq
(
c
))
or
(
c
:
IsType
(
TYPE_SPIRIT
)
and
c
:
IsType
(
TYPE_MONSTER
)))
and
c
:
IsAbleToRemoveAsCost
()
end
function
c1110013
.
con2
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1110013
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
--
function
c1110013
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110013
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
--
function
c1110013
.
tfilter3
(
c
)
return
c
:
IsCanTurnSet
()
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1110013
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1110013
.
tfilter3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_FLIP
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
end
--
function
c1110013
.
ofilter3
(
c
)
return
c
:
IsCanAddCounter
(
0x1111
,
1
)
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
end
function
c1110013
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPPO
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110013
.
tfilter3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
Duel
.
ChangePosition
(
tc
,
POS_FACEDOWN_DEFENSE
)
then
local
e3_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3_1
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e3_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e3_1
)
if
Duel
.
IsExistingMatchingCard
(
c1110013
.
ofilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1110013
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1110013
.
ofilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g2
:
GetCount
()
>
0
then
local
tc2
=
g2
:
GetFirst
()
tc2
:
AddCounter
(
0x1111
,
1
)
end
end
end
end
end
--
expansions/script/c1110111.lua
View file @
1c7adf8b
...
...
@@ -50,7 +50,7 @@ function c1110111.vfilter3(c)
end
--
function
c1110111
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_FUSION
end
--
function
c1110111
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -122,6 +122,13 @@ function c1110111.op1(e,tp,eg,ep,ev,re,r,rp)
e1_9
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e1_9
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_9
)
local
e1_10
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_10
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_10
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1_10
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e1_10
:
SetValue
(
1
)
e1_10
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_10
)
end
end
--
...
...
expansions/script/c1110112.lua
View file @
1c7adf8b
...
...
@@ -54,17 +54,17 @@ function c1110112.filter1(c,e,tp)
return
c
:
IsCode
(
1110111
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsFaceup
()
end
function
c1110112
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_FUSION
end
--
function
c1110112
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Get
MZoneCount
(
tp
)
>
0
if
chk
==
0
then
return
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1110112
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
end
--
function
c1110112
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Get
MZoneCount
(
tp
)
<=
0
then
return
end
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110112
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
...
...
expansions/script/c1110121.lua
View file @
1c7adf8b
...
...
@@ -5,6 +5,7 @@ function c1110121.initial_effect(c)
aux
.
AddXyzProcedure
(
c
,
c1110121
.
xyzfilter
,
3
,
2
,
c1110121
.
ovfilter
,
aux
.
Stringid
(
1110121
,
0
),
2
,
c1110121
.
xyzop
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1110121
,
2
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
...
...
expansions/script/c1110123.lua
0 → 100644
View file @
1c7adf8b
--
function
c1110123
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
c1110123
.
con1
)
e1
:
SetOperation
(
c1110123
.
op1
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
1110123
)
e2
:
SetCondition
(
c1110123
.
con2
)
e2
:
SetTarget
(
c1110123
.
tg2
)
e2
:
SetOperation
(
c1110123
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
1110123
,
0
))
e3
:
SetCategory
(
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
1110128
)
e3
:
SetCost
(
c1110123
.
cost3
)
e3
:
SetTarget
(
c1110123
.
tg3
)
e3
:
SetOperation
(
c1110123
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
c1110123
.
xyz_count
=
2
--
function
c1110123
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
--
function
c1110123
.
mfilter
(
c
,
xyzc
)
return
c
:
IsXyzLevel
(
xyzc
,
3
)
end
--
function
c1110123
.
xyzcheck
(
g
,
xyzc
,
exg
)
local
ct
=
g
:
GetCount
()
return
g
:
CheckWithSumEqual
(
c1110123
.
val
(
exg
),
6
,
ct
,
ct
)
end
function
c1110123
.
val
(
exg
)
return
function
(
c
)
return
exg
:
IsContains
(
c
)
and
c
:
GetLevel
()
or
3
end
end
--
function
c1110123
.
XyzProcedureCustomFilter
(
c
,
xyzcard
,
func
,
ext_params
)
if
c
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_REMOVED
)
and
c
:
IsFacedown
()
then
return
false
end
return
c
:
IsCanBeXyzMaterial
(
xyzcard
)
and
(
not
func
or
func
(
c
,
xyzcard
,
table.unpack
(
ext_params
)))
end
--
function
c1110123
.
tokenfilter
(
c
)
return
c
:
IsType
(
TYPE_TOKEN
)
and
c
:
IsReleasable
()
and
c
:
IsLevelBelow
(
3
)
end
--
function
c1110123
.
CheckGroup
(
g
,
f
,
cg
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
g
:
GetCount
()
if
min
>
max
then
return
false
end
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
if
cg
then
sg
:
Merge
(
cg
)
end
local
ct
=
sg
:
GetCount
()
if
ct
>=
min
and
ct
<
max
and
f
(
sg
,
...
)
then
return
true
end
return
g
:
IsExists
(
c1110123
.
CheckGroupRecursive
,
1
,
nil
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
end
function
c1110123
.
CheckGroupRecursive
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
if
sg
:
IsContains
(
c
)
then
return
false
end
sg
:
AddCard
(
c
)
local
ct
=
sg
:
GetCount
()
local
res
=
(
ct
>=
min
and
f
(
sg
,
table.unpack
(
ext_params
)))
or
(
ct
<
max
and
g
:
IsExists
(
c1110123
.
CheckGroupRecursive
,
1
,
nil
,
sg
,
g
,
f
,
min
,
max
,
ext_params
))
sg
:
RemoveCard
(
c
)
return
res
end
--
function
c1110123
.
CheckFieldFilter
(
g
,
tp
,
c
,
f
,
...
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
+
g
:
FilterCount
(
aux
.
FConditionCheckF
,
nil
,
tp
)
>
0
and
(
not
f
or
f
(
g
,
...
))
end
--
function
c1110123
.
con1
(
e
,
c
,
og
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
func
=
c1110123
.
mfilter
local
gf
=
c1110123
.
xyzcheck
local
ext_params
=
{}
local
minc
=
2
local
maxc
=
4
if
min
then
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
end
local
mg
=
nil
local
exg
=
Group
.
CreateGroup
()
if
og
then
mg
=
og
:
Filter
(
c1110123
.
XyzProcedureCustomFilter
,
nil
,
c
,
func
,
ext_params
)
exg
=
og
:
Filter
(
c1110123
.
tokenfilter
,
nil
)
else
mg
=
Duel
.
GetMatchingGroup
(
c1110123
.
XyzProcedureCustomFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
func
,
ext_params
)
exg
=
Duel
.
GetMatchingGroup
(
c1110123
.
tokenfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
mg
:
Merge
(
exg
)
end
return
maxc
>=
minc
and
c1110123
.
CheckGroup
(
mg
,
c1110123
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
gf
,
c
,
exg
)
end
--
function
c1110123
.
SelectGroup
(
tp
,
desc
,
g
,
f
,
cg
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
g
:
GetCount
()
local
ext_params
=
{
...
}
local
sg
=
Group
.
CreateGroup
()
if
cg
then
sg
:
Merge
(
cg
)
end
local
ct
=
sg
:
GetCount
()
while
ct
<
max
and
not
(
ct
>=
min
and
f
(
sg
,
...
)
and
not
(
g
:
IsExists
(
c1110123
.
CheckGroupRecursive
,
1
,
nil
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
and
Duel
.
SelectYesNo
(
tp
,
210
)))
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
desc
)
local
tg
=
g
:
FilterSelect
(
tp
,
c1110123
.
CheckGroupRecursive
,
1
,
1
,
nil
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
sg
:
Merge
(
tg
)
ct
=
sg
:
GetCount
()
end
return
sg
end
--
function
c1110123
.
OverlayFilter
(
c
,
nchk
)
return
nchk
or
not
c
:
IsType
(
TYPE_TOKEN
)
end
function
c1110123
.
OverlayGroup
(
c
,
g
,
xm
,
nchk
)
if
not
nchk
and
(
not
c
:
IsLocation
(
LOCATION_MZONE
)
or
c
:
IsFacedown
()
or
g
:
GetCount
()
<=
0
or
not
c
:
IsType
(
TYPE_XYZ
))
then
return
end
local
tg
=
g
:
Filter
(
c1110123
.
OverlayFilter
,
nil
,
nchk
)
if
tg
:
GetCount
()
==
0
then
return
end
local
og
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
tg
)
do
if
tc
:
IsStatus
(
STATUS_LEAVE_CONFIRMED
)
then
tc
:
CancelToGrave
()
end
og
:
Merge
(
tc
:
GetOverlayGroup
())
end
if
og
:
GetCount
()
>
0
then
if
xm
then
Duel
.
Overlay
(
c
,
og
)
else
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
end
Duel
.
Overlay
(
c
,
tg
)
end
--
function
c1110123
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
nil
local
exg
=
Group
.
CreateGroup
()
if
og
and
not
min
then
g
=
og
else
local
func
=
c1110123
.
mfilter
local
gf
=
c1110123
.
xyzcheck
local
ext_params
=
{}
local
mg
=
nil
if
og
then
mg
=
og
:
Filter
(
c1110123
.
XyzProcedureCustomFilter
,
nil
,
c
,
func
,
ext_params
)
exg
=
og
:
Filter
(
c1110123
.
tokenfilter
,
nil
)
else
mg
=
Duel
.
GetMatchingGroup
(
c1110123
.
XyzProcedureCustomFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
func
,
ext_params
)
exg
=
Duel
.
GetMatchingGroup
(
c1110123
.
tokenfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
mg
:
Merge
(
exg
)
end
local
minc
=
2
local
maxc
=
4
if
min
then
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
end
g
=
c1110123
.
SelectGroup
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
c1110123
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
gf
,
c
,
exg
)
end
c
:
SetMaterial
(
g
)
local
rg
=
g
:
Filter
(
function
(
c
)
return
exg
:
IsContains
(
c
)
end
,
nil
)
g
:
Sub
(
rg
)
Duel
.
Release
(
rg
,
REASON_COST
+
REASON_MATERIAL
)
c1110123
.
OverlayGroup
(
c
,
g
,
false
,
true
)
end
--
function
c1110123
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
end
--
function
c1110123
.
tfilter2
(
c
)
return
c1110123
.
IsLq
(
c
)
end
function
c1110123
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsType
(
TYPE_XYZ
)
and
Duel
.
IsExistingMatchingCard
(
c1110123
.
tfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
--
function
c1110123
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1110123
.
tfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
local
og
=
tc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
Duel
.
Overlay
(
c
,
Group
.
FromCards
(
tc
))
end
end
--
function
c1110123
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
--
function
c1110123
.
tfilter3
(
c
)
return
c
:
IsAbleToGrave
()
and
c
:
IsFaceup
()
end
function
c1110123
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1110123
.
tfilter3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1110123
.
tfilter3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
LOCATION_ONFIELD
)
end
--
function
c1110123
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsLocation
(
LOCATION_ONFIELD
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
--
expansions/script/c1110151.lua
View file @
1c7adf8b
...
...
@@ -79,7 +79,7 @@ function c1110151.filterx(c)
end
--
function
c1110151
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_RITUAL
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_RITUAL
end
function
c1110151
.
cost3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_BATTLE_PHASE
)
==
0
end
...
...
expansions/script/c1111008.lua
View file @
1c7adf8b
...
...
@@ -19,7 +19,7 @@ function c1111008.IsLd(c)
end
--
function
c1111008
.
cfilter1
(
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_FUSION
)
and
c
:
IsFaceup
()
return
c
:
GetSummonType
()
==
SUMMON_TYPE_FUSION
and
c
:
IsFaceup
()
end
function
c1111008
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
@@ -30,14 +30,14 @@ function c1111008.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
end
--
function
c1111008
.
cfilter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
<
4
and
c
:
IsSummonType
(
SUMMON_TYPE_NORMAL
)
return
c
:
IsFaceup
()
and
c
:
GetLevel
()
<
4
and
c
:
GetSummonType
()
==
SUMMON_TYPE_NORMAL
end
function
c1111008
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c1111008
.
cfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
GetMatchingGroupCount
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
1
end
--
function
c1111008
.
tfilter0
(
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
c
:
IsFaceup
()
return
c
:
GetSummonType
()
==
SUMMON_TYPE_SPECIAL
and
c
:
IsFaceup
()
end
function
c1111008
.
tfilter1
(
c
)
return
c1111008
.
IsLd
(
c
)
and
c
:
IsAbleToHand
()
...
...
expansions/script/c1111011.lua
0 → 100644
View file @
1c7adf8b
--秘谈·澄澈的空海
function
c1111011
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c1111011
.
cost1
)
e1
:
SetTarget
(
c1111011
.
tg1
)
e1
:
SetOperation
(
c1111011
.
op1
)
c
:
RegisterEffect
(
e1
)
--
end
--
function
c1111011
.
IsLd
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Ld
end
--
function
c1111011
.
cfilter1
(
c
)
return
c1111011
.
IsLd
(
c
)
end
function
c1111011
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1111011
.
cfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111011
.
cfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
--
function
c1111011
.
tfilter1
(
c
)
return
c
:
IsFacedown
()
end
function
c1111011
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1111011
.
tfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
--
function
c1111011
.
ofilter1
(
c
)
return
c
:
IsFacedown
()
and
c
:
IsAbleToHand
()
end
function
c1111011
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c1111011
.
tfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
tp
,
g
)
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g2
=
g
:
FilterSelect
(
tp
,
c1111011
.
ofilter1
,
1
,
1
,
nil
)
if
g2
:
GetCount
()
>
0
then
local
tc2
=
g2
:
GetFirst
()
Duel
.
SendtoHand
(
tc2
,
nil
,
REASON_EFFECT
)
end
end
end
--
\ No newline at end of file
expansions/script/c1111012.lua
0 → 100644
View file @
1c7adf8b
--秘谈·时令的欢舞
function
c1111012
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c1111012
.
tg1
)
e1
:
SetOperation
(
c1111012
.
op1
)
c
:
RegisterEffect
(
e1
)
--
end
--
function
c1111012
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
--
function
c1111012
.
tfilter1
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_SPIRIT
)
and
c
:
GetLevel
()
<
4
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
and
not
c
:
IsType
(
TYPE_XYZ
)
and
not
c
:
IsType
(
TYPE_LINK
)
end
function
c1111012
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
num
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
num
=
num
-
1
end
return
num
>
0
and
Duel
.
IsExistingMatchingCard
(
c1111012
.
tfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
--
function
c1111012
.
ofilter1
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsCanAddCounter
(
0x1111
,
1
)
and
c
:
IsFaceup
()
and
c1111012
.
IsLq
(
c
)
end
function
c1111012
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
local
num
=
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
if
num
>
0
then
local
num2
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
num
>
num2
then
num
=
num2
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
num
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1111012
.
tfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
num
,
nil
,
e
,
tp
)
if
g2
:
GetCount
()
>
0
then
if
Duel
.
SpecialSummon
(
g2
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c1111012
.
ofilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
then
Duel
.
BreakEffect
()
local
g3
=
Duel
.
GetMatchingGroup
(
c1111012
.
ofilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
if
g3
:
GetCount
()
>
0
then
local
tc3
=
g3
:
GetFirst
()
while
tc3
do
tc3
:
AddCounter
(
0x1111
,
1
)
tc3
=
g3
:
GetNext
()
end
end
end
end
end
end
--
\ No newline at end of file
expansions/script/c1111221.lua
0 → 100644
View file @
1c7adf8b
--灵曲·彼岸盛开之花
function
c1111221
.
initial_effect
(
c
)
--
c
:
EnableCounterPermit
(
0x1111
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1111221
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
1111221
)
e1
:
SetCost
(
c1111221
.
cost1
)
e1
:
SetTarget
(
c1111221
.
tg1
)
e1
:
SetOperation
(
c1111221
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1111221
,
1
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
1111226
)
e2
:
SetCost
(
c1111221
.
cost2
)
e2
:
SetTarget
(
c1111221
.
tg2
)
e2
:
SetOperation
(
c1111221
.
op2
)
c
:
RegisterEffect
(
e2
)
end
--
c1111221
.
named_with_Lq
=
1
function
c1111221
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
--
function
c1111221
.
cfilter1
(
c
)
return
c
:
IsAbleToHandAsCost
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1111221
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1111221
.
cfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111221
.
cfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
end
--
function
c1111221
.
tfilter1
(
c
)
return
c
:
IsAbleToGrave
()
end
function
c1111221
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1111221
.
tfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
--
function
c1111221
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111221
.
tfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
then
Duel
.
BreakEffect
()
e
:
GetHandler
():
AddCounter
(
0x1111
,
1
)
end
end
end
end
--
function
c1111221
.
cfilter2
(
c
)
return
c
:
IsAbleToGrave
()
and
c1111221
.
IsLq
(
c
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
end
function
c1111221
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1111
,
2
,
REASON_COST
)
and
Duel
.
IsExistingMatchingCard
(
c1111221
.
cfilter2
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
)
end
local
c
=
e
:
GetHandler
()
local
num
=
0
while
c
:
IsCanRemoveCounter
(
tp
,
0x1111
,
1
,
REASON_COST
)
do
num
=
num
+
1
c
:
RemoveCounter
(
tp
,
0x1111
,
1
,
REASON_COST
)
if
num
>=
2
then
if
c
:
IsCanRemoveCounter
(
tp
,
0x1111
,
1
,
REASON_COST
)
and
Duel
.
IsExistingMatchingCard
(
c1111221
.
cfilter2
,
tp
,
LOCATION_DECK
,
0
,
num
+
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1111221
,
2
))
then
else
break
end
end
end
e
:
SetLabel
(
num
)
end
--
function
c1111221
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1111221
.
cfilter2
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
)
end
if
e
:
GetLabel
()
and
e
:
GetLabel
()
>
0
then
local
num
=
e
:
GetLabel
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
num
,
tp
,
LOCATION_DECK
)
end
end
--
function
c1111221
.
oftiler2
(
c
)
return
c
:
IsAbleToRemove
()
end
function
c1111221
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
e
:
GetLabel
()
and
e
:
GetLabel
()
>
0
then
local
num
=
e
:
GetLabel
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111221
.
cfilter2
,
tp
,
LOCATION_DECK
,
0
,
num
,
num
,
nil
)
if
g
:
GetCount
()
>
0
then
local
numtograve
=
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
if
numtograve
>
0
and
Duel
.
IsExistingMatchingCard
(
c1111221
.
ofilter2
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1111221
,
3
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c1111221
.
ofilter2
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
1
,
numtograve
,
nil
)
if
g2
:
GetCount
()
>
0
then
Duel
.
Remove
(
g2
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
end
end
end
end
--
\ No newline at end of file
expansions/script/c1111222.lua
0 → 100644
View file @
1c7adf8b
--灵曲·拂晓繁华之风
function
c1111222
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1111222
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
1111222
)
e1
:
SetTarget
(
c1111222
.
tg1
)
e1
:
SetOperation
(
c1111222
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1111222
,
1
))
e2
:
SetCategory
(
CATEGORY_COUNTER
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
1111227
)
e2
:
SetCost
(
c1111222
.
cost2
)
e2
:
SetTarget
(
c1111222
.
tg2
)
e2
:
SetOperation
(
c1111222
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
c1111222
.
named_with_Lq
=
1
function
c1111222
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
--
function
c1111222
.
tfilter1
(
c
)
return
c
:
IsAbleToHand
()
end
function
c1111222
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1111222
.
tfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1111222
.
tfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RTOHAND
,
g
,
1
,
0
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
Duel
.
SetChainLimit
(
c1111222
.
limit1_1
(
g
:
GetFirst
()))
end
function
c1111222
.
limit1_1
(
c
)
return
function
(
e
,
lp
,
tp
)
return
e
:
GetHandler
()
~=
c
end
end
--
function
c1111222
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsLocation
(
LOCATION_ONFIELD
)
then
if
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
~=
0
then
c
:
AddCounter
(
0x1111
,
1
)
end
end
end
--
function
c1111222
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1111
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x1111
,
1
,
REASON_COST
)
end
--
function
c1111222
.
tfilter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCanAddCounter
(
0x1111
,
1
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c1111222
.
IsLq
(
c
)
end
function
c1111222
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1111222
.
tfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
--
function
c1111222
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111222
.
tfilter2
,
tp
,
0
,
LOCATION_DECK
,
1
,
2
,
e
:
GetHandler
())
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
while
tc
do
tc
:
AddCounter
(
0x1111
,
1
)
tc
=
g
:
GetNext
()
end
end
end
end
--
\ No newline at end of file
expansions/script/c1111223.lua
0 → 100644
View file @
1c7adf8b
--灵曲·年华静谧之月
function
c1111223
.
initial_effect
(
c
)
--
c
:
EnableCounterPermit
(
0x1111
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1111223
,
0
))
e1
:
SetCategory
(
CATEGORY_FLIP
+
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
1111223
)
e1
:
SetCost
(
c1111223
.
cost1
)
e1
:
SetTarget
(
c1111223
.
tg1
)
e1
:
SetOperation
(
c1111223
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1111223
,
1
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
1111228
)
e2
:
SetCost
(
c1111223
.
cost2
)
e2
:
SetTarget
(
c1111223
.
tg2
)
e2
:
SetOperation
(
c1111223
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
c1111223
.
named_with_Lq
=
1
function
c1111223
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
--
function
c1111223
.
cfilter1
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c1111223
.
IsLq
(
c
)
end
function
c1111223
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1111223
.
cfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111223
.
cfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Remove
(
tg
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
--
function
c1111223
.
tfilter1
(
c
)
return
c
:
IsCanTurnSet
()
end
function
c1111223
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
c
=
e
:
GetHandler
()
c
:
SetTurnCounter
(
0
)
local
g
=
Duel
.
GetMatchingGroup
(
c1111223
.
tfilter1
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
--
function
c1111223
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetMatchingGroup
(
c1111223
.
tfilter1
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN_DEFENSE
)
~=
0
then
c
:
AddCounter
(
0x1111
,
1
)
end
end
end
end
--
function
c1111223
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1111
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x1111
,
1
,
REASON_COST
)
end
--
function
c1111223
.
tfilter2
(
c
)
return
c
:
IsFaceup
()
end
function
c1111223
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1111223
.
tfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1111223
.
tfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
LOCATION_ONFIELD
)
end
--
function
c1111223
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e2_1
=
Effect
.
CreateEffect
(
c
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2_1
:
SetRange
(
LOCATION_ONFIELD
)
e2_1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2_1
:
SetValue
(
c1111223
.
val2_1
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_CHAIN
)
c
:
RegisterEffect
(
e2_1
)
end
end
function
c1111223
.
val2_1
(
e
,
te
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
expansions/script/c1111224.lua
0 → 100644
View file @
1c7adf8b
--灵曲·凌霜空幽之雪
function
c1111224
.
initial_effect
(
c
)
--
c
:
EnableCounterPermit
(
0x1111
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1111224
,
0
))
e1
:
SetCategory
(
CATEGORY_RELEASE
+
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
1111224
)
e1
:
SetCost
(
c1111224
.
cost1
)
e1
:
SetTarget
(
c1111224
.
tg1
)
e1
:
SetOperation
(
c1111224
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
1111224
,
1
))
e2
:
SetCategory
(
CATEGORY_RELEASE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
1111229
)
e2
:
SetCost
(
c1111224
.
cost2
)
e2
:
SetTarget
(
c1111224
.
tg2
)
e2
:
SetOperation
(
c1111224
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
c1111224
.
named_with_Lq
=
1
function
c1111224
.
IsLq
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Lq
end
--
function
c1111224
.
cfilter1
(
c
)
return
c
:
IsReleasable
()
and
c
:
IsHasEffect
(
EFFECT_IMMUNE_EFFECT
)
end
function
c1111224
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1111224
.
cfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111224
.
cfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Release
(
g
,
REASON_COST
)
end
end
--
function
c1111224
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
--
function
c1111224
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
c
:
AddCounter
(
0x1111
,
1
)
local
e1_1
=
Effect
.
CreateEffect
(
c
)
e1_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1_1
:
SetRange
(
LOCATION_SZONE
)
e1_1
:
SetCountLimit
(
1
)
e1_1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1_1
:
SetOperation
(
c1111224
.
op1_1
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e1_1
)
end
end
function
c1111224
.
op1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
--
function
c1111224
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanRemoveCounter
(
tp
,
0x1111
,
2
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveCounter
(
tp
,
0x1111
,
2
,
REASON_COST
)
end
--
function
c1111224
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPPO
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
g
,
1
,
0
,
LOCATION_ONFIELD
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
--
function
c1111224
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetCode
(
EFFECT_CANNOT_TRIGGER
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_1
)
local
e2_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2_2
:
SetCode
(
EFFECT_DISABLE
)
e2_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_2
)
local
e2_3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_3
)
local
e2_4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_4
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e2_4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_4
)
local
e2_5
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_5
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e2_5
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_5
)
local
e2_6
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_6
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_6
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e2_6
:
SetValue
(
1
)
e2_6
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_6
)
local
e2_7
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_7
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_7
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
e2_7
:
SetValue
(
1
)
e2_7
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_7
)
local
e2_8
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_8
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_8
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
e2_8
:
SetValue
(
1
)
e2_8
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_8
)
local
e2_9
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_9
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_9
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_9
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e2_9
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_9
)
local
e2_10
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_10
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_10
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2_10
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e2_10
:
SetValue
(
1
)
e2_10
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_10
)
end
end
expansions/script/c1111301.lua
View file @
1c7adf8b
...
...
@@ -45,7 +45,7 @@ function c1111301.matfilter(c)
end
function
c1111301
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
Duel
.
Get
MZoneCount
(
tp
)
<=
0
then
return
false
end
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
false
end
local
mg
=
Duel
.
GetMatchingGroup
(
c1111301
.
matfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c1111301
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
...
...
@@ -53,7 +53,7 @@ function c1111301.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
--
function
c1111301
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Get
MZoneCount
(
tp
)
<=
0
then
return
end
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
mg
=
Duel
.
GetMatchingGroup
(
c1111301
.
matfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c1111301
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
...
...
expansions/script/c1111501.lua
View file @
1c7adf8b
...
...
@@ -60,7 +60,7 @@ function c1111501.limit1_1(e,c,sump,sumtype,sumpos,targetp,se)
end
--
function
c1111501
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Get
MZoneCount
(
tp
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
1110199
,
0
,
0x4011
,
100
,
100
,
3
,
RACE_FAIRY
,
ATTRIBUTE_LIGHT
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1111501
,
3
))
then
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
1110199
,
0
,
0x4011
,
100
,
100
,
3
,
RACE_FAIRY
,
ATTRIBUTE_LIGHT
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1111501
,
3
))
then
local
token
=
Duel
.
CreateToken
(
tp
,
1110199
)
if
Duel
.
SpecialSummon
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
e1_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
@@ -118,12 +118,12 @@ function c1111501.tfilter3(c,e,tp)
return
c
:
IsCode
(
1110003
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1111501
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Get
MZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1111501
.
tfilter3
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1111501
.
tfilter3
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
--
function
c1111501
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Get
MZoneCount
(
tp
)
<=
0
then
return
end
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111501
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
...
...
expansions/script/c1111502.lua
View file @
1c7adf8b
...
...
@@ -43,13 +43,13 @@ function c1111502.filter2(c,e,tp)
return
c
:
GetLevel
()
==
3
and
c
:
IsRace
(
RACE_FAIRY
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1111502
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Get
MZoneCount
(
tp
)
>
0
if
chk
==
0
then
return
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1111502
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c1111502
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
Get
MZoneCount
(
tp
)
>
0
and
c
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111502
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
...
...
expansions/script/c1111511.lua
0 → 100644
View file @
1c7adf8b
--交界·废弃洋馆
function
c1111511
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c1111511
.
tg1
)
e1
:
SetOperation
(
c1111511
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetValue
(
c1111511
.
val2
)
e2
:
SetCondition
(
c1111511
.
con2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCode
(
EFFECT_SEND_REPLACE
)
e3
:
SetTarget
(
c1111511
.
tg3
)
e3
:
SetValue
(
c1111511
.
val3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1111511
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
--
function
c1111511
.
ofilter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_SPIRIT
)
and
c
:
GetLevel
()
<
4
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
end
function
c1111511
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
c1111511
.
ofilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1111511
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1111511
.
tfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
end
end
end
--
function
c1111511
.
val2
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetHandlerPlayer
()
end
--
function
c1111511
.
con2
(
e
,
tp
)
local
num
=
Duel
.
GetCounter
(
tp
,
LOCATION_ONFIELD
,
0
,
0x1111
)
return
num
>
2
end
--
function
c11111511
.
tfilter3
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
GetDestination
()
==
LOCATION_DECK
and
c
:
IsAbleToHand
()
end
function
c1111511
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
and
re
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetHandler
():
IsType
(
TYPE_SPIRIT
)
and
eg
:
IsExists
(
c1111511
.
tfilter3
,
1
,
nil
,
tp
)
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1111511
,
1
))
then
local
g
=
eg
:
Filter
(
c1111511
.
tfilter3
,
nil
,
tp
)
local
ct
=
g
:
GetCount
()
if
ct
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
g
=
g
:
Select
(
tp
,
1
,
ct
,
nil
)
end
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e3_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3_1
:
SetCode
(
EFFECT_TO_DECK_REDIRECT
)
e3_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3_1
:
SetValue
(
LOCATION_HAND
)
e3_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3_1
)
tc
:
RegisterFlagEffect
(
1111511
,
RESET_EVENT
+
0x1de0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
tc
=
g
:
GetNext
()
end
local
e3_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3_2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3_2
:
SetCode
(
EVENT_TO_HAND
)
e3_2
:
SetCountLimit
(
1
)
e3_2
:
SetCondition
(
c1111511
.
con3_2
)
e3_2
:
SetOperation
(
c1111511
.
op3_2
)
e3_2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3_2
,
tp
)
return
true
else
return
false
end
end
function
c1111511
.
cfilter3_2
(
c
)
return
c
:
GetFlagEffect
(
1111511
)
~=
0
end
function
c1111511
.
con3_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c1111511
.
cfilter3_2
,
1
,
nil
)
end
function
c1111511
.
op3_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
c1111511
.
cfilter3_2
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
--
function
c1111511
.
val3
(
e
,
c
)
return
false
end
--
expansions/script/c1152001.lua
0 → 100644
View file @
1c7adf8b
--恶魔之妹·芙兰朵露
function
c1152001
.
initial_effect
(
c
)
--
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
c1152001
.
lfilter
),
4
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1152001
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetTarget
(
c1152001
.
tg1
)
e1
:
SetOperation
(
c1152001
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c1152001
.
tg2
)
e2
:
SetOperation
(
c1152001
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
c1152001
.
named_with_Fulan
=
1
function
c1152001
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152001
.
named_with_Fulsp
=
1
function
c1152001
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152001
.
lfilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
end
--
function
c1152001
.
tfilter1
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
end
function
c1152001
.
tfilter1_2
(
c
)
return
c1152001
.
IsFulsp
(
c
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c
:
IsAbleToRemove
()
and
bit
.
band
(
c
:
GetReason
(),
REASON_DESTROY
)
~=
0
end
function
c1152001
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
c1152001
.
tfilter1
(
chkc
)
end
local
c
=
e
:
GetHandler
()
local
lg
=
c
:
GetLinkedGroup
()
local
g
=
lg
:
Filter
(
Card
.
IsDestructable
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1152001
.
tfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
(
g
:
GetCount
()
>
0
or
Duel
.
IsExistingTarget
(
c1152001
.
tfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
))
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1152001
.
tfilter1
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
--
function
c1152001
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
lg
=
c
:
GetLinkedGroup
()
local
g
=
lg
:
Filter
(
Card
.
IsDestructable
,
nil
)
local
Destroy
=
0
if
g
:
GetCount
()
>
0
and
Duel
.
IsExistingTarget
(
c1152001
.
tfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
local
i
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
1152001
,
1
),
aux
.
Stringid
(
1152001
,
2
))
if
i
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Destroy
=
1
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1152001
.
tfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
tc2
=
g2
:
GetFirst
()
if
Duel
.
Remove
(
tc2
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
Destroy
=
1
end
end
else
if
g
:
GetCount
()
>
0
and
not
Duel
.
IsExistingTarget
(
c1152001
.
tfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Destroy
=
1
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1152001
.
tfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
tc2
=
g2
:
GetFirst
()
if
Duel
.
Remove
(
tc2
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
Destroy
=
1
end
end
end
if
Destroy
==
1
then
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsDisabled
()
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_DISABLE
)
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_1
)
local
e1_2
=
e1_1
:
Clone
()
e1_2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e1_2
:
SetValue
(
RESET_TURN_SET
)
tc
:
RegisterEffect
(
e1_2
)
if
tc
:
IsType
(
TYPE_TRAPMONSTER
)
then
local
e1_3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_3
:
SetCode
(
EFFECT_DISABLE_TRAPMONSTER
)
e1_3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_3
)
end
Duel
.
AdjustInstantly
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
--
function
c1152001
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetControler
()
==
Duel
.
GetTurnPlayer
()
and
rp
~=
tp
end
return
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152001
,
3
))
end
--
function
c1152001
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
then
local
e2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2_1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2_1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2_1
:
SetCountLimit
(
1
)
e2_1
:
SetOperation
(
c1152001
.
op2_1
)
Duel
.
RegisterEffect
(
e2_1
,
tp
)
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
aux
.
NULL
)
end
end
function
c1152001
.
op2_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReturnToField
(
e
:
GetOwner
())
end
--
expansions/script/c1152002.lua
0 → 100644
View file @
1c7adf8b
--幽禁之间·芙兰朵露
function
c1152002
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c1152002
.
con1
)
e1
:
SetTarget
(
c1152002
.
tg1
)
e1
:
SetOperation
(
c1152002
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_DELAY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetCondition
(
c1152002
.
con2
)
e2
:
SetTarget
(
c1152002
.
tg2
)
e2
:
SetOperation
(
c1152002
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
c1152002
.
named_with_Fulan
=
1
function
c1152002
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152002
.
named_with_Fulsp
=
1
function
c1152002
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152002
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
end
--
function
c1152002
.
tfilter1
(
c
)
return
((
c1152002
.
IsFulan
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
))
or
(
c1152002
.
IsFulsp
(
c
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))))
and
c
:
IsDestructable
()
end
function
c1152002
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1152002
.
tfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
GetFlagEffect
(
tp
,
1152000
)
==
0
end
Duel
.
RegisterFlagEffect
(
tp
,
1152000
,
RESET_CHAIN
,
0
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
--
function
c1152002
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1152002
.
tfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
GetFlagEffect
(
tp
,
1152002
)
==
0
and
Duel
.
GetFlagEffect
(
1
-
tp
,
1152002
)
==
0
then
Duel
.
RegisterFlagEffect
(
tp
,
1152002
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
e1_1
=
Effect
.
CreateEffect
(
tc
)
e1_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1_1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1_1
:
SetCountLimit
(
1
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1_1
:
SetRange
(
LOCATION_GRAVE
)
e1_1
:
SetOperation
(
c1152002
.
op1_1
)
tc
:
RegisterEffect
(
e1_1
,
true
)
end
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152002
,
0
))
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c1152002
.
op1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152002
,
1
))
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
end
--
function
c1152002
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
--
function
c1152002
.
tfilter2
(
c
,
e
,
tp
)
return
c1152002
.
IsFulan
(
c
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1152002
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1152002
.
tfilter2
,
tp
,
LOCATION_SZONE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
LOCATION_SZONE
)
end
--
function
c1152002
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
tg
=
Duel
.
GetMatchingGroup
(
c1152002
.
tfilter2
,
tp
,
LOCATION_SZONE
,
0
,
nil
,
e
,
tp
)
if
ft
<=
0
or
tg
:
GetCount
()
==
0
then
return
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
tg
:
Select
(
tp
,
ft
,
ft
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
=
g
:
GetNext
()
end
Duel
.
SpecialSummonComplete
()
end
expansions/script/c1152003.lua
0 → 100644
View file @
1c7adf8b
--破灭的波纹·芙兰朵露
function
c1152003
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCondition
(
c1152003
.
con1
)
e1
:
SetOperation
(
c1152003
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c1152003
.
cost2
)
e2
:
SetTarget
(
c1152003
.
tg2
)
e2
:
SetOperation
(
c1152003
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
c1152003
.
named_with_Fulan
=
1
function
c1152003
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152003
.
named_with_Fulsp
=
1
function
c1152003
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152003
.
cfilter1_1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1152003
.
cfilter1_2
(
c
)
return
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c1152003
.
IsFulsp
(
c
)
and
c
:
IsSSetable
()
and
bit
.
band
(
c
:
GetReason
(),
REASON_DESTROY
)
~=
0
end
function
c1152003
.
con1
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetMatchingGroupCount
(
c1152003
.
cfilter1_1
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
==
0
and
Duel
.
GetMatchingGroupCount
(
c1152003
.
cfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
not
e
:
GetHandler
():
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
end
--
function
c1152003
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152003
.
cfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SSet
(
tp
,
g
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
--
function
c1152003
.
cfilter2_1
(
c
)
return
c1152003
.
IsFulsp
(
c
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c
:
IsAbleToRemoveAsCost
()
end
function
c1152003
.
cfilter2_2
(
c
,
code
)
return
c
:
GetCode
()
==
code
and
c
:
IsAbleToHand
()
end
function
c1152003
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
gn
=
Group
.
CreateGroup
()
local
g
=
Duel
.
GetMatchingGroup
(
c1152003
.
cfilter2_1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
while
tc
do
local
code
=
tc
:
GetCode
()
local
g2
=
Duel
.
GetMatchingGroup
(
c1152003
.
cfilter2_2
,
LOCATION_DECK
,
0
,
1
,
nil
,
code
)
if
g2
:
GetCount
()
>
0
then
gn
:
AddCard
(
tc
)
end
tc
=
g
:
GetNext
()
end
end
if
chk
==
0
then
return
gn
:
GetCount
()
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g3
=
gn
:
FilterSelect
(
tp
,
c1152003
.
cfilter2_1
,
1
,
1
,
nil
)
local
tc3
=
g3
:
GetFirst
()
e
:
SetLabelObject
(
tc3
)
Duel
.
Remove
(
g3
,
POS_FACEUP
,
REASON_COST
)
end
--
function
c1152003
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
--
function
c1152003
.
ofilter2
(
c
,
code
)
return
c
:
GetCode
()
==
code
and
c1152003
.
IsFulsp
(
c
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c
:
IsAbleToHand
()
end
function
c1152003
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152003
.
ofilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
tc
:
GetCode
())
if
g
:
GetCount
()
>
0
then
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
Duel
.
MoveToField
(
e
:
GetHandler
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e2_1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
e
:
GetHandler
():
RegisterEffect
(
e2_1
,
true
)
end
end
end
end
--
expansions/script/c1152004.lua
0 → 100644
View file @
1c7adf8b
--高贵与罪恶的红月
function
c1152004
.
initial_effect
(
c
)
--
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
c1152004
.
matfilter
,
1
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetOperation
(
c1152004
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTarget
(
c1152004
.
tg2
)
e2
:
SetOperation
(
c1152004
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
c1152004
.
named_with_Fulan
=
1
function
c1152004
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
function
c1152004
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152004
.
matfilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
end
--
function
c1152004
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
lg
=
c
:
GetLinkedGroup
()
local
tc
=
lg
:
GetFirst
()
while
tc
do
if
not
tc
:
IsDisabled
()
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1_1
=
Effect
.
CreateEffect
(
tc
)
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_DISABLE
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1_1
)
local
e2_1
=
Effect
.
CreateEffect
(
tc
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2_1
:
SetValue
(
RESET_TURN_SET
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e2_1
)
Duel
.
BreakEffect
()
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
Draw
(
tc
:
GetOwner
(),
1
,
REASON_EFFECT
)
end
end
tc
=
lg
:
GetNext
()
end
end
--
function
c1152004
.
tfilter2
(
c
,
e
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsFaceup
()
and
not
c
:
IsImmuneToEffect
(
e
)
and
not
c
:
IsCode
(
1152999
)
end
function
c1152004
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152004
.
tfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
2
,
nil
,
e
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_GRAVE
)
end
--
function
c1152004
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c1152004
.
tfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
,
e
)
if
g
and
g
:
GetCount
()
>
0
and
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
--
\ No newline at end of file
expansions/script/c1152005.lua
0 → 100644
View file @
1c7adf8b
--七色之翼·芙兰朵露
function
c1152005
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_GRAVE
+
LOCATION_HAND
)
e1
:
SetCondition
(
c1152005
.
con1
)
e1
:
SetTarget
(
c1152005
.
tg1
)
e1
:
SetOperation
(
c1152005
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetTarget
(
c1152005
.
tg2
)
e2
:
SetOperation
(
c1152005
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
c1152005
.
named_with_Fulan
=
1
function
c1152005
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152005
.
named_with_Fulsp
=
1
function
c1152005
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152005
.
cfilter1
(
c
)
return
c
:
IsCode
(
1152999
)
and
c
:
IsFaceup
()
end
function
c1152005
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c1152005
.
cfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
--
function
c1152005
.
tfilter1_1
(
c
,
e
)
return
c
:
IsDestructable
()
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsFaceup
()
and
not
c
:
IsImmuneToEffect
(
e
)
and
not
c
:
IsCode
(
1152999
)
end
function
c1152005
.
tfilter1_2
(
c
)
return
c
:
IsDestructable
()
end
function
c1152005
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1152005
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
e
)
and
Duel
.
IsExistingTarget
(
c1152005
.
tfilter1_2
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c1152005
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
e
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPPO
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c1152005
.
tfilter1_2
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
HintSelection
(
g1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
1
,
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
)
end
--
function
c1152005
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
if
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_GRAVE
)
then
local
e1_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x47e0000
)
e1_1
:
SetValue
(
LOCATION_REMOVED
)
e
:
GetHandler
():
RegisterEffect
(
e1_1
,
true
)
end
end
end
end
end
--
function
c1152005
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
end
--
function
c1152005
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152005
,
0
))
then
local
c
=
e
:
GetHandler
()
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e2_1
=
Effect
.
CreateEffect
(
c
)
e2_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e2_1
:
SetValue
(
TYPE_TRAP
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e2_1
,
true
)
end
end
\ No newline at end of file
expansions/script/c1152007.lua
0 → 100644
View file @
1c7adf8b
--魔法少女·芙兰朵露
function
c1152007
.
initial_effect
(
c
)
--
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_FIEND
),
4
,
2
)
c
:
EnableReviveLimit
()
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c1152007
.
con1
)
e1
:
SetCost
(
c1152007
.
cost1
)
e1
:
SetTarget
(
c1152007
.
tg1
)
e1
:
SetOperation
(
c1152007
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetTarget
(
c1152007
.
tg2
)
e2
:
SetOperation
(
c1152007
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
c1152007
.
named_with_Fulan
=
1
function
c1152007
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152007
.
named_with_Fulsp
=
1
function
c1152007
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152007
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_XYZ
end
--
function
c1152007
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
--
function
c1152007
.
tfilter1_1
(
c
)
return
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c
:
IsAbleToRemove
()
and
bit
.
band
(
c
:
GetReason
(),
REASON_DESTROY
)
~=
0
end
function
c1152007
.
tfilter1_2
(
c
)
return
c
:
IsDestructable
()
and
c
:
IsAbleToRemove
()
end
function
c1152007
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMatchingGroupCount
(
c1152007
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
>
0
and
Duel
.
GetMatchingGroupCount
(
c1152007
.
tfilter1_2
,
tp
,
0
,
LOCATION_EXTRA
,
nil
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
1
-
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
--
function
c1152007
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152007
.
tfilter1_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
and
g
:
GetCount
()
>
0
and
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_EXTRA
)
if
g2
and
g2
:
GetCount
()
>
0
then
local
sg
=
g2
:
RandomSelect
(
tp
,
1
)
if
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
~=
0
then
Duel
.
Remove
(
sg
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
end
end
--
function
c1152007
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
end
--
function
c1152007
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152007
,
0
))
then
local
c
=
e
:
GetHandler
()
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_CONTINUOUS
)
c
:
RegisterEffect
(
e1
)
end
end
\ No newline at end of file
expansions/script/c1152101.lua
0 → 100644
View file @
1c7adf8b
--芙兰朵露·斯卡蕾特
function
c1152101
.
initial_effect
(
c
)
--
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
c1152101
.
matfilter
),
1
)
c
:
EnableReviveLimit
()
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_ATTACK_COST
)
e1
:
SetCost
(
c1152101
.
cost1
)
e1
:
SetOperation
(
c1152101
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetCondition
(
c1152101
.
con4
)
e4
:
SetTarget
(
c1152101
.
tg4
)
e4
:
SetOperation
(
c1152101
.
op4
)
c
:
RegisterEffect
(
e4
)
end
--
c1152101
.
named_with_Fulan
=
1
function
c1152101
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
function
c1152101
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulsp
end
function
c1152101
.
matfilter
(
c
)
return
c1152101
.
IsFulan
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
--
function
c1152101
.
cfilter1
(
c
)
return
c
:
IsAbleToGraveAsCost
()
end
function
c1152101
.
cost1
(
e
,
c
,
tp
)
return
Duel
.
IsExistingMatchingCard
(
c1152101
.
cfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
--
function
c1152101
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152101
.
cfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
--
function
c1152101
.
con4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_EFFECT
)
end
--
function
c1152101
.
tg4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
3
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
1152990
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
4
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
4
,
0
,
0
)
end
--
function
c1152101
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
3
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
1152990
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
then
for
i
=
1
,
4
do
local
token
=
Duel
.
CreateToken
(
tp
,
1152990
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
Duel
.
SpecialSummonComplete
()
end
end
--
expansions/script/c1152201.lua
0 → 100644
View file @
1c7adf8b
--禁忌『莱瓦汀』
function
c1152201
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetOperation
(
c1152201
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_EQUIP
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCondition
(
c1152201
.
con2
)
e2
:
SetTarget
(
c1152201
.
tg2
)
e2
:
SetOperation
(
c1152201
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_EQUIP
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetOperation
(
c1152201
.
op3
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_EQUIP_LIMIT
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e4
:
SetValue
(
c1152201
.
limit4
)
c
:
RegisterEffect
(
e4
)
--
end
--
function
c1152201
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152201
.
named_with_Fulsp
=
1
function
c1152201
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152201
.
ofilter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c1152201
.
IsFulan
(
c
)
end
function
c1152201
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
num
=
0
local
seq
=
0
local
sg
=
Group
.
CreateGroup
()
if
(
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
>
0
or
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_SZONE
)
>
0
)
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_ONFIELD
)
>
0
then
num
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
1152201
,
0
),
aux
.
Stringid
(
1152201
,
1
))
if
num
==
0
then
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
else
seq
=
Duel
.
SelectDisableField
(
tp
,
1
,
0
,
LOCATION_ONFIELD
,
0
)
end
else
if
(
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
>
0
or
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_SZONE
)
>
0
)
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_ONFIELD
)
==
0
then
seq
=
Duel
.
SelectDisableField
(
tp
,
1
,
0
,
LOCATION_ONFIELD
,
0
)
else
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
end
end
if
sg
:
GetCount
()
>
0
then
local
tc
=
sg
:
GetFirst
()
seq
=
tc
:
GetSequence
()
seq
=
seq
+
16
if
tc
:
IsLocation
(
LOCATION_SZONE
)
then
seq
=
bit
.
lshift
(
0x100
,
seq
)
else
seq
=
bit
.
lshift
(
0x1
,
seq
)
end
end
-- Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(1152201,))
local
e1_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1_1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1_1
:
SetCountLimit
(
1
)
e1_1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
e1_1
:
SetLabel
(
seq
)
e1_1
:
SetCondition
(
c1152201
.
con1_1
)
e1_1
:
SetOperation
(
c1152201
.
op1_1
)
Duel
.
RegisterEffect
(
e1_1
,
tp
)
local
g
=
Duel
.
GetMatchingGroupCount
(
c1152201
.
ofilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
if
g
>
0
then
e
:
GetHandler
():
CancelToGrave
()
end
end
function
c1152201
.
con1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c1152201
.
op1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
seq
=
e
:
GetLabel
()
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
sg
:
GetCount
()
>
0
then
local
tc
=
sg
:
GetFirst
()
while
tc
do
seq2
=
tc
:
GetSequence
()
seq2
=
seq2
+
16
if
tc
:
IsLocation
(
LOCATION_SZONE
)
then
seq2
=
bit
.
lshift
(
0x100
,
seq2
)
else
seq2
=
bit
.
lshift
(
0x1
,
seq2
)
end
if
seq
==
seq2
then
Duel
.
Hint
(
HINT_CARD
,
0
,
1152201
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
tc
=
sg
:
GetNext
()
end
end
end
--
function
c1152201
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
end
--
function
c1152201
.
tfilter2
(
c
)
return
c
:
IsFaceup
()
and
c1152201
.
IsFulan
(
c
)
end
function
c1152201
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c1152201
.
tfilter2
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c1152201
.
tfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
SelectTarget
(
tp
,
c1152201
.
tfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
--
function
c1152201
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
e2_1
=
Effect
.
CreateEffect
(
c
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e2_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2_1
:
SetValue
(
TYPE_EQUIP
+
TYPE_SPELL
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e2_1
,
true
)
Duel
.
Equip
(
tp
,
c
,
tc
,
true
)
local
e2_2
=
Effect
.
CreateEffect
(
c
)
e2_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_2
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e2_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2_2
:
SetReset
(
RESET_EVENT
+
0x47e0000
)
e2_2
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e2_2
,
true
)
end
end
end
--
function
c1152201
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
GetFirst
()
~=
e
:
GetHandler
()
then
return
end
local
tc
=
e
:
GetHandler
():
GetEquipTarget
()
if
tc
then
local
e3_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3_1
:
SetCategory
(
CATEGORY_HANDES
)
e3_1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3_1
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e3_1
:
SetCountLimit
(
1
)
e3_1
:
SetLabelObject
(
e
:
GetHandler
())
e3_1
:
SetCondition
(
c1152201
.
con3_1
)
e3_1
:
SetTarget
(
c1152201
.
tg3_1
)
e3_1
:
SetOperation
(
c1152201
.
op3_1
)
tc
:
RegisterEffect
(
e3_1
)
if
e3_1
:
GetHandler
()
==
nil
then
return
end
local
e3_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3_2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3_2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3_2
:
SetValue
(
495
)
e3_2
:
SetLabelObject
(
e
:
GetHandler
())
e3_2
:
SetCondition
(
c1152201
.
con3_2
)
tc
:
RegisterEffect
(
e3_2
)
end
end
--
function
c1152201
.
con3_1
(
e
)
local
g
=
e
:
GetHandler
():
GetEquipGroup
()
if
g
:
IsContains
(
e
:
GetLabelObject
())
then
return
not
e
:
GetLabelObject
():
IsDisabled
()
else
return
false
end
end
--
function
c1152201
.
tg3_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
+
CATEGORY_REMOVE
,
nil
,
1
,
1
-
tp
,
LOCATION_EXTRA
)
end
--
function
c1152201
.
op3_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetFieldGroup
(
ep
,
LOCATION_EXTRA
,
0
,
nil
)
local
sg
=
g
:
RandomSelect
(
ep
,
1
)
if
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
~=
0
then
Duel
.
Remove
(
sg
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
end
--
function
c1152201
.
con3_2
(
e
)
local
g
=
e
:
GetHandler
():
GetEquipGroup
()
if
g
:
IsContains
(
e
:
GetLabelObject
())
then
return
not
e
:
GetLabelObject
():
IsDisabled
()
else
return
false
end
end
--
function
c1152201
.
limit4
(
e
,
c
)
return
c1152201
.
IsFulan
(
c
)
end
--
expansions/script/c1152203.lua
0 → 100644
View file @
1c7adf8b
--禁弹『星弧破碎』
function
c1152203
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c1152203
.
tg1
)
e1
:
SetOperation
(
c1152203
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
c1152203
.
con2
)
e2
:
SetCost
(
c1152203
.
cost2
)
e2
:
SetTarget
(
c1152203
.
tg2
)
e2
:
SetOperation
(
c1152203
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1152203
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152203
.
named_with_Fulsp
=
1
function
c1152203
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulsp
end
--
function
c1152203
.
tfilter1
(
c
)
return
c
:
IsDestructable
()
end
function
c1152203
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
0
,
LOCATION_DECK
)
end
--
function
c1152203
.
ofilter1
(
c
,
code
)
return
c
:
GetOriginalCode
()
==
code
and
c
:
IsAbleToHand
()
end
function
c1152203
.
ofilter1_2
(
c
)
return
c
:
GetOriginalCode
()
==
1152999
end
function
c1152203
.
ofilter1_3
(
c
)
return
c1152203
.
IsFulan
(
c
)
and
c
:
IsFaceup
()
and
c
:
IsAttackPos
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1152203
.
ofilter1_4
(
c
)
return
c
:
IsDestructable
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1152203
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
if
ct
==
0
then
return
end
local
ac
=
1
if
ct
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
1152203
,
5
))
if
ct
==
2
then
ac
=
Duel
.
AnnounceNumber
(
tp
,
1
,
2
)
else
if
ct
==
3
then
ac
=
Duel
.
AnnounceNumber
(
tp
,
1
,
2
,
3
)
else
ac
=
Duel
.
AnnounceNumber
(
tp
,
1
,
2
,
3
,
4
)
end
end
end
Duel
.
ConfirmDecktop
(
tp
,
ac
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
ac
)
if
g
:
IsExists
(
c1152203
.
ofilter1_2
,
1
,
nil
)
then
if
Duel
.
IsExistingMatchingCard
(
c1152203
.
ofilter1_3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152203
,
1
))
then
local
i
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
1152212
,
2
),
aux
.
Stringid
(
1152212
,
3
))
if
i
==
0
then
if
Duel
.
IsExistingMatchingCard
(
c1152003
.
ofilter1_4
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
then
local
g4
=
Duel
.
GetMatchingGroup
(
c1152003
.
ofilter1_4
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
Duel
.
Destroy
(
g4
,
REASON_EFFECT
)
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPPO
)
local
g5
=
Duel
.
SelectMatchingCard
(
tp
,
c1152203
.
ofilter1_3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
local
tc5
=
g5
:
GetFirst
()
local
g6
=
Duel
.
GetMatchingGroup
(
c1152003
.
ofilter1_4
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
tc5
)
if
g6
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g6
,
REASON_EFFECT
)
end
end
else
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152203
,
4
))
then
local
g7
=
Duel
.
GetMatchingGroup
(
c1152003
.
ofilter1_4
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
if
g7
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g7
,
REASON_EFFECT
)
end
end
end
end
if
g
:
IsExists
(
c1152203
.
tfilter1
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
sg
=
g
:
FilterSelect
(
tp
,
c1152203
.
tfilter1
,
1
,
1
,
nil
)
if
sg
:
GetCount
()
>
0
then
local
tc
=
sg
:
GetFirst
()
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
and
c1152203
.
IsFulsp
(
tc
)
and
(
tc
:
IsType
(
TYPE_SPELL
)
or
tc
:
IsType
(
TYPE_TRAP
))
then
local
code
=
tc
:
GetOriginalCode
()
if
Duel
.
IsExistingMatchingCard
(
c1152203
.
ofilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
code
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152203
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1152203
.
ofilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
code
)
if
g2
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g2
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g2
)
end
end
end
end
end
end
--
function
c1152203
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
rp
~=
tp
end
--
function
c1152203
.
cfilter2
(
c
)
return
c
:
IsAbleToRemoveAsCost
()
and
c1152203
.
IsFulsp
(
c
)
and
bit
.
band
(
c
:
GetReason
(),
REASON_DESTROY
)
~=
0
end
function
c1152203
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152203
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
and
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152203
.
cfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
end
--
function
c1152203
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
0
,
0
)
end
--
function
c1152203
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
--
expansions/script/c1152205.lua
0 → 100644
View file @
1c7adf8b
--禁弹『折反射』
function
c1152205
.
initial_effect
(
c
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCondition
(
c1152205
.
con2
)
e2
:
SetOperation
(
c1152205
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TODECK
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_REMOVE
)
e1
:
SetTarget
(
c1152205
.
tg1
)
e1
:
SetOperation
(
c1152205
.
op1
)
c
:
RegisterEffect
(
e1
)
--
end
--
function
c1152205
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152205
.
named_with_Fulsp
=
1
function
c1152205
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152205
.
tfilter1_1
(
c
)
return
c1152205
.
IsFulsp
(
c
)
and
c
:
IsDestructable
()
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
end
function
c1152205
.
tfilter1_2
(
c
)
return
c1152205
.
IsFulsp
(
c
)
and
c
:
IsAbleToDeck
()
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
end
function
c1152205
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152205
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c1152212
.
tfilter1_2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
end
--
function
c1152205
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152205
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
if
g
and
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
local
e1_1
=
Effect
.
CreateEffect
(
tc
)
e1_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1_1SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1_1
:
SetCountLimit
(
1
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1_1
:
SetRange
(
LOCATION_GRAVE
)
e1_1
:
SetOperation
(
c1152205
.
op1_1
)
tc
:
RegisterEffect
(
e1_1
,
true
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1152205
.
tfilter1_2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
3
,
nil
)
if
g2
and
g2
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g2
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
--
function
c1152205
.
op1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
if
c
:
IsType
(
TYPE_MONSTER
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
else
if
(
c
:
IsType
(
TYPE_FIELD
)
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
)
and
c
:
IsSSetable
()
then
Duel
.
SSet
(
tp
,
c
)
Duel
.
ConfirmCards
(
1
-
tp
,
c
)
end
end
end
end
--
function
c1152205
.
cfilter2
(
c
)
return
c
:
IsFaceup
()
and
c1152205
.
IsFulan
(
c
)
end
function
c1152205
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c1152205
.
cfilter2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
--
function
c1152205
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2_1
:
SetCode
(
EVENT_CHAINING
)
e2_1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2_1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
e2_1
:
SetOperation
(
c1152205
.
op2_1
)
Duel
.
RegisterEffect
(
e2_1
,
tp
)
end
function
c1152205
.
ofilter2_1
(
c
,
tp
)
return
c
:
GetControler
()
~=
tp
end
function
c1152205
.
ofilter2_2
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c1152205
.
ofilter2_3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c
:
GetAttack
()
==
0
end
function
c1152205
.
op2_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
c1152205
.
ofilter2_1
,
nil
,
tp
)
if
g
:
GetCount
()
~=
0
then
local
g2
=
Duel
.
GetMatchingGroup
(
c1152205
.
ofilter2_2
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
g2
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_CARD
,
0
,
1152205
)
local
num
=
g2
:
GetCount
()
local
hert
=
num
*
200
if
Duel
.
SelectYesNo
(
1
-
tp
,
aux
.
Stringid
(
1152205
,
0
))
then
local
tc
=
g2
:
GetFirst
()
while
tc
do
local
e2_1_1
=
Effect
.
CreateEffect
(
tc
)
e2_1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1_1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2_1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2_1_1
:
SetValue
(
-
hert
)
tc
:
RegisterEffect
(
e2_1_1
)
tc
=
g2
:
GetNext
()
end
else
Duel
.
Damage
(
1
-
tp
,
hert
,
REASON_EFFECT
)
end
local
g3
=
Duel
.
GetMatchingGroup
(
c1152205
.
ofilter2_3
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
g3
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g3
,
REASON_EFFECT
)
end
end
end
end
--
expansions/script/c1152207.lua
0 → 100644
View file @
1c7adf8b
--禁弹『刻着过去的钟表』
function
c1152207
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c1152207
.
con1
)
e1
:
SetCost
(
c1152207
.
cost1
)
e1
:
SetTarget
(
c1152207
.
tg1
)
e1
:
SetOperation
(
c1152207
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCondition
(
c1152207
.
con2
)
e2
:
SetCost
(
c1152207
.
cost2
)
e2
:
SetTarget
(
c1152207
.
tg2
)
e2
:
SetOperation
(
c1152207
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1152207
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152207
.
named_with_Fulsp
=
1
function
c1152207
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152207
.
cfilter1
(
c
)
return
c
:
IsFaceup
()
and
c1152207
.
IsFulan
(
c
)
end
function
c1152207
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c1152207
.
cfilter1
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
GetFlagEffect
(
tp
,
1152206
)
==
0
end
--
function
c1152207
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
GetOriginalCode
()
==
1152207
then
Duel
.
RegisterFlagEffect
(
tp
,
1152207
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
--
function
c1152207
.
tfilter1
(
c
)
return
c1152207
.
IsFulsp
(
c
)
and
not
c
:
IsCode
(
1152207
)
and
c
:
CheckActivateEffect
(
true
,
true
,
false
)
~=
nil
end
function
c1152207
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
local
te
=
e
:
GetLabelObject
()
local
tg
=
te
:
GetTarget
()
return
tg
and
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
,
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1152207
.
tfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e
:
SetCategory
(
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1152207
.
tfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
te
=
g
:
GetFirst
():
CheckActivateEffect
(
true
,
true
,
false
)
Duel
.
ClearTargetCard
()
e
:
SetCategory
(
te
:
GetCategory
())
e
:
SetProperty
(
te
:
GetProperty
())
e
:
SetLabel
(
te
:
GetLabel
())
e
:
SetLabelObject
(
te
:
GetLabelObject
())
local
tg
=
te
:
GetTarget
()
if
tg
then
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
te
:
SetLabel
(
e
:
GetLabel
())
te
:
SetLabelObject
(
e
:
GetLabelObject
())
e
:
SetLabelObject
(
te
)
end
--
function
c1152207
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
e
:
GetLabelObject
()
if
te
:
GetHandler
():
IsRelateToEffect
(
e
)
then
e
:
SetLabel
(
te
:
GetLabel
())
e
:
SetLabelObject
(
te
:
GetLabelObject
())
local
op
=
te
:
GetOperation
()
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
te
:
SetLabel
(
e
:
GetLabel
())
te
:
SetLabelObject
(
e
:
GetLabelObject
())
end
e
:
GetHandler
():
CancelToGrave
()
end
--
function
c1152207
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
Duel
.
GetFlagEffect
(
tp
,
1152207
)
==
0
end
--
function
c1152207
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
GetOriginalCode
()
==
1152207
then
Duel
.
RegisterFlagEffect
(
tp
,
1152206
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
--
function
c1152207
.
tfilter2
(
c
)
return
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c
:
IsSSetable
()
and
bit
.
band
(
c
:
GetReason
(),
REASON_DESTROY
)
~=
0
end
function
c1152207
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c1152207
.
tfilter2
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
GetMatchingGroupCount
(
c1152207
.
tfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
e
:
GetHandler
())
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1152207
.
tfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
--
function
c1152207
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
then
Duel
.
SSet
(
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
--
\ No newline at end of file
expansions/script/c1152208.lua
0 → 100644
View file @
1c7adf8b
--秘弹『之后就一个人都没有了吗?』
function
c1152208
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c1152208
.
con1
)
e1
:
SetTarget
(
c1152208
.
tg1
)
e1
:
SetOperation
(
c1152208
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
+
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
c1152208
.
con2
)
e2
:
SetCost
(
c1152208
.
cost2
)
e2
:
SetTarget
(
c1152208
.
tg2
)
e2
:
SetOperation
(
c1152208
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1152208
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152208
.
named_with_Fulsp
=
1
function
c1152208
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152208
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
and
Duel
.
GetCurrentPhase
()
==
PHASE_STANDBY
end
--
function
c1152208
.
tfilter1
(
c
)
return
c1152208
.
IsFulan
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemove
()
end
function
c1152208
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsControler
(
tp
)
and
c1152208
.
tfilter1
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1152208
.
tfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1152208
.
tfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
1
,
0
,
0
)
end
--
function
c1152208
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
tc
,
0
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
then
tc
:
RegisterFlagEffect
(
1152208
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
local
e1_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1_1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1_1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1_1
:
SetLabelObject
(
tc
)
e1_1
:
SetCountLimit
(
1
)
e1_1
:
SetCondition
(
c1152208
.
con1_1
)
e1_1
:
SetOperation
(
c1152208
.
op1_1
)
Duel
.
RegisterEffect
(
e1_1
,
tp
)
end
end
--
function
c1152208
.
con1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetFlagEffect
(
1152208
)
~=
0
end
function
c1152208
.
ofilter1_1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1152208
.
op1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
gn
=
Duel
.
GetMatchingGroup
(
c1152208
.
ofilter1_1
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
if
gn
:
GetCount
()
==
0
then
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
c1152208
.
ofilter1_1
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
num
=
0
if
g
:
GetCount
()
>
0
then
if
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
==
g
:
GetCount
()
then
if
Duel
.
ReturnToField
(
e
:
GetLabelObject
())
then
num
=
1
end
end
else
if
Duel
.
ReturnToField
(
e
:
GetLabelObject
())
then
num
=
1
end
end
if
num
==
1
then
local
e1_1_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_1_1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1_1_1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1_1_1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1_1_1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_SELF_TURN
)
e1_1_1
:
SetTargetRange
(
1
,
0
)
e1_1_1
:
SetTarget
(
c1152208
.
limit1_1_1
)
Duel
.
RegisterEffect
(
e1_1_1
,
tp
)
end
end
end
function
c1152208
.
limit1_1_1
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
c
:
IsLocation
(
LOCATION_EXTRA
)
and
not
c
:
IsType
(
TYPE_LINK
)
end
--
function
c1152208
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
end
--
function
c1152208
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
--
function
c1152208
.
tfilter2
(
c
)
return
c
:
IsAbleToDeck
()
and
c1152208
.
IsFulan
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1152208
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152208
.
tfilter2
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
1152990
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
--
function
c1152208
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152208
.
tfilter2
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
~=
0
then
local
token
=
Duel
.
CreateToken
(
tp
,
1152990
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummonComplete
()
end
end
expansions/script/c1152209.lua
0 → 100644
View file @
1c7adf8b
--QED『495年的波纹』
function
c1152209
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c1152209
.
con1
)
e1
:
SetTarget
(
c1152209
.
tg1
)
e1
:
SetOperation
(
c1152209
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetTarget
(
c1152209
.
tg2
)
e2
:
SetOperation
(
c1152209
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1152209
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152209
.
named_with_Fulsp
=
1
function
c1152209
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152209
.
cfilter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c1152209
.
IsFulan
(
c
)
end
function
c1152209
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
Duel
.
IsExistingMatchingCard
(
c1152209
.
cfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
--
function
c1152209
.
tfilter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c1152209
.
IsFulan
(
c
)
and
c
:
IsAbleToHand
()
end
function
c1152209
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152209
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
LOCATION_DECK
)
end
--
function
c1152209
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
1
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c1152209
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
dcount
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
local
seq
=-
1
local
tc
=
g
:
GetFirst
()
local
spcard
=
nil
while
tc
do
if
tc
:
GetSequence
()
>
seq
then
seq
=
tc
:
GetSequence
()
spcard
=
tc
end
tc
=
g
:
GetNext
()
end
if
seq
==-
1
then
Duel
.
ConfirmDecktop
(
tp
,
dcount
)
Duel
.
ShuffleDeck
(
tp
)
return
end
Duel
.
ConfirmDecktop
(
tp
,
dcount
-
seq
)
if
spcard
:
IsAbleToHand
()
then
Duel
.
DisableShuffleCheck
()
if
dcount
-
seq
==
1
then
Duel
.
SendtoHand
(
spcard
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
spcard
)
Duel
.
ShuffleHand
(
tp
)
else
local
gn
=
Duel
.
GetDecktopGroup
(
tp
,
dcount
-
seq
-
1
)
local
gr
=
Group
.
CreateGroup
()
Duel
.
SendtoHand
(
spcard
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
spcard
)
if
gn
:
GetCount
()
>
0
then
local
tc
=
gn
:
GetFirst
()
while
tc
do
if
tc
:
IsType
(
TYPE_MONSTER
)
then
gr
:
AddCard
(
tc
)
end
tc
=
gn
:
GetNext
()
end
if
gr
:
GetCount
()
>
0
then
Duel
.
Remove
(
gr
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleHand
(
tp
)
end
else
local
gn
=
Duel
.
GetDecktopGroup
(
tp
,
dcount
-
seq
-
1
)
local
gr
=
Group
.
CreateGroup
()
if
gn
:
GetCount
()
>
0
then
local
tc
=
gn
:
GetFirst
()
while
tc
do
if
tc
:
IsType
(
TYPE_MONSTER
)
then
gr
:
AddCard
(
tc
)
end
tc
=
gn
:
GetNext
()
end
if
gr
:
GetCount
()
>
0
then
Duel
.
Remove
(
gr
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
Duel
.
ShuffleDeck
(
tp
)
Duel
.
ShuffleHand
(
tp
)
end
end
--
function
c1152209
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
e
:
SetLabelObject
(
rc
)
local
loc
,
np
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_CONTROLER
)
if
chk
==
0
then
return
loc
==
LOCATION_MZONE
and
np
==
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
and
c1152209
.
IsFulan
(
rc
)
end
return
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152209
,
0
))
end
--
function
c1152209
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
local
rc
=
e
:
GetLabelObject
()
local
e2_1
=
Effect
.
CreateEffect
(
rc
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2_1
:
SetRange
(
LOCATION_MZONE
)
e2_1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2_1
:
SetValue
(
c1152209
.
efilter2_1
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_CHAIN
)
rc
:
RegisterEffect
(
e2_1
)
end
function
c1152209
.
efilter2_1
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
--
\ No newline at end of file
expansions/script/c1152210.lua
0 → 100644
View file @
1c7adf8b
--禁忌『禁忌的游戏』
function
c1152210
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c1152210
.
tg1
)
e1
:
SetOperation
(
c1152210
.
op1
)
c
:
RegisterEffect
(
e1
)
--
end
--
function
c1152210
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152210
.
named_with_Fulsp
=
1
function
c1152210
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152210
.
tfilter1
(
c
)
return
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c1152210
.
IsFulsp
(
c
)
end
function
c1152210
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152210
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
0
end
end
--
function
c1152210
.
ofilter1
(
c
)
return
c1152210
.
IsFulan
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1152210
.
ofilter1_2
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsDestructable
()
and
c
:
IsFaceup
()
end
function
c1152210
.
ofilter1_3
(
c
)
return
c
:
IsDestructable
()
end
function
c1152210
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
1
then
return
end
local
num
=
0
local
g
=
Duel
.
GetMatchingGroup
(
c1152210
.
tfilter1
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
dcount
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
local
seq
=-
1
local
tc
=
g
:
GetFirst
()
local
spcard
=
nil
while
tc
do
if
tc
:
GetSequence
()
>
seq
then
seq
=
tc
:
GetSequence
()
spcard
=
tc
end
tc
=
g
:
GetNext
()
end
if
seq
==-
1
then
Duel
.
ConfirmDecktop
(
tp
,
dcount
)
Duel
.
ShuffleDeck
(
tp
)
return
end
Duel
.
ConfirmDecktop
(
tp
,
dcount
-
seq
)
local
gn
=
Duel
.
GetDecktopGroup
(
tp
,
dcount
-
seq
)
if
gn
:
GetCount
()
>
0
then
num
=
gn
:
FilterCount
(
c1152210
.
ofilter1
,
nil
)
end
if
Duel
.
IsExistingMatchingCard
(
c1152210
.
ofilter1_2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152210
,
0
))
then
local
i
=
Duel
.
GetMatchingGroupCount
(
c1152210
.
ofilter1_2
,
tp
,
LOCATION_ONFIELD
,
0
,
e
:
GetHandler
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c1152210
.
ofilter1_2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
i
,
e
:
GetHandler
())
if
g2
:
GetCount
()
>
0
then
local
num2
=
Duel
.
Destroy
(
g2
,
REASON_EFFECT
)
num
=
num
+
num2
end
end
if
num
>
0
and
Duel
.
IsExistingMatchingCard
(
c1152210
.
ofilter1_3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152210
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g3
=
Duel
.
SelectMatchingCard
(
tp
,
c1152210
.
ofilter1_3
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
num
,
nil
)
if
g3
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g3
,
REASON_EFFECT
)
end
end
e
:
GetHandler
():
CancelToGrave
()
if
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
then
local
e1_4
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_4
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1_4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_4
:
SetValue
(
TYPE_EQUIP
+
TYPE_SPELL
)
e1_4
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e1_4
,
true
)
local
e1_5
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1_5
:
SetCode
(
EVENT_DESTROYED
)
e1_5
:
SetReset
(
RESET_EVENT
+
0x01020000
)
e1_5
:
SetCondition
(
c1152210
.
con1_5
)
e1_5
:
SetTarget
(
c1152210
.
tg1_5
)
e1_5
:
SetOperation
(
c1152210
.
op1_5
)
e
:
GetHandler
():
RegisterEffect
(
e1_5
,
true
)
end
end
function
c1152210
.
con1_5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
function
c1152210
.
tg1_5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
tp
~=
rp
end
end
function
c1152210
.
ofilter1_5
(
c
)
return
c
:
IsAbleToHand
()
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c1152210
.
IsFulsp
(
c
)
and
not
c
:
IsCode
(
1152210
)
end
function
c1152210
.
op1_5
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
Duel
.
GetMatchingGroupCount
(
c1152210
.
ofilter1_5
,
tp
,
LOCATION_DECK
,
0
,
nil
)
>
0
then
Duel
.
Hint
(
HINT_CARD
,
0
,
1152210
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152210
.
ofilter1_5
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
expansions/script/c1152212.lua
0 → 100644
View file @
1c7adf8b
--禁忌『禁果』
function
c1152212
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_REMOVE
)
e1
:
SetTarget
(
c1152212
.
tg1
)
e1
:
SetOperation
(
c1152212
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCondition
(
c1152212
.
con2
)
e2
:
SetTarget
(
c1152212
.
tg2
)
e2
:
SetOperation
(
c1152212
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1152212
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152212
.
named_with_Fulsp
=
1
function
c1152212
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152212
.
tfilter1_1
(
c
)
return
c1152212
.
IsFulsp
(
c
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c
:
IsDestructable
()
end
function
c1152212
.
tfilter1_2
(
c
)
return
c1152212
.
IsFulsp
(
c
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c
:
IsAbleToRemove
()
and
bit
.
band
(
c
:
GetReason
(),
REASON_DESTROY
)
~=
0
end
function
c1152212
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
and
e
:
GetHandler
():
IsLocation
(
LOCATION_REMOVED
)
and
c
:
IsFaceup
()
and
(
Duel
.
IsExistingMatchingCard
(
c1152212
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
nil
)
or
Duel
.
IsExistingMatchingCard
(
c1152212
.
tfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
))
end
end
--
function
c1152212
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsExistingMatchingCard
(
c1152212
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c1152212
.
tfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
local
i
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
1152212
,
0
),
aux
.
Stringid
(
1152212
,
1
))
if
i
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152212
.
tfilter1_1
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152212
.
tfilter1_2
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
else
if
Duel
.
IsExistingMatchingCard
(
c1152212
.
tfilter1_1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
nil
)
and
not
Duel
.
IsExistingMatchingCard
(
c1152212
.
tfilter1_2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152212
.
tfilter1_1
,
tp
,
0
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
~=
0
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152212
.
tfilter1_2
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
Duel
.
SendtoHand
(
e
:
GetHandler
(),
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
end
end
end
--
function
c1152212
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
==
LOCATION_HAND
and
rp
~=
tp
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
--
function
c1152212
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
end
--
function
c1152212
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
aux
.
NULL
)
e
:
GetHandler
():
CancelToGrave
()
if
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
then
local
e2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e2_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2_1
:
SetValue
(
TYPE_EQUIP
+
TYPE_SPELL
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e2_1
,
true
)
local
e2_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2_2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2_2
:
SetCode
(
EVENT_CHAINING
)
e2_2
:
SetRange
(
LOCATION_SZONE
)
e2_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2_2
:
SetCondition
(
c1152212
.
con2_2
)
e2_2
:
SetTarget
(
c1152212
.
tg2_2
)
e2_2
:
SetOperation
(
c1152212
.
op2_2
)
e
:
GetHandler
():
RegisterEffect
(
e2_2
,
true
)
end
end
function
c1152212
.
con2_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetControler
()
==
Duel
.
GetTurnPlayer
()
and
rp
~=
tp
end
function
c1152212
.
tg2_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
end
function
c1152212
.
op2_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
aux
.
NULL
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
--
expansions/script/c1152301.lua
0 → 100644
View file @
1c7adf8b
--禁忌『红莓陷阱』
function
c1152301
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c1152301
.
con1
)
e1
:
SetTarget
(
c1152301
.
tg1
)
e1
:
SetOperation
(
c1152301
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_REMOVED
)
e2
:
SetCost
(
c1152301
.
cost2
)
e2
:
SetTarget
(
c1152301
.
tg2
)
e2
:
SetOperation
(
c1152301
.
op2
)
c
:
RegisterEffect
(
e2
)
--
end
--
function
c1152301
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
function
c1152301
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152301
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
re
:
IsActiveType
(
TYPE_SPELL
)
and
re
:
GetHandler
():
IsType
(
TYPE_QUICKPLAY
))
or
re
:
IsActiveType
(
TYPE_TRAP
)
end
--
function
c1152301
.
tfilter1
(
c
)
return
c
:
IsDestructable
()
end
function
c1152301
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152301
.
tfilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
--
function
c1152301
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
c1152301
.
op1_1
)
Duel
.
BreakEffect
()
if
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
~=
0
then
local
e1_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1_2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1_2
:
SetCountLimit
(
1
)
e1_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1_2
:
SetRange
(
LOCATION_GRAVE
)
e1_2
:
SetOperation
(
c1152301
.
op1_2
)
e
:
GetHandler
():
RegisterEffect
(
e1_2
)
end
end
function
c1152301
.
op1_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
1
-
tp
,
c1152301
.
tfilter1
,
1
-
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
if
c
:
IsType
(
TYPE_CONTINUOUS
)
then
c
:
CancelToGrave
()
end
end
function
c1152301
.
op1_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
not
e
:
GetHandler
():
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
local
e1_2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_2_1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1_2_1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1_2_1
:
SetValue
(
TYPE_CONTINUOUS
+
TYPE_TRAP
)
e1_2_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e1_2_1
,
true
)
Duel
.
MoveToField
(
e
:
GetHandler
(),
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
local
e1_2_2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_2_2
:
SetCategory
(
CATEGORY_DESTROY
)
e1_2_2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1_2_2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1_2_2
:
SetRange
(
LOCATION_SZONE
)
e1_2_2
:
SetCountLimit
(
1
)
e1_2_2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1_2_2
:
SetCondition
(
c1152301
.
con1_2_2
)
e1_2_2
:
SetTarget
(
c1152301
.
tg1_2_2
)
e1_2_2
:
SetOperation
(
c1152301
.
op1_2_2
)
e
:
GetHandler
():
RegisterEffect
(
e1_2_2
,
true
)
end
end
function
c1152301
.
con1_2_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetControler
()
==
Duel
.
GetTurnPlayer
()
end
function
c1152301
.
tfilter1_2_2
(
c
)
return
c
:
IsDestructable
()
end
function
c1152301
.
tg1_2_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1152301
.
tfilter1_2_2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
c1152301
.
tfilter1_2_2
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c1152301
.
tfilter1_2_2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPPO
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c1152301
.
tfilter1_2_2
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
HintSelection
(
g1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
1
,
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g2
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
end
function
c1152301
.
op1_2_2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
--
function
c1152301
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_COST
)
end
--
function
c1152301
.
tfilter2
(
c
)
return
true
end
function
c1152301
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsControler
(
tp
)
and
c1152301
.
tfilter2
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1152301
.
tfilter2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1152301
.
tfilter2
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
end
--
function
c1152301
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
e2_1
=
Effect
.
CreateEffect
(
tc
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2_1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2_1
:
SetRange
(
LOCATION_ONFIELD
)
e2_1
:
SetCode
(
EFFECT_SELF_DESTROY
)
e2_1
:
SetCondition
(
c1152301
.
con2_1
)
if
Duel
.
GetTurnPlayer
()
~=
tc
:
GetControler
()
and
Duel
.
GetCurrentPhase
()
==
PHASE_END
then
e2_1
:
SetLabel
(
Duel
.
GetTurnCount
())
e2_1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
2
)
else
e2_1
:
SetLabel
(
0
)
e2_1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
)
end
tc
:
RegisterEffect
(
e2_1
)
end
end
function
c1152301
.
con2
(
e
)
return
Duel
.
GetTurnPlayer
()
~=
tc
:
GetControler
()
and
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
and
Duel
.
GetCurrentPhase
()
==
PHASE_END
end
--
expansions/script/c1152303.lua
0 → 100644
View file @
1c7adf8b
--禁忌『四重存在』
function
c1152303
.
initial_effect
(
c
)
--
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetTarget
(
c1152303
.
tg
)
c
:
RegisterEffect
(
e0
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCost
(
c1152303
.
cost1
)
e1
:
SetCondition
(
c1152303
.
con1
)
e1
:
SetTarget
(
c1152303
.
tg1
)
e1
:
SetOperation
(
c1152303
.
op1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c1152303
.
con2
)
e2
:
SetCost
(
c1152303
.
cost1
)
e2
:
SetTarget
(
c1152303
.
tg1
)
e2
:
SetOperation
(
c1152303
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c1152303
.
con3
)
e3
:
SetTarget
(
c1152303
.
tg3
)
e3
:
SetOperation
(
c1152303
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1152303
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152303
.
named_with_Fulsp
=
1
function
c1152303
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152303
.
tfilter
(
c
,
e
,
tp
)
return
c1152303
.
IsFulan
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1152303
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
res
,
teg
,
tep
,
tev
,
tre
,
tr
,
trp
=
Duel
.
CheckEvent
(
EVENT_CHAINING
,
true
)
if
res
and
c1152303
.
con1
(
e
,
tp
,
teg
,
tep
,
tev
,
tre
,
tr
,
trp
)
and
Duel
.
IsExistingMatchingCard
(
c1152303
.
tfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
94
)
and
Duel
.
GetFlagEffect
(
tp
,
1152206
)
<
3
then
Duel
.
RegisterFlagEffect
(
tp
,
1152303
,
0
,
0
,
0
)
e
:
SetOperation
(
c1152303
.
op1
)
else
e
:
SetOperation
(
nil
)
end
local
res2
,
teg2
,
tep2
,
tev2
,
tre2
,
tr2
,
trp2
=
Duel
.
CheckEvent
(
EVENT_BE_BATTLE_TARGET
,
true
)
if
res2
and
c1152303
.
con2
(
e
,
tp
,
teg
,
tep
,
tev
,
tre
,
tr
,
trp
)
and
Duel
.
IsExistingMatchingCard
(
c1152303
.
tfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
94
)
and
Duel
.
GetFlagEffect
(
tp
,
1152206
)
<
3
then
Duel
.
RegisterFlagEffect
(
tp
,
1152303
,
0
,
0
,
0
)
e
:
SetOperation
(
c1152303
.
op2
)
else
e
:
SetOperation
(
nil
)
end
end
--
function
c1152303
.
cfilter1
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c1152303
.
IsFulan
(
c
)
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
end
function
c1152303
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsExists
(
c1152303
.
cfilter1
,
1
,
nil
,
tp
)
end
--
function
c1152303
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
at
=
Duel
.
GetAttackTarget
()
return
at
:
IsControler
(
tp
)
and
at
:
IsFaceup
()
and
c1152303
.
IsFulan
(
at
)
and
at
:
IsType
(
TYPE_MONSTER
)
end
--
function
c1152303
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
GetOriginalCode
()
==
1152303
then
Duel
.
RegisterFlagEffect
(
tp
,
1152303
,
0
,
0
,
0
)
end
end
--
function
c1152303
.
tfilter1
(
c
,
e
,
tp
)
return
c1152303
.
IsFulan
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c1152303
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152303
.
tfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
GetFlagEffect
(
tp
,
1152206
)
<
3
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
)
end
--
function
c1152303
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152303
.
tfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
tf
=
re
:
GetTarget
()
local
res
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
=
Duel
.
CheckEvent
(
re
:
GetCode
(),
true
)
if
tf
(
re
,
rp
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
,
0
,
g
:
GetFirst
())
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152303
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
ChangeTargetCard
(
ev
,
Group
.
FromCards
(
g
:
GetFirst
()))
end
end
end
end
--
function
c1152303
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152303
.
tfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
if
not
Duel
.
GetAttacker
():
IsImmuneToEffect
(
e
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152303
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
ChangeAttackTarget
(
g
:
GetFirst
())
end
end
end
end
--
function
c1152303
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
end
--
function
c1152303
.
tfilter3
(
c
)
return
c1152303
.
IsFulan
(
c
)
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c1152303
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
chkc
:
IsControler
(
tp
)
and
c1152303
.
tfilter3
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152303
.
tfilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SELF
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c1152303
.
tfilter3
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
end
--
function
c1152303
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
local
e3_1
=
Effect
.
CreateEffect
(
tc
)
e3_1
:
SetDescription
(
aux
.
Stringid
(
1152303
,
2
))
e3_1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e3_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3_1
:
SetCode
(
EVENT_CHAINING
)
e3_1
:
SetRange
(
LOCATION_MZONE
)
e3_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e3_1
:
SetTarget
(
c1152303
.
tg3_1
)
e3_1
:
SetOperation
(
c1152303
.
op3_1
)
tc
:
RegisterEffect
(
e3_1
)
end
end
function
c1152303
.
tg3_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
local
i
=
0
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
tg
and
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
while
tc
do
if
tc
==
e
:
GetHandler
()
then
i
=
1
end
tc
=
tg
:
GetNext
()
end
end
if
chk
==
0
then
return
i
==
0
end
end
function
c1152303
.
op3_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
r1
,
r2
=
Duel
.
TossCoin
(
tp
,
2
)
if
r1
+
r2
~=
0
then
local
tc
=
re
:
GetHandler
()
local
num
=
tc
:
GetCode
()
local
e3_1_1
=
Effect
.
CreateEffect
(
c
)
e3_1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3_1_1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3_1_1
:
SetRange
(
LOCATION_MZONE
)
e3_1_1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3_1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_CHAIN
)
e3_1_1
:
SetLabel
(
num
)
e3_1_1
:
SetValue
(
c1152303
.
efilter3_1_1
)
c
:
RegisterEffect
(
e3_1_1
)
end
end
function
c1152303
.
efilter3_1_1
(
e
,
re
)
local
num
=
e
:
GetLabel
()
return
re
:
GetHandler
():
GetCode
()
==
num
end
--
\ No newline at end of file
expansions/script/c1152304.lua
0 → 100644
View file @
1c7adf8b
--禁忌『笼女游戏』
function
c1152304
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c1152304
.
con1
)
e1
:
SetTarget
(
c1152304
.
tg1
)
e1
:
SetOperation
(
c1152304
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_DESTROYED
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
1152304
)
e2
:
SetCondition
(
c1152304
.
con2
)
e2
:
SetCost
(
c1152304
.
cost2
)
e2
:
SetTarget
(
c1152304
.
tg2
)
e2
:
SetOperation
(
c1152304
.
op2
)
c
:
RegisterEffect
(
e2
)
end
--
function
c1152304
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152304
.
named_with_Fulsp
=
1
function
c1152304
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152304
.
cfilter1
(
c
)
return
c1152304
.
IsFulan
(
c
)
and
c
:
IsFaceup
()
end
function
c1152304
.
con1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
tg
:
IsExists
(
c1152304
.
cfilter1
,
1
,
nil
)
and
re
:
IsActiveType
(
TYPE_SPELL
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
end
--
function
c1152304
.
tg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
Duel
.
GetFieldGroupCount
(
1
-
tp
,
LOCATION_HAND
,
0
)
~=
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
1
-
tp
,
LOCATION_HAND
)
end
end
Duel
.
SetChainLimit
(
aux
.
FALSE
)
end
--
function
c1152304
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
local
g
=
Duel
.
GetFieldGroup
(
1
-
tp
,
LOCATION_HAND
,
0
)
if
g
:
GetCount
()
==
0
then
return
end
local
sg
=
g
:
RandomSelect
(
1
-
tp
,
1
)
Duel
.
Destroy
(
sg
,
REASON_EFFECT
)
end
end
--
function
c1152304
.
cfilter2
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
c1152304
.
IsFulan
(
c
)
end
function
c1152304
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c1152304
.
cfilter2
,
1
,
nil
,
tp
)
end
--
function
c1152304
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
--
function
c1152304
.
tfilter2
(
c
)
return
c
:
IsAbleToDeckAsCost
()
end
function
c1152304
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c1152304
.
tfilter2
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
2
,
0
,
LOCATION_ONFIELD
)
end
--
function
c1152304
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152304
.
tfilter2
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
if
tc
:
IsLocation
(
LOCATION_DECK
)
then
Duel
.
ShuffleDeck
(
tc
:
GetControler
())
tc
:
ReverseInDeck
()
local
e2_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2_1
:
SetCategory
(
CATEGORY_DESTROY
)
e2_1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2_1
:
SetCode
(
EVENT_TO_HAND
)
e2_1
:
SetTarget
(
c1152304
.
tg2_1
)
e2_1
:
SetOperation
(
c1152304
.
op2_1
)
e2_1
:
SetReset
(
RESET_EVENT
+
0x1de0000
)
tc
:
RegisterEffect
(
e2_1
)
end
end
end
--
function
c1152304
.
tg2_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
)
if
g
:
GetCount
()
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
0
,
LOCATION_ONFIELD
)
end
end
--
function
c1152304
.
ofilter2_1
(
c
)
return
c
:
IsDestructable
()
end
function
c1152304
.
op2_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_DESTROY
)
local
g2
=
Duel
.
SelectMatchingCard
(
1
-
tp
,
c1152304
.
ofilter2_1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
Destroy
(
g2
,
REASON_EFFECT
)
end
end
expansions/script/c1152306.lua
0 → 100644
View file @
1c7adf8b
--禁忌『恋之迷宫』
function
c1152306
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c1152306
.
con2
)
e2
:
SetTarget
(
c1152306
.
tg2
)
e2
:
SetOperation
(
c1152306
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_SET_AVAILABLE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_F
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCondition
(
c1152306
.
con3
)
e3
:
SetOperation
(
c1152306
.
op3
)
c
:
RegisterEffect
(
e3
)
--
end
--
function
c1152306
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152306
.
named_with_Fulsp
=
1
function
c1152306
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152306
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
eg
:
GetFirst
()
while
ec
do
if
ec
:
GetPreviousControler
()
==
tp
and
ec
:
GetReasonPlayer
()
~=
ec
:
GetPreviousControler
()
and
ec
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
then
return
true
end
ec
=
eg
:
GetNext
()
end
return
false
end
--
function
c1152306
.
tfilter2_1
(
c
,
e
,
tp
)
return
c1152306
.
IsFulsp
(
c
)
and
c
:
IsAbleToRemove
()
and
bit
.
band
(
c
:
GetReason
(),
REASON_DESTROY
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
c1152306
.
tfilter2_2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
:
GetCode
())
end
function
c1152306
.
tfilter2_2
(
c
,
code
)
return
c
:
IsCode
(
code
)
and
c
:
IsAbleToHand
()
end
function
c1152306
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152306
.
tfilter2_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
--
function
c1152306
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152306
.
tfilter2_1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1152306
.
tfilter2_2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
g
:
GetFirst
():
GetCode
())
then
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c1152306
.
tfilter2_2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
g
:
GetFirst
():
GetCode
())
if
g1
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g1
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g1
)
end
end
end
end
end
--
function
c1152306
.
con3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
local
tc
=
tg
:
GetFirst
()
local
i
=
0
while
tc
do
if
tc
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsFacedown
()
then
i
=
1
end
tc
=
tg
:
GetNext
()
end
if
i
==
1
then
return
true
else
return
false
end
else
return
false
end
end
--
function
c1152306
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
Duel
.
ChangePosition
(
e
:
GetHandler
(),
POS_FACEUP
)
local
c
=
e
:
GetHandler
()
local
e3_1
=
Effect
.
CreateEffect
(
c
)
e3_1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3_1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3_1
:
SetCountLimit
(
1
)
e3_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e3_1
:
SetRange
(
LOCATION_SZONE
)
e3_1
:
SetOperation
(
c1152306
.
op3_1
)
c
:
RegisterEffect
(
e3_1
,
true
)
end
function
c1152306
.
ofilter3_1
(
c
)
return
c
:
IsFaceup
()
and
bit
.
band
(
c
:
GetOriginalType
(),
TYPE_MONSTER
)
==
0
end
function
c1152306
.
ofilter3_2
(
c
)
return
c
:
IsFacedown
()
end
function
c1152306
.
op3_1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
then
local
g
=
Duel
.
GetMatchingGroup
(
c1152306
.
ofilter3_1
,
tp
,
LOCATION_SZONE
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ChangePosition
(
g
,
POS_FACEDOWN
)
end
end
end
--
expansions/script/c1152999.lua
0 → 100644
View file @
1c7adf8b
--U.N.OWEN就是她吗?
function
c1152999
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetOperation
(
c1152999
.
op1
)
c
:
RegisterEffect
(
e1
)
--
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTarget
(
c1152999
.
tg2
)
e2
:
SetOperation
(
c1152999
.
op2
)
c
:
RegisterEffect
(
e2
)
--
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_REMOVE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTarget
(
c1152999
.
tg3
)
e3
:
SetOperation
(
c1152999
.
op3
)
c
:
RegisterEffect
(
e3
)
--
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetTarget
(
c1152999
.
tg4
)
e4
:
SetOperation
(
c1152999
.
op4
)
c
:
RegisterEffect
(
e4
)
--
end
--
function
c1152999
.
IsFulan
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Fulan
end
c1152999
.
named_with_Fulsp
=
1
function
c1152999
.
IsFulsp
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
.
named_with_Fulsp
end
--
function
c1152999
.
ofilter1
(
c
,
e
,
tp
)
return
c1152999
.
IsFulan
(
c
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToHand
()
end
function
c1152999
.
op1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c1152999
.
ofilter1
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152999
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
local
e1_1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1_1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1_1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1_1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1_1
:
SetRange
(
LOCATION_SZONE
)
e1_1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1_1
:
SetValue
(
c1152999
.
efilter1_1
)
e
:
GetHandler
():
RegisterEffect
(
e1_1
)
end
end
end
function
c1152999
.
efilter1_1
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
--
function
c1152999
.
cfilter2
(
c
)
return
c
:
IsPreviousLocation
(
LOCATION_HAND
)
end
function
c1152999
.
tfilter2
(
c
)
return
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c1152999
.
IsFulsp
(
c
)
and
c
:
IsSSetable
()
end
function
c1152999
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152999
.
tfilter2
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
e
:
GetHandler
():
GetFlagEffect
(
1152997
)
==
0
end
end
--
function
c1152999
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
if
eg
:
IsExists
(
c1152999
.
cfilter2
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152999
,
1
))
then
e
:
GetHandler
():
RegisterFlagEffect
(
1152997
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
if
not
e
:
GetHandler
():
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152999
.
tfilter2
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SSet
(
tp
,
g
)
~=
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
--
function
c1152999
.
cfilter3
(
c
)
return
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c1152999
.
IsFulsp
(
c
)
end
function
c1152999
.
tfilter3
(
c
)
return
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c1152999
.
IsFulsp
(
c
)
and
c
:
IsDestructable
()
end
function
c1152999
.
tg3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1152999
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
e
:
GetHandler
():
GetFlagEffect
(
1152997
)
~=
0
and
e
:
GetHandler
():
GetFlagEffect
(
1152998
)
==
0
end
end
--
function
c1152999
.
op3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
if
eg
:
IsExists
(
c1152999
.
cfilter3
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
1152999
,
2
))
then
e
:
GetHandler
():
RegisterFlagEffect
(
1152998
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152999
.
tfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
end
--
function
c1152999
.
tg4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
and
e
:
GetHandler
():
GetFlagEffect
(
1152997
)
~=
0
and
e
:
GetHandler
():
GetFlagEffect
(
1152998
)
~=
0
end
end
--
function
c1152999
.
ofilter4
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetOriginalRace
()
==
RACE_FIEND
and
c
:
GetOriginalType
()
==
TYPE_MONSTER
and
c
:
IsAbleToDeck
()
end
function
c1152999
.
op4
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
2
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
IsExistingMatchingCard
(
c1152999
.
ofilter4
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1152999
.
ofilter4
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
expansions/script/c1200016.lua
View file @
1c7adf8b
...
...
@@ -54,7 +54,7 @@ function c1200016.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c1200016
.
filter1
(
c
)
return
c
:
IsSetCard
(
0xfba
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
c
:
Is
c
ode
(
1200016
)
return
c
:
IsSetCard
(
0xfba
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
not
c
:
Is
C
ode
(
1200016
)
end
function
c1200016
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c1200016
.
filter1
(
chkc
)
end
...
...
expansions/script/c12003000.lua
0 → 100644
View file @
1c7adf8b
--水歌 原奏的senya
function
c12003000
.
initial_effect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12003000
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
12003000
)
e2
:
SetTarget
(
c12003000
.
thgt
)
e2
:
SetOperation
(
c12003000
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e4
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12003000
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_TO_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
12003100
)
e1
:
SetCondition
(
c12003000
.
con2
)
e1
:
SetTarget
(
c12003000
.
tg2
)
e1
:
SetOperation
(
c12003000
.
op2
)
c
:
RegisterEffect
(
e1
)
end
function
c12003000
.
tgfilter
(
c
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsAbleToGrave
()
end
function
c12003000
.
thgt
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12003000
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12003000
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12003000
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
function
c12003000
.
con2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
end
function
c12003000
.
filter
(
c
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsAbleToHand
()
end
function
c12003000
.
tg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_DECK
)
and
c12003000
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12003000
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12003000
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c12003000
.
op2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
expansions/script/c12003001.lua
0 → 100644
View file @
1c7adf8b
--水歌 重奏的senya
function
c12003001
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12003001
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
12003001
)
e1
:
SetTarget
(
c12003001
.
target
)
e1
:
SetOperation
(
c12003001
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12003001
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCountLimit
(
1
,
12003101
)
e3
:
SetCost
(
c12003001
.
cost
)
e3
:
SetTarget
(
c12003001
.
tg
)
e3
:
SetOperation
(
c12003001
.
op
)
c
:
RegisterEffect
(
e3
)
end
function
c12003001
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_SEASERPENT
)
and
not
c
:
IsCode
(
12003001
)
end
function
c12003001
.
spfilter
(
c
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
end
function
c12003001
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c12003001
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12003001
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c12003001
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c12003001
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12003001
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
end
function
c12003001
.
costfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToHandAsCost
()
and
c
:
IsRace
(
RACE_SEASERPENT
)
end
function
c12003001
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
chk
==
0
then
if
ft
<
0
then
return
false
end
if
ft
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12003001
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
else
return
Duel
.
IsExistingMatchingCard
(
c12003001
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
if
ft
==
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12003001
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
else
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12003001
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_COST
)
end
end
function
c12003001
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
tp
,
700
)
end
function
c12003001
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c12003002.lua
0 → 100644
View file @
1c7adf8b
--水歌 终奏的senya
function
c12003002
.
initial_effect
(
c
)
--extra summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12003002
,
0
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e1
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e1
:
SetCountLimit
(
1
,
12003102
)
e1
:
SetTarget
(
c12003002
.
extg
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
12003002
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
12003002
)
e2
:
SetCondition
(
c12003002
.
spcon
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12003002
,
2
))
e3
:
SetCategory
(
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetTarget
(
c12003002
.
target
)
e3
:
SetOperation
(
c12003002
.
operation
)
c
:
RegisterEffect
(
e3
)
end
function
c12003002
.
tfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_SEASERPENT
)
end
function
c12003002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12003002
.
tfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12003002
.
tfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
end
function
c12003002
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
)
end
end
function
c12003002
.
extg
(
e
,
c
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsRace
(
RACE_SEASERPENT
)
end
function
c12003002
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_SEASERPENT
)
end
function
c12003002
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12003002
.
filter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
expansions/script/c12003003.lua
0 → 100644
View file @
1c7adf8b
--水歌 永奏的senya
function
c12003003
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
c12003003
.
matfilter
,
2
,
2
)
c
:
EnableReviveLimit
()
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_TOHAND
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
,
12003003
)
e5
:
SetCost
(
c12003003
.
cost
)
e5
:
SetTarget
(
c12003003
.
target
)
e5
:
SetOperation
(
c12003003
.
activate
)
c
:
RegisterEffect
(
e5
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c12003003
.
damcon
)
e3
:
SetOperation
(
c12003003
.
damop
)
c
:
RegisterEffect
(
e3
)
local
e2
=
e3
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
end
function
c12003003
.
cfilter
(
c
,
g
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
and
g
:
IsContains
(
c
)
end
function
c12003003
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
lg
=
e
:
GetHandler
():
GetLinkedGroup
()
return
lg
and
eg
:
IsExists
(
c12003003
.
cfilter
,
1
,
nil
,
lg
)
end
function
c12003003
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
12003003
)
Duel
.
Damage
(
1
-
tp
,
200
,
REASON_EFFECT
)
end
function
c12003003
.
filter
(
c
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsAbleToGrave
()
end
function
c12003003
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c12003003
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
local
tg
=
Duel
.
SelectTarget
(
tp
,
c12003003
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
tg
,
REASON_EFFECT
)
end
function
c12003003
.
tgfilter
(
c
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsAbleToHand
()
end
function
c12003003
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c12003003
.
tgfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12003003
.
tgfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c12003003
.
tgfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
function
c12003003
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
\ No newline at end of file
expansions/script/c12003004.lua
0 → 100644
View file @
1c7adf8b
--水歌 幼奏的玛忒
function
c12003004
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12003004
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCountLimit
(
1
,
12003004
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c12003004
.
discost
)
e1
:
SetTarget
(
c12003004
.
target
)
e1
:
SetOperation
(
c12003004
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetCategory
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_GRAVE
)
e4
:
SetCost
(
c12003004
.
thcost
)
e4
:
SetTarget
(
c12003004
.
thtg
)
e4
:
SetOperation
(
c12003004
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c12003004
.
costfilter
(
c
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c12003004
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToGraveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c12003004
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12003004
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
c
)
g
:
AddCard
(
c
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c12003004
.
filter
(
c
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsAbleToHand
()
end
function
c12003004
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_DECK
)
and
c12003004
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12003004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c12003004
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c12003004
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
c12003004
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c12003004
.
tgfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c12003004
.
mfilter
(
c
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c12003004
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12003004
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
c12003004
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c12003004
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
e
:
SetLabelObject
(
g1
:
GetFirst
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
c12003004
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
g2
,
1
,
0
,
0
)
end
function
c12003004
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
if
tc
:
IsFacedown
()
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
tc
,
e
)
if
g
:
GetCount
()
>
0
then
Duel
.
Overlay
(
tc
,
g
)
end
end
\ No newline at end of file
expansions/script/c12003005.lua
0 → 100644
View file @
1c7adf8b
--水歌 幻奏的米歇尔
function
c12003005
.
initial_effect
(
c
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xfb8
),
3
,
2
)
c
:
EnableReviveLimit
()
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12003005
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c12003005
.
cost
)
e1
:
SetTarget
(
c12003005
.
target
)
e1
:
SetOperation
(
c12003005
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
,
12003005
)
e4
:
SetCost
(
c12003005
.
thcost
)
e4
:
SetTarget
(
c12003005
.
thtg
)
e4
:
SetOperation
(
c12003005
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c12003005
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
c12003005
.
filter
(
c
)
return
c
:
IsFaceup
()
end
function
c12003005
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c12003005
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12003005
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c12003005
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c12003005
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENSE
,
POS_FACEDOWN_DEFENSE
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetValue
(
c12003005
.
efilter
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e3
)
end
end
function
c12003005
.
efilter
(
e
,
te
)
return
te
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c12003005
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
99
,
REASON_COST
)
local
ct
=
Duel
.
GetOperatedGroup
():
GetCount
()
e
:
SetLabel
(
ct
)
end
function
c12003005
.
thfilter
(
c
)
return
c
:
IsRace
(
RACE_SEASERPENT
)
end
function
c12003005
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
ct
=
e
:
GetLabel
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c12003005
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c12003005
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
ct
,
nil
)
end
function
c12003005
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
Duel
.
Overlay
(
c
,
tc
)
end
\ No newline at end of file
expansions/script/c22250001.lua
0 → 100644
View file @
1c7adf8b
--Riviera 艾克塞尔
function
c22250001
.
initial_effect
(
c
)
--Activate(summon)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22250001
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222500011
)
e1
:
SetCondition
(
c22250001
.
spcon
)
e1
:
SetTarget
(
c22250001
.
sptg
)
e1
:
SetOperation
(
c22250001
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
22250001
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_CHAINING
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCountLimit
(
1
,
222500012
)
e3
:
SetCondition
(
c22250001
.
cecon
)
e3
:
SetTarget
(
c22250001
.
cetg
)
e3
:
SetOperation
(
c22250001
.
ceop
)
c
:
RegisterEffect
(
e3
)
end
c22250001
.
named_with_Riviera
=
1
function
c22250001
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22250001
.
fspfilter
(
c
,
e
,
tp
,
mg
,
chkf
)
return
c22250001
.
IsRiviera
(
c
)
and
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c22250001
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
return
rp
==
tp
and
eg
:
GetCount
()
==
1
and
c22250001
.
IsRiviera
(
tc
)
and
not
tc
:
IsImmuneToEffect
(
e
)
end
function
c22250001
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tc
=
eg
:
GetFirst
()
local
c
=
e
:
GetHandler
()
local
mg
=
Group
.
FromCards
(
c
,
tc
)
local
chkf
=
tp
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
tc
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c22250001
.
fspfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
chkf
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
0
,
1
,
0
,
LOCATION_EXTRA
)
end
function
c22250001
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
eg
:
GetFirst
()
local
mg
=
Group
.
FromCards
(
c
,
tc
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
or
(
not
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
))
or
(
not
c
:
IsRelateToEffect
(
e
))
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c22250001
.
fspfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
mg
,
tp
,
nil
,
chkf
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
tc
)
>
0
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
mg
:
IsExists
(
Card
.
IsRace
,
1
,
nil
,
RACE_FAIRY
)
then
Duel
.
BreakEffect
()
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c22250001
.
fspfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
)
local
tc
=
sg
:
GetFirst
()
tc
:
SetMaterial
(
mg
)
Duel
.
SendtoGrave
(
mg
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
function
c22250001
.
xfilter
(
c
,
tp
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
and
c22250001
.
IsRiviera
(
c
)
and
c
:
IsControler
(
tp
)
end
function
c22250001
.
cecon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
==
re
or
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
not
g
then
return
false
end
local
tp
=
e
:
GetHandler
():
GetControler
()
return
g
:
IsExists
(
c22250001
.
xfilter
,
1
,
nil
,
tp
)
end
function
c22250001
.
cefilter
(
c
,
re
,
rp
,
tf
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
,
oc
)
return
oc
~=
c
and
tf
(
re
,
rp
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
,
0
,
c
)
end
function
c22250001
.
cetg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tf
=
re
:
GetTarget
()
local
res
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
=
Duel
.
CheckEvent
(
re
:
GetCode
(),
true
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c22250001
.
cefilter
(
chkc
,
re
,
rp
,
tf
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22250001
.
cefilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
re
,
rp
,
tf
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
,
e
:
GetHandler
())
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c22250001
.
ceop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
ChangeTargetCard
(
ev
,
Group
.
FromCards
(
c
))
if
c
:
IsAbleToGrave
()
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
22250001
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
end
end
end
\ No newline at end of file
expansions/script/c22250002.lua
0 → 100644
View file @
1c7adf8b
--Riviera 塞蕾妮
function
c22250002
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22250002
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
22250002
)
e1
:
SetCondition
(
c22250002
.
condition
)
e1
:
SetTarget
(
c22250002
.
target
)
e1
:
SetOperation
(
c22250002
.
operation
)
c
:
RegisterEffect
(
e1
)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_BATTLE_START
)
e1
:
SetCondition
(
c22250002
.
descon
)
e1
:
SetTarget
(
c22250002
.
destg
)
e1
:
SetOperation
(
c22250002
.
desop
)
c
:
RegisterEffect
(
e1
)
end
c22250002
.
named_with_Riviera
=
1
function
c22250002
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22250002
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
at
=
Duel
.
GetAttackTarget
()
return
at
:
IsFaceup
()
and
at
:
IsControler
(
tp
)
and
c22250002
.
IsRiviera
(
at
)
end
function
c22250002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c22250002
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
300
)
e1
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetValue
(
300
)
e1
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
c
:
RegisterEffect
(
e1
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
a
=
Duel
.
GetAttacker
()
if
a
:
IsAttackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
c
:
RegisterEffect
(
e1
)
Duel
.
CalculateDamage
(
a
,
c
)
end
end
end
function
c22250002
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c22250002
.
IsRiviera
(
c
)
end
function
c22250002
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
c
:
GetBattleTarget
()
return
Duel
.
IsExistingMatchingCard
(
c22250002
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
and
tc
end
function
c22250002
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
tc
=
c
:
GetBattleTarget
()
if
chk
==
0
then
return
tc
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
tc
,
1
,
0
,
0
)
end
function
c22250002
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
c
:
GetBattleTarget
()
if
not
tc
then
return
end
--if tc:IsRelateToEffect(e) then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
300
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetValue
(
-
300
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_DAMAGE
)
tc
:
RegisterEffect
(
e1
)
--end
end
\ No newline at end of file
expansions/script/c22250003.lua
0 → 100644
View file @
1c7adf8b
--Riviera 希艾拉
function
c22250003
.
initial_effect
(
c
)
--SpecialSummon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
22250003
,
0
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetCode
(
EVENT_CHAINING
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e4
:
SetCountLimit
(
1
,
222500031
)
e4
:
SetCondition
(
c22250003
.
spcon
)
e4
:
SetTarget
(
c22250003
.
sptg
)
e4
:
SetOperation
(
c22250003
.
spop
)
c
:
RegisterEffect
(
e4
)
--special summon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
22250003
,
1
))
e4
:
SetCategory
(
CATEGORY_TOGRAVE
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
,
222500032
)
e4
:
SetCondition
(
c22250003
.
setcon
)
e4
:
SetTarget
(
c22250003
.
settg
)
e4
:
SetOperation
(
c22250003
.
setop
)
c
:
RegisterEffect
(
e4
)
end
c22250003
.
named_with_Riviera
=
1
function
c22250003
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22250003
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
GetTurnPlayer
()
~=
rp
end
function
c22250003
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c22250003
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
e1
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e2
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
e2
:
SetTarget
(
c22250003
.
etarget
)
e2
:
SetValue
(
c22250003
.
efilter
)
c
:
RegisterEffect
(
e2
)
if
not
c
:
IsType
(
TYPE_EFFECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e2
,
true
)
end
end
function
c22250003
.
etarget
(
e
,
c
)
return
c22250003
.
IsRiviera
(
c
)
and
c
:
IsFaceup
()
end
function
c22250003
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_TRAP
)
end
function
c22250003
.
setcfilter
(
c
,
tp
,
rp
)
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
GetPreviousControler
()
==
tp
and
c22250003
.
IsRiviera
(
c
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
function
c22250003
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c22250003
.
setcfilter
,
1
,
nil
,
tp
,
rp
)
end
function
c22250003
.
setfilter
(
c
,
ignore
)
return
c22250003
.
IsRiviera
(
c
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
(
ignore
)
end
function
c22250003
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
sct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
chk
==
0
then
return
c
:
IsAbleToGrave
()
and
sct
>
0
and
Duel
.
IsExistingMatchingCard
(
c22250003
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
c
,
1
,
0
,
0
)
end
function
c22250003
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
sct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
local
lct
=
eg
:
FilterCount
(
c22250003
.
setcfilter
,
nil
,
tp
,
rp
)
if
lct
<
sct
then
sct
=
lct
end
if
not
c
:
IsRelateToEffect
(
e
)
or
not
c
:
IsAbleToGrave
()
then
return
end
if
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
>
0
and
sct
>
0
then
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c22250003
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
sct
,
nil
,
false
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
sg
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
end
\ No newline at end of file
expansions/script/c22250004.lua
0 → 100644
View file @
1c7adf8b
--Riviera 菲尔
function
c22250004
.
initial_effect
(
c
)
--SpecialSummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22250004
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
222500041
)
e1
:
SetCost
(
c22250004
.
spcost
)
e1
:
SetTarget
(
c22250004
.
sptg
)
e1
:
SetOperation
(
c22250004
.
spop
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22250004
,
1
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
222500042
)
e2
:
SetCost
(
c22250004
.
negcost
)
e2
:
SetCondition
(
c22250004
.
negcon
)
e2
:
SetTarget
(
c22250004
.
negtg
)
e2
:
SetOperation
(
c22250004
.
negop
)
c
:
RegisterEffect
(
e2
)
end
c22250004
.
named_with_Riviera
=
1
function
c22250004
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22250004
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
function
c22250004
.
spfilter
(
c
,
code
,
e
,
tp
)
return
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c22250004
.
filter
(
c
,
e
,
tp
)
local
code
=
c
:
GetCode
()
return
c
:
IsFaceup
()
and
c22250004
.
IsRiviera
(
c
)
and
c
:
GetBattledGroupCount
()
>
0
and
Duel
.
IsExistingMatchingCard
(
c22250004
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
code
,
e
,
tp
)
end
function
c22250004
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c22250004
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22250004
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c22250004
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
nil
,
tp
,
LOCATION_DECK
)
end
function
c22250004
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
code
=
tc
:
GetCode
()
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
sg
=
Duel
.
GetMatchingGroup
(
c22250004
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
code
,
e
,
tp
)
local
sc
=
sg
:
GetCount
()
if
sc
<
ct
then
ct
=
sc
end
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
spc
=
sg
:
GetFirst
()
local
i
=
0
while
i
<
ct
and
spc
do
Duel
.
SpecialSummon
(
spc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
i
=
i
+
1
spc
=
sg
:
GetNext
()
end
end
end
function
c22250004
.
negcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
function
c22250004
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
==
tp
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
Duel
.
IsChainNegatable
(
ev
)
and
c22250004
.
IsRiviera
(
re
:
GetHandler
())
end
function
c22250004
.
negfilter
(
c
,
code
)
return
c
:
IsCode
(
code
)
and
c
:
IsAbleToHand
()
end
function
c22250004
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
code
=
re
:
GetHandler
():
GetCode
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22250004
.
negfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
code
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
nil
,
0
,
LOCATION_GRAVE
+
LOCATION_DECK
)
end
function
c22250004
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
Duel
.
IsExistingMatchingCard
(
c22250004
.
negfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
re
:
GetHandler
():
GetCode
())
then
local
g
=
Duel
.
GetMatchingGroup
(
c22250004
.
negfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
nil
,
re
:
GetHandler
():
GetCode
())
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c22250005.lua
0 → 100644
View file @
1c7adf8b
--Riviera 琉璃
function
c22250005
.
initial_effect
(
c
)
--destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22250005
,
0
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_BATTLE_DAMAGE
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
22250005
)
e2
:
SetCondition
(
c22250005
.
spcon
)
e2
:
SetTarget
(
c22250005
.
sptg
)
e2
:
SetOperation
(
c22250005
.
spop
)
c
:
RegisterEffect
(
e2
)
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22250005
,
2
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
+
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_BATTLE_START
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c22250005
.
negtg
)
e1
:
SetOperation
(
c22250005
.
negop
)
c
:
RegisterEffect
(
e1
)
end
c22250005
.
named_with_Riviera
=
1
function
c22250005
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22250005
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
return
ep
~=
tp
and
tc
:
IsControler
(
tp
)
and
c22250005
.
IsRiviera
(
tc
)
and
tc
:
IsType
(
TYPE_MONSTER
)
end
function
c22250005
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
LOCATION_HAND
)
end
function
c22250005
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
then
return
end
if
c
:
IsRelateToEffect
(
e
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22250005
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e2
:
SetReset
(
RESET_EVENT
+
0xfe0000
)
e2
:
SetTarget
(
c22250005
.
destg
)
e2
:
SetOperation
(
c22250005
.
desop
)
c
:
RegisterEffect
(
e2
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
not
c
:
IsType
(
TYPE_EFFECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
c
:
RegisterEffect
(
e2
,
true
)
end
end
end
function
c22250005
.
desfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c22250005
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c22250005
.
desfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22250005
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c22250005
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c22250005
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x17a0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x17a0000
)
tc
:
RegisterEffect
(
e2
)
end
end
end
function
c22250005
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsFaceup
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
c22250005
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
-
300
)
tc
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
-
300
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e3
:
SetValue
(
RESET_TURN_SET
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_BATTLE
)
tc
:
RegisterEffect
(
e3
)
end
end
expansions/script/c22250006.lua
0 → 100644
View file @
1c7adf8b
--Riviera 罗莎
function
c22250006
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22250006
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
22250006
)
e1
:
SetCondition
(
c22250006
.
spcon
)
e1
:
SetTarget
(
c22250006
.
sptg
)
e1
:
SetOperation
(
c22250006
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
--effect gain
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetCondition
(
c22250006
.
efcon
)
e3
:
SetOperation
(
c22250006
.
efop
)
c
:
RegisterEffect
(
e3
)
end
c22250006
.
named_with_Riviera
=
1
function
c22250006
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22250006
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
GetSummonPlayer
()
==
tp
and
c
:
IsCode
(
22250001
)
end
function
c22250006
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c22250006
.
cfilter
,
1
,
nil
,
tp
)
end
function
c22250006
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c22250006
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
c
:
IsPreviousLocation
(
LOCATION_GRAVE
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_LEAVE_FIELD_REDIRECT
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e1
)
end
end
function
c22250006
.
efcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_FUSION
)
~=
0
end
function
c22250006
.
efop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
c
:
GetReasonCard
()
local
e2
=
Effect
.
CreateEffect
(
rc
)
e2
:
SetDescription
(
aux
.
Stringid
(
22250006
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_NO_TURN_RESET
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e2
:
SetTarget
(
c22250006
.
target
)
e2
:
SetOperation
(
c22250006
.
activate
)
rc
:
RegisterEffect
(
e2
)
if
not
rc
:
IsType
(
TYPE_EFFECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ADD_TYPE
)
e2
:
SetValue
(
TYPE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
rc
:
RegisterEffect
(
e2
,
true
)
end
end
function
c22250006
.
filter2
(
c
)
return
bit
.
band
(
c
:
GetReason
(),
0x40008
)
==
0x40008
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
and
c
:
IsAbleToDeck
()
end
function
c22250006
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22250006
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
)
end
local
g
=
Duel
.
SelectTarget
(
tp
,
c22250006
.
filter2
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
0
,
0
)
end
function
c22250006
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
sg
:
GetCount
()
==
2
then
local
tc
=
sg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
sg
:
RemoveCard
(
tc
)
Duel
.
SendtoDeck
(
sg
,
nil
,
1
,
REASON_EFFECT
)
end
end
expansions/script/c22250101.lua
0 → 100644
View file @
1c7adf8b
--Riviera 利达
function
c22250101
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
c22250101
.
ffilter
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_FAIRY
),
true
)
--atk down
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
+
CATEGORY_DESTROY
)
e5
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EVENT_DAMAGE_CALCULATING
)
e5
:
SetCondition
(
c22250101
.
atkcon
)
e5
:
SetOperation
(
c22250101
.
atkop
)
c
:
RegisterEffect
(
e5
)
--extra atk
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22250101
,
0
))
e1
:
SetCategory
(
CATEGORY_RECOVER
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_BATTLED
)
e1
:
SetCountLimit
(
1
,
22250101
)
e1
:
SetCondition
(
c22250101
.
descon
)
e1
:
SetTarget
(
c22250101
.
destg
)
e1
:
SetOperation
(
c22250101
.
desop
)
c
:
RegisterEffect
(
e1
)
--battle indestructable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE
)
e2
:
SetCondition
(
c22250101
.
indcon
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
--no battle damage
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_NO_BATTLE_DAMAGE
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
end
c22250101
.
named_with_Riviera
=
1
function
c22250101
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22250101
.
ffilter
(
c
)
return
c
:
IsFusionType
(
TYPE_MONSTER
)
and
c22250101
.
IsRiviera
(
c
)
end
function
c22250101
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetBattleTarget
()
end
function
c22250101
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
if
c
:
IsRelateToBattle
()
and
c
:
IsFaceup
()
and
bc
:
IsRelateToBattle
()
and
bc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
500
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
bc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
-
500
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
bc
:
RegisterEffect
(
e2
)
if
bc
:
GetAttack
()
*
bc
:
GetDefense
()
==
0
then
Duel
.
Remove
(
bc
,
POS_FACEUP
,
REASON_EFFECT
)
if
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c22250101
.
retop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
function
c22250101
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttackTarget
()
~=
nil
end
function
c22250101
.
atkfilter
(
c
)
return
c22250101
.
IsRiviera
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c22250101
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
d
=
c
:
GetBattleTarget
()
local
ct
=
c
:
GetMaterial
():
FilterCount
(
c22250101
.
atkfilter
,
nil
)
if
chk
==
0
then
return
ct
>
0
and
d
:
IsRelateToBattle
()
and
c
:
IsRelateToBattle
()
and
c
:
IsAttackable
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c22250101
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ct
=
c
:
GetMaterial
():
FilterCount
(
c22250101
.
atkfilter
,
nil
)
local
d
=
c
:
GetBattleTarget
()
e
:
SetLabel
(
0
)
while
ct
>
0
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
do
if
c
:
IsPosition
(
POS_DEFENSE
)
then
Duel
.
ChangePosition
(
c
,
POS_FACEUP_ATTACK
)
end
Duel
.
CalculateDamage
(
c
,
d
)
ct
=
ct
-
1
e
:
SetLabel
(
1
)
end
if
e
:
GetLabel
()
>
0
and
c
:
IsAbleToRemove
()
then
Duel
.
BreakEffect
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c22250101
.
retop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
function
c22250101
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReturnToField
(
e
:
GetLabelObject
())
end
function
c22250101
.
indcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
\ No newline at end of file
expansions/script/c22250102.lua
0 → 100644
View file @
1c7adf8b
--Riviera 马利斯
function
c22250102
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
c22250102
.
ffilter
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_FAIRY
),
true
)
--exchange atk
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_TRIGGER_F
+
EFFECT_TYPE_FIELD
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCode
(
EVENT_BATTLE_START
)
e5
:
SetCountLimit
(
1
,
22250102
)
e5
:
SetCondition
(
c22250102
.
atkcon
)
e5
:
SetOperation
(
c22250102
.
atkop
)
c
:
RegisterEffect
(
e5
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22250102
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e1
:
SetCondition
(
c22250102
.
condition
)
e1
:
SetTarget
(
c22250102
.
target
)
e1
:
SetOperation
(
c22250102
.
operation
)
c
:
RegisterEffect
(
e1
)
--Disable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_BATTLED
)
e2
:
SetOperation
(
c22250102
.
disop
)
c
:
RegisterEffect
(
e2
)
end
c22250102
.
named_with_Riviera
=
1
function
c22250102
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22250102
.
ffilter
(
c
)
return
c
:
IsFusionType
(
TYPE_MONSTER
)
and
c22250102
.
IsRiviera
(
c
)
end
function
c22250102
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ac
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttackTarget
()
return
tc
~=
nil
and
((
c22250102
.
IsRiviera
(
ac
)
and
ac
:
IsControler
(
tp
)
and
ac
~=
c
)
or
(
c22250102
.
IsRiviera
(
tc
)
and
tc
:
IsControler
(
tp
)
and
tc
~=
c
))
end
function
c22250102
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ac
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttackTarget
()
local
c
=
e
:
GetHandler
()
if
ac
:
IsRelateToBattle
()
and
tc
:
IsRelateToBattle
()
and
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsPosition
(
POS_DEFENSE
)
then
Duel
.
ChangePosition
(
c
,
POS_FACEUP_ATTACK
)
end
if
(
c22250102
.
IsRiviera
(
ac
)
and
ac
:
IsControler
(
tp
)
and
tc
~=
nil
and
ac
~=
c
)
then
Duel
.
CalculateDamage
(
c
,
tc
)
else
Duel
.
CalculateDamage
(
c
,
ac
)
end
end
end
function
c22250102
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsRelateToBattle
()
and
c
:
GetBattleTarget
():
IsType
(
TYPE_MONSTER
)
end
function
c22250102
.
filter
(
c
,
e
,
tp
)
return
c22250102
.
IsRiviera
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c22250102
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
and
c22250102
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22250102
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
and
c
:
IsAbleToRemove
()
and
(
c
:
GetSequence
()
<
5
or
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c22250102
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
function
c22250102
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsAbleToRemove
()
then
return
end
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetLabelObject
(
c
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c22250102
.
retop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
c22250102
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReturnToField
(
e
:
GetLabelObject
())
end
function
c22250102
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttackTarget
()
local
c
=
e
:
GetHandler
()
if
c
==
tc
then
tc
=
Duel
.
GetAttacker
()
end
if
tc
and
tc
:
IsType
(
TYPE_EFFECT
)
and
tc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x17a0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x17a0000
)
tc
:
RegisterEffect
(
e2
)
end
end
\ No newline at end of file
expansions/script/c22251001.lua
0 → 100644
View file @
1c7adf8b
--神威降临
function
c22251001
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22251001
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
22251001
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c22251001
.
target
)
e1
:
SetOperation
(
c22251001
.
activate
)
c
:
RegisterEffect
(
e1
)
if
not
c22251001
.
global_check
then
c22251001
.
global_check
=
true
c22251001
[
0
]
=
0
c22251001
[
1
]
=
0
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetOperation
(
c22251001
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge2
:
SetOperation
(
c22251001
.
clear
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22251001
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c22251001
.
cost
)
e2
:
SetCondition
(
c22251001
.
con
)
e2
:
SetTarget
(
c22251001
.
tg
)
e2
:
SetOperation
(
c22251001
.
op
)
c
:
RegisterEffect
(
e2
)
end
c22251001
.
named_with_Riviera
=
1
function
c22251001
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22251001
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
c22251001
[
tc
:
GetControler
()]
=
c22251001
[
tc
:
GetControler
()]
+
1
end
function
c22251001
.
clear
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c22251001
[
0
]
=
0
c22251001
[
1
]
=
0
end
function
c22251001
.
filter1
(
c
,
e
)
return
c
:
IsAbleToGrave
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c22251001
.
exfilter0
(
c
)
return
c22251001
.
IsRiviera
(
c
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
end
function
c22251001
.
exfilter1
(
c
,
e
)
return
c22251001
.
IsRiviera
(
c
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c22251001
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c22251001
.
IsRiviera
(
c
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c22251001
.
fcheck
(
tp
,
sg
,
fc
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
<=
1
end
function
c22251001
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsAbleToGrave
,
nil
)
if
c22251001
[
1
-
e
:
GetHandler
():
GetControler
()]
>
0
then
local
sg
=
Duel
.
GetMatchingGroup
(
c22251001
.
exfilter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
sg
:
GetCount
()
>
0
then
mg1
:
Merge
(
sg
)
Auxiliary
.
FCheckAdditional
=
c22251001
.
fcheck
end
end
local
res
=
Duel
.
IsExistingMatchingCard
(
c22251001
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c22251001
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c22251001
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c22251001
.
filter1
,
nil
,
e
)
local
exmat
=
false
if
c22251001
[
1
-
e
:
GetHandler
():
GetControler
()]
>
0
then
local
sg
=
Duel
.
GetMatchingGroup
(
c22251001
.
exfilter1
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
)
if
sg
:
GetCount
()
>
0
then
mg1
:
Merge
(
sg
)
exmat
=
true
end
end
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c22251001
.
fcheck
end
local
sg1
=
Duel
.
GetMatchingGroup
(
c22251001
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c22251001
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
mg1
:
RemoveCard
(
tc
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
if
exmat
then
Auxiliary
.
FCheckAdditional
=
c22251001
.
fcheck
end
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
Auxiliary
.
FCheckAdditional
=
nil
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
tc
:
CompleteProcedure
()
end
end
function
c22251001
.
costfilter
(
c
)
return
c
:
IsCode
(
22251001
)
and
c
:
IsAbleToDeckAsCost
()
end
function
c22251001
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c22251001
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
e
:
SetLabel
(
g
:
GetCount
())
end
function
c22251001
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
==
tp
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
GetHandler
():
IsCode
(
22252001
)
end
function
c22251001
.
tg
(
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
end
function
c22251001
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
and
tc
:
IsFaceup
()
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
500
*
e
:
GetLabel
())
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e1
:
SetValue
(
-
500
*
e
:
GetLabel
())
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
tc
=
g
:
GetNext
()
end
end
expansions/script/c22251002.lua
0 → 100644
View file @
1c7adf8b
--似叶般飘落
function
c22251002
.
initial_effect
(
c
)
--draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22251002
,
0
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
22251002
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c22251002
.
operation
)
c
:
RegisterEffect
(
e1
)
--laipigou
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22251002
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c22251002
.
cost
)
e2
:
SetCondition
(
c22251002
.
con
)
e2
:
SetTarget
(
c22251002
.
tg
)
e2
:
SetOperation
(
c22251002
.
op
)
c
:
RegisterEffect
(
e2
)
end
c22251002
.
named_with_Riviera
=
1
function
c22251002
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22251002
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
c22251002
.
thcon
)
e1
:
SetOperation
(
c22251002
.
thop
)
e1
:
SetCountLimit
(
2
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c22251002
.
thcfilter
(
c
,
sp
)
return
c22251002
.
IsRiviera
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c22251002
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c22251002
.
thcfilter
,
1
,
nil
)
end
function
c22251002
.
thfilter
(
c
,
sp
)
return
c22251002
.
IsRiviera
(
c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c22251002
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22251002
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
0
,
1
,
0
,
0
)
end
function
c22251002
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22251002
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c22251002
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
>
0
end
function
c22251002
.
costfilter
(
c
)
return
c22251002
.
IsRiviera
(
c
)
and
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsFaceup
()
end
function
c22251002
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c22251002
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
local
c
=
e
:
GetHandler
()
local
tc
=
g
:
GetFirst
()
while
tc
do
if
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_COST
+
REASON_TEMPORARY
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_END
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c22251002
.
retop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
tc
=
g
:
GetNext
()
end
end
function
c22251002
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ReturnToField
(
e
:
GetLabelObject
())
end
function
c22251002
.
tdfilter
(
c
)
return
c
:
IsCode
(
22251002
)
and
c
:
IsAbleToDeck
()
end
function
c22251002
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
g
=
Duel
.
GetMatchingGroup
(
c22251002
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c22251002
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c22251002
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
end
end
expansions/script/c22251101.lua
0 → 100644
View file @
1c7adf8b
--深远的神之领域
function
c22251101
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
22251101
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c22251101
.
activate
)
c
:
RegisterEffect
(
e1
)
if
c22251101
.
counter
==
nil
then
c22251101
.
counter
=
true
c22251101
[
0
]
=
0
c22251101
[
1
]
=
0
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
e2
:
SetOperation
(
c22251101
.
resetcount
)
Duel
.
RegisterEffect
(
e2
,
0
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetOperation
(
c22251101
.
addcount
)
Duel
.
RegisterEffect
(
e3
,
0
)
end
--set
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c22251101
.
cost
)
e2
:
SetTarget
(
c22251101
.
tg
)
e2
:
SetOperation
(
c22251101
.
op
)
c
:
RegisterEffect
(
e2
)
end
c22251101
.
named_with_Riviera
=
1
function
c22251101
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22251101
.
resetcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c22251101
[
0
]
=
0
c22251101
[
1
]
=
0
end
function
c22251101
.
addcount
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
eg
:
GetFirst
()
while
c
~=
nil
do
local
p
=
c
:
GetControler
()
if
c22251101
.
IsRiviera
(
c
)
and
bit
.
band
(
c
:
GetSummonType
(),
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
then
c22251101
[
p
]
=
c22251101
[
p
]
+
1
end
c
=
eg
:
GetNext
()
end
end
function
c22251101
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
c22251101
.
droperation
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c22251101
.
droperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
22251101
)
Duel
.
Draw
(
tp
,
c22251101
[
tp
],
REASON_EFFECT
)
end
function
c22251101
.
costfilter
(
c
)
return
c
:
IsCode
(
22251101
)
and
c
:
IsAbleToDeckAsCost
()
end
function
c22251101
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c22251101
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
1
end
local
rg
=
g
:
RandomSelect
(
tp
,
2
)
Duel
.
SendtoDeck
(
rg
,
nil
,
1
,
REASON_COST
)
end
function
c22251101
.
setfilter
(
c
,
ignore
)
return
c
:
IsCode
(
22251001
,
22252001
)
and
c
:
IsSSetable
(
ignore
)
end
function
c22251101
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22251101
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
false
)
end
end
function
c22251101
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22251101
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c22252001.lua
0 → 100644
View file @
1c7adf8b
--神威再临
function
c22252001
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
22252001
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c22252001
.
target
)
e1
:
SetOperation
(
c22252001
.
activate
)
c
:
RegisterEffect
(
e1
)
--ind
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
22252001
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c22252001
.
cost
)
e2
:
SetOperation
(
c22252001
.
op
)
c
:
RegisterEffect
(
e2
)
end
c22252001
.
named_with_Riviera
=
1
function
c22252001
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22252001
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c22252001
.
IsRiviera
(
c
)
end
function
c22252001
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c22252001
.
filter
(
chkc
,
e
,
tp
)
and
chkc
:
IsControler
(
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c22252001
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ft
=
1
end
if
ft
>
2
then
ft
=
2
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c22252001
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
ft
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
function
c22252001
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
sg
:
GetCount
()
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
return
end
if
sg
:
GetCount
()
>
ft
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
sg
=
sg
:
Select
(
tp
,
ft
,
ft
,
nil
)
end
local
ct
=
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
ct
>
0
and
sg
:
FilterCount
(
Card
.
IsRace
,
nil
,
RACE_FAIRY
)
<
2
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
22252001
,
2
))
then
local
tc
=
sg
:
GetFirst
()
while
tc
do
if
not
tc
:
IsRace
(
RACE_FAIRY
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CHANGE_RACE
)
e1
:
SetValue
(
RACE_FAIRY
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
tc
=
sg
:
GetNext
()
end
end
end
function
c22252001
.
costfilter
(
c
)
return
c
:
IsCode
(
22252001
)
and
c
:
IsAbleToDeckAsCost
()
end
function
c22252001
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c22252001
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
1
end
local
rg
=
g
:
RandomSelect
(
tp
,
2
)
Duel
.
SendtoDeck
(
rg
,
nil
,
1
,
REASON_COST
)
end
function
c22252001
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsRace
,
RACE_FAIRY
))
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
c22252001
.
efilter
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c22252001
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetHandlerPlayer
()
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
expansions/script/c22252101.lua
0 → 100644
View file @
1c7adf8b
--战时苏醒之力
function
c22252101
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetCountLimit
(
1
,
22252101
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c22252101
.
condition
)
e1
:
SetOperation
(
c22252101
.
activate
)
c
:
RegisterEffect
(
e1
)
--SpecialSummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c22252101
.
cost
)
e2
:
SetTarget
(
c22252101
.
tg
)
e2
:
SetOperation
(
c22252101
.
op
)
c
:
RegisterEffect
(
e2
)
end
c22252101
.
named_with_Riviera
=
1
function
c22252101
.
IsRiviera
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
named_with_Riviera
end
function
c22252101
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
Duel
.
GetTurnPlayer
()
end
function
c22252101
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
end
function
c22252101
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
and
c22252101
.
IsRiviera
(
c
)
end
function
c22252101
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ac
=
Duel
.
GetAttacker
()
if
Duel
.
NegateAttack
()
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
5
then
Duel
.
ConfirmDecktop
(
tp
,
5
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
5
)
local
chkf
=
tp
local
mg1
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c22252101
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c22252101
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
if
res
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
22252101
,
0
))
then
local
mg1
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
):
Filter
(
c22252101
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c22252101
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c22252101
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
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
)
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_ATTACK
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
if
tc
:
IsAttackable
()
and
ac
then
Duel
.
CalculateDamage
(
tc
,
ac
)
end
end
end
end
end
function
c22252101
.
costfilter
(
c
)
return
c
:
IsCode
(
22252101
)
and
c
:
IsAbleToDeckAsCost
()
end
function
c22252101
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
c22252101
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
1
end
local
rg
=
g
:
RandomSelect
(
tp
,
2
)
Duel
.
SendtoDeck
(
rg
,
nil
,
1
,
REASON_COST
)
end
function
c22252101
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
22250001
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c22252101
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c22252101
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
0
)
end
function
c22252101
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
1
or
not
Duel
.
IsExistingMatchingCard
(
c22252101
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
then
return
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c22252101
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c37564520.lua
View file @
1c7adf8b
...
...
@@ -67,7 +67,7 @@ function cm.operation0(e,tp,eg,ep,ev,re,r,rp)
c
:
ResetEffect
(
ccd
,
RESET_COPY
)
end
local
ecd
=
c
:
CopyEffect
(
rcd
,
RESET_EVENT
+
0x1fe0000
,
1
)
c
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
,
ecd
,
m
*
16
)
c
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
ecd
,
m
*
16
)
end
function
cm
.
copycost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabel
(
1
)
...
...
expansions/script/c37564765.lua
View file @
1c7adf8b
...
...
@@ -296,6 +296,27 @@ end
function
cm
.
XyzProcedureRankCheck
(
g
,
xyzc
)
return
g
:
GetClassCount
(
Card
.
GetRank
)
==
1
end
function
cm
.
XyzProcedureCustomTuneMagicianFilter
(
c
,
te
)
local
f
=
te
:
GetValue
()
return
f
(
te
,
c
)
end
function
cm
.
XyzProcedureCustomTuneMagicianCheck
(
c
,
g
)
local
eset
=
{
c
:
FilterEffect
(
EFFECT_TUNE_MAGICIAN_X
)}
for
_
,
te
in
ipairs
(
eset
)
do
if
g
:
IsExists
(
cm
.
XyzProcedureCustomTuneMagicianFilter
,
1
,
c
,
te
)
then
return
true
end
end
return
false
end
function
cm
.
XyzProcedureCustomCheck
(
g
,
xyzc
,
tp
,
gf
)
if
EFFECT_MUST_BE_XMATERIAL
then
local
eset
=
{
Duel
.
FilterPlayerEffect
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)}
for
_
,
te
in
ipairs
(
eset
)
do
if
not
g
:
IsContains
(
te
:
GetHandler
())
then
return
false
end
end
end
if
g
:
IsExists
(
cm
.
XyzProcedureCustomTuneMagicianCheck
,
1
,
nil
,
g
)
then
return
false
end
return
not
gf
or
gf
(
g
,
xyzc
,
tp
)
end
function
cm
.
AddXyzProcedureCustom
(
c
,
func
,
gf
,
minc
,
maxc
,
xm
,
...
)
local
ext_params
=
{
...
}
c
:
EnableReviveLimit
()
...
...
@@ -333,7 +354,7 @@ function cm.XyzProcedureCustomCondition(func,gf,minct,maxct,ext_params)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzProcedureCustomFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
func
,
ext_params
)
end
return
maxc
>=
minc
and
cm
.
CheckGroup
(
mg
,
cm
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
gf
,
c
)
return
maxc
>=
minc
and
cm
.
CheckGroup
(
mg
,
cm
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
cm
.
XyzProcedureCustomCheck
,
c
,
tp
,
gf
)
end
end
function
cm
.
XyzProcedureCustomTarget
(
func
,
gf
,
minct
,
maxct
,
ext_params
)
...
...
@@ -354,7 +375,7 @@ function cm.XyzProcedureCustomTarget(func,gf,minct,maxct,ext_params)
minc
=
math.max
(
minc
,
min
)
maxc
=
math.min
(
maxc
,
max
)
end
g
=
cm
.
SelectGroupWithCancel
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
cm
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
gf
,
c
)
g
=
cm
.
SelectGroupWithCancel
(
tp
,
HINTMSG_XMATERIAL
,
mg
,
cm
.
CheckFieldFilter
,
nil
,
minc
,
maxc
,
tp
,
c
,
cm
.
XyzProcedureCustomCheck
,
c
,
tp
,
gf
)
end
if
g
then
g
:
KeepAlive
()
...
...
@@ -427,14 +448,14 @@ return function(e,c)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
tp
=
c
:
GetControler
()
local
chkf
=
PLAYER_NONE
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
SelfFusionProcedureFilter
,
tp
,
loc
,
0
,
c
,
c
,
opf
)
return
c
:
CheckFusionMaterial
(
mg
,
nil
,
chkf
)
end
end
function
cm
.
SelfFusionProcedureOperation
(
loc
,
opf
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
chkf
=
PLAYER_NONE
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
SelfFusionProcedureFilter
,
tp
,
loc
,
0
,
c
,
c
,
opf
)
local
g
=
Duel
.
SelectFusionMaterial
(
tp
,
c
,
mg
,
nil
,
chkf
)
c
:
SetMaterial
(
g
)
...
...
expansions/script/c50000063.lua
View file @
1c7adf8b
--雷之解放 奇犽
function
c50000063
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x15
30
,
LOCATION_MZONE
)
c
:
EnableCounterPermit
(
0x15
0c
,
LOCATION_MZONE
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x530
),
1
)
c
:
EnableReviveLimit
()
--synchro success
...
...
@@ -47,30 +47,30 @@ function c50000063.initial_effect(c)
end
function
c50000063
.
addct
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
2
,
0
,
0x15
30
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_COUNTER
,
nil
,
2
,
0
,
0x15
0c
)
end
function
c50000063
.
addc
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
e
:
GetHandler
():
AddCounter
(
0x15
30
,
2
)
e
:
GetHandler
():
AddCounter
(
0x15
0c
,
2
)
end
end
function
c50000063
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x1
12e
,
1
,
REASON_COST
)
end
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x1
50c
,
1
,
REASON_COST
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x15
30
,
1
,
REASON_COST
)
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x15
0c
,
1
,
REASON_COST
)
end
function
c50000063
.
filter
(
c
)
return
c
:
IsDestructable
()
end
function
c50000063
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50000063
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c50000063
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c50000063
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c50000063
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c50000063
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50000063
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50000063
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
...
...
expansions/script/c50000066.lua
View file @
1c7adf8b
...
...
@@ -30,7 +30,8 @@ function c50000066.initial_effect(c)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
,
500000661
)
e3
:
SetCost
(
c50000066
.
cost
)
e3
:
SetCondition
(
c50000066
.
checkcon
)
e3
:
SetTarget
(
c50000066
.
checktg
)
e3
:
SetOperation
(
c50000066
.
checkop
)
...
...
@@ -69,25 +70,24 @@ function c50000066.actcon(e)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
end
----
function
c50000066
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x150c
,
1
,
REASON_COST
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x150c
,
1
,
REASON_COST
)
end
function
c50000066
.
checkcon
(
e
)
return
e
:
GetHandler
():
GetLinkedGroupCount
()
>
0
end
function
c50000066
.
checktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ccount
=
Duel
.
GetCounter
(
0
,
1
,
0
,
0x150c
)
-
1
if
ccount
<
1
then
ccount
=
0
end
if
ccount
==
0
then
return
end
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
ccount
end
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
2
end
end
function
c50000066
.
checkfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
)
end
function
c50000066
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ccount
=
Duel
.
GetCounter
(
0
,
1
,
0
,
0x150c
)
-
1
if
ccount
<
1
then
ccount
=
0
end
if
ccount
==
0
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
ccount
then
return
end
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
ccount
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
2
then
return
end
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
2
)
Duel
.
ConfirmCards
(
tp
,
g
)
if
g
:
IsExists
(
c50000066
.
checkfilter
,
1
,
nil
,
e
,
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
50000066
,
2
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
expansions/script/c50000068.lua
View file @
1c7adf8b
...
...
@@ -43,7 +43,7 @@ function c50000068.ffilter(c)
return
c
:
IsFusionSetCard
(
0x50c
)
and
c
:
IsFusionType
(
TYPE_XYZ
+
TYPE_SYNCHRO
)
end
function
c50000068
.
ffilter1
(
c
)
return
c
:
IsFusionType
(
TYPE_
DUAL
)
return
c
:
IsFusionType
(
TYPE_
EFFECT
)
end
function
c50000068
.
efilter1
(
e
,
re
,
rp
)
...
...
expansions/script/c50000070.lua
View file @
1c7adf8b
...
...
@@ -2,7 +2,8 @@
function
c50000070
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
c50000070
.
ffilter
,
c50000070
.
ffilter1
,
true
)
aux
.
AddFusionProcMix
(
c
,
false
,
true
,
c50000070
.
ffilter
,
c50000070
.
ffilter1
,
c50000070
.
ffilter2
)
--aux.AddFusionProcFun3(c,c50000070.ffilter,c50000070.ffilter1,true)
--extra attack
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -55,6 +56,9 @@ end
function
c50000070
.
ffilter1
(
c
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsFusionType
(
TYPE_FUSION
)
end
function
c50000070
.
ffilter2
(
c
)
return
c
:
IsFusionType
(
TYPE_EFFECT
)
end
function
c50000070
.
efilter1
(
e
,
re
,
rp
)
return
re
:
IsActiveType
(
TYPE_DUAL
)
...
...
expansions/script/c50000073.lua
View file @
1c7adf8b
...
...
@@ -29,7 +29,6 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e2
)
end
function
c50000073
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Debug
.
Message
(
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_LINK
)
return
e
:
GetHandler
():
GetSummonType
()
==
SUMMON_TYPE_LINK
end
function
c50000073
.
spfilter
(
c
,
e
,
tp
)
...
...
@@ -38,13 +37,27 @@ end
function
c50000073
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
return
zone
~=
0
and
Duel
.
IsExistingMatchingCard
(
c50000073
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
local
flag
=
false
if
zone
==
5
then
flag
=
(
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
2
))
end
if
zone
==
20
then
flag
=
(
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
2
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
4
))
end
return
zone
~=
0
and
flag
and
Duel
.
IsExistingMatchingCard
(
c50000073
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c50000073
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
zone
==
0
then
return
end
local
flag
=
false
if
zone
==
5
then
flag
=
(
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
2
))
end
if
zone
==
20
then
flag
=
(
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
2
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_MZONE
,
4
))
end
if
zone
==
0
or
not
flag
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c50000073
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
if
g
:
GetCount
()
>
0
then
...
...
expansions/script/c50000074.lua
View file @
1c7adf8b
...
...
@@ -50,8 +50,7 @@ function c50000074.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chk
==
0
then
return
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
IsExistingTarget
(
c50000074
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
ct
=
Duel
.
GetMZoneCount
(
tp
)
if
ct
>
2
then
ct
=
2
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
if
ct
>
1
then
ct
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c50000074
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
ct
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
g
:
GetCount
(),
0
,
0
)
...
...
@@ -69,7 +68,7 @@ function c50000074.ad(e,c)
end
---
function
c50000074
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50c
)
and
not
c
:
IsType
(
TYPE_XYZ
)
return
c
:
IsSetCard
(
0x50c
)
end
function
c50000074
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c50000075.lua
0 → 100644
View file @
1c7adf8b
--夏日祭 奇犽
local
m
=
50000075
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
xpcall
(
function
()
require
(
"expansions/script/c37564765"
)
end
,
function
()
require
(
"script/c37564765"
)
end
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
Senya
.
AddXyzProcedureCustom
(
c
,
function
(
c
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetLink
()
>=
2
end
,
nil
,
2
,
2
)
--cannot spsummon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetRange
(
LOCATION_EXTRA
)
e0
:
SetValue
(
function
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_XYZ
)
==
SUMMON_TYPE_XYZ
end
)
c
:
RegisterEffect
(
e0
)
--xyoverlay
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
m
..
1
)
e2
:
SetCost
(
cm
.
cost
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
filter
(
c
)
return
c
:
IsAbleToChangeControler
()
and
not
c
:
IsType
(
TYPE_TOKEN
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
2
,
e
:
GetHandler
())
end
function
cm
.
tgfilter
(
c
,
e
)
return
c
:
IsRelateToEffect
(
e
)
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
c
:
IsRelateToEffect
(
e
)
and
sg
:
GetCount
()
>=
1
then
local
tc
=
sg
:
GetFirst
()
while
tc
do
local
og
=
tc
:
GetOverlayGroup
()
if
og
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
og
,
REASON_RULE
)
end
tc
=
sg
:
GetNext
()
end
Duel
.
Overlay
(
c
,
sg
)
end
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
2
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
2
,
2
,
REASON_COST
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
cm
.
spfilter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ct
>
2
then
ct
=
2
end
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
ct
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
then
return
end
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
sg
:
GetCount
()
==
0
or
(
sg
:
GetCount
()
>
1
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
))
then
return
end
if
ft
>=
g
:
GetCount
()
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg2
=
sg
:
Select
(
tp
,
ft
,
ft
,
nil
)
Duel
.
SpecialSummon
(
sg2
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
expansions/script/c50000076.lua
0 → 100644
View file @
1c7adf8b
--必杀技的修行
local
m
=
50000076
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
aux
.
exccon
)
e2
:
SetCost
(
cm
.
smcost
)
e2
:
SetTarget
(
cm
.
smtg
)
e2
:
SetOperation
(
cm
.
smop
)
c
:
RegisterEffect
(
e2
)
end
cm
.
fit_monster
=
{
50000077
}
function
cm
.
filter
(
c
,
e
,
tp
,
m1
,
m2
,
ft
)
if
not
c
:
IsCode
(
50000077
)
or
bit
.
band
(
c
:
GetType
(),
0x81
)
~=
0x81
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
false
,
true
)
then
return
false
end
local
mg
=
m1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
c
,
c
)
mg
:
Merge
(
m2
)
if
ft
>
0
then
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
c
:
GetLevel
(),
c
)
else
return
mg
:
IsExists
(
cm
.
mfilterf
,
1
,
nil
,
tp
,
mg
,
c
)
end
end
function
cm
.
mfilterf
(
c
,
tp
,
mg
,
rc
)
if
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
GetSequence
()
<
5
then
Duel
.
SetSelectedCard
(
c
)
return
mg
:
CheckWithSumGreater
(
Card
.
GetRitualLevel
,
rc
:
GetLevel
(),
rc
)
else
return
false
end
end
function
cm
.
mfilter
(
c
)
return
c
:
GetLevel
()
>
0
and
c
:
IsSetCard
(
0x50c
)
and
c
:
IsAbleToRemove
()
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
,
ft
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg1
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
cm
.
mfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg1
,
mg2
,
ft
)
local
tc
=
tg
:
GetFirst
()
if
tc
then
local
mg
=
mg1
:
Filter
(
Card
.
IsCanBeRitualMaterial
,
tc
,
tc
)
mg
:
Merge
(
mg2
)
local
mat
=
nil
if
ft
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
mat
=
mg
:
FilterSelect
(
tp
,
cm
.
mfilterf
,
1
,
1
,
nil
,
tp
,
mg
,
tc
)
Duel
.
SetSelectedCard
(
mat
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
mat2
=
mg
:
SelectWithSumGreater
(
tp
,
Card
.
GetRitualLevel
,
tc
:
GetLevel
(),
tc
)
mat
:
Merge
(
mat2
)
end
tc
:
SetMaterial
(
mat
)
Duel
.
ReleaseRitualMaterial
(
mat
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
false
,
true
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
---
function
cm
.
smcosfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x50c
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
smcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
smcosfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
smcosfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
g1
:
AddCard
(
e
:
GetHandler
())
Duel
.
Remove
(
g1
,
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
smfilter
(
c
)
return
c
:
IsSetCard
(
0x50c
)
and
(
c
:
IsSummonable
(
true
,
nil
)
or
c
:
IsMSetable
(
true
,
nil
))
end
function
cm
.
smtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
smfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
cm
.
smop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
smfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
:
IsSummonable
(
true
,
nil
)
then
if
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
)
~=
0
and
tc
:
IsType
(
TYPE_DUAL
)
then
tc
:
EnableDualState
()
end
end
end
end
\ No newline at end of file
expansions/script/c50000077.lua
0 → 100644
View file @
1c7adf8b
--静止的光景
local
m
=
50000077
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
cm
.
datg
)
e1
:
SetOperation
(
cm
.
daop
)
c
:
RegisterEffect
(
e1
)
--SpecialSummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetHintTiming
(
0
,
0x1e0
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
cm
.
spcost
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e2
)
--atkup
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
cm
.
val
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
dafilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_DUAL
)
and
c
:
IsSetCard
(
0x50c
)
and
not
c
:
IsDualState
()
end
function
cm
.
datg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
dafilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
dafilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
cm
.
dafilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
cm
.
daop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
cm
.
dafilter
(
tc
)
then
tc
:
EnableDualState
()
end
end
--
function
cm
.
spcfilter
(
c
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsAbleToRemoveAsCost
()
and
c
:
GetLevel
()
>
0
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
rg
=
Duel
.
GetMatchingGroup
(
cm
.
spcfilter
,
tp
,
LOCATION_GRAVE
,
0
,
e
:
GetHandler
())
if
chk
==
0
then
return
rg
:
CheckWithSumEqual
(
Card
.
GetLevel
,
8
,
1
,
rg
:
GetCount
())
and
e
:
GetHandler
():
IsReleasable
()
end
Duel
.
Release
(
e
:
GetHandler
(),
REASON_COST
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
rm
=
rg
:
SelectWithSumEqual
(
tp
,
Card
.
GetLevel
,
8
,
1
,
rg
:
GetCount
())
Duel
.
Remove
(
rm
,
POS_FACEUP
,
REASON_COST
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_SYNCHRO
,
tp
,
false
,
false
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_SYNCHRO
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
tc
:
CompleteProcedure
()
end
end
--
function
cm
.
val
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
cm
.
filter
,
c
:
GetControler
(),
LOCATION_GRAVE
+
LOCATION_MZONE
,
0
,
nil
)
*
300
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x50c
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
end
\ No newline at end of file
expansions/script/c50008200.lua
0 → 100644
View file @
1c7adf8b
--点兔 香风智乃
local
m
=
50008200
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
mil
.
rabat_return
(
c
,
m
,
1
)
--to hand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetTarget
(
cm
.
tg
)
e1
:
SetOperation
(
cm
.
op
)
c
:
RegisterEffect
(
e1
)
--meet
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
m
..
1
)
e2
:
SetCondition
(
mil
.
return_con
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
+
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
cm
.
sumfilter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsSummonable
(
true
,
nil
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
>
0
and
tc
:
IsLocation
(
LOCATION_HAND
)
then
if
Duel
.
IsExistingMatchingCard
(
cm
.
sumfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
sumfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
Summon
(
tp
,
g
:
GetFirst
(),
true
,
nil
)
end
end
end
----
function
cm
.
thfilter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c50008201.lua
0 → 100644
View file @
1c7adf8b
--点兔 保登心爱
local
m
=
50008201
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
mil
.
rabat_return
(
c
,
m
,
1
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_TO_HAND
)
e3
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
m
..
1
)
e3
:
SetCondition
(
mil
.
return_con
)
e3
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
)
e3
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
Draw
(
tp
,
2
,
REASON_EFFECT
)
if
ct
~=
0
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
end
end
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
setfilter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
()
end
expansions/script/c50008202.lua
0 → 100644
View file @
1c7adf8b
--点兔 天天座理世
local
m
=
50008202
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
mil
.
rabat_return
(
c
,
m
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
2
end
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SortDecktop
(
tp
,
tp
,
3
)
end
)
c
:
RegisterEffect
(
e1
)
--meet
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
m
..
1
)
e2
:
SetCondition
(
mil
.
return_con
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_GRAVE
and
chkc
:
GetControler
()
==
tp
and
chkc
:
IsAbleToDeck
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
0
,
REASON_EFFECT
)
end
end
)
c
:
RegisterEffect
(
e2
)
end
expansions/script/c50008203.lua
0 → 100644
View file @
1c7adf8b
--点兔 宇治松千夜
local
m
=
50008203
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
mil
.
rabat_return
(
c
,
m
,
1
)
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1e0
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g2
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g1
,
2
,
0
,
0
)
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
end
end
)
c
:
RegisterEffect
(
e1
)
--meet
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
m
..
1
)
e2
:
SetCondition
(
mil
.
return_con
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
2
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
0
end
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
==
0
then
return
end
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
<
3
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
mil
.
is_series
(
tc
,
'rabbit'
)
then
Duel
.
SortDecktop
(
tp
,
1
-
tp
,
3
)
end
end
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
mil
.
is_series
(
c
,
'rabbit'
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsAbleToHand
()
end
\ No newline at end of file
expansions/script/c50008204.lua
0 → 100644
View file @
1c7adf8b
--点兔 桐间纱路
local
m
=
50008204
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
mil
.
rabat_return
(
c
,
m
,
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
)
c
:
RegisterEffect
(
e1
)
--meet
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
m
..
1
)
e2
:
SetCondition
(
mil
.
return_con
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
GetAttack
()
>
0
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetValue
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
end
end
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetAttack
()
>
0
end
\ No newline at end of file
expansions/script/c50008205.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来点兔子吗
local
m
=
50008205
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_TO_HAND
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
function
(
c
,
tp
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
,
1
,
nil
,
tp
)
end
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
==
0
then
return
end
local
tc
=
Duel
.
GetOperatedGroup
():
GetFirst
()
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
if
mil
.
is_series
(
tc
,
'rabbit'
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
else
Duel
.
BreakEffect
()
Duel
.
Destroy
(
c
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
Duel
.
ShuffleHand
(
tp
)
end
)
c
:
RegisterEffect
(
e2
)
--inactivatable
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_INACTIVATE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetValue
(
function
(
e
,
ct
)
local
te
=
Duel
.
GetChainInfo
(
ct
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
mil
.
is_series
(
tc
,
'rabbit'
)
and
(
tc
:
IsLocation
(
LOCATION_ONFIELD
)
or
tc
:
IsLocation
(
LOCATION_HAND
))
end
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
thfilter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
\ No newline at end of file
expansions/script/c50008206.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来旅游吗
local
m
=
50008206
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--atk up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
function
(
e
,
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
end
)
e1
:
SetValue
(
function
(
e
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
nil
)
local
ct
=
g
:
GetCount
()
return
ct
*
300
end
)
c
:
RegisterEffect
(
e1
)
--actlimit
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetValue
(
function
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
)
e2
:
SetCondition
(
function
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
local
a
=
Duel
.
GetAttacker
()
local
d
=
Duel
.
GetAttackTarget
()
return
(
a
and
cm
.
cfilter
(
a
,
tp
))
or
(
d
and
cm
.
cfilter
(
d
,
tp
))
end
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
m
)
e3
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousLocation
(
LOCATION_FZONE
)
end
)
e3
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
)
e3
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_TO_HAND
)
c
:
RegisterEffect
(
e5
)
end
function
cm
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsControler
(
tp
)
end
function
cm
.
thfilter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsAbleToHand
()
end
\ No newline at end of file
expansions/script/c50008207.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来点咖啡吗
local
m
=
50008207
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
2
end
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
3
then
return
end
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
3
)
Duel
.
ConfirmCards
(
tp
,
g
)
if
g
:
IsExists
(
cm
.
filter
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
FilterSelect
(
tp
,
cm
.
filter
,
1
,
1
,
nil
)
Duel
.
DisableShuffleCheck
()
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
SortDecktop
(
tp
,
tp
,
2
)
else
Duel
.
SortDecktop
(
tp
,
tp
,
3
)
end
end
)
c
:
RegisterEffect
(
e1
)
--may not return
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
m
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
c
:
RegisterEffect
(
e2
)
--extra summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_EXTRA_SUMMON_COUNT
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_HAND
+
LOCATION_MZONE
,
0
)
e3
:
SetTarget
(
function
(
e
,
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
mil
.
is_series
(
c
,
'rabbit'
)
end
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
filter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsAbleToHand
()
end
\ No newline at end of file
expansions/script/c50008208.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来运动吗
local
m
=
50008208
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DEFCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_DAMAGE_STEP
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsControler
(
tp
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetValue
(
500
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetValue
(
function
(
e
,
re
)
return
e
:
GetOwnerPlayer
()
~=
re
:
GetOwnerPlayer
()
end
)
e3
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e3
:
SetOwnerPlayer
(
tp
)
tc
:
RegisterEffect
(
e3
)
end
end
)
c
:
RegisterEffect
(
e1
)
--destroy replace
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
and
eg
:
IsExists
(
cm
.
repfilter
,
1
,
nil
,
tp
)
end
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
)
e2
:
SetValue
(
function
(
e
,
c
)
return
cm
.
repfilter
(
c
,
e
:
GetHandlerPlayer
())
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_EFFECT
)
end
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
repfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsControler
(
tp
)
and
c
:
IsReason
(
REASON_EFFECT
+
REASON_BATTLE
)
end
function
cm
.
filter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsFaceup
()
end
\ No newline at end of file
expansions/script/c50008209.lua
0 → 100644
View file @
1c7adf8b
--点兔 提比
local
m
=
50008209
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
m
..
1
)
e1
:
SetCost
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
and
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_HAND
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
false
end
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
g
and
g
:
IsExists
(
cm
.
tfilter
,
1
,
nil
,
tp
)
and
Duel
.
IsChainNegatable
(
ev
)
end
)
e2
:
SetCost
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
end
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
tfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
50008200
)
and
c
:
IsAbleToHand
()
end
\ No newline at end of file
expansions/script/c50008210.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来听音乐吗
local
m
=
50008210
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
function
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
end
,
2
,
2
)
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetCondition
(
function
(
e
)
return
e
:
GetHandler
():
IsLinkState
()
end
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
--special summon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetCountLimit
(
1
,
m
)
e4
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
>
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
e
:
SetLabel
(
Duel
.
SelectOption
(
tp
,
70
,
71
,
72
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
)
e4
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
<=
1
then
return
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
)
Duel
.
ConfirmCards
(
tp
,
g
)
local
sgnum
=
0
local
opt
=
e
:
GetLabel
()
if
opt
==
0
then
sgnum
=
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
):
GetCount
()
elseif
opt
==
1
then
sgnum
=
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_SPELL
):
GetCount
()
elseif
opt
==
2
then
sgnum
=
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_TRAP
):
GetCount
()
end
if
sgnum
>
1
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
local
sc
=
sg
:
GetFirst
()
local
effectnum
=
0
if
sc
then
if
zone
~=
0
and
sc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
and
(
not
sc
:
IsAbleToHand
()
or
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
)))
then
effectnum
=
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
else
effectnum
=
Duel
.
SendtoHand
(
sc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sc
)
end
local
rthg
=
Duel
.
GetMatchingGroup
(
cm
.
rthfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
e
:
GetHandler
())
if
effectnum
~=
0
and
rthg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
rthgs
=
rthg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
rthgs
,
nil
,
REASON_EFFECT
)
end
end
end
end
)
c
:
RegisterEffect
(
e4
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
,
zone
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsAbleToHand
()
or
(
zone
~=
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)))
end
function
cm
.
rthfilter
(
c
)
return
c
:
IsFaceup
()
and
mil
.
is_series
(
c
,
'rabbit'
)
end
\ No newline at end of file
expansions/script/c50008211.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来看雪景吗
local
m
=
50008211
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
function
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
end
,
2
,
2
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_EXTRA
)
>
2
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
local
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
0
),
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
),
aux
.
Stringid
(
m
,
3
))
e
:
SetLabel
(
op
)
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_EXTRA
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
tpe
=
0
if
e
:
GetLabel
()
==
0
then
tpe
=
TYPE_FUSION
elseif
e
:
GetLabel
()
==
1
then
tpe
=
TYPE_SYNCHRO
elseif
e
:
GetLabel
()
==
2
then
tpe
=
TYPE_XYZ
else
tpe
=
TYPE_LINK
end
local
sg
=
g
:
Filter
(
Card
.
IsType
,
nil
,
tpe
)
local
ct
=
sg
:
GetClassCount
(
Card
.
GetCode
)
if
ct
>
2
then
local
drmum
=
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
local
rthg
=
Duel
.
GetMatchingGroup
(
cm
.
rthfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
e
:
GetHandler
())
if
drmun
~=
0
and
rthg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
4
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
rthgs
=
rthg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
rthgs
,
nil
,
REASON_EFFECT
)
end
end
end
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
5
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
e
:
GetHandler
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
3
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
3
,
0
,
0
)
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
not
tg
or
tg
:
FilterCount
(
Card
.
IsRelateToEffect
,
nil
,
e
)
~=
3
then
return
end
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
local
g
=
Duel
.
GetOperatedGroup
()
local
ct
=
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
+
LOCATION_EXTRA
)
if
ct
==
3
then
Duel
.
BreakEffect
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
p
,
LOCATION_HAND
,
0
,
nil
)
if
g
:
GetCount
()
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
p
,
HINTMSG_TODECK
)
local
sg
=
g
:
Select
(
tp
,
2
,
2
,
nil
)
Duel
.
SendtoDeck
(
sg
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
tp
,
tp
,
2
)
else
local
hg
=
Duel
.
GetFieldGroup
(
p
,
LOCATION_HAND
,
0
)
local
ct
=
Duel
.
SendtoDeck
(
hg
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
tp
,
tp
,
ct
)
end
end
end
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
rthfilter
(
c
)
return
c
:
IsFaceup
()
and
mil
.
is_series
(
c
,
'rabbit'
)
end
function
cm
.
filter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
\ No newline at end of file
expansions/script/c50008212.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来晾衣服吗
local
m
=
50008212
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_LINK
),
2
)
c
:
EnableReviveLimit
()
--negate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
Duel
.
IsChainNegatable
(
ev
)
end
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
eg
,
1
,
0
,
0
)
end
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
re
:
GetHandler
()
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
<
3
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
3
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
3
)
local
gc
=
g
:
Filter
(
cm
.
ttfilter
,
nil
)
if
g
:
GetClassCount
(
Card
.
GetCode
)
==
3
and
gc
:
GetCount
()
>
1
then
if
Duel
.
NegateActivation
(
ev
)
and
ec
:
IsRelateToEffect
(
re
)
then
ec
:
CancelToGrave
()
Duel
.
SendtoDeck
(
ec
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
)
c
:
RegisterEffect
(
e1
)
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
ttfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
1
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
ttfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
ShuffleDeck
(
tp
)
Duel
.
MoveSequence
(
tc
,
0
)
Duel
.
ConfirmDecktop
(
tp
,
1
)
end
end
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
ttfilter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
end
\ No newline at end of file
expansions/script/c50008213.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来跳舞吗
local
m
=
50008213
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkType
,
TYPE_EFFECT
),
2
)
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
==
0
then
return
end
Duel
.
ConfirmDecktop
(
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
1
)
local
tc
=
g
:
GetFirst
()
if
mil
.
is_series
(
tc
,
'rabbit'
)
and
tc
:
IsType
(
TYPE_MONSTER
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
Duel
.
MoveSequence
(
tc
,
1
)
end
end
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_BATTLE_DESTROYING
)
e2
:
SetCondition
(
aux
.
bdocon
)
e2
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
>
0
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CARDTYPE
)
e
:
SetLabel
(
Duel
.
SelectOption
(
tp
,
70
,
71
,
72
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
0
,
1
-
tp
,
LOCATION_HAND
)
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_DECK
)
==
0
or
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
==
0
then
return
end
Duel
.
ConfirmDecktop
(
1
-
tp
,
1
)
local
g
=
Duel
.
GetDecktopGroup
(
1
-
tp
,
1
)
local
tc
=
g
:
GetFirst
()
local
opt
=
e
:
GetLabel
()
if
(
opt
==
0
and
tc
:
IsType
(
TYPE_MONSTER
))
or
(
opt
==
1
and
tc
:
IsType
(
TYPE_SPELL
))
or
(
opt
==
2
and
tc
:
IsType
(
TYPE_TRAP
))
then
local
hg
=
Duel
.
GetFieldGroup
(
p
,
0
,
LOCATION_HAND
)
local
sg
=
hg
:
RandomSelect
(
tp
,
1
)
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
ShuffleHand
(
1
-
tp
)
end
end
)
c
:
RegisterEffect
(
e2
)
end
expansions/script/c50008214.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来游泳吗?
local
m
=
50008214
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
c
:
SetSPSummonOnce
(
m
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
function
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
end
,
4
,
true
)
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
function
(
e
,
se
,
sp
,
st
)
return
e
:
GetHandler
():
GetLocation
()
~=
LOCATION_EXTRA
end
)
c
:
RegisterEffect
(
e1
)
--special summon rule
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetCondition
(
function
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
return
mg
:
IsExists
(
cm
.
fselect
,
1
,
nil
,
tp
,
mg
,
sg
)
end
)
e2
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
sg
=
Group
.
CreateGroup
()
while
sg
:
GetCount
()
<
4
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
mg
:
FilterSelect
(
tp
,
cm
.
fselect
,
1
,
1
,
sg
,
tp
,
mg
,
sg
)
sg
:
Merge
(
g
)
end
local
cg
=
sg
:
Filter
(
Card
.
IsFacedown
,
nil
)
if
cg
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
end
Duel
.
SendtoHand
(
sg
,
nil
,
2
,
REASON_COST
)
end
)
c
:
RegisterEffect
(
e2
)
--return hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetCategory
(
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToHand
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
g
:
GetCount
(),
0
,
0
)
end
)
e3
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
end
)
c
:
RegisterEffect
(
e3
)
--spsummon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
65536818
,
2
))
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
)
e4
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
3
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
)
e4
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>=
3
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
3
,
3
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_ATOHAND
)
local
tc
=
sg
:
Select
(
1
-
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
ShuffleDeck
(
tp
)
sg
:
RemoveCard
(
tc
)
local
tcs
=
sg
:
GetFirst
()
local
num
=
0
while
tcs
do
Duel
.
MoveSequence
(
tcs
,
0
)
tcs
=
sg
:
GetNext
()
num
=
num
+
1
end
Duel
.
SortDecktop
(
tp
,
tp
,
num
)
end
end
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EVENT_REMOVE
)
c
:
RegisterEffect
(
e5
)
local
e6
=
e4
:
Clone
()
e6
:
SetCode
(
EVENT_TO_DECK
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
spfilter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsCanBeFusionMaterial
()
and
(
c
:
IsAbleToExtraAsCost
()
or
c
:
IsAbleToHandAsCost
())
end
function
cm
.
fselect
(
c
,
tp
,
mg
,
sg
)
sg
:
AddCard
(
c
)
local
res
=
false
if
sg
:
GetCount
()
<
4
then
res
=
mg
:
IsExists
(
cm
.
fselect
,
1
,
sg
,
tp
,
mg
,
sg
)
else
res
=
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
)
>
0
end
sg
:
RemoveCard
(
c
)
return
res
end
function
cm
.
thfilter
(
c
)
return
mil
.
is_series
(
c
,
'rabbit'
)
and
c
:
IsAbleToHand
()
end
\ No newline at end of file
expansions/script/c50008215.lua
0 → 100644
View file @
1c7adf8b
--请问您今天要来点恶作剧吗
local
m
=
50008215
local
cm
=
_G
[
"c"
..
m
]
local
mil
=
require
(
"expansions/script/Millux"
)
cm
.
is_series_with_rabbit
=
true
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
0x1c0
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
)
c
:
RegisterEffect
(
e1
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e3
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
==
e
:
GetLabelObject
()
end
)
e3
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
):
GetFirst
()
if
c
:
IsRelateToEffect
(
re
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
re
)
then
c
:
SetCardTarget
(
tc
)
end
end
)
e3
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e3
)
--atk up
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e4
:
SetTarget
(
cm
.
tg
)
e4
:
SetValue
(
800
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e4
:
Clone
()
e5
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
c
:
RegisterEffect
(
e5
)
--immune effect
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_FIELD
)
e6
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e6
:
SetRange
(
LOCATION_SZONE
)
e6
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e6
:
SetTarget
(
cm
.
tg
)
e6
:
SetValue
(
function
(
e
,
re
)
return
re
:
GetOwnerPlayer
()
~=
e
:
GetHandlerPlayer
()
end
)
c
:
RegisterEffect
(
e6
)
--disable
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_FIELD
)
e7
:
SetCode
(
EFFECT_DISABLE
)
e7
:
SetRange
(
LOCATION_SZONE
)
e7
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e7
:
SetTarget
(
cm
.
tg
)
c
:
RegisterEffect
(
e7
)
--destroy2
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e8
:
SetRange
(
LOCATION_SZONE
)
e8
:
SetCode
(
EVENT_LEAVE_FIELD
)
e8
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
return
tc
and
eg
:
IsContains
(
tc
)
end
)
e8
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
)
c
:
RegisterEffect
(
e8
)
--cannot trigger
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_SZONE
)
e9
:
SetTargetRange
(
1
,
0
)
e9
:
SetValue
(
function
(
e
,
re
,
tp
)
local
c
=
re
:
GetHandler
()
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
not
mil
.
is_series
(
c
,
'rabbit'
)
end
)
c
:
RegisterEffect
(
e9
)
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
mil
.
is_series
(
c
,
'rabbit'
)
end
function
cm
.
tg
(
e
,
c
)
return
e
:
GetHandler
():
IsHasCardTarget
(
c
)
end
\ No newline at end of file
expansions/script/c98721010.lua
0 → 100644
View file @
1c7adf8b
--抽卡蜥蜴+帽子戏法师
function
c98721010
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
98721010
)
e1
:
SetTarget
(
c98721010
.
destg
)
e1
:
SetOperation
(
c98721010
.
desop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_EXTRA
)
e2
:
SetCountLimit
(
1
,
98721110
)
e2
:
SetCondition
(
c98721010
.
spcon
)
c
:
RegisterEffect
(
e2
)
end
function
c98721010
.
desfilter
(
c
)
return
c
:
IsSetCard
(
0xf1
)
and
not
c
:
IsCode
(
98721010
)
end
function
c98721010
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c98721010
.
desfilter
,
tp
,
LOCATION_PZONE
,
0
,
1
,
e
:
GetHandler
())
and
e
:
GetHandler
():
IsDestructable
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c98721010
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
~=
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
function
c98721010
.
spfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xf1
)
and
c
:
GetCode
()
~=
98721010
end
function
c98721010
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
return
Duel
.
GetLocationCount
(
c
:
GetControler
(),
LOCATION_MZONE
)
>
0
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
and
Duel
.
IsExistingMatchingCard
(
c98721010
.
spfilter
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
nil
)
end
expansions/script/c98721015.lua
0 → 100644
View file @
1c7adf8b
--娱乐奥义 翠玉
function
c98721015
.
initial_effect
(
c
)
--link summon
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
c98721014
.
matfilter
,
2
,
2
)
--ret&draw
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
581014
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetTarget
(
c581014
.
target
)
e1
:
SetOperation
(
c581014
.
operation
)
c
:
RegisterEffect
(
e1
)
end
c98721014
.
em
=
true
function
c98721014
.
isem
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
em
end
function
c98721014
.
matfilter
(
c
)
return
c98721014
.
isem
(
c
)
and
c
:
GetLink
()
<
2
end
expansions/strings.conf
View file @
1c7adf8b
...
...
@@ -14,9 +14,11 @@
#布偶 11
#named_with_Ld 灵都
#named_with_Dw 蝶舞
#named_with_Fulan 芙兰
#Mizuhashi Parsee 12 0xfb0-0xfbf
!
setname
0
xfb0
六曜
!
setname
0
xfb8
水歌
!
setname
0
xfba
LA
!
setname
0
xfbc
静仪式
!
setname
0
xfbe
奇迹糕点
...
...
@@ -104,6 +106,7 @@
#兔锅 222
#named_with_Shirasawa_Tama 白泽球
#named_with_Solid Solid
#named_with_Riviera Riviera
#Nemoma 337 0x440-0x44f
!
setname
0
x442
动物朋友
...
...
@@ -134,6 +137,8 @@
#奇犽 500 0x500-0x50f
!
setname
0
x50c
奇犽
#is_series_with_rabbit 点兔
#Miyuki 573 0x570-0x57f global:miyuki
!
setname
0
x570
库拉丽丝 クラリス
...
...
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