Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
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
xiaoye
ygopro-222DIY-cards
Commits
d6bfea04
Commit
d6bfea04
authored
Mar 25, 2025
by
Huangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
07ad0f29
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
281 additions
and
171 deletions
+281
-171
expansions/FiNALE.cdb
expansions/FiNALE.cdb
+0
-0
expansions/script/c11451711.lua
expansions/script/c11451711.lua
+57
-61
expansions/script/c11451713.lua
expansions/script/c11451713.lua
+43
-31
expansions/script/c15200007.lua
expansions/script/c15200007.lua
+1
-1
expansions/script/c15200010.lua
expansions/script/c15200010.lua
+36
-15
expansions/script/c15200035.lua
expansions/script/c15200035.lua
+26
-26
expansions/script/c18700788.lua
expansions/script/c18700788.lua
+2
-2
expansions/script/c18700790.lua
expansions/script/c18700790.lua
+7
-0
expansions/script/c18700792.lua
expansions/script/c18700792.lua
+2
-2
expansions/script/c18700794.lua
expansions/script/c18700794.lua
+7
-0
expansions/script/c18700796.lua
expansions/script/c18700796.lua
+2
-2
expansions/script/c18700798.lua
expansions/script/c18700798.lua
+8
-0
expansions/script/c18700804.lua
expansions/script/c18700804.lua
+5
-10
expansions/script/c18700806.lua
expansions/script/c18700806.lua
+28
-2
expansions/script/c47390030.lua
expansions/script/c47390030.lua
+1
-1
expansions/script/c47390047.lua
expansions/script/c47390047.lua
+2
-2
expansions/script/c81903001.lua
expansions/script/c81903001.lua
+1
-1
expansions/script/c81903002.lua
expansions/script/c81903002.lua
+1
-1
expansions/script/c81903003.lua
expansions/script/c81903003.lua
+1
-1
expansions/script/c96071081.lua
expansions/script/c96071081.lua
+51
-13
No files found.
expansions/FiNALE.cdb
View file @
d6bfea04
No preview for this file type
expansions/script/c11451711.lua
View file @
d6bfea04
...
...
@@ -3,30 +3,25 @@ local cm,m=GetID()
function
cm
.
initial_effect
(
c
)
--effect1
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
11451711
,
4
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
--
e1:SetCountLimit(1)
e1
:
SetCondition
(
cm
.
recon
)
e1
:
SetCountLimit
(
1
)
--
e1:SetCondition(cm.recon)
e1
:
SetTarget
(
cm
.
retg
)
e1
:
SetOperation
(
cm
.
reop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_MOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
cm
.
mvcon
)
e2
:
SetOperation
(
cm
.
mvop1
)
c
:
RegisterEffect
(
e2
)
--effect2
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_
REMOVE
)
e3
:
SetCode
(
EVENT_
TO_HAND
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e3
:
SetCondition
(
cm
.
mrcon
)
e3
:
SetTarget
(
cm
.
mrtg
)
e3
:
SetOperation
(
cm
.
mrop
)
c
:
RegisterEffect
(
e3
)
...
...
@@ -44,13 +39,23 @@ function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
for
i
=
1
,
7
do
t
[
i
]
=
i
+
2
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_NUMBER
)
e
:
SetLabel
(
Duel
.
AnnounceNumber
(
tp
,
table.unpack
(
t
)))
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0x56e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
11451011
,
2
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
(),
0
,
0
,
0
)
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
11451011
,
2
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
reop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ct
=
e
:
GetLabel
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
c
,
nil
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
and
c
:
IsLocation
(
LOCATION_REMOVED
)
and
not
c
:
IsReason
(
REASON_REDIRECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_MOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
cm
.
mvcon
)
e2
:
SetOperation
(
cm
.
mvop1
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e2
)
e
:
UseCountLimit
(
tp
,
1
)
c
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
11451011
,
2
))
c
:
RegisterFlagEffect
(
11451717
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
ct
,
aux
.
Stringid
(
11451717
,
ct
-
3
))
c
:
RegisterFlagEffect
(
11451718
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
9
-
ct
,
aux
.
Stringid
(
11451718
,
9
-
ct
))
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -98,22 +103,24 @@ function cm.mvop1(e,tp,eg,ep,ev,re,r,rp)
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
2
,
lab
)
and
not
chk
then
if
not
chk
and
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
2
,
lab
)
then
ops
[
off
]
=
aux
.
Stringid
(
n
,
10
)
opval
[
off
-
1
]
=
1
off
=
off
+
1
end
for
i
=
11451711
,
11451715
do
local
ci
=
_G
[
"c"
..
i
]
if
ci
and
cn
and
cn
[
i
]
and
Duel
.
GetFlagEffect
(
tp
,
0xffffff
+
i
)
==
0
and
ci
.
mvop
and
ci
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
2
,
lab
)
then
if
ci
and
cn
and
cn
[
i
]
and
Duel
.
GetFlagEffect
(
tp
,
0xffffff
+
i
)
==
0
and
ci
.
mvop
and
ci
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
2
,
lab
)
then
ops
[
off
]
=
aux
.
Stringid
(
i
,
3
)
opval
[
off
-
1
]
=
i
-
11451709
off
=
off
+
1
end
end
if
off
==
1
then
break
end
ops
[
off
]
=
aux
.
Stringid
(
n
,
11
)
opval
[
off
-
1
]
=
7
if
opval
[
0
]
~=
1
then
ops
[
off
]
=
aux
.
Stringid
(
n
,
11
)
opval
[
off
-
1
]
=
7
end
--mobile adaption
local
ops2
=
ops
local
op
=-
1
...
...
@@ -146,68 +153,57 @@ function cm.mvop1(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
opt
,
lab
)
local
c
=
e
:
GetHandler
()
local
ph
=
Duel
.
GetCurrentPhase
()
if
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
then
if
opt
==
2
then
return
true
end
if
opt
==
1
then
Duel
.
RegisterFlagEffect
(
tp
,
0xffffff
+
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
e1
:
SetValue
(
lab
*
500
)
c
:
RegisterEffect
(
e1
)
end
if
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
then
if
Duel
.
GetFlagEffect
(
0
,
11451711
)
==
0
then
Debug
.
Message
(
"伤害步骤内不能触发效果战斗。"
)
Duel
.
RegisterFlagEffect
(
0
,
11451711
,
RESET_PHASE
+
PHASE_DAMAGE
,
0
,
1
)
end
return
false
end
if
not
c
:
IsAttackable
()
then
return
end
local
g
=
c
:
GetAttackableTarget
()
local
b1
=
0
local
fid
=
e
:
GetLabel
()
if
fid
~=
0
then
b1
=
1
end
if
g
and
#
g
>
0
and
Duel
.
GetFlagEffect
(
0
,
m
)
==
0
then
if
g
and
#
g
>
0
then
if
opt
==
2
then
return
true
end
Duel
.
HintSelection
(
Group
.
FromCards
(
c
))
--if Duel.SelectYesNo(tp,aux.Stringid(m,4+b1)) then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
b1
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATTACKTARGET
)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
if
tc
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE_CAL
)
e1
:
SetValue
(
lab
*
500
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
CalculateDamage
(
c
,
tc
)
Duel
.
RegisterFlagEffect
(
0
,
m
,
RESET_CHAIN
,
0
,
1
)
end
if
fid
~=
0
then
Duel
.
RaiseEvent
(
c
,
11451718
,
e
,
fid
,
0
,
0
,
0
)
end
if
opt
==
1
then
Duel
.
RegisterFlagEffect
(
tp
,
0xffffff
+
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
--end
end
end
--c:ResetFlagEffect(11451717)
end
function
cm
.
pfilter
(
c
)
local
seq
=
c
:
GetSequence
()
local
p
=
c
:
GetControler
()
local
loc
=
c
:
GetLocation
()
if
c
:
IsLocation
(
LOCATION_FZONE
)
or
c
:
IsLocation
(
LOCATION_PZONE
)
or
seq
>
4
then
return
false
end
return
(
seq
>
0
and
Duel
.
CheckLocation
(
p
,
loc
,
seq
-
1
))
or
(
seq
<
4
and
Duel
.
CheckLocation
(
p
,
loc
,
seq
+
1
))
function
cm
.
mrcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
&
REASON_EFFECT
~=
0
end
function
cm
.
mrtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
pfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsRace
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
RACE_PSYCHO
)
end
end
function
cm
.
mrop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
sc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
pfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
):
GetFirst
()
if
sc
then
local
seq
=
sc
:
GetSequence
()
local
p
=
sc
:
GetControler
()
local
b1
=
0
if
p
~=
tp
then
b1
=
1
end
local
loc
=
sc
:
GetLocation
()
local
b2
=
0
if
loc
==
LOCATION_SZONE
then
b2
=
1
end
if
seq
>
4
then
return
end
local
flag
=
0
if
seq
>
0
and
Duel
.
CheckLocation
(
p
,
loc
,
seq
-
1
)
then
flag
=
flag
|
(
1
<<
(
seq
-
1
+
16
*
b1
+
8
*
b2
))
end
if
seq
<
4
and
Duel
.
CheckLocation
(
p
,
loc
,
seq
+
1
)
then
flag
=
flag
|
(
1
<<
(
seq
+
1
+
16
*
b1
+
8
*
b2
))
end
if
flag
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
~
flag
)
local
nseq
=
math.log
(
s
,
2
)
-
16
*
b1
-
8
*
b2
Duel
.
MoveSequence
(
sc
,
nseq
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsRace
,
tp
,
LOCATION_DECK
,
0
,
nil
,
RACE_PSYCHO
)
if
#
g
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
ShuffleDeck
(
tp
)
Duel
.
MoveSequence
(
tc
,
0
)
Duel
.
ConfirmDecktop
(
tp
,
1
)
end
end
\ No newline at end of file
expansions/script/c11451713.lua
View file @
d6bfea04
...
...
@@ -3,32 +3,24 @@ local cm,m=GetID()
function
cm
.
initial_effect
(
c
)
--effect1
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
11451711
,
4
))
e1
:
SetCategory
(
CATEGORY_REMOVE
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
--
e1:SetCountLimit(1)
e1
:
SetCondition
(
cm
.
recon
)
e1
:
SetCountLimit
(
1
)
--
e1:SetCondition(cm.recon)
e1
:
SetTarget
(
cm
.
retg
)
e1
:
SetOperation
(
cm
.
reop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_MOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
cm
.
mvcon
)
e2
:
SetOperation
(
cm
.
mvop1
)
c
:
RegisterEffect
(
e2
)
--effect2
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_
LEAVE_FIELD
)
e3
:
SetCode
(
EVENT_
REMOVE
)
e3
:
SetRange
(
LOCATION_HAND
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e3
:
SetCondition
(
cm
.
mrcon
)
e3
:
SetTarget
(
cm
.
mrtg
)
e3
:
SetOperation
(
cm
.
mrop
)
c
:
RegisterEffect
(
e3
)
...
...
@@ -46,13 +38,23 @@ function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
for
i
=
1
,
7
do
t
[
i
]
=
i
+
2
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_NUMBER
)
e
:
SetLabel
(
Duel
.
AnnounceNumber
(
tp
,
table.unpack
(
t
)))
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0x56e0000
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
11451011
,
2
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
(),
0
,
0
,
0
)
e
:
GetHandler
():
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
11451011
,
2
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
reop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
ct
=
e
:
GetLabel
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
Remove
(
c
,
nil
,
REASON_EFFECT
+
REASON_TEMPORARY
)
~=
0
and
c
:
IsLocation
(
LOCATION_REMOVED
)
and
not
c
:
IsReason
(
REASON_REDIRECT
)
then
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_MOVE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
cm
.
mvcon
)
e2
:
SetOperation
(
cm
.
mvop1
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e2
)
e
:
UseCountLimit
(
tp
,
1
)
c
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
11451011
,
2
))
c
:
RegisterFlagEffect
(
11451717
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
ct
,
aux
.
Stringid
(
11451717
,
ct
-
3
))
c
:
RegisterFlagEffect
(
11451718
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
9
-
ct
,
aux
.
Stringid
(
11451718
,
9
-
ct
))
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -178,25 +180,35 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
end
--c:ResetFlagEffect(11451717)
end
function
cm
.
cfilter
(
c
)
return
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
end
function
cm
.
mrcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
)
and
aux
.
dscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
pfilter
(
c
)
local
seq
=
c
:
GetSequence
()
local
p
=
c
:
GetControler
()
local
loc
=
c
:
GetLocation
()
if
c
:
IsLocation
(
LOCATION_FZONE
)
or
c
:
IsLocation
(
LOCATION_PZONE
)
or
seq
>
4
then
return
false
end
return
(
seq
>
0
and
Duel
.
CheckLocation
(
p
,
loc
,
seq
-
1
))
or
(
seq
<
4
and
Duel
.
CheckLocation
(
p
,
loc
,
seq
+
1
))
end
function
cm
.
mrtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
pfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
end
function
cm
.
mrop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
300
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
=
g
:
GetNext
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
local
sc
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
pfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
):
GetFirst
()
if
sc
then
local
seq
=
sc
:
GetSequence
()
local
p
=
sc
:
GetControler
()
local
b1
=
0
if
p
~=
tp
then
b1
=
1
end
local
loc
=
sc
:
GetLocation
()
local
b2
=
0
if
loc
==
LOCATION_SZONE
then
b2
=
1
end
if
seq
>
4
then
return
end
local
flag
=
0
if
seq
>
0
and
Duel
.
CheckLocation
(
p
,
loc
,
seq
-
1
)
then
flag
=
flag
|
(
1
<<
(
seq
-
1
+
16
*
b1
+
8
*
b2
))
end
if
seq
<
4
and
Duel
.
CheckLocation
(
p
,
loc
,
seq
+
1
)
then
flag
=
flag
|
(
1
<<
(
seq
+
1
+
16
*
b1
+
8
*
b2
))
end
if
flag
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
local
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
~
flag
)
local
nseq
=
math.log
(
s
,
2
)
-
16
*
b1
-
8
*
b2
Duel
.
MoveSequence
(
sc
,
nseq
)
end
end
\ No newline at end of file
expansions/script/c15200007.lua
View file @
d6bfea04
...
...
@@ -36,7 +36,7 @@ function c15200007.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsAbleToRemove
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
3
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
0
,
LOCATION_GRAVE
,
1
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
g
:
GetCount
(),
1
-
tp
,
LOCATION_GRAVE
)
end
function
c15200007
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c15200010.lua
View file @
d6bfea04
...
...
@@ -29,19 +29,16 @@ function s.initial_effect(c)
c
:
RegisterEffect
(
e1
)
-- Effect ③: This card cannot be destroyed by battle or effects, and battle damage becomes 0
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e2
:
SetValue
(
1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
15200010
,
1
))
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetTarget
(
c15200010
.
indtg
)
e2
:
SetOperation
(
c15200010
.
indop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e4
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e4
:
SetOperation
(
s
.
nodamageop
)
c
:
RegisterEffect
(
e4
)
end
-- Effect ①: Only 1 "Virtual Witch Phenomenon World" can exist on the field
...
...
@@ -113,6 +110,30 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
-- Effect ③: Battle damage becomes 0
function
s
.
nodamageop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
0
)
end
\ No newline at end of file
function
c15200010
.
indtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c15200010
.
indop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
tc
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EFFECT_NO_BATTLE_DAMAGE
)
tc
:
RegisterEffect
(
e3
)
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
tc
:
RegisterEffect
(
e4
)
end
end
expansions/script/c15200035.lua
View file @
d6bfea04
...
...
@@ -3,7 +3,7 @@ local s,id=GetID()
function
s
.
initial_effect
(
c
)
-- Fusion Procedure: 5 "Shin-Tsubaki" monsters
c
:
EnableReviveLimit
()
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
Is
Fusion
SetCard
,
0x680
),
5
,
true
)
aux
.
AddFusionProcFunRep
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x680
),
5
,
true
)
-- Effect ①: Negate the activation of a card effect and remove 1 "Shin-Tsubaki" card from the GY
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
...
...
@@ -19,22 +19,15 @@ function s.initial_effect(c)
-- Effect ②: Send 1 random card from opponent's hand to the GY at the end phase
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetCategory
(
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCondition
(
s
.
tgcon
)
e2
:
SetTarget
(
s
.
tgtg
)
e2
:
SetOperation
(
s
.
tgop
)
e2
:
SetOperation
(
s
.
regop
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e3
:
SetValue
(
aux
.
fuslimit
)
c
:
RegisterEffect
(
e3
)
--draw
end
-- Effect ①: Negate the activation of a card effect and remove 1 "Shin-Tsubaki" card from the GY
...
...
@@ -48,14 +41,17 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
s
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
-- Remove 1 "Shin-Tsubaki" card from the GY
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
-- Remove 1 "Shin-Tsubaki" card from the GYfunction s.tgfilter(c)
function
s
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0x680
)
and
c
:
IsAbleToRemove
()
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
#
g
>
0
then
...
...
@@ -67,15 +63,19 @@ end
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_FUSION
)
end
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
1
-
tp
,
LOCATION_HAND
,
0
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
1
-
tp
,
LOCATION_HAND
)
function
s
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCountLimit
(
1
)
e1
:
SetOperation
(
s
.
tgop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetFieldGroup
(
1
-
tp
,
LOCATION_HAND
,
0
)
if
#
g
==
0
then
return
end
local
sg
=
g
:
RandomSelect
(
1
-
tp
,
1
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_CARD
,
0
,
id
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
):
RandomSelect
(
tp
,
1
)
if
#
g
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c18700788.lua
View file @
d6bfea04
...
...
@@ -40,7 +40,7 @@ function cm.filter(c)
end
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
Duel
.
GetFlagEffect
(
tp
,
m
)
<
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
GetHandler
():
IsControler
(
1
-
tp
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
<
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
GetHandler
():
IsControler
(
1
-
tp
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
...
...
@@ -79,7 +79,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
re
:
GetHandler
():
IsControler
(
1
-
tp
)
return
re
:
GetHandler
():
IsControler
(
1
-
tp
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
eqtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGrave
()
end
...
...
expansions/script/c18700790.lua
View file @
d6bfea04
...
...
@@ -35,6 +35,13 @@ function cm.initial_effect(c)
e5
:
SetCondition
(
cm
.
con2
)
e5
:
SetOperation
(
cm
.
adjust_op2
)
c
:
RegisterEffect
(
e5
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetCode
(
EFFECT_ADD_SETCODE
)
e7
:
SetValue
(
0x829
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e7
:
SetRange
(
LOCATION_ONFIELD
)
c
:
RegisterEffect
(
e7
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c18700792.lua
View file @
d6bfea04
...
...
@@ -33,7 +33,7 @@ function cm.filter(c)
end
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
Duel
.
GetFlagEffect
(
tp
,
m
)
<
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
GetHandler
():
IsControler
(
1
-
tp
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
<
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
GetHandler
():
IsControler
(
1
-
tp
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
...
...
@@ -72,7 +72,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
re
:
GetHandler
():
IsControler
(
1
-
tp
)
return
re
:
GetHandler
():
IsControler
(
1
-
tp
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
eqtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGrave
()
end
...
...
expansions/script/c18700794.lua
View file @
d6bfea04
...
...
@@ -39,6 +39,13 @@ function cm.initial_effect(c)
e5
:
SetCondition
(
cm
.
con2
)
e5
:
SetOperation
(
cm
.
adjust_op2
)
c
:
RegisterEffect
(
e5
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetCode
(
EFFECT_ADD_SETCODE
)
e7
:
SetValue
(
0x829
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e7
:
SetRange
(
LOCATION_ONFIELD
)
c
:
RegisterEffect
(
e7
)
end
function
cm
.
llf
(
c
,
tp
)
...
...
expansions/script/c18700796.lua
View file @
d6bfea04
...
...
@@ -35,7 +35,7 @@ function cm.filter(c)
end
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
Duel
.
GetFlagEffect
(
tp
,
m
)
<
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
GetHandler
():
IsControler
(
1
-
tp
)
return
Duel
.
GetFlagEffect
(
tp
,
m
)
<
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
GetHandler
():
IsControler
(
1
-
tp
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
...
...
@@ -74,7 +74,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
re
:
GetHandler
():
IsControler
(
1
-
tp
)
return
re
:
GetHandler
():
IsControler
(
1
-
tp
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
eqtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGrave
()
end
...
...
expansions/script/c18700798.lua
View file @
d6bfea04
...
...
@@ -33,6 +33,14 @@ function cm.initial_effect(c)
e5
:
SetCondition
(
cm
.
con2
)
e5
:
SetOperation
(
cm
.
adjust_op2
)
c
:
RegisterEffect
(
e5
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetCode
(
EFFECT_ADD_SETCODE
)
e7
:
SetValue
(
0x829
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e7
:
SetRange
(
LOCATION_ONFIELD
)
c
:
RegisterEffect
(
e7
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
...
...
expansions/script/c18700804.lua
View file @
d6bfea04
...
...
@@ -59,7 +59,7 @@ end
function
cm
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
Duel
.
GetFlagEffect
(
tp
,
m
)
<
1
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
re
:
GetHandler
():
IsControler
(
1
-
tp
)
and
(
Duel
.
GetFlagEffect
(
tp
,
18700781
)
>=
5
or
Duel
.
GetFlagEffect
(
tp
,
18700780
)
>=
3
)
and
(
Duel
.
GetFlagEffect
(
tp
,
18700781
)
>=
5
or
Duel
.
GetFlagEffect
(
tp
,
18700780
)
>=
3
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
0
end
...
...
@@ -98,7 +98,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
end
function
cm
.
atkcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
re
:
GetHandler
():
IsControler
(
1
-
tp
)
return
re
:
GetHandler
():
IsControler
(
1
-
tp
)
and
re
:
GetHandler
():
IsType
(
TYPE_MONSTER
)
end
function
cm
.
eqtg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGrave
()
end
...
...
@@ -106,12 +106,7 @@ end
function
cm
.
eqop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
3
))
then
local
c
=
e
:
GetHandler
()
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
18700821
)
and
Duel
.
CheckLPCost
(
tp
,
200
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
6
))
then
Duel
.
PayLPCost
(
tp
,
200
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
else
Duel
.
SendtoGrave
(
c
,
REASON_EFFECT
)
end
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
end
end
...
...
@@ -153,10 +148,10 @@ function cm.val2_1(e,re)
end
function
cm
.
atkcon3
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
return
rc
:
IsCode
(
m
+
2
)
and
rc
:
IsControler
(
tp
)
return
Duel
.
GetFlagEffect
(
tp
,
18700806
)
>=
1
or
(
rc
:
IsCode
(
m
+
2
)
and
re
:
GetActivateLocation
()
==
LOCATION_MZONE
)
end
function
cm
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
m
+
3
,
0
,
TYPES_TOKEN_MONSTER
,
2800
,
2800
,
8
,
RACE_WARRIOR
,
ATTRIBUTE_LIGHT
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
18700807
,
0
,
TYPES_TOKEN_MONSTER
,
2800
,
2800
,
8
,
RACE_WARRIOR
,
ATTRIBUTE_LIGHT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
...
...
expansions/script/c18700806.lua
View file @
d6bfea04
...
...
@@ -17,7 +17,7 @@ function cm.initial_effect(c)
e1
:
SetOperation
(
cm
.
negop
)
c
:
RegisterEffect
(
e1
)
-- 效果②:移动+破坏+降攻
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_ATKCHANGE
)
...
...
@@ -37,8 +37,29 @@ function cm.initial_effect(c)
e5
:
SetCondition
(
cm
.
con2
)
e5
:
SetOperation
(
cm
.
adjust_op2
)
c
:
RegisterEffect
(
e5
)
end
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetCode
(
EFFECT_ADD_SETCODE
)
e7
:
SetValue
(
0x829
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_CANNOT_DISABLE
)
e7
:
SetRange
(
LOCATION_ONFIELD
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e8
:
SetCode
(
EVENT_CHAINING
)
e8
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e8
:
SetRange
(
LOCATION_ONFIELD
)
e8
:
SetOperation
(
cm
.
checkop
)
c
:
RegisterEffect
(
e8
)
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
18700806
)
>
0
and
re
:
GetHandler
()
~=
e
:
GetHandler
()
then
Duel
.
ResetFlagEffect
(
tp
,
m
)
end
end
function
cm
.
llf
(
c
,
tp
)
return
c
:
IsCode
(
m
-
2
)
and
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
...
...
@@ -50,6 +71,9 @@ function cm.adjust_op2(e,tp,eg,ep,ev,re,r,rp)
c
:
SetEntityCode
(
cm
.
gacode
)
c
:
ReplaceEffect
(
cm
.
gacode
,
0
,
0
)
Duel
.
Hint
(
10
,
1
,
cm
.
gacode
)
if
Duel
.
GetFlagEffect
(
tp
,
18700806
)
>
0
then
Duel
.
ResetFlagEffect
(
tp
,
m
)
end
end
function
cm
.
negcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
@@ -58,6 +82,7 @@ end
function
cm
.
negtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
RegisterFlagEffect
(
tp
,
18700806
,
RESET_CHAIN
,
0
,
1
)
if
re
:
GetHandler
():
IsDestructable
()
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
...
...
@@ -97,6 +122,7 @@ function cm.mvcost(e,tp,eg,ep,ev,re,r,rp,chk)
else
e
:
SetLabel
(
0
)
end
Duel
.
RegisterFlagEffect
(
tp
,
18700806
,
RESET_CHAIN
,
0
,
1
)
end
function
cm
.
mvop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c47390030.lua
View file @
d6bfea04
...
...
@@ -63,7 +63,7 @@ function s.spsummon(c)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
s
.
sptg
)
...
...
expansions/script/c47390047.lua
View file @
d6bfea04
...
...
@@ -43,7 +43,7 @@ function s.tefilter(c)
and
c
:
IsAbleToExtraAsCost
()
end
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x5ca5
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
return
c
:
IsSetCard
(
0x5ca5
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
true
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
nil
,
c
)
>
0
end
function
s
.
ef1cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
mg
=
e
:
GetHandler
():
GetOverlayGroup
():
Filter
(
s
.
tefilter
,
nil
)
...
...
@@ -53,7 +53,7 @@ function s.ef1cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SendtoDeck
(
tg
,
nil
,
SEQ_DECKTOP
,
REASON_COST
)
end
function
s
.
ef1tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
s
.
ef1op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c81903001.lua
View file @
d6bfea04
...
...
@@ -33,7 +33,7 @@ function cm.adval(e,c)
end
--search
function
cm
.
thfilter
(
c
)
return
(
c
:
IsSetCard
(
0x855
)
or
aux
.
IsCodeListed
(
c
,
81902003
))
and
c
:
IsAbleToHand
()
return
(
c
:
IsSetCard
(
0x855
)
or
aux
.
IsCodeListed
(
c
,
81902003
))
and
c
:
IsAbleToHand
()
and
c
:
IsType
(
TYPE_MONSTER
)
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
...
...
expansions/script/c81903002.lua
View file @
d6bfea04
...
...
@@ -30,7 +30,7 @@ function cm.initial_effect(c)
end
--Activate
function
cm
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
FromEx
(
tp
)
>
0
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
end
--fusion check
function
cm
.
filter0
(
c
)
...
...
expansions/script/c81903003.lua
View file @
d6bfea04
...
...
@@ -32,7 +32,7 @@ function cm.filter(c)
return
(
c
:
IsSetCard
(
0x855
)
or
aux
.
IsCodeListed
(
c
,
81902003
))
and
not
c
:
IsCode
(
m
)
and
(
c
:
IsAbleToHand
()
or
c
:
IsAbleToGrave
())
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
e
:
GetHandler
()
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_OPERATECARD
)
...
...
expansions/script/c96071081.lua
View file @
d6bfea04
...
...
@@ -22,7 +22,6 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e2
)
--to grave
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
62098216
,
0
))
e3
:
SetCategory
(
CATEGORY_TOGRAVE
)
--送去墓地效果
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
--自己状态变化时触发+诱发选发效果
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
...
...
@@ -31,20 +30,20 @@ function cm.initial_effect(c)
e3
:
SetTarget
(
cm
.
tgtg
)
e3
:
SetOperation
(
cm
.
tgop
)
c
:
RegisterEffect
(
e3
)
--coin effect
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
--诱发即时效果
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
--自由时点
e3
:
SetHintTiming
(
TIMING_END_PHASE
)
--时点提示
e3
:
SetRange
(
LOCATION_MZONE
)
--怪兽区域
e3
:
SetCountLimit
(
1
,
m
+
2
)
e3
:
SetCost
(
cm
.
skipcost
)
--代价cost
e3
:
SetTarget
(
cm
.
skiptg
)
e3
:
SetOperation
(
cm
.
skipop
)
c
:
RegisterEffect
(
e3
)
--to grave search
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e4
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_TOGRAVE
+
CATEGORY_GRAVE_ACTION
)
--回手卡效果+检索卡组效果+送去墓地效果+包含特殊召唤以外移动墓地的卡的效果
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
--自己状态变化时触发+诱发必发效果
e4
:
SetCode
(
EVENT_TO_DECK
)
--回卡组时
e4
:
SetCountLimit
(
1
,
m
+
2
)
e4
:
SetCondition
(
cm
.
tscon
)
--效果条件
e4
:
SetTarget
(
cm
.
tstg
)
e4
:
SetOperation
(
cm
.
tsop
)
c
:
RegisterEffect
(
e4
)
end
--public
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsPublic
()
end
end
...
...
@@ -167,6 +166,17 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
e3
:
SetOperation
(
cm
.
drop
)
e3
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e3
,
true
)
--coin effect
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
--诱发即时效果
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
--自由时点
e4
:
SetHintTiming
(
TIMING_END_PHASE
)
--时点提示
e4
:
SetRange
(
LOCATION_MZONE
)
--怪兽区域
e4
:
SetCost
(
cm
.
skipcost
)
--代价cost
e4
:
SetTarget
(
cm
.
skiptg
)
e4
:
SetOperation
(
cm
.
skipop
)
c
:
RegisterEffect
(
e4
,
true
)
c
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
m
,
1
))
end
end
...
...
@@ -218,4 +228,32 @@ function cm.skipop(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
GetTurnPlayer
()
==
1
-
tp
then
rct
=
2
end
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
,
rct
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
--to grave search
function
cm
.
tscon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousPosition
(
POS_FACEUP
)
and
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
cm
.
tsfilter
(
c
)
return
c
:
IsSetCard
(
0xef1
)
and
c
:
IsAbleToGrave
()
end
function
cm
.
tstg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tsfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
cm
.
tsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tsfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
>
0
and
g
:
GetFirst
():
IsLocation
(
LOCATION_GRAVE
)
and
Duel
.
IsExistingMatchingCard
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
4
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
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