Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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
Reinen
ygopro-scripts
Commits
744a8e5f
Commit
744a8e5f
authored
Dec 11, 2020
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix aux.SpiritReturnReg()
parent
466483cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
utility.lua
utility.lua
+16
-9
No files found.
utility.lua
View file @
744a8e5f
...
...
@@ -162,28 +162,35 @@ function Auxiliary.SpiritReturnReg(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0xd6e0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetCondition
(
Auxiliary
.
SpiritReturnCondition
)
e1
:
SetTarget
(
Auxiliary
.
SpiritReturnTarget
)
e1
:
SetCondition
(
Auxiliary
.
SpiritReturnCondition
1
)
e1
:
SetTarget
(
Auxiliary
.
SpiritReturnTarget
1
)
e1
:
SetOperation
(
Auxiliary
.
SpiritReturnOperation
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCondition
(
Auxiliary
.
SpiritReturnCondition2
)
e2
:
SetTarget
(
Auxiliary
.
SpiritReturnTarget2
)
c
:
RegisterEffect
(
e2
)
end
function
Auxiliary
.
SpiritReturnCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
Auxiliary
.
SpiritReturnCondition
1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsHasEffect
(
EFFECT_SPIRIT_DONOT_RETURN
)
then
return
false
end
if
e
:
IsHasType
(
EFFECT_TYPE_TRIGGER_F
)
then
return
not
c
:
IsHasEffect
(
EFFECT_SPIRIT_MAYNOT_RETURN
)
else
return
c
:
IsHasEffect
(
EFFECT_SPIRIT_MAYNOT_RETURN
)
end
return
not
c
:
IsHasEffect
(
EFFECT_SPIRIT_DONOT_RETURN
)
and
not
c
:
IsHasEffect
(
EFFECT_SPIRIT_MAYNOT_RETURN
)
end
function
Auxiliary
.
SpiritReturnTarget
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
Auxiliary
.
SpiritReturnTarget
1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
Auxiliary
.
SpiritReturnCondition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
not
c
:
IsHasEffect
(
EFFECT_SPIRIT_DONOT_RETURN
)
end
function
Auxiliary
.
SpiritReturnTarget2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
Auxiliary
.
SpiritReturnOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
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