Commit 771e0a10 authored by Vury Leo's avatar Vury Leo

fix extra material count limit

parent f5ddfb2d
Pipeline #37087 failed with stages
in 3 minutes and 41 seconds
...@@ -25,7 +25,6 @@ function s.fusfilter(c) ...@@ -25,7 +25,6 @@ function s.fusfilter(c)
if material_count~=nil and #material_count>=2 then if material_count~=nil and #material_count>=2 then
if material_count[2]<3 then if material_count[2]<3 then
return false return false
end end
end end
end end
......
...@@ -2641,8 +2641,12 @@ function FusionSpell.GetSummonOperation( ...@@ -2641,8 +2641,12 @@ function FusionSpell.GetSummonOperation(
---For each group, let user select the material that apply the extra material effect. ---For each group, let user select the material that apply the extra material effect.
for material_effect,grouped_materials in pairs(material_grouped_by_extra_material_effect) do for material_effect,grouped_materials in pairs(material_grouped_by_extra_material_effect) do
Duel.Hint(HINT_SELECTMSG,tp,material_effect:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,material_effect:GetDescription())
local extra_material_limit=#grouped_materials
--- in case of アマゾネスの秘術 or 影牢の呪縛, limit the maximuim number to choose --- in case of アマゾネスの秘術 or 影牢の呪縛, limit the maximuim number to choose
local extra_material_limit=material_effect:GetLabel() or #grouped_materials local material_effect_material_count_limit=({material_effect:GetLabel()})[1]
if material_effect_material_count_limit~= 0 then
extra_material_limit=material_effect_material_count_limit
end
local materials_to_apply=grouped_materials:Select(tp,0,extra_material_limit,nil) local materials_to_apply=grouped_materials:Select(tp,0,extra_material_limit,nil)
local rest_materials=grouped_materials-materials_to_apply local rest_materials=grouped_materials-materials_to_apply
if #rest_materials>0 then if #rest_materials>0 then
......
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