Commit b9f71f49 authored by POLYMER's avatar POLYMER

fix

parent 5aceb926
--心连星 --心连星
--21.08.14 --21.08.14
--2021 Happy Chinese Valuntine's Day! --2021 Happy Chinese Valuntine's Day!
local m=11451620 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
...@@ -36,15 +35,14 @@ function cm.xylabel(c,tp) ...@@ -36,15 +35,14 @@ function cm.xylabel(c,tp)
return x,y return x,y
end end
function cm.gradient(y,x) function cm.gradient(y,x)
if y>0 and x==0 then return 100 end if y>0 and x==0 then return math.pi/2 end
if y<0 and x==0 then return 110 end if y<0 and x==0 then return math.pi*3/2 end
if y>0 and x~=0 then return y/x end if y>=0 and x>0 then return math.atan(y/x) end
if y<0 and x~=0 then return y/x+10 end if x<0 then return math.pi+math.atan(y/x) end
if y==0 and x>0 then return 0 end if y<0 and x>0 then return 2*math.pi+math.atan(y/x) end
if y==0 and x<0 then return 10 end
return 1000 return 1000
end end
function cm.fieldline(x1,y1,x2,y2,tp,...) function cm.fieldline(x1,y1,x2,y2,...)
for _,k in pairs({...}) do for _,k in pairs({...}) do
if cm.gradient(y2-y1,x2-x1)==k then return true end if cm.gradient(y2-y1,x2-x1)==k then return true end
end end
...@@ -53,10 +51,10 @@ end ...@@ -53,10 +51,10 @@ end
function cm.willbemutuallinked(c,lc,x0,y0,tp,tgp) function cm.willbemutuallinked(c,lc,x0,y0,tp,tgp)
if tp~=tgp then x0,y0=4-x0,4-y0 end if tp~=tgp then x0,y0=4-x0,4-y0 end
local x,y=cm.xylabel(c,tgp) local x,y=cm.xylabel(c,tgp)
local list={11,110,9,10,1000,0,-1,100,1} local list={5/4,3/2,7/4,1,1000,0,3/4,1/2,1/4}
local ct=c:IsControler(tgp) local ct=c:IsControler(tgp)
for i=0,8 do for i=0,8 do
if lc:IsLinkMarker(1<<i) and cm.fieldline(x0,y0,x,y,tgp,list[i+1]) and math.abs(x0-x)<=1 and math.abs(y0-y)<=1 and ((c:IsLinkMarker(1<<(8-i)) and ct) or (c:IsLinkMarker(1<<i) and not ct)) then return true end if lc:IsLinkMarker(1<<i) and cm.fieldline(x0,y0,x,y,list[i+1]*math.pi) and math.abs(x0-x)<=1 and math.abs(y0-y)<=1 and ((c:IsLinkMarker(1<<(8-i)) and ct) or (c:IsLinkMarker(1<<i) and not ct)) then return true end
end end
return false return false
end end
......
--电脑网路标 --电脑网路标
--22.01.07 --22.01.07
local m=11451649 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -33,15 +32,14 @@ function cm.xylabel(c,tp) ...@@ -33,15 +32,14 @@ function cm.xylabel(c,tp)
return x,y return x,y
end end
function cm.gradient(y,x) function cm.gradient(y,x)
if y>0 and x==0 then return 100 end if y>0 and x==0 then return math.pi/2 end
if y<0 and x==0 then return 110 end if y<0 and x==0 then return math.pi*3/2 end
if y>0 and x~=0 then return y/x end if y>=0 and x>0 then return math.atan(y/x) end
if y<0 and x~=0 then return y/x+10 end if x<0 then return math.pi+math.atan(y/x) end
if y==0 and x>0 then return 0 end if y<0 and x>0 then return 2*math.pi+math.atan(y/x) end
if y==0 and x<0 then return 10 end
return 1000 return 1000
end end
function cm.fieldline(x1,y1,x2,y2,tp,...) function cm.fieldline(x1,y1,x2,y2,...)
for _,k in pairs({...}) do for _,k in pairs({...}) do
if cm.gradient(y2-y1,x2-x1)==k then return true end if cm.gradient(y2-y1,x2-x1)==k then return true end
end end
...@@ -49,9 +47,9 @@ function cm.fieldline(x1,y1,x2,y2,tp,...) ...@@ -49,9 +47,9 @@ function cm.fieldline(x1,y1,x2,y2,tp,...)
end end
function cm.isdir(lc,x,y,tp) function cm.isdir(lc,x,y,tp)
local x0,y0=cm.xylabel(lc,tp) local x0,y0=cm.xylabel(lc,tp)
local list={11,110,9,10,1000,0,-1,100,1} local list={5/4,3/2,7/4,1,1000,0,3/4,1/2,1/4}
for i=0,8 do for i=0,8 do
if cm.fieldline(x0,y0,x,y,tp,list[i+1]) then return true,i end if cm.fieldline(x0,y0,x,y,list[i+1]*math.pi) then return true,i end
end end
return false,nil return false,nil
end end
...@@ -110,10 +108,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,10 +108,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e1:SetValue(lm) e1:SetValue(lm)
token:RegisterEffect(e1) token:RegisterEffect(e1)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
for i=0,8 do for i=0,8 do
if lm&(1<<(8-i))>0 then if lm&(1<<(8-i))>0 then
token:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,8-i)) token:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,i))
end end
end end
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end end
\ No newline at end of file
...@@ -19,6 +19,7 @@ function c67200350.initial_effect(c) ...@@ -19,6 +19,7 @@ function c67200350.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,67200350)
e1:SetCondition(c67200350.condition) e1:SetCondition(c67200350.condition)
e1:SetTarget(c67200350.target) e1:SetTarget(c67200350.target)
e1:SetOperation(c67200350.activate) e1:SetOperation(c67200350.activate)
...@@ -67,6 +68,7 @@ function c67200350.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,6 +68,7 @@ function c67200350.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
if not hc:IsLocation(LOCATION_GRAVE) then return end
if not Duel.Equip(tp,c,tc) then return end if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
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