Commit dad935b0 authored by wind2009's avatar wind2009

Fix

parent 120c1daa
Pipeline #37503 passed with stages
in 2 minutes and 50 seconds
No preview for this file type
......@@ -9,6 +9,8 @@
101302015
101302016
101302017
101302033
101302034
101302204
101302036
101302205
......@@ -21,5 +23,6 @@
101302061
101302062
101302063
101302066
101302209
101302076
\ No newline at end of file
......@@ -5,7 +5,7 @@ function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
......@@ -48,7 +48,7 @@ function s.srop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.rscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
return Duel.IsMainPhase()
end
function s.rcheck(gc)
return function(tp,g,c)
......@@ -65,16 +65,16 @@ function s.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
aux.RCheckAdditional=s.rcheck(c)
local res=mg:IsContains(c) and Duel.IsExistingMatchingCard(s.rsfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,mg)
aux.RCheckAdditional=nil
return res and Duel.GetFlagEffect(tp,id)==0
return res and Duel.GetFlagEffect(tp,id)==0
end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.rsop(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local c=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or not mg:IsContains(c) then return end
if c:IsControler(1-tp) or not c:IsRelateToChain() or not mg:IsContains(c) then return end
::cancel::
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.RCheckAdditional=s.rcheck(c)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.rsfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
......@@ -84,7 +84,7 @@ function s.rsop(e,tp,eg,ep,ev,re,r,rp)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
mg:RemoveCard(tc)
end
if not mg:IsContains(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......
......@@ -12,7 +12,6 @@ function s.initial_effect(c)
--protection
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
......@@ -34,7 +33,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.mat_filter(c)
return c:IsType(TYPE_RITUAL)
return c:IsAllTypes(TYPE_RITUAL+TYPE_MONSTER)
end
function s.prcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
......@@ -49,7 +48,7 @@ function s.prop(e,tp,eg,ep,ev,re,r,rp)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsAllTypes(TYPE_MONSTER+TYPE_RITUAL) and rc:IsSetCard(0x138) and ep==tp then
if rc:IsAllTypes(TYPE_MONSTER+TYPE_RITUAL) and rc:IsSetCard(0x138) and re:IsActiveType(TYPE_MONSTER) and ep==tp then
Duel.SetChainLimit(s.chainlm)
end
end
......@@ -78,7 +77,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToChain(ev)
and Duel.Destroy(eg,REASON_EFFECT)~=0
and e:GetLabel()==1
and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,0,LOCATION_MZONE,1,nil)
......@@ -88,7 +87,8 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
Duel.BreakEffect()
Duel.Release(tc,REASON_EFFECT)
Duel.HintSelection(g)
Duel.Release(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -17,10 +17,10 @@ function s.initial_effect(c)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--draw
--trigger
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_RELEASE)
e3:SetCategory(CATEGORY_DRAW+CATEGORY_RELEASE+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
......@@ -48,11 +48,12 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 then
if #g>0 and g:CheckSubGroup(s.gcheck,2,2) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,s.gcheck,false,2,2)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
......@@ -96,9 +97,12 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Draw(p,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
local dg=Duel.SelectMatchingCard(p,Card.IsDiscardable,p,LOCATION_HAND,0,1,1,nil,REASON_EFFECT+REASON_DISCARD)
if dg:GetCount()>0 then
Duel.BreakEffect()
Duel.ShuffleHand(p)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD,p)
end
end
elseif e:GetLabel()==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......@@ -106,7 +110,8 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
Duel.BreakEffect()
Duel.Release(tc,REASON_EFFECT)
Duel.HintSelection(g)
Duel.Release(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
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