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
Huangnan
no81cards
Commits
03268b89
Commit
03268b89
authored
Apr 05, 2023
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
20418ad1
Changes
34
Show whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
792 additions
and
593 deletions
+792
-593
expansions/script/c10100000.lua
expansions/script/c10100000.lua
+6
-6
expansions/script/c10199990.lua
expansions/script/c10199990.lua
+284
-284
expansions/script/c112538374.lua
expansions/script/c112538374.lua
+48
-41
expansions/script/c11451446.lua
expansions/script/c11451446.lua
+1
-1
expansions/script/c11451771.lua
expansions/script/c11451771.lua
+2
-0
expansions/script/c11451772.lua
expansions/script/c11451772.lua
+2
-0
expansions/script/c11451773.lua
expansions/script/c11451773.lua
+2
-0
expansions/script/c11451774.lua
expansions/script/c11451774.lua
+2
-0
expansions/script/c11451775.lua
expansions/script/c11451775.lua
+2
-0
expansions/script/c11451776.lua
expansions/script/c11451776.lua
+2
-0
expansions/script/c11451777.lua
expansions/script/c11451777.lua
+2
-0
expansions/script/c11451778.lua
expansions/script/c11451778.lua
+2
-0
expansions/script/c11451779.lua
expansions/script/c11451779.lua
+1
-1
expansions/script/c11451780.lua
expansions/script/c11451780.lua
+1
-1
expansions/script/c11451781.lua
expansions/script/c11451781.lua
+1
-1
expansions/script/c11451782.lua
expansions/script/c11451782.lua
+3
-3
expansions/script/c117981478.lua
expansions/script/c117981478.lua
+1
-2
expansions/script/c118776531.lua
expansions/script/c118776531.lua
+1
-1
expansions/script/c13255407.lua
expansions/script/c13255407.lua
+2
-2
expansions/script/c14001519.lua
expansions/script/c14001519.lua
+1
-1
expansions/script/c14001520.lua
expansions/script/c14001520.lua
+1
-1
expansions/script/c25000013.lua
expansions/script/c25000013.lua
+1
-1
expansions/script/c53734019.lua
expansions/script/c53734019.lua
+10
-5
expansions/script/c53757009.lua
expansions/script/c53757009.lua
+1
-1
expansions/script/c53796107.lua
expansions/script/c53796107.lua
+7
-7
expansions/script/c53799017.lua
expansions/script/c53799017.lua
+5
-50
expansions/script/c7439101.lua
expansions/script/c7439101.lua
+56
-54
expansions/script/c7439103.lua
expansions/script/c7439103.lua
+60
-32
expansions/script/c7439105.lua
expansions/script/c7439105.lua
+59
-30
expansions/script/c7439107.lua
expansions/script/c7439107.lua
+59
-30
expansions/script/c7439109.lua
expansions/script/c7439109.lua
+59
-30
expansions/script/c79083105.lua
expansions/script/c79083105.lua
+3
-5
expansions/script/c87490445.lua
expansions/script/c87490445.lua
+3
-3
expansions/script/c98920086.lua
expansions/script/c98920086.lua
+102
-0
No files found.
expansions/script/c10100000.lua
View file @
03268b89
...
@@ -1418,7 +1418,7 @@ function Scl.RegisterEffect(reg_obj, reg_eff)
...
@@ -1418,7 +1418,7 @@ function Scl.RegisterEffect(reg_obj, reg_eff)
local
owner
,
handler
,
ignore
=
Scl
.
GetRegisterInfo
(
reg_obj
)
local
owner
,
handler
,
ignore
=
Scl
.
GetRegisterInfo
(
reg_obj
)
if
type
(
handler
)
==
"number"
then
if
type
(
handler
)
==
"number"
then
Duel
.
RegisterEffect
(
reg_eff
,
handler
)
Duel
.
RegisterEffect
(
reg_eff
,
handler
)
else
else
if
aux
.
GetValueType
(
handler
)
==
"Card"
then
handler
:
RegisterEffect
(
reg_eff
,
ignore
)
handler
:
RegisterEffect
(
reg_eff
,
ignore
)
end
end
return
reg_eff
,
reg_eff
:
GetFieldID
()
return
reg_eff
,
reg_eff
:
GetFieldID
()
...
...
expansions/script/c10199990.lua
View file @
03268b89
...
@@ -1362,7 +1362,7 @@ rscon.negcon = function(dn_filter, pl_fun)
...
@@ -1362,7 +1362,7 @@ rscon.negcon = function(dn_filter, pl_fun)
dn_filter
=
dn_list
[
dn_filter
]
dn_filter
=
dn_list
[
dn_filter
]
end
end
if
pl_fun
then
pl_fun
=
pl_fun
and
1
or
0
end
if
pl_fun
then
pl_fun
=
pl_fun
and
1
or
0
end
return
rscon
.
disneg
(
"neg"
,
dn_filter
,
pl_fun
)(
...
)
return
rscon
.
neg
(
dn_filter
,
pl_fun
)(
...
)
end
end
end
end
rscon
.
discon
=
function
(
dn_filter
,
pl_fun
)
rscon
.
discon
=
function
(
dn_filter
,
pl_fun
)
...
@@ -1372,7 +1372,7 @@ rscon.discon = function(dn_filter, pl_fun)
...
@@ -1372,7 +1372,7 @@ rscon.discon = function(dn_filter, pl_fun)
dn_filter
=
dn_list
[
dn_filter
]
dn_filter
=
dn_list
[
dn_filter
]
end
end
if
pl_fun
then
pl_fun
=
pl_fun
and
1
or
0
end
if
pl_fun
then
pl_fun
=
pl_fun
and
1
or
0
end
return
rscon
.
dis
neg
(
"dis"
,
dn_filter
,
pl_fun
)(
...
)
return
rscon
.
dis
(
dn_filter
,
pl_fun
)(
...
)
end
end
end
end
rsef
.
QO_NEGATE
=
function
(
reg_list
,
dn_type
,
lim_list
,
dn_str
,
range
,
con
,
cost
,
desc_list
,
cate
,
flag
,
reset_list
)
rsef
.
QO_NEGATE
=
function
(
reg_list
,
dn_type
,
lim_list
,
dn_str
,
range
,
con
,
cost
,
desc_list
,
cate
,
flag
,
reset_list
)
...
...
expansions/script/c112538374.lua
View file @
03268b89
--死汰ガエル
function
c112538374
.
initial_effect
(
c
)
function
c112538374
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
112538374
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
112538374
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
@@ -9,36 +11,42 @@ function c112538374.initial_effect(c)
...
@@ -9,36 +11,42 @@ function c112538374.initial_effect(c)
e1
:
SetTarget
(
c112538374
.
sptg
)
e1
:
SetTarget
(
c112538374
.
sptg
)
e1
:
SetOperation
(
c112538374
.
spop
)
e1
:
SetOperation
(
c112538374
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
112538374
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
112538374
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
112538
474
)
e2
:
SetCountLimit
(
1
,
112538
375
)
e2
:
SetCost
(
c112538374
.
hspcost
)
e2
:
SetCost
(
c112538374
.
hspcost
)
e2
:
SetTarget
(
c112538374
.
hsptg
)
e2
:
SetTarget
(
c112538374
.
hsptg
)
e2
:
SetOperation
(
c112538374
.
hspop
)
e2
:
SetOperation
(
c112538374
.
hspop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--return
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
112538374
,
2
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetRange
(
LOCATION_REMOVED
)
e2
:
SetCountLimit
(
1
,
112538376
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCondition
(
c112538374
.
retcon
)
e2
:
SetTarget
(
c112538374
.
rettg
)
e2
:
SetOperation
(
c112538374
.
retop
)
c
:
RegisterEffect
(
e2
)
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
Set
Category
(
CATEGORY_TODECK
)
e4
:
Set
Description
(
aux
.
Stringid
(
112538374
,
3
)
)
e4
:
Set
Type
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
Set
Category
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
Set
Range
(
LOCATION_REMOVED
)
e4
:
Set
Type
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_
PHASE
+
PHASE_END
)
e4
:
SetCode
(
EVENT_
REMOVE
)
e4
:
Set
CountLimit
(
1
,
112538574
)
e4
:
Set
Property
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetCo
ndition
(
c112538374
.
retcon
)
e4
:
SetCo
untLimit
(
1
,
112538377
)
e4
:
SetTarget
(
c112538374
.
ret
tg
)
e4
:
SetTarget
(
c112538374
.
th
tg
)
e4
:
SetOperation
(
c112538374
.
ret
op
)
e4
:
SetOperation
(
c112538374
.
th
op
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e5
:
SetCode
(
EVENT_REMOVE
)
e5
:
SetCountLimit
(
1
,
112538674
)
e5
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e5
:
SetTarget
(
c112538374
.
thtg
)
e5
:
SetOperation
(
c112538374
.
thop
)
c
:
RegisterEffect
(
e5
)
end
end
function
c112538374
.
costfilter
(
c
)
function
c112538374
.
costfilter
(
c
)
return
c
:
IsRace
(
RACE_AQUA
)
and
c
:
IsDiscardable
()
return
c
:
IsRace
(
RACE_AQUA
)
and
c
:
IsDiscardable
()
end
end
...
@@ -52,7 +60,7 @@ function c112538374.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -52,7 +60,7 @@ function c112538374.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
c112538374
.
spfilter
(
c
,
e
,
tp
)
function
c112538374
.
spfilter
(
c
,
e
,
tp
)
return
not
c
:
IsCode
(
112538374
)
and
c
:
IsSetCard
(
0x12
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x12
)
and
not
c
:
IsCode
(
112538374
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c112538374
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c112538374
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
@@ -67,14 +75,15 @@ function c112538374.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -67,14 +75,15 @@ function c112538374.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c112538374
.
rfilter
(
c
)
function
c112538374
.
rfilter
(
c
)
return
not
c
:
IsCode
(
112538374
)
and
c
:
IsRace
(
RACE_AQUA
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsLevelBelow
(
2
)
return
c
:
IsLevelBelow
(
2
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsRace
(
RACE_AQUA
)
and
c
:
IsAbleToGraveAsCost
()
and
not
c
:
IsCode
(
112538374
)
and
c
:
IsAbleToGraveAsCost
()
end
end
function
c112538374
.
hspcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c112538374
.
hspcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c112538374
.
rfilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c112538374
.
rfilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
e
:
GetHandler
()
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c112538374
.
rfilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
2
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c112538374
.
rfilter
,
tp
,
LOCATION_DECK
,
0
,
2
,
2
,
e
:
GetHandler
()
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c112538374
.
hsptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c112538374
.
hsptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
@@ -84,36 +93,34 @@ function c112538374.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -84,36 +93,34 @@ function c112538374.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
c112538374
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c112538374
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
c112538374
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c112538374
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
Duel
.
GetTurnPlayer
()
return
Duel
.
GetTurnPlayer
()
~=
tp
end
end
function
c112538374
.
ret
filter
(
c
)
function
c112538374
.
df
filter
(
c
)
return
c
:
IsRace
(
RACE_AQUA
)
and
c
:
IsAbleToDeck
()
return
c
:
IsRace
(
RACE_AQUA
)
and
c
:
IsAbleToDeck
()
end
end
function
c112538374
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c112538374
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetMatchingGroup
(
c112538374
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
2
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
2
,
0
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
end
function
c112538374
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c112538374
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
sg
=
Group
.
CreateGroup
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
sg
:
AddCard
(
c
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c112538374
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
sg
:
Merge
(
g
:
Select
(
tp
,
1
,
1
,
nil
))
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c112538374
.
dffilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
end
if
g
:
GetCount
()
>
0
then
if
sg
:
GetCount
()
==
2
then
local
tc
=
g
:
GetFirst
()
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
local
gg
=
Group
.
FromCards
(
c
,
tc
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SendtoDeck
(
gg
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
function
c112538374
.
thfilter
(
c
)
function
c112538374
.
thfilter
(
c
)
return
c
:
IsRace
(
RACE_AQUA
)
and
not
c
:
IsCode
(
112538374
)
and
c
:
IsAbleToHand
()
return
c
:
IsRace
(
RACE_AQUA
)
and
not
c
:
IsCode
(
112538374
)
and
c
:
IsAbleToHand
()
end
end
...
...
expansions/script/c11451446.lua
View file @
03268b89
...
@@ -45,7 +45,7 @@ function cm.filter1(c,tp)
...
@@ -45,7 +45,7 @@ function cm.filter1(c,tp)
return
c
:
IsReleasable
()
and
Duel
.
GetMZoneCount
(
1
-
tp
,
c
,
tp
)
>
0
return
c
:
IsReleasable
()
and
Duel
.
GetMZoneCount
(
1
-
tp
,
c
,
tp
)
>
0
end
end
function
cm
.
filter2
(
c
)
function
cm
.
filter2
(
c
)
return
aux
.
IsCodeListed
(
c
,
99518961
)
and
c
:
IsType
(
TYPE_MONSTER
)
return
aux
.
IsCodeListed
(
c
,
99518961
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
end
function
cm
.
filter3
(
c
,
e
,
tp
)
function
cm
.
filter3
(
c
,
e
,
tp
)
return
c
:
IsLevelBelow
(
3
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsLevelBelow
(
3
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
expansions/script/c11451771.lua
View file @
03268b89
...
@@ -171,6 +171,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -171,6 +171,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
end
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToBattle
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsDisabled
()
then
return
end
if
#
BATTLE_ACT_CHECK
>
0
then
if
#
BATTLE_ACT_CHECK
>
0
then
local
hash
=
{}
local
hash
=
{}
local
class
=
0
local
class
=
0
...
...
expansions/script/c11451772.lua
View file @
03268b89
...
@@ -169,6 +169,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -169,6 +169,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
end
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToBattle
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsDisabled
()
then
return
end
if
#
BATTLE_ACT_CHECK
>
0
then
if
#
BATTLE_ACT_CHECK
>
0
then
local
hash
=
{}
local
hash
=
{}
local
class
=
0
local
class
=
0
...
...
expansions/script/c11451773.lua
View file @
03268b89
...
@@ -147,6 +147,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -147,6 +147,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
end
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToBattle
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsDisabled
()
then
return
end
if
#
BATTLE_CARD_CHECK
>
0
then
if
#
BATTLE_CARD_CHECK
>
0
then
local
hash
=
{}
local
hash
=
{}
local
class
=
0
local
class
=
0
...
...
expansions/script/c11451774.lua
View file @
03268b89
...
@@ -218,6 +218,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -218,6 +218,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
end
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToBattle
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsDisabled
()
then
return
end
if
#
BATTLE_CARD_CHECK
>
0
then
if
#
BATTLE_CARD_CHECK
>
0
then
local
hash
=
{}
local
hash
=
{}
local
class
=
0
local
class
=
0
...
...
expansions/script/c11451775.lua
View file @
03268b89
...
@@ -167,6 +167,8 @@ function cm.sfilter(c)
...
@@ -167,6 +167,8 @@ function cm.sfilter(c)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
end
end
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToBattle
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsDisabled
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
sfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
sfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
local
class
=
g
:
GetClassCount
(
Card
.
GetCode
)
local
class
=
g
:
GetClassCount
(
Card
.
GetCode
)
if
class
>
0
then
if
class
>
0
then
...
...
expansions/script/c11451776.lua
View file @
03268b89
...
@@ -191,6 +191,8 @@ function cm.sfilter(c)
...
@@ -191,6 +191,8 @@ function cm.sfilter(c)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
end
end
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToBattle
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsDisabled
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
sfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
sfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
local
class
=
g
:
GetClassCount
(
Card
.
GetCode
)
local
class
=
g
:
GetClassCount
(
Card
.
GetCode
)
if
class
>
0
then
if
class
>
0
then
...
...
expansions/script/c11451777.lua
View file @
03268b89
...
@@ -153,6 +153,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -153,6 +153,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
end
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToBattle
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsDisabled
()
then
return
end
if
BATTLE_PHASE_CHECK
>
0
then
if
BATTLE_PHASE_CHECK
>
0
then
local
class
=
BATTLE_PHASE_CHECK
local
class
=
BATTLE_PHASE_CHECK
if
class
>
0
then
if
class
>
0
then
...
...
expansions/script/c11451778.lua
View file @
03268b89
...
@@ -159,6 +159,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -159,6 +159,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
end
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
drop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToBattle
()
and
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsDisabled
()
then
return
end
if
BATTLE_PHASE_CHECK
>
0
then
if
BATTLE_PHASE_CHECK
>
0
then
local
class
=
BATTLE_PHASE_CHECK
local
class
=
BATTLE_PHASE_CHECK
if
class
>
0
then
if
class
>
0
then
...
...
expansions/script/c11451779.lua
View file @
03268b89
...
@@ -81,7 +81,7 @@ function cm.actarget2(e,te,tp)
...
@@ -81,7 +81,7 @@ function cm.actarget2(e,te,tp)
return
not
CONVIATRESS_BUFF
[
te
]
return
not
CONVIATRESS_BUFF
[
te
]
end
end
function
cm
.
extfilter
(
c
)
function
cm
.
extfilter
(
c
)
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsStatus
(
STATUS_EFFECT_ENABLED
))
and
(
c
:
IsHasEffect
(
11451779
)
or
c
:
IsHasEffect
(
11451780
)
or
c
:
IsHasEffect
(
11451781
)
or
c
:
IsHasEffect
(
11451782
))
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsStatus
(
STATUS_EFFECT_ENABLED
))
and
(
c
:
IsHasEffect
(
11451779
)
or
c
:
IsHasEffect
(
11451780
)
or
c
:
IsHasEffect
(
11451781
)
or
c
:
IsHasEffect
(
11451782
))
and
c
:
IsAbleToGraveAsCost
()
end
end
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c11451780.lua
View file @
03268b89
...
@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp)
...
@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp)
return
not
CONVIATRESS_BUFF
[
te
]
return
not
CONVIATRESS_BUFF
[
te
]
end
end
function
cm
.
extfilter
(
c
)
function
cm
.
extfilter
(
c
)
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsStatus
(
STATUS_EFFECT_ENABLED
))
and
(
c
:
IsHasEffect
(
11451779
)
or
c
:
IsHasEffect
(
11451780
)
or
c
:
IsHasEffect
(
11451781
)
or
c
:
IsHasEffect
(
11451782
))
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsStatus
(
STATUS_EFFECT_ENABLED
))
and
(
c
:
IsHasEffect
(
11451779
)
or
c
:
IsHasEffect
(
11451780
)
or
c
:
IsHasEffect
(
11451781
)
or
c
:
IsHasEffect
(
11451782
))
and
c
:
IsAbleToGraveAsCost
()
end
end
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c11451781.lua
View file @
03268b89
...
@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp)
...
@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp)
return
not
CONVIATRESS_BUFF
[
te
]
return
not
CONVIATRESS_BUFF
[
te
]
end
end
function
cm
.
extfilter
(
c
)
function
cm
.
extfilter
(
c
)
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsStatus
(
STATUS_EFFECT_ENABLED
))
and
(
c
:
IsHasEffect
(
11451779
)
or
c
:
IsHasEffect
(
11451780
)
or
c
:
IsHasEffect
(
11451781
)
or
c
:
IsHasEffect
(
11451782
))
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsStatus
(
STATUS_EFFECT_ENABLED
))
and
(
c
:
IsHasEffect
(
11451779
)
or
c
:
IsHasEffect
(
11451780
)
or
c
:
IsHasEffect
(
11451781
)
or
c
:
IsHasEffect
(
11451782
))
and
c
:
IsAbleToGraveAsCost
()
end
end
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c11451782.lua
View file @
03268b89
...
@@ -130,7 +130,7 @@ function cm.actarget2(e,te,tp)
...
@@ -130,7 +130,7 @@ function cm.actarget2(e,te,tp)
return
not
CONVIATRESS_BUFF
[
te
]
return
not
CONVIATRESS_BUFF
[
te
]
end
end
function
cm
.
extfilter
(
c
)
function
cm
.
extfilter
(
c
)
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsStatus
(
STATUS_EFFECT_ENABLED
))
and
(
c
:
IsHasEffect
(
11451779
)
or
c
:
IsHasEffect
(
11451780
)
or
c
:
IsHasEffect
(
11451781
)
or
c
:
IsHasEffect
(
11451782
))
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsStatus
(
STATUS_EFFECT_ENABLED
))
and
(
c
:
IsHasEffect
(
11451779
)
or
c
:
IsHasEffect
(
11451780
)
or
c
:
IsHasEffect
(
11451781
)
or
c
:
IsHasEffect
(
11451782
))
and
c
:
IsAbleToGraveAsCost
()
end
end
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -251,11 +251,11 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -251,11 +251,11 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return
ep
~=
tp
return
ep
~=
tp
end
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
or
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
or
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
cm
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
g1
=
Duel
.
GetMatchingGroup
(
cm
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToHand
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToHand
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
#
g1
>
0
and
(
#
g2
==
0
or
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
11451779
,
0
),
aux
.
Stringid
(
m
,
1
))
==
0
)
then
if
#
g1
>
0
and
(
#
g2
==
0
or
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
11451779
,
0
),
aux
.
Stringid
(
m
,
1
))
==
0
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
...
...
expansions/script/c117981478.lua
View file @
03268b89
...
@@ -37,8 +37,7 @@ function c117981478.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -37,8 +37,7 @@ function c117981478.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
c117981478
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
c117981478
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
end
and
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c117981478
.
spfilter
(
c
,
e
,
tp
)
function
c117981478
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xdd
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0xdd
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
expansions/script/c118776531.lua
View file @
03268b89
...
@@ -130,7 +130,7 @@ function c118776531.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -130,7 +130,7 @@ function c118776531.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c118776531
.
mpfilter
(
c
)
function
c118776531
.
mpfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
21377582
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
21377582
,
57761191
)
end
end
function
c118776531
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c118776531
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
...
...
expansions/script/c13255407.lua
View file @
03268b89
...
@@ -20,7 +20,7 @@ function cm.chainfilter(re,tp,cid)
...
@@ -20,7 +20,7 @@ function cm.chainfilter(re,tp,cid)
return
not
re
:
GetActivateLocation
()
==
LOCATION_HAND
return
not
re
:
GetActivateLocation
()
==
LOCATION_HAND
end
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
Is
AbleToGraveAsCost
()
and
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
if
chk
==
0
then
return
e
:
GetHandler
():
Is
Discardable
()
and
Duel
.
GetCustomActivityCount
(
m
,
tp
,
ACTIVITY_CHAIN
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
...
@@ -29,7 +29,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -29,7 +29,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1
:
SetValue
(
cm
.
aclimit
)
e1
:
SetValue
(
cm
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
end
function
cm
.
aclimit
(
e
,
re
,
tp
)
function
cm
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetActivateLocation
()
==
LOCATION_HAND
return
re
:
GetActivateLocation
()
==
LOCATION_HAND
...
...
expansions/script/c14001519.lua
View file @
03268b89
...
@@ -89,7 +89,7 @@ end
...
@@ -89,7 +89,7 @@ end
function
cm
.
exsetcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
exsetcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
)
return
#
mg
>
0
and
(
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
or
m
c
:
IsSSetable
())
and
Duel
.
GetTurnPlayer
()
==
tp
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
return
#
mg
>
0
and
(
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
or
c
:
IsSSetable
())
and
Duel
.
GetTurnPlayer
()
==
tp
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
end
end
function
cm
.
exsetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
exsetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c14001520.lua
View file @
03268b89
...
@@ -89,7 +89,7 @@ end
...
@@ -89,7 +89,7 @@ end
function
cm
.
exsetcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
exsetcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
,
tp
)
return
#
mg
>
0
and
(
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
or
m
c
:
IsSSetable
())
and
Duel
.
GetTurnPlayer
()
==
tp
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
return
#
mg
>
0
and
(
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
or
c
:
IsSSetable
())
and
Duel
.
GetTurnPlayer
()
==
tp
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
end
end
function
cm
.
exsetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
exsetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c25000013.lua
View file @
03268b89
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCode
(
EVENT_TO_GRAVE
)
e2
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
end
)
e2
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_HAND
+
LOCATION_DECK
)
end
)
e2
:
SetTarget
(
cm
.
settg
)
e2
:
SetTarget
(
cm
.
settg
)
e2
:
SetOperation
(
cm
.
s
p
op
)
e2
:
SetOperation
(
cm
.
s
et
op
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
...
...
expansions/script/c53734019.lua
View file @
03268b89
...
@@ -103,13 +103,18 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -103,13 +103,18 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
c
:
RegisterEffect
(
te1
)
c
:
RegisterEffect
(
te1
)
end
end
if
tc
.
aozora_field_effect
then
if
tc
.
aozora_field_effect
then
local
te2
=
tc
.
aozora_field_effect
:
Clone
()
local
te
=
tc
.
aozora_field_effect
if
te2
:
GetType
()
&
(
EFFECT_TYPE_QUICK_O
+
EFFECT_TYPE_QUICK_F
)
~=
0
then
local
dest
,
cat
,
con
,
cost
,
tg
,
op
=
te
:
GetDescription
(),
te
:
GetCategory
(),
te
:
GetCondition
(),
te
:
GetCost
(),
te
:
GetTarget
(),
te
:
GetOperation
()
local
te2
=
Effect
.
CreateEffect
(
c
)
if
dest
then
te2
:
SetDescription
(
dest
)
end
if
cat
then
te2
:
SetCategory
(
cat
)
end
te2
:
SetType
(
EFFECT_TYPE_IGNITION
)
te2
:
SetType
(
EFFECT_TYPE_IGNITION
)
te2
:
SetCode
(
0
)
end
te2
:
SetRange
(
LOCATION_SZONE
)
te2
:
SetRange
(
LOCATION_SZONE
)
te2
:
SetCountLimit
(
1
)
te2
:
SetCountLimit
(
1
)
if
con
then
te2
:
SetCondition
(
con
)
end
if
cost
then
te2
:
SetCost
(
cost
)
end
if
tg
then
te2
:
SetTarget
(
tg
)
end
if
op
then
te2
:
SetOperation
(
op
)
end
te2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
1
)
te2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
1
)
c
:
RegisterEffect
(
te2
)
c
:
RegisterEffect
(
te2
)
end
end
...
...
expansions/script/c53757009.lua
View file @
03268b89
...
@@ -620,7 +620,7 @@ function cm.actarget3(e,tc,tp)
...
@@ -620,7 +620,7 @@ function cm.actarget3(e,tc,tp)
return
Duel
.
GetLocationCount
(
p
,
LOCATION_SZONE
)
>
0
and
tc
:
IsType
(
TYPE_FIELD
)
and
c
:
IsLocation
(
LOCATION_FZONE
)
and
c
:
IsControler
(
p
)
and
tc
:
GetControler
()
==
p
and
tc
~=
c
return
Duel
.
GetLocationCount
(
p
,
LOCATION_SZONE
)
>
0
and
tc
:
IsType
(
TYPE_FIELD
)
and
c
:
IsLocation
(
LOCATION_FZONE
)
and
c
:
IsControler
(
p
)
and
tc
:
GetControler
()
==
p
and
tc
~=
c
end
end
function
cm
.
pcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
pcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
function
(
c
,
tp
)
return
c
:
GetReasonPlayer
()
~=
tp
and
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
not
c
:
IsLocation
(
LOCATION_DECK
)
end
,
1
,
nil
,
tp
)
and
e
:
GetHandler
():
GetSequence
()
>
4
return
eg
:
IsExists
(
function
(
c
,
tp
)
return
c
:
GetReasonPlayer
()
==
1
-
tp
and
c
:
IsPreviousLocation
(
LOCATION_DECK
)
and
not
c
:
IsLocation
(
LOCATION_DECK
)
end
,
1
,
nil
,
tp
)
and
e
:
GetHandler
():
GetSequence
()
>
4
end
end
function
cm
.
pfilter
(
c
,
tp
)
function
cm
.
pfilter
(
c
,
tp
)
return
not
c
:
IsLocation
(
LOCATION_FZONE
)
and
c
:
GetOriginalType
()
&
TYPE_FIELD
~=
0
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
return
not
c
:
IsLocation
(
LOCATION_FZONE
)
and
c
:
GetOriginalType
()
&
TYPE_FIELD
~=
0
and
c
:
GetActivateEffect
():
IsActivatable
(
tp
,
true
,
true
)
...
...
expansions/script/c53796107.lua
View file @
03268b89
...
@@ -362,7 +362,7 @@ function cm.IsSumReleasable(c,sc)
...
@@ -362,7 +362,7 @@ function cm.IsSumReleasable(c,sc)
end
end
return
res
return
res
end
end
function
cm
.
fselect
(
g
,
c
)
function
cm
.
fselect
(
g
,
c
,
tp
)
local
res
=
true
local
res
=
true
for
tc
in
aux
.
Next
(
g
)
do
if
not
cm
.
IsSumReleasable
(
tc
,
c
)
then
res
=
false
end
end
for
tc
in
aux
.
Next
(
g
)
do
if
not
cm
.
IsSumReleasable
(
tc
,
c
)
then
res
=
false
end
end
return
res
and
Duel
.
GetMZoneCount
(
tp
,
g
)
>
0
return
res
and
Duel
.
GetMZoneCount
(
tp
,
g
)
>
0
...
@@ -375,14 +375,14 @@ function cm.sumcon(e,c,minc)
...
@@ -375,14 +375,14 @@ function cm.sumcon(e,c,minc)
if
mi
<
minc
then
mi
=
minc
end
if
mi
<
minc
then
mi
=
minc
end
if
ma
<
mi
then
return
false
end
if
ma
<
mi
then
return
false
end
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
return
ma
>
0
and
g
:
CheckSubGroup
(
cm
.
fselect
,
mi
,
ma
,
c
)
return
ma
>
0
and
g
:
CheckSubGroup
(
cm
.
fselect
,
mi
,
ma
,
c
,
tp
)
end
end
function
cm
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
minc
)
function
cm
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
minc
)
local
mi
,
ma
=
c
:
GetTributeRequirement
()
local
mi
,
ma
=
c
:
GetTributeRequirement
()
if
minc
and
mi
<
minc
then
mi
=
minc
end
if
minc
and
mi
<
minc
then
mi
=
minc
end
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
true
,
mi
,
ma
,
c
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
true
,
mi
,
ma
,
c
,
tp
)
c
:
SetMaterial
(
sg
)
c
:
SetMaterial
(
sg
)
if
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
RegisterFlagEffect
(
tp
,
m
+
2500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
RegisterFlagEffect
(
tp
,
m
+
2500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
Duel
.
SendtoGrave
(
sg
,
REASON_RELEASE
+
REASON_SUMMON
+
REASON_MATERIAL
)
Duel
.
SendtoGrave
(
sg
,
REASON_RELEASE
+
REASON_SUMMON
+
REASON_MATERIAL
)
...
@@ -399,7 +399,7 @@ function cm.otcon1(e,c,minc)
...
@@ -399,7 +399,7 @@ function cm.otcon1(e,c,minc)
if
mi
<
minc
then
mi
=
minc
end
if
mi
<
minc
then
mi
=
minc
end
if
ma
<
mi
then
return
false
end
if
ma
<
mi
then
return
false
end
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
return
ma
>
0
and
g
:
CheckSubGroup
(
cm
.
fselect
,
mi
,
ma
,
c
)
return
ma
>
0
and
g
:
CheckSubGroup
(
cm
.
fselect
,
mi
,
ma
,
c
,
tp
)
else
else
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
tp
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
tp
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
...
@@ -412,7 +412,7 @@ function cm.otop1(e,tp,eg,ep,ev,re,r,rp,c,minc)
...
@@ -412,7 +412,7 @@ function cm.otop1(e,tp,eg,ep,ev,re,r,rp,c,minc)
if
minc
and
mi
<
minc
then
mi
=
minc
end
if
minc
and
mi
<
minc
then
mi
=
minc
end
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
true
,
mi
,
ma
,
c
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
true
,
mi
,
ma
,
c
,
tp
)
c
:
SetMaterial
(
sg
)
c
:
SetMaterial
(
sg
)
if
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
RegisterFlagEffect
(
tp
,
m
+
2500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
RegisterFlagEffect
(
tp
,
m
+
2500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
Duel
.
SendtoGrave
(
sg
,
REASON_RELEASE
+
REASON_SUMMON
+
REASON_MATERIAL
)
Duel
.
SendtoGrave
(
sg
,
REASON_RELEASE
+
REASON_SUMMON
+
REASON_MATERIAL
)
...
@@ -428,7 +428,7 @@ function cm.otcon2(e,c,minc)
...
@@ -428,7 +428,7 @@ function cm.otcon2(e,c,minc)
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsOriginalCodeRule
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
m
)
and
Duel
.
GetFlagEffect
(
tp
,
m
+
2500
)
==
0
then
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsOriginalCodeRule
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
m
)
and
Duel
.
GetFlagEffect
(
tp
,
m
+
2500
)
==
0
then
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
return
minc
<=
3
and
g
:
CheckSubGroup
(
cm
.
fselect
,
3
,
3
,
c
)
return
minc
<=
3
and
g
:
CheckSubGroup
(
cm
.
fselect
,
3
,
3
,
c
,
tp
)
else
else
return
minc
<=
3
and
Duel
.
CheckTribute
(
c
,
3
)
return
minc
<=
3
and
Duel
.
CheckTribute
(
c
,
3
)
end
end
...
@@ -437,7 +437,7 @@ function cm.otop2(e,tp,eg,ep,ev,re,r,rp,c,minc)
...
@@ -437,7 +437,7 @@ function cm.otop2(e,tp,eg,ep,ev,re,r,rp,c,minc)
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsOriginalCodeRule
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
m
)
and
Duel
.
GetFlagEffect
(
tp
,
m
+
2500
)
==
0
then
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsOriginalCodeRule
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
m
)
and
Duel
.
GetFlagEffect
(
tp
,
m
+
2500
)
==
0
then
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
true
,
3
,
3
,
c
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
true
,
3
,
3
,
c
,
tp
)
c
:
SetMaterial
(
sg
)
c
:
SetMaterial
(
sg
)
if
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
RegisterFlagEffect
(
tp
,
m
+
2500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
sg
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
RegisterFlagEffect
(
tp
,
m
+
2500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
Duel
.
SendtoGrave
(
sg
,
REASON_RELEASE
+
REASON_SUMMON
+
REASON_MATERIAL
)
Duel
.
SendtoGrave
(
sg
,
REASON_RELEASE
+
REASON_SUMMON
+
REASON_MATERIAL
)
...
...
expansions/script/c53799017.lua
View file @
03268b89
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
thcon
)
e1
:
SetCondition
(
cm
.
thcon
)
--
e1:SetCost(cm.thcost)
e1
:
SetCost
(
cm
.
thcost
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
@@ -34,51 +34,6 @@ function cm.initial_effect(c)
...
@@ -34,51 +34,6 @@ function cm.initial_effect(c)
e10
:
SetTarget
(
cm
.
actarget
)
e10
:
SetTarget
(
cm
.
actarget
)
e10
:
SetOperation
(
cm
.
costop
)
e10
:
SetOperation
(
cm
.
costop
)
c
:
RegisterEffect
(
e10
)
c
:
RegisterEffect
(
e10
)
if
not
cm
.
khonsu
then
cm
.
khonsu
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge1
:
SetOperation
(
cm
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
cm
[
0
]
=
Duel
.
SetOperationInfo
Duel
.
SetOperationInfo
=
function
(
...
)
local
f1
,
f2
=
Duel
.
GetFlagEffect
(
0
,
m
),
Duel
.
GetFlagEffect
(
1
,
m
)
if
f1
>
0
then
return
cm
[
0
](
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
,
LOCATION_DECK
)
end
if
f2
>
0
then
return
cm
[
0
](
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
0
,
LOCATION_DECK
)
end
if
f1
==
0
and
f2
==
0
then
return
cm
[
0
](
...
)
end
end
end
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
function
(
c
)
return
c
:
GetActivateEffect
()
end
,
0
,
0xff
,
0xff
,
nil
)
local
reg
=
Card
.
RegisterEffect
Card
.
RegisterEffect
=
function
(
sc
,
se
,
bool
)
if
se
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
local
tg
=
se
:
GetTarget
()
if
tg
then
se
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
,
chkc
)
end
if
chk
==
0
then
return
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
)
else
se
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
Duel
.
GetFlagEffect
(
tp
,
m
)
>
0
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
)
end
end
reg
(
sc
,
se
,
bool
)
end
for
tc
in
aux
.
Next
(
g
)
do
if
tc
.
initial_effect
then
tc
:
ReplaceEffect
(
tc
:
GetOriginalCode
(),
0
)
end
end
Card
.
RegisterEffect
=
reg
e
:
Reset
()
end
end
function
cm
.
mfilter
(
c
,
xyzc
)
function
cm
.
mfilter
(
c
,
xyzc
)
return
c
:
IsXyzType
(
TYPE_MONSTER
)
and
c
:
IsXyzLevel
(
xyzc
,
7
)
return
c
:
IsXyzType
(
TYPE_MONSTER
)
and
c
:
IsXyzLevel
(
xyzc
,
7
)
...
@@ -113,7 +68,7 @@ function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -113,7 +68,7 @@ function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
cat
=
re
:
GetCategory
()
local
cat
=
re
:
GetCategory
()
re
:
SetCategory
(
CATEGORY_TOGRAVE
)
re
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DECKDES
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_CHAIN_END
)
e3
:
SetCode
(
EVENT_CHAIN_END
)
...
@@ -124,7 +79,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -124,7 +79,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Group
.
CreateGroup
()
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
cm
.
repop
)
Duel
.
ChangeChainOperation
(
ev
,
cm
.
repop
)
Duel
.
ResetFlagEffect
(
1
-
tp
,
m
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_DECK
)
end
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
cat
,
re
=
e
:
GetLabel
(),
e
:
GetLabelObject
()
local
cat
,
re
=
e
:
GetLabel
(),
e
:
GetLabelObject
()
...
@@ -143,7 +98,7 @@ function cm.actarget(e,te,tp)
...
@@ -143,7 +98,7 @@ function cm.actarget(e,te,tp)
return
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
return
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
end
function
cm
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
m
+
500
)
>
0
then
return
end
if
Duel
.
GetFlagEffect
(
e
:
GetHandler
():
GetControler
()
,
m
+
500
)
>
0
then
return
end
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_CHAIN
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_CHAIN
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
tp
,
m
+
500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
e
:
GetHandler
():
GetControler
()
,
m
+
500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
expansions/script/c7439101.lua
View file @
03268b89
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
Party_time_globle_check
=
true
Party_time_table
=
{}
Party_time_table
=
{}
function
Party_time_rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
Party_time_chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
Party_time_chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
if
#
g
<=
0
then
return
end
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
if
count
>#
g
then
count
=#
g
end
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
end
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
|
LOCATION_DECK
)
then
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
sg
=
tg
:
Filter
(
Party_time_rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
|
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoHand
(
tg
,
tp
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
end
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
local
sg
=
g
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
sg
:
Merge
(
ag
)
sg
:
Merge
(
ag
)
end
end
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
ce
:
SetValue
(
aux
.
TRUE
)
end
end
return
ce
return
ce
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
local
cg2
=
cg
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
cg2
:
Merge
(
ag
)
cg2
:
Merge
(
ag
)
end
end
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
--
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
cg
=
Group
.
CreateGroup
()
local
eg
=
g
:
Clone
()
local
eg
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg2
=
eg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
eg2
=
eg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
local
sg1
=
sg
:
Clone
()
local
sg1
=
sg
:
Clone
()
local
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
@@ -376,7 +388,7 @@ function cm.initial_effect(c)
...
@@ -376,7 +388,7 @@ function cm.initial_effect(c)
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- sg:AddCard(c)
-- local sg2=sg:Clone()
-- local sg2=sg:Clone()
--
local pg=sg:Filter(cm.
rfilter,nil,7439100+id)
--
local pg=sg:Filter(Party_time_
rfilter,nil,7439100+id)
-- sg2:Sub(pg)
-- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
-- sg:RemoveCard(c)
...
@@ -414,7 +426,7 @@ function cm.initial_effect(c)
...
@@ -414,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -427,16 +439,6 @@ function cm.initial_effect(c)
...
@@ -427,16 +439,6 @@ function cm.initial_effect(c)
end
end
end
end
end
end
function
cm
.
chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
cm
.
chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
cm
.
actcon
(
e
)
function
cm
.
actcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_DECK
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_DECK
,
0
,
1
,
nil
)
end
end
...
...
expansions/script/c7439103.lua
View file @
03268b89
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
Party_time_globle_check
=
true
Party_time_table
=
{}
Party_time_table
=
{}
function
Party_time_rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
Party_time_chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
Party_time_chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
if
#
g
<=
0
then
return
end
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
if
count
>#
g
then
count
=#
g
end
...
@@ -106,8 +116,7 @@ function cm.initial_effect(c)
...
@@ -106,8 +116,7 @@ function cm.initial_effect(c)
for
i
=
1
,
id
-
1
,
1
do
tc
=
cg
:
GetNext
()
end
for
i
=
1
,
id
-
1
,
1
do
tc
=
cg
:
GetNext
()
end
end
end
sg
:
AddCard
(
tc
)
sg
:
AddCard
(
tc
)
g
:
RemoveCard
(
tc
)
cg
:
RemoveCard
(
tc
)
cg
:
DeleteGroup
()
end
end
--Duel.HintSelection(g)
--Duel.HintSelection(g)
Duel
.
HintSelection
(
sg
)
Duel
.
HintSelection
(
sg
)
...
@@ -118,15 +127,16 @@ function cm.initial_effect(c)
...
@@ -118,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
end
...
@@ -140,15 +150,16 @@ function cm.initial_effect(c)
...
@@ -140,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
|
LOCATION_DECK
)
then
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
sg
=
tg
:
Filter
(
Party_time_rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
|
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoHand
(
tg
,
tp
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
end
...
@@ -165,7 +176,7 @@ function cm.initial_effect(c)
...
@@ -165,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
local
sg
=
g
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
sg
:
Merge
(
ag
)
sg
:
Merge
(
ag
)
end
end
...
@@ -185,7 +196,7 @@ function cm.initial_effect(c)
...
@@ -185,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -206,7 +217,7 @@ function cm.initial_effect(c)
...
@@ -206,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -227,7 +238,7 @@ function cm.initial_effect(c)
...
@@ -227,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -250,8 +261,8 @@ function cm.initial_effect(c)
...
@@ -250,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
ce
:
SetValue
(
aux
.
TRUE
)
end
end
return
ce
return
ce
...
@@ -266,7 +277,7 @@ function cm.initial_effect(c)
...
@@ -266,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
local
cg2
=
cg
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
cg2
:
Merge
(
ag
)
cg2
:
Merge
(
ag
)
end
end
...
@@ -286,7 +297,7 @@ function cm.initial_effect(c)
...
@@ -286,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
--
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
@@ -306,9 +317,9 @@ function cm.initial_effect(c)
...
@@ -306,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
cg
=
Group
.
CreateGroup
()
local
eg
=
g
:
Clone
()
local
eg
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg2
=
eg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
eg2
=
eg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
local
sg1
=
sg
:
Clone
()
local
sg1
=
sg
:
Clone
()
local
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
@@ -369,6 +380,33 @@ function cm.initial_effect(c)
...
@@ -369,6 +380,33 @@ function cm.initial_effect(c)
end
end
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
end
end
--_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture
--function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
-- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then
-- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
-- local ag=Party_time_table[7439100+id]
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- local sg2=sg:Clone()
-- local pg=sg:Filter(Party_time_rfilter,nil,7439100+id)
-- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
-- return false
-- end
-- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params))
-- if res then
-- aux.SubGroupCaptured:Clear()
-- aux.SubGroupCaptured:Merge(sg)
-- else
-- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params)
-- end
-- sg:RemoveCard(c)
-- return res
-- end
-- end
-- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
--end
_IsCanBeRitualMaterial
=
Card
.
IsCanBeRitualMaterial
_IsCanBeRitualMaterial
=
Card
.
IsCanBeRitualMaterial
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
...
@@ -388,7 +426,7 @@ function cm.initial_effect(c)
...
@@ -388,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -401,16 +439,6 @@ function cm.initial_effect(c)
...
@@ -401,16 +439,6 @@ function cm.initial_effect(c)
end
end
end
end
end
end
function
cm
.
chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
cm
.
chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
cm
.
actcon
(
e
)
function
cm
.
actcon
(
e
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_DECK
,
0
,
1
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_DECK
,
0
,
1
,
nil
)
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
3
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
3
...
...
expansions/script/c7439105.lua
View file @
03268b89
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
Party_time_globle_check
=
true
Party_time_table
=
{}
Party_time_table
=
{}
function
Party_time_rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
Party_time_chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
Party_time_chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
if
#
g
<=
0
then
return
end
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
if
count
>#
g
then
count
=#
g
end
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
end
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
|
LOCATION_DECK
)
then
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
sg
=
tg
:
Filter
(
Party_time_rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
|
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoHand
(
tg
,
tp
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
end
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
local
sg
=
g
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
sg
:
Merge
(
ag
)
sg
:
Merge
(
ag
)
end
end
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
ce
:
SetValue
(
aux
.
TRUE
)
end
end
return
ce
return
ce
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
local
cg2
=
cg
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
cg2
:
Merge
(
ag
)
cg2
:
Merge
(
ag
)
end
end
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
--
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
cg
=
Group
.
CreateGroup
()
local
eg
=
g
:
Clone
()
local
eg
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg2
=
eg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
eg2
=
eg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
local
sg1
=
sg
:
Clone
()
local
sg1
=
sg
:
Clone
()
local
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
@@ -368,6 +380,33 @@ function cm.initial_effect(c)
...
@@ -368,6 +380,33 @@ function cm.initial_effect(c)
end
end
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
end
end
--_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture
--function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
-- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then
-- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
-- local ag=Party_time_table[7439100+id]
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- local sg2=sg:Clone()
-- local pg=sg:Filter(Party_time_rfilter,nil,7439100+id)
-- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
-- return false
-- end
-- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params))
-- if res then
-- aux.SubGroupCaptured:Clear()
-- aux.SubGroupCaptured:Merge(sg)
-- else
-- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params)
-- end
-- sg:RemoveCard(c)
-- return res
-- end
-- end
-- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
--end
_IsCanBeRitualMaterial
=
Card
.
IsCanBeRitualMaterial
_IsCanBeRitualMaterial
=
Card
.
IsCanBeRitualMaterial
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
...
@@ -387,7 +426,7 @@ function cm.initial_effect(c)
...
@@ -387,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -400,16 +439,6 @@ function cm.initial_effect(c)
...
@@ -400,16 +439,6 @@ function cm.initial_effect(c)
end
end
end
end
end
end
function
cm
.
chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
cm
.
chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
cm
.
actcon
(
e
)
function
cm
.
actcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
end
...
...
expansions/script/c7439107.lua
View file @
03268b89
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
Party_time_globle_check
=
true
Party_time_table
=
{}
Party_time_table
=
{}
function
Party_time_rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
Party_time_chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
Party_time_chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
if
#
g
<=
0
then
return
end
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
if
count
>#
g
then
count
=#
g
end
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
end
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
|
LOCATION_DECK
)
then
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
sg
=
tg
:
Filter
(
Party_time_rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
|
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoHand
(
tg
,
tp
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
end
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
local
sg
=
g
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
sg
:
Merge
(
ag
)
sg
:
Merge
(
ag
)
end
end
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
ce
:
SetValue
(
aux
.
TRUE
)
end
end
return
ce
return
ce
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
local
cg2
=
cg
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
cg2
:
Merge
(
ag
)
cg2
:
Merge
(
ag
)
end
end
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
--
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
cg
=
Group
.
CreateGroup
()
local
eg
=
g
:
Clone
()
local
eg
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg2
=
eg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
eg2
=
eg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
local
sg1
=
sg
:
Clone
()
local
sg1
=
sg
:
Clone
()
local
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
@@ -368,6 +380,33 @@ function cm.initial_effect(c)
...
@@ -368,6 +380,33 @@ function cm.initial_effect(c)
end
end
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
end
end
--_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture
--function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
-- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then
-- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
-- local ag=Party_time_table[7439100+id]
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- local sg2=sg:Clone()
-- local pg=sg:Filter(Party_time_rfilter,nil,7439100+id)
-- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
-- return false
-- end
-- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params))
-- if res then
-- aux.SubGroupCaptured:Clear()
-- aux.SubGroupCaptured:Merge(sg)
-- else
-- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params)
-- end
-- sg:RemoveCard(c)
-- return res
-- end
-- end
-- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
--end
_IsCanBeRitualMaterial
=
Card
.
IsCanBeRitualMaterial
_IsCanBeRitualMaterial
=
Card
.
IsCanBeRitualMaterial
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
...
@@ -387,7 +426,7 @@ function cm.initial_effect(c)
...
@@ -387,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -400,16 +439,6 @@ function cm.initial_effect(c)
...
@@ -400,16 +439,6 @@ function cm.initial_effect(c)
end
end
end
end
end
end
function
cm
.
chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
cm
.
chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
cm
.
actcon
(
e
)
function
cm
.
actcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
+
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
+
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
end
...
...
expansions/script/c7439109.lua
View file @
03268b89
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
Party_time_globle_check
=
true
Party_time_table
=
{}
Party_time_table
=
{}
function
Party_time_rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
Party_time_chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
Party_time_chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
function
Party_time_RandomSelect
(
g
,
tp
,
count
)
if
#
g
<=
0
then
return
end
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
if
count
>#
g
then
count
=#
g
end
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_DECK
)
then
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
tg
,
1
-
tg
:
GetControler
(),
seq
,
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
end
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
m
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
)
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Card"
and
tg
:
GetFlagEffectLabel
(
7439100
)
==
7439100
+
id
and
tg
:
IsLocation
(
LOCATION_HAND
|
LOCATION_DECK
)
then
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
return
_SendtoHand
(
tg
,
1
-
tg
:
GetControler
(),
reason
)
end
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
sg
=
tg
:
Filter
(
Party_time_rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
|
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
local
tgc
=
tg
:
Clone
()
if
tg
and
tg
:
GetCount
()
>
0
then
tgc
:
Sub
(
sg
)
_SendtoHand
(
tg
,
tp
,
reason
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
end
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
local
sg
=
g
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
sg
:
Merge
(
ag
)
sg
:
Merge
(
ag
)
end
end
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
ce
:
SetValue
(
aux
.
TRUE
)
end
end
return
ce
return
ce
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
local
cg2
=
cg
:
Clone
()
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
and
Duel
.
GetFlagEffect
(
0
,
7439099
)
==
0
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
cg2
:
Merge
(
ag
)
cg2
:
Merge
(
ag
)
end
end
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
--
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
cg
=
Group
.
CreateGroup
()
local
eg
=
g
:
Clone
()
local
eg
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg1
=
g
:
Clone
()
local
eg2
=
eg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
eg2
=
eg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
local
sg1
=
sg
:
Clone
()
local
sg1
=
sg
:
Clone
()
local
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
@@ -368,6 +380,33 @@ function cm.initial_effect(c)
...
@@ -368,6 +380,33 @@ function cm.initial_effect(c)
end
end
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
end
end
--_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture
--function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
-- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then
-- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
-- local ag=Party_time_table[7439100+id]
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- local sg2=sg:Clone()
-- local pg=sg:Filter(Party_time_rfilter,nil,7439100+id)
-- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
-- return false
-- end
-- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params))
-- if res then
-- aux.SubGroupCaptured:Clear()
-- aux.SubGroupCaptured:Merge(sg)
-- else
-- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params)
-- end
-- sg:RemoveCard(c)
-- return res
-- end
-- end
-- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
--end
_IsCanBeRitualMaterial
=
Card
.
IsCanBeRitualMaterial
_IsCanBeRitualMaterial
=
Card
.
IsCanBeRitualMaterial
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
if
Duel
.
GetCurrentChain
()
~=
0
then
if
Duel
.
GetCurrentChain
()
~=
0
then
...
@@ -387,7 +426,7 @@ function cm.initial_effect(c)
...
@@ -387,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
if
aux
.
GetValueType
(
ag
)
==
"Group"
then
ag
=
ag
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
ag
=
ag
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
ag
:
GetCount
()
~=
0
then
if
ag
:
GetCount
()
~=
0
then
g
:
Merge
(
ag
)
g
:
Merge
(
ag
)
end
end
...
@@ -400,16 +439,6 @@ function cm.initial_effect(c)
...
@@ -400,16 +439,6 @@ function cm.initial_effect(c)
end
end
end
end
end
end
function
cm
.
chain_target
(
e
,
te
,
tp
)
return
Group
.
CreateGroup
()
end
function
cm
.
chain_operation
(
e
,
te
,
tp
,
tc
,
mat
,
sumtype
)
if
not
sumtype
then
sumtype
=
SUMMON_TYPE_FUSION
end
Duel
.
SpecialSummon
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
cm
.
rfilter
(
c
,
id
)
return
c
:
GetFlagEffectLabel
(
7439100
)
==
id
end
function
cm
.
actcon
(
e
)
function
cm
.
actcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
,
0
,
1
,
nil
)
end
end
...
...
expansions/script/c79083105.lua
View file @
03268b89
...
@@ -96,9 +96,7 @@ function c79083105.zntg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -96,9 +96,7 @@ function c79083105.zntg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79083810
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79083810
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79083910
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79083910
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79083010
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79083010
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79084010
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79084010
)
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79084110
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79084210
)
if
chk
==
0
then
return
not
b1
end
if
chk
==
0
then
return
not
b1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
79083104
,
0
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
79083104
,
0
))
local
zone
=
Duel
.
SelectField
(
tp
,
1
,
LOCATION_ONFIELD
,
0
,
flag
)
local
zone
=
Duel
.
SelectField
(
tp
,
1
,
LOCATION_ONFIELD
,
0
,
flag
)
...
@@ -273,12 +271,12 @@ function c79083105.srfilter(c,e,tp,check)
...
@@ -273,12 +271,12 @@ function c79083105.srfilter(c,e,tp,check)
end
end
function
c79083105
.
srtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c79083105
.
srtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
check
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
check
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c79083105
.
srfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
check
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c79083105
.
srfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
check
)
end
end
end
function
c79083105
.
srop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c79083105
.
srop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
check
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
local
check
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c79083105
.
srfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
check
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c79083105
.
srfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
check
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
then
if
tc
:
IsAbleToHand
()
and
(
not
(
check
and
tc
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
false
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsType
(
TYPE_RITUAL
))
or
Duel
.
SelectOption
(
tp
,
1190
,
1152
)
==
0
)
then
if
tc
:
IsAbleToHand
()
and
(
not
(
check
and
tc
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
false
)
and
tc
:
IsType
(
TYPE_MONSTER
)
and
tc
:
IsType
(
TYPE_RITUAL
))
or
Duel
.
SelectOption
(
tp
,
1190
,
1152
)
==
0
)
then
...
...
expansions/script/c87490445.lua
View file @
03268b89
...
@@ -33,8 +33,8 @@ function c87490445.initial_effect(c)
...
@@ -33,8 +33,8 @@ function c87490445.initial_effect(c)
end
end
function
c87490445
.
sxxcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c87490445
.
sxxcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
GetFlagEffect
(
8749
0
445
)
==
0
end
if
chk
==
0
then
return
c
:
GetFlagEffect
(
8749
1
445
)
==
0
end
c
:
RegisterFlagEffect
(
8749
0
445
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
,
0
,
1
)
c
:
RegisterFlagEffect
(
8749
1
445
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
,
0
,
1
)
end
end
function
c87490445
.
sxxtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c87490445
.
sxxtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
...
...
expansions/script/c98920086.lua
0 → 100644
View file @
03268b89
--魔女术大贤者
function
c98920086
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_SPELLCASTER
),
c98920086
.
matfilter
,
true
)
--search
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
98920086
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
98920086
)
e1
:
SetCondition
(
c98920086
.
thcon
)
e1
:
SetTarget
(
c98920086
.
thtg
)
e1
:
SetOperation
(
c98920086
.
thop
)
c
:
RegisterEffect
(
e1
)
--cannot be target/effect indestructable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c98920086
.
indcon
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e3
:
SetValue
(
aux
.
tgoval
)
c
:
RegisterEffect
(
e3
)
--atkup
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
98920086
,
0
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_PRE_DAMAGE_CALCULATE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c98920086
.
atkcon
)
e1
:
SetCost
(
c98920086
.
atkcost
)
e1
:
SetOperation
(
c98920086
.
atkop
)
c
:
RegisterEffect
(
e1
)
end
function
c98920086
.
matfilter
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
end
function
c98920086
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
end
function
c98920086
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x128
,
0x150
)
and
c
:
IsAbleToHand
()
end
function
c98920086
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c98920086
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c98920086
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c98920086
.
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
c98920086
.
indcon
(
e
)
return
ep
==
tp
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsRace
,
tp
,
LOCATION_GRAVE
,
0
,
4
,
nil
,
RACE_SPELLCASTER
)
end
function
c98920086
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
Duel
.
GetAttackTarget
()
if
not
c
then
return
false
end
if
c
:
IsControler
(
1
-
tp
)
then
c
=
Duel
.
GetAttacker
()
end
e
:
SetLabelObject
(
c
)
return
c
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsRelateToBattle
()
end
function
c98920086
.
costfilter
(
c
,
tp
)
if
c
:
IsLocation
(
LOCATION_HAND
)
then
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsDiscardable
()
end
return
c
:
IsFaceup
()
and
c
:
IsAbleToGraveAsCost
()
and
c
:
IsHasEffect
(
83289866
,
tp
)
end
function
c98920086
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c98920086
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
nil
,
tp
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c98920086
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
nil
,
tp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DISCARD
)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
te
=
tc
:
IsHasEffect
(
83289866
,
tp
)
if
te
then
te
:
UseCountLimit
(
tp
)
Duel
.
SendtoGrave
(
tc
,
REASON_COST
)
else
Duel
.
SendtoGrave
(
tc
,
REASON_COST
+
REASON_DISCARD
)
end
end
function
c98920086
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetLabelObject
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToBattle
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
e1
:
SetValue
(
c
:
GetAttack
()
*
2
)
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