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
Soulgamer
ygopro-222DIY-cards
Commits
1892b76e
Commit
1892b76e
authored
Nov 16, 2019
by
gg123gg
Committed by
GitHub
Nov 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e9dc9d49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
108 deletions
+108
-108
expansions/script/c12006009.lua
expansions/script/c12006009.lua
+108
-108
No files found.
expansions/script/c12006009.lua
View file @
1892b76e
--失落王国 王国的尚达凤
function
c12006009
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12006009
)
e1
:
SetCondition
(
c12006009
.
condition
)
e1
:
SetTarget
(
c12006009
.
target
)
e1
:
SetOperation
(
c12006009
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
3
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
12006109
)
e1
:
SetOperation
(
c12006009
.
ttop
)
c
:
RegisterEffect
(
e1
)
--special summon rule
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
5
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
1
)
e1
:
SetCountLimit
(
1
,
12006109
)
e1
:
SetCondition
(
c12006009
.
spcon
)
e1
:
SetOperation
(
c12006009
.
spop
)
c
:
RegisterEffect
(
e1
)
if
not
c12006009
.
global_check
then
c12006009
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetOperation
(
c12006009
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c12006009
.
cfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
c12006009
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
eg
then
return
end
local
sg
=
eg
:
Filter
(
c12006009
.
cfilter
,
nil
,
tp
)
local
tc
=
sg
:
GetFirst
()
while
tc
do
tc
:
RegisterFlagEffect
(
12006009
,
RESET_EVENT
+
0x1fe0000
-
RESET_TOGRAVE
,
0
,
1
)
tc
=
sg
:
GetNext
()
end
end
function
c12006009
.
spfilter
(
c
,
ft
)
return
c
:
GetFlagEffect
(
12006009
)
~=
0
and
c
:
IsReleasable
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
end
function
c12006009
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c12006009
.
spfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
ft
)
end
function
c12006009
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
ft
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006009
.
spfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
ft
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c12006009
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c12006009
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006009
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12006009
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12006009
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12006009
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006009
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c12006009
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12006009
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
==
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
end
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
Duel
.
ConfirmCards
(
1
-
tp
,
g2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_SPSUMMON
)
sg
=
Duel
.
SelectTarget
(
1
-
tp
,
c12006009
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
Duel
.
SpecialSummonComplete
()
Duel
.
ShuffleHand
(
tp
)
--失落王国 王国的尚达凤
function
c12006009
.
initial_effect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCountLimit
(
1
,
12006009
)
e1
:
SetCondition
(
c12006009
.
condition
)
e1
:
SetTarget
(
c12006009
.
target
)
e1
:
SetOperation
(
c12006009
.
operation
)
c
:
RegisterEffect
(
e1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
3
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
12006109
)
e1
:
SetOperation
(
c12006009
.
ttop
)
c
:
RegisterEffect
(
e1
)
--special summon rule
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
12006009
,
5
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_SPSUM_PARAM
)
e1
:
SetTargetRange
(
POS_FACEUP_ATTACK
,
1
)
e1
:
SetCountLimit
(
1
,
12006109
)
e1
:
SetCondition
(
c12006009
.
spcon
)
e1
:
SetOperation
(
c12006009
.
spop
)
c
:
RegisterEffect
(
e1
)
if
not
c12006009
.
global_check
then
c12006009
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetOperation
(
c12006009
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c12006009
.
cfilter
(
c
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
end
function
c12006009
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
eg
then
return
end
local
sg
=
eg
:
Filter
(
c12006009
.
cfilter
,
nil
,
tp
)
local
tc
=
sg
:
GetFirst
()
while
tc
do
tc
:
RegisterFlagEffect
(
12006009
,
RESET_EVENT
+
0x1fe0000
-
RESET_TOGRAVE
,
0
,
1
)
tc
=
sg
:
GetNext
()
end
end
function
c12006009
.
spfilter
(
c
,
ft
)
return
c
:
GetFlagEffect
(
12006009
)
~=
0
and
c
:
IsReleasable
()
and
(
ft
>
0
or
c
:
GetSequence
()
<
5
)
end
function
c12006009
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
ft
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
return
ft
>-
1
and
Duel
.
IsExistingMatchingCard
(
c12006009
.
spfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
,
ft
)
end
function
c12006009
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
ft
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006009
.
spfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
ft
)
Duel
.
Release
(
g
,
REASON_COST
)
end
function
c12006009
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
(
c
:
IsReason
(
REASON_BATTLE
)
or
rp
==
1
-
tp
and
c
:
IsReason
(
REASON_DESTROY
))
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c12006009
.
filter
3
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x8fbd
)
and
not
c
:
IsCode
(
12006009
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12006009
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c12006009
.
filter
3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c12006009
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c12006009
.
filter
3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c12006009
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c12006009
.
ttop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_HAND
,
0
)
==
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
end
local
g2
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
Duel
.
ConfirmCards
(
1
-
tp
,
g2
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_SPSUMMON
)
sg
=
Duel
.
SelectTarget
(
1
-
tp
,
c12006009
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
sg
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
end
Duel
.
SpecialSummonComplete
()
Duel
.
ShuffleHand
(
tp
)
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