Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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-2pick
Commits
c815ffd0
Commit
c815ffd0
authored
Jul 02, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #834 from YuGiOhMoDDeR/patch-17
new
parents
16c605be
194c5f18
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
0 deletions
+94
-0
script/c52665542.lua
script/c52665542.lua
+94
-0
No files found.
script/c52665542.lua
0 → 100644
View file @
c815ffd0
--Lightsworn Sanctuary
function
c52665542
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
52665542
,
0
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCost
(
c52665542
.
cost
)
e2
:
SetTarget
(
c52665542
.
target
)
e2
:
SetOperation
(
c52665542
.
activate
)
c
:
RegisterEffect
(
e2
)
--add counter
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetOperation
(
c52665542
.
acop
)
c
:
RegisterEffect
(
e3
)
--destroy replace
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_FIELD
)
e4
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e4
:
SetRange
(
LOCATION_SZONE
)
e4
:
SetTarget
(
c52665542
.
destg
)
e4
:
SetValue
(
c52665542
.
value
)
e4
:
SetOperation
(
c52665542
.
desop
)
c
:
RegisterEffect
(
e4
)
end
function
c52665542
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x38
)
and
c
:
IsAbleToGraveAsCost
()
end
function
c52665542
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c52665542
.
costfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
sg
=
g
:
FilterSelect
(
tp
,
c52665542
.
costfilter
,
1
,
1
,
nil
)
e
:
SetLabelObject
(
sg
:
GetFirst
())
Duel
.
SendtoGrave
(
sg
,
REASON_COST
)
end
function
c52665542
.
tgfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSetCard
(
0x38
)
and
c
:
IsAbleToHand
()
end
function
c52665542
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetLabelObject
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c52665542
.
tgfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c52665542
.
tgfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c52665542
.
tgfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
sg
,
sg
:
GetCount
(),
0
,
0
)
end
function
c52665542
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
c52665542
.
cfilter
(
c
,
tp
)
return
c
:
GetPreviousLocation
()
==
LOCATION_DECK
and
c
:
GetPreviousControler
()
==
tp
end
function
c52665542
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
c52665542
.
cfilter
,
1
,
nil
,
tp
)
then
e
:
GetHandler
():
AddCounter
(
0x5
,
1
)
end
end
function
c52665542
.
dfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsSetCard
(
0x38
)
and
c
:
IsControler
(
tp
)
end
function
c52665542
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
count
=
eg
:
FilterCount
(
c52665542
.
dfilter
,
nil
,
tp
)
e
:
SetLabel
(
count
)
return
count
>
0
and
Duel
.
IsCanRemoveCounter
(
tp
,
1
,
0
,
0x5
,
count
*
2
,
REASON_EFFECT
)
end
return
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
52665542
,
1
))
end
function
c52665542
.
value
(
e
,
c
)
return
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsSetCard
(
0x38
)
and
c
:
IsControler
(
e
:
GetHandlerPlayer
())
end
function
c52665542
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
count
=
e
:
GetLabel
()
Duel
.
RemoveCounter
(
tp
,
1
,
0
,
0x5
,
count
*
2
,
REASON_EFFECT
)
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