Commit 63f99584 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent e16e6b7c
...@@ -91,7 +91,6 @@ function c30556010.cfilter(c) ...@@ -91,7 +91,6 @@ function c30556010.cfilter(c)
return c:IsType(TYPE_SYNCHRO) return c:IsType(TYPE_SYNCHRO)
end end
function c30556010.damcon(e,tp,eg,ep,ev,re,r,rp) function c30556010.damcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler()
return Duel.IsExistingMatchingCard(c30556010.cfilter,tp,LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(c30556010.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end end
--to hand --to hand
...@@ -113,7 +112,7 @@ function c30556010.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,7 +112,7 @@ function c30556010.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c30556010.qfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c30556010.qfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
end end
...@@ -9,6 +9,8 @@ function cm.initial_effect(c) ...@@ -9,6 +9,8 @@ function cm.initial_effect(c)
local e3=rsef.RegisterClone(c,e2,"code",EVENT_SUMMON_SUCCESS) local e3=rsef.RegisterClone(c,e2,"code",EVENT_SUMMON_SUCCESS)
local e4=rsef.RegisterClone(c,e2,"code",EVENT_FLIP_SUMMON_SUCCESS) local e4=rsef.RegisterClone(c,e2,"code",EVENT_FLIP_SUMMON_SUCCESS)
local e5=rsef.RegisterClone(c,e2,"code",EVENT_TO_GRAVE,"op",cm.limitop2) local e5=rsef.RegisterClone(c,e2,"code",EVENT_TO_GRAVE,"op",cm.limitop2)
local e7=rsef.FC(c,EVENT_CHAIN_END)
e7:SetOperation(cm.limitop3)
local e6=rsef.STO(c,EVENT_REMOVE,{m,1},{1,m+100},"th","de,dsp",nil,nil,rsop.target(cm.thfilter2,"th",LOCATION_GRAVE),cm.thop2) local e6=rsef.STO(c,EVENT_REMOVE,{m,1},{1,m+100},"th","de,dsp",nil,nil,rsop.target(cm.thfilter2,"th",LOCATION_GRAVE),cm.thop2)
end end
function cm.thfilter(c) function cm.thfilter(c)
...@@ -37,19 +39,31 @@ end ...@@ -37,19 +39,31 @@ end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:GetSummonPlayer()~=tp return c:GetSummonPlayer()~=tp
end end
function cm.limitop(e,tp,eg,ep,ev,re,r,rp) function cm.limitop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.cfilter,1,nil,tp) then if not eg:IsExists(cm.cfilter,1,nil,tp) then return end
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(cm.chlimit) Duel.SetChainLimitTillChainEnd(cm.chlimit)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
end end
function cm.cfilter2(c,tp) function cm.cfilter2(c,tp)
return c:GetOwner()~=tp return c:GetOwner()~=tp
end end
function cm.limitop2(e,tp,eg,ep,ev,re,r,rp) function cm.limitop2(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.cfilter2,1,nil,tp) then if not eg:IsExists(cm.cfilter2,1,nil,tp) then return end
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(cm.chlimit) Duel.SetChainLimitTillChainEnd(cm.chlimit)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
end end
function cm.limitop3(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(m)~=0 then
Duel.SetChainLimitTillChainEnd(cm.chlimit)
end
e:GetHandler():ResetFlagEffect(m)
end
function cm.chlimit(e,ep,tp) function cm.chlimit(e,ep,tp)
return tp==ep return tp==ep
end end
......
...@@ -73,34 +73,32 @@ end ...@@ -73,34 +73,32 @@ end
function c81005001.sscon(e,tp,eg,ep,ev,re,r,rp) function c81005001.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function c81005001.filter(c) function c81005001.filter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c81005001.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,c,c:GetCode())
end end
function c81005001.filter1(c,g) function c81005001.filter2(c,code)
return g:IsExists(Card.IsCode,1,c,c:GetCode()) return c:IsType(TYPE_MONSTER) and c:IsCode(code) and c:IsAbleToHand()
end end
function c81005001.target(e,tp,eg,ep,ev,re,r,rp,chk) function c81005001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.IsExistingMatchingCard(c81005001.filter,tp,LOCATION_DECK,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(c81005001.filter,tp,LOCATION_DECK,0,nil)
return g:IsExists(c81005001.filter1,1,nil,g)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end end
function c81005001.operation(e,tp,eg,ep,ev,re,r,rp) function c81005001.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c81005001.filter,tp,LOCATION_DECK,0,nil)
local sg=g:Filter(c81005001.filter1,nil,g)
if sg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=sg:Select(tp,1,1,nil) local g1=Duel.SelectMatchingCard(tp,c81005001.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
local hc=sg:Filter(Card.IsCode,hg:GetFirst(),hg:GetFirst():GetCode()):GetFirst() if g1:GetCount()<=0 then return end
hg:AddCard(hc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.SendtoHand(hg,nil,REASON_EFFECT) local g2=Duel.SelectMatchingCard(tp,c81005001.filter2,tp,LOCATION_DECK,0,1,1,g1,g1:GetFirst():GetCode())
Duel.ConfirmCards(1-tp,hg) g1:Merge(g2)
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.SendtoHand(g1,nil,REASON_EFFECT)>0 then
e1:SetType(EFFECT_TYPE_FIELD) Duel.ConfirmCards(1-tp,g1)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e1,tp) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
end end
...@@ -54,7 +54,7 @@ function c81017009.spfilter(c,tp) ...@@ -54,7 +54,7 @@ function c81017009.spfilter(c,tp)
and c:IsAbleToChangeControler() and c:IsAbleToChangeControler()
end end
function c81017009.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81017009.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c81017009.spfilter(chkc,tp) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c81017009.spfilter(chkc,tp) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c81017009.spfilter,tp,0,LOCATION_MZONE,1,nil,tp) end and Duel.IsExistingTarget(c81017009.spfilter,tp,0,LOCATION_MZONE,1,nil,tp) 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