Commit d7cd037b authored by POLYMER's avatar POLYMER

fix

parent 306cfab1
......@@ -70,19 +70,19 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.spfilter,1,nil,se)
end
function cm.refilter(c)
return c:IsAbleToRemove() and c:IsSetCard(0x9977) and c:IsFaceup()
function cm.refilter(c,tp)
return c:IsAbleToRemove() and c:IsSetCard(0x9977) and c:IsFaceup() and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or c:IsLocation(LOCATION_SZONE))
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_ONFIELD,0,1,nil) and c:IsSSetable() and c:GetFlagEffect(m-10)==0 end
if chk==0 then return Duel.IsExistingMatchingCard(cm.refilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and c:IsSSetable(true) and c:GetFlagEffect(m-10)==0 end
c:RegisterFlagEffect(m-10,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.refilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
end
......
......@@ -93,6 +93,20 @@ function cm.GetHandEffect(c,tc)
if cm.urara_cache[code] then return cm.urara_cache[code] end
local eset={}
local temp=Card.RegisterEffect
local _SetRange=Effect.SetRange
function Effect.SetRange(e,r,...)
table_range=table_range or {}
table_range[e]=r
return _SetRange(e,r,...)
end
if not Effect.GetRange then
function Effect.GetRange(e)
if table_range and table_range[e] then
return table_range[e]
end
return 0
end
end
Card.RegisterEffect=function(tc,e,f)
if (e:GetRange()&LOCATION_HAND)>0 and e:IsHasType(EFFECT_TYPE_IGNITION+EFFECT_TYPE_QUICK_F+EFFECT_TYPE_QUICK_O+EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_TRIGGER_O) then
local found=false
......
......@@ -69,7 +69,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if codelist2~=0 then
break
end
local l=Duel.GetRandomNumber(1,9999999)--math.random(1,9999999)
local l=Duel.GetRandomNumber(1,99999999)--math.random(1,9999999)
--local l=math.random(1,#cm.loaded_metatable_list2)
--local mt=cm.load_metatable(l)
local mt=cm.load_metatable_load(l)
......
......@@ -61,13 +61,13 @@ end
function c98920350.regop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabelObject():GetLabel()
e:GetLabelObject():SetLabel(ct+1)
if rp~=tp and re:GetHandler():IsType(e:GetLabel()) then
if rp~=tp and re:IsActiveType(e:GetLabel()) then
e:GetHandler():RegisterFlagEffect(98920350,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
end
function c98920350.damcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetFlagEffect(98920350)~=0 and re:GetHandler():IsType(e:GetLabel())
return ep~=tp and c:GetFlagEffect(98920350)~=0 and re:IsActiveType(e:GetLabel())
end
function c98920350.damop1(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabelObject():GetLabel()
......
......@@ -53,7 +53,7 @@ function c9911510.limop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(c9911510.chainlm)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
e:GetHandler():RegisterFlagEffect(9911510,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
......@@ -66,14 +66,14 @@ function c9911510.limop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c9911510.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(id)
e:GetHandler():ResetFlagEffect(9911510)
e:Reset()
end
function c9911510.limop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(id)~=0 then
if e:GetHandler():GetFlagEffect(9911510)~=0 then
Duel.SetChainLimitTillChainEnd(c9911510.chainlm)
end
e:GetHandler():ResetFlagEffect(id)
e:GetHandler():ResetFlagEffect(9911510)
end
function c9911510.chainlm(e,rp,tp)
return tp==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