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