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
nanahira
ygopro-scripts
Commits
fb9d9931
You need to sign in or sign up before continuing.
Commit
fb9d9931
authored
Mar 28, 2024
by
nanahira
Committed by
GitHub
Mar 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eratta サモン・ソーサレス (#2459)
parent
d8b52a05
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
93 deletions
+56
-93
c61665245.lua
c61665245.lua
+56
-93
No files found.
c61665245.lua
View file @
fb9d9931
...
...
@@ -6,109 +6,59 @@ function c61665245.initial_effect(c)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
61665245
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCondition
(
c61665245
.
spcon1
)
e1
:
SetTarget
(
c61665245
.
sptg1
)
e1
:
SetOperation
(
c61665245
.
spop1
)
e1
:
SetCountLimit
(
1
,
61665245
)
e1
:
SetCondition
(
c61665245
.
spcon
)
e1
:
SetTarget
(
c61665245
.
sptg
)
e1
:
SetOperation
(
c61665245
.
spop
)
c
:
RegisterEffect
(
e1
)
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
61665245
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
61665245
)
e2
:
SetTarget
(
c61665245
.
sptg2
)
e2
:
SetOperation
(
c61665245
.
spop2
)
c
:
RegisterEffect
(
e2
)
end
function
c61665245
.
lcheck
(
g
)
return
aux
.
SameValueCheck
(
g
,
Card
.
GetLinkRace
)
end
function
c61665245
.
spcon
1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c61665245
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c61665245
.
spfilter1
(
c
,
e
,
tp
,
zone
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
1
-
tp
,
zone
)
end
function
c61665245
.
sptg
1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c61665245
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
1
-
tp
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c61665245
.
spfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
zone
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c61665245
.
spop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
zone
=
e
:
GetHandler
():
GetLinkedZone
(
1
-
tp
)
if
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c61665245
.
spfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
zone
)
end
end
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
())
end
function
c61665245
.
spfilter_chkc
(
c
,
e
,
tp
,
lg
,
rc
)
return
c
:
IsFaceup
()
and
lg
:
IsContains
(
c
)
and
(
c
:
GetRace
()
&
rc
)
==
rc
function
c61665245
.
spfilter2
(
c
,
e
,
tp
,
rac
)
return
c
:
IsRace
(
rac
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
end
function
c61665245
.
spfilter3
(
c
,
e
,
tp
,
rac
)
if
not
c
:
IsRace
(
rac
)
then
return
false
end
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
function
c61665245
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
zone
=
{}
zone
[
0
]
=
c
:
GetLinkedZone
(
0
)
zone
[
1
]
=
c
:
GetLinkedZone
(
1
)
local
lg
=
c
:
GetLinkedGroup
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c61665245
.
spfilter_chkc
(
chkc
,
e
,
tp
,
lg
,
e
:
GetLabel
())
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c61665245
.
spfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
e
,
tp
,
lg
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g
=
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
)
e
:
SetLabel
(
g
:
GetFirst
():
GetRace
())
end
function
c61665245
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c61665245
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
not
c
:
IsRelateToEffect
(
e
)
or
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsFacedown
()
then
return
end
local
zone
=
{}
local
flag
=
{}
for
p
=
0
,
1
do
zone
[
p
]
=
c
:
GetLinkedZone
(
p
)
&
0xff
local
_
,
flag_tmp
=
Duel
.
GetLocationCount
(
p
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
[
p
])
flag
[
p
]
=
(
~
flag_tmp
)
&
0x7f
end
local
zone
=
c
:
GetLinkedZone
(
1
-
tp
)
if
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_MZONE
,
tp
,
LOCATION_REASON_TOFIELD
,
zone
)
<=
0
then
return
end
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
sc
=
g
:
GetFirst
()
if
sc
then
local
avail_zone
=
0
for
p
=
0
,
1
do
if
sc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
p
,
zone
[
p
])
then
avail_zone
=
avail_zone
|
(
flag
[
p
]
<<
(
p
==
tp
and
0
or
16
))
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOZONE
)
local
sel_zone
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
LOCATION_MZONE
,
0x00ff00ff
&
(
~
avail_zone
))
local
sump
=
0
if
sel_zone
&
0xff
>
0
then
sump
=
tp
else
sump
=
1
-
tp
sel_zone
=
sel_zone
>>
16
end
if
Duel
.
SpecialSummonStep
(
sc
,
0
,
tp
,
sump
,
false
,
false
,
POS_FACEUP_DEFENSE
,
sel_zone
)
then
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c61665245
.
spfilter1
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
zone
):
GetFirst
()
if
tc
and
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
1
-
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
,
zone
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
Duel
.
SpecialSummonComplete
()
local
g
=
Duel
.
GetMatchingGroup
(
c61665245
.
spfilter2
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
,
tp
,
tc
:
GetRace
())
if
#
g
>
0
and
Duel
.
GetMZoneCount
(
tp
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
61665245
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
if
Duel
.
SpecialSummonStep
(
sc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
...
...
@@ -120,7 +70,20 @@ function c61665245.spop2(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetValue
(
RESET_TURN_SET
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
sc
:
RegisterEffect
(
e2
)
end
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
1
,
0
)
e3
:
SetTarget
(
c61665245
.
splimit
)
e3
:
SetLabel
(
sc
:
GetOriginalRace
())
e3
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e3
,
tp
)
Duel
.
SpecialSummonComplete
()
end
end
end
end
function
c61665245
.
splimit
(
e
,
c
)
return
c
:
GetOriginalRace
()
&
e
:
GetLabel
()
==
0
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