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)
local
owner
,
handler
,
ignore
=
Scl
.
GetRegisterInfo
(
reg_obj
)
if
type
(
handler
)
==
"number"
then
Duel
.
RegisterEffect
(
reg_eff
,
handler
)
else
else
if
aux
.
GetValueType
(
handler
)
==
"Card"
then
handler
:
RegisterEffect
(
reg_eff
,
ignore
)
end
return
reg_eff
,
reg_eff
:
GetFieldID
()
...
...
expansions/script/c10199990.lua
View file @
03268b89
...
...
@@ -1362,7 +1362,7 @@ rscon.negcon = function(dn_filter, pl_fun)
dn_filter
=
dn_list
[
dn_filter
]
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
rscon
.
discon
=
function
(
dn_filter
,
pl_fun
)
...
...
@@ -1372,7 +1372,7 @@ rscon.discon = function(dn_filter, pl_fun)
dn_filter
=
dn_list
[
dn_filter
]
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
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
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
112538374
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
...
@@ -9,36 +11,42 @@ function c112538374.initial_effect(c)
e1
:
SetTarget
(
c112538374
.
sptg
)
e1
:
SetOperation
(
c112538374
.
spop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
112538374
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_HAND
+
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
112538
474
)
e2
:
SetCountLimit
(
1
,
112538
375
)
e2
:
SetCost
(
c112538374
.
hspcost
)
e2
:
SetTarget
(
c112538374
.
hsptg
)
e2
:
SetOperation
(
c112538374
.
hspop
)
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
)
e4
:
Set
Category
(
CATEGORY_TODECK
)
e4
:
Set
Type
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e4
:
Set
Range
(
LOCATION_REMOVED
)
e4
:
SetCode
(
EVENT_
PHASE
+
PHASE_END
)
e4
:
Set
CountLimit
(
1
,
112538574
)
e4
:
SetCo
ndition
(
c112538374
.
retcon
)
e4
:
SetTarget
(
c112538374
.
ret
tg
)
e4
:
SetOperation
(
c112538374
.
ret
op
)
e4
:
Set
Description
(
aux
.
Stringid
(
112538374
,
3
)
)
e4
:
Set
Category
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
Set
Type
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_
REMOVE
)
e4
:
Set
Property
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetCo
untLimit
(
1
,
112538377
)
e4
:
SetTarget
(
c112538374
.
th
tg
)
e4
:
SetOperation
(
c112538374
.
th
op
)
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
function
c112538374
.
costfilter
(
c
)
return
c
:
IsRace
(
RACE_AQUA
)
and
c
:
IsDiscardable
()
end
...
...
@@ -52,7 +60,7 @@ function c112538374.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
end
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
function
c112538374
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c112538374
.
rfilter
(
c
)
return
not
c
:
IsCode
(
112538374
)
and
c
:
IsRace
(
RACE_AQUA
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsLevelBelow
(
2
)
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsLevelBelow
(
2
)
and
c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
c
:
IsRace
(
RACE_AQUA
)
and
not
c
:
IsCode
(
112538374
)
and
c
:
IsAbleToGraveAsCost
()
end
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
)
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
)
end
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
function
c112538374
.
hspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
)
end
end
function
c112538374
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
Duel
.
GetTurnPlayer
()
return
Duel
.
GetTurnPlayer
()
~=
tp
end
function
c112538374
.
ret
filter
(
c
)
function
c112538374
.
df
filter
(
c
)
return
c
:
IsRace
(
RACE_AQUA
)
and
c
:
IsAbleToDeck
()
end
function
c112538374
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
local
g
=
Duel
.
GetMatchingGroup
(
c112538374
.
retfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
2
,
0
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
2
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
function
c112538374
.
retop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
sg
=
Group
.
CreateGroup
()
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
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
sg
:
Merge
(
g
:
Select
(
tp
,
1
,
1
,
nil
))
end
if
sg
:
GetCount
()
==
2
then
Duel
.
SendtoDeck
(
sg
,
nil
,
2
,
REASON_EFFECT
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c112538374
.
dffilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
tc
=
g
:
GetFirst
()
local
gg
=
Group
.
FromCards
(
c
,
tc
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SendtoDeck
(
gg
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c112538374
.
thfilter
(
c
)
return
c
:
IsRace
(
RACE_AQUA
)
and
not
c
:
IsCode
(
112538374
)
and
c
:
IsAbleToHand
()
end
...
...
expansions/script/c11451446.lua
View file @
03268b89
...
...
@@ -45,7 +45,7 @@ function cm.filter1(c,tp)
return
c
:
IsReleasable
()
and
Duel
.
GetMZoneCount
(
1
-
tp
,
c
,
tp
)
>
0
end
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
function
cm
.
filter3
(
c
,
e
,
tp
)
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)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
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
local
hash
=
{}
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)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
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
local
hash
=
{}
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)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
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
local
hash
=
{}
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)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
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
local
hash
=
{}
local
class
=
0
...
...
expansions/script/c11451775.lua
View file @
03268b89
...
...
@@ -167,6 +167,8 @@ function cm.sfilter(c)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
end
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
class
=
g
:
GetClassCount
(
Card
.
GetCode
)
if
class
>
0
then
...
...
expansions/script/c11451776.lua
View file @
03268b89
...
...
@@ -191,6 +191,8 @@ function cm.sfilter(c)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsFaceup
()
end
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
class
=
g
:
GetClassCount
(
Card
.
GetCode
)
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)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
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
local
class
=
BATTLE_PHASE_CHECK
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)
Duel
.
RegisterEffect
(
e3
,
tp
)
end
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
local
class
=
BATTLE_PHASE_CHECK
if
class
>
0
then
...
...
expansions/script/c11451779.lua
View file @
03268b89
...
...
@@ -81,7 +81,7 @@ function cm.actarget2(e,te,tp)
return
not
CONVIATRESS_BUFF
[
te
]
end
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
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c11451780.lua
View file @
03268b89
...
...
@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp)
return
not
CONVIATRESS_BUFF
[
te
]
end
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
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c11451781.lua
View file @
03268b89
...
...
@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp)
return
not
CONVIATRESS_BUFF
[
te
]
end
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
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c11451782.lua
View file @
03268b89
...
...
@@ -130,7 +130,7 @@ function cm.actarget2(e,te,tp)
return
not
CONVIATRESS_BUFF
[
te
]
end
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
function
cm
.
costop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -251,11 +251,11 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return
ep
~=
tp
end
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
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
#
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
)
...
...
expansions/script/c117981478.lua
View file @
03268b89
...
...
@@ -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
)
and
Duel
.
IsExistingMatchingCard
(
c117981478
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_HAND
+
LOCATION_DECK
)
end
function
c117981478
.
spfilter
(
c
,
e
,
tp
)
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)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c118776531
.
mpfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
21377582
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
21377582
,
57761191
)
end
function
c118776531
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
...
...
expansions/script/c13255407.lua
View file @
03268b89
...
...
@@ -20,7 +20,7 @@ function cm.chainfilter(re,tp,cid)
return
not
re
:
GetActivateLocation
()
==
LOCATION_HAND
end
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
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
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)
e1
:
SetValue
(
cm
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetActivateLocation
()
==
LOCATION_HAND
...
...
expansions/script/c14001519.lua
View file @
03268b89
...
...
@@ -89,7 +89,7 @@ end
function
cm
.
exsetcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
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
function
cm
.
exsetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c14001520.lua
View file @
03268b89
...
...
@@ -89,7 +89,7 @@ end
function
cm
.
exsetcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
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
function
cm
.
exsetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c25000013.lua
View file @
03268b89
...
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
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
:
SetTarget
(
cm
.
settg
)
e2
:
SetOperation
(
cm
.
s
p
op
)
e2
:
SetOperation
(
cm
.
s
et
op
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
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)
c
:
RegisterEffect
(
te1
)
end
if
tc
.
aozora_field_effect
then
local
te2
=
tc
.
aozora_field_effect
:
Clone
()
if
te2
:
GetType
()
&
(
EFFECT_TYPE_QUICK_O
+
EFFECT_TYPE_QUICK_F
)
~=
0
then
local
te
=
tc
.
aozora_field_effect
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
:
SetCode
(
0
)
end
te2
:
SetRange
(
LOCATION_SZONE
)
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
)
c
:
RegisterEffect
(
te2
)
end
...
...
expansions/script/c53757009.lua
View file @
03268b89
...
...
@@ -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
end
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
function
cm
.
pfilter
(
c
,
tp
)
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)
end
return
res
end
function
cm
.
fselect
(
g
,
c
)
function
cm
.
fselect
(
g
,
c
,
tp
)
local
res
=
true
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
...
...
@@ -375,14 +375,14 @@ function cm.sumcon(e,c,minc)
if
mi
<
minc
then
mi
=
minc
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
))
return
ma
>
0
and
g
:
CheckSubGroup
(
cm
.
fselect
,
mi
,
ma
,
c
)
return
ma
>
0
and
g
:
CheckSubGroup
(
cm
.
fselect
,
mi
,
ma
,
c
,
tp
)
end
function
cm
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
minc
)
local
mi
,
ma
=
c
:
GetTributeRequirement
()
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
))
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
)
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
)
...
...
@@ -399,7 +399,7 @@ function cm.otcon1(e,c,minc)
if
mi
<
minc
then
mi
=
minc
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
))
return
ma
>
0
and
g
:
CheckSubGroup
(
cm
.
fselect
,
mi
,
ma
,
c
)
return
ma
>
0
and
g
:
CheckSubGroup
(
cm
.
fselect
,
mi
,
ma
,
c
,
tp
)
else
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
)
...
...
@@ -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
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
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
)
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
)
...
...
@@ -428,7 +428,7 @@ function cm.otcon2(e,c,minc)
local
tp
=
c
:
GetControler
()
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
))
return
minc
<=
3
and
g
:
CheckSubGroup
(
cm
.
fselect
,
3
,
3
,
c
)
return
minc
<=
3
and
g
:
CheckSubGroup
(
cm
.
fselect
,
3
,
3
,
c
,
tp
)
else
return
minc
<=
3
and
Duel
.
CheckTribute
(
c
,
3
)
end
...
...
@@ -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
local
g
=
Group
.
__add
(
Duel
.
GetTributeGroup
(
c
),
Duel
.
GetMatchingGroup
(
Card
.
IsCode
,
tp
,
LOCATION_DECK
,
0
,
nil
,
m
))
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
)
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
)
...
...
expansions/script/c53799017.lua
View file @
03268b89
...
...
@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCondition
(
cm
.
thcon
)
--
e1:SetCost(cm.thcost)
e1
:
SetCost
(
cm
.
thcost
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
...
...
@@ -34,51 +34,6 @@ function cm.initial_effect(c)
e10
:
SetTarget
(
cm
.
actarget
)
e10
:
SetOperation
(
cm
.
costop
)
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
function
cm
.
mfilter
(
c
,
xyzc
)
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)
end
function
cm
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
cat
=
re
:
GetCategory
()
re
:
SetCategory
(
CATEGORY_TOGRAVE
)
re
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_DECKDES
)
local
e3
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_CHAIN_END
)
...
...
@@ -124,7 +79,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Group
.
CreateGroup
()
Duel
.
ChangeTargetCard
(
ev
,
g
)
Duel
.
ChangeChainOperation
(
ev
,
cm
.
repop
)
Duel
.
ResetFlagEffect
(
1
-
tp
,
m
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_DECK
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
cat
,
re
=
e
:
GetLabel
(),
e
:
GetLabelObject
()
...
...
@@ -143,7 +98,7 @@ function cm.actarget(e,te,tp)
return
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
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
+
500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
e
:
GetHandler
():
GetControler
()
,
m
+
500
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
expansions/script/c7439101.lua
View file @
03268b89
...
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
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
)
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
...
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
...
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
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
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoHand
(
tg
,
tp
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
...
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
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
sg
:
Merge
(
ag
)
end
...
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
end
return
ce
...
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
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
cg2
:
Merge
(
ag
)
end
...
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
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
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
eg
=
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
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
...
@@ -376,7 +388,7 @@ function cm.initial_effect(c)
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- 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)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
...
...
@@ -414,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
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
g
:
Merge
(
ag
)
end
...
...
@@ -427,16 +439,6 @@ function cm.initial_effect(c)
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
)
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
...
...
expansions/script/c7439103.lua
View file @
03268b89
...
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
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
)
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
...
...
@@ -106,8 +116,7 @@ function cm.initial_effect(c)
for
i
=
1
,
id
-
1
,
1
do
tc
=
cg
:
GetNext
()
end
end
sg
:
AddCard
(
tc
)
g
:
RemoveCard
(
tc
)
cg
:
DeleteGroup
()
cg
:
RemoveCard
(
tc
)
end
--Duel.HintSelection(g)
Duel
.
HintSelection
(
sg
)
...
...
@@ -118,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
...
...
@@ -140,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
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
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoHand
(
tg
,
tp
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
...
...
@@ -165,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
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
sg
:
Merge
(
ag
)
end
...
...
@@ -185,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -206,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -227,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -250,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
end
return
ce
...
...
@@ -266,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
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
cg2
:
Merge
(
ag
)
end
...
...
@@ -286,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
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
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
...
@@ -306,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
eg
=
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
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
...
@@ -369,6 +380,33 @@ function cm.initial_effect(c)
end
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
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
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
if
Duel
.
GetCurrentChain
()
~=
0
then
...
...
@@ -388,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
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
g
:
Merge
(
ag
)
end
...
...
@@ -401,16 +439,6 @@ function cm.initial_effect(c)
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
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_DECK
,
0
,
1
,
nil
)
return
g
:
GetClassCount
(
Card
.
GetCode
)
>=
3
...
...
expansions/script/c7439105.lua
View file @
03268b89
...
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
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
)
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
...
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
...
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
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
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoHand
(
tg
,
tp
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
...
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
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
sg
:
Merge
(
ag
)
end
...
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
end
return
ce
...
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
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
cg2
:
Merge
(
ag
)
end
...
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
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
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
eg
=
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
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
...
@@ -368,6 +380,33 @@ function cm.initial_effect(c)
end
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
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
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
if
Duel
.
GetCurrentChain
()
~=
0
then
...
...
@@ -387,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
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
g
:
Merge
(
ag
)
end
...
...
@@ -400,16 +439,6 @@ function cm.initial_effect(c)
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
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
+
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
...
...
expansions/script/c7439107.lua
View file @
03268b89
...
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
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
)
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
...
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
...
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
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
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoHand
(
tg
,
tp
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
...
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
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
sg
:
Merge
(
ag
)
end
...
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
end
return
ce
...
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
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
cg2
:
Merge
(
ag
)
end
...
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
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
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
eg
=
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
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
...
@@ -368,6 +380,33 @@ function cm.initial_effect(c)
end
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
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
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
if
Duel
.
GetCurrentChain
()
~=
0
then
...
...
@@ -387,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
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
g
:
Merge
(
ag
)
end
...
...
@@ -400,16 +439,6 @@ function cm.initial_effect(c)
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
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
+
LOCATION_REMOVED
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
...
...
expansions/script/c7439109.lua
View file @
03268b89
...
...
@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if
not
Party_time_globle_check
then
Party_time_globle_check
=
true
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
)
if
#
g
<=
0
then
return
end
if
count
>#
g
then
count
=#
g
end
...
...
@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
if
not
tp
and
aux
.
GetValueType
(
tg
)
==
"Group"
then
local
sg
=
tg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sg
and
sg
:
GetCount
()
>
0
then
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoDeck
(
tg
,
tp
,
seq
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoDeck
(
tgc
,
tp
,
seq
,
reason
)
end
return
_SendtoDeck
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
seq
,
reason
)
end
...
...
@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if
Duel
.
GetCurrentChain
()
~=
0
then
local
id
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
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
)
end
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
tg
:
Sub
(
sg
)
if
tg
and
tg
:
GetCount
()
>
0
then
_SendtoHand
(
tg
,
tp
,
reason
)
local
tgc
=
tg
:
Clone
()
tgc
:
Sub
(
sg
)
if
tgc
and
tgc
:
GetCount
()
>
0
then
_SendtoHand
(
tgc
,
tp
,
reason
)
end
return
_SendtoHand
(
sg
,
1
-
sg
:
GetFirst
():
GetControler
(),
reason
)
end
...
...
@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
sg
=
g
:
Clone
()
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
sg
:
Merge
(
ag
)
end
...
...
@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
then
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
s
,
o
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetReleaseGroup
(
sp
)
local
g
=
g
:
Filter
(
f
,
cg
,
...
)
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
g
:
Merge
(
ag
)
end
...
...
@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce
:
SetType
(
EFFECT_TYPE_FIELD
)
ce
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
ce
:
SetTargetRange
(
1
,
0
)
ce
:
SetTarget
(
cm
.
chain_target
)
ce
:
SetOperation
(
cm
.
chain_operation
)
ce
:
SetTarget
(
Party_time_
chain_target
)
ce
:
SetOperation
(
Party_time_
chain_operation
)
ce
:
SetValue
(
aux
.
TRUE
)
end
return
ce
...
...
@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if
not
cg
or
cg
:
GetCount
()
<=
0
then
return
end
local
cg2
=
cg
:
Clone
()
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
cg2
:
Merge
(
ag
)
end
...
...
@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local
ag
=
Party_time_table
[
7439100
+
id
]
if
id
~=
0
and
Duel
.
GetFlagEffect
(
0
,
7439100
+
id
)
~=
0
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
--
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
...
...
@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local
cg
=
Group
.
CreateGroup
()
local
eg
=
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
sg2
=
sg
:
Filter
(
cm
.
rfilter
,
nil
,
7439100
+
id
)
local
sg2
=
sg
:
Filter
(
Party_time_
rfilter
,
nil
,
7439100
+
id
)
if
not
aux
.
GCheckAdditional
then
eg
:
Sub
(
eg2
)
eg1
:
Sub
(
eg2
)
...
...
@@ -368,6 +380,33 @@ function cm.initial_effect(c)
end
return
_SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
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
function
Card
.
IsCanBeRitualMaterial
(
c
,
sc
)
if
Duel
.
GetCurrentChain
()
~=
0
then
...
...
@@ -387,7 +426,7 @@ function cm.initial_effect(c)
local
g
=
Duel
.
GetMatchingGroup
(
f
,
tp
,
LOCATION_HAND
,
0
,
cg
,
...
)
if
not
g
or
g
:
GetCount
()
<=
0
then
return
false
end
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
g
:
Merge
(
ag
)
end
...
...
@@ -400,16 +439,6 @@ function cm.initial_effect(c)
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
)
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
e
:
GetHandlerPlayer
(),
LOCATION_HAND
,
0
,
1
,
nil
)
end
...
...
expansions/script/c79083105.lua
View file @
03268b89
...
...
@@ -96,9 +96,7 @@ function c79083105.zntg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79083810
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79083910
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79083010
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79084010
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79084110
)
and
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79084210
)
Duel
.
IsPlayerAffectedByEffect
(
tp
,
79084010
)
if
chk
==
0
then
return
not
b1
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
79083104
,
0
))
local
zone
=
Duel
.
SelectField
(
tp
,
1
,
LOCATION_ONFIELD
,
0
,
flag
)
...
...
@@ -273,12 +271,12 @@ function c79083105.srfilter(c,e,tp,check)
end
function
c79083105
.
srtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
function
c79083105
.
srop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
check
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
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
()
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
...
...
expansions/script/c87490445.lua
View file @
03268b89
...
...
@@ -33,8 +33,8 @@ function c87490445.initial_effect(c)
end
function
c87490445
.
sxxcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
GetFlagEffect
(
8749
0
445
)
==
0
end
c
:
RegisterFlagEffect
(
8749
0
445
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
,
0
,
1
)
if
chk
==
0
then
return
c
:
GetFlagEffect
(
8749
1
445
)
==
0
end
c
:
RegisterFlagEffect
(
8749
1
445
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_DAMAGE_CAL
,
0
,
1
)
end
function
c87490445
.
sxxtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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