Commit 68624cc8 authored by POLYMER's avatar POLYMER

fix

parent cfc20f8a
......@@ -97,13 +97,13 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
return #g>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,#g*2)
end
local g=Group.CreateGroup()
for i=1,Duel.GetCurrentChain() do
for i=1,Duel.GetCurrentChain()-1 do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
if tc:IsRelateToEffect(te) and (tc:IsReleasableByEffect() or (tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_SPELL+TYPE_TRAP) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_EFFECT) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_NONSUM) and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE))) then g:AddCard(tc) end
end
local hg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil,#g*2)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,hg,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
......@@ -111,7 +111,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
while type(cm[i])=="table" do
local te,tf,cid=table.unpack(cm[i])
local tc=te:GetHandler()
if ((i<=Duel.GetCurrentChain() and tc:IsRelateToEffect(te)) or (i>Duel.GetCurrentChain() and tf and tc:GetFlagEffect(m+2)>0)) and (tc:IsReleasableByEffect() or (tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_SPELL+TYPE_TRAP) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_EFFECT) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_NONSUM) and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE))) then g:AddCard(tc) end
if ((i<Duel.GetCurrentChain() and tc:IsRelateToEffect(te)) or (i>Duel.GetCurrentChain() and tf and tc:GetFlagEffect(m+2)>0)) and (tc:IsReleasableByEffect() or (tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_SPELL+TYPE_TRAP) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_EFFECT) and not tc:IsHasEffect(EFFECT_UNRELEASABLE_NONSUM) and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE))) then g:AddCard(tc) end
i=i+1
end
local hg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil,#g*2)
......
......@@ -134,7 +134,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
Card.RegisterEffect=function(card,effect,flag)
if effect:IsActivated() and effect:GetRange()&(LOCATION_ONFIELD+LOCATION_HAND+LOCATION_PZONE+LOCATION_FZONE)==effect:GetRange() and not ((effect:GetCode()==EVENT_TO_GRAVE or effect:GetCode()==EVENT_LEAVE_FIELD) and effect:IsHasType(EFFECT_TYPE_SINGLE)) then
--if cm.cloneeffects[effect] then return end
local eff=effect:Clone()
local eff=effect --:Clone()
if eff:IsHasType(EFFECT_TYPE_QUICK_O) and eff:GetCode()==EVENT_FREE_CHAIN then
if eff:GetRange()&LOCATION_MZONE>0 and card:GetOriginalCode()~=20248755 and card:GetOriginalCode()~=99953655 and card:GetOriginalCode()~=15000111 then eff:SetDescription(aux.Stringid(m,8)) end
if eff:GetRange()&LOCATION_SZONE>0 and card:GetOriginalCode()~=17016131 then eff:SetDescription(aux.Stringid(m,1)) end
......
......@@ -92,8 +92,8 @@ function cm.condition(e)
end
function cm.eftg(e,c)
local attchk=0
local a0=Duel.IsExistingMatchingCard(function(c) return c:GetSequence()==5 and c:IsCode(33900648) and not c:IsDisabled() end,1,LOCATION_FZONE,0,1,nil) and not Duel.IsPlayerAffectedByEffect(0,97811903)
local a1=Duel.IsExistingMatchingCard(function(c) return c:GetSequence()==5 and c:IsCode(33900648) and not c:IsDisabled() end,0,LOCATION_FZONE,0,1,nil) and not Duel.IsPlayerAffectedByEffect(1,97811903)
local a0=Duel.IsExistingMatchingCard(function(c) return c:GetSequence()==5 and c:IsCode(33900648) and not c:IsDisabled() end,1,LOCATION_SZONE,0,1,nil) and not Duel.IsPlayerAffectedByEffect(0,97811903)
local a1=Duel.IsExistingMatchingCard(function(c) return c:GetSequence()==5 and c:IsCode(33900648) and not c:IsDisabled() end,0,LOCATION_SZONE,0,1,nil) and not Duel.IsPlayerAffectedByEffect(1,97811903)
local b0=a1 and Duel.IsPlayerAffectedByEffect(0,6089145)
local b1=a1 and Duel.IsPlayerAffectedByEffect(1,6089145)
if a0 or a1 then
......@@ -144,7 +144,21 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if #tg>0 then
local tc=tg:GetFirst()
local code=g:GetFirst():GetOriginalCode()
local cregister=Card.RegisterEffect
Card.RegisterEffect=function(card,effect,flag)
local eff=effect --:Clone()
if eff:GetDescription()==0 then eff:SetDescription(aux.Stringid(m,2)) end
if eff:GetRange()&(LOCATION_SZONE+LOCATION_PZONE+LOCATION_FZONE)>0 then
eff:SetRange(LOCATION_MZONE)
end
if eff:IsHasType(EFFECT_TYPE_ACTIVATE) then
eff:SetType(EFFECT_TYPE_QUICK_O)
if not eff:GetOperation() then return end
end
return cregister(card,eff,flag)
end
local cid=tc:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
Card.RegisterEffect=cregister
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
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