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
d6564884
Commit
d6564884
authored
Nov 12, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5672ac76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
52 deletions
+50
-52
c85602018.lua
c85602018.lua
+50
-52
No files found.
c85602018.lua
View file @
d6564884
...
...
@@ -4,71 +4,69 @@ function c85602018.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetOperation
(
c85602018
.
operation
)
e1
:
SetTarget
(
c85602018
.
target
)
e1
:
SetOperation
(
c85602018
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
c85602018
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
c85602018
.
check
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCondition
(
c85602018
.
spcon
)
e2
:
SetOperation
(
c85602018
.
spop
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCondition
(
c85602018
.
spcon2
)
Duel
.
RegisterEffect
(
e3
,
tp
)
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EVENT_CHAIN_END
)
Duel
.
RegisterEffect
(
e4
,
tp
)
local
e5
=
e2
:
Clone
()
e5
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
Duel
.
RegisterEffect
(
e5
,
tp
)
local
e6
=
e2
:
Clone
()
e6
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
Duel
.
RegisterEffect
(
e6
,
tp
)
local
e7
=
e2
:
Clone
()
e7
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e7
,
tp
)
if
not
c85602018
.
global_check
then
c85602018
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_TO_GRAVE
)
ge1
:
SetOperation
(
c85602018
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c85602018
.
cfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
end
function
c85602018
.
check
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
2
then
return
end
if
eg
:
IsExists
(
c85602018
.
cfilter
,
1
,
nil
,
tp
)
then
e
:
SetLabel
(
1
)
function
c85602018
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
p
=
0
,
1
do
if
eg
:
IsExists
(
c85602018
.
cfilter
,
1
,
nil
,
p
)
then
Duel
.
RegisterFlagEffect
(
p
,
85602018
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
function
c85602018
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsAttackBelow
(
1500
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c85602018
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
1
end
function
c85602018
.
spcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetLabelObject
():
GetLabel
()
==
1
and
Duel
.
GetCurrentChain
()
==
0
function
c85602018
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
Duel
.
GetFlagEffect
(
tp
,
85602018
)
~=
0
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
e
:
SetLabel
(
1
)
else
e
:
SetCategory
(
0
)
e
:
SetLabel
(
0
)
end
end
function
c85602018
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
Object
():
GetLabel
()
~=
1
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
function
c85602018
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c85602018
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
85602018
,
0
))
then
e
:
GetLabelObject
():
SetLabel
(
2
)
Duel
.
Hint
(
HINT_CARD
,
0
,
85602018
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c85602018
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c85602018
.
spcon
)
e1
:
SetOperation
(
c85602018
.
spop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c85602018
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsAttackBelow
(
1500
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c85602018
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
85602018
)
~=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c85602018
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
function
c85602018
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
85602018
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c85602018
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
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