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()
function s.initial_effect(c)
--spsummon
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
......@@ -44,7 +44,4 @@ function c16400915.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function c16400915.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
end
\ No newline at end of file
......@@ -94,14 +94,18 @@ end
function s.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
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)
end
end
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
Duel.NegateActivation(ev)
local c=re:GetHandler()
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
......
......@@ -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
Duel.Remove(eg,POS_FACEDOWN,REASON_EFFECT)
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
Duel.ConfirmCards(tp,g1)
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
Duel.ConfirmCards(tp,g2)
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
Duel.Remove(g3,POS_FACEUP,REASON_EFFECT)
end
......
......@@ -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 b1=false
local b2=false
local g=Group.CreateGroup()
if g1:GetCount()>=1 then
b1=true
end
......@@ -107,20 +108,22 @@ function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
b2=true
end
if chk==0 then
return e:GetHandler():IsAbleToGraveAsCost()
return c:IsAbleToGraveAsCost()
and (b1 or b2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,2)},
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,2)},
{b2,aux.Stringid(id,3)})
if op==1 then
local g=g1:Select(tp,1,1,nil)
elseif op==2 then
local g=Duel.Select(tp,2,2,nil)
end
Duel.SendtoGrave(c,REASON_COST)
if op==1 then
local g=g1:Select(tp,1,1,nil)
elseif op==2 then
local g=Duel.Select(tp,2,2,nil)
end
Duel.SendtoGrave(c,REASON_COST)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
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)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,tp,2,REASON_EFFECT)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -141,6 +141,9 @@ end
function s.cost4(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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
local g=Group.CreateGroup()
g:AddCard(c)
......@@ -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_DESTROY,nil,1,0,0)
local sc=c:GetEquipTarget()
if sc:IsCode(61200201,61200202,61200203) then
if e:GetLabel()==1 then
Duel.SetChainLimit(aux.FALSE)
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