Commit c2b6ce54 authored by Huangnan's avatar Huangnan

fix

parent 28319025
Pipeline #40387 passed with stage
in 2 minutes and 59 seconds
No preview for this file type
......@@ -7,7 +7,7 @@ function c11600540.initial_effect(c)
c:RegisterEffect(e0)
--ritual summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
......@@ -48,12 +48,13 @@ end
function c11600540.rcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c11600540.rfilter(c)
function c11600540.rfilter(c,e,tp)
return c:IsSetCard(0x3540) and c:IsAbleToRemove() and c:IsLevelAbove(1)
and not c:IsImmuneToEffect(e) and Duel.GetMZoneCount(tp,c)>0
end
function c11600540.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(c11600540.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c)
local mg=Duel.GetMatchingGroup(c11600540.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c,e,tp)
if chk==0 then
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
and mg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,#mg,c)
......@@ -63,7 +64,7 @@ end
function c11600540.rop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local mg=Duel.GetMatchingGroup(c11600540.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c)
local mg=Duel.GetMatchingGroup(c11600540.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local lv=c:GetOriginalLevel()
aux.GCheckAdditional=aux.RitualCheckAdditional(c,lv,"Equal")
......
......@@ -99,24 +99,26 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetLabel()) then
if Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
if Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetLabel())
local tc=g:GetFirst()
local res=Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
if res and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
Duel.DiscardHand(tp,cm.thfilter2,1,1,REASON_EFFECT+REASON_DISCARD)
elseif res then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
if res then
if Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.DiscardHand(tp,cm.thfilter2,1,1,REASON_EFFECT+REASON_DISCARD)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
Duel.SpecialSummonComplete()
end
......
......@@ -35,7 +35,7 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local m={}
local n={}
local ct=1
m[ct]=aux.Stringid(m,1) n[ct]=1 ct=ct+1 end
m[ct]=aux.Stringid(m,1) n[ct]=1 ct=ct+1
if t2 then m[ct]=aux.Stringid(m,2) n[ct]=2 ct=ct+1 end
if t3 then m[ct]=aux.Stringid(m,3) n[ct]=3 ct=ct+1 end
local sp=Duel.SelectOption(sp,table.unpack(m))
......@@ -62,6 +62,7 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext()
end
end
end
end
end
function cm.efilter(e,te)
......
......@@ -92,7 +92,7 @@ function c50218133.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c50218133.imtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
e:SetCategory(0)
local ch=Duel.GetCurrentChain()
if ch>1 and Duel.GetChainInfo(ch-1,CHAININFO_TRIGGERING_PLAYER)==1-tp then
......@@ -100,15 +100,15 @@ function c50218133.imtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function c50218133.imop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e,tp)
local tc=g:GetFirst()
local c=e:GetHandler()
if g:GetCount()>0 then
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c50218133.imfilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
local ch=Duel.GetCurrentChain()
......
......@@ -84,7 +84,7 @@ function s.spfilter(c)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,c,REASON_SPSUMMON)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,c,REASON_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=g:SelectUnselect(nil,tp,false,false,1,1)
if tc then
......
......@@ -60,7 +60,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,c,REASON_SPSUMMON)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,c,REASON_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=g:SelectUnselect(nil,tp,false,false,1,1)
if tc then
......
......@@ -61,7 +61,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,c,REASON_SPSUMMON)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,c,REASON_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=g:SelectUnselect(nil,tp,false,false,1,1)
if tc 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