Commit fd58e051 authored by Nemo Ma's avatar Nemo Ma

fix

parent 33a95229
......@@ -2,6 +2,7 @@
local m=25800256
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
......
......@@ -36,16 +36,14 @@ function c3053.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c3053.sgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:GetControler(tp) and chkc:GetLocation(LOCATION_DECK) end
if chk==0 then return Duel.IsExistingTarget(c3053.sgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c3053.sgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(c3053.sgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c3053.sgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c3053.sgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c3053.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -76,23 +76,22 @@ function c3057.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c3057.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=Duel.GetChainInfo(tp,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(sg,REASON_EFFECT)
Duel.BreakEffect()
sg=Duel.GetOperatedGroup()
local d1=0
local d1=tp
local tc=sg:GetFirst()
while tc do
if tc then
if tc:GetPreviousControler()~=0 then
if tc:GetPreviousControler()==tp then
d1=d1+1
end
end
tc=sg:GetNext()
end
if d1>0 then
Duel.Draw(1,d1,REASON_EFFECT)
Duel.Draw(tp,d1,REASON_EFFECT)
end
end
function c3057.afilter(c)
......
......@@ -36,7 +36,7 @@ function c3063.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,3065)
e4:SetCost(c3063.sgcost)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c3063.sgtg)
e4:SetOperation(c3063.sgop)
c:RegisterEffect(e4)
......@@ -98,20 +98,14 @@ end
function c3063.sgfilter(c)
return c:IsSetCard(0x1012) and c:IsAbleToGrave()
end
function c3063.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c3063.sgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:GetControler(tp) and chkc:GetLocation(LOCATION_DECK) end
if chk==0 then return Duel.IsExistingTarget(c3063.sgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c3063.sgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(c3063.sgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c3063.sgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c3063.sgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -21,7 +21,7 @@ function c3075.initial_effect(c)
e2:SetOperation(c3075.spop2)
c:RegisterEffect(e2)
end
function c3075.cfilter1(c)
function c3075.cfilter1(c,tp)
return c:IsSetCard(0x1012) and c:IsAbleToGraveAsCost()
end
function c3075.cfilter2(c)
......@@ -31,12 +31,13 @@ function c3075.filter(c,e,tp)
return c:IsSetCard(0x1012) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c3075.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c3075.cfilter1,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c3075.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c3075.cfilter1,tp,LOCATION_HAND,0,1,c)
and Duel.IsExistingMatchingCard(c3075.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c3075.cfilter1,tp,LOCATION_HAND,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,c3075.cfilter1,tp,LOCATION_HAND,0,1,1,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c3075.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c3075.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c)
--[[g1:Merge(g2)]]--
Duel.SendtoGrave(g1,REASON_COST)
Duel.Remove(g2,POS_FACEUP,REASON_COST)
......
......@@ -97,6 +97,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.ConfirmCards(1-tp,mat1)
Duel.SendtoDeck(mat1,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
......
......@@ -7,15 +7,24 @@ function c65110029.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e1:SetCondition(c65110029.condition)
e1:SetTarget(c65110029.target)
e1:SetOperation(c65110029.operation)
c:RegisterEffect(e1)
end
function c65110029.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x831)
end
function c65110029.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
local sg=g:Filter(Card.IsFaceup,nil)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.GetMatchingGroupCount(c65110029.cfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c65110029.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and c65110029.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c65110029.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c65110029.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,14,e:GetHandler())
local g=Duel.SelectTarget(tp,c65110029.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c65110029.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -24,11 +24,11 @@ end
function c67210003.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67210003.filter,1,nil,nil,tp)
end
function c67210003.unfilter(c,e,tp)
return c:GetSummonPlayer()==1-tp and not c:GetSequence()<=4
function c67210003.unfilter(c)
return c:GetSequence()>4
end
function c67210003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not eg:IsExists(c67210003.unfilter,1,nil,nil,tp) end
if chk==0 then return not eg:IsExists(c67210003.unfilter,1,nil) end
end
function c67210003.seqfilter(c,seq)
return c:GetSequence()==seq
......
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