Commit 17e744f2 authored by TanakaKotoha's avatar TanakaKotoha

fbk

parent ac37ff9b
No preview for this file type
...@@ -4,85 +4,86 @@ ...@@ -4,85 +4,86 @@
local s = c33701017 local s = c33701017
local id = 33701017 local id = 33701017
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c, nil, 2, 2, s.lcheck) aux.AddLinkProcedure(c, nil, 2, 2, s.lcheck)
--special summon self --special summon self
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id, 0)) e1:SetDescription(aux.Stringid(id, 0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE + PHASE_END) e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(s.spcon) e1:SetValue(SUMMON_TYPE_SPECIAL+1)
e1:SetCost(s.spcost) e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg) e1:SetCost(s.spcost)
e1:SetOperation(s.spop) e1:SetTarget(s.sptg)
c:RegisterEffect(e1) e1:SetOperation(s.spop)
--negate c:RegisterEffect(e1)
local e2 = Effect.CreateEffect(c) --negate
e2:SetDescription(aux.Stringid(id, 1)) local e2 = Effect.CreateEffect(c)
-- e2:SetCategory(CATEGORY_DISABLE) e2:SetDescription(aux.Stringid(id, 1))
e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS) -- e2:SetCategory(CATEGORY_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.negop) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
c:RegisterEffect(e2) e2:SetOperation(s.negop)
--special summon other c:RegisterEffect(e2)
local e3 = Effect.CreateEffect(c) --special summon other
e3:SetDescription(aux.Stringid(id, 2)) local e3 = Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetDescription(aux.Stringid(id, 2))
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetRange(LOCATION_MZONE) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE)
e3:SetTarget(s.sptg2) e3:SetCountLimit(1)
e3:SetOperation(s.spop2) e3:SetTarget(s.sptg2)
c:RegisterEffect(e3) e3:SetOperation(s.spop2)
c:RegisterEffect(e3)
end end
function s.lcheck(g, lc, tp) function s.lcheck(g, lc, tp)
return g:IsExists(Card.IsLinkSetCard, 1, nil, 0x144e) return g:IsExists(Card.IsLinkSetCard, 1, nil, 0x144e)
end end
function s.spcon(e, tp, eg, ep, ev, re, r, rp) function s.spcon(e, tp, eg, ep, ev, re, r, rp)
local ns, ss = Duel.GetActivityCount(tp, ACTIVITY_SUMMON, ACTIVITY_SPSUMMON) local ns, ss = Duel.GetActivityCount(tp, ACTIVITY_SUMMON, ACTIVITY_SPSUMMON)
return Duel.GetTurnPlayer() == tp and ns + ss == 0 return Duel.GetTurnPlayer() == tp and ns + ss == 0
end end
function s.spfilter(c) function s.spfilter(c)
return c:IsSetCard(0x144e) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x144e) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
--function s.MZFilter(c, tp) --function s.MZFilter(c, tp)
-- return c:IsLocation(LOCATION_MZONE) and c:GetSequence() < 5 and c:IsControler(tp) -- return c:IsLocation(LOCATION_MZONE) and c:GetSequence() < 5 and c:IsControler(tp)
--end --end
--function s.ChkfMMZ(sumcount) --function s.ChkfMMZ(sumcount)
-- return function(sg, e, tp, mg) -- return function(sg, e, tp, mg)
-- return sg:FilterCount(s.MZFilter, nil, tp) + Duel.GetLocationCount(tp, LOCATION_MZONE) >= sumcount -- return sg:FilterCount(s.MZFilter, nil, tp) + Duel.GetLocationCount(tp, LOCATION_MZONE) >= sumcount
-- end -- end
--end --end
function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk) function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil) end
-- if chk == 0 then -- if chk == 0 then
-- return Duel.GetLocationCount(tp, LOCATION_MZONE) > -2 and #rg > 1 and -- return Duel.GetLocationCount(tp, LOCATION_MZONE) > -2 and #rg > 1 and
-- rg:CheckSubGroup(s.ChkfMMZ(1), 2, 2, tp) -- rg:CheckSubGroup(s.ChkfMMZ(1), 2, 2, tp)
-- end -- end
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk) function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler() local c = e:GetHandler()
if chk == 0 then if chk == 0 then
return c:IsCanBeSpecialSummoned(e, 0, tp, true, true) return c:IsCanBeSpecialSummoned(e, 0, tp, true, true)
end end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
end end
function s.spop(e, tp, eg, ep, ev, re, r, rp) function s.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 1, tp, tp, true, true, POS_FACEUP) ~= 0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 1, tp, tp, true, true, POS_FACEUP) ~= 0 then
c:CompleteProcedure() c:CompleteProcedure()
-- c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0) -- c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0)
end end
end end
function s.negop(e, tp, eg, ep, ev, re, r, rp) function s.negop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if not c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 then return end if c:GetSummonType()~=SUMMON_TYPE_SPECIAL+1 then return end
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
...@@ -93,26 +94,26 @@ function s.negop(e, tp, eg, ep, ev, re, r, rp) ...@@ -93,26 +94,26 @@ function s.negop(e, tp, eg, ep, ev, re, r, rp)
Duel.RegisterEffect(e1, tp) Duel.RegisterEffect(e1, tp)
end end
function s.disable(e,c) function s.disable(e,c)
return c:GetFieldID()~=e:GetLabel() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT)) return c:GetFieldID()~=e:GetLabel() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT))
end end
function s.spfilter2(c, e, tp, zone) function s.spfilter2(c, e, tp, zone)
return c:IsSetCard(0x144e) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP, tp, zone) return c:IsSetCard(0x144e) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP, tp, zone)
end end
function s.sptg2(e, tp, eg, ep, ev, re, r, rp, chk) function s.sptg2(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then if chk == 0 then
local zone = e:GetHandler():GetLinkedZone(tp) local zone = e:GetHandler():GetLinkedZone(tp)
return zone ~= 0 and Duel.IsExistingMatchingCard(s.spfilter2, tp, LOCATION_REMOVED, 0, 1, nil, e, tp, zone) return zone ~= 0 and Duel.IsExistingMatchingCard(s.spfilter2, tp, LOCATION_REMOVED, 0, 1, nil, e, tp, zone)
end end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_REMOVED) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_REMOVED)
end end
function s.spop2(e, tp, eg, ep, ev, re, r, rp) function s.spop2(e, tp, eg, ep, ev, re, r, rp)
local zone = e:GetHandler():GetLinkedZone(tp) local zone = e:GetHandler():GetLinkedZone(tp)
if zone == 0 then if zone == 0 then
return return
end end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local g = Duel.SelectMatchingCard(tp, s.spfilter2, tp, LOCATION_REMOVED, 0, 1, 1, nil, e, tp, zone) local g = Duel.SelectMatchingCard(tp, s.spfilter2, tp, LOCATION_REMOVED, 0, 1, 1, nil, e, tp, zone)
if #g > 0 then if #g > 0 then
Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP, zone) Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP, zone)
end end
end end
...@@ -4,102 +4,105 @@ ...@@ -4,102 +4,105 @@
local s = c33701021 local s = c33701021
local id = 33701021 local id = 33701021
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Skip phases --Skip phases
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetOperation(s.skipop) e2:SetOperation(s.skipop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--recover --recover
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(s.thcon) e3:SetCondition(s.thcon)
e3:SetTarget(s.thtg) e3:SetTarget(s.thtg)
e3:SetOperation(s.thop) e3:SetOperation(s.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsSetCard(0x144e) and c:IsAbleToGrave() return c:IsSetCard(0x144e) and c:IsAbleToGrave()
end end
function s.activate(e, tp, eg, ep, ev, re, r, rp) function s.activate(e, tp, eg, ep, ev, re, r, rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if g:GetClassCount(Card.GetCode)<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
local dg=g:Select(tp,1,3,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.SendtoGrave(dg,REASON_EFFECT) local dg=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
end if dg and dg:GetCount()==3 then
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end
end end
function s.skipop(e, tp, eg, ep, ev, re, r, rp) function s.skipop(e, tp, eg, ep, ev, re, r, rp)
if Duel.GetTurnPlayer() ~= tp then if Duel.GetTurnPlayer() ~= tp then
return return
end end
local c = e:GetHandler() local c = e:GetHandler()
local hinted = false local hinted = false
if Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then if Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then
Duel.Hint(HINT_CARD, 0, id) Duel.Hint(HINT_CARD, 0, id)
hinted = true hinted = true
Duel.Hint(HINT_OPSELECTED, 1 - tp, aux.Stringid(id, 1)) Duel.Hint(HINT_OPSELECTED, 1 - tp, aux.Stringid(id, 1))
Duel.SkipPhase(tp, PHASE_MAIN1, RESET_PHASE + PHASE_END, 1) Duel.SkipPhase(tp, PHASE_MAIN1, RESET_PHASE + PHASE_END, 1)
Duel.SkipPhase(tp, PHASE_MAIN2, RESET_PHASE + PHASE_END, 1) Duel.SkipPhase(tp, PHASE_MAIN2, RESET_PHASE + PHASE_END, 1)
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE + PHASE_END) e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetOperation(s.drop) e1:SetOperation(s.drop)
e1:SetReset(RESET_PHASE + PHASE_END) e1:SetReset(RESET_PHASE + PHASE_END)
Duel.RegisterEffect(e1, tp) Duel.RegisterEffect(e1, tp)
end end
if Duel.SelectYesNo(tp, aux.Stringid(id, 2)) then if Duel.SelectYesNo(tp, aux.Stringid(id, 2)) then
if not hinted then if not hinted then
Duel.Hint(HINT_CARD, 0, id) Duel.Hint(HINT_CARD, 0, id)
end end
Duel.Hint(HINT_OPSELECTED, 1 - tp, aux.Stringid(id, 2)) Duel.Hint(HINT_OPSELECTED, 1 - tp, aux.Stringid(id, 2))
Duel.SkipPhase(tp, PHASE_BATTLE, RESET_PHASE + PHASE_END, 1) Duel.SkipPhase(tp, PHASE_BATTLE, RESET_PHASE + PHASE_END, 1)
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE + PHASE_END) e2:SetCode(EVENT_PHASE + PHASE_END)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetOperation(s.lpop) e2:SetOperation(s.lpop)
e2:SetReset(RESET_PHASE + PHASE_END) e2:SetReset(RESET_PHASE + PHASE_END)
Duel.RegisterEffect(e2, tp) Duel.RegisterEffect(e2, tp)
end end
end end
function s.drop(e, tp, eg, ep, ev, re, r, rp) function s.drop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_CARD, 0, id) Duel.Hint(HINT_CARD, 0, id)
Duel.Draw(tp, 2, REASON_EFFECT) Duel.Draw(tp, 2, REASON_EFFECT)
end end
function s.lpop(e, tp, eg, ep, ev, re, r, rp) function s.lpop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_CARD, 0, id) Duel.Hint(HINT_CARD, 0, id)
Duel.Recover(tp, 2000, REASON_EFFECT) Duel.Recover(tp, 2000, REASON_EFFECT)
end end
function s.thcon(e, tp, eg, ep, ev, re, r, rp) function s.thcon(e, tp, eg, ep, ev, re, r, rp)
local ns, ss = Duel.GetActivityCount(tp, ACTIVITY_SUMMON, ACTIVITY_SPSUMMON) local ns, ss = Duel.GetActivityCount(tp, ACTIVITY_SUMMON, ACTIVITY_SPSUMMON)
return ns + ss == 0 return ns + ss == 0
end end
function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk) function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler() local c = e:GetHandler()
if chk == 0 then if chk == 0 then
return c:IsAbleToHand() return c:IsAbleToHand()
end end
Duel.SetOperationInfo(0, CATEGORY_TOHAND, c, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_TOHAND, c, 1, 0, 0)
Duel.SetOperationInfo(0, CATEGORY_LEAVE_GRAVE, c, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_LEAVE_GRAVE, c, 1, 0, 0)
end end
function s.thop(e, tp, eg, ep, ev, re, r, rp) function s.thop(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
Duel.SendtoHand(c, nil, REASON_EFFECT) Duel.SendtoHand(c, nil, REASON_EFFECT)
end end
end end
...@@ -81,7 +81,7 @@ function c60151421.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function c60151421.spop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) g:GetFirst():RegisterEffect(e1,true)
else else
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(60151421,2)) e1:SetDescription(aux.Stringid(60151421,2))
......
...@@ -48,7 +48,6 @@ function cm.thfilter(c) ...@@ -48,7 +48,6 @@ function cm.thfilter(c)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,2))
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
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