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
891444b1
Commit
891444b1
authored
Apr 14, 2018
by
nanahira
Committed by
GitHub
Apr 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tune magician check using Card.IsHasEffect (#1017)
parent
5f197f2d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
c31111109.lua
c31111109.lua
+1
-1
c73941492.lua
c73941492.lua
+7
-6
utility.lua
utility.lua
+16
-6
No files found.
c31111109.lua
View file @
891444b1
...
...
@@ -44,7 +44,7 @@ function c31111109.fselect(c,tp,mg,sg)
return
res
end
function
c31111109
.
fgoal
(
tp
,
sg
)
if
sg
:
IsExists
(
aux
.
FCheckTuneMagicianX
,
1
,
nil
,
sg
)
then
return
false
end
if
sg
:
IsExists
(
aux
.
TuneMagicianCheckX
,
1
,
nil
,
sg
,
EFFECT_TUNE_MAGICIAN_F
)
then
return
false
end
if
not
(
sg
:
GetCount
()
==
5
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
)
>
0
)
then
return
false
end
local
g1
=
sg
:
Filter
(
Card
.
IsFusionSetCard
,
nil
,
0x9
)
local
c1
=
g1
:
GetCount
()
...
...
c73941492.lua
View file @
891444b1
...
...
@@ -34,6 +34,7 @@ function c73941492.initial_effect(c)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_TUNE_MAGICIAN_F
)
e5
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e5
:
SetValue
(
c73941492
.
fuslimit
)
c
:
RegisterEffect
(
e5
)
--xyz limit
local
e6
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -57,6 +58,12 @@ end
function
c73941492
.
synlimit
(
e
,
c
)
return
c
:
IsSetCard
(
0x98
)
and
c
:
IsType
(
TYPE_PENDULUM
)
end
function
c73941492
.
fuslimit
(
e
,
c
)
return
not
(
c
:
IsSetCard
(
0x98
)
and
c
:
IsType
(
TYPE_PENDULUM
))
end
function
c73941492
.
xyzlimit
(
e
,
c
)
return
not
(
c
:
IsSetCard
(
0x98
)
and
c
:
IsType
(
TYPE_PENDULUM
))
end
function
c73941492
.
atkfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x98
)
and
c
:
IsType
(
TYPE_PENDULUM
)
end
...
...
@@ -104,9 +111,3 @@ function c73941492.spop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
SpecialSummonComplete
()
end
end
function
c73941492
.
fuslimit
(
c
)
return
not
(
c
:
IsSetCard
(
0x98
)
and
c
:
IsType
(
TYPE_PENDULUM
))
end
function
c73941492
.
xyzlimit
(
e
,
c
)
return
not
(
c
:
IsSetCard
(
0x98
)
and
c
:
IsType
(
TYPE_PENDULUM
))
end
utility.lua
View file @
891444b1
...
...
@@ -501,6 +501,18 @@ function Auxiliary.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat)
end
return
true
end
--Checking Tune Magician
function
Auxiliary
.
TuneMagicianFilter
(
c
,
e
)
local
f
=
e
:
GetValue
()
return
f
(
e
,
c
)
end
function
Auxiliary
.
TuneMagicianCheckX
(
c
,
sg
,
ecode
)
local
eset
=
{
c
:
IsHasEffect
(
ecode
)}
for
_
,
te
in
pairs
(
eset
)
do
if
sg
:
IsExists
(
Auxiliary
.
TuneMagicianFilter
,
1
,
c
,
te
)
then
return
true
end
end
return
false
end
function
Auxiliary
.
XyzAlterFilter
(
c
,
alterf
,
xyzc
,
e
,
tp
,
op
)
return
alterf
(
c
)
and
c
:
IsCanBeXyzMaterial
(
xyzc
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
xyzc
)
>
0
and
(
not
op
or
op
(
e
,
tp
,
0
,
c
))
end
...
...
@@ -723,6 +735,7 @@ function Auxiliary.XyzLevelFreeCheck(c,tp,xyzc,mg,sg,gf,minc,maxc)
return
res
end
function
Auxiliary
.
XyzLevelFreeGoal
(
g
,
tp
,
xyzc
,
gf
)
if
g
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
g
,
EFFECT_TUNE_MAGICIAN_X
)
then
return
false
end
return
(
not
gf
or
gf
(
g
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
xyzc
)
>
0
end
function
Auxiliary
.
XyzLevelFreeCondition
(
f
,
gf
,
minct
,
maxct
)
...
...
@@ -1055,13 +1068,10 @@ function Auxiliary.FCheckMix(c,mg,sg,fc,sub,fun1,fun2,...)
return
fun1
(
c
,
fc
,
sub
,
mg
,
sg
)
end
end
function
Auxiliary
.
FCheckTuneMagicianX
(
c
,
sg
)
return
c
:
IsHasEffect
(
EFFECT_TUNE_MAGICIAN_F
)
and
sg
:
IsExists
(
c
.
fuslimit
,
1
,
c
)
end
--if sg1 is subset of sg2 then not Auxiliary.FCheckAdditional(tp,sg1,fc) -> not Auxiliary.FCheckAdditional(tp,sg2,fc)
Auxiliary
.
FCheckAdditional
=
nil
function
Auxiliary
.
FCheckMixGoal
(
tp
,
sg
,
fc
,
sub
,
chkf
,
...
)
if
sg
:
IsExists
(
Auxiliary
.
FCheckTuneMagicianX
,
1
,
nil
,
sg
)
then
return
false
end
if
sg
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
sg
,
EFFECT_TUNE_MAGICIAN_F
)
then
return
false
end
if
not
Auxiliary
.
MustMaterialCheck
(
sg
,
tp
,
EFFECT_MUST_BE_FMATERIAL
)
then
return
false
end
local
g
=
Group
.
CreateGroup
()
return
sg
:
IsExists
(
Auxiliary
.
FCheckMix
,
1
,
nil
,
sg
,
g
,
fc
,
sub
,
...
)
and
(
chkf
==
PLAYER_NONE
or
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
sg
,
fc
)
>
0
)
...
...
@@ -1171,7 +1181,7 @@ function Auxiliary.FCheckMixRepFilter(c,sg,g,fc,sub,chkf,fun1,minc,maxc,fun2,...
return
false
end
function
Auxiliary
.
FCheckMixRepGoal
(
tp
,
sg
,
fc
,
sub
,
chkf
,
fun1
,
minc
,
maxc
,
...
)
if
sg
:
IsExists
(
Auxiliary
.
FCheckTuneMagicianX
,
1
,
nil
,
sg
)
then
return
false
end
if
sg
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
sg
,
EFFECT_TUNE_MAGICIAN_F
)
then
return
false
end
if
not
Auxiliary
.
MustMaterialCheck
(
sg
,
tp
,
EFFECT_MUST_BE_FMATERIAL
)
then
return
false
end
if
sg
:
GetCount
()
<
minc
+#
{
...
}
or
sg
:
GetCount
()
>
maxc
+#
{
...
}
then
return
false
end
local
g
=
Group
.
CreateGroup
()
...
...
@@ -1358,7 +1368,7 @@ function Auxiliary.FShaddollSpFilter1(c,tp,mg,exg,attr)
end
function
Auxiliary
.
FShaddollSpFilter2
(
c
,
tp
,
mc
,
attr
)
local
sg
=
Group
.
FromCards
(
c
,
mc
)
if
sg
:
IsExists
(
Auxiliary
.
FCheckTuneMagicianX
,
1
,
nil
,
sg
)
then
return
false
end
if
sg
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
sg
,
EFFECT_TUNE_MAGICIAN_F
)
then
return
false
end
if
not
Auxiliary
.
MustMaterialCheck
(
sg
,
tp
,
EFFECT_MUST_BE_FMATERIAL
)
then
return
false
end
return
((
Auxiliary
.
FShaddollFilter1
(
c
)
and
Auxiliary
.
FShaddollFilter2
(
mc
,
attr
))
or
(
Auxiliary
.
FShaddollFilter2
(
c
,
attr
)
and
Auxiliary
.
FShaddollFilter1
(
mc
)))
...
...
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