Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
3
Merge Requests
3
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
MyCard
ygopro-scripts-888
Commits
296b3fd7
Commit
296b3fd7
authored
Dec 21, 2024
by
wind2009
Committed by
GitHub
Dec 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix select effect (#2786)
parent
5d391c54
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
15 deletions
+27
-15
c40456412.lua
c40456412.lua
+15
-7
c58143766.lua
c58143766.lua
+12
-8
No files found.
c40456412.lua
View file @
296b3fd7
...
...
@@ -36,29 +36,37 @@ end
function
c40456412
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g1
=
Duel
.
GetMatchingGroup
(
c40456412
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
c40456412
.
spfilter
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
)
local
b1
=
Duel
.
GetFlagEffect
(
tp
,
40456412
+
1
)
==
0
local
b1
=
(
Duel
.
GetFlagEffect
(
tp
,
40456412
+
1
)
==
0
or
not
e
:
IsCostChecked
())
and
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
local
b2
=
Duel
.
GetFlagEffect
(
tp
,
40456412
+
2
)
==
0
local
b2
=
(
Duel
.
GetFlagEffect
(
tp
,
40456412
+
2
)
==
0
or
not
e
:
IsCostChecked
())
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
and
Duel
.
IsExistingMatchingCard
(
c40456412
.
psfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
local
b3
=
Duel
.
GetFlagEffect
(
tp
,
40456412
+
3
)
==
0
local
b3
=
(
Duel
.
GetFlagEffect
(
tp
,
40456412
+
3
)
==
0
or
not
e
:
IsCostChecked
())
and
Duel
.
IsExistingMatchingCard
(
c40456412
.
ssfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
if
chk
==
0
then
return
b1
or
b2
or
b3
end
local
op
=
aux
.
SelectFromOptions
(
tp
,
{
b1
,
aux
.
Stringid
(
40456412
,
1
)},
{
b2
,
aux
.
Stringid
(
40456412
,
2
)},
{
b3
,
aux
.
Stringid
(
40456412
,
3
)})
Duel
.
RegisterFlagEffect
(
tp
,
40456412
+
op
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
if
e
:
IsCostChecked
()
then
Duel
.
RegisterFlagEffect
(
tp
,
40456412
+
op
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
if
op
==
1
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g1
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
)
e
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
if
e
:
IsCostChecked
()
then
e
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SPECIAL_SUMMON
)
end
e
:
SetOperation
(
c40456412
.
spop
)
elseif
op
==
2
then
e
:
SetCategory
(
0
)
if
e
:
IsCostChecked
()
then
e
:
SetCategory
(
0
)
end
e
:
SetOperation
(
c40456412
.
psop
)
else
e
:
SetCategory
(
0
)
if
e
:
IsCostChecked
()
then
e
:
SetCategory
(
0
)
end
e
:
SetOperation
(
c40456412
.
ssop
)
end
end
...
...
c58143766.lua
View file @
296b3fd7
...
...
@@ -19,24 +19,28 @@ function s.dfilter(c,tp)
end
function
s
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
s
.
dfilter
(
chkc
,
tp
)
end
local
b1
=
Duel
.
GetFlagEffect
(
tp
,
id
)
==
0
local
b1
=
(
Duel
.
GetFlagEffect
(
tp
,
id
)
==
0
or
not
e
:
IsCostChecked
())
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
local
b2
=
Duel
.
GetFlagEffect
(
tp
,
id
+
o
)
==
0
local
b2
=
(
Duel
.
GetFlagEffect
(
tp
,
id
+
o
)
==
0
or
not
e
:
IsCostChecked
())
and
Duel
.
IsExistingTarget
(
s
.
dfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
if
chk
==
0
then
return
b1
or
b2
end
local
op
=
aux
.
SelectFromOptions
(
tp
,{
b1
,
aux
.
Stringid
(
id
,
0
)},{
b2
,
aux
.
Stringid
(
id
,
1
)})
if
op
==
1
then
e
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
)
e
:
SetProperty
(
0
)
if
e
:
IsCostChecked
()
then
e
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
+
CATEGORY_SPECIAL_SUMMON
)
e
:
SetProperty
(
0
)
Duel
.
RegisterFlagEffect
(
tp
,
id
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
e
:
SetOperation
(
s
.
sop
)
Duel
.
RegisterFlagEffect
(
tp
,
id
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
else
e
:
SetCategory
(
CATEGORY_DAMAGE
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
if
e
:
IsCostChecked
()
then
e
:
SetCategory
(
CATEGORY_DAMAGE
)
e
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
Duel
.
RegisterFlagEffect
(
tp
,
id
+
o
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
e
:
SetOperation
(
s
.
dop
)
Duel
.
RegisterFlagEffect
(
tp
,
id
+
o
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
tc
=
Duel
.
SelectTarget
(
tp
,
s
.
dfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
):
GetFirst
()
local
atk
=
tc
:
GetBaseAttack
()
...
...
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