Commit c1064d1a authored by POLYMER's avatar POLYMER

fix

parent 5dcc4fdf
...@@ -36,15 +36,17 @@ function cm.initial_effect(c) ...@@ -36,15 +36,17 @@ function cm.initial_effect(c)
local _SpecialSummon=Duel.SpecialSummon local _SpecialSummon=Duel.SpecialSummon
local _SpecialSummonStep=Duel.SpecialSummonStep local _SpecialSummonStep=Duel.SpecialSummonStep
function Duel.SpecialSummon(tg,...) function Duel.SpecialSummon(tg,...)
tg:KeepAlive() if aux.GetValueType(tg)=="Group" then
cm[1]=tg tg:KeepAlive()
cm[1]=tg
end
return _SpecialSummon(tg,...) return _SpecialSummon(tg,...)
end end
function Duel.SpecialSummonStep(tg,...) --[[function Duel.SpecialSummonStep(tg,...)
tg:KeepAlive() tg:KeepAlive()
cm[1]=tg cm[1]=tg
return _SpecialSummonStep(tg,...) return _SpecialSummonStep(tg,...)
end end--]]
end end
end end
function cm.matfilter(c) function cm.matfilter(c)
......
...@@ -114,7 +114,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -114,7 +114,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -26,9 +26,9 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,9 +26,9 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
for i=1,Duel.GetCurrentChain() do for i=1,Duel.GetCurrentChain() do
local tgp,te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_EFFECT) local tgp,te,cid=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_EFFECT,CHAININFO_CHAIN_ID)
if tgp~=tp then if tgp~=tp then
te:SetOperation(cm.repop(te:GetOperation())) te:SetOperation(cm.repop(te:GetOperation(),cid))
--[[local e1=Effect.CreateEffect(e:GetHandler()) --[[local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
...@@ -44,10 +44,11 @@ function cm.ngop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,10 +44,11 @@ function cm.ngop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(0,cm.repop(re:GetOperation())) Duel.ChangeChainOperation(0,cm.repop(re:GetOperation()))
end end
end end
function cm.repop(_op) function cm.repop(_op,cid)
return function(e,tp,eg,ep,ev,re,r,rp) return function(e,tp,eg,ep,ev,re,r,rp)
e:SetOperation(_op) e:SetOperation(_op)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then return end local cid2=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if cid==cid2 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then return end
_op(e,tp,eg,ep,ev,re,r,rp) _op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
\ No newline at end of file
...@@ -20,7 +20,7 @@ function c22050280.initial_effect(c) ...@@ -20,7 +20,7 @@ function c22050280.initial_effect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_DETACH_MATERIAL) e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,22050280) e2:SetCountLimit(1,22050281)
e2:SetTarget(c22050280.xyztg) e2:SetTarget(c22050280.xyztg)
e2:SetOperation(c22050280.xyzop) e2:SetOperation(c22050280.xyzop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -82,15 +82,17 @@ function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,15 +82,17 @@ function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return false end if ft<=0 then return false end
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,c) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,c)
aux.GCheckAdditional=s.hspgcheck --aux.GCheckAdditional=s.hspgcheck
local res=g:CheckSubGroup(s.hspcheck,1,#g) --local res=g:CheckSubGroup(s.hspcheck,1,#g)
aux.GCheckAdditional=nil --aux.GCheckAdditional=nil
local res=g:CheckWithSumGreater(Card.GetLevel,8)
if chk==0 then return res end if chk==0 then return res end
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,c) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
aux.GCheckAdditional=s.hspgcheck --aux.GCheckAdditional=s.hspgcheck
local sg=g:SelectSubGroup(tp,s.hspcheck,true,1,#g) --local sg=g:SelectSubGroup(tp,s.hspcheck,true,1,#g)
aux.GCheckAdditional=nil --aux.GCheckAdditional=nil
local sg=g:SelectWithSumGreater(tp,Card.GetLevel,8)
Duel.SendtoDeck(sg,nil,2,REASON_COST) Duel.SendtoDeck(sg,nil,2,REASON_COST)
end end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
......
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