Commit 43a27fbd authored by POLYMER's avatar POLYMER

fix

parent bdc945e7
......@@ -25,25 +25,38 @@ end
function s.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x6223) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.ovfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,tc)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0
and g:GetCount()>0 and Duel.CheckLPCost(tp,2000)and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.PayLPCost(tp,2000)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,2,2,nil)
Duel.Overlay(tc,sg)
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler())
if #g>0 then
local tc=g:GetFirst()
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.ovfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,tc,e)
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0
and #mg>0 and Duel.CheckLPCost(tp,2000)and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.PayLPCost(tp,2000)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local xg=mg:Select(tp,2,2,nil)
local tc1=xg:GetFirst()
while tc1 do
tc1:CancelToGrave()
local og=tc1:GetOverlayGroup()
if #og>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
tc1=xg:GetNext()
end
Duel.Overlay(tc,xg)
end
end
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsCanOverlay() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3223)
end
......@@ -53,14 +66,15 @@ end
function s.posfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x223) and c:IsCanChangePosition()
end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil)
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function s.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 and Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 then
local tg=Duel.GetMatchingGroup(s.posfilter2,tp,LOCATION_MZONE,0,nil)
if Duel.CheckLPCost(tp,1000)and Duel.SelectYesNo(tp,aux.Stringid(id,2))then
......
......@@ -66,13 +66,13 @@ function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_GRAVE) and rc:GetFlagEffect(m)>0
end
function cm.cfilter(c)
function cm.costfilter(c)
return c:IsFaceup() and c:IsCode(m-2) and c:IsAbleToHandAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
function cm.actarget(e,te,tp)
......
......@@ -41,7 +41,8 @@ function cm.aclimit(e,re,tp)
return re:GetCode()==1100 or re:GetCode()==1101 or re:GetCode()==1102
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(function(c)return c:GetFlagEffect(m)==0 end,0,0xff,0xff,nil)
local sg=Group.__add(Duel.GetMatchingGroup(nil,0,0xff,0xff,nil),Duel.GetOverlayGroup(tp,1,1))
local g=sg:Filter(function(c)return c:GetFlagEffect(m)==0 end,nil)
if #g==0 then return end
local cp={}
local f=Card.RegisterEffect
......
......@@ -21,9 +21,9 @@ function c67200420.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_TO_HAND)
e2:SetCondition(c67200400.ctcon)
--e2:SetTarget(c67200400.cttg)
e2:SetOperation(c67200400.ctop)
e2:SetCondition(c67200420.ctcon)
--e2:SetTarget(c67200420.cttg)
e2:SetOperation(c67200420.ctop)
c:RegisterEffect(e2)
--pendulum scale up
local e3=Effect.CreateEffect(c)
......@@ -31,7 +31,7 @@ function c67200420.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetRange(LOCATION_PZONE)
e3:SetValue(c67200400.scaledown)
e3:SetValue(c67200420.scaledown)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_RSCALE)
......@@ -62,21 +62,21 @@ function c67200420.pcop(e,tp,eg,ep,ev,re,r,rp)
end
end
--
function c67200400.ctfilter(c,tp)
function c67200420.ctfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsType(TYPE_PENDULUM) and c:IsPreviousSetCard(0x5671)
end
function c67200400.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200400.ctfilter,1,nil,tp)
function c67200420.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200420.ctfilter,1,nil,tp)
end
function c67200400.actfilter(c)
function c67200420.actfilter(c)
return c:IsSetCard(0x3671) and not c:IsForbidden()
end
function c67200400.ctop(e,tp,eg,ep,ev,re,r,rp)
function c67200420.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:GetHandler():AddCounter(0x671,2)
if Duel.IsPlayerCanDraw(tp,1) and c:GetCounter(0x671)>5 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and c:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(67200400,2)) then
if Duel.IsPlayerCanDraw(tp,1) and c:GetCounter(0x671)>5 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and c:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(67200420,2)) then
Duel.BreakEffect()
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
......@@ -84,7 +84,7 @@ function c67200400.ctop(e,tp,eg,ep,ev,re,r,rp)
end
end
--
function c67200400.scaledown(e,c)
function c67200420.scaledown(e,c)
local count=c:GetCounter(0x671)
local a=0
if count>6 then
......
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