Commit 327d1fec authored by Huangnan's avatar Huangnan

fix

parent 378f8b89
Pipeline #38172 failed with stages
in 63 minutes and 8 seconds
--Dreaming the Sepialife --Dreaming the Sepialife
--Scripted by AlphaKretin --Scripted by AlphaKretin
--For Nemoma --For Nemoma
local s = c33701023 local s,id,o=GetID()
local id = 33701023
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
...@@ -28,44 +27,23 @@ end ...@@ -28,44 +27,23 @@ end
function s.condition(e, tp, eg, ep, ev, re, r, rp) function s.condition(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetTurnPlayer() ~= tp and Duel.IsAbleToEnterBP() return Duel.GetTurnPlayer() ~= tp and Duel.IsAbleToEnterBP()
end end
function s.rfilter(c,tp)
return c:IsSetCard(0x144e) and (c:IsControler(tp) or c:IsFaceup())
end
function s.fgoal(sg,tp)
if sg:GetCount()>0 and Duel.GetMZoneCount(tp,sg)>0 then
Duel.SetSelectedCard(sg)
return Duel.CheckReleaseGroup(REASON_COST,tp,nil,0,nil)
else return false end
end
function s.cost(e, tp, eg, ep, ev, re, r, rp, chk) function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
-- if chk == 0 then local rg=Duel.GetMatchingGroup(function(c) return c:IsSetCard(0x144e) and c:IsReleasable() and c:IsControler(tp) end, tp, LOCATION_MZONE, 0, nil)
-- return Duel.CheckReleaseGroupCost(tp, Card.IsSetCard, 2, false, aux.ReleaseCheckMMZ, nil, 0x144e) if chk==0 then return rg:GetCount()>=2 end
-- end
-- local g = Duel.SelectReleaseGroupCost(tp, Card.IsSetCard, 2, 2, false, aux.ReleaseCheckMMZ, nil, 0x144e)
-- Duel.Release(g, REASON_COST)
local rg=Duel.GetReleaseGroup(tp):Filter(s.rfilter,nil,tp)
if chk==0 then return rg:CheckSubGroup(s.fgoal,2,2,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=rg:SelectSubGroup(tp,s.fgoal,false,2,2,tp) local g=rg:Select(tp,2,2,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
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 Duel.IsChainDisablable(0) then local g = Duel.GetMatchingGroup(Card.IsAbleToGrave, 1-tp, LOCATION_MZONE, 0, nil)
local g = Duel.GetMatchingGroup(Card.IsAbleToGrave, tp, 0, LOCATION_MZONE, nil) if g:GetCount()>=2 and Duel.SelectYesNo(1-tp, aux.Stringid(id, 0)) then
if g:GetCount()>1 then --and Duel.SelectYesNo(1 - tp, aux.Stringid(id, 0)) then Duel.Hint(HINT_SELECTMSG, 1-tp, HINTMSG_TOGRAVE)
sel=Duel.SelectOption(1-tp,1213,1214) local sg = g:Select(1-tp, 2, 2, nil)
else
sel=Duel.SelectOption(1-tp,1214)+1
end
if sel==0 then
Duel.Hint(HINT_SELECTMSG, 1 - tp, HINTMSG_TOGRAVE)
local sg = g:Select(1 - tp, 2, 2, nil)
Duel.SendtoGrave(sg, REASON_EFFECT) Duel.SendtoGrave(sg, REASON_EFFECT)
Duel.NegateEffect(0) Duel.NegateEffect(0)
return return
end end
end Duel.SkipPhase(1-tp, PHASE_BATTLE, RESET_PHASE+PHASE_END, 1)
Duel.SkipPhase(1 - tp, PHASE_BATTLE, RESET_PHASE + PHASE_END, 1)
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsSetCard(0x144e) and c:IsAbleToGrave() return c:IsSetCard(0x144e) and c:IsAbleToGrave()
...@@ -77,7 +55,7 @@ end ...@@ -77,7 +55,7 @@ end
function s.tgop(e, tp, eg, ep, ev, re, r, rp) function s.tgop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
local g = Duel.SelectMatchingCard(tp, s.tgfilter, tp, LOCATION_DECK, 0, 2, 2, nil) local g = Duel.SelectMatchingCard(tp, s.tgfilter, tp, LOCATION_DECK, 0, 2, 2, nil)
if g:GetCount()>0 then if #g>0 then
Duel.SendtoGrave(g, REASON_EFFECT) Duel.SendtoGrave(g, REASON_EFFECT)
end end
end end
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