Commit e578b74c authored by POLYMER's avatar POLYMER

fix

parent f8bafe02
......@@ -119,14 +119,31 @@ end
function cm.seqfilter(c,tc,tp)
local x1,y1=cm.xylabel(c,tp)
local x2,y2=cm.xylabel(tc,tp)
return (math.abs(y1-y2)==1 or y1==y2) and math.abs(x1-x2)==1
return math.abs(y1-y2)<=1 and math.abs(x1-x2)<=1 and cm.islinkdir(tc,x1,y1,tp)
end
function cm.distarget(e,c)
return (c:IsType(TYPE_EFFECT+TYPE_SPELL+TYPE_TRAP) or c:GetOriginalType()&TYPE_EFFECT~=0) and cm.seqfilter(c,e:GetHandler(),0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and cm.seqfilter(re:GetHandler(),e:GetHandler(),0) then
local lc=e:GetHandler()
local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local x=seq
local y=0
if p==tp then
if loc&LOCATION_MZONE>0 and x<=4 then y=1
elseif loc&LOCATION_MZONE>0 and x==5 then x,y=1,2
elseif loc&LOCATION_MZONE>0 and x==6 then x,y=3,2
elseif loc&LOCATION_SZONE>0 and x<=4 then y=0
else x,y=-1,0.5 end
elseif p==1-tp then
if loc&LOCATION_MZONE>0 and x<=4 then x,y=4-x,3
elseif loc&LOCATION_MZONE>0 and x==5 then x,y=3,2
elseif loc&LOCATION_MZONE>0 and x==6 then x,y=1,2
elseif loc&LOCATION_SZONE>0 and x<=4 then x,y=4-x,4
else x,y=5,3.5 end
end
local x2,y2=cm.xylabel(lc,tp)
if bit.band(loc,LOCATION_ONFIELD)~=0 and math.abs(y-y2)<=1 and math.abs(x-x2)<=1 and cm.islinkdir(lc,x,y,tp) then
Duel.NegateEffect(ev)
end
end
......
......@@ -11,7 +11,7 @@ function c60151357.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,60151357)
e3:SetRange(LOCATION_SZONE)
e3:SetRange(LOCATION_FZONE)
e3:SetCost(c60151357.negcost)
e3:SetTarget(c60151357.sptg)
e3:SetOperation(c60151357.spop)
......@@ -23,7 +23,7 @@ function c60151357.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,6011357)
e3:SetRange(LOCATION_SZONE)
e3:SetRange(LOCATION_FZONE)
e3:SetTarget(c60151357.target)
e3:SetOperation(c60151357.activate)
c:RegisterEffect(e3)
......
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