Commit c43a5563 authored by Nemo Ma's avatar Nemo Ma

fix

parent 72b210fe
...@@ -143,11 +143,25 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -143,11 +143,25 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function cm.cfilter(c,syn,mg)
return c:IsSetCard(0x6977) and syn:IsLinkSummonable(mg,c)
end
function cm.scfilter(c,mg)
return mg:IsExists(cm.cfilter,1,nil,c,mg)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_MZONE,0,nil)
local mg2=Duel.GetOverlayGroup(tp,1,1):Filter(cm.matfilter,nil) local mg2=Duel.GetOverlayGroup(tp,1,1):Filter(cm.matfilter,nil)
mg:Merge(mg2) mg:Merge(mg2)
local g=Duel.GetMatchingGroup(cm.scfilter,tp,LOCATION_EXTRA,0,nil,mg)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local tg=mg:FilterSelect(tp,cm.cfilter,1,1,nil,sg:GetFirst())
Duel.LinkSummon(tp,sg:GetFirst(),mg,tg:GetFirst())
end
--[[Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.GCheckAdditional=cm.fselect aux.GCheckAdditional=cm.fselect
local g=Duel.SelectMatchingCard(tp,Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,1,nil,mg) local g=Duel.SelectMatchingCard(tp,Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,1,nil,mg)
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
...@@ -163,5 +177,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -163,5 +177,5 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
return _SendtoGrave(g,r) return _SendtoGrave(g,r)
end end
Duel.LinkSummon(tp,tc,mg) Duel.LinkSummon(tp,tc,mg)
end end--]]
end end
\ No newline at end of file
...@@ -15,15 +15,16 @@ function cm.initial_effect(c) ...@@ -15,15 +15,16 @@ function cm.initial_effect(c)
end end
if not cm.jjygone then if not cm.jjygone then
cm.jjygone=true cm.jjygone=true
cm._send_to_hand=Duel.SendtoHand local cm_send_to_hand=Duel.SendtoHand
Duel.SendtoHand=function (c,tp,rea,...) Duel.SendtoHand=function (c,tp,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil) local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._send_to_hand(ac,tp,rea,...)
--Duel.ResetFlagEffect(tp,m) --Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
return cm_send_to_hand(ac,tp,rea,...)
else else
cm._send_to_hand(c,tp,rea,...) return cm_send_to_hand(c,tp,rea,...)
end end
end end
end end
......
...@@ -15,26 +15,33 @@ function cm.initial_effect(c) ...@@ -15,26 +15,33 @@ function cm.initial_effect(c)
end end
if not cm.jjygtwo then if not cm.jjygtwo then
cm.jjygtwo=true cm.jjygtwo=true
cm._special_summon=Duel.SpecialSummon local cm_special_summon=Duel.SpecialSummon
Duel.SpecialSummon=function (c,way,tp1,tp2,tf1,tf2,pos,...) Duel.SpecialSummon=function (c,way,tp1,tp2,tf1,tf2,pos,...)
--local tp=c:GetOwner()
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_EXTRA)) then if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_EXTRA)) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil) local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._special_summon(ac,way,tp1,tp2,tf1,tf2,pos,...)
--Duel.ResetFlagEffect(tp,m) --Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
--local x=
--Debug.Message(x)
return cm_special_summon(ac,way,tp1,tp2,tf1,tf2,pos,...)
else else
cm._special_summon(c,way,tp1,tp2,tf1,tf2,pos,...) --local x=
--Debug.Message(x)
return cm_special_summon(c,way,tp1,tp2,tf1,tf2,pos,...)
end end
end end
cm._special_summon_step=Duel.SpecialSummonStep local cm_special_summon_step=Duel.SpecialSummonStep
Duel.SpecialSummonStep=function (c,way,tp1,tp2,tf1,tf2,pos,...) Duel.SpecialSummonStep=function (c,way,tp1,tp2,tf1,tf2,pos,...)
local tp=c:GetOwner()
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_EXTRA)) then if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_EXTRA)) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil) local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._special_summon_step(ac,way,tp1,tp2,tf1,tf2,pos,...)
--Duel.ResetFlagEffect(tp,m) --Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
return cm_special_summon_step(ac,way,tp1,tp2,tf1,tf2,pos,...)
else else
cm._special_summon_step(c,way,tp1,tp2,tf1,tf2,pos,...) return cm_special_summon_step(c,way,tp1,tp2,tf1,tf2,pos,...)
end end
end end
end end
......
...@@ -15,15 +15,16 @@ function cm.initial_effect(c) ...@@ -15,15 +15,16 @@ function cm.initial_effect(c)
end end
if not cm.jjygthree then if not cm.jjygthree then
cm.jjygthree=true cm.jjygthree=true
cm._remove=Duel.Remove local cm_remove=Duel.Remove
Duel.Remove=function (c,pos,rea,...) Duel.Remove=function (c,pos,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil) local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._remove(ac,pos,rea,...)
--Duel.ResetFlagEffect(tp,m) --Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
return cm_remove(ac,pos,rea,...)
else else
cm._remove(c,pos,rea,...) return cm_remove(c,pos,rea,...)
end end
end end
end end
......
...@@ -15,15 +15,16 @@ function cm.initial_effect(c) ...@@ -15,15 +15,16 @@ function cm.initial_effect(c)
end end
if not cm.jjygfour then if not cm.jjygfour then
cm.jjygfour=true cm.jjygfour=true
cm._destroy=Duel.Destroy local cm_destroy=Duel.Destroy
Duel.Destroy=function (c,rea,...) Duel.Destroy=function (c,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil) local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._destroy(ac,rea,...)
--Duel.ResetFlagEffect(tp,m) --Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
return cm_destroy(ac,rea,...)
else else
cm._destroy(c,rea,...) return cm_destroy(c,rea,...)
end end
end end
end end
......
...@@ -15,26 +15,31 @@ function cm.initial_effect(c) ...@@ -15,26 +15,31 @@ function cm.initial_effect(c)
end end
if not cm.jjygfive then if not cm.jjygfive then
cm.jjygfive=true cm.jjygfive=true
cm._special_summon=Duel.SpecialSummon local cm_special_summon=Duel.SpecialSummon
Duel.SpecialSummon=function (c,way,tp1,tp2,tf1,tf2,pos,...) Duel.SpecialSummon=function (c,way,tp1,tp2,tf1,tf2,pos,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE)) then if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE)) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil) local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._special_summon(ac,way,tp1,tp2,tf1,tf2,pos,...)
--Duel.ResetFlagEffect(tp,m) --Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
--local x=cm_special_summon(ac,way,tp1,tp2,tf1,tf2,pos,...)
--Debug.Message(x)
return cm_special_summon(ac,way,tp1,tp2,tf1,tf2,pos,...)
else else
cm._special_summon(c,way,tp1,tp2,tf1,tf2,pos,...) --local x=cm_special_summon(c,way,tp1,tp2,tf1,tf2,pos,...)
--Debug.Message(x)
return cm_special_summon(c,way,tp1,tp2,tf1,tf2,pos,...)
end end
end end
cm._special_summon_step=Duel.SpecialSummonStep local cm_special_summon_step=Duel.SpecialSummonStep
Duel.SpecialSummonStep=function (c,way,tp1,tp2,tf1,tf2,pos,...) Duel.SpecialSummonStep=function (c,way,tp1,tp2,tf1,tf2,pos,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE)) then if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) and (c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_GRAVE)) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil) local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._special_summon_step(ac,way,tp1,tp2,tf1,tf2,pos,...)
--Duel.ResetFlagEffect(tp,m) --Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
return cm_special_summon_step(ac,way,tp1,tp2,tf1,tf2,pos,...)
else else
cm._special_summon_step(c,way,tp1,tp2,tf1,tf2,pos,...) return cm_special_summon_step(c,way,tp1,tp2,tf1,tf2,pos,...)
end end
end end
end end
......
...@@ -15,15 +15,15 @@ function cm.initial_effect(c) ...@@ -15,15 +15,15 @@ function cm.initial_effect(c)
end end
if not cm.jjygsix then if not cm.jjygsix then
cm.jjygsix=true cm.jjygsix=true
cm._release=Duel.Release local cm_release=Duel.Release
Duel.Release=function (c,rea,...) Duel.Release=function (c,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil) local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._release(ac,rea,...) cm_release(ac,rea,...)
--Duel.ResetFlagEffect(tp,m) --Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
else else
cm._release(c,rea,...) cm_release(c,rea,...)
end end
end end
end end
......
...@@ -15,15 +15,15 @@ function cm.initial_effect(c) ...@@ -15,15 +15,15 @@ function cm.initial_effect(c)
end end
if not cm.jjygseven then if not cm.jjygseven then
cm.jjygseven=true cm.jjygseven=true
cm._send_to_grave=Duel.SendtoGrave local cm_send_to_grave=Duel.SendtoGrave
Duel.SendtoGrave=function (c,rea,...) Duel.SendtoGrave=function (c,rea,...)
if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then if Duel.GetFlagEffect(tp,m)~=0 and Duel.IsExistingMatchingCard(cm.fil,tp,LOCATION_DECK,0,1,nil) then
local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil) local ac=Duel.SelectMatchingCard(tp,cm.fil,tp,LOCATION_DECK,0,1,1,nil)
cm._send_to_grave(ac,rea,...) cm_send_to_grave(ac,rea,...)
--Duel.ResetFlagEffect(tp,m) --Duel.ResetFlagEffect(tp,m)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
else else
cm._send_to_grave(c,rea,...) cm_send_to_grave(c,rea,...)
end end
end end
end end
......
...@@ -229,7 +229,7 @@ function MTC.SEffect(c,code,event,doing,loc,fil,minnum,maxnum) ...@@ -229,7 +229,7 @@ function MTC.SEffect(c,code,event,doing,loc,fil,minnum,maxnum)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
if doing==1 then if doing==1 then
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
else if doing==2 then elseif doing==2 then
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
end end
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
...@@ -248,6 +248,7 @@ function MTC.SEffect(c,code,event,doing,loc,fil,minnum,maxnum) ...@@ -248,6 +248,7 @@ function MTC.SEffect(c,code,event,doing,loc,fil,minnum,maxnum)
e1:SetLabel(loc,fil,minnum,maxnum) e1:SetLabel(loc,fil,minnum,maxnum)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function MTC.sitg1(e,tp,eg,ep,ev,re,r,rp,chk) function MTC.sitg1(e,tp,eg,ep,ev,re,r,rp,chk)
local loc,fil,minnum,maxnum=e:GetLabel() local loc,fil,minnum,maxnum=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(fil,tp,loc,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(fil,tp,loc,0,1,nil) end
......
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