Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
Vee4
ygopro-scripts-888
Commits
396b17aa
Commit
396b17aa
authored
Jul 05, 2025
by
Vury Leo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add TG サイバー・マジシャン
parent
9977b62c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
60 deletions
+103
-60
c64910482.lua
c64910482.lua
+5
-1
c68989420.lua
c68989420.lua
+1
-0
procedure.lua
procedure.lua
+97
-59
No files found.
c64910482.lua
View file @
396b17aa
...
@@ -29,7 +29,7 @@ function s.initial_effect(c)
...
@@ -29,7 +29,7 @@ function s.initial_effect(c)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e4
:
SetCode
(
id
)
e4
:
SetCode
(
id
)
e4
:
Set
Target
(
s
.
hsyntg
)
e4
:
Set
Value
(
s
.
tgvalue
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
function
s
.
synfilter1
(
c
,
syncard
,
tuner
,
f
)
function
s
.
synfilter1
(
c
,
syncard
,
tuner
,
f
)
...
@@ -126,3 +126,7 @@ end
...
@@ -126,3 +126,7 @@ end
function
s
.
hsyntg
(
e
,
c
,
syncard
)
function
s
.
hsyntg
(
e
,
c
,
syncard
)
return
c
:
IsSetCard
(
0x27
)
and
c
:
IsNotTuner
(
syncard
)
return
c
:
IsSetCard
(
0x27
)
and
c
:
IsNotTuner
(
syncard
)
end
end
function
s
.
tgvalue
(
e
,
tc
)
return
tc
:
IsSetCard
(
0x27
)
end
c68989420.lua
View file @
396b17aa
...
@@ -4,6 +4,7 @@ function s.initial_effect(c)
...
@@ -4,6 +4,7 @@ function s.initial_effect(c)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--material
--material
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
Synchro
.
AddSynchroProcedure
(
c
)
--spsummon
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
...
...
procedure.lua
View file @
396b17aa
...
@@ -3384,7 +3384,7 @@ Synchro.Role={
...
@@ -3384,7 +3384,7 @@ Synchro.Role={
}
}
--- Shadowing Duel.GetSynchroMaterial as we have different definition on hand materials
--- Shadowing Duel.GetSynchroMaterial as we have different definition on hand materials
function
Synchro
.
GetSynchroMaterial
(
tp
,
tc
,
base
_mapper
)
function
Synchro
.
GetSynchroMaterial
(
tp
,
tc
,
level
_mapper
)
local
mg
=
Duel
.
GetMatchingGroup
(
function
(
mc
)
return
mc
:
IsFaceup
()
and
mc
:
IsOnField
()
end
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
function
(
mc
)
return
mc
:
IsFaceup
()
and
mc
:
IsOnField
()
end
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
mg_hand
=
Duel
.
GetMatchingGroup
(
function
(
mc
)
return
mc
:
IsFaceupEx
()
end
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
mg_hand
=
Duel
.
GetMatchingGroup
(
function
(
mc
)
return
mc
:
IsFaceupEx
()
end
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
mg_oppoent
=
Duel
.
GetMatchingGroup
(
function
(
mc
)
local
mg_oppoent
=
Duel
.
GetMatchingGroup
(
function
(
mc
)
...
@@ -3420,7 +3420,7 @@ function Synchro.GetSynchroMaterial(tp,tc,base_mapper)
...
@@ -3420,7 +3420,7 @@ function Synchro.GetSynchroMaterial(tp,tc,base_mapper)
end
,
nil
)
end
,
nil
)
--- it must have a level
--- it must have a level
mg
=
mg
:
Filter
(
function
(
mc
)
mg
=
mg
:
Filter
(
function
(
mc
)
local
lvls
=
base
_mapper
(
mc
,
tc
)
local
lvls
=
level
_mapper
(
mc
,
tc
)
if
#
lvls
==
0
then
if
#
lvls
==
0
then
return
false
return
false
end
end
...
@@ -3442,8 +3442,9 @@ function Synchro.AddSynchroProcedure(c,params)
...
@@ -3442,8 +3442,9 @@ function Synchro.AddSynchroProcedure(c,params)
local
tuner_max
=
params
.
tuner_max
or
1
local
tuner_max
=
params
.
tuner_max
or
1
local
non_tuner_min
=
params
.
non_tuner_min
or
1
local
non_tuner_min
=
params
.
non_tuner_min
or
1
local
non_tuner_max
=
params
.
non_tuner_max
or
Synchro
.
Infinite
local
non_tuner_max
=
params
.
non_tuner_max
or
Synchro
.
Infinite
local
base_mapper
=
params
.
base
_mapper
or
Synchro
.
DefaultLevelMapper
local
level_mapper
=
params
.
level
_mapper
or
Synchro
.
DefaultLevelMapper
local
scheck
=
params
.
scheck
or
aux
.
TRUE
local
scheck
=
params
.
scheck
or
aux
.
TRUE
local
hand_count_mapper
=
params
.
hand_count_mapper
or
Synchro
.
DefaultHandCountMapper
local
drop_default_tuner_filter
=
params
.
drop_default_tuner_filter
or
false
local
drop_default_tuner_filter
=
params
.
drop_default_tuner_filter
or
false
local
drop_default_non_tuner_filter
=
params
.
drop_default_non_tuner_filter
or
false
local
drop_default_non_tuner_filter
=
params
.
drop_default_non_tuner_filter
or
false
...
@@ -3463,8 +3464,8 @@ function Synchro.AddSynchroProcedure(c,params)
...
@@ -3463,8 +3464,8 @@ function Synchro.AddSynchroProcedure(c,params)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
Synchro
.
SynCondition
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
))
e1
:
SetCondition
(
Synchro
.
SynCondition
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
))
e1
:
SetTarget
(
Synchro
.
SynTarget
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
))
e1
:
SetTarget
(
Synchro
.
SynTarget
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
))
e1
:
SetOperation
(
Synchro
.
SynOperation
())
e1
:
SetOperation
(
Synchro
.
SynOperation
())
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
@@ -3477,8 +3478,8 @@ function Synchro.AddSynchroProcedure(c,params)
...
@@ -3477,8 +3478,8 @@ function Synchro.AddSynchroProcedure(c,params)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetRange
(
LOCATION_EXTRA
)
e2
:
SetCondition
(
Synchro
.
SynCondition
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
))
e2
:
SetCondition
(
Synchro
.
SynCondition
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
))
e2
:
SetTarget
(
Synchro
.
SynTarget
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
))
e2
:
SetTarget
(
Synchro
.
SynTarget
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
))
e2
:
SetOperation
(
Synchro
.
SynOperation
())
e2
:
SetOperation
(
Synchro
.
SynOperation
())
e2
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
e2
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
...
@@ -3491,7 +3492,7 @@ function Synchro.FindValidSelection(candidates,target_level,
...
@@ -3491,7 +3492,7 @@ function Synchro.FindValidSelection(candidates,target_level,
non_tuner_race
,
non_tuner_filter
,
tc
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
,
level_mapper
,
hand_count
_mapper
,
scheck
,
pre_select
,
state
)
pre_select
,
state
)
Synchro
.
SortMaterials
(
candidates
,
tc
,
tuner_filter
)
Synchro
.
SortMaterials
(
candidates
,
tc
,
tuner_filter
)
...
@@ -3507,7 +3508,7 @@ function Synchro.FindValidSelection(candidates,target_level,
...
@@ -3507,7 +3508,7 @@ function Synchro.FindValidSelection(candidates,target_level,
-- Find the index of the last hand card
-- Find the index of the last hand card
local
hand_prune_index
=
0
local
hand_prune_index
=
0
for
i
,
c
in
ipairs
(
candidates
)
do
for
i
,
c
in
ipairs
(
candidates
)
do
if
Synchro
.
IsHandAlter
(
c
)
then
if
Synchro
.
IsHandAlter
(
c
,
tc
)
then
hand_prune_index
=
i
hand_prune_index
=
i
end
end
end
end
...
@@ -3527,15 +3528,16 @@ function Synchro.FindValidSelection(candidates,target_level,
...
@@ -3527,15 +3528,16 @@ function Synchro.FindValidSelection(candidates,target_level,
non_tuner_race
,
non_tuner_filter
,
tc
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
,
level_mapper
,
hand_count
_mapper
,
scheck
,
pre_select
or
{},
pre_select
or
{},
1
,
1
,
state
or
{
-- initial state
state
or
{
-- initial state
possible_sums
=
{[
0
]
=
true
},
possible_sums
=
{[
0
]
=
true
},
tuner_count
=
0
,
tuner_count
=
0
,
non_tuner_count
=
0
,
non_tuner_count
=
0
,
level_mapper
=
base
_mapper
,
level_mapper
=
level
_mapper
,
level_mapper_priority
=
0
,
level_mapper_priority
=
0
,
hand_count_mapper
=
hand_count_mapper
,
hand_count_limit
=
0
,
hand_count_limit
=
0
,
hand_count
=
0
,
hand_count
=
0
,
genomix_race
=
nil
,
genomix_race
=
nil
,
...
@@ -3565,7 +3567,7 @@ end
...
@@ -3565,7 +3567,7 @@ end
--- @param tuner_max integer|table -- Maximum number of Tuners.
--- @param tuner_max integer|table -- Maximum number of Tuners.
--- @param non_tuner_min integer -- Minimum number of non-Tuners.
--- @param non_tuner_min integer -- Minimum number of non-Tuners.
--- @param non_tuner_max integer|table -- Maximum number of non-Tuners.
--- @param non_tuner_max integer|table -- Maximum number of non-Tuners.
--- @param
base_mapper
fun(mc:Card,tc:Card):integer[] -- Returns possible levels for mc.
--- @param
level_mapper
fun(mc:Card,tc:Card):integer[] -- Returns possible levels for mc.
--- @param scheck fun(selected:Card[]):boolean -- Optional card-group check (e.g. Judgment’s same-Attribute).
--- @param scheck fun(selected:Card[]):boolean -- Optional card-group check (e.g. Judgment’s same-Attribute).
--- @param selected Card[] -- Materials chosen so far.
--- @param selected Card[] -- Materials chosen so far.
--- @param index integer -- Next candidate index (1-based).
--- @param index integer -- Next candidate index (1-based).
...
@@ -3586,7 +3588,7 @@ end
...
@@ -3586,7 +3588,7 @@ end
--- race_prune_index integer
--- race_prune_index integer
--- @return boolean True if a valid selection exists, false otherwise.
--- @return boolean True if a valid selection exists, false otherwise.
function
Synchro
.
CanCompleteSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
function
Synchro
.
CanCompleteSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
,
selected
,
index
,
state
,
prune_indexes
)
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
,
selected
,
index
,
state
,
prune_indexes
)
if
state
.
tuner_count
>
tuner_max
then
return
false
end
if
state
.
tuner_count
>
tuner_max
then
return
false
end
if
state
.
non_tuner_count
>
non_tuner_max
then
return
false
end
if
state
.
non_tuner_count
>
non_tuner_max
then
return
false
end
...
@@ -3656,7 +3658,7 @@ function Synchro.CanCompleteSelection(candidates,target_level,tuner_race,tuner_f
...
@@ -3656,7 +3658,7 @@ function Synchro.CanCompleteSelection(candidates,target_level,tuner_race,tuner_f
--- include branch
--- include branch
if
can_include
then
if
can_include
then
for
_
,
diff
in
ipairs
(
Synchro
.
GenerateVariantForCard
(
for
_
,
diff
in
ipairs
(
Synchro
.
GenerateVariantForCard
(
state
,
mc
,
#
selected
+
1
,
tc
,
tuner_race
,
prune_tuner_filter
,
non_tuner_race
,
prune_non_tuner_filter
state
,
mc
,
selected
,
tc
,
tuner_race
,
prune_tuner_filter
,
non_tuner_race
,
prune_non_tuner_filter
))
do
))
do
-- apply diff
-- apply diff
local
branch_state
=
Synchro
.
ApplyVariantState
(
local
branch_state
=
Synchro
.
ApplyVariantState
(
...
@@ -3668,7 +3670,7 @@ function Synchro.CanCompleteSelection(candidates,target_level,tuner_race,tuner_f
...
@@ -3668,7 +3670,7 @@ function Synchro.CanCompleteSelection(candidates,target_level,tuner_race,tuner_f
tuner_race
,
tuner_filter
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
,
level_mapper
,
hand_count
_mapper
,
scheck
,
selected
,
index
+
1
,
branch_state
,
prune_indexes
selected
,
index
+
1
,
branch_state
,
prune_indexes
)
then
)
then
table.remove
(
selected
)
table.remove
(
selected
)
...
@@ -3680,7 +3682,7 @@ function Synchro.CanCompleteSelection(candidates,target_level,tuner_race,tuner_f
...
@@ -3680,7 +3682,7 @@ function Synchro.CanCompleteSelection(candidates,target_level,tuner_race,tuner_f
-- exclude branch
-- exclude branch
if
Synchro
.
CanCompleteSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
if
Synchro
.
CanCompleteSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
,
selected
,
index
+
1
,
state
,
prune_indexes
)
then
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
,
selected
,
index
+
1
,
state
,
prune_indexes
)
then
return
true
return
true
end
end
...
@@ -3688,7 +3690,7 @@ function Synchro.CanCompleteSelection(candidates,target_level,tuner_race,tuner_f
...
@@ -3688,7 +3690,7 @@ function Synchro.CanCompleteSelection(candidates,target_level,tuner_race,tuner_f
end
end
--- Synchro condition generator using tuner/non-tuner min/max counts and filters
--- Synchro condition generator using tuner/non-tuner min/max counts and filters
function
Synchro
.
SynCondition
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
)
function
Synchro
.
SynCondition
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
)
--- @param mg Group
--- @param mg Group
return
function
(
e
,
c
,
smat
,
mg
,
min
,
max
)
return
function
(
e
,
c
,
smat
,
mg
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
...
@@ -3708,7 +3710,7 @@ function Synchro.SynCondition(tuner_race,tuner_filter,non_tuner_race,non_tuner_f
...
@@ -3708,7 +3710,7 @@ function Synchro.SynCondition(tuner_race,tuner_filter,non_tuner_race,non_tuner_f
end
end
local
target_level
=
c
:
GetLevel
()
local
target_level
=
c
:
GetLevel
()
mg
=
mg
or
Synchro
.
GetSynchroMaterial
(
c
:
GetControler
(),
c
,
base
_mapper
)
mg
=
mg
or
Synchro
.
GetSynchroMaterial
(
c
:
GetControler
(),
c
,
level
_mapper
)
local
smat_states
=
nil
local
smat_states
=
nil
local
smat_arr
=
nil
local
smat_arr
=
nil
...
@@ -3726,28 +3728,28 @@ function Synchro.SynCondition(tuner_race,tuner_filter,non_tuner_race,non_tuner_f
...
@@ -3726,28 +3728,28 @@ function Synchro.SynCondition(tuner_race,tuner_filter,non_tuner_race,non_tuner_f
end
end
smat_arr
=
{}
smat_arr
=
{}
table.insert
(
smat_arr
,
smat
)
table.insert
(
smat_arr
,
smat
)
smat_states
=
Synchro
.
BuildStatesFromSelection
(
smat_arr
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
base
_mapper
,
c
,
math.huge
)
smat_states
=
Synchro
.
BuildStatesFromSelection
(
smat_arr
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
level_mapper
,
hand_count
_mapper
,
c
,
math.huge
)
for
_
,
state
in
ipairs
(
smat_states
)
do
for
_
,
state
in
ipairs
(
smat_states
)
do
if
Synchro
.
FindValidSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
c
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
,
smat_arr
,
state
)
then
if
Synchro
.
FindValidSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
c
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
,
smat_arr
,
state
)
then
return
true
return
true
end
end
end
end
return
false
return
false
else
else
return
Synchro
.
FindValidSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
c
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
)
return
Synchro
.
FindValidSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
c
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
)
end
end
end
end
end
end
function
Synchro
.
SynTarget
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
)
function
Synchro
.
SynTarget
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
,
scheck
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
tc
,
smat
,
mg
,
min
,
max
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
tc
,
smat
,
mg
,
min
,
max
)
if
mg
~=
nil
and
#
mg
==
min
then
if
mg
~=
nil
and
#
mg
==
min
then
e
:
SetLabelObject
(
mg
)
e
:
SetLabelObject
(
mg
)
return
true
return
true
end
end
mg
=
mg
or
Synchro
.
GetSynchroMaterial
(
tp
,
tc
,
base
_mapper
)
mg
=
mg
or
Synchro
.
GetSynchroMaterial
(
tp
,
tc
,
level
_mapper
)
-- add リペア・ジェネクス・コントローラー to scheck
-- add リペア・ジェネクス・コントローラー to scheck
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
8173184
)
then
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
8173184
)
then
...
@@ -3788,7 +3790,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
...
@@ -3788,7 +3790,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
sg_arr
,
sg_arr
,
tuner_race
,
tuner_filter
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
base
_mapper
,
level_mapper
,
hand_count
_mapper
,
tc
,
math.huge
tc
,
math.huge
)
)
--- use the min select level as hint
--- use the min select level as hint
...
@@ -3826,7 +3828,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
...
@@ -3826,7 +3828,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
test_selection
,
test_selection
,
tuner_race
,
tuner_filter
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
base
_mapper
,
level_mapper
,
hand_count
_mapper
,
tc
,
math.huge
tc
,
math.huge
)
)
...
@@ -3836,7 +3838,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
...
@@ -3836,7 +3838,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
tuner_race
,
tuner_filter
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
,
scheck
,
test_selection
,
init_state
)
level_mapper
,
hand_count
_mapper
,
scheck
,
test_selection
,
init_state
)
then
then
addable
:
AddCard
(
candidate
)
addable
:
AddCard
(
candidate
)
break
break
...
@@ -3853,7 +3855,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
...
@@ -3853,7 +3855,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
break
break
end
end
local
finishable
=
Synchro
.
IsSelectionValid
(
sg_arr
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
)
local
finishable
=
Synchro
.
IsSelectionValid
(
sg_arr
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
picked
=
Group
.
SelectUnselect
(
addable
,
sg
,
tp
,
finishable
,
true
,
selected_level_min
,
target_level
)
local
picked
=
Group
.
SelectUnselect
(
addable
,
sg
,
tp
,
finishable
,
true
,
selected_level_min
,
target_level
)
...
@@ -3939,12 +3941,12 @@ function Synchro.SynOperation()
...
@@ -3939,12 +3941,12 @@ function Synchro.SynOperation()
end
end
end
end
function
Synchro
.
IsSelectionValid
(
selection
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
base
_mapper
)
function
Synchro
.
IsSelectionValid
(
selection
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tc
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count
_mapper
)
local
states
=
Synchro
.
BuildStatesFromSelection
(
local
states
=
Synchro
.
BuildStatesFromSelection
(
selection
,
selection
,
tuner_race
,
tuner_filter
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
base
_mapper
,
level_mapper
,
hand_count
_mapper
,
tc
,
target_level
tc
,
target_level
)
)
for
_
,
state
in
ipairs
(
states
)
do
for
_
,
state
in
ipairs
(
states
)
do
...
@@ -4012,6 +4014,14 @@ function Synchro.DefaultLevelMapper(card,tc)
...
@@ -4012,6 +4014,14 @@ function Synchro.DefaultLevelMapper(card,tc)
return
levels
return
levels
end
end
function
Synchro
.
DefaultHandCountMapper
(
card
,
tc
)
-- Revolution Synchron effect
if
Synchro
.
IsRevolution
(
card
,
tc
)
then
return
0
end
return
1
end
function
Synchro
.
DefaultTunerFilter
(
mc
,
tc
)
function
Synchro
.
DefaultTunerFilter
(
mc
,
tc
)
-- if this card has EFFECT_TUNER, always count it as a Tuner
-- if this card has EFFECT_TUNER, always count it as a Tuner
for
_
,
e
in
ipairs
({
mc
:
IsHasEffect
(
EFFECT_TUNER
)})
do
for
_
,
e
in
ipairs
({
mc
:
IsHasEffect
(
EFFECT_TUNER
)})
do
...
@@ -4053,14 +4063,15 @@ function Synchro.UpdatepossibleSums(possible_sums,card_levels,prune_level)
...
@@ -4053,14 +4063,15 @@ function Synchro.UpdatepossibleSums(possible_sums,card_levels,prune_level)
return
new_sums
return
new_sums
end
end
function
Synchro
.
BuildStatesFromSelection
(
selection
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
base
_mapper
,
tc
,
prune_level
)
function
Synchro
.
BuildStatesFromSelection
(
selection
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
level_mapper
,
hand_count
_mapper
,
tc
,
prune_level
)
local
states
=
{
local
states
=
{
{
{
possible_sums
=
{[
0
]
=
true
},
possible_sums
=
{[
0
]
=
true
},
tuner_count
=
0
,
tuner_count
=
0
,
non_tuner_count
=
0
,
non_tuner_count
=
0
,
level_mapper
=
base
_mapper
,
level_mapper
=
level
_mapper
,
level_mapper_priority
=
0
,
level_mapper_priority
=
0
,
hand_count_mapper
=
hand_count_mapper
,
hand_count_limit
=
0
,
hand_count_limit
=
0
,
hand_count
=
0
,
hand_count
=
0
,
genomix_race
=
nil
,
genomix_race
=
nil
,
...
@@ -4071,7 +4082,8 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
...
@@ -4071,7 +4082,8 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
Synchro
.
SortMaterials
(
selection
,
tc
,
tuner_filter
)
Synchro
.
SortMaterials
(
selection
,
tc
,
tuner_filter
)
for
idx
,
card
in
ipairs
(
selection
)
do
local
selected
=
{}
for
_
,
card
in
ipairs
(
selection
)
do
local
next_states
=
{}
local
next_states
=
{}
local
material_limit_effect
=
card
:
IsHasEffect
(
EFFECT_TUNER_MATERIAL_LIMIT
)
or
card
:
IsHasEffect
(
EFFECT_SCRAP_CHIMERA
)
local
material_limit_effect
=
card
:
IsHasEffect
(
EFFECT_TUNER_MATERIAL_LIMIT
)
or
card
:
IsHasEffect
(
EFFECT_SCRAP_CHIMERA
)
...
@@ -4082,7 +4094,7 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
...
@@ -4082,7 +4094,7 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
for
_
,
st
in
ipairs
(
states
)
do
for
_
,
st
in
ipairs
(
states
)
do
for
_
,
diff
in
ipairs
(
Synchro
.
GenerateVariantForCard
(
for
_
,
diff
in
ipairs
(
Synchro
.
GenerateVariantForCard
(
st
,
card
,
idx
,
tc
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
st
,
card
,
selected
,
tc
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
))
do
))
do
-- merge diff into full state
-- merge diff into full state
local
new_state
=
Synchro
.
ApplyVariantState
(
local
new_state
=
Synchro
.
ApplyVariantState
(
...
@@ -4092,6 +4104,7 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
...
@@ -4092,6 +4104,7 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
end
end
end
end
table.insert
(
selected
,
card
)
states
=
next_states
states
=
next_states
if
#
states
==
0
then
if
#
states
==
0
then
...
@@ -4131,6 +4144,15 @@ function Synchro.IsRevolution(c,tc)
...
@@ -4131,6 +4144,15 @@ function Synchro.IsRevolution(c,tc)
return
revo_e
:
GetValue
()(
revo_e
,
tc
)
return
revo_e
:
GetValue
()(
revo_e
,
tc
)
end
end
--- @param c Card
function
Synchro
.
IsTGCyberMagician
(
c
,
tc
)
local
tg_e
=
c
:
IsHasEffect
(
64910482
)
if
tg_e
==
nil
then
return
false
end
return
tg_e
:
GetValue
()(
tg_e
,
tc
)
end
--- @param c Card
--- @param c Card
function
Synchro
.
IsGenomix
(
c
)
function
Synchro
.
IsGenomix
(
c
)
return
c
:
IsHasEffect
(
42155488
)
~=
nil
return
c
:
IsHasEffect
(
42155488
)
~=
nil
...
@@ -4165,8 +4187,8 @@ function Synchro.IsLevelAlter(c)
...
@@ -4165,8 +4187,8 @@ function Synchro.IsLevelAlter(c)
return
Synchro
.
IsMono
(
c
)
or
Synchro
.
IsFlower
(
c
)
return
Synchro
.
IsMono
(
c
)
or
Synchro
.
IsFlower
(
c
)
end
end
function
Synchro
.
IsHandAlter
(
c
)
function
Synchro
.
IsHandAlter
(
c
,
tc
)
return
Synchro
.
IsTatsunoko
(
c
)
or
Synchro
.
IsTatsunecro
(
c
)
return
Synchro
.
IsTatsunoko
(
c
)
or
Synchro
.
IsTatsunecro
(
c
)
or
Synchro
.
IsTGCyberMagician
(
c
,
tc
)
end
end
function
Synchro
.
IsRaceAlter
(
c
)
function
Synchro
.
IsRaceAlter
(
c
)
...
@@ -4182,14 +4204,14 @@ function Synchro.IsNoHarm(c)
...
@@ -4182,14 +4204,14 @@ function Synchro.IsNoHarm(c)
end
end
-- Helper to generate only the variant-specific diffs for a card
-- Helper to generate only the variant-specific diffs for a card
function
Synchro
.
GenerateVariantForCard
(
st
,
card
,
selected
_count
,
tc
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
)
function
Synchro
.
GenerateVariantForCard
(
st
,
card
,
selected
,
tc
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
)
local
base_variants
=
{}
local
base_variants
=
{}
-- MonoSynchron first/second
-- MonoSynchron first/second
if
Synchro
.
IsMono
(
card
)
then
if
Synchro
.
IsMono
(
card
)
then
if
st
.
level_mapper_priority
<
2
then
if
st
.
level_mapper_priority
<
2
then
local
firstMono
=
card
local
firstMono
=
card
table.insert
(
base_variants
,{
table.insert
(
base_variants
,{
possible_sums
=
{[
(
selected_count
-
1
)
+
card
:
GetLevel
()]
=
true
},
possible_sums
=
{[
#
selected
+
card
:
GetLevel
()]
=
true
},
level_mapper
=
function
(
c
)
level_mapper
=
function
(
c
)
return
(
c
==
firstMono
)
and
{
c
:
GetLevel
()}
or
{
1
}
return
(
c
==
firstMono
)
and
{
c
:
GetLevel
()}
or
{
1
}
end
,
end
,
...
@@ -4197,7 +4219,7 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
...
@@ -4197,7 +4219,7 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
})
})
elseif
st
.
level_mapper_priority
==
2
then
elseif
st
.
level_mapper_priority
==
2
then
table.insert
(
base_variants
,{
table.insert
(
base_variants
,{
possible_sums
=
{[
selected_count
]
=
true
},
possible_sums
=
{[
#
selected
+
1
]
=
true
},
level_mapper
=
function
()
return
{
1
}
end
,
level_mapper
=
function
()
return
{
1
}
end
,
})
})
end
end
...
@@ -4217,9 +4239,9 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
...
@@ -4217,9 +4239,9 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
end
end
-- Flower Cardian override
-- Flower Cardian override
if
Synchro
.
IsFlower
(
card
)
and
st
.
level_mapper_priority
<
1
then
if
Synchro
.
IsFlower
(
card
)
and
st
.
level_mapper_priority
<
1
then
table.insert
(
base_variants
,{
table.insert
(
base_variants
,{
possible_sums
=
{[
2
*
selected_count
]
=
true
},
possible_sums
=
{[
2
*
(
#
selected
+
1
)
]
=
true
},
level_mapper
=
function
()
return
{
2
}
end
,
level_mapper
=
function
()
return
{
2
}
end
,
level_mapper_priority
=
1
,
level_mapper_priority
=
1
,
})
})
...
@@ -4239,17 +4261,29 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
...
@@ -4239,17 +4261,29 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
})
})
end
end
-- now wrap each base_variant in role‐specific diffs
-- TG Cyber Magician effect
if
Synchro
.
IsTGCyberMagician
(
card
,
tc
)
then
-- Revolution Synchron effect
local
new_hand_count_mapper
=
function
(
mc
,
p_tc
)
local
hand_delta
=
0
if
not
mc
:
IsType
(
TYPE_TUNER
)
and
mc
:
IsSetCard
(
0x27
)
then
if
card
:
IsLocation
(
LOCATION_HAND
)
then
return
0
if
Synchro
.
IsRevolution
(
card
,
tc
)
then
end
hand_delta
=
0
return
Synchro
.
DefaultHandCountMapper
(
mc
,
p_tc
)
else
hand_delta
=
1
end
end
end
local
previous_hand_count
=
0
if
card
:
IsLocation
(
LOCATION_HAND
)
then
previous_hand_count
=
new_hand_count_mapper
(
card
,
tc
)
end
for
_
,
sc
in
ipairs
(
selected
)
do
if
sc
:
IsLocation
(
LOCATION_HAND
)
then
previous_hand_count
=
previous_hand_count
+
new_hand_count_mapper
(
sc
,
tc
)
end
end
table.insert
(
base_variants
,{
hand_count
=
previous_hand_count
,
hand_count_mapper
=
new_hand_count_mapper
,
})
end
-- now wrap each base_variant in role‐specific diffs
local
variants
=
{}
local
variants
=
{}
local
can_be_tuner
=
tuner_filter
(
card
,
tc
)
local
can_be_tuner
=
tuner_filter
(
card
,
tc
)
...
@@ -4265,7 +4299,8 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
...
@@ -4265,7 +4299,8 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
hand_count_limit
=
base
.
hand_count_limit
,
hand_count_limit
=
base
.
hand_count_limit
,
append_material_limit_filter
=
base
.
append_material_limit_filter
,
append_material_limit_filter
=
base
.
append_material_limit_filter
,
genomix_race
=
base
.
genomix_race
,
genomix_race
=
base
.
genomix_race
,
hand_delta
=
hand_delta
,
hand_count
=
base
.
hand_count
,
hand_count_mapper
=
base
.
hand_count_mapper
,
-- role-specific
-- role-specific
tuner_delta
=
1
,
tuner_delta
=
1
,
non_tuner_delta
=
0
,
non_tuner_delta
=
0
,
...
@@ -4281,7 +4316,9 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
...
@@ -4281,7 +4316,9 @@ function Synchro.GenerateVariantForCard(st,card,selected_count,tc,tuner_race,tun
hand_count_limit
=
base
.
hand_count_limit
,
hand_count_limit
=
base
.
hand_count_limit
,
append_material_limit_filter
=
base
.
append_material_limit_filter
,
append_material_limit_filter
=
base
.
append_material_limit_filter
,
genomix_race
=
base
.
genomix_race
,
genomix_race
=
base
.
genomix_race
,
hand_delta
=
hand_delta
,
hand_count
=
base
.
hand_count
,
hand_count_mapper
=
base
.
hand_count_mapper
,
-- role-specific
tuner_delta
=
0
,
tuner_delta
=
0
,
non_tuner_delta
=
1
,
non_tuner_delta
=
1
,
role
=
Synchro
.
Role
.
NON_TUNER
,
role
=
Synchro
.
Role
.
NON_TUNER
,
...
@@ -4298,7 +4335,6 @@ function Synchro.ApplyVariantState(st,card,diff,tuner_race,tuner_filter,non_tune
...
@@ -4298,7 +4335,6 @@ function Synchro.ApplyVariantState(st,card,diff,tuner_race,tuner_filter,non_tune
-- compute increments using provided filters
-- compute increments using provided filters
local
tuner_inc
=
diff
.
tuner_delta
local
tuner_inc
=
diff
.
tuner_delta
local
non_tuner_inc
=
diff
.
non_tuner_delta
local
non_tuner_inc
=
diff
.
non_tuner_delta
local
hand_inc
=
diff
.
hand_delta
local
new_selected_roles
=
{
table.unpack
(
st
.
selected_roles
)
}
local
new_selected_roles
=
{
table.unpack
(
st
.
selected_roles
)
}
table.insert
(
new_selected_roles
,
diff
.
role
)
table.insert
(
new_selected_roles
,
diff
.
role
)
local
possible_sums
=
Synchro
.
UpdatepossibleSums
(
local
possible_sums
=
Synchro
.
UpdatepossibleSums
(
...
@@ -4306,6 +4342,10 @@ function Synchro.ApplyVariantState(st,card,diff,tuner_race,tuner_filter,non_tune
...
@@ -4306,6 +4342,10 @@ function Synchro.ApplyVariantState(st,card,diff,tuner_race,tuner_filter,non_tune
st
.
level_mapper
(
card
,
tc
),
st
.
level_mapper
(
card
,
tc
),
prune_level
prune_level
)
)
local
hand_inc
=
0
if
card
:
IsLocation
(
LOCATION_HAND
)
then
hand_inc
=
st
.
hand_count_mapper
(
card
,
tc
)
end
local
new_material_limit_filter
=
st
.
material_limit_filter
local
new_material_limit_filter
=
st
.
material_limit_filter
if
append_material_limit_filter
~=
nil
then
if
append_material_limit_filter
~=
nil
then
new_material_limit_filter
=
aux
.
AND
(
append_material_limit_filter
,
st
.
material_limit_filter
)
new_material_limit_filter
=
aux
.
AND
(
append_material_limit_filter
,
st
.
material_limit_filter
)
...
@@ -4316,8 +4356,9 @@ function Synchro.ApplyVariantState(st,card,diff,tuner_race,tuner_filter,non_tune
...
@@ -4316,8 +4356,9 @@ function Synchro.ApplyVariantState(st,card,diff,tuner_race,tuner_filter,non_tune
non_tuner_count
=
st
.
non_tuner_count
+
non_tuner_inc
,
non_tuner_count
=
st
.
non_tuner_count
+
non_tuner_inc
,
level_mapper
=
diff
.
level_mapper
or
st
.
level_mapper
,
level_mapper
=
diff
.
level_mapper
or
st
.
level_mapper
,
level_mapper_priority
=
diff
.
level_mapper_priority
or
st
.
level_mapper_priority
,
level_mapper_priority
=
diff
.
level_mapper_priority
or
st
.
level_mapper_priority
,
hand_count_mapper
=
diff
.
hand_count_mapper
or
st
.
hand_count_mapper
,
hand_count_limit
=
diff
.
hand_count_limit
or
st
.
hand_count_limit
,
hand_count_limit
=
diff
.
hand_count_limit
or
st
.
hand_count_limit
,
hand_count
=
st
.
hand_count
+
hand_inc
,
hand_count
=
diff
.
hand_count
or
st
.
hand_count
+
hand_inc
,
genomix_race
=
diff
.
genomix_race
or
st
.
genomix_race
,
genomix_race
=
diff
.
genomix_race
or
st
.
genomix_race
,
material_limit_filter
=
new_material_limit_filter
,
material_limit_filter
=
new_material_limit_filter
,
selected_roles
=
new_selected_roles
,
selected_roles
=
new_selected_roles
,
...
@@ -4370,10 +4411,8 @@ function Synchro.CanIncludeMaterial(mc,state,selected,tc,
...
@@ -4370,10 +4411,8 @@ function Synchro.CanIncludeMaterial(mc,state,selected,tc,
-- hand‐location count limit
-- hand‐location count limit
if
mc
:
IsLocation
(
LOCATION_HAND
)
and
index
>
prune_indexes
.
hand_prune_index
then
if
mc
:
IsLocation
(
LOCATION_HAND
)
and
index
>
prune_indexes
.
hand_prune_index
then
if
not
Synchro
.
IsRevolution
(
mc
,
tc
)
then
if
state
.
hand_count
+
state
.
hand_count_mapper
(
mc
,
tc
)
>
state
.
hand_count_limit
then
if
state
.
hand_count
+
1
>
state
.
hand_count_limit
then
return
false
,
nil
return
false
,
nil
end
end
end
end
end
...
@@ -4387,4 +4426,3 @@ function Synchro.CanIncludeMaterial(mc,state,selected,tc,
...
@@ -4387,4 +4426,3 @@ function Synchro.CanIncludeMaterial(mc,state,selected,tc,
return
true
,
append_material_limit_filter
return
true
,
append_material_limit_filter
end
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