Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Nemo Ma
no81cards
Commits
e7cce77c
Commit
e7cce77c
authored
Mar 26, 2022
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
128fabd2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
299 additions
and
298 deletions
+299
-298
expansions/script/c33701017.lua
expansions/script/c33701017.lua
+74
-74
expansions/script/c33701018.lua
expansions/script/c33701018.lua
+89
-89
expansions/script/c33701019.lua
expansions/script/c33701019.lua
+73
-73
expansions/script/c33701020.lua
expansions/script/c33701020.lua
+63
-62
No files found.
expansions/script/c33701017.lua
View file @
e7cce77c
...
...
@@ -4,85 +4,85 @@
local
s
=
c33701017
local
id
=
33701017
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
nil
,
2
,
2
,
s
.
lcheck
)
--special summon self
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
--
e2:SetCategory(CATEGORY_DISABLE)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetOperation
(
s
.
negop
)
c
:
RegisterEffect
(
e2
)
--special summon other
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
s
.
sptg2
)
e3
:
SetOperation
(
s
.
spop2
)
c
:
RegisterEffect
(
e3
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
nil
,
2
,
2
,
s
.
lcheck
)
--special summon self
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
--
e2:SetCategory(CATEGORY_DISABLE)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetOperation
(
s
.
negop
)
c
:
RegisterEffect
(
e2
)
--special summon other
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
s
.
sptg2
)
e3
:
SetOperation
(
s
.
spop2
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
lcheck
(
g
,
lc
,
tp
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0x144e
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0x144e
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ns
,
ss
=
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SUMMON
,
ACTIVITY_SPSUMMON
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
ns
+
ss
==
0
local
ns
,
ss
=
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SUMMON
,
ACTIVITY_SPSUMMON
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
ns
+
ss
==
0
end
function
s
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
end
--function s.MZFilter(c, tp)
--
return c:IsLocation(LOCATION_MZONE) and c:GetSequence() < 5 and c:IsControler(tp)
--
return c:IsLocation(LOCATION_MZONE) and c:GetSequence() < 5 and c:IsControler(tp)
--end
--function s.ChkfMMZ(sumcount)
--
return function(sg, e, tp, mg)
--
return sg:FilterCount(s.MZFilter, nil, tp) + Duel.GetLocationCount(tp, LOCATION_MZONE) >= sumcount
--
end
--
return function(sg, e, tp, mg)
--
return sg:FilterCount(s.MZFilter, nil, tp) + Duel.GetLocationCount(tp, LOCATION_MZONE) >= sumcount
--
end
--end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
2
,
nil
)
end
--
if chk == 0 then
--
return Duel.GetLocationCount(tp, LOCATION_MZONE) > -2 and #rg > 1 and
--
rg:CheckSubGroup(s.ChkfMMZ(1), 2, 2, tp)
--
end
--
if chk == 0 then
--
return Duel.GetLocationCount(tp, LOCATION_MZONE) > -2 and #rg > 1 and
--
rg:CheckSubGroup(s.ChkfMMZ(1), 2, 2, tp)
--
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
1
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
--
c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0)
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
SpecialSummon
(
c
,
1
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
--
c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0)
end
end
function
s
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
GetSummonType
()
==
SUMMON_TYPE_SPECIAL
+
1
then
return
end
local
c
=
e
:
GetHandler
()
if
not
c
:
GetSummonType
()
==
SUMMON_TYPE_SPECIAL
+
1
then
return
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_DISABLE
)
...
...
@@ -93,26 +93,26 @@ function s.negop(e, tp, eg, ep, ev, re, r, rp)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
disable
(
e
,
c
)
return
c
:
GetFieldID
()
~=
e
:
GetLabel
()
and
(
not
c
:
IsType
(
TYPE_MONSTER
)
or
(
c
:
IsType
(
TYPE_EFFECT
)
or
bit
.
band
(
c
:
GetOriginalType
(),
TYPE_EFFECT
)
==
TYPE_EFFECT
))
return
c
:
GetFieldID
()
~=
e
:
GetLabel
()
and
(
not
c
:
IsType
(
TYPE_MONSTER
)
or
(
c
:
IsType
(
TYPE_EFFECT
)
or
bit
.
band
(
c
:
GetOriginalType
(),
TYPE_EFFECT
)
==
TYPE_EFFECT
))
end
function
s
.
spfilter2
(
c
,
e
,
tp
,
zone
)
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
,
tp
,
zone
)
end
function
s
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
return
zone
~=
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
if
chk
==
0
then
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
return
zone
~=
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
end
function
s
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
if
zone
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
if
#
g
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
end
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
tp
)
if
zone
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
if
#
g
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
,
zone
)
end
end
expansions/script/c33701018.lua
View file @
e7cce77c
...
...
@@ -4,121 +4,121 @@
local
s
=
c33701018
local
id
=
33701018
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
nil
,
2
,
3
,
s
.
lcheck
)
--special summon self
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--double atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetOperation
(
s
.
atkop
)
c
:
RegisterEffect
(
e2
)
--special summon other
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
s
.
thtg
)
e3
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e3
)
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
nil
,
2
,
3
,
s
.
lcheck
)
--special summon self
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--double atk
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetOperation
(
s
.
atkop
)
c
:
RegisterEffect
(
e2
)
--special summon other
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_DRAW
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetTarget
(
s
.
thtg
)
e3
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
lcheck
(
g
,
lc
,
tp
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0x144e
)
return
g
:
IsExists
(
Card
.
IsLinkSetCard
,
1
,
nil
,
0x144e
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ns
,
ss
=
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SUMMON
,
ACTIVITY_SPSUMMON
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
ns
+
ss
==
0
local
ns
,
ss
=
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SUMMON
,
ACTIVITY_SPSUMMON
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
ns
+
ss
==
0
end
function
s
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
end
--function s.MZFilter(c, tp)
--
return c:IsLocation(LOCATION_MZONE) and c:GetSequence() < 5 and c:IsControler(tp)
--
return c:IsLocation(LOCATION_MZONE) and c:GetSequence() < 5 and c:IsControler(tp)
--end
--function s.ChkfMMZ(sumcount)
--
return function(sg, tp)
--
return sg:FilterCount(s.MZFilter, nil, tp) + Duel.GetLocationCount(tp, LOCATION_MZONE) >= sumcount
--
end
--
return function(sg, tp)
--
return sg:FilterCount(s.MZFilter, nil, tp) + Duel.GetLocationCount(tp, LOCATION_MZONE) >= sumcount
--
end
--end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
--
if chk == 0 then
--
return Duel.GetLocationCount(tp, LOCATION_MZONE) > -3 and #rg > 1 and
--
rg:CheckSubGroup(s.ChkfMMZ(1), 3, 3, tp)
--
end
--
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
3
,
nil
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
end
--
if chk == 0 then
--
return Duel.GetLocationCount(tp, LOCATION_MZONE) > -3 and #rg > 1 and
--
rg:CheckSubGroup(s.ChkfMMZ(1), 3, 3, tp)
--
end
--
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
3
,
3
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
c
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
0
)
end
end
function
s
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x144e
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x144e
)
end
function
s
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
id
)
==
0
then
return
end
for
tc
in
aux
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
tc
:
GetAttack
()
*
2
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetValue
(
tc
:
GetDefense
()
*
2
)
tc
:
RegisterEffect
(
e2
)
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
atkfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
c
=
e
:
GetHandler
()
if
c
:
GetFlagEffect
(
id
)
==
0
then
return
end
for
tc
in
aux
.
Next
(
g
)
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
tc
:
GetAttack
()
*
2
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetValue
(
tc
:
GetDefense
()
*
2
)
tc
:
RegisterEffect
(
e2
)
end
end
function
s
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsAbleToHand
()
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
1
,
tp
,
0
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
1
,
tp
,
0
)
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
+
REASON_RETURN
)
~=
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
and
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
+
REASON_RETURN
)
~=
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
expansions/script/c33701019.lua
View file @
e7cce77c
...
...
@@ -4,94 +4,94 @@
local
s
=
c33701019
local
id
=
33701019
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedure
(
c
,
nil
,
4
,
2
,
nil
,
nil
,
99
,
nil
,
false
,
s
.
xcheck
)
--special summon self
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PREDRAW
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
s
.
drcon
)
e2
:
SetCost
(
s
.
drcost
)
e2
:
SetTarget
(
s
.
drtg
)
e2
:
SetOperation
(
s
.
drop
)
c
:
RegisterEffect
(
e2
)
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedure
(
c
,
nil
,
4
,
2
,
nil
,
nil
,
99
,
nil
,
false
,
s
.
xcheck
)
--special summon self
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PREDRAW
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
s
.
drcon
)
e2
:
SetCost
(
s
.
drcost
)
e2
:
SetTarget
(
s
.
drtg
)
e2
:
SetOperation
(
s
.
drop
)
c
:
RegisterEffect
(
e2
)
Duel
.
AddCustomActivityCounter
(
33701019
,
ACTIVITY_CHAIN
,
aux
.
FALSE
)
end
function
s
.
xcheck
(
g
,
lc
,
tp
)
return
g
:
IsExists
(
Card
.
IsXyzSetCard
,
1
,
nil
,
0x144e
)
return
g
:
IsExists
(
Card
.
IsXyzSetCard
,
1
,
nil
,
0x144e
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetCustomActivityCount
(
33701019
,
tp
,
ACTIVITY_CHAIN
)
==
0
return
Duel
.
GetTurnPlayer
()
==
tp
and
Duel
.
GetCustomActivityCount
(
33701019
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsSetCard
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
,
0x144e
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsSetCard
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
nil
,
0x144e
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSetCard
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
,
0x144e
)
if
#
g
>
0
then
Duel
.
Overlay
(
c
,
g
)
end
end
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSetCard
,
tp
,
LOCATION_GRAVE
,
0
,
2
,
2
,
nil
,
0x144e
)
if
#
g
>
0
then
Duel
.
Overlay
(
c
,
g
)
end
end
end
function
s
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
==
Duel
.
GetTurnPlayer
()
return
tp
==
Duel
.
GetTurnPlayer
()
end
function
s
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
c
:
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
c
:
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
s
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
)
end
function
s
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
==
3
then
Duel
.
ShuffleHand
(
p
)
Duel
.
BreakEffect
()
Duel
.
SkipPhase
(
tp
,
PHASE_DRAW
,
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
SkipPhase
(
tp
,
PHASE_STANDBY
,
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
SkipPhase
(
tp
,
PHASE_MAIN1
,
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
SkipPhase
(
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_END
,
1
,
1
)
Duel
.
SkipPhase
(
tp
,
PHASE_MAIN2
,
RESET_PHASE
+
PHASE_END
,
1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_BP
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
==
3
then
Duel
.
ShuffleHand
(
p
)
Duel
.
BreakEffect
()
Duel
.
SkipPhase
(
tp
,
PHASE_DRAW
,
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
SkipPhase
(
tp
,
PHASE_STANDBY
,
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
SkipPhase
(
tp
,
PHASE_MAIN1
,
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
SkipPhase
(
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_END
,
1
,
1
)
Duel
.
SkipPhase
(
tp
,
PHASE_MAIN2
,
RESET_PHASE
+
PHASE_END
,
1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_BP
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
expansions/script/c33701020.lua
View file @
e7cce77c
...
...
@@ -4,84 +4,85 @@
local
s
=
c33701020
local
id
=
33701020
function
s
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x144e
),
3
,
false
)
--special summon self
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--end phase
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_RECOVER
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
s
.
tgcon
)
e2
:
SetTarget
(
s
.
tgtg
)
e2
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e2
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x144e
),
3
,
false
)
--special summon self
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
--end phase
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_RECOVER
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
s
.
tgcon
)
e2
:
SetTarget
(
s
.
tgtg
)
e2
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e2
)
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ct
=
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_BATTLE_PHASE
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
ct
==
0
local
ct
=
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_BATTLE_PHASE
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
ct
==
0
end
function
s
.
matfilter
(
c
)
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
and
Duel
.
IsExistingMatchingCard
(
s
.
matfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
3
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
matfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
3
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
matfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
3
,
nil
)
if
#
g
>
2
and
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
>
2
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
end
end
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
matfilter
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
3
,
nil
)
if
#
g
>
2
and
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
>
2
then
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
end
end
end
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
and
not
Duel
.
CheckPhaseActivity
()
return
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
and
not
Duel
.
CheckPhaseActivity
()
end
function
s
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsAbleToGrave
()
return
c
:
IsSetCard
(
0x144e
)
and
c
:
IsAbleToGrave
()
end
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
dg
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
1
,
4
)
if
#
dg
>
0
then
local
ct
=
Duel
.
SendtoGrave
(
dg
,
REASON_EFFECT
)
if
ct
>
0
and
Duel
.
Recover
(
tp
,
ct
*
1000
,
REASON_EFFECT
)
>
0
then
Duel
.
BreakEffect
()
Duel
.
SkipPhase
(
tp
,
PHASE_MAIN1
,
RESET_PHASE
+
PHASE_END
,
1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetCode
(
EFFECT_CANNOT_BP
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
dg
=
g
:
SelectSubGroup
(
tp
,
aux
.
dncheck
,
false
,
1
,
4
)
if
#
dg
>
0
then
local
ct
=
Duel
.
SendtoGrave
(
dg
,
REASON_EFFECT
)
if
ct
>
0
and
Duel
.
Recover
(
tp
,
ct
*
1000
,
REASON_EFFECT
)
>
0
then
Duel
.
BreakEffect
()
Duel
.
SkipPhase
(
tp
,
PHASE_MAIN1
,
RESET_PHASE
+
PHASE_END
,
1
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetCode
(
EFFECT_CANNOT_BP
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment