Commit 7f4361f2 authored by Vury Leo's avatar Vury Leo

Check empty field

parent a7022cd9
......@@ -3,7 +3,6 @@ local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
-- aux.AddFusionProcCodeRep(c,89631139,2,true,true)
Fusion.AddFusionProcedure(c,{
slots={
Fusion.Slot.Code(89631139),
......
......@@ -3725,6 +3725,14 @@ function Fusion.FusionCondition(tc,slots,mat_filter,fgoalcheck,allow_extras,sele
return false
end
end
-- ensure there's at least one free Monster Zone if chkf requests a field-checked summon
if chkf~=PLAYER_NONE then
local tp=chkf&0xf
if Duel.GetLocationCountFromEx(tp,tp,mg,tc)<=0 then
return false
end
end
return true
end
......@@ -4379,8 +4387,8 @@ function Fusion.PatternsMinMax(patterns)
end
-- Helper: combine patterns into one operation function
function Fusion.MultiOperation(tc, patterns)
return function(e,tp,eg,ep,ev,re,rp,gc,chkf)
function Fusion.MultiOperation(tc,patterns)
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
-- filter patterns by any locked codes, once per operation
local locked=Fusion.LockedCodes
local active_patterns={}
......@@ -4417,7 +4425,7 @@ function Fusion.MultiOperation(tc, patterns)
end
while true do
local finishable=sg:GetCount()>=min_req and strict_cond(e, sg, gc, chkf)
local finishable=sg:GetCount()>=min_req and strict_cond(e,sg,gc,chkf)
local addable=Group.CreateGroup()
for _,mc in ipairs(eg_arr) do
......
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