Commit 98f9633c authored by Vury Leo's avatar Vury Leo

hint level

parent 37cb08ee
--A・O・J カタストル
function c26593852.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
Synchro.AddSynchroProcedure(c)
-- aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
......
......@@ -3391,7 +3391,8 @@ function Synchro.AddSynchroProcedure(c,params)
local base_mapper=params.base_mapper or Synchro.LevelMapper
local e1=Effect.CreateEffect(c)
e1:SetDescription(1164)
-- e1:SetDescription(1164)
e1:SetDescription(1379) --- 启用扩展卡包调试模式
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......@@ -3415,7 +3416,7 @@ function Synchro.FindValidSelection(candidates,target_level,
end
local function is_flower(c)
return c:IsCode(57261568, 33541430, 89818984)
return c:IsCode(57261568,33541430,89818984)
end
table.sort(candidates,function(a,b)
......@@ -3608,9 +3609,16 @@ function Synchro.SynCondition(tuner_filter,non_tuner_filter,tuner_min,tuner_max,
return function(e,c,smat,mg,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
--- we do not support Accel Synchro yet
if smat~=nil then
return false
end
if mg~=nil and #mg>0 then
return false
end
local target_level=c:GetLevel()
mg=mg or Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,c:GetControler(),LOCATION_MZONE+LOCATION_HAND,0,nil)
mg=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,c:GetControler(),LOCATION_MZONE+LOCATION_HAND,0,nil)
local candidates={}
for mc in aux.Next(mg) do
table.insert(candidates,mc)
......@@ -3636,6 +3644,23 @@ function Synchro.SynTarget(tuner_filter,non_tuner_filter,tuner_min,tuner_max,non
local sg_arr=GroupToArray(sg)
local cg_arr=GroupToArray(mg-sg)
local target_level=tc:GetLevel()
local selected_level_min=target_level
local selected_states=Synchro.BuildStatesFromSelection(
sg_arr,
tuner_filter,non_tuner_filter,
base_mapper,
tc,math.huge
)
--- use the min select level as hint
for _,state in ipairs(selected_states) do
for lvl,_ in pairs(state.possible_sums) do
if lvl < selected_level_min then
selected_level_min=lvl
end
end
end
for _,candidate in ipairs(cg_arr) do
-- simulate adding candidate to sg_arr
local test_selection={}
......@@ -3676,7 +3701,7 @@ function Synchro.SynTarget(tuner_filter,non_tuner_filter,tuner_min,tuner_max,non
local finishable=Synchro.IsSelectionValid(sg_arr,target_level,tuner_filter,non_tuner_filter,tc,tuner_min,tuner_max,non_tuner_min,non_tuner_max)
local picked=Group.SelectUnselect(addable,sg,tp,finishable,true,tuner_min+non_tuner_min,Synchro.GetDisplayMax(tuner_max,non_tuner_max))
local picked=Group.SelectUnselect(addable,sg,tp,finishable,true,selected_level_min,target_level)
if not picked then
-- user clicked Complete
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment