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

Check empty field

parent a7022cd9
...@@ -3,7 +3,6 @@ local s,id,o=GetID() ...@@ -3,7 +3,6 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
-- aux.AddFusionProcCodeRep(c,89631139,2,true,true)
Fusion.AddFusionProcedure(c,{ Fusion.AddFusionProcedure(c,{
slots={ slots={
Fusion.Slot.Code(89631139), Fusion.Slot.Code(89631139),
......
...@@ -3725,6 +3725,14 @@ function Fusion.FusionCondition(tc,slots,mat_filter,fgoalcheck,allow_extras,sele ...@@ -3725,6 +3725,14 @@ function Fusion.FusionCondition(tc,slots,mat_filter,fgoalcheck,allow_extras,sele
return false return false
end end
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 return true
end end
...@@ -4379,8 +4387,8 @@ function Fusion.PatternsMinMax(patterns) ...@@ -4379,8 +4387,8 @@ function Fusion.PatternsMinMax(patterns)
end end
-- Helper: combine patterns into one operation function -- Helper: combine patterns into one operation function
function Fusion.MultiOperation(tc, patterns) function Fusion.MultiOperation(tc,patterns)
return function(e,tp,eg,ep,ev,re,rp,gc,chkf) return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
-- filter patterns by any locked codes, once per operation -- filter patterns by any locked codes, once per operation
local locked=Fusion.LockedCodes local locked=Fusion.LockedCodes
local active_patterns={} local active_patterns={}
...@@ -4417,7 +4425,7 @@ function Fusion.MultiOperation(tc, patterns) ...@@ -4417,7 +4425,7 @@ function Fusion.MultiOperation(tc, patterns)
end end
while true do 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() local addable=Group.CreateGroup()
for _,mc in ipairs(eg_arr) do 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