Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ai
ygopro-222DIY-cards
Commits
4be6dfce
Commit
4be6dfce
authored
Jul 06, 2022
by
Tachibana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1145141919810
parent
0541dfd4
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
88 additions
and
78 deletions
+88
-78
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c10700221.lua
expansions/script/c10700221.lua
+24
-36
expansions/script/c10700231.lua
expansions/script/c10700231.lua
+2
-2
expansions/script/c10701051.lua
expansions/script/c10701051.lua
+1
-1
expansions/script/c10701061.lua
expansions/script/c10701061.lua
+2
-1
expansions/script/c10701071.lua
expansions/script/c10701071.lua
+1
-2
expansions/script/c10701081.lua
expansions/script/c10701081.lua
+4
-3
expansions/script/c10701091.lua
expansions/script/c10701091.lua
+2
-2
expansions/script/c10701131.lua
expansions/script/c10701131.lua
+14
-13
expansions/script/c10701141.lua
expansions/script/c10701141.lua
+3
-2
expansions/script/c10701151.lua
expansions/script/c10701151.lua
+3
-3
expansions/script/c10701161.lua
expansions/script/c10701161.lua
+15
-13
expansions/script/c71402001.lua
expansions/script/c71402001.lua
+17
-0
No files found.
expansions/222DIY.cdb
View file @
4be6dfce
No preview for this file type
expansions/script/c10700221.lua
View file @
4be6dfce
...
...
@@ -8,6 +8,7 @@ function cm.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e1
:
SetValue
(
cm
.
splimit
)
c
:
RegisterEffect
(
e1
)
--special summon rule
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -22,7 +23,6 @@ function cm.initial_effect(c)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
...
...
@@ -62,21 +62,17 @@ function cm.initial_effect(c)
e6
:
SetCondition
(
cm
.
spfcon2
)
c
:
RegisterEffect
(
e6
)
end
--SpecialSummon self
--SpecialSummon rule
function
cm
.
splimit
(
e
,
se
,
sp
,
st
)
return
not
e
:
GetHandler
():
IsLocation
(
LOCATION_EXTRA
)
end
function
cm
.
sprfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAbleTo
Deck
AsCost
()
and
c
:
IsSetCard
(
0x480
,
0xa01
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsFaceup
()
and
c
:
IsAbleTo
Extra
AsCost
()
and
c
:
IsSetCard
(
0x480
,
0xa01
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
sprfilter0
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsAbleTo
Grave
AsCost
()
and
c
:
IsSetCard
(
0xa01
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
c
:
IsFaceup
()
and
c
:
IsAbleTo
Extra
AsCost
()
and
c
:
IsSetCard
(
0xa01
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
Duel
.
GetMZoneCount
(
1
-
tp
,
c
,
tp
)
>
0
end
function
cm
.
sprfilter1
(
c
,
tp
,
g
,
sc
)
return
c
:
IsType
(
TYPE_SYNCHRO
)
and
g
:
IsExists
(
cm
.
sprfilter2
,
1
,
c
,
tp
,
c
,
sc
)
end
function
cm
.
sprfilter2
(
c
,
tp
,
mc
,
sc
)
local
sg
=
Group
.
FromCards
(
c
,
mc
)
return
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
sc
)
>
0
end
function
cm
.
sprcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
...
...
@@ -86,15 +82,14 @@ function cm.sprcon(e,c)
end
function
cm
.
sprop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g0
=
Duel
.
GetMatchingGroup
(
cm
.
sprfilter0
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
mc
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
mc
,
REASON_COST
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
dg
=
g0
:
Select
(
tp
,
1
,
1
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
sprfilter
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
m1
=
g
:
FilterSelect
(
tp
,
Card
.
IsType
,
1
,
1
,
nil
,
TYPE_SYNCHRO
):
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
dg
=
g
:
Select
(
tp
,
1
,
1
,
m1
)
dg
:
AddCard
(
m1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
dg
:
Merge
(
g
:
Select
(
tp
,
1
,
1
,
m1
))
Duel
.
SendtoDeck
(
dg
,
nil
,
2
,
REASON_COST
)
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
,
0
,
99
)
end
...
...
@@ -102,12 +97,11 @@ end
function
cm
.
tfcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsReleasable
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsReleasable
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsReleasable
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
cm
.
tffilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
not
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsSetCard
(
0x109
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
)
return
c
:
IsType
(
TYPE_SPELL
)
and
not
c
:
IsType
(
TYPE_FIELD
)
and
c
:
IsSetCard
(
0x480
,
0xa01
)
and
not
c
:
IsForbidden
()
end
function
cm
.
tftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
...
...
@@ -129,14 +123,14 @@ function cm.spcon(e)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
sg
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_HAND
,
0
,
nil
)
if
chk
==
0
then
return
#
sg
>
0
end
if
chk
==
0
then
return
sg
:
GetCount
()
>
0
end
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x480
,
0xa01
)
and
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Get
MZoneCount
(
tp
,
e
:
GetHandler
()
)
>
1
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
if
chk
==
0
then
return
Duel
.
Get
LocationCount
(
tp
,
LOCATION_MZONE
)
>
1
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
...
...
@@ -157,13 +151,14 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
,
true
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
,
true
)
tc
=
g1
:
GetNext
()
end
Duel
.
SpecialSummonComplete
()
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -201,22 +196,15 @@ function cm.spfcon2(e)
local
c
=
e
:
GetHandler
()
return
Duel
.
IsExistingMatchingCard
(
cm
.
ccfilter
,
c
:
GetControler
(),
LOCATION_SZONE
,
0
,
2
,
nil
)
end
function
cm
.
costfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xa01
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
tp
,
c
:
GetCode
())
end
function
cm
.
costfilter2
(
c
,
tp
,
code
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xa01
)
and
c
:
IsReleasable
()
and
c
:
IsControler
(
tp
)
and
not
c
:
IsCode
(
code
)
function
cm
.
costfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0xa01
)
and
c
:
IsReleasable
()
end
function
cm
.
spfcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckReleaseGroup
(
tp
,
cm
.
costfilter
,
1
,
nil
,
tp
)
end
Duel
.
SendtoDeck
(
e
:
GetHandler
(),
nil
,
SEQ_DECKSHUFFLE
,
REASON_COST
)
local
hg
=
Duel
.
GetMatchingGroup
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
hg
:
CheckSubGroup
(
aux
.
dncheck
,
2
,
99
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g1
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
costfilter
,
1
,
1
,
nil
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g2
=
Duel
.
SelectReleaseGroup
(
tp
,
cm
.
costfilter2
,
1
,
1
,
nil
,
tp
,
g1
:
GetFirst
():
GetHandler
():
GetCode
())
g1
:
Merge
(
g2
)
Duel
.
Release
(
g1
,
REASON_COST
)
local
g
=
hg
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
2
,
2
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
cm
.
spftg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
...
expansions/script/c10700231.lua
View file @
4be6dfce
...
...
@@ -20,7 +20,7 @@ function cm.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
m
+
1
)
e3
:
SetCountLimit
(
1
,
m
)
e3
:
SetCondition
(
cm
.
tgcon
)
e3
:
SetTarget
(
cm
.
tgtg
)
e3
:
SetOperation
(
cm
.
tgop
)
...
...
@@ -105,7 +105,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
and
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DES
REPLACE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DES
TROY
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
...
...
expansions/script/c10701051.lua
View file @
4be6dfce
...
...
@@ -56,7 +56,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
--
function
cm
.
excon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
,
10701141
)
end
...
...
expansions/script/c10701061.lua
View file @
4be6dfce
...
...
@@ -41,6 +41,7 @@ function c10701061.initial_effect(c)
e4
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e4
)
local
e41
=
e4
:
Clone
()
e41
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e41
:
SetCode
(
EVENT_TO_HAND
)
e41
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e41
:
SetCondition
(
cm
.
excon
)
...
...
@@ -117,5 +118,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
--
function
cm
.
excon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
,
10701141
)
end
\ No newline at end of file
expansions/script/c10701071.lua
View file @
4be6dfce
...
...
@@ -110,7 +110,7 @@ function cm.spfilter(c,e,tp)
end
--
function
cm
.
excon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
,
10701141
)
end
...
...
@@ -121,4 +121,3 @@ end
expansions/script/c10701081.lua
View file @
4be6dfce
...
...
@@ -18,7 +18,7 @@ function cm.initial_effect(c)
--tograve and SpecialSummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TO
DECK
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TO
GRAVE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
...
...
@@ -29,6 +29,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EVENT_TO_HAND
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCondition
(
cm
.
excon
)
c
:
RegisterEffect
(
e4
)
end
...
...
@@ -52,7 +53,7 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
g
:
GetFirst
():
RegisterEffect
(
e1
)
g
:
GetFirst
():
RegisterEffect
(
e1
)
end
end
--SpecialSummon
...
...
@@ -89,7 +90,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
--
function
cm
.
excon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
,
10701141
)
end
...
...
expansions/script/c10701091.lua
View file @
4be6dfce
...
...
@@ -37,6 +37,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e4
)
local
e5
=
e3
:
Clone
()
e5
:
SetCode
(
EVENT_TO_HAND
)
e5
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e5
:
SetCondition
(
cm
.
excon
)
c
:
RegisterEffect
(
e5
)
end
...
...
@@ -86,7 +87,6 @@ function cm.tgcon2(e,tp,eg,ep,ev,re,r,rp)
end
--
function
cm
.
excon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
)
return
re
and
re
:
GetHandler
():
IsCode
(
10701101
,
10701141
)
end
expansions/script/c10701131.lua
View file @
4be6dfce
...
...
@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function
cm
.
initial_effect
(
c
)
--tograve
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
...
...
@@ -19,7 +19,6 @@ function cm.initial_effect(c)
--set
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
--e3:SetCategory(CATEGORY_CONTROL)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetCountLimit
(
1
,
m
+
1
)
...
...
@@ -55,28 +54,30 @@ function cm.fselect(g)
return
aux
.
dncheck
(
g
)
end
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
c
:
GetControler
()
,
LOCATION_GRAVE
,
0
,
nil
,
0x3481
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
0x3481
)
local
ct
=
0
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_SPELL
)
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_TRAP
)
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
:
GetCount
()
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_SPELL
)
:
GetCount
()
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_TRAP
)
:
GetCount
()
>
0
then
ct
=
ct
+
1
end
local
hg
=
Duel
.
GetMatchingGroup
(
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
and
ct
>
0
and
hg
:
GetCount
()
>
0
and
hg
:
CheckSubGroup
(
cm
.
fselect
,
ct
,
99
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
ct
,
tp
,
LOCATION_DECK
)
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
c
:
GetControler
()
,
LOCATION_GRAVE
,
0
,
nil
,
0x3481
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSetCard
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
0x3481
)
local
ct
=
0
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_SPELL
)
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_TRAP
)
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_MONSTER
)
:
GetCount
()
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_SPELL
)
:
GetCount
()
>
0
then
ct
=
ct
+
1
end
if
g
:
Filter
(
Card
.
IsType
,
nil
,
TYPE_TRAP
)
:
GetCount
()
>
0
then
ct
=
ct
+
1
end
if
ct
<
1
then
return
end
local
hg
=
Duel
.
GetMatchingGroup
(
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
tg
=
hg
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
false
,
ct
,
ct
)
local
sg1
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
sg2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
setfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
tg
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
tg
,
REASON_EFFECT
)
>
0
and
Duel
.
GetFieldGroupCount
(
c
:
GetControler
(),
LOCATION_ONFIELD
,
0
)
==
0
and
(
sg1
:
GetCount
()
>
0
or
sg2
:
GetCount
()
>
0
)
then
if
tg
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
tg
,
REASON_EFFECT
)
>
0
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
==
0
and
(
sg1
:
GetCount
()
>
0
or
sg2
:
GetCount
()
>
0
)
then
sg1
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
)
sg2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
setfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
op
=-
1
if
sg1
:
GetCount
()
>
0
and
sg2
:
GetCount
()
>
0
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
...
...
@@ -107,7 +108,7 @@ end
function
cm
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tn
=
Duel
.
GetTurnPlayer
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
tn
~=
tp
and
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
))
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
and
Duel
.
GetFieldGroupCount
(
1
-
tp
,
0
,
LOCATION_MZONE
)
>
0
return
tn
~=
tp
and
(
ph
==
PHASE_MAIN1
or
(
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
))
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
end
function
cm
.
setfilter1
(
c
)
return
c
:
IsSetCard
(
0x3481
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsSSetable
()
...
...
@@ -116,7 +117,7 @@ function cm.setfilter2(c)
return
c
:
IsType
(
TYPE_TRAP
)
and
not
c
:
IsType
(
TYPE_COUNTER
)
and
c
:
IsSSetable
()
end
function
cm
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
(
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter
,
tp
,
0
,
LOCATION_HAND
,
1
,
nil
)
or
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter2
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
))
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
if
chk
==
0
then
return
(
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter
1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
or
Duel
.
IsExistingMatchingCard
(
cm
.
setfilter2
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
))
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
end
function
cm
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c10701141.lua
View file @
4be6dfce
...
...
@@ -143,9 +143,10 @@ function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
cm
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
dam
=
Duel
.
GetMatchingGroupCount
(
Card
.
IsFacedown
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
*
100
local
dg
=
Duel
.
GetMatchingGroup
(
cm
.
damfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
dam
=
dg
:
GetClassCount
(
Card
.
GetCode
)
*
444
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
Duel
.
Damage
(
p
,
dam
,
REASON_EFFECT
)
>
0
and
Duel
.
GetFieldGroupCount
(
c
:
GetControler
()
,
LOCATION_ONFIELD
,
0
)
==
0
and
#
g
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
if
Duel
.
Damage
(
p
,
dam
,
REASON_EFFECT
)
>
0
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
==
0
and
#
g
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
...
...
expansions/script/c10701151.lua
View file @
4be6dfce
...
...
@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_REMOVE
)
e2
:
SetCountLimit
(
1
,
m
+
1
)
e2
:
SetCondition
(
cm
.
tgcon
)
--
e2:SetCondition(cm.tgcon)
e2
:
SetTarget
(
cm
.
tgtg
)
e2
:
SetOperation
(
cm
.
tgop
)
c
:
RegisterEffect
(
e2
)
...
...
@@ -65,7 +65,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_REMOVE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e
4
:
SetTargetRange
(
LOCATION_GRAVE
+
LOCATION_DECK
,
LOCATION_GRAVE
+
LOCATION_DECK
)
e
1
:
SetTargetRange
(
LOCATION_GRAVE
+
LOCATION_DECK
,
LOCATION_GRAVE
+
LOCATION_DECK
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
...
...
@@ -73,7 +73,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end
--disable
function
cm
.
cfilter
(
c
)
return
c
:
IsCode
()
and
c
:
IsFaceup
()
return
c
:
IsCode
(
10701101
,
10701141
)
and
c
:
IsFaceup
()
end
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
loc
,
pos
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
,
CHAININFO_TRIGGERING_POSITION
)
...
...
expansions/script/c10701161.lua
View file @
4be6dfce
...
...
@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
condition
)
e1
:
SetTarget
(
cm
.
target
)
...
...
@@ -30,13 +31,13 @@ function cm.cfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x3481
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
return
not
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x3481
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x3481
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
return
c
:
IsSetCard
(
0x3481
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
...
...
@@ -54,33 +55,34 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sc
=
sg
:
Select
(
tp
,
g
:
GetCount
(),
g
:
GetCount
(),
nil
)
if
Duel
.
SendtoGrave
(
sc
,
REASON_EFFECT
)
>
0
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
then
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_HAND
,
0
,
1
,
sg
:
GetCount
(),
nil
,
e
,
tp
):
GetFirst
()
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
--to grave
function
cm
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
>
0
and
Duel
.
Get
MatchingGroup
(
nil
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
>
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
,
0
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
aux
.
exccon
(
e
)
and
Duel
.
Get
FieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
<
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
end
function
cm
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x3481
)
and
c
:
Is
Type
(
TYPE_MONSTER
)
and
c
:
Is
Faceup
()
and
c
:
IsAbleToGrave
()
function
cm
.
tg
c
filter
(
c
)
return
c
:
IsSetCard
(
0x3481
)
and
c
:
IsFaceup
()
and
c
:
IsAbleToGrave
()
end
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tg
c
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
nil
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
2
,
tp
,
LOCATION_MZONE
)
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tg
c
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
#
g1
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToGrave
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
g1
:
Merge
(
g2
)
Duel
.
HintSelection
(
g1
)
if
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
>
0
and
Duel
.
Get
MatchingGroup
(
nil
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
>
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
,
0
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
if
Duel
.
SendtoGrave
(
g1
,
REASON_EFFECT
)
>
0
and
Duel
.
Get
FieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
<
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tgdfilter
,
tp
,
0
,
LOCATION_DECK
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
...
...
expansions/script/c71402001.lua
View file @
4be6dfce
...
...
@@ -24,6 +24,12 @@ function c71402001.initial_effect(c)
e2
:
SetCost
(
c71402001
.
cost2
)
e2
:
SetOperation
(
c71402001
.
op2
)
c
:
RegisterEffect
(
e2
)
--double tuner check
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e3
:
SetValue
(
c71402001
.
valcheck
)
c
:
RegisterEffect
(
e3
)
end
function
c71402001
.
mfilter
(
c
,
sc
)
return
c
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
c
:
IsNotTuner
(
sc
)
or
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsSummonType
(
SUMMON_TYPE_NORMAL
)
...
...
@@ -69,4 +75,15 @@ function c71402001.op2(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Remove
(
tc
,
POS_FACEDOWN
,
REASON_EFFECT
)
end
end
end
function
c71402001
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsType
,
2
,
nil
,
TYPE_TUNER
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
21142671
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
\ No newline at end of file
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