Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
pre-release-database-cdb
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
yks
pre-release-database-cdb
Commits
d8fa1e2c
Commit
d8fa1e2c
authored
Nov 30, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix VJMP-JP244 script
fix cdb
parent
4353b22c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
95 deletions
+90
-95
script/c100200244.lua
script/c100200244.lua
+90
-95
test-release.cdb
test-release.cdb
+0
-0
No files found.
script/c100200244.lua
View file @
d8fa1e2c
--
灵摆女巫
local
cm
,
m
,
o
=
GetID
()
function
cm
.
initial_effect
(
c
)
--pendulum summon
--
coded by Lyris
--Pendulum Witch
local
s
,
id
,
o
=
GetID
(
)
function
s
.
initial_effect
(
c
)
aux
.
EnablePendulumAttribute
(
c
)
--Destroy P
--to extra
aux
.
RegisterMergedDelayedEvent
(
c
,
id
,
EVENT_DESTROYED
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_TOEXTRA
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetTarget
(
cm
.
destg
)
e1
:
SetOperation
(
cm
.
desop
)
e1
:
SetCode
(
EVENT_CUSTOM
+
id
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
s
.
txcon
)
e1
:
SetTarget
(
s
.
txtg
)
e1
:
SetOperation
(
s
.
txop
)
c
:
RegisterEffect
(
e1
)
local
e4
=
e1
:
Clone
()
e4
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e4
:
SetCondition
(
cm
.
condition
)
c
:
RegisterEffect
(
e4
)
--pendulum
--search
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_
DESTROYED
)
e2
:
Set
Property
(
EFFECT_FLAG_DELAY
)
e2
:
Set
Condition
(
cm
.
pencon
)
e2
:
SetTarget
(
cm
.
pen
tg
)
e2
:
SetOperation
(
cm
.
pen
op
)
e2
:
SetCode
(
EVENT_
SUMMON_SUCCESS
)
e2
:
Set
CountLimit
(
1
,
id
+
o
)
e2
:
Set
Property
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e2
:
SetTarget
(
s
.
th
tg
)
e2
:
SetOperation
(
s
.
th
op
)
c
:
RegisterEffect
(
e2
)
--to EX
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TOEXTRA
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetCode
(
EVENT_DESTROYED
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetRange
(
LOCATION_PZONE
)
e3
:
SetCountLimit
(
1
,
m
+
o
)
e3
:
SetCondition
(
cm
.
tecon
)
e3
:
SetTarget
(
cm
.
tetg
)
e3
:
SetOperation
(
cm
.
teop
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCondition
(
s
.
thcon
)
c
:
RegisterEffect
(
e3
)
--to scale
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_DESTROYED
)
e4
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e4
:
SetCondition
(
s
.
pzcon
)
e4
:
SetTarget
(
s
.
pztg
)
e4
:
SetOperation
(
s
.
pzop
)
c
:
RegisterEffect
(
e4
)
end
function
s
.
cfilter
(
c
,
tp
,
chk
)
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
GetPreviousTypeOnField
()
&
(
TYPE_FUSION
+
TYPE_SYNCHRO
+
TYPE_XYZ
)
>
0
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousControler
(
tp
)
and
(
c
:
IsReason
(
REASON_BATTLE
)
or
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
GetReasonPlayer
()
==
1
-
tp
)
and
(
not
chk
or
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
))
end
function
s
.
chk
(
c
,
tc
)
return
c
:
GetOriginalRace
()
==
tc
:
GetOriginalRace
()
end
function
s
.
filter
(
c
,
r
)
if
not
c
:
IsType
(
TYPE_PENDULUM
)
then
return
false
end
local
t
=
type
(
r
)
if
t
==
'userdata'
then
local
v
=
aux
.
GetValueType
(
r
)
if
v
==
'Card'
then
return
s
.
chk
(
c
,
r
)
elseif
v
==
'Group'
then
return
r
:
IsExists
(
s
.
chk
,
1
,
c
,
c
)
else
return
false
end
elseif
t
==
'number'
then
return
c
:
GetOriginalRace
()
==
r
else
return
false
end
end
function
s
.
txcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
tp
)
end
function
s
.
txtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
eg
:
Filter
(
s
.
cfilter
,
nil
,
tp
,
chk
==
0
)
if
chk
==
0
then
return
#
g
>
0
end
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOEXTRA
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
desfilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
function
s
.
txop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetTargetsRelateToChain
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
id
,
3
))
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
1
,
1
,
nil
,
g
)
Duel
.
SendtoExtraP
(
tg
,
nil
,
REASON_EFFECT
)
end
function
cm
.
th
filter
(
c
)
function
s
.
s
filter
(
c
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsAbleToHand
()
end
function
cm
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_PZONE
)
and
c
m
.
desfilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
(
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
desfilter
,
tp
,
LOCATION_PZONE
,
LOCATION_PZONE
,
1
,
e
:
GetHandler
()
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
th
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_PZONE
)
and
c
hkc
:
IsControler
(
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
s
.
s
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
desfilter
,
tp
,
LOCATION_PZONE
,
LOCATION_PZONE
,
1
,
1
,
e
:
GetHandler
())
g
:
AddCard
(
e
:
GetHandler
())
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_PZONE
,
0
,
1
,
1
,
nil
)
+
e
:
GetHandler
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
2
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
cm
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
Destroy
(
Group
.
FromCards
(
tc
,
e
:
GetHandler
()),
REASON_EFFECT
)
==
2
then
local
g
=
Group
.
FromCards
(
c
,
tc
):
Filter
(
Card
.
IsRelateToChain
,
nil
)
if
#
g
<
2
or
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
<
2
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
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
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
sfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
function
cm
.
conditi
on
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
thc
on
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_PENDULUM
)
end
function
cm
.
pen
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
pz
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
()
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
Ex
()
end
function
cm
.
pen
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
pz
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
)
end
end
function
cm
.
pen
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
pz
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
end
end
function
cm
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousControler
(
tp
)
and
c
:
IsType
(
TYPE_XYZ
+
TYPE_SYNCHRO
+
TYPE_FUSION
)
and
c
:
IsReason
(
REASON_DESTROY
)
and
(
c
:
IsReason
(
REASON_BATTLE
)
or
c
:
GetReasonPlayer
()
==
1
-
tp
)
end
function
cm
.
tefilter
(
c
,
race
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
GetOriginalRace
()
&
race
~=
0
end
function
cm
.
tecon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
cfilter
,
1
,
nil
,
tp
)
end
function
cm
.
tetg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
eg
:
Filter
(
cm
.
cfilter
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
local
sg
=
Group
.
CreateGroup
()
while
tc
do
local
rg
=
Duel
.
GetMatchingGroup
(
cm
.
tefilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
tc
:
GetOriginalRace
())
sg
:
Merge
(
rg
)
tc
=
g
:
GetNext
()
end
if
chk
==
0
then
return
sg
:
GetCount
()
>
0
end
end
function
cm
.
teop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
cm
.
cfilter
,
nil
,
tp
)
local
tc
=
g
:
GetFirst
()
local
sg
=
Group
.
CreateGroup
()
while
tc
do
local
rg
=
Duel
.
GetMatchingGroup
(
cm
.
tefilter
,
tp
,
LOCATION_DECK
,
0
,
nil
,
tc
:
GetOriginalRace
())
sg
:
Merge
(
rg
)
tc
=
g
:
GetNext
()
end
if
sg
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
0
))
local
exg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoExtraP
(
exg
,
nil
,
REASON_EFFECT
)
end
if
c
:
IsRelateToChain
()
then
Duel
.
MoveToField
(
c
,
tp
,
tp
,
LOCATION_PZONE
,
POS_FACEUP
,
true
)
end
end
\ No newline at end of file
test-release.cdb
View file @
d8fa1e2c
No preview for this file type
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