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
f64e4d99
You need to sign in or sign up before continuing.
Commit
f64e4d99
authored
Jul 16, 2024
by
mercury233
Committed by
GitHub
Jul 16, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix fusion procedure (#2587)
parent
ef62823e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
33 deletions
+32
-33
c33026283.lua
c33026283.lua
+1
-1
procedure.lua
procedure.lua
+31
-32
No files found.
c33026283.lua
View file @
f64e4d99
...
...
@@ -2,7 +2,7 @@
function
c33026283
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
aux
.
AddFusionProcCodeFun
(
c
,
85360035
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x14f
),
2
,
true
,
fals
e
)
aux
.
AddFusionProcCodeFun
(
c
,
85360035
,
aux
.
FilterBoolFunction
(
Card
.
IsFusionSetCard
,
0x14f
),
2
,
true
,
tru
e
)
--effect monster material check
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
procedure.lua
View file @
f64e4d99
...
...
@@ -847,12 +847,11 @@ function Auxiliary.XyzLevelFreeOperationAlter(f,gf,minct,maxct,alterf,alterdesc,
end
--Fusion Summon
--material: names in material list
---Fusion monster, mixed materials (fixed count)
---@param fcard Card
---@param sub boolean
---@param insf boolean
---@param sub boolean
Can be fusion summoned with substitute material
---@param insf boolean
Can be fusion summoned with no material (Instant Fusion)
---@param ... number|function|table
function
Auxiliary
.
AddFusionProcMix
(
fcard
,
sub
,
insf
,
...
)
if
fcard
:
IsStatus
(
STATUS_COPYING_EFFECT
)
then
return
end
...
...
@@ -903,17 +902,17 @@ function Auxiliary.FConditionMix(insf,sub,...)
--g:Material group(nil for Instant Fusion)
--gc:Material already used
--chkf: check field, default:PLAYER_NONE
--chkf&0x100: Not fusion summon
--chkf&0x200:
Concat fusion
--chkf&0x100: Not fusion summon
, can use substitute (Hex-Sealed Fusion)
--chkf&0x200:
Not fusion summon, can't use substitute ("Contact Fusion", Neos Fusion)
local
funs
=
{
...
}
return
function
(
e
,
g
,
gc
,
chkfnf
)
if
g
==
nil
then
return
insf
and
Auxiliary
.
MustMaterialCheck
(
nil
,
e
:
GetHandlerPlayer
(),
EFFECT_MUST_BE_FMATERIAL
)
end
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
notfusion
=
chkfnf
&
0x100
>
0
local
concat_
fusion
=
chkfnf
&
0x200
>
0
local
sub2
=
(
sub
or
notfusion
)
and
not
concat_
fusion
local
mg
=
g
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub2
,
concat_
fusion
,
table.unpack
(
funs
))
local
hexsealed
=
chkfnf
&
0x100
>
0
local
not
fusion
=
chkfnf
&
0x200
>
0
local
sub2
=
(
sub
or
hexsealed
)
and
not
not
fusion
local
mg
=
g
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub2
,
not
fusion
,
table.unpack
(
funs
))
if
gc
then
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
Duel
.
SetSelectedCard
(
gc
)
...
...
@@ -925,11 +924,11 @@ function Auxiliary.FOperationMix(insf,sub,...)
local
funs
=
{
...
}
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkfnf
)
local
c
=
e
:
GetHandler
()
local
notfusion
=
chkfnf
&
0x100
>
0
local
concat_
fusion
=
chkfnf
&
0x200
>
0
local
sub2
=
(
sub
or
notfusion
)
and
not
concat_
fusion
local
cancel
=
concat_
fusion
and
Duel
.
GetCurrentChain
()
==
0
local
mg
=
eg
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub2
,
concat_
fusion
,
table.unpack
(
funs
))
local
hexsealed
=
chkfnf
&
0x100
>
0
local
not
fusion
=
chkfnf
&
0x200
>
0
local
sub2
=
(
sub
or
hexsealed
)
and
not
not
fusion
local
cancel
=
not
fusion
and
Duel
.
GetCurrentChain
()
==
0
local
mg
=
eg
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub2
,
not
fusion
,
table.unpack
(
funs
))
if
gc
then
Duel
.
SetSelectedCard
(
gc
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
sg
=
mg
:
SelectSubGroup
(
tp
,
Auxiliary
.
FCheckMixGoal
,
cancel
,
#
funs
,
#
funs
,
tp
,
c
,
sub2
,
chkfnf
,
table.unpack
(
funs
))
...
...
@@ -940,9 +939,9 @@ function Auxiliary.FOperationMix(insf,sub,...)
end
end
end
function
Auxiliary
.
FConditionFilterMix
(
c
,
fc
,
sub
,
concat_
fusion
,
...
)
local
fusion_type
=
concat_
fusion
and
SUMMON_TYPE_SPECIAL
or
SUMMON_TYPE_FUSION
if
not
c
:
IsCanBeFusionMaterial
(
fc
,
fusion
_type
)
then
return
false
end
function
Auxiliary
.
FConditionFilterMix
(
c
,
fc
,
sub
,
not
fusion
,
...
)
local
check_type
=
not
fusion
and
SUMMON_TYPE_SPECIAL
or
SUMMON_TYPE_FUSION
if
not
c
:
IsCanBeFusionMaterial
(
fc
,
check
_type
)
then
return
false
end
for
i
,
f
in
ipairs
({
...
})
do
if
f
(
c
,
fc
,
sub
)
then
return
true
end
end
...
...
@@ -966,8 +965,8 @@ end
--if sg1 is subset of sg2 then not Auxiliary.FCheckAdditional(tp,sg1,fc) -> not Auxiliary.FCheckAdditional(tp,sg2,fc)
function
Auxiliary
.
FCheckMixGoal
(
sg
,
tp
,
fc
,
sub
,
chkfnf
,
...
)
local
chkf
=
chkfnf
&
0xff
local
concat_fusion
=
chkfnf
&
0x200
>
0
if
not
conca
t_fusion
and
sg
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
sg
,
EFFECT_TUNE_MAGICIAN_F
)
then
return
false
end
local
not_fusion
=
chkfnf
&
(
0x100
|
0x200
)
>
0
if
not
no
t_fusion
and
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
)
...
...
@@ -977,8 +976,8 @@ end
---Fusion monster, mixed material * minc to maxc + material + ...
---@param fcard Card
---@param sub boolean
---@param insf boolean
---@param sub boolean
Can be fusion summoned with substitute material
---@param insf boolean
Can be fusion summoned with no material (Instant Fusion)
---@param fun1 number|function|table
---@param minc integer
---@param maxc integer
...
...
@@ -1034,10 +1033,10 @@ function Auxiliary.FConditionMixRep(insf,sub,fun1,minc,maxc,...)
if
g
==
nil
then
return
insf
and
Auxiliary
.
MustMaterialCheck
(
nil
,
e
:
GetHandlerPlayer
(),
EFFECT_MUST_BE_FMATERIAL
)
end
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
notfusion
=
chkfnf
&
0x100
>
0
local
concat_
fusion
=
chkfnf
&
0x200
>
0
local
sub2
=
(
sub
or
notfusion
)
and
not
concat_
fusion
local
mg
=
g
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub2
,
concat_
fusion
,
fun1
,
table.unpack
(
funs
))
local
hexsealed
=
chkfnf
&
0x100
>
0
local
not
fusion
=
chkfnf
&
0x200
>
0
local
sub2
=
(
sub
or
hexsealed
)
and
not
not
fusion
local
mg
=
g
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub2
,
not
fusion
,
fun1
,
table.unpack
(
funs
))
if
gc
then
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
local
sg
=
Group
.
CreateGroup
()
...
...
@@ -1052,11 +1051,11 @@ function Auxiliary.FOperationMixRep(insf,sub,fun1,minc,maxc,...)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkfnf
)
local
c
=
e
:
GetHandler
()
local
tp
=
c
:
GetControler
()
local
notfusion
=
chkfnf
&
0x100
>
0
local
concat_
fusion
=
chkfnf
&
0x200
>
0
local
sub2
=
(
sub
or
notfusion
)
and
not
concat_
fusion
local
cancel
=
concat_
fusion
and
Duel
.
GetCurrentChain
()
==
0
local
mg
=
eg
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub2
,
concat_
fusion
,
fun1
,
table.unpack
(
funs
))
local
hexsealed
=
chkfnf
&
0x100
>
0
local
not
fusion
=
chkfnf
&
0x200
>
0
local
sub2
=
(
sub
or
hexsealed
)
and
not
not
fusion
local
cancel
=
not
fusion
and
Duel
.
GetCurrentChain
()
==
0
local
mg
=
eg
:
Filter
(
Auxiliary
.
FConditionFilterMix
,
c
,
c
,
sub2
,
not
fusion
,
fun1
,
table.unpack
(
funs
))
local
sg
=
Group
.
CreateGroup
()
if
gc
then
sg
:
AddCard
(
gc
)
end
while
sg
:
GetCount
()
<
maxc
+#
funs
do
...
...
@@ -1100,8 +1099,8 @@ function Auxiliary.FCheckMixRepFilter(c,sg,g,fc,sub,chkf,fun1,minc,maxc,fun2,...
return
false
end
function
Auxiliary
.
FCheckMixRepGoalCheck
(
tp
,
sg
,
fc
,
chkfnf
)
local
concat_fusion
=
chkfnf
&
0x200
>
0
if
not
conca
t_fusion
and
sg
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
sg
,
EFFECT_TUNE_MAGICIAN_F
)
then
return
false
end
local
not_fusion
=
chkfnf
&
(
0x100
|
0x200
)
>
0
if
not
no
t_fusion
and
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
Auxiliary
.
FGoalCheckAdditional
and
not
Auxiliary
.
FGoalCheckAdditional
(
tp
,
sg
,
fc
)
then
return
false
end
return
true
...
...
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