Commit 5290439b authored by wind2009's avatar wind2009

Fix

parent 704921a6
Pipeline #41326 passed with stages
in 3 minutes and 14 seconds
No preview for this file type
...@@ -18,7 +18,7 @@ function s.initial_effect(c) ...@@ -18,7 +18,7 @@ function s.initial_effect(c)
e2:SetTarget(s.mvtg) e2:SetTarget(s.mvtg)
e2:SetOperation(s.mvop) e2:SetOperation(s.mvop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--negate --disable
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
......
...@@ -17,6 +17,7 @@ function s.initial_effect(c) ...@@ -17,6 +17,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
...@@ -43,7 +44,7 @@ function s.costfilter(c,e,tp) ...@@ -43,7 +44,7 @@ function s.costfilter(c,e,tp)
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalAttribute()) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalAttribute())
end end
function s.spfilter(c,e,tp,attr) function s.spfilter(c,e,tp,attr)
return c:IsSetCard(0x2d8) and c:GetOriginalAttribute()~=attr and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x2d8) and c:GetOriginalAttribute()&attr==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) end
......
...@@ -32,6 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,6 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) local b1=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(s.cspfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) local b2=Duel.IsExistingMatchingCard(s.cspfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(id,0))) then if b2 and (not b1 or Duel.SelectYesNo(tp,aux.Stringid(id,0))) then
local g=Duel.GetMatchingGroup(s.cspfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.cspfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
...@@ -37,7 +37,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,7 +37,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=g:GetClassCount(Card.GetCode) local ct=g:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,e:GetHandler()) local sg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,e:GetHandler())
if sg:IsExists(aux.NOT(Card.IsAbleToRemove),1,nil) then if sg:IsExists(aux.NOT(Card.IsAbleToRemove),1,nil)
or not (Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil)) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
end end
......
...@@ -55,7 +55,8 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,8 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsMainPhase() or Duel.GetTurnPlayer()~=tp and Duel.IsBattlePhase() return (Duel.IsMainPhase() or Duel.GetTurnPlayer()~=tp and Duel.IsBattlePhase())
and e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED)
end end
function s.cfilter(c,ec,tp) function s.cfilter(c,ec,tp)
return c:IsFaceup() and c:IsSetCard(0x1ca) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0x1ca) and c:IsAbleToGraveAsCost()
......
...@@ -33,7 +33,7 @@ function s.initial_effect(c) ...@@ -33,7 +33,7 @@ function s.initial_effect(c)
end end
end end
function s.rlfilter(c,tp) function s.rlfilter(c,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_RITUAL) return c:IsLocation(LOCATION_GRAVE) and c:IsAllTypes(TYPE_RITUAL+TYPE_MONSTER)
and c:IsControler(tp) and c:IsControler(tp)
end end
function s.extraop(e,tp,eg,ep,ev,re,r,rp,tc,mat) function s.extraop(e,tp,eg,ep,ev,re,r,rp,tc,mat)
...@@ -80,5 +80,5 @@ function s.rlcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,5 +80,5 @@ function s.rlcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),id)>Duel.GetFlagEffect(e:GetHandlerPlayer(),id+o) return Duel.GetFlagEffect(e:GetHandlerPlayer(),id)>Duel.GetFlagEffect(e:GetHandlerPlayer(),id+o)
end end
function s.rltg(e,c) function s.rltg(e,c)
return c:IsType(TYPE_RITUAL) return c:IsAllTypes(TYPE_RITUAL+TYPE_MONSTER)
end end
...@@ -36,7 +36,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,7 +36,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and rc:IsCanTurnSet() and not rc:IsType(TYPE_PENDULUM) then if Duel.NegateActivation(ev) and rc:IsRelateToChain(ev) and rc:IsCanTurnSet() and not rc:IsType(TYPE_PENDULUM) then
rc:CancelToGrave() rc:CancelToGrave()
Duel.ChangePosition(rc,POS_FACEDOWN) Duel.ChangePosition(rc,POS_FACEDOWN)
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
......
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