Commit 865d5fd8 authored by wind2009's avatar wind2009

Fix

parent 4018616e
No preview for this file type
...@@ -156,4 +156,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -156,4 +156,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -193,4 +193,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -193,4 +193,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp)
g:DeleteGroup() g:DeleteGroup()
local tc=sg:GetFirst() local tc=sg:GetFirst()
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT) Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end end
\ No newline at end of file
...@@ -168,4 +168,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -168,4 +168,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
\ No newline at end of file
...@@ -154,4 +154,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -154,4 +154,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -175,4 +175,4 @@ function s.effval(e,re,rp) ...@@ -175,4 +175,4 @@ function s.effval(e,re,rp)
local c=e:GetLabelObject() local c=e:GetLabelObject()
local p=c:GetControler() local p=c:GetControler()
return rp==1-p return rp==1-p
end end
\ No newline at end of file
...@@ -166,4 +166,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -166,4 +166,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
end end
\ No newline at end of file
...@@ -178,4 +178,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -178,4 +178,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_CARD,0,id)
Duel.Damage(1-p,900,REASON_EFFECT) Duel.Damage(1-p,900,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -47,7 +47,7 @@ function s.thfilter(c) ...@@ -47,7 +47,7 @@ function s.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x2d5) and c:GetOriginalType()&TYPE_PENDULUM~=0 return c:IsFaceup() and c:IsSetCard(0x2d5) and c:GetOriginalType()&TYPE_PENDULUM~=0
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s:thfilter(chk) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,99,nil) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_ONFIELD,0,1,99,nil)
...@@ -61,14 +61,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,14 +61,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.pthfilter(c,tp) function s.pthfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x2d5) and c:IsControler(tp) return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x2d5) and c:IsControler(tp) and c:IsFaceup()
and (Duel.CheckLocation(tp,LOCATION_PZONE,0) and (Duel.CheckLocation(tp,LOCATION_PZONE,0)
or Duel.CheckLocation(tp,LOCATION_PZONE,1) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
or c:IsAbleToHand()) or c:IsAbleToHand())
end end
function s.pthcon(e,tp,eg,ep,ev,re,r,rp) function s.pthcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.pthfilter,1,nil,tp) return eg:IsExists(s.pthfilter,1,nil,tp)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.IsMainPhase()
end end
function s.pthtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.pthtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(s.pthfilter,nil,tp) local g=eg:Filter(s.pthfilter,nil,tp)
...@@ -76,7 +76,6 @@ function s.pthtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -76,7 +76,6 @@ function s.pthtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
end end
function s.pthop(e,tp,eg,ep,ev,re,r,rp) function s.pthop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(s.pthfilter,nil,tp) local g=eg:Filter(s.pthfilter,nil,tp)
local mg=g:Filter(Card.IsRelateToChain,nil) local mg=g:Filter(Card.IsRelateToChain,nil)
if mg:GetCount()>0 then if mg:GetCount()>0 then
...@@ -91,6 +90,7 @@ function s.pthop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,6 +90,7 @@ function s.pthop(e,tp,eg,ep,ev,re,r,rp)
if op==1 then if op==1 then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
else else
Duel.HintSelection(og)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
...@@ -104,10 +104,20 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -104,10 +104,20 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end end
end end
function s.ctfilter(c)
return c:GetCounter(0x73)>0
end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCounter(tp,1,0,0x73) local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_ONFIELD,0,nil)
if ct>0 then local tc=g:GetFirst()
Duel.RemoveCounter(tp,1,0,0x73,ct,REASON_EFFECT) local rmct=0
Duel.Damage(1-tp,ct*900,REASON_EFFECT) while tc do
local ct=tc:GetCounter(0x73)
rmct=rmct+ct
tc:RemoveCounter(tp,0x73,ct,REASON_EFFECT)
tc=g:GetNext()
end end
end if rmct>0 then
\ No newline at end of file Duel.Damage(1-tp,rmct*900,REASON_EFFECT)
end
end
...@@ -31,7 +31,7 @@ function s.zones(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function s.zones(e,tp,eg,ep,ev,re,r,rp)
return zone return zone
end end
function s.psfilter(c) function s.psfilter(c)
return c:IsSetCard(0x2d5) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() return c:IsSetCard(0x2d5) and c:IsAllTypes(TYPE_PENDULUM+TYPE_MONSTER) and not c:IsForbidden()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
...@@ -59,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
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