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
3c125543
Commit
3c125543
authored
Feb 05, 2025
by
Nanahira
Committed by
GitHub
Feb 05, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19 from mycard/develop-8888
Develop 8888
parents
700d4264
621bdcd9
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
196 additions
and
250 deletions
+196
-250
c15310033.lua
c15310033.lua
+1
-1
c16240772.lua
c16240772.lua
+2
-1
c22398665.lua
c22398665.lua
+1
-1
c2674965.lua
c2674965.lua
+1
-1
c31111109.lua
c31111109.lua
+1
-1
c33787730.lua
c33787730.lua
+3
-15
c39354437.lua
c39354437.lua
+1
-1
c48452496.lua
c48452496.lua
+2
-2
c70491413.lua
c70491413.lua
+5
-1
c75366958.lua
c75366958.lua
+1
-1
c81096431.lua
c81096431.lua
+129
-6
c85065943.lua
c85065943.lua
+1
-0
c86466163.lua
c86466163.lua
+1
-1
c91110378.lua
c91110378.lua
+2
-5
c9190563.lua
c9190563.lua
+5
-1
c92487128.lua
c92487128.lua
+1
-1
c94415058.lua
c94415058.lua
+1
-1
c96029570.lua
c96029570.lua
+1
-1
c9763474.lua
c9763474.lua
+2
-0
constant.lua
constant.lua
+2
-1
procedure.lua
procedure.lua
+0
-182
utility.lua
utility.lua
+33
-26
No files found.
c15310033.lua
View file @
3c125543
...
@@ -7,7 +7,7 @@ function c15310033.initial_effect(c)
...
@@ -7,7 +7,7 @@ function c15310033.initial_effect(c)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
15310033
+
EFFECT_COUNT_CODE_DUEL
)
e1
:
SetCountLimit
(
1
,
15310033
+
EFFECT_COUNT_CODE_
OATH
+
EFFECT_COUNT_CODE_
DUEL
)
e1
:
SetCondition
(
c15310033
.
spcon
)
e1
:
SetCondition
(
c15310033
.
spcon
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
...
...
c16240772.lua
View file @
3c125543
...
@@ -55,13 +55,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -55,13 +55,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
dfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
dfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
tc
:
IsFaceup
()
and
#
g
>
0
then
if
tc
:
IsFaceup
()
and
#
g
>
0
then
if
chk
then
Duel
.
BreakEffect
()
end
if
chk
then
Duel
.
BreakEffect
()
end
local
atkd
=
tc
:
GetAttack
()
local
dg
=
Group
.
CreateGroup
()
local
dg
=
Group
.
CreateGroup
()
for
sc
in
aux
.
Next
(
g
)
do
for
sc
in
aux
.
Next
(
g
)
do
local
patk
=
sc
:
GetAttack
()
local
patk
=
sc
:
GetAttack
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
tc
:
GetAttack
()
)
e1
:
SetValue
(
-
atkd
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
sc
:
RegisterEffect
(
e1
)
sc
:
RegisterEffect
(
e1
)
if
patk
~=
0
and
sc
:
IsAttack
(
0
)
then
dg
:
AddCard
(
sc
)
end
if
patk
~=
0
and
sc
:
IsAttack
(
0
)
then
dg
:
AddCard
(
sc
)
end
...
...
c22398665.lua
View file @
3c125543
...
@@ -35,7 +35,7 @@ end
...
@@ -35,7 +35,7 @@ end
function
c22398665
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c22398665
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsAttackAbove
(
1000
)
then
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsAttackAbove
(
1000
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
...
c2674965.lua
View file @
3c125543
...
@@ -75,7 +75,7 @@ end
...
@@ -75,7 +75,7 @@ end
function
s
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
rc
=
re
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
return
rc
:
IsAllTypes
(
TYPE_TRAP
+
TYPE_CONTINUOUS
)
and
re
:
GetActivateLocation
()
==
LOCATION_MZONE
return
rc
:
IsAllTypes
(
TYPE_TRAP
+
TYPE_CONTINUOUS
)
and
re
:
GetActivateLocation
()
==
LOCATION_MZONE
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
s
.
cfilter2
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
rp
==
tp
end
end
function
s
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
aux
.
NegateAnyFilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
aux
.
NegateAnyFilter
(
chkc
)
end
...
...
c31111109.lua
View file @
3c125543
...
@@ -80,7 +80,7 @@ function c31111109.rstop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -80,7 +80,7 @@ function c31111109.rstop(e,tp,eg,ep,ev,re,r,rp)
atke
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
atke
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
end
end
c
:
ResetEffect
(
cid
,
RESET_COPY
)
c
:
ResetEffect
(
cid
,
RESET_COPY
)
c
:
ResetEffect
(
RESET_DISABLE
,
RESET_EVENT
)
c
:
ResetEffect
(
RESET_DISABLE
,
RESET_EVENT
+
RESETS_STANDARD
)
if
atke
then
if
atke
then
atke
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
atke
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
)
end
end
...
...
c33787730.lua
View file @
3c125543
...
@@ -65,28 +65,16 @@ end
...
@@ -65,28 +65,16 @@ end
function
s
.
filter
(
c
)
function
s
.
filter
(
c
)
return
c
:
IsCanOverlay
()
and
c
:
IsFaceup
()
return
c
:
IsCanOverlay
()
and
c
:
IsFaceup
()
end
end
function
s
.
fselect
(
sg
,
tp
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
mg
:
CheckSubGroup
(
s
.
matfilter
,
1
,
#
mg
,
tp
,
sg
)
end
function
s
.
matfilter
(
sg
,
tp
,
g
)
if
sg
:
Filter
(
Card
.
IsSetCard
,
nil
,
0x1be
):
GetCount
()
==
0
then
return
false
end
return
Duel
.
IsExistingMatchingCard
(
s
.
xyzfilter1
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
sg
)
end
function
s
.
xyzfilter1
(
c
,
mg
)
return
c
:
IsXyzSummonable
(
mg
,
#
mg
,
#
mg
)
end
function
s
.
xyztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
xyztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
mg
:
CheckSubGroup
(
s
.
fselect
,
1
,
mg
:
GetCount
(),
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
xyzfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
mg
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
s
.
xyzfilter2
(
c
,
mg
)
function
s
.
xyzfilter2
(
c
,
mg
)
return
mg
:
CheckSubGroup
(
s
.
gselect
,
1
,
#
mg
,
c
)
return
c
:
IsType
(
TYPE_XYZ
)
and
mg
:
CheckSubGroup
(
s
.
gselect
,
1
,
#
mg
,
c
)
end
end
function
s
.
gselect
(
sg
,
c
)
function
s
.
gselect
(
sg
,
c
)
if
sg
:
Filter
(
Card
.
IsSetCard
,
nil
,
0x1be
):
GetCount
()
==
0
then
return
false
end
return
sg
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x1be
)
and
c
:
IsXyzSummonable
(
sg
,
#
sg
,
#
sg
)
return
c
:
IsXyzSummonable
(
sg
,
#
sg
,
#
sg
)
end
end
function
s
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
...
...
c39354437.lua
View file @
3c125543
...
@@ -20,7 +20,7 @@ function c39354437.initial_effect(c)
...
@@ -20,7 +20,7 @@ function c39354437.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e3
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
39354438
+
EFFECT_COUNT_CODE_SINGLE
)
e3
:
SetCountLimit
(
1
,
39354438
)
e3
:
SetCondition
(
c39354437
.
spcon1
)
e3
:
SetCondition
(
c39354437
.
spcon1
)
e3
:
SetTarget
(
c39354437
.
sptg
)
e3
:
SetTarget
(
c39354437
.
sptg
)
e3
:
SetOperation
(
c39354437
.
spop
)
e3
:
SetOperation
(
c39354437
.
spop
)
...
...
c48452496.lua
View file @
3c125543
...
@@ -42,8 +42,8 @@ end
...
@@ -42,8 +42,8 @@ end
function
s
.
filter
(
c
,
tp
)
function
s
.
filter
(
c
,
tp
)
local
r
=
LOCATION_REASON_TOFIELD
local
r
=
LOCATION_REASON_TOFIELD
if
not
c
:
IsControler
(
c
:
GetOwner
())
then
r
=
LOCATION_REASON_CONTROL
end
if
not
c
:
IsControler
(
c
:
GetOwner
())
then
r
=
LOCATION_REASON_CONTROL
end
return
(
c
:
Is
Type
(
TYPE_MONSTER
)
or
c
:
IsLocation
(
LOCATION_MZONE
))
and
c
:
IsFaceupEx
(
)
return
(
c
:
Is
Location
(
LOCATION_MZONE
)
or
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
c
:
GetOwner
())
)
and
Duel
.
GetLocationCount
(
c
:
GetOwner
(),
LOCATION_SZONE
,
tp
,
r
)
>
0
and
c
:
IsFaceupEx
()
and
Duel
.
GetLocationCount
(
c
:
GetOwner
(),
LOCATION_SZONE
,
tp
,
r
)
>
0
end
end
function
s
.
mvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
mvtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_MZONE
)
and
s
.
filter
(
chkc
,
tp
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_MZONE
)
and
s
.
filter
(
chkc
,
tp
)
end
...
...
c70491413.lua
View file @
3c125543
...
@@ -34,7 +34,11 @@ end
...
@@ -34,7 +34,11 @@ end
function
c70491413
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c70491413
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
cl
=
Duel
.
GetCurrentChain
()
local
cl
=
Duel
.
GetCurrentChain
()
if
cl
>=
2
then
if
cl
>=
2
then
Duel
.
SortDecktop
(
tp
,
tp
,
cl
)
Duel
.
ConfirmDecktop
(
tp
,
cl
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
cl
)
if
g
:
GetCount
()
>
0
then
Duel
.
SortDecktop
(
tp
,
tp
,
g
:
GetCount
())
end
end
end
if
cl
>=
3
then
if
cl
>=
3
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
...
...
c75366958.lua
View file @
3c125543
...
@@ -7,7 +7,7 @@ function c75366958.initial_effect(c)
...
@@ -7,7 +7,7 @@ function c75366958.initial_effect(c)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
75366958
+
EFFECT_COUNT_CODE_DUEL
)
e1
:
SetCountLimit
(
1
,
75366958
+
EFFECT_COUNT_CODE_
OATH
+
EFFECT_COUNT_CODE_
DUEL
)
e1
:
SetCondition
(
c75366958
.
spcon
)
e1
:
SetCondition
(
c75366958
.
spcon
)
e1
:
SetOperation
(
c75366958
.
spop
)
e1
:
SetOperation
(
c75366958
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
...
c81096431.lua
View file @
3c125543
...
@@ -17,10 +17,8 @@ function s.initial_effect(c)
...
@@ -17,10 +17,8 @@ function s.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EFFECT_TREAT_AS_2_XMATERIAL
)
e2
:
SetCode
(
id
)
e2
:
SetValue
(
id
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
0xff
)
e2
:
SetTarget
(
s
.
sxyzfilter
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--material effect
--material effect
...
@@ -35,9 +33,134 @@ function s.initial_effect(c)
...
@@ -35,9 +33,134 @@ function s.initial_effect(c)
e3
:
SetTarget
(
s
.
xyztg
)
e3
:
SetTarget
(
s
.
xyztg
)
e3
:
SetOperation
(
s
.
xyzop
)
e3
:
SetOperation
(
s
.
xyzop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
if
not
s
.
global_check
then
s
.
global_check
=
true
Drake_shark_AddXyzProcedure
=
aux
.
AddXyzProcedure
function
aux
.
AddXyzProcedure
(
card_c
,
function_f
,
int_lv
,
int_ct
,
function_alterf
,
int_dese
,
int_maxc
,
function_op
)
if
card_c
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
int_ct
>=
3
then
if
function_alterf
then
Drake_shark_XyzLevelFreeOperationAlter
=
Auxiliary
.
XyzLevelFreeOperationAlter
function
Auxiliary
.
XyzLevelFreeOperationAlter
(
f
,
gf
,
minc
,
maxc
,
alterf
,
alterdesc
,
alterop
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
if
og
:
GetCount
()
==
minc
and
og
:
IsExists
(
s
.
xfilter
,
1
,
nil
)
then
local
ttc
=
og
:
Filter
(
s
.
xfilter
,
nil
):
GetFirst
()
local
tte
=
ttc
:
IsHasEffect
(
id
,
tp
)
tte
:
UseCountLimit
(
tp
)
end
local
sg
=
Group
.
CreateGroup
()
local
tc
=
og
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
og
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
og
)
Duel
.
Overlay
(
c
,
og
)
else
local
mg
=
e
:
GetLabelObject
()
if
mg
:
GetCount
()
==
minc
and
mg
:
IsExists
(
s
.
xfilter
,
1
,
nil
)
then
local
ttc
=
mg
:
Filter
(
s
.
xfilter
,
nil
):
GetFirst
()
local
tte
=
ttc
:
IsHasEffect
(
id
,
tp
)
tte
:
UseCountLimit
(
tp
)
end
if
e
:
GetLabel
()
==
1
then
local
mg2
=
mg
:
GetFirst
():
GetOverlayGroup
()
if
mg2
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
mg2
)
end
else
local
sg
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
mg
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
end
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
mg
:
DeleteGroup
()
end
end
end
aux
.
AddXyzProcedureLevelFree
(
card_c
,
s
.
f
(
function_f
,
int_lv
,
card_c
),
s
.
gf
(
int_ct
,
card_c
:
GetOwner
()),
int_ct
-
1
,
int_ct
,
function_alterf
,
int_dese
,
function_op
)
Auxiliary
.
XyzLevelFreeOperationAlter
=
Drake_shark_XyzLevelFreeOperationAlter
else
Drake_shark_XyzLevelFreeOperation
=
Auxiliary
.
XyzLevelFreeOperation
function
Auxiliary
.
XyzLevelFreeOperation
(
f
,
gf
,
minct
,
maxct
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
if
og
:
GetCount
()
==
minct
and
og
:
IsExists
(
s
.
xfilter
,
1
,
nil
)
then
local
ttc
=
og
:
Filter
(
s
.
xfilter
,
nil
):
GetFirst
()
local
tte
=
ttc
:
IsHasEffect
(
id
,
tp
)
tte
:
UseCountLimit
(
tp
)
end
local
sg
=
Group
.
CreateGroup
()
local
tc
=
og
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
og
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
og
)
Duel
.
Overlay
(
c
,
og
)
else
local
mg
=
e
:
GetLabelObject
()
if
mg
:
GetCount
()
==
minct
and
mg
:
IsExists
(
s
.
xfilter
,
1
,
nil
)
then
local
ttc
=
mg
:
Filter
(
s
.
xfilter
,
nil
):
GetFirst
()
local
tte
=
ttc
:
IsHasEffect
(
id
,
tp
)
tte
:
UseCountLimit
(
tp
)
end
if
e
:
GetLabel
()
==
1
then
local
mg2
=
mg
:
GetFirst
():
GetOverlayGroup
()
if
mg2
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
mg2
)
end
else
local
sg
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
mg
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
end
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
mg
:
DeleteGroup
()
end
end
end
aux
.
AddXyzProcedureLevelFree
(
card_c
,
s
.
f
(
function_f
,
int_lv
,
card_c
),
s
.
gf
(
int_ct
,
card_c
:
GetOwner
()),
int_ct
-
1
,
int_ct
)
Auxiliary
.
XyzLevelFreeOperation
=
Drake_shark_XyzLevelFreeOperation
end
else
if
function_alterf
then
Drake_shark_AddXyzProcedure
(
card_c
,
function_f
,
int_lv
,
int_ct
,
function_alterf
,
int_dese
,
int_maxc
,
function_op
)
else
Drake_shark_AddXyzProcedure
(
card_c
,
function_f
,
int_lv
,
int_ct
,
nil
,
nil
,
int_maxc
,
nil
)
end
end
end
end
end
function
s
.
f
(
function_f
,
int_lv
,
card_c
)
return
function
(
c
)
return
c
:
IsXyzLevel
(
card_c
,
int_lv
)
and
(
not
function_f
or
function_f
(
c
))
end
end
function
s
.
gf
(
int_ct
,
int_tp
)
return
function
(
g
)
return
g
:
GetCount
()
==
int_ct
or
g
:
GetCount
()
==
int_ct
-
1
and
g
:
IsExists
(
s
.
xfilter
,
1
,
nil
,
int_tp
)
end
end
end
function
s
.
sxyzfilter
(
e
,
c
)
function
s
.
xfilter
(
c
,
tp
)
return
c
:
Is
Attribute
(
ATTRIBUTE_WATER
)
return
c
:
Is
HasEffect
(
id
,
tp
)
end
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsReason
(
REASON_DRAW
)
return
not
e
:
GetHandler
():
IsReason
(
REASON_DRAW
)
...
...
c85065943.lua
View file @
3c125543
...
@@ -36,6 +36,7 @@ function s.initial_effect(c)
...
@@ -36,6 +36,7 @@ function s.initial_effect(c)
e3
:
SetOperation
(
s
.
spop
)
e3
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
s
.
material_type
=
TYPE_SYNCHRO
function
s
.
mfilter1
(
c
)
function
s
.
mfilter1
(
c
)
return
c
:
IsLevelAbove
(
6
)
and
c
:
IsFusionType
(
TYPE_FUSION
)
return
c
:
IsLevelAbove
(
6
)
and
c
:
IsFusionType
(
TYPE_FUSION
)
end
end
...
...
c86466163.lua
View file @
3c125543
...
@@ -34,5 +34,5 @@ function c86466163.xyztg(e,c)
...
@@ -34,5 +34,5 @@ function c86466163.xyztg(e,c)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsSetCard
(
0x9c
)
return
c
:
IsLevelBelow
(
4
)
and
c
:
IsSetCard
(
0x9c
)
end
end
function
c86466163
.
xyzlv
(
e
,
c
,
rc
)
function
c86466163
.
xyzlv
(
e
,
c
,
rc
)
return
0x30050000
+
c
:
GetLevel
(
)
return
0x30050000
|
aux
.
GetCappedXyzLevel
(
c
)
end
end
c91110378.lua
View file @
3c125543
...
@@ -6,8 +6,8 @@ function c91110378.initial_effect(c)
...
@@ -6,8 +6,8 @@ function c91110378.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
EFFECT_XYZ_
LEVEL
)
e1
:
SetCode
(
EFFECT_XYZ_
MIN_COUNT
)
e1
:
SetValue
(
c91110378
.
xyz_level
)
e1
:
SetValue
(
3
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--spsummon
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
...
@@ -25,9 +25,6 @@ function c91110378.initial_effect(c)
...
@@ -25,9 +25,6 @@ function c91110378.initial_effect(c)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c91110378
.
xyz_level
(
e
,
c
,
rc
)
return
0x3000
+
c
:
GetLevel
()
end
function
c91110378
.
cfilter
(
c
,
tp
)
function
c91110378
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x86
)
and
c
:
IsSummonPlayer
(
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x86
)
and
c
:
IsSummonPlayer
(
tp
)
end
end
...
...
c9190563.lua
View file @
3c125543
...
@@ -31,11 +31,15 @@ function c9190563.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -31,11 +31,15 @@ function c9190563.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9190563
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c9190563
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c9190563
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c9190563
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetFirst
()
==
e
:
GetHandler
()
then
e
:
GetHandler
():
ReleaseEffectRelation
(
e
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
c9190563
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c9190563
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
local
c
=
e
:
GetHandler
()
if
tc
:
IsRelateToChain
()
or
(
tc
==
c
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
GetReasonEffect
()
==
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
c92487128.lua
View file @
3c125543
...
@@ -90,7 +90,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -90,7 +90,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RELEASE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
rfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
aux
.
ExceptThisCard
(
e
),
tp
,
c
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
rfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
aux
.
ExceptThisCard
(
e
),
tp
,
c
)
if
Duel
.
Release
(
g
,
REASON_EFFECT
)
and
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
if
Duel
.
Release
(
g
,
REASON_EFFECT
)
~=
0
and
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
SUMMON_TYPE_RITUAL
,
tp
,
tp
,
true
,
true
,
POS_FACEUP
)
~=
0
then
c
:
CompleteProcedure
()
c
:
CompleteProcedure
()
if
Duel
.
IsExistingMatchingCard
(
s
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
if
Duel
.
IsExistingMatchingCard
(
s
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
s
.
pfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
and
Duel
.
IsExistingMatchingCard
(
s
.
pfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
tp
)
...
...
c94415058.lua
View file @
3c125543
...
@@ -57,7 +57,7 @@ end
...
@@ -57,7 +57,7 @@ end
function
c94415058
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c94415058
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
local
tc
=
eg
:
GetFirst
()
if
eg
:
GetCount
()
==
1
and
rp
==
1
-
tp
and
tc
:
IsReason
(
REASON_EFFECT
)
if
eg
:
GetCount
()
==
1
and
rp
==
1
-
tp
and
tc
:
IsReason
(
REASON_EFFECT
)
and
tc
:
IsPreviousControler
(
tp
)
and
tc
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
tc
:
IsPreviousControler
(
tp
)
and
tc
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
tc
:
IsPreviousPosition
(
POS_FACEUP
)
and
tc
:
IsType
(
TYPE_PENDULUM
)
and
tc
:
IsControler
(
tp
)
then
and
tc
:
IsType
(
TYPE_PENDULUM
)
and
tc
:
IsControler
(
tp
)
then
e
:
SetLabel
(
tc
:
GetCode
())
e
:
SetLabel
(
tc
:
GetCode
())
return
true
return
true
...
...
c96029570.lua
View file @
3c125543
...
@@ -83,7 +83,7 @@ function s.autg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -83,7 +83,7 @@ function s.autg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function
s
.
auop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
auop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetTargetsRelateToChain
():
GetFirst
()
local
tc
=
Duel
.
GetTargetsRelateToChain
():
GetFirst
()
if
tc
:
IsFaceup
()
then
if
tc
and
tc
:
IsFaceup
()
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
...
...
c9763474.lua
View file @
3c125543
...
@@ -43,6 +43,8 @@ function s.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -43,6 +43,8 @@ function s.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel
.
SelectTarget
(
tp
,
s
.
atkcheck
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
atk
)
Duel
.
SelectTarget
(
tp
,
s
.
atkcheck
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
atk
)
if
race
==
RACE_REPTILE
then
if
race
==
RACE_REPTILE
then
e
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DRAW
)
e
:
SetCategory
(
CATEGORY_ATKCHANGE
+
CATEGORY_DRAW
)
else
e
:
SetCategory
(
CATEGORY_ATKCHANGE
)
end
end
end
end
function
s
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
constant.lua
View file @
3c125543
...
@@ -3,6 +3,7 @@ MIN_ID =128 --0x80, by DataManager::GetDesc()
...
@@ -3,6 +3,7 @@ MIN_ID =128 --0x80, by DataManager::GetDesc()
MAX_ID
=
268435455
--28 bits, by DataManager::GetDesc()
MAX_ID
=
268435455
--28 bits, by DataManager::GetDesc()
MAX_COUNTER
=
65535
--max number for adding/removing counters, by card::add_counter(), field::remove_counter()
MAX_COUNTER
=
65535
--max number for adding/removing counters, by card::add_counter(), field::remove_counter()
MAX_PARAMETER
=
0xffff
MAX_PARAMETER
=
0xffff
MAX_XYZ_LEVEL
=
0x0fff
--Locations 区域
--Locations 区域
LOCATION_DECK
=
0x01
--卡组
LOCATION_DECK
=
0x01
--卡组
LOCATION_HAND
=
0x02
--手牌
LOCATION_HAND
=
0x02
--手牌
...
@@ -604,7 +605,7 @@ EFFECT_LIMIT_SPECIAL_SUMMON_POSITION =368 --不能以特定表示形式特殊召
...
@@ -604,7 +605,7 @@ EFFECT_LIMIT_SPECIAL_SUMMON_POSITION =368 --不能以特定表示形式特殊召
EFFECT_TUNER
=
369
--同调召唤时可以当作调整(百檎龙-苹果鳞虫)
EFFECT_TUNER
=
369
--同调召唤时可以当作调整(百檎龙-苹果鳞虫)
EFFECT_KAISER_COLOSSEUM
=
370
--皇帝斗技场
EFFECT_KAISER_COLOSSEUM
=
370
--皇帝斗技场
EFFECT_REPLACE_DAMAGE
=
371
--伤害由特定行动代替
EFFECT_REPLACE_DAMAGE
=
371
--伤害由特定行动代替
EFFECT_
TREAT_AS_2_XMATERIAL
=
372
--需3只以上作素材的超量怪兽时可以作为2只数量
EFFECT_
XYZ_MIN_COUNT
=
372
--只能用在X只以上的超量召唤
EFFECT_FLAG_EFFECT
=
0x20000000
--标记类效果,即RegisterFlagEffect()创建的效果
EFFECT_FLAG_EFFECT
=
0x20000000
--标记类效果,即RegisterFlagEffect()创建的效果
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
...
...
procedure.lua
View file @
3c125543
...
@@ -430,13 +430,6 @@ end
...
@@ -430,13 +430,6 @@ end
---@param maxct? integer
---@param maxct? integer
---@param alterop? function
---@param alterop? function
function
Auxiliary
.
AddXyzProcedure
(
c
,
f
,
lv
,
ct
,
alterf
,
alterdesc
,
maxct
,
alterop
)
function
Auxiliary
.
AddXyzProcedure
(
c
,
f
,
lv
,
ct
,
alterf
,
alterdesc
,
maxct
,
alterop
)
if
ct
>=
3
then
Auxiliary
.
AddXyzProcedureWith3MoreMaterial
(
c
,
f
,
lv
,
ct
,
alterf
,
alterdesc
,
maxct
,
alterop
)
else
Auxiliary
.
AddXyzProcedureNormal
(
c
,
f
,
lv
,
ct
,
alterf
,
alterdesc
,
maxct
,
alterop
)
end
end
function
Auxiliary
.
AddXyzProcedureNormal
(
c
,
f
,
lv
,
ct
,
alterf
,
alterdesc
,
maxct
,
alterop
)
if
not
maxct
then
maxct
=
ct
end
if
not
maxct
then
maxct
=
ct
end
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1165
)
e1
:
SetDescription
(
1165
)
...
@@ -456,53 +449,6 @@ function Auxiliary.AddXyzProcedureNormal(c,f,lv,ct,alterf,alterdesc,maxct,altero
...
@@ -456,53 +449,6 @@ function Auxiliary.AddXyzProcedureNormal(c,f,lv,ct,alterf,alterdesc,maxct,altero
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
Auxiliary
.
AddXyzProcedureWith3MoreMaterial
(
c
,
f
,
lv
,
ct
,
alterf
,
alterdesc
,
maxct
,
alterop
)
local
ff
=
function
(
fc
)
return
fc
:
IsXyzLevel
(
c
,
lv
)
and
(
not
f
or
f
(
fc
))
end
local
gf
=
function
(
g
)
local
gct
=
g
:
GetCount
()
local
eg
=
g
:
Filter
(
Auxiliary
.
AddXyzProcedureWith3MoreMaterialGfFilter
,
nil
,
c
:
GetOwner
(),
c
)
if
#
eg
>
0
then
gct
=
gct
+
eg
:
GetClassCount
(
Auxiliary
.
AddXyzProcedureWith3MoreMaterialGfValue
,
c
:
GetOwner
(),
c
)
end
local
tc
=
g
:
GetFirst
()
while
tc
do
local
te
=
tc
:
IsHasEffect
(
EFFECT_XYZ_LEVEL
,
c
:
GetOwner
())
if
te
then
local
evf
=
te
:
GetValue
()
if
evf
then
local
ev
=
evf
(
te
,
tc
,
c
)
local
lmct
=
(
ev
>>
12
)
&
0xf
if
lmct
>
0
and
lmct
>
g
:
GetCount
()
then
return
false
end
end
end
tc
=
g
:
GetNext
()
end
return
gct
>=
ct
end
local
minc
=
ct
-
2
local
maxc
=
ct
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1165
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
if
alterf
then
e1
:
SetCondition
(
Auxiliary
.
XyzLevelFreeConditionAlter
(
ff
,
gf
,
minc
,
maxc
,
alterf
,
alterdesc
,
alterop
))
e1
:
SetTarget
(
Auxiliary
.
XyzLevelFreeTargetAlter
(
ff
,
gf
,
minc
,
maxc
,
alterf
,
alterdesc
,
alterop
))
e1
:
SetOperation
(
Auxiliary
.
XyzLevelFreeOperationAlterWith3MoreMaterial
(
ff
,
gf
,
minc
,
maxc
,
alterf
,
alterdesc
,
alterop
))
else
e1
:
SetCondition
(
Auxiliary
.
XyzLevelFreeCondition
(
ff
,
gf
,
minc
,
maxc
))
e1
:
SetTarget
(
Auxiliary
.
XyzLevelFreeTarget
(
ff
,
gf
,
minc
,
maxc
))
e1
:
SetOperation
(
Auxiliary
.
XyzLevelFreeOperationWith3MoreMaterial
(
f
,
gf
,
minc
,
maxc
))
end
e1
:
SetValue
(
SUMMON_TYPE_XYZ
)
c
:
RegisterEffect
(
e1
)
end
--Xyz Summon(normal)
--Xyz Summon(normal)
function
Auxiliary
.
XyzCondition
(
f
,
lv
,
minct
,
maxct
)
function
Auxiliary
.
XyzCondition
(
f
,
lv
,
minct
,
maxct
)
--og: use special material
--og: use special material
...
@@ -916,134 +862,6 @@ function Auxiliary.XyzLevelFreeOperationAlter(f,gf,minct,maxct,alterf,alterdesc,
...
@@ -916,134 +862,6 @@ function Auxiliary.XyzLevelFreeOperationAlter(f,gf,minct,maxct,alterf,alterdesc,
end
end
end
end
end
end
--Xyz summon(with EFFECT_TREAT_AS_2_XMATERIAL)
function
Auxiliary
.
AddXyzProcedureWith3MoreMaterialGfFilter
(
c
,
tp
,
xc
)
local
te
=
c
:
IsHasEffect
(
EFFECT_TREAT_AS_2_XMATERIAL
,
tp
)
if
te
then
local
etg
=
te
:
GetTarget
()
return
not
etg
or
etg
(
te
,
xc
)
end
return
false
end
function
Auxiliary
.
AddXyzProcedureWith3MoreMaterialGfValue
(
c
,
tp
,
xc
)
local
te
=
c
:
IsHasEffect
(
EFFECT_TREAT_AS_2_XMATERIAL
,
tp
)
if
te
then
local
etg
=
te
:
GetTarget
()
if
not
etg
or
etg
(
te
,
xc
)
then
return
te
:
GetValue
()
end
end
end
function
Auxiliary
.
XyzLevelFreeOperationAlterWith3MoreMaterial
(
f
,
gf
,
minc
,
maxc
,
alterf
,
alterdesc
,
alterop
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
Auxiliary
.
Solve2XMaterial
(
tp
,
og
,
maxc
,
minc
)
local
sg
=
Group
.
CreateGroup
()
local
tc
=
og
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
og
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
og
)
Duel
.
Overlay
(
c
,
og
)
else
local
mg
=
e
:
GetLabelObject
()
Auxiliary
.
Solve2XMaterial
(
tp
,
mg
,
maxc
,
minc
)
if
e
:
GetLabel
()
==
1
then
local
mg2
=
mg
:
GetFirst
():
GetOverlayGroup
()
if
mg2
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
mg2
)
end
else
local
sg
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
mg
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
end
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
mg
:
DeleteGroup
()
end
end
end
function
Auxiliary
.
XyzLevelFreeOperationWith3MoreMaterial
(
f
,
gf
,
minct
,
maxct
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
og
,
min
,
max
)
if
og
and
not
min
then
Auxiliary
.
Solve2XMaterial
(
tp
,
og
,
maxct
,
minct
)
local
sg
=
Group
.
CreateGroup
()
local
tc
=
og
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
og
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
c
:
SetMaterial
(
og
)
Duel
.
Overlay
(
c
,
og
)
else
local
mg
=
e
:
GetLabelObject
()
Auxiliary
.
Solve2XMaterial
(
tp
,
mg
,
maxct
,
minct
)
if
e
:
GetLabel
()
==
1
then
local
mg2
=
mg
:
GetFirst
():
GetOverlayGroup
()
if
mg2
:
GetCount
()
~=
0
then
Duel
.
Overlay
(
c
,
mg2
)
end
else
local
sg
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
local
sg1
=
tc
:
GetOverlayGroup
()
sg
:
Merge
(
sg1
)
tc
=
mg
:
GetNext
()
end
Duel
.
SendtoGrave
(
sg
,
REASON_RULE
)
end
c
:
SetMaterial
(
mg
)
Duel
.
Overlay
(
c
,
mg
)
mg
:
DeleteGroup
()
end
end
end
function
Auxiliary
.
Solve2XMaterialEffectFilter
(
c
,
tp
)
local
te
=
c
:
IsHasEffect
(
EFFECT_TREAT_AS_2_XMATERIAL
,
tp
)
return
te
:
GetValue
()
end
function
Auxiliary
.
Solve2XMaterialGroupCheck
(
g
,
tp
)
return
g
:
GetClassCount
(
Auxiliary
.
Solve2XMaterialEffectFilter
,
tp
)
==
g
:
GetCount
()
end
function
Auxiliary
.
Solve2XMaterial
(
tp
,
g
,
maxct
,
minct
)
if
g
:
GetCount
()
<
maxct
and
g
:
GetCount
()
>=
minct
and
maxct
==
minct
+
2
then
local
et
=
maxct
-
g
:
GetCount
()
local
exg
=
g
:
Filter
(
Card
.
IsHasEffect
,
nil
,
EFFECT_TREAT_AS_2_XMATERIAL
,
tp
)
local
ext
=
exg
:
GetClassCount
(
Auxiliary
.
Solve2XMaterialEffectFilter
,
tp
)
if
(
et
==
0
or
et
==
ext
)
and
#
exg
>
0
then
for
ttc
in
Auxiliary
.
Next
(
exg
)
do
local
tte
=
ttc
:
IsHasEffect
(
EFFECT_TREAT_AS_2_XMATERIAL
,
tp
)
if
tte
then
Duel
.
Hint
(
HINT_CARD
,
0
,
ttc
:
GetCode
())
tte
:
UseCountLimit
(
tp
)
end
end
elseif
#
exg
>
0
then
local
st
=
et
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RESOLVECARD
)
local
reg
=
exg
:
SelectSubGroup
(
tp
,
Auxiliary
.
Solve2XMaterialGroupCheck
,
false
,
st
,
st
,
tp
)
for
ttc
in
Auxiliary
.
Next
(
reg
)
do
local
tte
=
ttc
:
IsHasEffect
(
EFFECT_TREAT_AS_2_XMATERIAL
,
tp
)
if
tte
then
Duel
.
Hint
(
HINT_CARD
,
0
,
ttc
:
GetCode
())
tte
:
UseCountLimit
(
tp
)
end
end
end
end
end
--Fusion Summon
--Fusion Summon
...
...
utility.lua
View file @
3c125543
...
@@ -1476,6 +1476,15 @@ function Auxiliary.GetCappedLevel(c)
...
@@ -1476,6 +1476,15 @@ function Auxiliary.GetCappedLevel(c)
end
end
end
end
--
--
function
Auxiliary
.
GetCappedXyzLevel
(
c
)
local
lv
=
c
:
GetLevel
()
if
lv
>
MAX_XYZ_LEVEL
then
return
MAX_XYZ_LEVEL
else
return
lv
end
end
--
function
Auxiliary
.
GetCappedAttack
(
c
)
function
Auxiliary
.
GetCappedAttack
(
c
)
local
x
=
c
:
GetAttack
()
local
x
=
c
:
GetAttack
()
if
x
>
MAX_PARAMETER
then
if
x
>
MAX_PARAMETER
then
...
@@ -1627,26 +1636,25 @@ function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard(c,code,events)
...
@@ -1627,26 +1636,25 @@ function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard(c,code,events)
g
:
KeepAlive
()
g
:
KeepAlive
()
local
mt
=
getmetatable
(
c
)
local
mt
=
getmetatable
(
c
)
local
seed
=
0
local
seed
=
0
if
type
(
events
)
==
"table"
then
if
type
(
events
)
==
"table"
then
for
_
,
event
in
ipairs
(
events
)
do
for
_
,
event
in
ipairs
(
events
)
do
seed
=
seed
+
event
seed
=
seed
+
event
end
end
else
else
seed
=
events
seed
=
events
end
while
(
mt
[
seed
]
==
true
)
do
seed
=
seed
+
1
end
end
mt
[
seed
]
=
true
while
(
mt
[
seed
]
==
true
)
do
seed
=
seed
+
1
end
mt
[
seed
]
=
true
local
event_code_single
=
(
code
~
(
seed
<<
16
))
|
EVENT_CUSTOM
local
event_code_single
=
(
code
~
(
seed
<<
16
))
|
EVENT_CUSTOM
if
type
(
events
)
==
"table"
then
if
type
(
events
)
==
"table"
then
for
_
,
event
in
ipairs
(
events
)
do
for
_
,
event
in
ipairs
(
events
)
do
Auxiliary
.
RegisterMergedDelayedEvent_ToSingleCard_AddOperation
(
c
,
g
,
event
,
event_code_single
)
Auxiliary
.
RegisterMergedDelayedEvent_ToSingleCard_AddOperation
(
c
,
g
,
event
,
event_code_single
)
end
end
else
else
Auxiliary
.
RegisterMergedDelayedEvent_ToSingleCard_AddOperation
(
c
,
g
,
events
,
event_code_single
)
Auxiliary
.
RegisterMergedDelayedEvent_ToSingleCard_AddOperation
(
c
,
g
,
events
,
event_code_single
)
end
end
--listened to again
--listened to again
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
...
@@ -1675,21 +1683,20 @@ end
...
@@ -1675,21 +1683,20 @@ end
function
Auxiliary
.
ThisCardMovedToPublicResetCheck_ToSingleCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
Auxiliary
.
ThisCardMovedToPublicResetCheck_ToSingleCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetOwner
()
local
c
=
e
:
GetOwner
()
local
g
=
e
:
GetLabelObject
()
local
g
=
e
:
GetLabelObject
()
if
c
:
IsFaceup
()
or
c
:
IsPublic
()
then
if
c
:
IsFaceup
()
or
c
:
IsPublic
()
then
g
:
Clear
()
g
:
Clear
()
end
end
end
end
function
Auxiliary
.
MergedDelayEventCheck1_ToSingleCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
Auxiliary
.
MergedDelayEventCheck1_ToSingleCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
local
g
=
e
:
GetLabelObject
()
local
c
=
e
:
GetOwner
()
local
c
=
e
:
GetOwner
()
g
:
Merge
(
eg
)
g
:
Merge
(
eg
)
if
Duel
.
CheckEvent
(
EVENT_MOVE
)
then
if
Duel
.
CheckEvent
(
EVENT_MOVE
)
then
_
,
meg
=
Duel
.
CheckEvent
(
EVENT_MOVE
,
true
)
local
_
,
meg
=
Duel
.
CheckEvent
(
EVENT_MOVE
,
true
)
local
c
=
e
:
GetOwner
()
if
meg
:
IsContains
(
c
)
and
(
c
:
IsFaceup
()
or
c
:
IsPublic
())
then
if
meg
:
IsContains
(
c
)
and
(
c
:
IsFaceup
()
or
c
:
IsPublic
())
then
g
:
Clear
()
g
:
Clear
()
end
end
end
end
if
Duel
.
GetCurrentChain
()
==
0
and
#
g
>
0
and
not
Duel
.
CheckEvent
(
EVENT_CHAIN_END
)
then
if
Duel
.
GetCurrentChain
()
==
0
and
#
g
>
0
and
not
Duel
.
CheckEvent
(
EVENT_CHAIN_END
)
then
local
_eg
=
g
:
Clone
()
local
_eg
=
g
:
Clone
()
Duel
.
RaiseEvent
(
_eg
,
e
:
GetLabel
(),
re
,
r
,
rp
,
ep
,
ev
)
Duel
.
RaiseEvent
(
_eg
,
e
:
GetLabel
(),
re
,
r
,
rp
,
ep
,
ev
)
...
@@ -1698,13 +1705,13 @@ function Auxiliary.MergedDelayEventCheck1_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
...
@@ -1698,13 +1705,13 @@ function Auxiliary.MergedDelayEventCheck1_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
end
end
function
Auxiliary
.
MergedDelayEventCheck2_ToSingleCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
Auxiliary
.
MergedDelayEventCheck2_ToSingleCard
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
e
:
GetLabelObject
()
local
g
=
e
:
GetLabelObject
()
if
Duel
.
CheckEvent
(
EVENT_MOVE
)
then
if
Duel
.
CheckEvent
(
EVENT_MOVE
)
then
_
,
meg
=
Duel
.
CheckEvent
(
EVENT_MOVE
,
true
)
local
_
,
meg
=
Duel
.
CheckEvent
(
EVENT_MOVE
,
true
)
local
c
=
e
:
GetOwner
()
local
c
=
e
:
GetOwner
()
if
meg
:
IsContains
(
c
)
and
(
c
:
IsFaceup
()
or
c
:
IsPublic
())
then
if
meg
:
IsContains
(
c
)
and
(
c
:
IsFaceup
()
or
c
:
IsPublic
())
then
g
:
Clear
()
g
:
Clear
()
end
end
end
end
if
#
g
>
0
then
if
#
g
>
0
then
local
_eg
=
g
:
Clone
()
local
_eg
=
g
:
Clone
()
Duel
.
RaiseEvent
(
_eg
,
e
:
GetLabel
(),
re
,
r
,
rp
,
ep
,
ev
)
Duel
.
RaiseEvent
(
_eg
,
e
:
GetLabel
(),
re
,
r
,
rp
,
ep
,
ev
)
...
...
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