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
01b941b4
Commit
01b941b4
authored
Mar 20, 2015
by
salix5
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1201 from DailyShana/patch-4
fix draw check
parents
a845e243
ec1f86ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
script/c41510920.lua
script/c41510920.lua
+1
-1
script/c42548470.lua
script/c42548470.lua
+3
-2
script/c5795980.lua
script/c5795980.lua
+2
-2
No files found.
script/c41510920.lua
View file @
01b941b4
...
...
@@ -24,7 +24,7 @@ function c41510920.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c41510920
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsDestructable
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
...
...
script/c42548470.lua
View file @
01b941b4
...
...
@@ -2,6 +2,7 @@
function
c42548470
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
...
...
@@ -43,7 +44,7 @@ function c42548470.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
lv1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc2
:
RegisterEffect
(
e1
)
if
lv1
<
lv2
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
if
lv1
<
lv2
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
42548470
,
0
))
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
else
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -51,7 +52,7 @@ function c42548470.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetValue
(
lv2
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc1
:
RegisterEffect
(
e1
)
if
lv2
<
lv1
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
if
lv2
<
lv1
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
42548470
,
0
))
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
end
script/c5795980.lua
View file @
01b941b4
...
...
@@ -2,7 +2,7 @@
function
c5795980
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetCategory
(
CATEGORY_DISABLE
+
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
...
...
@@ -44,7 +44,7 @@ end
function
c5795980
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c5795980
.
tgfilter
(
chkc
,
e
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
==
0
then
return
false
end
if
not
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
then
return
false
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
local
rg
=
Duel
.
GetReleaseGroup
(
tp
)
...
...
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