Commit 3b301e8f authored by Nemo Ma's avatar Nemo Ma

f

parent ca3c3950
......@@ -18,7 +18,7 @@ function cm.initial_effect(c)
e2:SetOperation(cm.slop)
c:RegisterEffect(e2)
--Unaffected
local e3=Effect.CreateEffect(c)
--[[local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
......@@ -30,6 +30,14 @@ function cm.initial_effect(c)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetTarget(cm.etarget)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)--]]
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetRange(LOCATION_SZONE)
e4:SetTarget(cm.etarget)
e4:SetValue(cm.efilter)
c:RegisterEffect(e4)
--to hand
local e5=Effect.CreateEffect(c)
......
......@@ -54,7 +54,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(s.chlimit(ctype))
end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,dg,cg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,cg:GetCount(),0,0)
end
function s.chlimit(ctype)
return function(e,ep,tp)
......
......@@ -45,17 +45,19 @@ function s.wd(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.GetFlagEffect(tp,id)==0
end
function s.IsLpZone(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(0)==0 or Duel.GetLP(1)==0
return Duel.GetLP(0)<=0 or Duel.GetLP(1)<=0
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLP(0)==0 and Duel.GetFlagEffect(0,id)==0 then
if Duel.GetLP(0)<=0 and Duel.GetFlagEffect(0,id)==0 then
Duel.SetLP(0,0)
Duel.Recover(0,4000,REASON_EFFECT)
Duel.RegisterFlagEffect(0,id,nil,0,1)
local sg=Duel.GetMatchingGroup(s.cfilter,0,LOCATION_ONFIELD,0,nil)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REPLACE)
end
if Duel.GetLP(1)==0 and Duel.GetFlagEffect(1,id)==0 then
Duel.Recover(0,4000,REASON_EFFECT)
if Duel.GetLP(1)<=0 and Duel.GetFlagEffect(1,id)==0 then
Duel.SetLP(1,0)
Duel.Recover(1,4000,REASON_EFFECT)
Duel.RegisterFlagEffect(1,id,nil,0,1)
local sg=Duel.GetMatchingGroup(s.cfilter,1,LOCATION_ONFIELD,0,nil)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REPLACE)
......
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