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
d9777969
Commit
d9777969
authored
Dec 10, 2019
by
nekrozar
Committed by
DailyShana
Dec 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use Card.GetFieldId to simplify
c7532f0f
and
ce6dab4d
(#1261)
* use Card.GetFieldId * fix
parent
ce6dab4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
41 deletions
+16
-41
c10833828.lua
c10833828.lua
+11
-26
c4869446.lua
c4869446.lua
+5
-15
No files found.
c10833828.lua
View file @
d9777969
...
...
@@ -37,10 +37,6 @@ function c10833828.initial_effect(c)
e4
:
SetTarget
(
c10833828
.
damtg
)
e4
:
SetOperation
(
c10833828
.
damop
)
c
:
RegisterEffect
(
e4
)
local
ng
=
Group
.
CreateGroup
()
ng
:
KeepAlive
()
e2
:
SetLabelObject
(
ng
)
e3
:
SetLabelObject
(
ng
)
end
function
c10833828
.
spfilter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x10af
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP_DEFENSE
)
...
...
@@ -69,13 +65,7 @@ function c10833828.spop1(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
,
true
)
local
sg
=
e
:
GetLabelObject
()
if
c
:
GetFlagEffect
(
10833828
)
==
0
then
sg
:
Clear
()
c
:
RegisterFlagEffect
(
10833828
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
sg
:
AddCard
(
tc
)
tc
:
CreateRelation
(
c
,
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterFlagEffect
(
10833828
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
c
:
GetFieldId
())
end
Duel
.
SpecialSummonComplete
()
end
...
...
@@ -86,25 +76,22 @@ function c10833828.spfilter3(c,e,tp,m,f,chkf)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsRace
(
RACE_FIEND
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c10833828
.
spfilter4
(
c
,
tc
)
return
c
:
IsRelateToCard
(
tc
)
end
function
c10833828
.
fcheck1
(
g
)
function
c10833828
.
fcheck1
(
fid
)
return
function
(
tp
,
sg
,
fc
)
return
sg
:
IsExists
(
c10833828
.
fcheck2
,
1
,
nil
,
g
)
return
sg
:
IsExists
(
c10833828
.
fcheck2
,
1
,
nil
,
fid
)
end
end
function
c10833828
.
fcheck2
(
c
,
g
)
return
g
:
IsContains
(
c
)
function
c10833828
.
fcheck2
(
c
,
fid
)
for
_
,
flag
in
ipairs
({
c
:
GetFlagEffectLabel
(
10833828
)})
do
if
flag
==
fid
then
return
true
end
end
return
false
end
function
c10833828
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
c
=
e
:
GetHandler
()
local
g
=
e
:
GetLabelObject
():
Filter
(
c10833828
.
spfilter4
,
nil
,
c
)
if
c
:
GetFlagEffect
(
10833828
)
==
0
or
g
:
GetCount
()
==
0
then
return
false
end
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
aux
.
FCheckAdditional
=
c10833828
.
fcheck1
(
g
)
aux
.
FCheckAdditional
=
c10833828
.
fcheck1
(
e
:
GetHandler
():
GetFieldID
()
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c10833828
.
spfilter3
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
...
...
@@ -123,12 +110,10 @@ function c10833828.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c10833828
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
GetFlagEffect
(
10833828
)
==
0
then
return
end
local
g
=
e
:
GetLabelObject
():
Filter
(
c10833828
.
spfilter4
,
nil
,
e
:
GetHandler
())
if
g
:
GetCount
()
==
0
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c10833828
.
spfilter2
,
nil
,
e
)
aux
.
FCheckAdditional
=
c10833828
.
fcheck1
(
g
)
aux
.
FCheckAdditional
=
c10833828
.
fcheck1
(
c
:
GetFieldID
()
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c10833828
.
spfilter3
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
...
...
c4869446.lua
View file @
d9777969
...
...
@@ -19,31 +19,21 @@ function c4869446.initial_effect(c)
e3
:
SetTargetRange
(
LOCATION_MZONE
,
LOCATION_MZONE
)
e3
:
SetTarget
(
c4869446
.
postg
)
c
:
RegisterEffect
(
e3
)
local
ng
=
Group
.
CreateGroup
()
ng
:
KeepAlive
()
e2
:
SetLabelObject
(
ng
)
e3
:
SetLabelObject
(
ng
)
end
function
c4869446
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsPreviousPosition
(
POS_FACEDOWN
)
end
function
c4869446
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
sg
=
e
:
GetLabelObject
()
if
c
:
GetFlagEffect
(
4869446
)
==
0
then
sg
:
Clear
()
c
:
RegisterFlagEffect
(
4869446
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
local
g
=
eg
:
Filter
(
c4869446
.
cfilter
,
nil
)
local
tc
=
g
:
GetFirst
()
while
tc
do
sg
:
AddCard
(
tc
)
tc
:
CreateRelation
(
c
,
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterFlagEffect
(
4869446
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
e
:
GetHandler
():
GetFieldId
())
tc
=
g
:
GetNext
()
end
end
function
c4869446
.
postg
(
e
,
c
)
local
g
=
e
:
GetLabelObject
()
if
e
:
GetHandler
():
GetFlagEffect
(
4869446
)
==
0
or
g
:
GetCount
()
==
0
then
return
false
end
return
g
:
IsContains
(
c
)
and
c
:
IsRelateToCard
(
e
:
GetHandler
())
for
_
,
flag
in
ipairs
({
c
:
GetFlagEffectLabel
(
4869446
)})
do
if
flag
==
e
:
GetHandler
():
GetFieldId
()
then
return
true
end
end
return
false
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