Commit be8bb9af authored by Huangnan's avatar Huangnan

fix

parent 2bcd9d08
Pipeline #41552 failed with stages
in 2 minutes and 57 seconds
--积木马 --积木马
local s,id=GetID() local s,id=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--spsummon --spsummon
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)
......
...@@ -44,7 +44,4 @@ function c16400915.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,4 @@ function c16400915.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
end end
function c16400915.lvcon(e,tp,eg,ep,ev,re,r,rp) \ No newline at end of file
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
...@@ -94,14 +94,18 @@ end ...@@ -94,14 +94,18 @@ end
function s.target3(e,tp,eg,ep,ev,re,r,rp,chk) function s.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) and re:IsLocation(LOCATION_GRAVE) then local c=re:GetHandler()
if c:IsAbleToRemove() and c:IsRelateToEffect(re) and c:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end end
end end
function s.operation3(e,tp,eg,ep,ev,re,r,rp) function s.operation3(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(re:GetHandler(),POS_FACEUP,REASON_EFFECT)>0 and re:IsPreviousLocation(LOCATION_GRAVE) and re:GetHandler():IsRelateToEffect(re) then local c=re:GetHandler()
Duel.NegateActivation(ev) if c:IsLocation(LOCATION_GRAVE) then
if c:IsRelateToEffect(re) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)>0 then
Duel.NegateActivation(ev)
end
end end
end end
......
...@@ -111,15 +111,15 @@ function s.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,15 +111,15 @@ function s.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(eg,POS_FACEDOWN,REASON_EFFECT)
Duel.BreakEffect() Duel.BreakEffect()
local g1=GetMatchingGroup(aux.TRUE,tp,0,LOCATION_HAND,nil) local g1=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_HAND,nil)
if g1:GetCount()>0 then if g1:GetCount()>0 then
Duel.ConfirmCards(tp,g1) Duel.ConfirmCards(tp,g1)
end end
local g2=GetMatchingGroup(s.f4,tp,0,LOCATION_ONFIELD,nil,e) local g2=Duel.GetMatchingGroup(s.f4,tp,0,LOCATION_ONFIELD,nil,e)
if g2:GetCount()>0 then if g2:GetCount()>0 then
Duel.ConfirmCards(tp,g2) Duel.ConfirmCards(tp,g2)
end end
local g3=GetMatchingGroup(aux.NecroValleyFilter(s.f5),tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,nil,e) local g3=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.f5),tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,nil,e)
if g3:GetCount()>0 then if g3:GetCount()>0 then
Duel.Remove(g3,POS_FACEUP,REASON_EFFECT) Duel.Remove(g3,POS_FACEUP,REASON_EFFECT)
end end
......
...@@ -100,6 +100,7 @@ function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -100,6 +100,7 @@ function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.f2),tp,LOCATION_GRAVE,0,nil) local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.f2),tp,LOCATION_GRAVE,0,nil)
local b1=false local b1=false
local b2=false local b2=false
local g=Group.CreateGroup()
if g1:GetCount()>=1 then if g1:GetCount()>=1 then
b1=true b1=true
end end
...@@ -107,20 +108,22 @@ function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -107,20 +108,22 @@ function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
b2=true b2=true
end end
if chk==0 then if chk==0 then
return e:GetHandler():IsAbleToGraveAsCost() return c:IsAbleToGraveAsCost()
and (b1 or b2) and (b1 or b2)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,2)}, {b1,aux.Stringid(id,2)},
{b2,aux.Stringid(id,3)}) {b2,aux.Stringid(id,3)})
if op==1 then if op==1 then
local g=g1:Select(tp,1,1,nil) local g=g1:Select(tp,1,1,nil)
elseif op==2 then elseif op==2 then
local g=Duel.Select(tp,2,2,nil) local g=Duel.Select(tp,2,2,nil)
end end
Duel.SendtoGrave(c,REASON_COST) Duel.SendtoGrave(c,REASON_COST)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end end
function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk) function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -167,6 +170,6 @@ function s.op5(e,tp,eg,ep,ev,re,r,rp) ...@@ -167,6 +170,6 @@ function s.op5(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,tp,2,REASON_EFFECT) Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -141,6 +141,9 @@ end ...@@ -141,6 +141,9 @@ end
function s.cost4(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost4(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local c2=c:GetEquipTarget() local c2=c:GetEquipTarget()
if c2:IsCode(61200201,61200202,61200203) then
e:SetLabel(1)
end
if chk==0 then return c:IsAbleToRemove() and c2:IsAbleToRemove() end if chk==0 then return c:IsAbleToRemove() and c2:IsAbleToRemove() end
local g=Group.CreateGroup() local g=Group.CreateGroup()
g:AddCard(c) g:AddCard(c)
...@@ -155,7 +158,7 @@ function s.tg4(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -155,7 +158,7 @@ function s.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
local sc=c:GetEquipTarget() local sc=c:GetEquipTarget()
if sc:IsCode(61200201,61200202,61200203) then if e:GetLabel()==1 then
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
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