Commit 6c04aaf0 authored by Nemo Ma's avatar Nemo Ma

fix

parent cba17a4e
......@@ -10,14 +10,15 @@ function cm.initial_effect(c)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(function(e)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end)
e1:SetCondition(cm.con)
c:RegisterEffect(e1)
end
function cm.con(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1
end
......@@ -21,7 +21,7 @@ function cm.cfilter(c,tp)
return c:GetPreviousControler()==tp
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp) and Duel.GetTurnPlayer()~=tp
return eg:IsExists(cm.cfilter,1,nil,tp) and Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<=0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
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