Commit 4a2786ae authored by Aephiex's avatar Aephiex Committed by mercury233

Better Nirvana check (#1039)

parent e19bd978
...@@ -66,8 +66,7 @@ function c80896940.initial_effect(c) ...@@ -66,8 +66,7 @@ function c80896940.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c80896940.matfilter1(c) function c80896940.matfilter1(c)
return c:IsType(TYPE_TUNER) return c:IsType(TYPE_TUNER) or (c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM))
or (c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsNotTuner())
end end
function c80896940.indcon(e,tp,eg,ep,ev,re,r,rp) function c80896940.indcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
...@@ -124,15 +123,21 @@ function c80896940.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -124,15 +123,21 @@ function c80896940.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c80896940.mfilter(c) function c80896940.mfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsType(TYPE_TUNER) return c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end end
function c80896940.valcheck(e,c) function c80896940.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
if c:GetFlagEffect(80896940)~=0 or g:IsExists(c80896940.mfilter,1,nil) then local tg=g:Filter(c80896940.mfilter,nil)
e:GetLabelObject():SetLabel(1) for tc in aux.Next(tg) do
else g:RemoveCard(tc)
e:GetLabelObject():SetLabel(0) local flag=g:FilterCount(aux.NonTuner(Card.IsType,TYPE_SYNCHRO),nil)==g:GetCount()
g:AddCard(tc)
if flag then
e:GetLabelObject():SetLabel(1)
return
end
end end
e:GetLabelObject():SetLabel(0)
end end
function c80896940.lpop(e,tp,eg,ep,ev,re,r,rp) function c80896940.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2)) Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2))
......
...@@ -425,9 +425,6 @@ end ...@@ -425,9 +425,6 @@ end
function Auxiliary.SynMixOperation(f1,f2,f3,f4,minct,maxc) function Auxiliary.SynMixOperation(f1,f2,f3,f4,minct,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,c,smat,mg) return function(e,tp,eg,ep,ev,re,r,rp,c,smat,mg)
local g=e:GetLabelObject() local g=e:GetLabelObject()
if not g:IsExists(Card.IsType,1,nil,TYPE_TUNER) and c:IsHasEffect(80896940) then
c:RegisterFlagEffect(80896940,RESET_EVENT+0x1fe0000,0,1)
end
c:SetMaterial(g) c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup() g:DeleteGroup()
......
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