Commit 0df627d4 authored by POLYMER's avatar POLYMER

fix

parent b5423d11
...@@ -138,9 +138,20 @@ function cm.chop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,9 +138,20 @@ function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(11451461) e1:SetValue(11451461)
sc:RegisterEffect(e1) sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetLabel(ev)
e2:SetLabelObject(e1)
e2:SetReset(RESET_CHAIN)
e2:SetOperation(cm.resetop)
Duel.RegisterEffect(e2,tp)
end end
end end
end end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
if ev==e:GetLabel() then e:GetLabelObject():Reset() end
end
function cm.chfilter(c,tc) function cm.chfilter(c,tc)
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end end
......
...@@ -113,6 +113,7 @@ end ...@@ -113,6 +113,7 @@ end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) 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_GRAVE,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_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE,0,nil)
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_TOHAND,g,1,0,0)
end end
...@@ -120,7 +121,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -120,7 +121,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
......
...@@ -7020,3 +7020,8 @@ function cm.DimpthoxEregop(e,tp,eg,ep,ev,re,r,rp) ...@@ -7020,3 +7020,8 @@ function cm.DimpthoxEregop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
c:RegisterFlagEffect(53766099,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,66) c:RegisterFlagEffect(53766099,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,66)
end end
function cm.GetCurrentPhase()
local ph=Duel.GetCurrentPhase()
if ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then ph=PHASE_BATTLE end
return ph
end
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function s.extg(e,tp,eg,ep,ev,re,r,rp,chk) function s.extg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(s.tdfilter,tp,0x70,0,1,nil) and c:GetFlagEffect(id)==0 end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(s.tdfilter,tp,0x70,0,1,nil) and c:GetFlagEffect(id)==0 end
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+Duel.GetCurrentPhase(),0,1) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+SNNM.GetCurrentPhase(),0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,0x70) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,0x70)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
...@@ -141,7 +141,7 @@ end ...@@ -141,7 +141,7 @@ end
function s.val(e,re,r,rp) function s.val(e,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:GetFlagEffect(id+33)==0 then if c:GetFlagEffect(id+33)==0 then
c:RegisterFlagEffect(id+33,RESET_EVENT+0x7e0000+RESET_PHASE+Duel.GetCurrentPhase(),0,1) c:RegisterFlagEffect(id+33,RESET_EVENT+0x7e0000+RESET_PHASE+SNNM.GetCurrentPhase(),0,1)
return true return true
else return false end else return false end
end end
......
...@@ -109,7 +109,7 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,7 +109,7 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(id) e1:SetCode(id)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetLabel(ac1,ac2) e1:SetLabel(ac1,ac2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+Duel.GetCurrentPhase()) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+SNNM.GetCurrentPhase())
c:RegisterEffect(e1,true) c:RegisterEffect(e1,true)
end end
function s.sumop(e,tp,eg,ep,ev,re,r,rp) function s.sumop(e,tp,eg,ep,ev,re,r,rp)
......
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