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)
......
......@@ -22,7 +22,7 @@ function c3053.initial_effect(c)
e2:SetTarget(c3053.target)
e2:SetOperation(c3053.operation)
c:RegisterEffect(e2)
end
end
function c3053.cfilter(c)
return c:IsSetCard(0x1012) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
......@@ -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)
......@@ -62,7 +60,7 @@ function c3053.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,2)
local sg=g:Filter(Card.IsSetCard,nil,0x1012)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.ConfirmCards(1-tp,g)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT)
......@@ -70,5 +68,5 @@ function c3053.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
end
end
end
\ No newline at end of file
......@@ -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)
......@@ -81,7 +81,7 @@ function c3063.desop(e,tp,eg,ep,ev,re,r,rp)
if (opt==0 and tc:IsType(TYPE_MONSTER)) or (opt==1 and tc:IsType(TYPE_SPELL)) or (opt==2 and tc:IsType(TYPE_TRAP)) then
d1=d1+1
end
end
end
tc=sg:GetNext()
end
if d1>0 then
......@@ -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
--祭礼暗庭就职
function c3075.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c3075.spcost)
e1:SetTarget(c3075.sptg)
e1:SetOperation(c3075.spop)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCost(c3075.spcost2)
e2:SetTarget(c3075.sptg2)
e2:SetOperation(c3075.spop2)
c:RegisterEffect(e2)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c3075.spcost)
e1:SetTarget(c3075.sptg)
e1:SetOperation(c3075.spop)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCost(c3075.spcost2)
e2:SetTarget(c3075.sptg2)
e2:SetOperation(c3075.spop2)
c:RegisterEffect(e2)
end
function c3075.cfilter1(c)
return c:IsSetCard(0x1012) and c:IsAbleToGraveAsCost()
function c3075.cfilter1(c,tp)
return c:IsSetCard(0x1012) and c:IsAbleToGraveAsCost()
end
function c3075.cfilter2(c)
return c:IsSetCard(0x1012) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
return c:IsSetCard(0x1012) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c3075.filter(c,e,tp)
return c:IsSetCard(0x1012) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c3075.cfilter1,tp,LOCATION_HAND,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c3075.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
--[[g1:Merge(g2)]]--
Duel.SendtoGrave(g1,REASON_COST)
Duel.Remove(g2,POS_FACEUP,REASON_COST)
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,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
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)
end
function c3075.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c3075.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c3075.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c3075.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=-1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3075.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=-1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3075.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
function c3075.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
e:SetLabel(100)
return true
end
function c3075.costfilter(c,e,tp,tid,ec)
return c:IsSetCard(0x1012) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c3075.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,tid,ec)
return c:IsSetCard(0x1012) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c3075.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,tid,ec)
end
function c3075.spfilter(c,e,tp,tid,ec)
return c:IsSetCard(0x1012) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:GetTurnID()==tid and c~=ec and c:IsCanBeEffectTarget(e)
return c:IsSetCard(0x1012) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:GetTurnID()==tid and c~=ec and c:IsCanBeEffectTarget(e)
end
function c3075.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3075.spfilter(chkc,e,tp,tid,c) end
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c3075.costfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,tid,c)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c3075.costfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp,tid,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tg=Duel.SelectTarget(tp,c3075.spfilter,tp,LOCATION_GRAVE,0,1,1,g:GetFirst(),e,tp,tid,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
local c=e:GetHandler()
local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c3075.spfilter(chkc,e,tp,tid,c) end
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c3075.costfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,tid,c)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c3075.costfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp,tid,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
local tg=Duel.SelectTarget(tp,c3075.spfilter,tp,LOCATION_GRAVE,0,1,1,g:GetFirst(),e,tp,tid,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
end
function c3075.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -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