Commit c1064d1a authored by POLYMER's avatar POLYMER

fix

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