Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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
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
MyCard
ygopro-scripts
Commits
1efadfd6
Commit
1efadfd6
authored
Mar 19, 2016
by
VanillaSalt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #317 from nekrozar/patch-2
new card VJMP
parents
e376a929
c108847d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
110 additions
and
0 deletions
+110
-0
c21250202.lua
c21250202.lua
+110
-0
No files found.
c21250202.lua
0 → 100644
View file @
1efadfd6
--オッドアイズ・ペルソナ・ドラゴン
function
c21250202
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--spsummon reg
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EVENT_BECOME_TARGET
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetOperation
(
c21250202
.
regop1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetOperation
(
c21250202
.
regop2
)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
21250202
,
0
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetRange
(
LOCATION_PZONE
)
e3
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c21250202
.
spcon
)
e3
:
SetTarget
(
c21250202
.
sptg
)
e3
:
SetOperation
(
c21250202
.
spop
)
c
:
RegisterEffect
(
e3
)
--disable
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
21250202
,
1
))
e4
:
SetCategory
(
CATEGORY_DISABLE
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e4
:
SetCode
(
EVENT_FREE_CHAIN
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e4
:
SetCountLimit
(
1
)
e4
:
SetTarget
(
c21250202
.
distg
)
e4
:
SetOperation
(
c21250202
.
disop
)
c
:
RegisterEffect
(
e4
)
end
function
c21250202
.
regfilter
(
c
)
return
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x99
)
end
function
c21250202
.
regop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
rp
==
tp
or
not
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
or
eg
:
GetCount
()
~=
1
or
not
eg
:
IsExists
(
c21250202
.
regfilter
,
1
,
nil
)
then
e
:
SetLabelObject
(
nil
)
else
e
:
SetLabelObject
(
re
)
end
end
function
c21250202
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
pe
=
e
:
GetLabelObject
():
GetLabelObject
()
if
pe
and
pe
==
re
then
e
:
GetHandler
():
RegisterFlagEffect
(
21250202
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
function
c21250202
.
penfilter
(
c
)
return
c
:
IsSetCard
(
0x99
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
and
not
c
:
IsCode
(
21250202
)
and
not
c
:
IsForbidden
()
end
function
c21250202
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFlagEffect
(
21250202
)
~=
0
end
function
c21250202
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c21250202
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21250202
.
penfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
end
elseif
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
then
Duel
.
SendtoGrave
(
c
,
REASON_RULE
)
end
end
function
c21250202
.
disfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
not
c
:
IsDisabled
()
end
function
c21250202
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c21250202
.
disfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c21250202
.
disfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c21250202
.
disfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
1
,
0
,
0
)
end
function
c21250202
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
NegateRelatedChain
(
tc
,
RESET_TURN_SET
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
end
end
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