Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nemo Ma
no81cards
Commits
e802c6ad
Commit
e802c6ad
authored
Mar 07, 2023
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9a402826
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
356 additions
and
202 deletions
+356
-202
expansions/script/c114722253.lua
expansions/script/c114722253.lua
+113
-38
expansions/script/c116968003.lua
expansions/script/c116968003.lua
+2
-1
expansions/script/c117179181.lua
expansions/script/c117179181.lua
+3
-30
expansions/script/c14001216.lua
expansions/script/c14001216.lua
+2
-2
expansions/script/c14001217.lua
expansions/script/c14001217.lua
+2
-2
expansions/script/c14001218.lua
expansions/script/c14001218.lua
+2
-2
expansions/script/c14001219.lua
expansions/script/c14001219.lua
+2
-2
expansions/script/c14001220.lua
expansions/script/c14001220.lua
+2
-2
expansions/script/c14010049.lua
expansions/script/c14010049.lua
+2
-2
expansions/script/c14090016.lua
expansions/script/c14090016.lua
+19
-20
expansions/script/c14090017.lua
expansions/script/c14090017.lua
+17
-16
expansions/script/c14090018.lua
expansions/script/c14090018.lua
+26
-8
expansions/script/c14090019.lua
expansions/script/c14090019.lua
+18
-18
expansions/script/c14090020.lua
expansions/script/c14090020.lua
+1
-1
expansions/script/c14090023.lua
expansions/script/c14090023.lua
+1
-1
expansions/script/c14090025.lua
expansions/script/c14090025.lua
+18
-18
expansions/script/c14090026.lua
expansions/script/c14090026.lua
+2
-1
expansions/script/c14090027.lua
expansions/script/c14090027.lua
+1
-1
expansions/script/c14090029.lua
expansions/script/c14090029.lua
+0
-1
expansions/script/c14090030.lua
expansions/script/c14090030.lua
+22
-19
expansions/script/c22348194.lua
expansions/script/c22348194.lua
+1
-1
expansions/script/c33700761.lua
expansions/script/c33700761.lua
+4
-1
expansions/script/c40010934.lua
expansions/script/c40010934.lua
+2
-3
expansions/script/c98920082.lua
expansions/script/c98920082.lua
+77
-0
expansions/script/c98940000.lua
expansions/script/c98940000.lua
+17
-12
No files found.
expansions/script/c114722253.lua
View file @
e802c6ad
--混沌の禁断魔導陣
function
c114722253
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
46986414
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
aux
.
TRUE
))
e1
:
SetOperation
(
c114722253
.
activate
)
c
:
RegisterEffect
(
e1
)
--indestructable
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e2
:
SetProperty
(
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e2
:
SetTarget
(
c114722253
.
i
mtarget
)
e2
:
SetValue
(
aux
.
indoval
)
e2
:
SetTarget
(
c114722253
.
i
ndtg
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
--copy spell/trap
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_FZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCountLimit
(
1
,
114722253
)
e3
:
Set
Condition
(
c114722253
.
cpcondition
)
e3
:
SetCo
st
(
c114722253
.
cpcost
)
e3
:
SetTarget
(
c114722253
.
cptarget
)
e3
:
SetOperation
(
c114722253
.
cpoperation
)
e3
:
Set
Range
(
LOCATION_FZONE
)
e3
:
SetCo
ndition
(
c114722253
.
stcon
)
e3
:
SetTarget
(
c114722253
.
sttg
)
e3
:
SetOperation
(
c114722253
.
stop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetRange
(
LOCATION_FZONE
)
e4
:
SetCode
(
EVENT_CHAINING
)
e4
:
SetCountLimit
(
1
,
114722253
)
e4
:
SetCondition
(
c114722253
.
stcon
)
e4
:
SetTarget
(
c114722253
.
sttg2
)
e4
:
SetOperation
(
c114722253
.
stop
)
c
:
RegisterEffect
(
e4
)
end
c114722253
.
card_code_list
=
{
46986414
}
function
c114722253
.
filter
(
c
)
return
aux
.
IsCodeListed
(
c
,
46986414
)
and
c
:
Is
Type
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
Is
SSetable
()
and
not
c
:
IsCode
(
114722253
)
return
aux
.
IsCodeListed
(
c
,
46986414
)
and
c
:
IsSSetable
()
and
not
c
:
IsCode
(
114722253
)
end
function
c114722253
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
dg
=
Duel
.
GetMatchingGroup
(
c114722253
.
filter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
n
=
dg
:
GetClassCount
(
Card
.
GetCode
)
if
n
>
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
then
n
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
end
if
n
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
114722253
,
0
))
then
if
n
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
114722253
,
2
))
then
local
m
=
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
1
,
n
,
REASON_EFFECT
+
REASON_DISCARD
)
local
hg
=
Group
.
CreateGroup
()
for
i
=
1
,
m
do
...
...
@@ -55,45 +67,108 @@ function c114722253.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function
c114722253
.
imtarget
(
e
,
tg
)
return
tg
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
e
:
GetHandler
()
~=
tg
function
c114722253
.
indtg
(
e
,
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
e
:
GetHandler
()
~=
c
end
function
c114722253
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
46986414
)
end
function
c114722253
.
cpconditi
on
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c114722253
.
cfilter
,
tp
,
LOCATION_
ONFIELD
,
0
,
1
,
nil
)
function
c114722253
.
stc
on
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c114722253
.
cfilter
,
tp
,
LOCATION_
MZONE
,
0
,
1
,
nil
)
end
function
c114722253
.
cpfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToGraveAsCost
()
and
c
:
CheckActivateEffect
(
false
,
false
,
false
)
~=
nil
end
function
c114722253
.
cpcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c114722253
.
cpfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c114722253
.
cpfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
te
=
g
:
GetFirst
():
CheckActivateEffect
(
false
,
false
,
true
)
c114722253
[
Duel
.
GetCurrentChain
()]
=
te
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
--[[
function c114722253.stfilter(c,tp,eg,ep,ev,re,r,rp)
local te=c:GetActivateEffect()
if not te then return false end
local condition=te:GetCondition()
local cost=te:GetCost()
if
cost
then
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
local target=te:GetTarget()
local op=te:GetOperation()
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsCode(114722253)
and (not condition or condition(te,tp,eg,ep,ev,re,r,rp)) and (not cost or cost(te,tp,eg,ep,ev,re,r,rp,0))
and (not target or target(te,tp,eg,ep,ev,re,r,rp,0)) and op and c:IsAbleToGraveAsCost()
end
function
c114722253
.
cptarget
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
te
=
c114722253
[
Duel
.
GetCurrentChain
()]
if
chkc
then
local
tg
=
te
:
GetTarget
()
return
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
,
true
)
end
if
chk
==
0
then
return
true
end
if
not
te
then
return
end
]]
function
c114722253
.
sefilter
(
c
)
local
te
=
c
:
GetActivateEffect
()
if
not
te
then
return
false
end
local
op
=
te
:
GetOperation
()
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
not
c
:
IsType
(
TYPE_EQUIP
)
and
not
c
:
IsCode
(
114722253
)
and
c
:
IsAbleToGraveAsCost
()
and
c
:
CheckActivateEffect
(
false
,
false
,
false
)
~=
nil
and
op
end
function
c114722253
.
sttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c114722253
.
sefilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
not
Duel
.
CheckEvent
(
EVENT_CHAINING
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c114722253
.
sefilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
BreakEffect
()
local
te
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
=
g
:
GetFirst
():
CheckActivateEffect
(
false
,
false
,
false
)
e
:
SetCategory
(
te
:
GetCategory
())
e
:
SetProperty
(
te
:
GetProperty
())
local
fcos
=
te
:
GetCost
()
local
tg
=
te
:
GetTarget
()
if
tg
then
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
if
fcos
then
fcos
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
tg
then
tg
(
e
,
tp
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
,
1
)
end
te
:
SetLabelObject
(
e
:
GetLabelObject
())
e
:
SetLabelObject
(
te
)
end
function
c114722253
.
cpoperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
c114722253
[
Duel
.
GetCurrentChain
()]
function
c114722253
.
stop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
te
=
e
:
GetLabelObject
()
if
not
te
then
return
end
e
:
SetLabelObject
(
te
:
GetLabelObject
())
local
op
=
te
:
GetOperation
()
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
\ No newline at end of file
end
function
c114722253
.
sefilter2
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
not
c
:
IsType
(
TYPE_EQUIP
)
and
not
c
:
IsCode
(
114722253
)
and
c
:
IsAbleToGraveAsCost
()
then
if
c
:
CheckActivateEffect
(
false
,
false
,
false
)
~=
nil
then
return
true
end
local
te
=
c
:
GetActivateEffect
()
local
op
=
te
:
GetOperation
()
if
not
op
then
return
false
end
if
te
:
GetCode
()
~=
EVENT_CHAINING
then
return
false
end
local
con
=
te
:
GetCondition
()
if
con
and
not
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
then
return
false
end
local
cost
=
te
:
GetCost
()
if
cost
and
not
cost
(
te
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
return
false
end
local
tg
=
te
:
GetTarget
()
if
tg
and
not
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
then
return
false
end
return
true
else
return
false
end
end
function
c114722253
.
sttg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c114722253
.
sefilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c114722253
.
sefilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
ShuffleDeck
(
tp
)
Duel
.
BreakEffect
()
local
tc
=
g
:
GetFirst
()
local
te
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
local
fchain
=
c114722253
.
sefilter
(
tc
)
if
fchain
then
te
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
=
tc
:
CheckActivateEffect
(
false
,
false
,
false
)
else
te
=
tc
:
GetActivateEffect
()
end
e
:
SetCategory
(
te
:
GetCategory
())
e
:
SetProperty
(
te
:
GetProperty
())
local
tg
=
te
:
GetTarget
()
local
fcos
=
te
:
GetCost
()
if
fcos
then
fcos
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
if
tg
then
if
fchain
then
tg
(
e
,
tp
,
ceg
,
cep
,
cev
,
cre
,
cr
,
crp
,
1
)
else
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
end
te
:
SetLabelObject
(
e
:
GetLabelObject
())
e
:
SetLabelObject
(
te
)
end
expansions/script/c116968003.lua
View file @
e802c6ad
--教导的始祖 艾莉西
亚
--教导的始祖 艾莉西
娅
local
m
=
116968003
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFun2
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x145
),
aux
.
FilterBoolFunction
(
Card
.
IsSummonLocation
,
LOCATION_EXTRA
),
true
)
aux
.
AddContactFusionProcedure
(
c
,
cm
.
cfilter
,
LOCATION_MZONE
,
LOCATION_MZONE
,
Duel
.
SendtoGrave
,
REASON_COST
+
REASON_MATERIAL
)
aux
.
EnablePendulumAttribute
(
c
,
false
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
...
...
expansions/script/c117179181.lua
View file @
e802c6ad
...
...
@@ -76,34 +76,7 @@ function c117179181.initial_effect(c)
e7
:
SetTarget
(
c117179181
.
atktg
)
e7
:
SetOperation
(
c117179181
.
atkop
)
c
:
RegisterEffect
(
e7
)
if
not
c117179181
.
global_check
then
c117179181
.
global_check
=
true
c117179181
[
0
]
=
false
c117179181
[
1
]
=
false
local
ge0
=
Effect
.
CreateEffect
(
c
)
ge0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge0
:
SetCode
(
EVENT_CHAINING
)
ge0
:
SetOperation
(
aux
.
chainreg
)
c
:
RegisterEffect
(
ge0
,
0
)
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAIN_SOLVING
)
ge1
:
SetOperation
(
c117179181
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
Effect
.
CreateEffect
(
c
)
ge2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge2
:
SetCode
(
EVENT_PHASE_START
+
PHASE_DRAW
)
ge2
:
SetOperation
(
c117179181
.
clear
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c117179181
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c117179181
[
1
-
ep
]
=
true
end
function
c117179181
.
clear
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c117179181
[
0
]
=
false
c117179181
[
1
]
=
false
Duel
.
AddCustomActivityCounter
(
117179181
,
ACTIVITY_CHAIN
,
aux
.
FALSE
)
end
--description
...
...
@@ -140,7 +113,7 @@ end
--spsummon
function
c117179181
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
re
:
IsActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
function
c117179181
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
...
...
@@ -156,7 +129,7 @@ end
--spsummon & pset
function
c117179181
.
sscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
==
0
or
c117179181
[
e
:
GetHandler
():
GetControler
()]
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
==
0
or
Duel
.
GetCustomActivityCount
(
117179181
,
1
-
tp
,
ACTIVITY_CHAIN
)
>
0
end
function
c117179181
.
ssfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x108
)
and
not
c
:
IsCode
(
117179181
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
...
...
expansions/script/c14001216.lua
View file @
e802c6ad
...
...
@@ -79,7 +79,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
aux
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
sg
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
@@ -105,7 +105,7 @@ function cm.XyzLevelFreeTarget(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
expansions/script/c14001217.lua
View file @
e802c6ad
...
...
@@ -79,7 +79,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
aux
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
sg
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
@@ -105,7 +105,7 @@ function cm.XyzLevelFreeTarget(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
expansions/script/c14001218.lua
View file @
e802c6ad
...
...
@@ -80,7 +80,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
aux
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
sg
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
@@ -106,7 +106,7 @@ function cm.XyzLevelFreeTarget(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
expansions/script/c14001219.lua
View file @
e802c6ad
...
...
@@ -82,7 +82,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
aux
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
sg
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
@@ -108,7 +108,7 @@ function cm.XyzLevelFreeTarget(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
expansions/script/c14001220.lua
View file @
e802c6ad
...
...
@@ -80,7 +80,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
aux
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
sg
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
@@ -106,7 +106,7 @@ function cm.XyzLevelFreeTarget(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
expansions/script/c14010049.lua
View file @
e802c6ad
...
...
@@ -63,7 +63,7 @@ function cm.XyzLevelFreeCondition(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
if
sg
:
IsExists
(
aux
.
MustMaterialCounterFilter
,
1
,
nil
,
mg
)
then
return
false
end
Duel
.
SetSelectedCard
(
sg
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
@@ -89,7 +89,7 @@ function cm.XyzLevelFreeTarget(f,gf,minct,maxct)
else
mg
=
Duel
.
GetMatchingGroup
(
cm
.
XyzLevelFreeFilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
c
,
f
)
end
local
sg
=
aux
.
GetMustMaterialGroup
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
local
sg
=
Duel
.
GetMustMaterial
(
tp
,
EFFECT_MUST_BE_XMATERIAL
)
Duel
.
SetSelectedCard
(
sg
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
cm
.
GCheckAdditional
=
aux
.
TuneMagicianCheckAdditionalX
(
EFFECT_TUNE_MAGICIAN_X
)
...
...
expansions/script/c14090016.lua
View file @
e802c6ad
...
...
@@ -7,7 +7,6 @@ function cm.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCategory
(
CATEGORY_LVCHANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
aux
.
IsDualState
)
...
...
@@ -33,16 +32,16 @@ function cm.initial_effect(c)
e3
:
SetCode
(
EFFECT_DUAL_STATUS
)
e3
:
SetCondition
(
cm
.
dscon
)
c
:
RegisterEffect
(
e3
)
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_BE_MATERIAL
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCondition
(
cm
.
bmcon
)
e4
:
SetTarget
(
cm
.
bmtg
)
e4
:
SetOperation
(
cm
.
bmop
)
c
:
RegisterEffect
(
e4
)
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCost
(
cm
.
thcost
)
e4
:
SetTarget
(
cm
.
thtg
)
e4
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
cm
.
lvfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_PLANT
)
and
c
:
GetLevel
()
>
0
...
...
@@ -88,22 +87,22 @@ end
function
cm
.
dscon
(
e
)
return
e
:
GetHandler
():
IsLevelAbove
(
2
)
end
function
cm
.
bmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
return
c
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsLocation
(
LOCATION_REMOVED
))
and
(
r
==
REASON_FUSION
or
c
:
IsReason
(
REASON_FUSION
))
and
c
:
GetPreviousLevelOnField
()
>=
2
and
bit
.
band
(
TYPE_EFFECT
,
c
:
GetPreviousTypeOnField
())
~=
0
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
f
filter
(
c
)
function
cm
.
th
filter
(
c
)
return
c
:
IsCode
(
24094653
)
and
c
:
IsAbleToHand
()
end
function
cm
.
bmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
f
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
th
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
)
end
function
cm
.
bmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
ffilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetFirstMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
nil
)
if
tg
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
\ No newline at end of file
expansions/script/c14090017.lua
View file @
e802c6ad
...
...
@@ -7,7 +7,6 @@ function cm.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetCategory
(
CATEGORY_LVCHANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
aux
.
IsDualState
)
...
...
@@ -35,15 +34,15 @@ function cm.initial_effect(c)
e3
:
SetCode
(
EFFECT_DUAL_STATUS
)
e3
:
SetCondition
(
cm
.
dscon
)
c
:
RegisterEffect
(
e3
)
--special summon
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_BE_MATERIAL
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCondition
(
cm
.
bmcon
)
e4
:
SetTarget
(
cm
.
bmtg
)
e4
:
SetOperation
(
cm
.
bmop
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCondition
(
cm
.
spcon
)
e4
:
SetTarget
(
cm
.
sptg
)
e4
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e4
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
...
...
@@ -112,18 +111,20 @@ end
function
cm
.
dscon
(
e
)
return
e
:
GetHandler
():
IsLevelAbove
(
3
)
end
function
cm
.
bmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsLocation
(
LOCATION_REMOVED
))
and
(
r
==
REASON_FUSION
or
c
:
IsReason
(
REASON_FUSION
))
and
c
:
GetPreviousLevelOnField
()
>=
3
and
bit
.
band
(
TYPE_EFFECT
,
c
:
GetPreviousTypeOnField
())
~=
0
function
cm
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_PLANT
)
end
function
cm
.
bmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_MZONE
,
0
)
return
#
g
>
0
and
#
g
==
Duel
.
GetMatchingGroupCount
(
cm
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
and
e
:
GetHandler
()
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
()
,
1
,
0
,
0
)
end
function
cm
.
bm
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
function
cm
.
sp
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
...
...
expansions/script/c14090018.lua
View file @
e802c6ad
...
...
@@ -7,7 +7,6 @@ function cm.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_LVCHANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
aux
.
IsDualState
)
...
...
@@ -35,15 +34,15 @@ function cm.initial_effect(c)
e3
:
SetCode
(
EFFECT_DUAL_STATUS
)
e3
:
SetCondition
(
cm
.
dscon
)
c
:
RegisterEffect
(
e3
)
--search
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetCategory
(
CATEGORY_DRAW
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_BE_MATERIAL
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCondition
(
cm
.
bmcon
)
e4
:
SetTarget
(
cm
.
bmtg
)
e4
:
SetOperation
(
cm
.
bmop
)
e4
:
SetCategory
(
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_IGNITION
)
e4
:
SetRange
(
LOCATION_HAND
)
e4
:
SetCost
(
cm
.
thcost1
)
e4
:
SetTarget
(
cm
.
thtg1
)
e4
:
SetOperation
(
cm
.
thop1
)
c
:
RegisterEffect
(
e4
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
...
...
@@ -127,3 +126,22 @@ function cm.bmop(e,tp,eg,ep,ev,re,r,rp)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
function
cm
.
thcost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
thfilter1
(
c
)
return
c
:
IsCode
(
14090020
)
and
c
:
IsAbleToHand
()
and
c
:
IsFaceup
()
end
function
cm
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
function
cm
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetFirstMatchingCard
(
cm
.
thfilter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
)
if
tg
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
\ No newline at end of file
expansions/script/c14090019.lua
View file @
e802c6ad
...
...
@@ -24,15 +24,15 @@ function cm.initial_effect(c)
e2
:
SetCode
(
EFFECT_DUAL_STATUS
)
e2
:
SetCondition
(
cm
.
dscon
)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
cm
.
bmcon
)
e3
:
SetTarget
(
cm
.
bmtg
)
e3
:
SetOperation
(
cm
.
bmop
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCost
(
cm
.
thcost
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e3
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
...
...
@@ -82,22 +82,22 @@ end
function
cm
.
dscon
(
e
)
return
e
:
GetHandler
():
IsLevelAbove
(
5
)
end
function
cm
.
bmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
return
c
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsLocation
(
LOCATION_REMOVED
))
and
(
r
==
REASON_FUSION
or
c
:
IsReason
(
REASON_FUSION
))
and
c
:
GetPreviousLevelOnField
()
>=
5
and
bit
.
band
(
TYPE_EFFECT
,
c
:
GetPreviousTypeOnField
())
~=
0
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
f
filter
(
c
)
function
cm
.
th
filter
(
c
)
return
c
:
IsCode
(
14090027
)
and
c
:
IsAbleToHand
()
end
function
cm
.
bmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
f
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
th
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
bmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
ffilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetFirstMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
tg
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
\ No newline at end of file
expansions/script/c14090020.lua
View file @
e802c6ad
...
...
@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--lvchange
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_LVCHANGE
)
e1
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
cm
.
con
)
...
...
expansions/script/c14090023.lua
View file @
e802c6ad
...
...
@@ -6,7 +6,7 @@ function cm.initial_effect(c)
aux
.
AddFusionProcFunRep
(
c
,
cm
.
ffilter
,
2
,
true
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_
LVCHANGE
+
CATEGORY_
TOGRAVE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
...
...
expansions/script/c14090025.lua
View file @
e802c6ad
...
...
@@ -23,15 +23,15 @@ function cm.initial_effect(c)
e2
:
SetCode
(
EFFECT_DUAL_STATUS
)
e2
:
SetCondition
(
cm
.
dscon
)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
cm
.
bmcon
)
e3
:
SetTarget
(
cm
.
bmtg
)
e3
:
SetOperation
(
cm
.
bmop
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCost
(
cm
.
thcost
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
costfilter
(
c
,
tp
)
...
...
@@ -64,22 +64,22 @@ end
function
cm
.
dscon
(
e
)
return
e
:
GetHandler
():
IsLevelAbove
(
6
)
end
function
cm
.
bmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
return
c
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsLocation
(
LOCATION_REMOVED
))
and
(
r
==
REASON_FUSION
or
c
:
IsReason
(
REASON_FUSION
))
and
c
:
GetPreviousLevelOnField
()
>=
6
and
bit
.
band
(
TYPE_EFFECT
,
c
:
GetPreviousTypeOnField
())
~=
0
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
f
filter
(
c
)
function
cm
.
th
filter
(
c
)
return
c
:
IsCode
(
14090026
)
and
c
:
IsAbleToHand
()
end
function
cm
.
bmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
f
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
th
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
bmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
ffilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
tg
=
Duel
.
GetFirstMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
tg
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
\ No newline at end of file
expansions/script/c14090026.lua
View file @
e802c6ad
...
...
@@ -14,7 +14,7 @@ function cm.initial_effect(c)
--level
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_
LVCHANGE
+
CATEGORY_
REMOVE
)
e2
:
SetCategory
(
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
aux
.
bfgcost
)
...
...
@@ -22,6 +22,7 @@ function cm.initial_effect(c)
e2
:
SetOperation
(
cm
.
lvop
)
c
:
RegisterEffect
(
e2
)
end
cm
.
has_text_type
=
TYPE_DUAL
function
cm
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsRace
(
RACE_PLANT
)
and
c
:
IsType
(
TYPE_DUAL
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
end
...
...
expansions/script/c14090027.lua
View file @
e802c6ad
...
...
@@ -5,7 +5,7 @@ function cm.initial_effect(c)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_LVCHANGE
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
...
...
expansions/script/c14090029.lua
View file @
e802c6ad
...
...
@@ -8,7 +8,6 @@ function cm.initial_effect(c)
--level up
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_LVCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
...
...
expansions/script/c14090030.lua
View file @
e802c6ad
...
...
@@ -22,15 +22,15 @@ function cm.initial_effect(c)
e2
:
SetCode
(
EFFECT_DUAL_STATUS
)
e2
:
SetCondition
(
cm
.
dscon
)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e3
:
SetCategory
(
CATEGORY_DAMAGE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_BE_MATERIAL
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCondition
(
cm
.
bmcon
)
e3
:
SetTarget
(
cm
.
bmtg
)
e3
:
SetOperation
(
cm
.
bmop
)
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetCost
(
cm
.
thcost
)
e3
:
SetTarget
(
cm
.
thtg
)
e3
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e3
)
end
function
cm
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
@@ -63,20 +63,23 @@ end
function
cm
.
dscon
(
e
)
return
e
:
GetHandler
():
IsLevelAbove
(
7
)
end
function
cm
.
bmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
return
c
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsLocation
(
LOCATION_REMOVED
))
and
(
r
==
REASON_FUSION
or
c
:
IsReason
(
REASON_FUSION
))
and
c
:
GetPreviousLevelOnField
()
>=
7
and
bit
.
band
(
TYPE_EFFECT
,
c
:
GetPreviousTypeOnField
())
~=
0
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
f
filter
(
c
)
return
c
:
Is
Code
(
14090026
)
and
c
:
IsAbleToHand
()
function
cm
.
th
filter
(
c
)
return
c
:
Is
Race
(
RACE_PLANT
)
and
c
:
IsType
(
TYPE_DUAL
)
and
not
c
:
IsCode
(
m
)
and
c
:
IsAbleToHand
()
end
function
cm
.
bmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
800
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
1
-
tp
,
800
)
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
bmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
#
tg
>
0
then
Duel
.
SendtoHand
(
tg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tg
)
end
end
\ No newline at end of file
expansions/script/c22348194.lua
View file @
e802c6ad
...
...
@@ -44,7 +44,7 @@ function c22348194.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22348194
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
e
:
GetDescription
())
Duel
.
SelectTarget
(
tp
,
c22348194
.
filter
,
tp
,
0
,
LOCATION_
MZONE
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c22348194
.
filter
,
tp
,
0
,
LOCATION_
ONFIELD
,
1
,
1
,
nil
)
end
function
c22348194
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
expansions/script/c33700761.lua
View file @
e802c6ad
...
...
@@ -25,11 +25,14 @@ function cm.operation(c)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
tfrsv
.
ccon
)
e1
:
SetCondition
(
cm
.
ccon
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
ccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
tfrsv
.
ccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
function
cm
.
filter
(
c
)
return
c
:
IsSetCard
(
0x344a
)
and
c
:
IsAbleToHand
()
end
...
...
expansions/script/c40010934.lua
View file @
e802c6ad
...
...
@@ -29,7 +29,7 @@ end
function
cm
.
tkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
cf
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
,
tp
)
if
chk
==
0
then
return
c
:
IsAbleToRemoveAsCost
()
and
g
:
GetClassCount
(
Card
.
GetCode
)
>
2
end
if
chk
==
0
then
return
c
:
IsAbleToRemoveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
g
:
GetClassCount
(
Card
.
GetCode
)
>
2
end
if
#
g
==
3
and
g
:
GetClassCount
(
Card
.
GetCode
)
==
3
then
g
:
AddCard
(
c
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
...
...
@@ -41,8 +41,7 @@ function cm.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function
cm
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
40010936
,
0
,
TYPES_TOKEN_MONSTER
,
3000
,
3000
,
100
,
RACE_PLANT
,
ATTRIBUTE_DARK
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
40010936
,
0
,
TYPES_TOKEN_MONSTER
,
3000
,
3000
,
100
,
RACE_PLANT
,
ATTRIBUTE_DARK
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
Duel
.
SetChainLimit
(
aux
.
FALSE
)
...
...
expansions/script/c98920082.lua
0 → 100644
View file @
e802c6ad
--恐吓爪牙兽·玛伍德
function
c98920082
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
98920082
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c98920082
.
hspcon
)
e1
:
SetValue
(
c98920082
.
hspval
)
c
:
RegisterEffect
(
e1
)
--tohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
98920082
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
98930082
)
e2
:
SetTarget
(
c98920082
.
thtg
)
e2
:
SetOperation
(
c98920082
.
thop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
end
function
c98920082
.
cfilter
(
c
)
return
c
:
IsSetCard
(
0x17a
)
and
c
:
IsFaceup
()
end
function
c98920082
.
getzone
(
tp
)
local
zone
=
0
local
g
=
Duel
.
GetMatchingGroup
(
c98920082
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
for
tc
in
aux
.
Next
(
g
)
do
local
seq
=
tc
:
GetSequence
()
if
seq
==
5
or
seq
==
6
then
zone
=
zone
|
(
1
<<
aux
.
MZoneSequence
(
seq
))
else
if
seq
>
0
then
zone
=
zone
|
(
1
<<
(
seq
-
1
))
end
if
seq
<
4
then
zone
=
zone
|
(
1
<<
(
seq
+
1
))
end
end
end
return
zone
end
function
c98920082
.
hspcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
zone
=
c98920082
.
getzone
(
tp
)
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
end
function
c98920082
.
hspval
(
e
,
c
)
local
tp
=
c
:
GetControler
()
return
0
,
c98920082
.
getzone
(
tp
)
end
function
c98920082
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x17a
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
function
c98920082
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c98920082
.
thfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
function
c98920082
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c98920082
.
thfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
GetMatchingGroupCount
(
Card
.
IsDefensePos
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
>=
3
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
98920082
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
ShuffleDeck
(
tp
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
expansions/script/c98940000.lua
View file @
e802c6ad
...
...
@@ -58,7 +58,6 @@ function c98940000.initial_effect(c)
e3
:
SetCountLimit
(
1
,
98950000
)
e3
:
SetCondition
(
c98940000
.
atkcon1
)
e3
:
SetCost
(
c98940000
.
thcost
)
--e3:SetTarget(c98940000.thtg)
e3
:
SetOperation
(
c98940000
.
thop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
...
...
@@ -90,15 +89,21 @@ end
function
c98940000
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_FIELD
)
c
:
RegisterEffect
(
e1
)
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
Duel
.
MoveSequence
(
c
,
5
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
if
fc
then
Duel
.
SendtoGrave
(
fc
,
REASON_RULE
)
Duel
.
BreakEffect
()
end
if
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_CHANGE_TYPE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
)
e1
:
SetValue
(
TYPE_SPELL
+
TYPE_FIELD
)
c
:
RegisterEffect
(
e1
)
Duel
.
MoveSequence
(
c
,
5
)
end
end
end
function
c98940000
.
effectfilter
(
e
,
ct
)
...
...
@@ -117,7 +122,7 @@ function c98940000.op(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
aux
.
Stringid
(
98940000
,
2
))
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c98940000
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c98940000
.
spfilter
2
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
~=
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
...
...
@@ -130,7 +135,7 @@ function c98940000.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c98940000
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
if
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
and
Duel
.
IsExistingMatchingCard
(
c98940000
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
c98940000
.
dfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
...
...
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