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
八宫一月
ygopro-scripts
Commits
ca343b41
Commit
ca343b41
authored
Sep 04, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Summon Witch
parent
a2e1b60b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
25 deletions
+22
-25
c61665245.lua
c61665245.lua
+22
-25
No files found.
c61665245.lua
View file @
ca343b41
...
@@ -54,8 +54,13 @@ function c61665245.spfilter2(c,e,tp,lg)
...
@@ -54,8 +54,13 @@ function c61665245.spfilter2(c,e,tp,lg)
return
c
:
IsFaceup
()
and
lg
:
IsContains
(
c
)
and
Duel
.
IsExistingMatchingCard
(
c61665245
.
spfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetRace
())
return
c
:
IsFaceup
()
and
lg
:
IsContains
(
c
)
and
Duel
.
IsExistingMatchingCard
(
c61665245
.
spfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetRace
())
end
end
function
c61665245
.
spfilter3
(
c
,
e
,
tp
,
rac
)
function
c61665245
.
spfilter3
(
c
,
e
,
tp
,
rac
)
return
c
:
IsRace
(
rac
)
if
not
c
:
IsRace
(
rac
)
then
return
false
end
and
(
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
or
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
1
-
tp
))
local
ok
=
false
for
p
=
0
,
1
do
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
p
)
&
0xff
ok
=
ok
or
(
Duel
.
GetLocationCount
(
p
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
p
,
zone
))
end
return
ok
end
end
function
c61665245
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c61665245
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -64,9 +69,7 @@ function c61665245.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -64,9 +69,7 @@ function c61665245.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
zone
[
1
]
=
c
:
GetLinkedZone
(
1
)
zone
[
1
]
=
c
:
GetLinkedZone
(
1
)
local
lg
=
c
:
GetLinkedGroup
()
local
lg
=
c
:
GetLinkedGroup
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c61665245
.
spfilter2
(
chkc
,
e
,
tp
,
lg
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c61665245
.
spfilter2
(
chkc
,
e
,
tp
,
lg
)
end
if
chk
==
0
then
return
(
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
[
tp
])
>
0
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c61665245
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
,
tp
,
lg
)
end
or
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
[
1
-
tp
])
>
0
)
and
Duel
.
IsExistingTarget
(
c61665245
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
,
tp
,
lg
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c61665245
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
e
,
tp
,
lg
)
Duel
.
SelectTarget
(
tp
,
c61665245
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
e
,
tp
,
lg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
...
@@ -76,30 +79,24 @@ function c61665245.spop2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -76,30 +79,24 @@ function c61665245.spop2(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
c
:
IsRelateToEffect
(
e
)
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsFacedown
()
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsFacedown
()
then
return
end
local
zone
=
{}
local
zone
=
{}
local
ft
=
{}
local
flag
=
{}
flag
=
{}
for
p
=
0
,
1
do
for
p
=
0
,
1
do
zone
[
p
]
=
c
:
GetLinkedZone
(
p
)
zone
[
p
]
=
c
:
GetLinkedZone
(
p
)
&
0xff
ft
[
p
],
flag
[
p
]
=
Duel
.
GetLocationCount
(
p
,
LOCATION_MZONE
,
p
,
LOCATION_REASON_TOFIELD
,
zone
[
p
])
local
_
,
flag_tmp
=
Duel
.
GetLocationCount
(
p
,
LOCATION_MZONE
,
t
p
,
LOCATION_REASON_TOFIELD
,
zone
[
p
])
flag
[
p
]
=
(
~
flag
[
p
]
)
&
0x7f
flag
[
p
]
=
(
~
flag
_tmp
)
&
0x7f
end
end
if
ft
[
0
]
<=
0
and
ft
[
1
]
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c61665245
.
spfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
:
GetRace
())
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c61665245
.
spfilter3
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
:
GetRace
())
local
t
c
=
g
:
GetFirst
()
local
s
c
=
g
:
GetFirst
()
if
t
c
then
if
s
c
then
local
ava_zone
=
0
local
ava_zone
=
0
local
ava_zone_rev
=
0x00ff00ff
for
p
=
0
,
1
do
if
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
tp
,
zone
[
tp
])
then
if
sc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
p
,
zone
[
p
])
then
ava_zone
=
ava_zone
|
flag
[
tp
]
ava_zone
=
ava_zone
|
(
flag
[
p
]
<<
(
p
==
tp
and
0
or
16
))
ava_zone_rev
=
ava_zone_rev
&
(
~
flag
[
tp
])
end
end
if
tc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
1
-
tp
,
zone
[
1
-
tp
])
then
ava_zone
=
ava_zone
|
(
flag
[
1
-
tp
]
<<
16
)
ava_zone_rev
=
ava_zone_rev
&
(
~
(
flag
[
1
-
tp
]
<<
16
))
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
local
sel_zone
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
LOCATION_MZONE
,
ava_zone_rev
)
local
sel_zone
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
LOCATION_MZONE
,
0x00ff00ff
&
(
~
ava_zone
)
)
local
sump
=
0
local
sump
=
0
if
sel_zone
&
0xff
>
0
then
if
sel_zone
&
0xff
>
0
then
sump
=
tp
sump
=
tp
...
@@ -107,17 +104,17 @@ function c61665245.spop2(e,tp,eg,ep,ev,re,r,rp)
...
@@ -107,17 +104,17 @@ function c61665245.spop2(e,tp,eg,ep,ev,re,r,rp)
sump
=
1
-
tp
sump
=
1
-
tp
sel_zone
=
sel_zone
>>
16
sel_zone
=
sel_zone
>>
16
end
end
if
Duel
.
SpecialSummonStep
(
t
c
,
0
,
tp
,
sump
,
false
,
false
,
POS_FACEUP_DEFENSE
,
sel_zone
)
then
if
Duel
.
SpecialSummonStep
(
s
c
,
0
,
tp
,
sump
,
false
,
false
,
POS_FACEUP_DEFENSE
,
sel_zone
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
t
c
:
RegisterEffect
(
e1
)
s
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
t
c
:
RegisterEffect
(
e2
)
s
c
:
RegisterEffect
(
e2
)
Duel
.
SpecialSummonComplete
()
Duel
.
SpecialSummonComplete
()
end
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