Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
4
Merge Requests
4
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
MyCard
ygopro-scripts-888
Commits
0b7ea09d
Commit
0b7ea09d
authored
Jan 09, 2024
by
Uytrewq
Committed by
GitHub
Jan 08, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix&update continuous traps (#2330)
* fix&update * fix
parent
6c0a7dd0
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
147 additions
and
432 deletions
+147
-432
c10131855.lua
c10131855.lua
+3
-7
c3160805.lua
c3160805.lua
+13
-39
c35011819.lua
c35011819.lua
+7
-35
c35419032.lua
c35419032.lua
+15
-40
c48680970.lua
c48680970.lua
+18
-51
c53670497.lua
c53670497.lua
+52
-53
c53936268.lua
c53936268.lua
+14
-32
c6733059.lua
c6733059.lua
+4
-33
c92408984.lua
c92408984.lua
+9
-50
c93016201.lua
c93016201.lua
+1
-52
c99064191.lua
c99064191.lua
+11
-40
No files found.
c10131855.lua
View file @
0b7ea09d
...
...
@@ -2,26 +2,22 @@
function
c10131855
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
10131855
,
0
))
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--
instant(chain)
--
replace effect
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
10131855
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_
ACTIVATE
)
e2
:
SetType
(
EFFECT_TYPE_
QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e2
:
SetCondition
(
c10131855
.
condition
)
e2
:
SetTarget
(
c10131855
.
target
)
e2
:
SetOperation
(
c10131855
.
operation
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_SZONE
)
c
:
RegisterEffect
(
e3
)
end
function
c10131855
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
)
...
...
c3160805.lua
View file @
0b7ea09d
...
...
@@ -5,8 +5,6 @@ function c3160805.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetTarget
(
c3160805
.
target1
)
e1
:
SetOperation
(
c3160805
.
operation
)
c
:
RegisterEffect
(
e1
)
--instant
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -16,8 +14,8 @@ function c3160805.initial_effect(c)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e2
:
SetCo
st
(
c3160805
.
cost2
)
e2
:
SetTarget
(
c3160805
.
target
2
)
e2
:
SetCo
untLimit
(
1
,
3160805
)
e2
:
SetTarget
(
c3160805
.
target
)
e2
:
SetOperation
(
c3160805
.
operation
)
c
:
RegisterEffect
(
e2
)
end
...
...
@@ -35,12 +33,11 @@ end
function
c3160805
.
thfilter2
(
c
,
lv
)
return
c
:
IsLevel
(
lv
)
and
c
:
IsRace
(
RACE_WARRIOR
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
c
:
IsAbleToHand
()
end
function
c3160805
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
function
c3160805
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
c3160805
.
tgfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
c3160805
.
tgfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
local
op
=
2
if
Duel
.
GetFlagEffect
(
tp
,
3160805
)
==
0
and
(
b1
or
b2
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
3160805
,
1
))
then
if
chk
==
0
then
return
b1
or
b2
end
local
op
=
0
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
3160805
,
2
),
aux
.
Stringid
(
3160805
,
3
))
elseif
b1
then
...
...
@@ -48,14 +45,11 @@ function c3160805.target1(e,tp,eg,ep,ev,re,r,rp,chk)
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
3160805
,
3
))
+
1
end
e
:
SetLabel
(
op
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
RegisterFlagEffect
(
tp
,
3160805
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
e
:
SetLabel
(
op
)
end
function
c3160805
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
2
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
e
:
GetLabel
()
==
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c3160805
.
tgfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
tp
)
...
...
@@ -78,23 +72,3 @@ function c3160805.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function
c3160805
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
3160805
)
==
0
end
Duel
.
RegisterFlagEffect
(
tp
,
3160805
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c3160805
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
c3160805
.
tgfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
c3160805
.
tgfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
tp
)
if
chk
==
0
then
return
b1
or
b2
end
local
op
=
0
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
3160805
,
2
),
aux
.
Stringid
(
3160805
,
3
))
elseif
b1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
3160805
,
2
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
3160805
,
3
))
+
1
end
e
:
SetLabel
(
op
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
c35011819.lua
View file @
0b7ea09d
...
...
@@ -4,58 +4,30 @@ function c35011819.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c35011819
.
target1
)
e1
:
SetOperation
(
c35011819
.
activate1
)
c
:
RegisterEffect
(
e1
)
--
instant
--
draw
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
35011819
,
0
))
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCondition
(
c35011819
.
condition
2
)
e2
:
SetTarget
(
c35011819
.
target
2
)
e2
:
SetOperation
(
c35011819
.
activate
2
)
e2
:
SetCondition
(
c35011819
.
condition
)
e2
:
SetTarget
(
c35011819
.
target
)
e2
:
SetOperation
(
c35011819
.
activate
)
c
:
RegisterEffect
(
e2
)
end
function
c35011819
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
local
ct
=
Duel
.
GetCurrentChain
()
if
ct
==
1
then
return
end
local
ct
=
Duel
.
GetCurrentChain
()
local
te
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
if
te
:
GetCode
()
==
EVENT_SUMMON_SUCCESS
and
te
:
IsActiveType
(
TYPE_MONSTER
)
and
Duel
.
IsChainNegatable
(
ct
-
1
)
and
Duel
.
IsPlayerCanDraw
(
tc
:
GetControler
(),
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
35011819
,
1
))
then
e
:
SetLabel
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
tc
,
1
,
0
,
0
)
Duel
.
SetTargetPlayer
(
tc
:
GetControler
())
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tc
:
GetControler
(),
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
0
,
RESET_CHAIN
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
35011819
,
2
))
end
end
function
c35011819
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
~=
1
then
return
end
local
c
=
e
:
GetHandler
()
local
ct
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_COUNT
)
Duel
.
NegateActivation
(
ct
-
1
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
function
c35011819
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c35011819
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetCode
()
==
EVENT_SUMMON_SUCCESS
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c35011819
.
target
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c35011819
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
rp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetTargetPlayer
(
rp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
rp
,
1
)
end
function
c35011819
.
activate
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c35011819
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
Duel
.
NegateActivation
(
ev
)
then
return
end
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
...
...
c35419032.lua
View file @
0b7ea09d
...
...
@@ -5,10 +5,8 @@ function c35419032.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetTarget
(
c35419032
.
target1
)
e1
:
SetOperation
(
c35419032
.
operation
)
c
:
RegisterEffect
(
e1
)
--
instant(chain)
--
to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
35419032
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
...
...
@@ -16,9 +14,9 @@ function c35419032.initial_effect(c)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e2
:
Set
Label
(
1
)
e2
:
SetCost
(
c35419032
.
cost
2
)
e2
:
SetTarget
(
c35419032
.
target
2
)
e2
:
Set
CountLimit
(
1
)
e2
:
SetCost
(
c35419032
.
cost
)
e2
:
SetTarget
(
c35419032
.
target
)
e2
:
SetOperation
(
c35419032
.
operation
)
c
:
RegisterEffect
(
e2
)
end
...
...
@@ -28,28 +26,20 @@ end
function
c35419032
.
afilter
(
c
)
return
c
:
IsSetCard
(
0xa
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c35419032
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
Duel
.
IsExistingMatchingCard
(
c35419032
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c35419032
.
afilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
35419032
,
1
))
then
function
c35419032
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c35419032
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c35419032
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetFirst
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_COST
)
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e
:
SetLabel
(
1
)
end
function
c35419032
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c35419032
.
afilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
e
:
GetHandler
():
RegisterFlagEffect
(
35419032
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
else
e
:
SetCategory
(
0
)
e
:
SetLabel
(
0
)
end
end
function
c35419032
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c35419032
.
afilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
...
...
@@ -57,18 +47,3 @@ function c35419032.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c35419032
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c35419032
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c35419032
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetFirst
():
IsLocation
(
LOCATION_HAND
)
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_COST
)
end
function
c35419032
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
35419032
)
==
0
and
Duel
.
IsExistingMatchingCard
(
c35419032
.
afilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
e
:
GetHandler
():
RegisterFlagEffect
(
35419032
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
c48680970.lua
View file @
0b7ea09d
...
...
@@ -6,8 +6,6 @@ function c48680970.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetTarget
(
c48680970
.
target1
)
e1
:
SetOperation
(
c48680970
.
operation
)
c
:
RegisterEffect
(
e1
)
--instant
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -15,8 +13,8 @@ function c48680970.initial_effect(c)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e2
:
SetCo
st
(
c48680970
.
cost2
)
e2
:
SetTarget
(
c48680970
.
target
2
)
e2
:
SetCo
untLimit
(
1
,
48680970
)
e2
:
SetTarget
(
c48680970
.
target
)
e2
:
SetOperation
(
c48680970
.
operation
)
c
:
RegisterEffect
(
e2
)
--immune effect
...
...
@@ -44,14 +42,12 @@ end
function
c48680970
.
filter2
(
c
)
return
c
:
IsCode
(
2314238
,
63391643
)
and
c
:
IsAbleToHand
()
end
function
c48680970
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
function
c48680970
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c48680970
.
filter1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
c48680970
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
op
=
2
e
:
SetCategory
(
0
)
if
Duel
.
GetFlagEffect
(
tp
,
48680970
)
==
0
and
(
b1
or
b2
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
48680970
,
0
))
then
if
chk
==
0
then
return
b1
or
b2
end
local
op
=
0
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
48680970
,
1
),
aux
.
Stringid
(
48680970
,
2
))
elseif
b1
then
...
...
@@ -59,6 +55,7 @@ function c48680970.target1(e,tp,eg,ep,ev,re,r,rp,chk)
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
48680970
,
2
))
+
1
end
e
:
SetLabel
(
op
)
if
op
==
0
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
...
...
@@ -66,12 +63,8 @@ function c48680970.target1(e,tp,eg,ep,ev,re,r,rp,chk)
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
Duel
.
RegisterFlagEffect
(
tp
,
48680970
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
e
:
SetLabel
(
op
)
end
function
c48680970
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
2
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
e
:
GetLabel
()
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
...
...
@@ -88,32 +81,6 @@ function c48680970.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function
c48680970
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
48680970
)
==
0
end
Duel
.
RegisterFlagEffect
(
tp
,
48680970
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c48680970
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c48680970
.
filter1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
c48680970
.
filter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
if
chk
==
0
then
return
b1
or
b2
end
local
op
=
0
if
b1
and
b2
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
48680970
,
1
),
aux
.
Stringid
(
48680970
,
2
))
elseif
b1
then
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
48680970
,
1
))
else
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
48680970
,
2
))
+
1
end
e
:
SetLabel
(
op
)
if
op
==
0
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
else
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c48680970
.
etarget
(
e
,
c
)
return
c
:
IsCode
(
46986414
)
end
...
...
c53670497.lua
View file @
0b7ea09d
...
...
@@ -5,77 +5,76 @@ function c53670497.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetTarget
(
c53670497
.
target1
)
e1
:
SetOperation
(
c53670497
.
activate
)
c
:
RegisterEffect
(
e1
)
--
instant
--
to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
53670497
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
53670497
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e2
:
SetLabel
(
1
)
e2
:
SetTarget
(
c53670497
.
target2
)
e2
:
SetOperation
(
c53670497
.
activate
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c53670497
.
condition1
)
e2
:
SetTarget
(
c53670497
.
target1
)
e2
:
SetOperation
(
c53670497
.
activate1
)
c
:
RegisterEffect
(
e2
)
--
spsummmon
--
return grave
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
53670497
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_TRIGGER_F
+
EFFECT_TYPE_SINGLE
)
e3
:
SetDescription
(
aux
.
Stringid
(
53670497
,
1
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c53670497
.
spcon
)
e3
:
SetTarget
(
c53670497
.
sptg
)
e3
:
SetOperation
(
c53670497
.
spop
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c53670497
.
condition2
)
e3
:
SetTarget
(
c53670497
.
target2
)
e3
:
SetOperation
(
c53670497
.
activate2
)
c
:
RegisterEffect
(
e3
)
--spsummmon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
53670497
,
2
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_TRIGGER_F
+
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCode
(
EVENT_TO_GRAVE
)
e4
:
SetCondition
(
c53670497
.
spcon
)
e4
:
SetTarget
(
c53670497
.
sptg
)
e4
:
SetOperation
(
c53670497
.
spop
)
c
:
RegisterEffect
(
e4
)
end
function
c53670497
.
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsTurnPlayer
(
1
-
tp
)
end
function
c53670497
.
filter1
(
c
)
return
c
:
IsSetCard
(
0x69
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGrave
()
end
function
c53670497
.
filter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x69
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c53670497
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
local
turnp
=
Duel
.
GetTurnPlayer
()
if
((
turnp
~=
tp
and
Duel
.
IsExistingMatchingCard
(
c53670497
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
))
or
(
turnp
==
tp
and
Duel
.
IsExistingMatchingCard
(
c53670497
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)))
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
53670497
,
0
))
then
if
turnp
==
tp
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
else
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c53670497
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
e
:
SetLabel
(
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
53670497
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c53670497
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
turnp
=
Duel
.
GetTurnPlayer
()
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
53670497
)
==
0
and
((
turnp
~=
tp
and
Duel
.
IsExistingMatchingCard
(
c53670497
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
))
or
(
turnp
==
tp
and
Duel
.
IsExistingMatchingCard
(
c53670497
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)))
end
if
turnp
==
tp
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
else
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
e
:
GetHandler
():
RegisterFlagEffect
(
53670497
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c53670497
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetLabel
()
~=
1
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
turnp
=
Duel
.
GetTurnPlayer
()
function
c53670497
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
if
turnp
~=
tp
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c53670497
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
else
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c53670497
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
+
REASON_RETURN
)
end
function
c53670497
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsTurnPlayer
(
tp
)
end
function
c53670497
.
filter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x69
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
c53670497
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_REMOVED
)
and
chkc
:
IsControler
(
tp
)
and
c53670497
.
filter2
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c53670497
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
53670497
,
3
))
local
g
=
Duel
.
SelectTarget
(
tp
,
c53670497
.
filter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
g
,
1
,
0
,
0
)
end
function
c53670497
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToChain
()
then
Duel
.
SendtoGrave
(
tc
,
REASON_EFFECT
+
REASON_RETURN
)
end
end
function
c53670497
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c53936268.lua
View file @
0b7ea09d
...
...
@@ -5,10 +5,8 @@ function c53936268.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetTarget
(
c53936268
.
target1
)
e1
:
SetOperation
(
c53936268
.
operation
)
c
:
RegisterEffect
(
e1
)
--
instant(chain)
--
to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
53936268
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
...
...
@@ -16,8 +14,9 @@ function c53936268.initial_effect(c)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c53936268
.
cost
)
e2
:
SetTarget
(
c53936268
.
target
2
)
e2
:
SetTarget
(
c53936268
.
target
)
e2
:
SetOperation
(
c53936268
.
operation
)
c
:
RegisterEffect
(
e2
)
end
...
...
@@ -27,30 +26,6 @@ end
function
c53936268
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x103
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
function
c53936268
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
true
end
if
c53936268
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
Duel
.
IsExistingMatchingCard
(
c53936268
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
94
)
then
c53936268
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
c
:
RegisterFlagEffect
(
53936268
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
c
:
RegisterFlagEffect
(
0
,
RESET_CHAIN
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
65
)
else
e
:
SetCategory
(
0
)
end
end
function
c53936268
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
GetFlagEffect
(
53936268
)
==
0
or
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c53936268
.
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
c53936268
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c53936268
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
...
...
@@ -60,9 +35,16 @@ function c53936268.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_COST
)
end
function
c53936268
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
53936268
)
==
0
and
Duel
.
IsExistingMatchingCard
(
c53936268
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
c53936268
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c53936268
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
e
:
GetHandler
():
RegisterFlagEffect
(
53936268
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c53936268
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c53936268
.
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
c6733059.lua
View file @
0b7ea09d
...
...
@@ -5,19 +5,17 @@ function c6733059.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
)
e1
:
SetCost
(
c6733059
.
cost1
)
e1
:
SetOperation
(
c6733059
.
operation
)
c
:
RegisterEffect
(
e1
)
--
instant(chain)
--
destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
6733059
,
1
))
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
)
e2
:
SetCost
(
c6733059
.
cost2
)
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e2
:
SetCost
(
c6733059
.
cost
)
e2
:
SetOperation
(
c6733059
.
operation
)
c
:
RegisterEffect
(
e2
)
end
...
...
@@ -27,34 +25,7 @@ end
function
c6733059
.
tfilter
(
c
,
lv
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
lv
)
end
function
c6733059
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
local
cg
=
Duel
.
GetMatchingGroup
(
c6733059
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
tg
=
Duel
.
GetMatchingGroup
(
c6733059
.
tfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
cg
:
GetCount
())
if
tg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
6733059
,
0
))
then
local
lvt
=
{}
local
tc
=
tg
:
GetFirst
()
while
tc
do
local
tlv
=
tc
:
GetLevel
()
lvt
[
tlv
]
=
tlv
tc
=
tg
:
GetNext
()
end
local
pc
=
1
for
i
=
1
,
12
do
if
lvt
[
i
]
then
lvt
[
i
]
=
nil
lvt
[
pc
]
=
i
pc
=
pc
+
1
end
end
lvt
[
pc
]
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
6733059
,
2
))
local
lv
=
Duel
.
AnnounceNumber
(
tp
,
table.unpack
(
lvt
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
rg
=
cg
:
Select
(
tp
,
lv
,
lv
,
nil
)
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_COST
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tg
,
1
,
0
,
0
)
Duel
.
SetTargetParam
(
lv
)
end
end
function
c6733059
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c6733059
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
cg
=
Duel
.
GetMatchingGroup
(
c6733059
.
cfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
tg
=
Duel
.
GetMatchingGroup
(
c6733059
.
tfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
cg
:
GetCount
())
...
...
c92408984.lua
View file @
0b7ea09d
...
...
@@ -4,75 +4,34 @@ function c92408984.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c92408984
.
cost1
)
e1
:
SetTarget
(
c92408984
.
target1
)
e1
:
SetOperation
(
c92408984
.
operation1
)
c
:
RegisterEffect
(
e1
)
--
instant(chain)
--
negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
92408984
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCondition
(
c92408984
.
condition
2
)
e2
:
SetCost
(
c92408984
.
cost
2
)
e2
:
SetTarget
(
c92408984
.
target
2
)
e2
:
SetOperation
(
c92408984
.
operation
2
)
e2
:
SetCondition
(
c92408984
.
condition
)
e2
:
SetCost
(
c92408984
.
cost
)
e2
:
SetTarget
(
c92408984
.
target
)
e2
:
SetOperation
(
c92408984
.
operation
)
c
:
RegisterEffect
(
e2
)
end
function
c92408984
.
cfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_DRAGON
)
end
function
c92408984
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
local
ct
=
Duel
.
GetCurrentChain
()
if
ct
==
1
then
return
end
local
pe
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
if
not
pe
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
end
if
not
pe
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
not
pe
:
IsActiveType
(
TYPE_TRAP
)
then
return
false
end
local
tg
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TARGET_CARDS
)
if
not
tg
or
not
tg
:
IsExists
(
c92408984
.
cfilter
,
1
,
nil
)
then
return
false
end
if
not
Duel
.
IsChainNegatable
(
ct
-
1
)
then
return
false
end
if
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
then
return
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
92408984
,
1
))
then
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
e
:
SetLabel
(
1
)
end
end
function
c92408984
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetLabel
()
~=
1
then
return
end
local
ct
=
Duel
.
GetCurrentChain
()
local
te
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
tc
,
1
,
0
,
0
)
if
tc
:
IsDestructable
()
then
Duel
.
SetTargetCard
(
tc
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
end
end
function
c92408984
.
operation1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetLabel
()
~=
1
then
return
end
local
ct
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_COUNT
)
local
tc
=
Duel
.
GetFirstTarget
()
if
Duel
.
NegateEffect
(
ct
-
1
)
and
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c92408984
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c92408984
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
return
end
if
not
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
or
not
re
:
IsActiveType
(
TYPE_TRAP
)
then
return
false
end
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
not
tg
or
not
tg
:
IsExists
(
c92408984
.
cfilter
,
1
,
nil
)
then
return
false
end
return
Duel
.
IsChainNegatable
(
ev
)
end
function
c92408984
.
cost
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c92408984
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c92408984
.
target
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c92408984
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
if
eg
:
GetFirst
():
IsLocation
(
LOCATION_ONFIELD
)
then
...
...
@@ -80,7 +39,7 @@ function c92408984.target2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c92408984
.
operation
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c92408984
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
NegateEffect
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
...
...
c93016201.lua
View file @
0b7ea09d
...
...
@@ -4,20 +4,7 @@ function c93016201.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c93016201
.
cost1
)
e1
:
SetTarget
(
c93016201
.
target1
)
e1
:
SetOperation
(
c93016201
.
activate1
)
c
:
RegisterEffect
(
e1
)
--Activate(timing)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
93016201
,
0
))
e2
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e2
:
SetCode
(
EVENT_SPSUMMON
)
e2
:
SetCondition
(
c93016201
.
condition2
)
e2
:
SetCost
(
c93016201
.
cost2
)
e2
:
SetTarget
(
c93016201
.
target2
)
e2
:
SetOperation
(
c93016201
.
activate2
)
c
:
RegisterEffect
(
e2
)
--instant
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
93016201
,
0
))
...
...
@@ -25,7 +12,7 @@ function c93016201.initial_effect(c)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_BOTH_SIDE
)
e3
:
SetCode
(
EVENT_SPSUMMON
)
e3
:
SetCondition
(
c93016201
.
condition2
)
e3
:
SetCondition
(
aux
.
NegateSummonCondition
)
e3
:
SetCost
(
c93016201
.
cost2
)
e3
:
SetTarget
(
c93016201
.
target2
)
e3
:
SetOperation
(
c93016201
.
activate2
)
...
...
@@ -43,44 +30,6 @@ function c93016201.initial_effect(c)
e4
:
SetOperation
(
c93016201
.
activate3
)
c
:
RegisterEffect
(
e4
)
end
function
c93016201
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
if
not
Duel
.
CheckLPCost
(
tp
,
800
)
then
return
end
local
ct
=
Duel
.
GetCurrentChain
()
if
ct
==
1
then
return
end
local
pe
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
if
not
pe
:
IsHasCategory
(
CATEGORY_SPECIAL_SUMMON
)
then
return
end
if
not
Duel
.
IsChainDisablable
(
ct
-
1
)
then
return
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
93016201
,
1
))
then
Duel
.
PayLPCost
(
tp
,
800
)
e
:
SetLabel
(
1
)
end
end
function
c93016201
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetLabel
()
~=
1
then
return
end
local
ct
=
Duel
.
GetCurrentChain
()
local
te
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
tc
,
1
,
0
,
0
)
if
tc
:
IsRelateToEffect
(
te
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
end
end
function
c93016201
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetLabel
()
~=
1
then
return
end
local
ct
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_COUNT
)
local
te
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
if
Duel
.
NegateEffect
(
ct
-
1
)
and
tc
:
IsRelateToEffect
(
te
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c93016201
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentChain
()
==
0
end
function
c93016201
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
800
)
end
Duel
.
PayLPCost
(
tp
,
800
)
...
...
c99064191.lua
View file @
0b7ea09d
...
...
@@ -7,67 +7,38 @@ function c99064191.initial_effect(c)
e1
:
SetTarget
(
c99064191
.
target1
)
e1
:
SetOperation
(
c99064191
.
activate1
)
c
:
RegisterEffect
(
e1
)
--
instant(chain)
--
negate
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99064191
,
0
))
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetCondition
(
c99064191
.
condition2
)
e2
:
SetCost
(
c99064191
.
cost2
)
e2
:
SetTarget
(
c99064191
.
target2
)
e2
:
SetOperation
(
c99064191
.
activate2
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c99064191
.
condition
)
e2
:
SetCost
(
c99064191
.
cost
)
e2
:
SetTarget
(
c99064191
.
target
)
e2
:
SetOperation
(
c99064191
.
activate
)
c
:
RegisterEffect
(
e2
)
end
function
c99064191
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c99064191
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
local
ct
=
Duel
.
GetCurrentChain
()
if
ct
==
1
or
not
Duel
.
IsExistingMatchingCard
(
c99064191
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
or
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
then
return
false
end
local
pe
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
pe
:
GetHandler
()
if
pe
:
IsActiveType
(
TYPE_EFFECT
)
and
tc
:
IsLevelAbove
(
5
)
and
Duel
.
IsChainDisablable
(
ct
-
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
99064191
,
1
))
then
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
tc
,
1
,
0
,
0
)
if
tc
:
IsRelateToEffect
(
pe
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
tc
,
1
,
0
,
0
)
end
e
:
SetLabel
(
1
)
e
:
GetHandler
():
RegisterFlagEffect
(
99064191
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c99064191
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetLabel
()
~=
1
or
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
ct
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_COUNT
)
local
te
=
Duel
.
GetChainInfo
(
ct
-
1
,
CHAININFO_TRIGGERING_EFFECT
)
local
tc
=
te
:
GetHandler
()
if
Duel
.
NegateEffect
(
ct
-
1
)
and
tc
:
IsRelateToEffect
(
te
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
function
c99064191
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c99064191
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c99064191
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
IsActiveType
(
TYPE_EFFECT
)
and
re
:
GetHandler
():
IsLevelAbove
(
5
)
and
Duel
.
IsChainDisablable
(
ev
)
end
function
c99064191
.
cost
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c99064191
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
)
end
function
c99064191
.
target
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
99064191
)
==
0
end
function
c99064191
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
e
:
GetHandler
():
RegisterFlagEffect
(
99064191
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c99064191
.
activate
2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c99064191
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateEffect
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
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