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
d14079e3
Commit
d14079e3
authored
Mar 20, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
errata
parent
c476e601
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
25 deletions
+61
-25
script/c40737112.lua
script/c40737112.lua
+61
-25
No files found.
script/c40737112.lua
View file @
d14079e3
...
...
@@ -3,21 +3,25 @@ function c40737112.initial_effect(c)
--summon success
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
40737112
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetTarget
(
c40737112
.
sptg
)
e1
:
SetOperation
(
c40737112
.
spop
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
40737112
)
e1
:
SetCost
(
c40737112
.
thcost
)
e1
:
SetTarget
(
c40737112
.
thtg
)
e1
:
SetOperation
(
c40737112
.
thop
)
c
:
RegisterEffect
(
e1
)
--remove
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
40737112
,
0
))
e2
:
SetCategory
(
CATEGORY_
TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_
O
)
e2
:
Set
Property
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCo
de
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetTarget
(
c40737112
.
sp
tg
)
e2
:
SetOperation
(
c40737112
.
sp
op
)
e2
:
SetDescription
(
aux
.
Stringid
(
40737112
,
1
))
e2
:
SetCategory
(
CATEGORY_
REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_
F
)
e2
:
Set
Code
(
EVENT_BATTLED
)
e2
:
SetCo
ndition
(
c40737112
.
rmcon
)
e2
:
SetTarget
(
c40737112
.
rm
tg
)
e2
:
SetOperation
(
c40737112
.
rm
op
)
c
:
RegisterEffect
(
e2
)
--redirect
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -26,30 +30,62 @@ function c40737112.initial_effect(c)
e3
:
SetCondition
(
c40737112
.
recon
)
e3
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e3
)
--redirect
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetCode
(
EFFECT_BATTLE_DESTROY_REDIRECT
)
e4
:
SetValue
(
LOCATION_REMOVED
)
c
:
RegisterEffect
(
e4
)
if
not
c40737112
.
global_check
then
c40737112
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
ge1
:
SetOperation
(
c40737112
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
local
ge2
=
ge1
:
Clone
()
ge2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
Duel
.
RegisterEffect
(
ge2
,
0
)
end
end
function
c40737112
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
while
tc
do
tc
:
RegisterFlagEffect
(
40737112
,
RESET_EVENT
+
0x1ec0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
tc
=
eg
:
GetNext
()
end
end
function
c40737112
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
40737112
)
~=
0
end
e
:
GetHandler
():
ResetFlagEffect
(
40737112
)
end
function
c40737112
.
t
g
filter
(
c
)
function
c40737112
.
t
h
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
end
function
c40737112
.
sp
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_GRAVE
and
chkc
:
GetControler
()
==
tp
and
c40737112
.
tg
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c40737112
.
t
g
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
c40737112
.
th
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c40737112
.
th
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c40737112
.
t
h
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c40737112
.
t
g
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c40737112
.
t
h
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c40737112
.
sp
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c40737112
.
th
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
end
end
function
c40737112
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
e
:
SetLabelObject
(
bc
)
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
end
function
c40737112
.
rmtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetLabelObject
(),
1
,
0
,
0
)
end
function
c40737112
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bc
=
e
:
GetLabelObject
()
if
bc
:
IsRelateToBattle
()
then
Duel
.
Remove
(
bc
,
POS_FACEUP
,
REASON_EFFECT
)
end
end
function
c40737112
.
recon
(
e
)
return
e
:
GetHandler
():
IsFaceup
()
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