Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
YGOPRO-520DIY
ygopro
Commits
5902989e
Commit
5902989e
authored
Feb 26, 2014
by
Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update c82016179.lua
parent
3b16a5a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
script/c82016179.lua
script/c82016179.lua
+25
-17
No files found.
script/c82016179.lua
View file @
5902989e
...
...
@@ -2,7 +2,9 @@
function
c82016179
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c82016179
.
cost
)
e1
:
SetTarget
(
c82016179
.
target
)
...
...
@@ -15,25 +17,31 @@ function c82016179.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c82016179
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
3
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
0
,
tp
,
2
)
end
function
c82016179
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Draw
(
tp
,
3
,
REASON_EFFECT
)
Duel
.
BreakEffect
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
nil
)
if
g
:
GetCount
()
>
1
and
g
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x90
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg1
=
g
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x90
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg2
=
g
:
Select
(
tp
,
1
,
1
,
sg1
:
GetFirst
())
sg1
:
Merge
(
sg2
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg1
)
Duel
.
SendtoDeck
(
sg1
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
tp
,
tp
,
2
)
else
local
hg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
Duel
.
ConfirmCards
(
1
-
tp
,
hg
)
local
ct
=
Duel
.
SendtoDeck
(
hg
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
tp
,
tp
,
ct
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
==
3
then
Duel
.
ShuffleHand
(
tp
)
Duel
.
BreakEffect
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_HAND
,
0
,
nil
)
if
g
:
GetCount
()
>
1
and
g
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x90
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg1
=
g
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x90
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg2
=
g
:
Select
(
tp
,
1
,
1
,
sg1
:
GetFirst
())
sg1
:
Merge
(
sg2
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg1
)
Duel
.
SendtoDeck
(
sg1
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
tp
,
tp
,
2
)
else
local
hg
=
Duel
.
GetFieldGroup
(
tp
,
LOCATION_HAND
,
0
)
Duel
.
ConfirmCards
(
1
-
tp
,
hg
)
local
ct
=
Duel
.
SendtoDeck
(
hg
,
nil
,
0
,
REASON_EFFECT
)
Duel
.
SortDecktop
(
tp
,
tp
,
ct
)
end
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