Commit 6718d74a authored by TanakaKotoha's avatar TanakaKotoha

last

parent 252ca53f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=17050001 local m=17050001
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableCounterPermit(0x170,LOCATION_PZONE+LOCATION_MZONE) c:EnableCounterPermit(0x37f2,LOCATION_PZONE+LOCATION_MZONE)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--summon with 3 tribute --summon with 3 tribute
...@@ -142,11 +142,11 @@ end ...@@ -142,11 +142,11 @@ end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
c:AddCounter(0x170,1) c:AddCounter(0x37f2,1)
end end
end end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp) function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x170)>=e:GetLabel() return e:GetHandler():GetCounter(0x37f2)>=e:GetLabel()
end end
function cm.efilter(e,te) function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
......
...@@ -66,7 +66,8 @@ end ...@@ -66,7 +66,8 @@ end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabelObject():GetLabel() local ct=e:GetLabelObject():GetLabel()
if ct>0 and Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_ONFIELD,0,1,nil) then if ct>0 and Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_ONFIELD,0,1,nil) then
local tc=Duel.SelectMatchingCard(tp,cm.ctfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local tc1=Duel.SelectMatchingCard(tp,cm.ctfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
tc:AddCounter(0x34f,ct) local tc=tc1:GetFirst()
tc:AddCounter(0x34f,ct,true)
end end
end end
\ No newline at end of file
...@@ -32,46 +32,23 @@ function cm.initial_effect(c) ...@@ -32,46 +32,23 @@ function cm.initial_effect(c)
e111:SetOperation(cm.operations) e111:SetOperation(cm.operations)
c:RegisterEffect(e111) c:RegisterEffect(e111)
end end
function cm.filters(c,p) function cm.seqfilter(c)
local tp=c:GetControler() return c:IsFaceup() and c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)
if c:IsType(TYPE_FIELD) then return false end
if not c:IsSetCard(0x374) then return false end
if c:IsLocation(LOCATION_PZONE) and c:IsType(TYPE_PENDULUM) then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
for i=0,4 do
if c:IsLocation(LOCATION_SZONE) and not c:IsType(TYPE_PENDULUM) and Duel.CheckLocation(tp,LOCATION_SZONE,i) then return true end
if c:IsLocation(LOCATION_MZONE) and Duel.CheckLocation(tp,LOCATION_MZONE,i) then return true end
end
return false
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.filters(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and cm.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filters,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(cm.seqfilter,tp,LOCATION_SZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) and Duel.GetLocationCount(tp,LOCATION_SZONE,tp,LOCATION_REASON_CONTROL)>0 end
local g=Duel.SelectTarget(tp,cm.filters,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,tp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
Duel.SelectTarget(tp,cm.seqfilter,tp,LOCATION_SZONE,0,1,1,nil)
end end
function cm.op(e,p,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local tp=tc:GetControler() if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local nseq=0 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
if not tc:IsRelateToEffect(e) then return end local s=Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,0)
local seq=tc:GetSequence() local nseq=math.log(s,2)-8
if tc:IsLocation(LOCATION_PZONE) and tc:IsType(TYPE_PENDULUM) and Duel.MoveSequence(tc,nseq)
(Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
if seq==0 then nseq=4
else nseq=0
end
end
if tc:IsLocation(LOCATION_SZONE) and not tc:IsType(TYPE_PENDULUM) then
if tc:IsControler(p) then
local s=Duel.SelectDisableField(p,1,LOCATION_SZONE,0,0)
nseq=math.log(s,2)-8
else
local s=Duel.SelectDisableField(p,1,0,LOCATION_SZONE,0)/0x10000
nseq=math.log(s,2)-8
end
end
Duel.MoveSequence(tc,nseq)
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x374) and c:IsAbleToDeck() return c:IsFaceup() and c:IsSetCard(0x374) and c:IsAbleToDeck()
......
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