Commit a073acd2 authored by Nemo Ma's avatar Nemo Ma

f

parent 2efbaae4
...@@ -172,4 +172,6 @@ function cm.sortop(e,tp,eg,ep,ev,re,r,rp) ...@@ -172,4 +172,6 @@ function cm.sortop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
if #mg[2]>0 then Duel.ConfirmCards(tp,mg[2]) end
if #mg[1]>0 then Duel.ConfirmCards(1-tp,mg[1]) end
end end
\ No newline at end of file
...@@ -137,36 +137,38 @@ function cm.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -137,36 +137,38 @@ function cm.scop(e,tp,eg,ep,ev,re,r,rp)
local ac=g:GetFirst() local ac=g:GetFirst()
local bc=g:GetNext() local bc=g:GetNext()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
local eid=e1:GetFieldID()
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetLabel(eid)
e1:SetCondition(cm.con) e1:SetCondition(cm.con)
if ac:IsAttribute(bc:GetAttribute()) and (ac:GetAttribute()==bc:GetAttribute() or Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))==0) then if ac:IsAttribute(bc:GetAttribute()) and (ac:GetAttribute()==bc:GetAttribute() or Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))==0) then
ac:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2)) ac:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,eid,aux.Stringid(m,2))
bc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2)) bc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,eid,aux.Stringid(m,2))
e1:SetTarget(cm.sumlimit) e1:SetTarget(cm.sumlimit)
else else
ac:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) ac:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,eid,aux.Stringid(m,3))
bc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) bc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,eid,aux.Stringid(m,3))
e1:SetTarget(cm.sumlimit2) e1:SetTarget(cm.sumlimit2)
end end
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.cfilter2(c) function cm.cfilter2(c,eid)
return c:IsFaceup() and c:GetFlagEffect(m)~=0 return c:IsFaceup() and c:GetFlagEffect(m)~=0 and c:GetFlagEffectLabel(m)==eid
end end
function cm.con(e) function cm.con(e)
return Duel.IsExistingMatchingCard(cm.cfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetLabel())
end end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp) function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
local g=Duel.GetMatchingGroup(cm.cfilter2,0,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.cfilter2,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel())
local ac=g:GetFirst() local ac=g:GetFirst()
local bc=g:GetNext() local bc=g:GetNext()
return not (c:IsAttribute(ac:GetAttribute()) and (not bc or c:IsAttribute(bc:GetAttribute()))) return not (c:IsAttribute(ac:GetAttribute()) and (not bc or c:IsAttribute(bc:GetAttribute())))
end end
function cm.sumlimit2(e,c,sump,sumtype,sumpos,targetp) function cm.sumlimit2(e,c,sump,sumtype,sumpos,targetp)
local g=Duel.GetMatchingGroup(cm.cfilter2,0,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.cfilter2,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel())
local ac=g:GetFirst() local ac=g:GetFirst()
local bc=g:GetNext() local bc=g:GetNext()
return not (not c:IsAttribute(ac:GetAttribute()) and (not bc or not c:IsAttribute(bc:GetAttribute()))) return not (not c:IsAttribute(ac:GetAttribute()) and (not bc or not c:IsAttribute(bc:GetAttribute())))
......
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